You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When linting a Helm chart that defines a Job resource (batch/v1) which defines metadata.generateName instead of metadata.name linting fails with an error:
[ERROR] templates/job.yaml: object name must be between 0 and 253 characters: ""
According to the documentation generateName can be used instead of name:
generateName
GenerateName is an optional prefix, used by the server, to generate a
unique name ONLY IF the Name field has not been provided. If this field is
used, the name returned to the client will be different than the name
passed. This value will also be combined with a unique suffix. The provided
value has the same validation rules as the Name field, and may be truncated
by the length of the suffix required to make the value unique on the
server.
If this field is specified and the generated name exists, the server will
NOT return a 409 - instead, it will either return 201 Created or 500 with
Reason ServerTimeout indicating a unique name could not be found in the
time allotted, and the client should retry (optionally after the time
indicated in the Retry-After header).
In our case we are using this in combination with ArgoCD sync hooks.
According to the documentation it seems that generateName might be valid for other resources as well. Is there a reason why this is not supported in Helm? If so, would it maybe be possible to change this to a warning instead of an error?
Work-around
The current work-around is to use an older helm version (e.g. 3.2.4) where this resource doesn't fail linting.
The text was updated successfully, but these errors were encountered:
This issue has been marked as stale because it has been open for 90 days with no activity. This thread will be automatically closed in 30 days if no further activity occurs.
Environment
Output of
helm version
:Output of
kubectl version
:Cloud Provider/Platform (AKS, GKE, Minikube etc.): OpenShift 4.6.17
Problem
When linting a Helm chart that defines a
Job
resource (batch/v1
) which definesmetadata.generateName
instead ofmetadata.name
linting fails with an error:The resource definition looks like this:
According to the documentation
generateName
can be used instead ofname
:Source: ObjectMeta documentation
In our case we are using this in combination with ArgoCD sync hooks.
According to the documentation it seems that
generateName
might be valid for other resources as well. Is there a reason why this is not supported in Helm? If so, would it maybe be possible to change this to a warning instead of an error?Work-around
The current work-around is to use an older helm version (e.g. 3.2.4) where this resource doesn't fail linting.
The text was updated successfully, but these errors were encountered: