kuryr-kubernetes/kubernetes_crds/kuryr_crds/kuryrnetpolicy.yaml
Michał Dulko fe1627e271 Preserve unknown in remote_ip_prefixes in NP CRD
The remote_ip_prefixes field in KuryrNetPolicy CRD is an object. As it's
not defined with correct schema, it needs
x-kubernetes-preserve-unknown-fields property. This commit fixes that.

I'm not defining the field correctly as we're moving to new CRD anyway.

Change-Id: I71a7bd16ca8e6b7d9acb7398360b58694ede073f
2020-03-18 11:58:14 +01:00

136 lines
4.3 KiB
YAML

apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: kuryrnetpolicies.openstack.org
spec:
group: openstack.org
scope: Namespaced
names:
plural: kuryrnetpolicies
singular: kuryrnetpolicy
kind: KuryrNetPolicy
shortNames:
- knp
versions:
- name: v1
served: true
storage: true
additionalPrinterColumns:
- name: SG-ID
type: string
description: The ID of the SG associated to the policy
jsonPath: .spec.securityGroupId
- name: Age
type: date
jsonPath: .metadata.creationTimestamp
schema:
openAPIV3Schema:
type: object
properties:
spec:
type: object
required:
- egressSgRules
- ingressSgRules
- networkpolicy_spec
- podSelector
- securityGroupId
properties:
egressSgRules:
type: array
items:
type: object
required:
- security_group_rule
properties:
remote_ip_prefixes:
type: object
x-kubernetes-preserve-unknown-fields: true
namespace:
type: string
security_group_rule:
type: object
required:
- id
properties:
description:
type: string
direction:
type: string
ethertype:
type: string
id:
type: string
port_range_max:
type: integer
port_range_min:
type: integer
protocol:
type: string
remote_ip_prefix:
type: string
security_group_id:
type: string
ingressSgRules:
type: array
items:
type: object
required:
- security_group_rule
properties:
remote_ip_prefixes:
x-kubernetes-preserve-unknown-fields: true
type: object
namespace:
type: string
security_group_rule:
type: object
required:
- id
properties:
description:
type: string
direction:
type: string
ethertype:
type: string
id:
type: string
port_range_max:
type: integer
port_range_min:
type: integer
protocol:
type: string
remote_ip_prefix:
type: string
security_group_id:
type: string
networkpolicy_spec:
type: object
properties:
podSelector:
x-kubernetes-preserve-unknown-fields: true
type: object
policyTypes:
type: array
items:
type: string
ingress:
type: array
items:
x-kubernetes-preserve-unknown-fields: true
type: object
egress:
type: array
items:
x-kubernetes-preserve-unknown-fields: true
type: object
podSelector:
x-kubernetes-preserve-unknown-fields: true
type: object
securityGroupId:
type: string
securityGroupName:
type: string