forked from kubernetes-sigs/kubespray
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/kubernetes-sigs/kubespray
* 'master' of https://github.com/kubernetes-sigs/kubespray: Add protectKernelDefaults option (default true) to kubelet config file (kubernetes-sigs#6611) Rotate kubelet server certificate. (kubernetes-sigs#6453) Add snapshot-controller for CSI drivers and snapshot CRDs, add a default volumesnapshotclass when running cinder CSI (kubernetes-sigs#6537) Calico: update crds to v1 and cr (kubernetes-sigs#6360) Fix E306 in roles/network_plugin (kubernetes-sigs#6516)
- Loading branch information
Showing
29 changed files
with
1,156 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
--- | ||
- name: CSI CRD | Generate Manifests | ||
template: | ||
src: "{{ item.file }}.j2" | ||
dest: "{{ kube_config_dir }}/{{ item.file }}" | ||
with_items: | ||
- {name: volumesnapshotclasses, file: volumesnapshotclasses.yml} | ||
- {name: volumesnapshotcontents, file: volumesnapshotcontents.yml} | ||
- {name: volumesnapshots, file: volumesnapshots.yml} | ||
register: csi_crd_manifests | ||
when: inventory_hostname == groups['kube-master'][0] | ||
tags: csi-driver | ||
|
||
- name: CSI CRD | Apply Manifests | ||
kube: | ||
kubectl: "{{ bin_dir }}/kubectl" | ||
filename: "{{ kube_config_dir }}/{{ item.item.file }}" | ||
state: "latest" | ||
wait: true | ||
with_items: | ||
- "{{ csi_crd_manifests.results }}" | ||
when: | ||
- inventory_hostname == groups['kube-master'][0] | ||
- not item is skipped | ||
loop_control: | ||
label: "{{ item.item.file }}" | ||
tags: csi-driver |
84 changes: 84 additions & 0 deletions
84
roles/kubernetes-apps/csi_driver/csi_crd/templates/volumesnapshotclasses.yml.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
--- | ||
apiVersion: apiextensions.k8s.io/v1beta1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
annotations: | ||
controller-gen.kubebuilder.io/version: v0.2.5 | ||
api-approved.kubernetes.io: "https://github.com/kubernetes-csi/external-snapshotter/pull/260" | ||
creationTimestamp: null | ||
name: volumesnapshotclasses.snapshot.storage.k8s.io | ||
spec: | ||
additionalPrinterColumns: | ||
- JSONPath: .driver | ||
name: Driver | ||
type: string | ||
- JSONPath: .deletionPolicy | ||
description: Determines whether a VolumeSnapshotContent created through the VolumeSnapshotClass | ||
should be deleted when its bound VolumeSnapshot is deleted. | ||
name: DeletionPolicy | ||
type: string | ||
- JSONPath: .metadata.creationTimestamp | ||
name: Age | ||
type: date | ||
group: snapshot.storage.k8s.io | ||
names: | ||
kind: VolumeSnapshotClass | ||
listKind: VolumeSnapshotClassList | ||
plural: volumesnapshotclasses | ||
singular: volumesnapshotclass | ||
preserveUnknownFields: false | ||
scope: Cluster | ||
subresources: {} | ||
validation: | ||
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 | ||
properties: | ||
apiVersion: | ||
description: 'APIVersion defines the versioned schema of this representation | ||
of an object. Servers should convert recognized schemas to the latest | ||
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' | ||
type: string | ||
deletionPolicy: | ||
description: deletionPolicy determines whether a VolumeSnapshotContent created | ||
through the VolumeSnapshotClass should be deleted when its bound VolumeSnapshot | ||
is deleted. Supported values are "Retain" and "Delete". "Retain" means | ||
that the VolumeSnapshotContent and its physical snapshot on underlying | ||
storage system are kept. "Delete" means that the VolumeSnapshotContent | ||
and its physical snapshot on underlying storage system are deleted. Required. | ||
enum: | ||
- Delete | ||
- Retain | ||
type: string | ||
driver: | ||
description: driver is the name of the storage driver that handles this | ||
VolumeSnapshotClass. Required. | ||
type: string | ||
kind: | ||
description: 'Kind is a string value representing the REST resource this | ||
object represents. Servers may infer this from the endpoint the client | ||
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' | ||
type: string | ||
parameters: | ||
additionalProperties: | ||
type: string | ||
description: parameters is a key-value map with storage driver specific | ||
parameters for creating snapshots. These values are opaque to Kubernetes. | ||
type: object | ||
required: | ||
- deletionPolicy | ||
- driver | ||
type: object | ||
version: v1beta1 | ||
versions: | ||
- name: v1beta1 | ||
served: true | ||
storage: true | ||
status: | ||
acceptedNames: | ||
kind: "" | ||
plural: "" | ||
conditions: [] | ||
storedVersions: [] |
Oops, something went wrong.