From 1eabd471d63ebb1c08a8cf6e5e9e4f0c964609ee Mon Sep 17 00:00:00 2001 From: dinathom <40366744+dinathom@users.noreply.github.com> Date: Thu, 14 Mar 2019 16:36:37 -0700 Subject: [PATCH] Add flashblade.snapshotDirectoryEnabled to enable/disable snapshots on FlashBlade (#67) Also referring to https://docs.openshift.com/container-platform/3.11/install_config/persistent_storage/persistent_storage_flex_volume.html flexvolume driver directory corrected for Atomic host in all comments. --- pure-k8s-plugin/README.md | 7 ++++--- pure-k8s-plugin/templates/pure-provisioner.yaml | 2 ++ pure-k8s-plugin/values.yaml | 5 ++++- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/pure-k8s-plugin/README.md b/pure-k8s-plugin/README.md index ab2c8c2..e08823f 100644 --- a/pure-k8s-plugin/README.md +++ b/pure-k8s-plugin/README.md @@ -40,6 +40,7 @@ The following table lists the configurable parameters and their default values. | `flasharray.defaultFSOpt` | Block volume default mkfs options. *Not recommended to change!* | `-q` | | `flasharray.defaultMountOpt` | Block volume default filesystem mount options. *Not recommended to change!* | "" | | `flasharray.preemptAttachments` | Enable/Disable attachment preemption! | `true` | +| `flashblade.snapshotDirectoryEnabled` | Enable/Disable FlashBlade snapshots | `false` | | `namespace.pure` | Namespace for the backend storage | `k8s` | | `orchestrator.name` | Orchestrator type, such as openshift, k8s | `k8s` | | `flexPath` | Full path of directory to install flex plugin, works with image.tag >= 2.0.1 | `/usr/libexec/kubernetes/kubelet-plugins/volume/exec` | @@ -150,8 +151,8 @@ This upgrade will not impact the in-use volumes/filesystems from data path persp /usr/libexec/kubernetes/kubelet-plugins/volume/exec/pure~flex # for openshift 3.10+ on RHEL Atomic - root@k8s-test-openshift-0:~# find /etc/origin/node/kubelet-plugins/ -name "flex" | xargs dirname - /etc/origin/node/kubelet-plugins/volume/exec/pure~flex + root@k8s-test-openshift-0:~# find /etc/origin/kubelet-plugins/ -name "flex" | xargs dirname + /etc/origin/kubelet-plugins/volume/exec/pure~flex ``` ## Platform and Software Dependencies @@ -250,7 +251,7 @@ running the kubelet service. The kubelet configuration is then set via the `node-config.yaml` in the `kubeletArguments` section to set the `volume-plugin-dir`. The easiest -path to use is something like `/etc/origin/node/kubelet-plugins` or similar +path to use is something like `/etc/origin/kubelet-plugins` or similar as the node config path is passed through to the container. # License diff --git a/pure-k8s-plugin/templates/pure-provisioner.yaml b/pure-k8s-plugin/templates/pure-provisioner.yaml index f71a84f..5c5e99e 100644 --- a/pure-k8s-plugin/templates/pure-provisioner.yaml +++ b/pure-k8s-plugin/templates/pure-provisioner.yaml @@ -38,6 +38,8 @@ spec: value: {{ .Values.namespace.pure }} - name: PURE_DEFAULT_BLOCK_FS_TYPE value: {{ .Values.flasharray.defaultFSType }} + - name: PURE_DEFAULT_ENABLE_FB_NFS_SNAPSHOT + value: {{ .Values.flashblade.snapshotDirectoryEnabled }} volumes: - name: config configMap: diff --git a/pure-k8s-plugin/values.yaml b/pure-k8s-plugin/values.yaml index 0b833f0..42426f5 100644 --- a/pure-k8s-plugin/values.yaml +++ b/pure-k8s-plugin/values.yaml @@ -31,6 +31,9 @@ flasharray: defaultMountOpt: "" preemptAttachments: "true" +flashblade: + snapshotDirectoryEnabled: "false" + # there are two namespaces for this app # 1. namespace.pure is the backend storage namespace where volumes/shares/etc # will be created. @@ -53,7 +56,7 @@ orchestrator: flexPath: /usr/libexec/kubernetes/kubelet-plugins/volume/exec # Default for Openshift 3.10+ on RHEL Atomic (containerized kubelet/origin-node) -#flexPath: /etc/origin/node/kubelet-plugins/volume/exec +#flexPath: /etc/origin/kubelet-plugins/volume/exec # Default for Openshift 3.9 and lower with RHEL Atomic #flexPath : /usr/libexec/kubernetes/kubelet-plugins/volume/exec