-
Notifications
You must be signed in to change notification settings - Fork 34
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
Remove module/workspace name labels from output ConfigMaps #423
Conversation
Thank you for your submission! We require that all contributors sign our Contributor License Agreement ("CLA") before we can accept the contribution. Read and sign the agreement Learn more about why HashiCorp requires a CLA and what the CLA includes Have you signed the CLA already but the status is still pending? Recheck it. |
Hi @jtdoepke, Thank you for raising this PR!
Thanks! |
Hi @arybolovlev, I've signed the CLA and updated the PR to just remove the name labels. |
Thank you, @jtdoepke! Please push change log entries. I will then approve this PR, merge, and cut a new release with this fix. $ changie new --kind BUG\ FIXES --custom "PR=423" --body '`Module`: Fix an issue where the controller cannot create ConfigMap and Secret for outputs when a Module custom resource `metadata.name` is longer than 63 characters. This issue occurs because the controller uses the custom resource name as the value for the ModuleName label in ConfigMap and Secret. The `ModuleName` label has been removed."'
$ changie new --kind BUG\ FIXES --custom "PR=423" --body '`Workspace`: Fix an issue where the controller cannot create ConfigMap and Secret for outputs when a Workspace custom resource `metadata.name` is longer than 63 characters. This issue occurs because the controller uses the custom resource name as the value for the `workspaceName` label in ConfigMap and Secret. The `workspaceName` label has been removed.' |
The names of workspaces and modules can exceed the maximum length of a Kubernetes label value (63 characters).
@arybolovlev changelog files added. |
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.
Thank you for fixing this, @jtdoepke!
Description
Labels on Kubernetes resources can only be 63 characters long. If the workspace/module name is longer than that, the controllers will go into an error loop. This PR truncates the ConfigMap labels at 63 characters.
I'll be the first to admit this is not a very good solution, and I am open to an alternative. I just didn't want to propose a breaking change without getting some input.
Alternatives:
Usage Example
N/A
References
Community Note