Remove k8s hooks for versions prior to 1.20 (#7998)
parent
598f178054
commit
c8d7f000c9
|
@ -49,11 +49,7 @@ spec:
|
||||||
- weight: 100
|
- weight: 100
|
||||||
preference:
|
preference:
|
||||||
matchExpressions:
|
matchExpressions:
|
||||||
{% if kube_version is version('v1.20.0', '<') %}
|
|
||||||
- key: node-role.kubernetes.io/master
|
|
||||||
{% else %}
|
|
||||||
- key: node-role.kubernetes.io/control-plane
|
- key: node-role.kubernetes.io/control-plane
|
||||||
{% endif %}
|
|
||||||
operator: In
|
operator: In
|
||||||
values:
|
values:
|
||||||
- ""
|
- ""
|
||||||
|
|
|
@ -57,11 +57,7 @@ spec:
|
||||||
- weight: 100
|
- weight: 100
|
||||||
preference:
|
preference:
|
||||||
matchExpressions:
|
matchExpressions:
|
||||||
{% if kube_version is version('v1.20.0', '<') %}
|
|
||||||
- key: node-role.kubernetes.io/master
|
|
||||||
{% else %}
|
|
||||||
- key: node-role.kubernetes.io/control-plane
|
- key: node-role.kubernetes.io/control-plane
|
||||||
{% endif %}
|
|
||||||
operator: In
|
operator: In
|
||||||
values:
|
values:
|
||||||
- ""
|
- ""
|
||||||
|
|
|
@ -36,11 +36,7 @@ spec:
|
||||||
hostNetwork: true
|
hostNetwork: true
|
||||||
dnsPolicy: ClusterFirstWithHostNet
|
dnsPolicy: ClusterFirstWithHostNet
|
||||||
nodeSelector:
|
nodeSelector:
|
||||||
{% if kube_version is version('v1.20.0', '<') %}
|
|
||||||
node-role.kubernetes.io/master: ""
|
|
||||||
{% else %}
|
|
||||||
node-role.kubernetes.io/control-plane: ""
|
node-role.kubernetes.io/control-plane: ""
|
||||||
{% endif %}
|
|
||||||
tolerations:
|
tolerations:
|
||||||
- key: node.cloudprovider.kubernetes.io/uninitialized
|
- key: node.cloudprovider.kubernetes.io/uninitialized
|
||||||
value: "true"
|
value: "true"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
---
|
---
|
||||||
kind: RuntimeClass
|
kind: RuntimeClass
|
||||||
apiVersion: node.k8s.io/v1{{ 'beta1' if kube_version is version('v1.20.0', '<') else '' }}
|
apiVersion: node.k8s.io/v1
|
||||||
metadata:
|
metadata:
|
||||||
name: crun
|
name: crun
|
||||||
handler: crun
|
handler: crun
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
---
|
---
|
||||||
kind: RuntimeClass
|
kind: RuntimeClass
|
||||||
apiVersion: node.k8s.io/v1{{ 'beta1' if kube_version is version('v1.20.0', '<') else '' }}
|
apiVersion: node.k8s.io/v1
|
||||||
metadata:
|
metadata:
|
||||||
name: gvisor
|
name: gvisor
|
||||||
handler: runsc
|
handler: runsc
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
---
|
---
|
||||||
kind: RuntimeClass
|
kind: RuntimeClass
|
||||||
apiVersion: node.k8s.io/v1{{ 'beta1' if kube_version is version('v1.20.0', '<') else '' }}
|
apiVersion: node.k8s.io/v1
|
||||||
metadata:
|
metadata:
|
||||||
name: kata-qemu
|
name: kata-qemu
|
||||||
handler: kata-qemu
|
handler: kata-qemu
|
||||||
|
|
|
@ -58,11 +58,7 @@ spec:
|
||||||
- driver
|
- driver
|
||||||
type: object
|
type: object
|
||||||
served: true
|
served: true
|
||||||
{% if kube_version is version('v1.20.0', '<') %}
|
|
||||||
storage: false
|
|
||||||
{% else %}
|
|
||||||
storage: true
|
storage: true
|
||||||
{% endif %}
|
|
||||||
subresources: {}
|
subresources: {}
|
||||||
- additionalPrinterColumns:
|
- additionalPrinterColumns:
|
||||||
- jsonPath: .driver
|
- jsonPath: .driver
|
||||||
|
@ -76,13 +72,11 @@ spec:
|
||||||
name: Age
|
name: Age
|
||||||
type: date
|
type: date
|
||||||
name: v1beta1
|
name: v1beta1
|
||||||
{% if kube_version is version('v1.20.0', '>=') %}
|
|
||||||
# This indicates the v1beta1 version of the custom resource is deprecated.
|
# This indicates the v1beta1 version of the custom resource is deprecated.
|
||||||
# API requests to this version receive a warning in the server response.
|
# API requests to this version receive a warning in the server response.
|
||||||
deprecated: true
|
deprecated: true
|
||||||
# This overrides the default warning returned to clients making v1beta1 API requests.
|
# This overrides the default warning returned to clients making v1beta1 API requests.
|
||||||
deprecationWarning: "snapshot.storage.k8s.io/v1beta1 VolumeSnapshotClass is deprecated; use snapshot.storage.k8s.io/v1 VolumeSnapshotClass"
|
deprecationWarning: "snapshot.storage.k8s.io/v1beta1 VolumeSnapshotClass is deprecated; use snapshot.storage.k8s.io/v1 VolumeSnapshotClass"
|
||||||
{% endif %}
|
|
||||||
schema:
|
schema:
|
||||||
openAPIV3Schema:
|
openAPIV3Schema:
|
||||||
description: VolumeSnapshotClass specifies parameters that a underlying storage system uses when creating a volume snapshot. A specific VolumeSnapshotClass is used by specifying its name in a VolumeSnapshot object. VolumeSnapshotClasses are non-namespaced
|
description: VolumeSnapshotClass specifies parameters that a underlying storage system uses when creating a volume snapshot. A specific VolumeSnapshotClass is used by specifying its name in a VolumeSnapshot object. VolumeSnapshotClasses are non-namespaced
|
||||||
|
@ -112,11 +106,7 @@ spec:
|
||||||
- driver
|
- driver
|
||||||
type: object
|
type: object
|
||||||
served: true
|
served: true
|
||||||
{% if kube_version is version('v1.20.0', '<') %}
|
|
||||||
storage: true
|
|
||||||
{% else %}
|
|
||||||
storage: false
|
storage: false
|
||||||
{% endif %}
|
|
||||||
subresources: {}
|
subresources: {}
|
||||||
status:
|
status:
|
||||||
acceptedNames:
|
acceptedNames:
|
||||||
|
|
|
@ -42,12 +42,10 @@ spec:
|
||||||
jsonPath: .spec.volumeSnapshotRef.name
|
jsonPath: .spec.volumeSnapshotRef.name
|
||||||
name: VolumeSnapshot
|
name: VolumeSnapshot
|
||||||
type: string
|
type: string
|
||||||
{% if kube_version is version('v1.20.0', '>=') %}
|
|
||||||
- description: Namespace of the VolumeSnapshot object to which this VolumeSnapshotContent object is bound.
|
- description: Namespace of the VolumeSnapshot object to which this VolumeSnapshotContent object is bound.
|
||||||
jsonPath: .spec.volumeSnapshotRef.namespace
|
jsonPath: .spec.volumeSnapshotRef.namespace
|
||||||
name: VolumeSnapshotNamespace
|
name: VolumeSnapshotNamespace
|
||||||
type: string
|
type: string
|
||||||
{% endif %}
|
|
||||||
- jsonPath: .metadata.creationTimestamp
|
- jsonPath: .metadata.creationTimestamp
|
||||||
name: Age
|
name: Age
|
||||||
type: date
|
type: date
|
||||||
|
@ -155,11 +153,7 @@ spec:
|
||||||
- spec
|
- spec
|
||||||
type: object
|
type: object
|
||||||
served: true
|
served: true
|
||||||
{% if kube_version is version('v1.20.0', '<') %}
|
|
||||||
storage: false
|
|
||||||
{% else %}
|
|
||||||
storage: true
|
storage: true
|
||||||
{% endif %}
|
|
||||||
subresources:
|
subresources:
|
||||||
status: {}
|
status: {}
|
||||||
- additionalPrinterColumns:
|
- additionalPrinterColumns:
|
||||||
|
@ -187,12 +181,10 @@ spec:
|
||||||
jsonPath: .spec.volumeSnapshotRef.name
|
jsonPath: .spec.volumeSnapshotRef.name
|
||||||
name: VolumeSnapshot
|
name: VolumeSnapshot
|
||||||
type: string
|
type: string
|
||||||
{% if kube_version is version('v1.20.0', '>=') %}
|
|
||||||
- description: Namespace of the VolumeSnapshot object to which this VolumeSnapshotContent object is bound.
|
- description: Namespace of the VolumeSnapshot object to which this VolumeSnapshotContent object is bound.
|
||||||
jsonPath: .spec.volumeSnapshotRef.namespace
|
jsonPath: .spec.volumeSnapshotRef.namespace
|
||||||
name: VolumeSnapshotNamespace
|
name: VolumeSnapshotNamespace
|
||||||
type: string
|
type: string
|
||||||
{% endif %}
|
|
||||||
- jsonPath: .metadata.creationTimestamp
|
- jsonPath: .metadata.creationTimestamp
|
||||||
name: Age
|
name: Age
|
||||||
type: date
|
type: date
|
||||||
|
@ -302,11 +294,7 @@ spec:
|
||||||
- spec
|
- spec
|
||||||
type: object
|
type: object
|
||||||
served: true
|
served: true
|
||||||
{% if kube_version is version('v1.20.0', '<') %}
|
|
||||||
storage: true
|
|
||||||
{% else %}
|
|
||||||
storage: false
|
storage: false
|
||||||
{% endif %}
|
|
||||||
subresources:
|
subresources:
|
||||||
status: {}
|
status: {}
|
||||||
status:
|
status:
|
||||||
|
|
|
@ -116,11 +116,7 @@ spec:
|
||||||
- spec
|
- spec
|
||||||
type: object
|
type: object
|
||||||
served: true
|
served: true
|
||||||
{% if kube_version is version('v1.20.0','<') %}
|
|
||||||
storage: false
|
|
||||||
{% else %}
|
|
||||||
storage: true
|
storage: true
|
||||||
{% endif %}
|
|
||||||
subresources:
|
subresources:
|
||||||
status: {}
|
status: {}
|
||||||
- additionalPrinterColumns:
|
- additionalPrinterColumns:
|
||||||
|
@ -156,13 +152,11 @@ spec:
|
||||||
name: Age
|
name: Age
|
||||||
type: date
|
type: date
|
||||||
name: v1beta1
|
name: v1beta1
|
||||||
{% if kube_version is version('v1.20.0','>=') %}
|
|
||||||
# This indicates the v1beta1 version of the custom resource is deprecated.
|
# This indicates the v1beta1 version of the custom resource is deprecated.
|
||||||
# API requests to this version receive a warning in the server response.
|
# API requests to this version receive a warning in the server response.
|
||||||
deprecated: true
|
deprecated: true
|
||||||
# This overrides the default warning returned to clients making v1beta1 API requests.
|
# This overrides the default warning returned to clients making v1beta1 API requests.
|
||||||
deprecationWarning: "snapshot.storage.k8s.io/v1beta1 VolumeSnapshot is deprecated; use snapshot.storage.k8s.io/v1 VolumeSnapshot"
|
deprecationWarning: "snapshot.storage.k8s.io/v1beta1 VolumeSnapshot is deprecated; use snapshot.storage.k8s.io/v1 VolumeSnapshot"
|
||||||
{% endif %}
|
|
||||||
schema:
|
schema:
|
||||||
openAPIV3Schema:
|
openAPIV3Schema:
|
||||||
description: VolumeSnapshot is a user's request for either creating a point-in-time snapshot of a persistent volume, or binding to a pre-existing snapshot.
|
description: VolumeSnapshot is a user's request for either creating a point-in-time snapshot of a persistent volume, or binding to a pre-existing snapshot.
|
||||||
|
@ -226,11 +220,7 @@ spec:
|
||||||
- spec
|
- spec
|
||||||
type: object
|
type: object
|
||||||
served: true
|
served: true
|
||||||
{% if kube_version is version('v1.20.0','<') %}
|
|
||||||
storage: true
|
|
||||||
{% else %}
|
|
||||||
storage: false
|
storage: false
|
||||||
{% endif %}
|
|
||||||
subresources:
|
subresources:
|
||||||
status: {}
|
status: {}
|
||||||
status:
|
status:
|
||||||
|
|
|
@ -16,11 +16,7 @@ spec:
|
||||||
spec:
|
spec:
|
||||||
serviceAccountName: vsphere-csi-controller
|
serviceAccountName: vsphere-csi-controller
|
||||||
nodeSelector:
|
nodeSelector:
|
||||||
{% if kube_version is version('v1.20.0', '<') %}
|
|
||||||
node-role.kubernetes.io/master: ""
|
|
||||||
{% else %}
|
|
||||||
node-role.kubernetes.io/control-plane: ""
|
node-role.kubernetes.io/control-plane: ""
|
||||||
{% endif %}
|
|
||||||
tolerations:
|
tolerations:
|
||||||
- operator: "Exists"
|
- operator: "Exists"
|
||||||
key: node-role.kubernetes.io/master
|
key: node-role.kubernetes.io/master
|
||||||
|
|
|
@ -19,11 +19,7 @@ spec:
|
||||||
spec:
|
spec:
|
||||||
serviceAccountName: vsphere-csi-controller
|
serviceAccountName: vsphere-csi-controller
|
||||||
nodeSelector:
|
nodeSelector:
|
||||||
{% if kube_version is version('v1.20.0', '<') %}
|
|
||||||
node-role.kubernetes.io/master: ""
|
|
||||||
{% else %}
|
|
||||||
node-role.kubernetes.io/control-plane: ""
|
node-role.kubernetes.io/control-plane: ""
|
||||||
{% endif %}
|
|
||||||
tolerations:
|
tolerations:
|
||||||
- operator: "Exists"
|
- operator: "Exists"
|
||||||
key: node-role.kubernetes.io/master
|
key: node-role.kubernetes.io/master
|
||||||
|
|
|
@ -24,11 +24,7 @@ spec:
|
||||||
k8s-app: openstack-cloud-controller-manager
|
k8s-app: openstack-cloud-controller-manager
|
||||||
spec:
|
spec:
|
||||||
nodeSelector:
|
nodeSelector:
|
||||||
{% if kube_version is version('v1.20.0', '<') %}
|
|
||||||
node-role.kubernetes.io/master: ""
|
|
||||||
{% else %}
|
|
||||||
node-role.kubernetes.io/control-plane: ""
|
node-role.kubernetes.io/control-plane: ""
|
||||||
{% endif %}
|
|
||||||
securityContext:
|
securityContext:
|
||||||
runAsUser: 999
|
runAsUser: 999
|
||||||
tolerations:
|
tolerations:
|
||||||
|
|
|
@ -24,11 +24,7 @@ spec:
|
||||||
k8s-app: vsphere-cloud-controller-manager
|
k8s-app: vsphere-cloud-controller-manager
|
||||||
spec:
|
spec:
|
||||||
nodeSelector:
|
nodeSelector:
|
||||||
{% if kube_version is version('v1.20.0', '<') %}
|
|
||||||
node-role.kubernetes.io/master: ""
|
|
||||||
{% else %}
|
|
||||||
node-role.kubernetes.io/control-plane: ""
|
node-role.kubernetes.io/control-plane: ""
|
||||||
{% endif %}
|
|
||||||
securityContext:
|
securityContext:
|
||||||
runAsUser: 0
|
runAsUser: 0
|
||||||
tolerations:
|
tolerations:
|
||||||
|
|
|
@ -138,11 +138,7 @@ spec:
|
||||||
- weight: 100
|
- weight: 100
|
||||||
preference:
|
preference:
|
||||||
matchExpressions:
|
matchExpressions:
|
||||||
{% if kube_version is version('v1.20.0', '<') %}
|
|
||||||
- key: node-role.kubernetes.io/master
|
|
||||||
{% else %}
|
|
||||||
- key: node-role.kubernetes.io/control-plane
|
- key: node-role.kubernetes.io/control-plane
|
||||||
{% endif %}
|
|
||||||
operator: In
|
operator: In
|
||||||
values:
|
values:
|
||||||
- ""
|
- ""
|
||||||
|
|
Loading…
Reference in New Issue