-
-
Notifications
You must be signed in to change notification settings - Fork 51
Closed
Description
Operating system
Ubuntu 24.10
Kluctl Version
2.25.1 - controller
Kubernetes Version
v1.31.5
kubectl Version
v1.31
Bug description
The kluctl gitops diff
command ends up in a error when a kluctlDeployment is create with a name more then 63 Characters.
This happening because the controller can not create a result-secret as it reuse the name of the deployment for a label of the result-secret.
Names of resources and label keys/values are not compatible types and we need some sort of "type-conversion". see: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/
I think the biggest difference we have to care about are:
- Length:
-
- Name: 253 chars
-
- label-value: 63 chars
- For some cases label-values should not start with numbers
Steps to reproduce
- Create a kluctlDeployment with a name more than 63 charecters
- execute kluctl gitops diff --namespace --name
- expecting error in controller log
Relevant log output
{
"level": "error",
"ts": "2025-03-04T06:46:13Z",
"msg": "Writing validate result failed",
"controller": "kluctldeployment",
"controllerGroup": "gitops.kluctl.io",
"controllerKind": "KluctlDeployment",
"KluctlDeployment": {
"name": "cloud-services-backend-third-party-api-documentation-third-party",
"namespace": "staging-third-party-api"
},
"namespace": "staging-third-party-api",
"name": "cloud-services-backend-third-party-api-documentation-third-party",
"reconcileID": "490995ec-724f-43ba-b7c0-ba0c1cca10ca",
"error": "Secret \"vr-documentation-fa4aebd0-5592-40e6-8553-15384d4cfda9\" is invalid: metadata.labels: Invalid value: \"cloud-services-backend-third-party-api-documentation-third-party\": must be no more than 63 characters",
"stacktrace": ""
}
Metadata
Metadata
Assignees
Labels
No labels