Update CRDs from apiextensions.k8s.io/v1beta1 to v1

In Kubernetes 1.16 CRDs got out of beta and added to regular
apiextensions.k8s.io/v1. This was accompanied with some format changes.
This patch updates our CRD definitions to new version.

Change-Id: Ib5e64fe72581ef601e5df2e317900566cd476470
This commit is contained in:
Michał Dulko 2020-01-23 11:21:58 +01:00
parent bf50385f62
commit c10468cd74
4 changed files with 330 additions and 299 deletions

View File

@ -1,10 +1,9 @@
apiVersion: apiextensions.k8s.io/v1beta1 apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition kind: CustomResourceDefinition
metadata: metadata:
name: kuryrloadbalancers.openstack.org name: kuryrloadbalancers.openstack.org
spec: spec:
group: openstack.org group: openstack.org
version: v1
scope: Namespaced scope: Namespaced
names: names:
plural: kuryrloadbalancers plural: kuryrloadbalancers
@ -12,132 +11,106 @@ spec:
kind: KuryrLoadBalancer kind: KuryrLoadBalancer
shortNames: shortNames:
- klb - klb
additionalPrinterColumns: versions:
- name: PROJECT-ID - name: v1
type: string served: true
description: The ID of the PROJECT associated to the loadbalancer storage: true
JSONPath: .spec.project_id additionalPrinterColumns:
- name: Age - name: PROJECT-ID
type: date type: string
JSONPath: .metadata.creationTimestamp description: The ID of the PROJECT associated to the loadbalancer
validation: jsonPath: .spec.project_id
openAPIV3Schema: - name: Age
properties: type: date
spec: jsonPath: .metadata.creationTimestamp
type: object schema:
required: openAPIV3Schema:
- ip type: object
- ports properties:
- project_id spec:
- security_groups_ids type: object
- subnet_id required:
- type - ip
properties: - ports
ip: - project_id
type: string - security_groups_ids
lb_ip: - subnet_id
type: string - type
ports: properties:
type: array ip:
items:
type: object
required:
- name
- port
- protocol
- targetPort
properties:
name:
type: string
port:
type: integer
protocol:
type: string
targetPort:
type: string
project_id:
type: string
security_groups_ids:
type: array
items:
type: string type: string
subnet_id: lb_ip:
type: string type: string
type: ports:
type: string type: array
status: items:
type: object type: object
required: required:
- listeners - name
- loadbalancer - port
- members - protocol
- pools - targetPort
properties: properties:
listeners: name:
type: array type: string
items: port:
type: object type: integer
required: protocol:
- id type: string
- loadbalancer_id targetPort:
- name type: string
- port project_id:
- project_id type: string
- protocol security_groups_ids:
properties: type: array
id: items:
type: string
loadbalancer_id:
type: string
name:
type: string
port:
type: integer
project_id:
type: string
protocol:
type: string
loadbalancer:
type: object
required:
- id
- ip
- name
- port_id
- project_id
- provider
- security_groups
- subnet_id
properties:
id:
type: string type: string
ip: subnet_id:
type: string type: string
name: type:
type: string type: string
port_id: status:
type: string type: object
project_id: required:
type: string - listeners
provider: - loadbalancer
type: string - members
security_groups: - pools
type: array properties:
items: listeners:
type: string type: array
subnet_id: items:
type: string type: object
members: required:
type: array - id
items: - loadbalancer_id
- name
- port
- project_id
- protocol
properties:
id:
type: string
loadbalancer_id:
type: string
name:
type: string
port:
type: integer
project_id:
type: string
protocol:
type: string
loadbalancer:
type: object type: object
required: required:
- id - id
- ip - ip
- name - name
- pool_id - port_id
- port
- project_id - project_id
- provider
- security_groups
- subnet_id - subnet_id
properties: properties:
id: id:
@ -146,48 +119,79 @@ spec:
type: string type: string
name: name:
type: string type: string
pool_id: port_id:
type: string type: string
port:
type: integer
project_id: project_id:
type: string type: string
provider:
type: string
security_groups:
type: array
items:
type: string
subnet_id: subnet_id:
type: string type: string
pools: members:
type: array type: array
items: items:
type: object
required:
- id
- ip
- name
- pool_id
- port
- project_id
- subnet_id
properties:
id:
type: string
ip:
type: string
name:
type: string
pool_id:
type: string
port:
type: integer
project_id:
type: string
subnet_id:
type: string
pools:
type: array
items:
type: object
required:
- id
- listener_id
- loadbalancer_id
- name
- project_id
- protocol
properties:
id:
type: string
listener_id:
type: string
loadbalancer_id:
type: string
name:
type: string
project_id:
type: string
protocol:
type: string
service_pub_ip_info:
type: object type: object
required: required:
- id - ip_id
- listener_id - ip_addr
- loadbalancer_id - alloc_method
- name
- project_id
- protocol
properties: properties:
id: ip_id:
type: string type: string
listener_id: ip_addr:
type: string type: string
loadbalancer_id: alloc_method:
type: string type: string
name:
type: string
project_id:
type: string
protocol:
type: string
service_pub_ip_info:
type: object
required:
- ip_id
- ip_addr
- alloc_method
properties:
ip_id:
type: string
ip_addr:
type: string
alloc_method:
type: string

View File

@ -1,40 +1,47 @@
apiVersion: apiextensions.k8s.io/v1beta1 apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition kind: CustomResourceDefinition
metadata: metadata:
name: kuryrnets.openstack.org name: kuryrnets.openstack.org
spec: spec:
group: openstack.org group: openstack.org
version: v1
scope: Cluster scope: Cluster
names: names:
plural: kuryrnets plural: kuryrnets
singular: kuryrnet singular: kuryrnet
kind: KuryrNet kind: KuryrNet
additionalPrinterColumns: versions:
- name: SUBNET-CIDR - name: v1
type: string served: true
description: The subnet CIDR allocated to the namespace storage: true
JSONPath: .spec.subnetCIDR additionalPrinterColumns:
- name: Age - name: SUBNET-CIDR
type: date type: string
JSONPath: .metadata.creationTimestamp description: The subnet CIDR allocated to the namespace
validation: jsonPath: .spec.subnetCIDR
openAPIV3Schema: - name: Age
properties: type: date
spec: jsonPath: .metadata.creationTimestamp
required: schema:
- netId openAPIV3Schema:
- routerId type: object
- subnetCIDR properties:
- subnetId spec:
properties: type: object
netId: required:
type: string - netId
populated: - routerId
type: boolean - subnetCIDR
routerId: - subnetId
type: string properties:
subnetCIDR: netId:
type: string type: string
subnetId: populated:
type: string type: boolean
routerId:
type: string
sgId:
type: string
subnetCIDR:
type: string
subnetId:
type: string

View File

@ -1,118 +1,133 @@
apiVersion: apiextensions.k8s.io/v1beta1 apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition kind: CustomResourceDefinition
metadata: metadata:
name: kuryrnetpolicies.openstack.org name: kuryrnetpolicies.openstack.org
spec: spec:
group: openstack.org group: openstack.org
version: v1
scope: Namespaced scope: Namespaced
names: names:
plural: kuryrnetpolicies plural: kuryrnetpolicies
singular: kuryrnetpolicy singular: kuryrnetpolicy
kind: KuryrNetPolicy kind: KuryrNetPolicy
shortNames: shortNames:
- knp - knp
additionalPrinterColumns: versions:
- name: SG-ID - name: v1
type: string served: true
description: The ID of the SG associated to the policy storage: true
JSONPath: .spec.securityGroupId additionalPrinterColumns:
- name: Age - name: SG-ID
type: date type: string
JSONPath: .metadata.creationTimestamp description: The ID of the SG associated to the policy
validation: jsonPath: .spec.securityGroupId
openAPIV3Schema: - name: Age
properties: type: date
spec: jsonPath: .metadata.creationTimestamp
required: schema:
- egressSgRules openAPIV3Schema:
- ingressSgRules type: object
- networkpolicy_spec properties:
- podSelector spec:
- securityGroupId type: object
properties: required:
egressSgRules: - egressSgRules
type: array - ingressSgRules
items: - networkpolicy_spec
type: object - podSelector
required: - securityGroupId
- security_group_rule properties:
properties: egressSgRules:
remote_ip_prefixes: type: array
type: object items:
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:
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:
type: object type: object
policyTypes: required:
type: array - security_group_rule
ingress: properties:
type: array remote_ip_prefixes:
egress: type: object
type: array namespace:
podSelector: type: string
type: object security_group_rule:
securityGroupId: type: object
type: string required:
securityGroupName: - id
type: string 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:
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

View File

@ -1,10 +1,9 @@
apiVersion: apiextensions.k8s.io/v1beta1 apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition kind: CustomResourceDefinition
metadata: metadata:
name: network-attachment-definitions.k8s.cni.cncf.io name: network-attachment-definitions.k8s.cni.cncf.io
spec: spec:
group: k8s.cni.cncf.io group: k8s.cni.cncf.io
version: v1
scope: Namespaced scope: Namespaced
names: names:
plural: network-attachment-definitions plural: network-attachment-definitions
@ -12,10 +11,16 @@ spec:
kind: NetworkAttachmentDefinition kind: NetworkAttachmentDefinition
shortNames: shortNames:
- net-attach-def - net-attach-def
validation: versions:
openAPIV3Schema: - name: v1
properties: served: true
spec: storage: true
properties: schema:
config: openAPIV3Schema:
type: string type: object
properties:
spec:
type: object
properties:
config:
type: string