-
Notifications
You must be signed in to change notification settings - Fork 113
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: include namespace in renderedYaml filename #1429
fix: include namespace in renderedYaml filename #1429
Conversation
62e2a06
to
a20d23d
Compare
@lblackstone I'm not sure if |
The test that failed seems unrelated 👍 |
/run-acceptance-tests |
Please view the PR build - https://github.com/pulumi/pulumi-kubernetes/actions/runs/497210330 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR!
I do have a couple concerns about this change so far:
- While changing the name does resolve the bug, it also would rename every generated resource YAML, which might break users' existing workflows. Adding the namespace is a good way to disambiguate, but it would be ideal if we could leave existing stacks alone. I'm not sure off the top of my head how easy that would be to check.
GetNamespace()
will return""
for the default namespace, so it would be better to format the string to avoid the extra-
in that case. e.g.pod-foo
rather thanpod--foo
.
@lblackstone With regards to issue 1 - I don't think that's a problem. Anyone generating the YAML will be using Happy to implement issue 2 if you're happy to proceed on the above hypothesis. Option 3 could be to add another option to the provider config to tweak the filenames, but I don't think that would be used really? |
Yeah, that's probably a reasonable assumption. Let's proceed with this change, and I'll bump the minor version of the next release since it's technically a breaking change. |
@rawkode Just checking in to see if you plan to come back to this. Thanks! |
The last message from @lblackstone said they where happy to go with it as it is, under our assumptions. I was just waiting for this to be merged. |
Oh, sorry for the confusion. There's still one point of feedback to address, and then we can merge.
|
This fixes a problem when resources have the same name/kind, but live in different namespaces. This caused the first file written to be overwritten by the later resources.
06501fd
to
f994a71
Compare
PR is now waiting for a maintainer to run the acceptance tests. This PR will only perform build and linting. Note for the maintainer: To run the acceptance tests, please comment /run-acceptance-tests on the PR |
/run-acceptance-tests |
Please view the PR build - https://github.com/pulumi/pulumi-kubernetes/actions/runs/603420812 |
Thanks for the PR! |
This fixes a problem when resources have the same name/kind, but live in different namespaces. This caused the first file written to be overwritten by the later resources.