airshipctl/pkg/cluster/testdata/missing-plural/crd.yaml
Ian Howell 77ebd891a2 Cluster Status library tools
This adds the StatusMap type, which can be used to gather the Status of
a given kubernetes resource. A StatusMap can be created from a
document.Bundle and represents all possible Statuses for all
CustomResources, and the conditions that must be met for those statuses
to be valid.

Relates-To: #73
Change-Id: If2cba0bb9890fe28feff0c890bb8036489196fc4
2020-03-27 16:09:15 -05:00

41 lines
963 B
YAML

# this CRD defines a type, but does not have a status-check defined in the
# annotations. This is not an error, but a StatusMap won't be able to perform
# any validation on resources
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: resources.example.com
annotations:
airshipit.org/status-check: |
[
{
"status": "Stable",
"condition": "@.status.state==\"stable\""
},
{
"status": "Pending",
"condition": "@.status.state==\"pending\""
}
]
spec:
group: example.com
versions:
- name: v1
served: true
storage: true
schema:
openAPIV3Schema:
type: object
properties:
status:
type: object
properties:
state:
type: string
scope: Namespaced
names:
singular: resource
kind: Resource
shortNames:
- rsc