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
metadata:
name: kuryrloadbalancers.openstack.org
spec:
group: openstack.org
version: v1
scope: Namespaced
names:
plural: kuryrloadbalancers
@ -12,132 +11,106 @@ spec:
kind: KuryrLoadBalancer
shortNames:
- klb
additionalPrinterColumns:
- name: PROJECT-ID
type: string
description: The ID of the PROJECT associated to the loadbalancer
JSONPath: .spec.project_id
- name: Age
type: date
JSONPath: .metadata.creationTimestamp
validation:
openAPIV3Schema:
properties:
spec:
type: object
required:
- ip
- ports
- project_id
- security_groups_ids
- subnet_id
- type
properties:
ip:
type: string
lb_ip:
type: string
ports:
type: array
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:
versions:
- name: v1
served: true
storage: true
additionalPrinterColumns:
- name: PROJECT-ID
type: string
description: The ID of the PROJECT associated to the loadbalancer
jsonPath: .spec.project_id
- name: Age
type: date
jsonPath: .metadata.creationTimestamp
schema:
openAPIV3Schema:
type: object
properties:
spec:
type: object
required:
- ip
- ports
- project_id
- security_groups_ids
- subnet_id
- type
properties:
ip:
type: string
subnet_id:
type: string
type:
type: string
status:
type: object
required:
- listeners
- loadbalancer
- members
- pools
properties:
listeners:
type: array
items:
type: object
required:
- id
- 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
required:
- id
- ip
- name
- port_id
- project_id
- provider
- security_groups
- subnet_id
properties:
id:
lb_ip:
type: string
ports:
type: array
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
ip:
type: string
name:
type: string
port_id:
type: string
project_id:
type: string
provider:
type: string
security_groups:
type: array
items:
type: string
subnet_id:
type: string
members:
type: array
items:
subnet_id:
type: string
type:
type: string
status:
type: object
required:
- listeners
- loadbalancer
- members
- pools
properties:
listeners:
type: array
items:
type: object
required:
- id
- 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
required:
- id
- ip
- name
- pool_id
- port
- port_id
- project_id
- provider
- security_groups
- subnet_id
properties:
id:
@ -146,48 +119,79 @@ spec:
type: string
name:
type: string
pool_id:
port_id:
type: string
port:
type: integer
project_id:
type: string
provider:
type: string
security_groups:
type: array
items:
type: string
subnet_id:
type: string
pools:
type: array
items:
members:
type: array
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
required:
- id
- listener_id
- loadbalancer_id
- name
- project_id
- protocol
- ip_id
- ip_addr
- alloc_method
properties:
id:
ip_id:
type: string
listener_id:
ip_addr:
type: string
loadbalancer_id:
alloc_method:
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
metadata:
name: kuryrnets.openstack.org
spec:
group: openstack.org
version: v1
scope: Cluster
names:
plural: kuryrnets
singular: kuryrnet
kind: KuryrNet
additionalPrinterColumns:
- name: SUBNET-CIDR
type: string
description: The subnet CIDR allocated to the namespace
JSONPath: .spec.subnetCIDR
- name: Age
type: date
JSONPath: .metadata.creationTimestamp
validation:
openAPIV3Schema:
properties:
spec:
required:
- netId
- routerId
- subnetCIDR
- subnetId
properties:
netId:
type: string
populated:
type: boolean
routerId:
type: string
subnetCIDR:
type: string
subnetId:
type: string
versions:
- name: v1
served: true
storage: true
additionalPrinterColumns:
- name: SUBNET-CIDR
type: string
description: The subnet CIDR allocated to the namespace
jsonPath: .spec.subnetCIDR
- name: Age
type: date
jsonPath: .metadata.creationTimestamp
schema:
openAPIV3Schema:
type: object
properties:
spec:
type: object
required:
- netId
- routerId
- subnetCIDR
- subnetId
properties:
netId:
type: string
populated:
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
metadata:
name: kuryrnetpolicies.openstack.org
spec:
group: openstack.org
version: v1
scope: Namespaced
names:
plural: kuryrnetpolicies
singular: kuryrnetpolicy
kind: KuryrNetPolicy
shortNames:
- knp
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
validation:
openAPIV3Schema:
properties:
spec:
required:
- egressSgRules
- ingressSgRules
- networkpolicy_spec
- podSelector
- securityGroupId
properties:
egressSgRules:
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
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:
- 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
policyTypes:
type: array
ingress:
type: array
egress:
type: array
podSelector:
type: object
securityGroupId:
type: string
securityGroupName:
type: string
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
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
metadata:
name: network-attachment-definitions.k8s.cni.cncf.io
spec:
group: k8s.cni.cncf.io
version: v1
scope: Namespaced
names:
plural: network-attachment-definitions
@ -12,10 +11,16 @@ spec:
kind: NetworkAttachmentDefinition
shortNames:
- net-attach-def
validation:
openAPIV3Schema:
properties:
spec:
properties:
config:
type: string
versions:
- name: v1
served: true
storage: true
schema:
openAPIV3Schema:
type: object
properties:
spec:
type: object
properties:
config:
type: string