Closed jtdoepke closed 3 months ago
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!
ModuleName
and workspaceName
labels and leave workspaceID
as it is (please do not truncate it). The workspace ID remains the same length and fits within the label length limit. I understand, that if that changes we will get into the same issue, however, on a long run distance we will need a more reliable solution. I like the alternative proposals that you made and we will definitely take them into account.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.'
@arybolovlev changelog files added.
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