Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix for #3515 Allowing Kptfile pipeline functions to be referenced by… #4178

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mansoor17syed
Copy link

… config by resource name

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 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow Kptfile pipeline functions to reference config by resource name
1 participant