...

Text file src/github.com/instrumenta/kubeval/fixtures/same-kind-different-api.yaml

Documentation: github.com/instrumenta/kubeval/fixtures

     1# Two objects with same name in same namespace, and having the same kind, but
     2# of different API (apps/v1 vs. apps/v1beta1). This is important when CRDs
     3# introduce overlapping `metadata:name` values, e.g. `Deployment` in
     4# `my-awesome-cd-tool.io/v1` (contrived scenario).
     5
     6
     7apiVersion: apps/v1
     8kind: Deployment
     9metadata:
    10  name: nginx-deployment
    11  labels:
    12    app: nginx
    13spec:
    14  replicas: 3
    15  selector:
    16    matchLabels:
    17      app: nginx
    18  template:
    19    metadata:
    20      labels:
    21        app: nginx
    22    spec:
    23      containers:
    24      - name: nginx
    25        image: nginx:1.7.9
    26        ports:
    27        - containerPort: 80
    28---
    29apiVersion: apps/v1beta1
    30kind: Deployment
    31metadata:
    32  name: nginx-deployment
    33  labels:
    34    app: nginx
    35spec:
    36  replicas: 3
    37  selector:
    38    matchLabels:
    39      app: nginx
    40  template:
    41    metadata:
    42      labels:
    43        app: nginx
    44    spec:
    45      containers:
    46      - name: nginx
    47        image: nginx:1.7.9
    48        ports:
    49        - containerPort: 80

View as plain text