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 support for local-config annotation #2275

Merged
merged 1 commit into from
Jun 17, 2021
Merged

Conversation

mortent
Copy link
Contributor

@mortent mortent commented Jun 17, 2021

This adds back the support for the local config annotation that was removed in error in an earlier PR. This also adds support for using config.kubernetes.io/local-config: "false" to explicitly set a resource as not being local config. This means that even if the file with the resource is referenced from the hydration pipeline, it will be applied by kpt.

Any other values than "true" or "false" are also allowed and they will cause the resource to be considered local config. This is a little strange, but I don't think we should let kpt error out on other values.

@@ -127,6 +153,23 @@ func TestPathManifestReader_Read(t *testing.T) {
namespace: "test-namespace",
expectedErrMsg: "unknown resource types: Custom.custom.io",
},
"local-config is filtered out": {
Copy link
Contributor

@frankfarzan frankfarzan Jun 17, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

orthogonal to this: I'm pretty much convinced that declaring packages in Go like this is an anti-pattern. At some point, need to move away from this.

@mortent mortent merged commit 1e90c82 into kptdev:main Jun 17, 2021
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.

2 participants