Skip to content

Commit

Permalink
Bump k8s api 1.22 (#913)
Browse files Browse the repository at this point in the history
* Bump k8s api 1.22

- bump to latest controller-tools, controller-runtime
- latest k8s api 1.22 removes spec.topologyKeys from services
spec which removes this key from our CRD service override
- controller-gen now does not support CRD v1beta1 and crd options
such as trivialVersions and preserveUnknownFields are not necessary
anymore
  • Loading branch information
ChunyiLyu authored Dec 8, 2021
1 parent 35f8fbb commit d1ff901
Show file tree
Hide file tree
Showing 7 changed files with 312 additions and 136 deletions.
4 changes: 1 addition & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,8 @@ unit-tests: install-tools $(KUBEBUILDER_ASSETS) generate fmt vet manifests ## Ru
integration-tests: install-tools $(KUBEBUILDER_ASSETS) generate fmt vet manifests ## Run integration tests
ginkgo -r controllers/

CRD_OPTIONS ?= "crd:trivialVersions=true, preserveUnknownFields=false"

manifests: install-tools ## Generate manifests e.g. CRD, RBAC etc.
controller-gen $(CRD_OPTIONS) rbac:roleName=operator-role paths="./api/...;./controllers/..." output:crd:artifacts:config=config/crd/bases
controller-gen crd rbac:roleName=operator-role paths="./api/...;./controllers/..." output:crd:artifacts:config=config/crd/bases
./hack/remove-override-descriptions.sh
./hack/add-notice-to-yaml.sh config/rbac/role.yaml
./hack/add-notice-to-yaml.sh config/crd/bases/rabbitmq.com_rabbitmqclusters.yaml
Expand Down
48 changes: 39 additions & 9 deletions config/crd/bases/rabbitmq.com_rabbitmqclusters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.6.2
controller-gen.kubebuilder.io/version: v0.7.0
creationTimestamp: null
name: rabbitmqclusters.rabbitmq.com
spec:
Expand Down Expand Up @@ -216,7 +216,7 @@ spec:
type: object
type: object
namespaceSelector:
description: A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces. This field is alpha-level and is only honored when PodAffinityNamespaceSelector feature is enabled.
description: A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces. This field is beta-level and is only honored when PodAffinityNamespaceSelector feature is enabled.
properties:
matchExpressions:
description: matchExpressions is a list of label selector requirements. The requirements are ANDed.
Expand Down Expand Up @@ -301,7 +301,7 @@ spec:
type: object
type: object
namespaceSelector:
description: A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces. This field is alpha-level and is only honored when PodAffinityNamespaceSelector feature is enabled.
description: A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces. This field is beta-level and is only honored when PodAffinityNamespaceSelector feature is enabled.
properties:
matchExpressions:
description: matchExpressions is a list of label selector requirements. The requirements are ANDed.
Expand Down Expand Up @@ -385,7 +385,7 @@ spec:
type: object
type: object
namespaceSelector:
description: A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces. This field is alpha-level and is only honored when PodAffinityNamespaceSelector feature is enabled.
description: A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces. This field is beta-level and is only honored when PodAffinityNamespaceSelector feature is enabled.
properties:
matchExpressions:
description: matchExpressions is a list of label selector requirements. The requirements are ANDed.
Expand Down Expand Up @@ -470,7 +470,7 @@ spec:
type: object
type: object
namespaceSelector:
description: A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces. This field is alpha-level and is only honored when PodAffinityNamespaceSelector feature is enabled.
description: A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces. This field is beta-level and is only honored when PodAffinityNamespaceSelector feature is enabled.
properties:
matchExpressions:
description: matchExpressions is a list of label selector requirements. The requirements are ANDed.
Expand Down Expand Up @@ -615,6 +615,7 @@ spec:
additionalProperties:
type: string
type: object
x-kubernetes-map-type: atomic
sessionAffinity:
type: string
sessionAffinityConfig:
Expand All @@ -626,10 +627,6 @@ spec:
type: integer
type: object
type: object
topologyKeys:
items:
type: string
type: array
type:
type: string
type: object
Expand Down Expand Up @@ -1492,6 +1489,8 @@ spec:
type: string
gmsaCredentialSpecName:
type: string
hostProcess:
type: boolean
runAsUserName:
type: string
type: object
Expand Down Expand Up @@ -2067,6 +2066,8 @@ spec:
type: string
gmsaCredentialSpecName:
type: string
hostProcess:
type: boolean
runAsUserName:
type: string
type: object
Expand Down Expand Up @@ -2650,6 +2651,8 @@ spec:
type: string
gmsaCredentialSpecName:
type: string
hostProcess:
type: boolean
runAsUserName:
type: string
type: object
Expand Down Expand Up @@ -2776,6 +2779,7 @@ spec:
additionalProperties:
type: string
type: object
x-kubernetes-map-type: atomic
overhead:
additionalProperties:
anyOf:
Expand Down Expand Up @@ -2864,6 +2868,8 @@ spec:
type: string
gmsaCredentialSpecName:
type: string
hostProcess:
type: boolean
runAsUserName:
type: string
type: object
Expand Down Expand Up @@ -3147,6 +3153,18 @@ spec:
- kind
- name
type: object
dataSourceRef:
properties:
apiGroup:
type: string
kind:
type: string
name:
type: string
required:
- kind
- name
type: object
resources:
properties:
limits:
Expand Down Expand Up @@ -3663,6 +3681,18 @@ spec:
- kind
- name
type: object
dataSourceRef:
properties:
apiGroup:
type: string
kind:
type: string
name:
type: string
required:
- kind
- name
type: object
resources:
properties:
limits:
Expand Down
2 changes: 1 addition & 1 deletion docs/api/autogen/config.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
render:
kubernetesVersion: "1.20"
kubernetesVersion: "1.22"

Loading

0 comments on commit d1ff901

Please sign in to comment.