diff --git a/content/docs/deployment/csminstallationwizard/src/csm-versions/default-values.properties b/content/docs/deployment/csminstallationwizard/src/csm-versions/default-values.properties index 1bf44e11eb..1f4bf4ac7b 100644 --- a/content/docs/deployment/csminstallationwizard/src/csm-versions/default-values.properties +++ b/content/docs/deployment/csminstallationwizard/src/csm-versions/default-values.properties @@ -1,4 +1,4 @@ -csmVersion=1.7.0 +csmVersion=1.8.0 imageRepository=dellemc controllerCount=1 nodeSelectorLabel=node-role.kubernetes.io/control-plane: @@ -6,3 +6,5 @@ taint=node-role.kubernetes.io/control-plane volNamePrefix=csivol snapNamePrefix=csi-snap certSecretCount=1 +pollRate=60 +driverPodLabel=dell-storage \ No newline at end of file diff --git a/content/docs/deployment/csminstallationwizard/src/index.html b/content/docs/deployment/csminstallationwizard/src/index.html index f8fc9b52b1..53780f0b2e 100644 --- a/content/docs/deployment/csminstallationwizard/src/index.html +++ b/content/docs/deployment/csminstallationwizard/src/index.html @@ -43,10 +43,10 @@
- - +
@@ -68,7 +68,7 @@
-
+
@@ -85,7 +85,8 @@
@@ -128,6 +129,63 @@
+
+
+ + +
+
+
+ +
+
+ +
+ +
+
+ +
+
+ +
+ +
+
+
+ + +
+
+
+ +
+
+ +
+ +
+
+
+ + +
+
+
+
+
Select the features for installation
@@ -180,7 +238,7 @@
-
+
@@ -214,7 +272,7 @@
- +
@@ -436,7 +494,7 @@
@@ -474,7 +532,7 @@
-
+
diff --git a/content/docs/deployment/csminstallationwizard/src/static/js/commands.js b/content/docs/deployment/csminstallationwizard/src/static/js/commands.js index 51694c7ba7..5b1d914548 100644 --- a/content/docs/deployment/csminstallationwizard/src/static/js/commands.js +++ b/content/docs/deployment/csminstallationwizard/src/static/js/commands.js @@ -16,10 +16,10 @@ * */ var commandTitle = 'Run the following commands to install'; -var commandNote = 'Ensure that the namespaces and secrets are created before installing the helm chart'; +var commandNote = 'Ensure that the namespaces and secrets are created before installing the driver'; var command1 = 'helm repo add dell https://dell.github.io/helm-charts'; var command2 = 'helm install $release-name dell/container-storage-modules -n $namespace --version $version -f values.yaml'; - +var command3 = 'kubectl create -f values.yaml'; var nodeSelectorNote = 'For the pod to be eligible to run on a node, the node must have the indicated key-value pair as label'; const snapshotNote = 'If Snapshot is enabled, ensure the Snapshot CRDs are installed'; diff --git a/content/docs/deployment/csminstallationwizard/src/static/js/constants.js b/content/docs/deployment/csminstallationwizard/src/static/js/constants.js index eb9021b818..3a59b1020a 100644 --- a/content/docs/deployment/csminstallationwizard/src/static/js/constants.js +++ b/content/docs/deployment/csminstallationwizard/src/static/js/constants.js @@ -26,11 +26,11 @@ const CONSTANTS = { POWERMAX_NAMESPACE: "powermax", POWERSCALE_NAMESPACE: "isilon", UNITY_NAMESPACE: "unity", + POWERSTORE_LABEL_VALUE: "csi-powerstore", VALUES: "values", TEMP_DIR: "templates", TEMP_EXT: ".template", HYPHEN: "-", - NODE_SELECTOR_TAB: '\n'.padEnd(7, " "), SLASH: "/", VERSIONS_DIR: "csm-versions", CSM: "csm", @@ -39,9 +39,15 @@ const CONSTANTS = { HELM: "helm", OPERATOR: "operator", CSM_HELM_V170: "1.0.0", - TAINTS: ` + CSM_HELM_V180: "1.1.0", + HELM_TAINTS: ` - key: "$KEY" operator: "Exists" effect: "NoSchedule" + `, + OPERATOR_TAINTS: ` + - key: "$KEY" + operator: "Exists" + effect: "NoSchedule" ` }; diff --git a/content/docs/deployment/csminstallationwizard/src/static/js/generate-yaml.js b/content/docs/deployment/csminstallationwizard/src/static/js/generate-yaml.js index 0500b7eb6f..1f047cb092 100644 --- a/content/docs/deployment/csminstallationwizard/src/static/js/generate-yaml.js +++ b/content/docs/deployment/csminstallationwizard/src/static/js/generate-yaml.js @@ -47,21 +47,35 @@ function setValues(csmMapValues, CONSTANTS_PARAM) { DriverValues.volNamePrefix = document.getElementById("vol-name-prefix").value; DriverValues.snapNamePrefix = document.getElementById("snapshot-prefix").value; DriverValues.fsGroupPolicy = document.getElementById("fsGroup-Policy").value; + DriverValues.driverNamespace = document.getElementById("driver-namespace").value; + DriverValues.labelValue = document.getElementById("label-value").value; + DriverValues.pollRate = document.getElementById("poll-rate").value; + DriverValues.driverPodLabel = document.getElementById("driver-pod-label").value; + DriverValues.connectionValidation = $("#connection-validation").prop('checked') ? true : false; + DriverValues.volumelessPods = $("#volumeless-pods").prop('checked') ? true : false; DriverValues.controllerPodsNodeSelector = $("#controller-pods-node-selector").prop('checked') ? true : ""; DriverValues.nodePodsNodeSelector = $("#node-pods-node-selector").prop('checked') ? true : ""; DriverValues.nodeSelectorLabel = document.getElementById("node-selector-label").value || '""'; var taint = document.getElementById("taint").value || '""'; var labels = DriverValues.nodeSelectorLabel.split(":"); - var nodeSelector = CONSTANTS_PARAM.NODE_SELECTOR_TAB + labels[0] + ': "' + labels[1] + '"'; + var nodeSelector + var taints + if (document.getElementById("installation-type").value === CONSTANTS_PARAM.OPERATOR) { + nodeSelector = '\n'.padEnd(8, " ") + labels[0] + ': "' + labels[1] + '"'; + taints = CONSTANTS_PARAM.OPERATOR_TAINTS.replace("$KEY", taint).trimEnd(); + } else { + nodeSelector = '\n'.padEnd(7, " ") + labels[0] + ': "' + labels[1] + '"'; + taints = CONSTANTS_PARAM.HELM_TAINTS.replace("$KEY", taint).trimEnd(); + } DriverValues.controllerTolerations = ""; DriverValues.nodeTolerations= ""; if ($("#controller-pods-node-selector").prop('checked') === true) { DriverValues.controllerPodsNodeSelector = nodeSelector; - DriverValues.controllerTolerations = CONSTANTS_PARAM.TAINTS.replace("$KEY", taint).trimEnd(); + DriverValues.controllerTolerations = taints; } if ($("#node-pods-node-selector").prop('checked') === true) { DriverValues.nodePodsNodeSelector = nodeSelector; - DriverValues.nodeTolerations = CONSTANTS_PARAM.TAINTS.replace("$KEY", taint).trimEnd(); + DriverValues.nodeTolerations = taints; } DriverValues.snapshot = $("#snapshot").prop('checked') ? true : false; DriverValues.vgsnapshot = $("#vgsnapshot").prop('checked') ? true : false; @@ -73,6 +87,7 @@ function setValues(csmMapValues, CONSTANTS_PARAM) { DriverValues.observabilityMetrics = $("#observability-metrics").prop('checked') ? true : false; DriverValues.authorization = $("#authorization").prop('checked') ? true : false; DriverValues.resiliency = $("#resiliency").prop('checked') ? true : false; + DriverValues.operatorResiliency = $("#operator-resiliency").prop('checked') ? true : false; DriverValues.storageCapacity = $("#storage-capacity").prop('checked') ? true : false; DriverValues.authorizationSkipCertValidation = $("#authorization-skip-cert-validation").prop('checked') ? true : false; DriverValues.authorizationProxyHost = document.getElementById("authorization-proxy-host").value || '""'; @@ -101,6 +116,7 @@ function createYamlString(yamlTpl, yamlTplValues, driverParam, CONSTANTS_PARAM) yamlTpl = yamlTpl.replaceAll("$VOLUME_NAME_PREFIX", yamlTplValues.volNamePrefix); yamlTpl = yamlTpl.replaceAll("$SNAP_NAME_PREFIX", yamlTplValues.snapNamePrefix); yamlTpl = yamlTpl.replaceAll("$FSGROUP_POLICY", yamlTplValues.fsGroupPolicy); + yamlTpl = yamlTpl.replaceAll("$NAMESPACE", yamlTplValues.driverNamespace); yamlTpl = yamlTpl.replaceAll("$CONTROLLER_POD_NODE_SELECTOR", yamlTplValues.controllerPodsNodeSelector); yamlTpl = yamlTpl.replaceAll("$NODE_POD_NODE_SELECTOR", yamlTplValues.nodePodsNodeSelector); yamlTpl = yamlTpl.replaceAll("$HEALTH_MONITOR_ENABLED", yamlTplValues.healthMonitor); @@ -114,6 +130,12 @@ function createYamlString(yamlTpl, yamlTplValues, driverParam, CONSTANTS_PARAM) yamlTpl = yamlTpl.replaceAll("$AUTHORIZATION_SKIP_CERTIFICATE_VALIDATION", yamlTplValues.authorizationSkipCertValidation); yamlTpl = yamlTpl.replaceAll("$OBSERVABILITY_ENABLED", yamlTplValues.observability); yamlTpl = yamlTpl.replaceAll("$RESILIENCY_ENABLED", yamlTplValues.resiliency); + yamlTpl = yamlTpl.replaceAll("$OPERATOR_RESILIENCY_ENABLED", yamlTplValues.operatorResiliency); + yamlTpl = yamlTpl.replaceAll("$LABEL_VALUE", yamlTplValues.labelValue); + yamlTpl = yamlTpl.replaceAll("$POLL_RATE", yamlTplValues.pollRate); + yamlTpl = yamlTpl.replaceAll("$DRIVER_POD_LABEL_VALUE", yamlTplValues.driverPodLabel); + yamlTpl = yamlTpl.replaceAll("$SKIP_ARRAY_CONNECTION_VALIDATION", yamlTplValues.connectionValidation); + yamlTpl = yamlTpl.replaceAll("$IGNORE_VOLUMELESS_PODS", yamlTplValues.volumelessPods); yamlTpl = yamlTpl.replaceAll("$STORAGE_CAPACITY_ENABLED", yamlTplValues.storageCapacity); yamlTpl = yamlTpl.replaceAll("$MONITOR_ENABLED", yamlTplValues.monitor); yamlTpl = yamlTpl.replaceAll("$CERT_SECRET_COUNT", yamlTplValues.certSecretCount); diff --git a/content/docs/deployment/csminstallationwizard/src/static/js/tests/generate-yaml.test.js b/content/docs/deployment/csminstallationwizard/src/static/js/tests/generate-yaml.test.js index bf99f2e376..dba45cfce4 100644 --- a/content/docs/deployment/csminstallationwizard/src/static/js/tests/generate-yaml.test.js +++ b/content/docs/deployment/csminstallationwizard/src/static/js/tests/generate-yaml.test.js @@ -35,7 +35,6 @@ const CONSTANTS = { TEMP_DIR: "templates", TEMP_EXT: ".template", HYPHEN: "-", - NODE_SELECTOR_TAB: '\n'.padEnd(7, " "), SLASH: "/", VERSIONS_DIR: "csm-versions", CSM: "csm", @@ -44,10 +43,16 @@ const CONSTANTS = { HELM: "helm", OPERATOR: "operator", CSM_HELM_V170: "1.0.0", - TAINTS: ` + CSM_HELM_V180: "1.1.0", + HELM_TAINTS: ` - key: "$KEY" operator: "Exists" effect: "NoSchedule" + `, + OPERATOR_TAINTS: ` + - key: "$KEY" + operator: "Exists" + effect: "NoSchedule" `, COMMENTED_TAINTS: ` #- key: "node-role.kubernetes.io/control-plane" @@ -57,64 +62,188 @@ const CONSTANTS = { }; const testCSMMap = new Map([ - ["csmVersion", "1.6.0"], + ["csmVersion", "1.7.0"], ["imageRepository", "dellemc"], ["controllerCount", "1"], ["volNamePrefix", "csivol"], ["snapNamePrefix", "csi-snap"], ["nodeSelectorLabel", "node-role.kubernetes.io/control-plane:"], - ["driverVersion", "v2.6.0"], + ["driverVersion", "v2.7.0"], ]); describe("GIVEN setValues function", () => { - test("SHOULD return expected DriverValues", () => { + test("SHOULD return expected DriverValues for Helm", () => { document.body.innerHTML = ` + - - + + + + + + + `; const expected = { - csmVersion: "1.6.0", - driverVersion: "v2.6.0", - imageRepository: "dellemc", - certSecretCount: "0", - controllerCount: "1", - volNamePrefix: "csivol", - snapNamePrefix: "csi-snap", + csmVersion: '1.7.0', + driverVersion: 'v2.7.0', + imageRepository: 'dellemc', + monitor: false, + certSecretCount: '1', + controllerCount: '1', + volNamePrefix: 'csivol', + snapNamePrefix: 'csi-snap', + fsGroupPolicy: 'ReadWriteOnceWithFSType', + driverNamespace: '', controllerPodsNodeSelector: '\n node-role.kubernetes.io/control-plane: ""', nodePodsNodeSelector: '\n node-role.kubernetes.io/control-plane: ""', - nodeSelectorLabel: "node-role.kubernetes.io/control-plane:", - snapshot: true, + nodeSelectorLabel: 'node-role.kubernetes.io/control-plane:', + controllerTolerations: '\n' + + ' - key: "node-role.kubernetes.io/control-plane"\n' + + ' operator: "Exists"\n' + + ' effect: "NoSchedule"', + nodeTolerations: '\n' + + ' - key: "node-role.kubernetes.io/control-plane"\n' + + ' operator: "Exists"\n' + + ' effect: "NoSchedule"', + snapshot: false, vgsnapshot: false, - resizer: true, + resizer: false, healthMonitor: false, replication: false, + migration: false, observability: false, observabilityMetrics: false, authorization: false, - authorizationSkipCertValidation: true, + resiliency: false, + storageCapacity: false, + authorizationSkipCertValidation: false, + authorizationProxyHost: '""', certManagerEnabled: false, - taint: "node-role.kubernetes.io/control-plane" + storageArrayId: undefined, + storageArrayEndpointUrl: '""', + storageArrayBackupEndpointUrl: '""', + operatorResiliency: false, + labelValue: "", + pollRate: '60', + driverPodLabel: 'dell-storage', + connectionValidation: false, + volumelessPods: false, + clusterPrefix: undefined, + portGroups: undefined, + vSphereEnabled: false, + vSphereFCPortGroup: undefined, + vSphereFCHostName: undefined, + vSphereVCenterHost: undefined, + vSphereVCenterCredSecret: undefined }; const received = setValues(testCSMMap, CONSTANTS); + expect(expected).toEqual(received); + }); - expect(received).toEqual(received); + test("SHOULD return expected DriverValues for Operator", () => { + document.body.innerHTML = ` + + + + + + + + + + + + + + + + + + + + `; + + const expected = { + csmVersion: '1.7.0', + driverVersion: 'v2.7.0', + imageRepository: 'dellemc', + monitor: false, + certSecretCount: '1', + controllerCount: '1', + volNamePrefix: 'csivol', + snapNamePrefix: 'csi-snap', + fsGroupPolicy: 'ReadWriteOnceWithFSType', + driverNamespace: '', + controllerPodsNodeSelector: '\n node-role.kubernetes.io/control-plane: ""', + nodePodsNodeSelector: '\n node-role.kubernetes.io/control-plane: ""', + nodeSelectorLabel: 'node-role.kubernetes.io/control-plane:', + controllerTolerations: '\n' + + ' - key: "node-role.kubernetes.io/control-plane"\n' + + ' operator: "Exists"\n' + + ' effect: "NoSchedule"', + nodeTolerations: '\n' + + ' - key: "node-role.kubernetes.io/control-plane"\n' + + ' operator: "Exists"\n' + + ' effect: "NoSchedule"', + snapshot: false, + vgsnapshot: false, + resizer: false, + healthMonitor: false, + replication: false, + migration: false, + observability: false, + observabilityMetrics: false, + authorization: false, + resiliency: false, + storageCapacity: false, + authorizationSkipCertValidation: false, + authorizationProxyHost: '""', + certManagerEnabled: false, + storageArrayId: undefined, + storageArrayEndpointUrl: '""', + storageArrayBackupEndpointUrl: '""', + operatorResiliency: false, + labelValue: "", + pollRate: '60', + driverPodLabel: 'dell-storage', + connectionValidation: false, + volumelessPods: false, + clusterPrefix: undefined, + portGroups: undefined, + vSphereEnabled: false, + vSphereFCPortGroup: undefined, + vSphereFCHostName: undefined, + vSphereVCenterHost: undefined, + vSphereVCenterCredSecret: undefined + }; + + const received = setValues(testCSMMap, CONSTANTS); + expect(expected).toEqual(received); }); test("SHOULD return expected DriverValues for csm version 1.6.0", () => { @@ -122,6 +251,9 @@ describe("GIVEN setValues function", () => { + @@ -136,6 +268,11 @@ describe("GIVEN setValues function", () => { + + + + + `; const expected = { @@ -163,7 +300,6 @@ describe("GIVEN setValues function", () => { }; const received = setValues(testCSMMap, CONSTANTS); - expect(received).toEqual(received); }); }); diff --git a/content/docs/deployment/csminstallationwizard/src/static/js/tests/ui-functions.test.js b/content/docs/deployment/csminstallationwizard/src/static/js/tests/ui-functions.test.js index 3b20ab6dd1..03f900d78c 100644 --- a/content/docs/deployment/csminstallationwizard/src/static/js/tests/ui-functions.test.js +++ b/content/docs/deployment/csminstallationwizard/src/static/js/tests/ui-functions.test.js @@ -19,12 +19,18 @@ const { onAuthorizationChange, onObservabilityChange, onResiliencyChange, + onOperatorResiliencyChange, onSnapshotChange, onVSphereChange, onNodeSelectorChange, onCopyButtonClickHandler, resetImageRepository, resetControllerCount, + resetVolNamePrefix, + resetSnapNamePrefix, + resetDriverPodLabel, + resetArrayPollRate, + resetLabelValue, resetNodeSelectorLabel, resetDriverNamespace, resetTaint, @@ -45,11 +51,11 @@ const CONSTANTS = { POWERMAX_NAMESPACE: "powermax", POWERSCALE_NAMESPACE: "isilon", UNITY_NAMESPACE: "unity", + POWERSTORE_LABEL_VALUE: "csi-powerstore", VALUES: "values", TEMP_DIR: "templates", TEMP_EXT: ".template", HYPHEN: "-", - NODE_SELECTOR_TAB: '\n'.padEnd(7, " "), SLASH: "/", VERSIONS_DIR: "csm-versions", CSM: "csm", @@ -57,7 +63,8 @@ const CONSTANTS = { PROPERTIES: ".properties", HELM: "helm", OPERATOR: "operator", - CSM_HELM_V170: "1.0.0" + CSM_HELM_V170: "1.0.0", + CSM_HELM_V180: "1.1.0" }; describe("GIVEN onAuthorizationChange function", () => { @@ -132,6 +139,30 @@ describe("GIVEN onResiliencyChange function", () => { }); }); +describe("GIVEN onOperatorResiliencyChange function", () => { + test("SHOULD hide podmon components when option not checked", () => { + document.body.innerHTML = ` + +
+ `; + + onOperatorResiliencyChange(); + + expect($("div#podmon-wrapper").css("display")).toEqual("none"); + }); + + test("SHOULD show podmon components when option checked", () => { + document.body.innerHTML = ` + +