apiVersion: apiextensions.k8s.io/v1beta1 kind: CustomResourceDefinition metadata: name: policies.policy.nirmata.io spec: group: policy.nirmata.io versions: - name: v1alpha1 served: true storage: true scope: Cluster names: kind: Policy plural: policies singular: policy subresources: status: {} validation: openAPIV3Schema: properties: spec: required: - failurePolicy - rules properties: failurePolicy: type: string enum: - continueOnError - stopOnError rules: type: array items: type: object required: - resource properties: resource: type: object required: - kind properties: kind: type: string enum: - ConfigMap - CronJob - DaemonSet - Deployment - Endpoints - HorizontalPodAutoscaler - Ingress - Job - LimitRange - Namespace - NetworkPolicy - PersistentVolumeClaim - PodDisruptionBudget - PodTemplate - ResourceQuota - Secret - Service - StatefulSet name: type: string selector: properties: matchLabels: type: object additionalProperties: type: string matchExpressions: type: array items: type: object required: - key - operator properties: key: type: string operator: type: string values: type: array items: type: string patches: type: array items: type: object required: - path - op properties: path: type: string op: type: string enum: - add - replace - remove value: AnyValue: {} configMapGenerator: type: object required: - name properties: name: type: string copyFrom: type: object required: - namespace - name properties: namespace: type: string name: type: string data: type: object additionalProperties: type: string secretGenerator: type: object required: - name properties: name: type: string copyFrom: type: object required: - namespace - name properties: namespace: type: string name: type: string data: type: object additionalProperties: type: string