forked from openshift/release
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add: vsphere csi encryption set chain (openshift#37476)
- Loading branch information
Showing
7 changed files
with
110 additions
and
0 deletions.
There are no files selected for viewing
8 changes: 8 additions & 0 deletions
8
...tep-registry/storage/conf/storageclass/add-default-vsphere-encryption-storageclass/OWNERS
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,8 @@ | ||
approvers: | ||
- storage-approvers | ||
- duanwei33 | ||
- Phaow | ||
reviewers: | ||
- storage-reviewers | ||
- duanwei33 | ||
- Phaow |
15 changes: 15 additions & 0 deletions
15
...storage-conf-storageclass-add-default-vsphere-encryption-storageclass-chain.metadata.json
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,15 @@ | ||
{ | ||
"path": "storage/conf/storageclass/add-default-vsphere-encryption-storageclass/storage-conf-storageclass-add-default-vsphere-encryption-storageclass-chain.yaml", | ||
"owners": { | ||
"approvers": [ | ||
"storage-approvers", | ||
"duanwei33", | ||
"Phaow" | ||
], | ||
"reviewers": [ | ||
"storage-reviewers", | ||
"duanwei33", | ||
"Phaow" | ||
] | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
...ageclass/storage-conf-storageclass-add-default-vsphere-encryption-storageclass-chain.yaml
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,11 @@ | ||
chain: | ||
as: storage-conf-storageclass-add-default-vsphere-encryption-storageclass | ||
steps: | ||
- ref: storage-conf-storageclass-add-vsphere-encryption-storageclass | ||
- ref: storage-conf-storageclass-set-default-storageclass | ||
env: | ||
- name: REQUIRED_DEFAULT_STORAGECLASS | ||
default: "thin-csi-encryption" | ||
documentation: |- | ||
The storage-conf-storageclass-add-default-vsphere-encryption-storageclass step adds an encryption csi storageclass to an encryption vSphere cluster and set it to default. | ||
The step only available for vsphere OCP clusters install with encryption nodes of 4.13 above versions. |
8 changes: 8 additions & 0 deletions
8
...erator/step-registry/storage/conf/storageclass/add-vsphere-encryption-storageclass/OWNERS
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,8 @@ | ||
approvers: | ||
- storage-approvers | ||
- duanwei33 | ||
- Phaow | ||
reviewers: | ||
- storage-reviewers | ||
- duanwei33 | ||
- Phaow |
30 changes: 30 additions & 0 deletions
30
...on-storageclass/storage-conf-storageclass-add-vsphere-encryption-storageclass-commands.sh
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,30 @@ | ||
#!/bin/bash | ||
set -o errexit | ||
set -o nounset | ||
set -o pipefail | ||
|
||
if test -s "${SHARED_DIR}/proxy-conf.sh" ; then | ||
echo "setting the proxy" | ||
echo "source ${SHARED_DIR}/proxy-conf.sh" | ||
source "${SHARED_DIR}/proxy-conf.sh" | ||
else | ||
echo "no proxy setting." | ||
fi | ||
|
||
DATA_STORE_URL=$(oc -n openshift-cluster-csi-drivers get cm/vsphere-csi-config -o jsonpath='{.data.cloud\.conf}'|grep -Eo 'ds:///.*/$') | ||
echo "Default datastore is: \"${DATA_STORE_URL}\"" | ||
|
||
oc apply -f - <<EOF | ||
apiVersion: storage.k8s.io/v1 | ||
kind: StorageClass | ||
metadata: | ||
name: ${REQUIRED_ENCRYPTION_STORAGECLASS_NAME} | ||
parameters: | ||
# Using the vsphere preset encrypt storage policy | ||
storagepolicyname: ${REQUIRED_ENCRYPTION_POLICY} | ||
datastoreurl: ${DATA_STORE_URL} | ||
provisioner: csi.vsphere.vmware.com | ||
reclaimPolicy: Delete | ||
volumeBindingMode: WaitForFirstConsumer | ||
allowVolumeExpansion: true | ||
EOF |
15 changes: 15 additions & 0 deletions
15
...rageclass/storage-conf-storageclass-add-vsphere-encryption-storageclass-ref.metadata.json
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,15 @@ | ||
{ | ||
"path": "storage/conf/storageclass/add-vsphere-encryption-storageclass/storage-conf-storageclass-add-vsphere-encryption-storageclass-ref.yaml", | ||
"owners": { | ||
"approvers": [ | ||
"storage-approvers", | ||
"duanwei33", | ||
"Phaow" | ||
], | ||
"reviewers": [ | ||
"storage-reviewers", | ||
"duanwei33", | ||
"Phaow" | ||
] | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
...ption-storageclass/storage-conf-storageclass-add-vsphere-encryption-storageclass-ref.yaml
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,23 @@ | ||
ref: | ||
as: storage-conf-storageclass-add-vsphere-encryption-storageclass | ||
from: cli | ||
# inject oc binary | ||
cli: latest | ||
commands: storage-conf-storageclass-add-vsphere-encryption-storageclass-commands.sh | ||
resources: | ||
requests: | ||
cpu: 10m | ||
memory: 100Mi | ||
env: | ||
- name: REQUIRED_ENCRYPTION_POLICY | ||
# Using the vsphere preset encrypt storage policy by default | ||
default: "Management Storage policy - Encryption" | ||
documentation: |- | ||
Name of the vsphere encrypt storage policy set in storageclass parameter. | ||
- name: REQUIRED_ENCRYPTION_STORAGECLASS_NAME | ||
default: "thin-csi-encryption" | ||
documentation: |- | ||
Name of the storage class to created with encryption settings. | ||
documentation: |- | ||
The storage-conf-storageclass-add-vsphere-encryption-storageclass step adds an encryption csi storageclass to an encryption vSphere cluster. | ||
The step only available for vsphere OCP clusters install with encryption nodes of 4.13 above versions. |