Feature request: fail if port name is longer than 15 characters
devopsmash opened this issue · comments
devopsmash commented
in case that you have Deployment.yaml
with port name that contains more than 15 character, the k8s will fail the deployment with the following error
Error: Deployment.apps "my-app" is invalid: spec.template.spec.containers[0].ports[0].name: Invalid value: "my-old-app-legacy": must be no more than 15 characters
it will be awesome if kube-score
will be able to detect cases like that before the Deployment
example:
apiVersion: apps/v1
kind: Deployment
metadata:
name: app
labels:
app: app
spec:
selector:
matchLabels:
app: app
template:
metadata:
labels:
app: app
spec:
nodeSelector:
beta.kubernetes.io/os: linux
containers:
- name: app
image: app:dev
imagePullPolicy: "Always"
ports:
- name: my-old-app-legacy
containerPort: 80
protocol: TCP
Kenneth Martau commented
@dsaydon90 and @zegl, I will fix this
Kenneth Martau commented
@zegl -- This issue can be closed. Fix delivered and merged last May.