Skip to content
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

Unwelcome change in behavior for Cluster Agent Name by using clusterAgent.appName value #38

Open
joshwright10 opened this issue May 24, 2023 · 0 comments

Comments

@joshwright10
Copy link

Version v1.9.0 of the Cluster Agent Helm Chart used to make the Cluster Agent Name using the syntax "%s-%s" .Release.Name "appdynamics-cluster-agent" this was changed in v1.10.0 to derive the name using .Values.clusterAgent.appName.

Kubernetes does not allow uppercase letters in the resource name and we are passing in an uppercase value from an external source. This change in behavior therefore caused the upgrade to fail. I suggest that this be handled in the template to force the value to be lowercase, rather than requiring external systems to do this in advance.

https://github.com/CiscoDevNet/appdynamics-charts/blob/12257197ab9f27488c7b46dc796f0200b7450bc6/cluster-agent/templates/cluster-agent.yaml#LL5C8-L5C8

Error

Error: UPGRADE FAILED: failed to create resource: Clusteragent.cluster.appdynamics.com "MHRDEV02-K8S-01-appdynamics" is invalid: metadata.name: Invalid value: "MHRDEV02-K8S-01-appdynamics": a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is 'a-z0-9?(.a-z0-9?)*')

However, I don't believe that the Cluster Agent Name should be derived from this value at all. In our scenario, the clusterAgent.appName is different per cluster, and we do not want the Cluster Agent Name changing based on this value.

Why not do something similar to other popular charts which use the _helpers.tpl and the fullname function (see other popular Helm Charts like prometheus and argo-cd as examples).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant