Skip to content

Missing list-v1 validation #15

@bredmond5

Description

@bredmond5

for example manifest:

apiVersion: v1
items:
- apiVersion: apps/v1
  kind: Deployment
  metadata:
    name: nginx-deployment
    labels:
      app: nginx
  spec:
    replicas: 3
    selector:
      matchLabels:
        app: nginx
    template:
      metadata:
        labels:
          app: nginx
      spec:
        containers:
        - name: nginx
          image: nginx:1.14.2
          ports:
          - containerPort: 80
- apiVersion: v1
  kind: Service
  metadata:
    labels:
      app: nginx
    name: nginx
  spec:
    ports:
    - port: 80
      protocol: TCP
      targetPort: 80
    selector:
      app: nginx
kind: List

running the python linekubernetes_validate.validate(rendered_yaml, '1.22', strict=False) results in the error:
FileNotFoundError: [Errno 2] No such file or directory: '/usr/local/lib/python3.9/site-packages/kubernetes_validate/kubernetes-json-schema/v1.22.0-local/list-v1.json'

It seems like the list-v1.json file is missing in https://github.com/willthames/kubernetes-validate/tree/main/src/kubernetes_validate/kubernetes-json-schema/v1.22.0-local.

What are the steps to add that? I can assist here if needed. Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions