-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
generated Kubernetes resources : roleBinding.yaml: object name does not conform to Kubernetes naming requirements #12269
Comments
/cc @geoand |
@iocanel this seems to come down to how String name = Strings.isNotNullOrEmpty(this.name) ? this.name : meta.getName() + ":" + this.role; Should we change that? |
instead of ":" . change it to "-" and it will works |
👍 https://kubernetes.io/docs/concepts/overview/working-with-objects/names/ gives all the rules |
Fixing it upstream, will release later today. |
Great, thanks! |
Fixed by #12278 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I separated kubernetes.yaml into different files in Helm chart format
my app name is : kubernetes-api
The problem is with the name: "kubernetes-api:view"
The naming convention is : https://kubernetes.io/docs/concepts/overview/working-with-objects/names/
contain at most 63 characters
contain only lowercase alphanumeric characters or '-'
start with an alphanumeric character
end with an alphanumeric character
when I try to validate the yaml, I got a error
helm lint (or I used Intellij to validate the yaml file)
Error: 1 chart(s) linted, 1 chart(s) failed
==> Linting chart
[ERROR] templates/roleBinding.yaml: object name does not conform to Kubernetes naming requirements: "kubernetes-api:view"
apiVersion: "rbac.authorization.k8s.io/v1"
kind: "RoleBinding"
metadata:
labels:
{{ include "app.labels" . | indent 4 }}
name: "kubernetes-api:view"
roleRef:
kind: "ClusterRole"
apiGroup: "rbac.authorization.k8s.io"
name: "view"
subjects:
name: {{ include "app.name" . }}
The text was updated successfully, but these errors were encountered: