instrumenta / instrumenta/kubeval

Validation passes on service with no name

Open
#181 1 comment 1 reaction 0 assignees View on GitHub
schema
Dominant language
Go
Stars
3.2k
Forks
227
PR merge metrics
No merged PRs in 30d

Description

version:
```
kubeval --version
Version: 0.14.0
Commit: eae975a0031c57f01976474f428861f50cfc551e
Date: 2019-09-01T10:07:27Z
```

definition:
```
cat def.yaml
---
apiVersion: v1
kind: Service
metadata:
name:
labels:
app: my-service
spec:
type: ClusterIP
ports:
- port: 4665
targetPort: 4665
protocol: TCP
name: http
selector:
app: my-service
```

test:
```
kubeval def.yaml
PASS - def.yaml contains a valid Service
```

error:
```
kubectl apply -f def.yaml
error: error when retrieving current configuration of:
Resource: "/v1, Resource=services", GroupVersionKind: "/v1, Kind=Service"
Name: "", Namespace: "default"
Object: &{map["apiVersion":"v1" "kind":"Service" "metadata":map["annotations":map["kubectl.kubernetes.io/last-applied-configuration":""] "labels":map["app":"my-service"] "name": "namespace":"default"] "spec":map["ports":[map["name":"http" "port":'\u1239' "protocol":"TCP" "targetPort":'\u1239']] "selector":map["app":"my-service"] "type":"ClusterIP"]]}
from server for: "def.yaml": resource name may not be empty
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.