Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Allow Kptfile pipeline functions to reference config by resource name#4178

Open
mansoor17syed wants to merge 1 commit intokptdev:main from
mansoor17syed:issue_3515
Open

Allow Kptfile pipeline functions to reference config by resource name #4178
mansoor17syed wants to merge 1 commit intokptdev:main from
mansoor17syed:issue_3515

Conversation

@mansoor17syed
Copy link

@mansoor17syed mansoor17syed commented Dec 31, 2024
edited by CsatariGergely
Loading

Description

Add support for referencing existing resources in the package as function configs. This allows users to reference existing resources (like ConfigMaps) in their package as function configurations instead of duplicating the configuration in the Kptfile.

Motivation

Currently, function configurations can only be specified using configPath or configMap. This requires users to either maintain separate configuration files or duplicate configurations in the Kptfile. By allowing references to existing resources, we can:

  • Reduce configuration duplication
  • Improve maintainability
  • Allow reuse of existing resources as function configurations

Changes

  • Add ResourceReference type in pkg/api/kptfile/v1/types.go
  • Add validation for resource references in pkg/api/kptfile/v1/validation.go
  • Add test cases for resource reference validation in pkg/api/kptfile/v1/validation_test.go

Testing

  • Added unit tests for validation
  • Tested with existing ConfigMap resources
  • Verified error handling for invalid configurations

Fixes #3515

...ced by config by resource name
Signed-off-by: mansoora <syed.mansoor_a@nokia.com>
Copy link
Contributor

This looks like a good addition, We need to find time to pull it down and try it out. Also we need to add an e2e test for this.

@CsatariGergely CsatariGergely changed the title (削除) fix for #3515 Allowing Kptfile pipeline functions to be referenced by... (削除ここまで) (追記) Allow Kptfile pipeline functions to reference config by resource name (追記ここまで) Feb 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@kispaljr kispaljr Awaiting requested review from kispaljr kispaljr is a code owner

@ciaranjohnston ciaranjohnston Awaiting requested review from ciaranjohnston

@CsatariGergely CsatariGergely Awaiting requested review from CsatariGergely

@liamfallon liamfallon Awaiting requested review from liamfallon liamfallon is a code owner

@efiacor efiacor Awaiting requested review from efiacor efiacor is a code owner

At least 2 approving reviews are required to merge this pull request.

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Allow Kptfile pipeline functions to reference config by resource name

Comments

AltStyle によって変換されたページ (->オリジナル) /