From 4140702c310f7f1828680108c81bd5ea3759fe5a Mon Sep 17 00:00:00 2001 From: Rajitha Date: Wed, 12 Jul 2023 12:20:26 +0530 Subject: [PATCH 01/10] Adding operator support for powerstore in wizard --- .../csminstallationwizard/src/index.html | 11 +- .../src/static/js/commands.js | 4 +- .../src/static/js/constants.js | 8 +- .../src/static/js/generate-yaml.js | 18 +- .../src/static/js/tests/generate-yaml.test.js | 176 +++++-- .../src/static/js/tests/ui-functions.test.js | 124 ++++- .../src/static/js/ui-functions.js | 49 +- .../templates/helm/csm-1.8.0-values.template | 444 ++++++++++++++++++ .../operator/csm-isilon-1.7.0.template | 413 ++++++++++++++++ .../operator/csm-powerstore-1.7.0.template | 194 ++++++++ 10 files changed, 1382 insertions(+), 59 deletions(-) create mode 100644 content/docs/deployment/csminstallationwizard/src/templates/helm/csm-1.8.0-values.template create mode 100644 content/docs/deployment/csminstallationwizard/src/templates/operator/csm-isilon-1.7.0.template create mode 100644 content/docs/deployment/csminstallationwizard/src/templates/operator/csm-powerstore-1.7.0.template diff --git a/content/docs/deployment/csminstallationwizard/src/index.html b/content/docs/deployment/csminstallationwizard/src/index.html index f8fc9b52b1..3be2073246 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 @@
-
+
@@ -86,6 +86,7 @@
@@ -180,7 +181,7 @@
-
+
@@ -474,7 +475,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..c69f95f97c 100644 --- a/content/docs/deployment/csminstallationwizard/src/static/js/constants.js +++ b/content/docs/deployment/csminstallationwizard/src/static/js/constants.js @@ -30,7 +30,6 @@ const CONSTANTS = { TEMP_DIR: "templates", TEMP_EXT: ".template", HYPHEN: "-", - NODE_SELECTOR_TAB: '\n'.padEnd(7, " "), SLASH: "/", VERSIONS_DIR: "csm-versions", CSM: "csm", @@ -39,9 +38,14 @@ const CONSTANTS = { HELM: "helm", OPERATOR: "operator", CSM_HELM_V170: "1.0.0", - TAINTS: ` + 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..4986464632 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,31 @@ 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.installationType = document.getElementById("installation-type").value; 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 (DriverValues.installationType == 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; @@ -101,6 +111,8 @@ 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("$INSTALLATIONTYPE", yamlTplValues.installationType); 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); 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..b8bfee9861 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,11 +43,16 @@ const CONSTANTS = { HELM: "helm", OPERATOR: "operator", CSM_HELM_V170: "1.0.0", - TAINTS: ` + 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" # operator: "Exists" @@ -57,27 +61,30 @@ 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 = ` + - - + + @@ -89,39 +96,143 @@ describe("GIVEN setValues function", () => { `; const expected = { - csmVersion: "1.6.0", - driverVersion: "v2.6.0", - imageRepository: "dellemc", - certSecretCount: "0", - controllerCount: "1", - volNamePrefix: "csivol", - snapNamePrefix: "csi-snap", - 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, - vgsnapshot: false, - resizer: true, - healthMonitor: false, - replication: false, - observability: false, - observabilityMetrics: false, - authorization: false, - authorizationSkipCertValidation: true, - certManagerEnabled: false, - taint: "node-role.kubernetes.io/control-plane" + csmVersion: '1.7.0', + driverVersion: 'v2.7.0', + imageRepository: 'dellemc', + monitor: false, + certSecretCount: '1', + controllerCount: '1', + volNamePrefix: 'csivol', + snapNamePrefix: 'csi-snap', + fsGroupPolicy: 'ReadWriteOnceWithFSType', + driverNamespace: '', + installationType: 'helm', + 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: '""', + clusterPrefix: undefined, + portGroups: undefined, + vSphereEnabled: false, + vSphereFCPortGroup: undefined, + vSphereFCHostName: undefined, + vSphereVCenterHost: undefined, + vSphereVCenterCredSecret: undefined }; const received = setValues(testCSMMap, CONSTANTS); - - expect(received).toEqual(received); + expect(expected).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: '', + installationType: 'operator', + 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: '""', + 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", () => { document.body.innerHTML = ` + @@ -139,6 +250,7 @@ describe("GIVEN setValues function", () => { `; const expected = { + installationType: "operator", csmVersion: "1.6.0", driverVersion: "v2.6.0", imageRepository: "dellemc", @@ -163,7 +275,7 @@ describe("GIVEN setValues function", () => { }; const received = setValues(testCSMMap, CONSTANTS); - + console.log("***received***", received) 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..ad5ffb6d52 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 @@ -25,6 +25,8 @@ const { onCopyButtonClickHandler, resetImageRepository, resetControllerCount, + resetVolNamePrefix, + resetSnapNamePrefix, resetNodeSelectorLabel, resetDriverNamespace, resetTaint, @@ -49,7 +51,6 @@ const CONSTANTS = { TEMP_DIR: "templates", TEMP_EXT: ".template", HYPHEN: "-", - NODE_SELECTOR_TAB: '\n'.padEnd(7, " "), SLASH: "/", VERSIONS_DIR: "csm-versions", CSM: "csm", @@ -290,6 +291,38 @@ describe("GIVEN resetControllerCount function", () => { }); }); +describe("GIVEN resetVolNamePrefix function", () => { + const testCSMMap = new Map([ + ["volNamePrefix", "csivol"] + ]); + + test("SHOULD invoke resetVolNamePrefix function", () => { + document.body.innerHTML = ` + + `; + + resetVolNamePrefix(testCSMMap); + + expect(document.getElementById("vol-name-prefix").value).toEqual("csivol"); + }); +}); + +describe("GIVEN resetSnapNamePrefix function", () => { + const testCSMMap = new Map([ + ["snapNamePrefix", "csi-snap"] + ]); + + test("SHOULD invoke resetSnapNamePrefix function", () => { + document.body.innerHTML = ` + + `; + + resetSnapNamePrefix(testCSMMap); + + expect(document.getElementById("snapshot-prefix").value).toEqual("csi-snap"); + }); +}); + describe("GIVEN resetNodeSelectorLabel function", () => { const testCSMMap = new Map([ ["nodeSelectorLabel", "node-role.kubernetes.io/control-plane:"] @@ -344,55 +377,109 @@ describe("GIVEN displayModules function", () => {
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
`; test("SHOULD show expected components for csi-powerstore", () => { document.body.innerHTML = testHtml; - displayModules("powerstore", CONSTANTS); + displayModules("helm", "powerstore", CONSTANTS); expect($(".vgsnapshot").css("display")).toEqual("block"); expect($(".authorization").css("display")).toEqual("none"); expect($(".observability").css("display")).toEqual("block"); + expect($(".resiliency").css("display")).toEqual("block"); + expect($(".storage-capacity").css("display")).toEqual("block"); + }); + + test("SHOULD show expected components for csi-powerstore", () => { + document.body.innerHTML = testHtml; + + displayModules("operator", "powerstore", CONSTANTS); + + expect($(".vgsnapshot").css("display")).toEqual("none"); + expect($(".authorization").css("display")).toEqual("none"); + expect($(".observability").css("display")).toEqual("none"); + expect($(".replication-mod").css("display")).toEqual("none"); + expect($(".image-repository").css("display")).toEqual("none"); + expect($(".cert-manager").css("display")).toEqual("none"); + expect($(".resizer").css("display")).toEqual("none"); + expect($(".vol-name-prefix").css("display")).toEqual("none"); + expect($(".snapshot-feature").css("display")).toEqual("none"); + expect($(".fsGroupPolicy").css("display")).toEqual("block"); + expect($(".resiliency").css("display")).toEqual("block"); + expect($(".storage-capacity").css("display")).toEqual("block"); }); test("SHOULD show expected components for csi-powerscale", () => { document.body.innerHTML = testHtml; - displayModules("powerscale", CONSTANTS); + displayModules("helm", "powerscale", CONSTANTS); expect($(".authorization").css("display")).toEqual("block"); expect($(".observability").css("display")).toEqual("block"); + expect($(".vgsnapshot").css("display")).toEqual("none"); + expect($(".storage-capacity").css("display")).toEqual("block"); + expect($(".fsGroupPolicy").css("display")).toEqual("block"); + expect($(".resiliency").css("display")).toEqual("block"); + expect($(".cert-secret-count-wrapper").css("display")).toEqual("block"); }); test("SHOULD show expected components for csi-powermax", () => { document.body.innerHTML = testHtml; - displayModules("powermax", CONSTANTS); + displayModules("helm", "powermax", CONSTANTS); expect($(".vgsnapshot").css("display")).toEqual("none"); expect($(".authorization").css("display")).toEqual("block"); expect($(".observability").css("display")).toEqual("block"); + expect($(".storageArrays").css("display")).toEqual("block"); + expect($(".cluster-prefix").css("display")).toEqual("block"); + expect($(".port-groups").css("display")).toEqual("block"); + expect($(".migration").css("display")).toEqual("block"); + expect($(".vSphere").css("display")).toEqual("block"); }); test("SHOULD show expected components for csi-powerflex", () => { document.body.innerHTML = testHtml; - displayModules("powerflex", CONSTANTS); + displayModules("helm", "powerflex", CONSTANTS); expect($(".vgsnapshot").css("display")).toEqual("block"); expect($(".authorization").css("display")).toEqual("block"); expect($(".observability").css("display")).toEqual("block"); + expect($(".monitor").css("display")).toEqual("block"); + expect($(".resiliency").css("display")).toEqual("block"); + expect($(".cert-secret-count-wrapper").css("display")).toEqual("block"); }); test("SHOULD show expected components for csi-unity", () => { document.body.innerHTML = testHtml; - displayModules("unity", CONSTANTS); + displayModules("helm", "unity", CONSTANTS); expect($(".vgsnapshot").css("display")).toEqual("none"); expect($(".authorization").css("display")).toEqual("none"); expect($(".observability").css("display")).toEqual("none"); + expect($(".replication-mod").css("display")).toEqual("none"); + expect($(".cert-manager").css("display")).toEqual("none"); + expect($(".resiliency").css("display")).toEqual("block"); + expect($(".fsGroupPolicy").css("display")).toEqual("block"); }); }); @@ -417,10 +504,12 @@ describe("GIVEN displayCommands function", () => { const commandNoteValue = "Ensure that the namespaces and secrets are created before installing the helm chart"; const command1Value = "helm repo add dell https://dell.github.io/helm-charts"; const command2Value = "helm install $release-name dell/container-storage-modules -n $namespace --version $version -f values.yaml"; + const command3Value = "kubectl create -f values.yaml"; test("SHOULD show expected commands", () => { document.body.innerHTML = ` + `; - displayCommands("powerstore", commandTitleValue, commandNoteValue, command1Value, command2Value, CONSTANTS); + displayCommands("powerstore", commandTitleValue, commandNoteValue, command1Value, command2Value, command3Value, CONSTANTS); expect($("#command-text-area").css("display")).toEqual("block"); expect($("#command-title").text()).toEqual("Run the following commands to install"); @@ -440,6 +529,27 @@ describe("GIVEN displayCommands function", () => { expect($("#command2").text()).toEqual("helm install powerstore dell/container-storage-modules -n csi-powerstore --version 1.0.0 -f values.yaml"); }); + test("SHOULD show expected commands", () => { + document.body.innerHTML = ` + + + + + + `; + + displayCommands("powerstore", commandTitleValue, commandNoteValue, command1Value, command2Value, command3Value, CONSTANTS); + + expect($("#command-text-area").css("display")).toEqual("block"); + expect($("#command-title").text()).toEqual("Run the following commands to install"); + expect($("#command-note").text()).toEqual("Ensure that the namespaces and secrets are created before installing the helm chart"); + expect($("#command1").text()).toEqual("kubectl create -f values.yaml"); + }); }); describe("SHOULD Disable/Enable Generate YAML button based on validation of input fields", () => { diff --git a/content/docs/deployment/csminstallationwizard/src/static/js/ui-functions.js b/content/docs/deployment/csminstallationwizard/src/static/js/ui-functions.js index 745eb33a43..dd1a05f101 100644 --- a/content/docs/deployment/csminstallationwizard/src/static/js/ui-functions.js +++ b/content/docs/deployment/csminstallationwizard/src/static/js/ui-functions.js @@ -24,12 +24,22 @@ const setupTooltipStyle = () => { [...tooltipTriggerList].map(tooltipTriggerEl => new bootstrap.Tooltip(tooltipTriggerEl)) }; +function onInstallationTypeChange(){ + driver = document.getElementById("array").value + driver === "" ? $("#main").hide() : $("#main").show(); + installationType = document.getElementById("installation-type").value + displayModules(installationType, driver, CONSTANTS) + $("#command-text-area").hide(); + loadTemplate(document.getElementById("array").value, document.getElementById("installation-type").value, document.getElementById("csm-version").value); +} + function onArrayChange() { $('#array').on('change', function() { $("#command-text-area").hide(); driver = $(this).val(); driver === "" ? $("#main").hide() : $("#main").show(); - displayModules(driver, CONSTANTS) + installationType = document.getElementById("installation-type").value + displayModules(installationType, driver, CONSTANTS) loadTemplate(document.getElementById("array").value, document.getElementById("installation-type").value, document.getElementById("csm-version").value); setDefaultValues(defaultValues, csmMap); $(".namespace").show(); @@ -103,7 +113,7 @@ function onNodeSelectorChange(nodeSelectorNoteValue, csmMapValue) { const onCSMVersionChange = () => { document.getElementById("csm-version").value !== "" ? loadTemplate(document.getElementById("array").value, document.getElementById("installation-type").value, document.getElementById("csm-version").value) : null; - displayModules(driver, CONSTANTS); + displayModules(installationType, driver, CONSTANTS); onObservabilityChange(); onAuthorizationChange(); }; @@ -153,13 +163,13 @@ const downloadFile = (validateFormFunc, generateYamlFileFunc, displayCommandsFun var link = document.getElementById('download-file'); link.href = generateYamlFileFunc(template); link.style.display = 'inline-block'; - displayCommandsFunc(releaseName, commandTitle, commandNote, command1, command2, CONSTANTS_PARAM) + displayCommandsFunc(releaseName, commandTitle, commandNote, command1, command2, command3, CONSTANTS_PARAM) validateInputFunc(validateFormFunc, CONSTANTS_PARAM) return true; } -function displayModules(driverName, CONSTANTS_PARAM) { +function displayModules(installationType, driverName, CONSTANTS_PARAM) { $(".vgsnapshot").show(); $(".authorization").show(); $(".observability").show(); @@ -178,6 +188,9 @@ function displayModules(driverName, CONSTANTS_PARAM) { $(".vol-name-prefix").show(); $("div#snap-prefix").show(); $(".fsGroupPolicy").hide(); + $(".image-repository").show(); + $(".resizer").show(); + $(".snapshot-feature").show(); switch (driverName) { case CONSTANTS_PARAM.POWERSTORE: @@ -186,6 +199,17 @@ function displayModules(driverName, CONSTANTS_PARAM) { $(".storage-capacity").show(); $(".resiliency").show(); document.getElementById("driver-namespace").value = CONSTANTS_PARAM.POWERSTORE_NAMESPACE; + if (installationType == 'operator'){ + $(".observability").hide(); + $(".replication-mod").hide(); + $(".image-repository").hide(); + $(".cert-manager").hide(); + $(".vgsnapshot").hide(); + $(".resizer").hide(); + $(".snapshot-feature").hide(); + $(".vol-name-prefix").hide(); + $(".fsGroupPolicy").show(); + } break; case CONSTANTS_PARAM.POWERSCALE: $(".cert-secret-count-wrapper").show(); @@ -224,9 +248,10 @@ function displayModules(driverName, CONSTANTS_PARAM) { } } -function displayCommands(releaseNameValue, commandTitleValue, commandNoteValue, command1Value, command2Value, CONSTANTS) { +function displayCommands(releaseNameValue, commandTitleValue, commandNoteValue, command1Value, command2Value, command3Value, CONSTANTS) { driverNamespace = document.getElementById("driver-namespace").value; csmVersion = document.getElementById("csm-version").value; + installationType = document.getElementById("installation-type").value var helmChartVersion; switch (csmVersion) { case "1.7.0": @@ -240,10 +265,18 @@ function displayCommands(releaseNameValue, commandTitleValue, commandNoteValue, $("#reverseProxyNote").hide(); $("#command-title").html(commandTitleValue); $("#command-note").show(); - $("#command1").html(command1Value); $("#command-note").html(commandNoteValue); - var command2 = command2Value.replace("$release-name", releaseNameValue).replace("$namespace", driverNamespace).replace("$version", helmChartVersion); - $("#command2").html(command2); + + if (installationType == 'helm'){ + $("#command1").html(command1Value); + + $("#command2-wrapper").show(); + var command2 = command2Value.replace("$release-name", releaseNameValue).replace("$namespace", driverNamespace).replace("$version", helmChartVersion); + $("#command2").html(command2); + }else{ + $("#command1").html(command3Value); + $("#command2-wrapper").hide(); + } if (document.getElementById("array").value === CONSTANTS.POWERMAX) { $("#reverseProxyNote").show(); } diff --git a/content/docs/deployment/csminstallationwizard/src/templates/helm/csm-1.8.0-values.template b/content/docs/deployment/csminstallationwizard/src/templates/helm/csm-1.8.0-values.template new file mode 100644 index 0000000000..6a4cb16530 --- /dev/null +++ b/content/docs/deployment/csminstallationwizard/src/templates/helm/csm-1.8.0-values.template @@ -0,0 +1,444 @@ +## K8S/DRIVER ATTRIBUTES +########################################## +## K8S/CSI-PowerStore ATTRIBUTES +########################################## +csi-powerstore: + enabled: $POWERSTORE_ENABLED + version: v2.8.0 + images: + driverRepository: $IMAGE_REPOSITORY + ## Controller ATTRIBUTES + controller: + controllerCount: $CONTROLLER_COUNT + volumeNamePrefix: $VOLUME_NAME_PREFIX + healthMonitor: + enabled: $HEALTH_MONITOR_ENABLED + nodeSelector: $CONTROLLER_POD_NODE_SELECTOR + tolerations: $CONTROLLER_TOLERATIONS + replication: + enabled: $REPLICATION_ENABLED + image: dellemc/dell-csi-replicator:v1.5.0 + vgsnapshot: + enabled: $VG_SNAPSHOT_ENABLED + image: dellemc/csi-volumegroup-snapshotter:v1.2.0 + metadataretriever: dellemc/csi-metadata-retriever:v1.4.0 + snapshot: + enabled: $SNAPSHOT_ENABLED + snapNamePrefix: $SNAP_NAME_PREFIX + resizer: + enabled: $RESIZER_ENABLED + ## Node ATTRIBUTES + node: + healthMonitor: + enabled: $HEALTH_MONITOR_ENABLED + nodeSelector: $NODE_POD_NODE_SELECTOR + tolerations: $NODE_TOLERATIONS + # Uncomment if CSM for Resiliency and CSI Driver pods monitor are enabled + # - key: "offline.vxflexos.storage.dell.com" + # operator: "Exists" + # effect: "NoSchedule" + # - key: "vxflexos.podmon.storage.dell.com" + # operator: "Exists" + # effect: "NoSchedule" + # - key: "offline.unity.storage.dell.com" + # operator: "Exists" + # effect: "NoSchedule" + # - key: "unity.podmon.storage.dell.com" + # operator: "Exists" + # effect: "NoSchedule" + # - key: "offline.isilon.storage.dell.com" + # operator: "Exists" + # effect: "NoSchedule" + # - key: "isilon.podmon.storage.dell.com" + # operator: "Exists" + # effect: "NoSchedule" + # - key: "offline.powerstore.storage.dell.com" + # operator: "Exists" + # effect: "NoSchedule" + # - key: "powerstore.podmon.storage.dell.com" + # operator: "Exists" + # effect: "NoSchedule" + storageCapacity: + enabled: $STORAGE_CAPACITY_ENABLED + podmon: + enabled: $RESILIENCY_ENABLED + image: dellemc/podmon:v1.6.0 + #controller: + # args: + # - "--csisock=unix:/var/run/csi/csi.sock" + # - "--labelvalue=csi-powerstore" + # - "--arrayConnectivityPollRate=60" + # - "--driverPath=csi-powerstore.dellemc.com" + # - "--mode=controller" + # - "--skipArrayConnectionValidation=false" + # - "--driver-config-params=/powerstore-config-params/driver-config-params.yaml" + # - "--driverPodLabelValue=dell-storage" + # - "--ignoreVolumelessPods=false" + + #node: + # args: + # - "--csisock=unix:/var/lib/kubelet/plugins/csi-powerstore.dellemc.com/csi_sock" + # - "--labelvalue=csi-powerstore" + # - "--arrayConnectivityPollRate=60" + # - "--driverPath=csi-powerstore.dellemc.com" + # - "--mode=node" + # - "--leaderelection=false" + # - "--driver-config-params=/powerstore-config-params/driver-config-params.yaml" + # - "--driverPodLabelValue=dell-storage" + # - "--ignoreVolumelessPods=false" + +## K8S/CSI-PowerMax ATTRIBUTES +########################################## +csi-powermax: + enabled: $POWERMAX_ENABLED + global: + storageArrays: + - storageArrayId: "$POWERMAX_STORAGE_ARRAY_ID" + endpoint: $POWERMAX_STORAGE_ARRAY_ENDPOINT_URL + backupEndpoint: $POWERMAX_STORAGE_ARRAY_BACKUP_ENDPOINT_URL + managementServers: + - endpoint: $POWERMAX_MANAGEMENT_SERVERS_ENDPOINT_URL + version: v2.8.0 + images: + driverRepository: $IMAGE_REPOSITORY + clusterPrefix: $POWERMAX_CLUSTER_PREFIX + portGroups: "$POWERMAX_PORT_GROUPS" + controller: + controllerCount: $CONTROLLER_COUNT + volumeNamePrefix: $VOLUME_NAME_PREFIX + snapshot: + enabled: $SNAPSHOT_ENABLED + snapNamePrefix: $SNAP_NAME_PREFIX + resizer: + enabled: $RESIZER_ENABLED + healthMonitor: + enabled: $HEALTH_MONITOR_ENABLED + nodeSelector: $CONTROLLER_POD_NODE_SELECTOR + tolerations: $CONTROLLER_TOLERATIONS + node: + healthMonitor: + enabled: $HEALTH_MONITOR_ENABLED + nodeSelector: $NODE_POD_NODE_SELECTOR + tolerations: $NODE_TOLERATIONS + - key: "node.kubernetes.io/memory-pressure" + operator: "Exists" + effect: "NoExecute" + - key: "node.kubernetes.io/disk-pressure" + operator: "Exists" + effect: "NoExecute" + - key: "node.kubernetes.io/network-unavailable" + operator: "Exists" + effect: "NoExecute" + csireverseproxy: + image: dellemc/csipowermax-reverseproxy:v2.6.0 + deployAsSidecar: true + replication: + enabled: $REPLICATION_ENABLED + image: dellemc/dell-csi-replicator:v1.5.0 + migration: + enabled: $MIGRATION_ENABLED + image: dellemc/dell-csi-migrator:v1.1.1 + nodeRescanSidecarImage: dellemc/dell-csi-node-rescanner:v1.0.1 + authorization: + enabled: $AUTHORIZATION_ENABLED + sidecarProxyImage: dellemc/csm-authorization-sidecar:v1.7.0 + proxyHost: $AUTHORIZATION_PROXY_HOST + skipCertificateValidation: $AUTHORIZATION_SKIP_CERTIFICATE_VALIDATION + vSphere: + enabled: $VSPHERE_ENABLED + fcPortGroup: "$VSPHERE_FC_PORT_GROUP" + fcHostName: "$VSPHERE_FC_HOST_NAME" + vCenterHost: "$VSPHERE_VCENTER_HOST" + vCenterCredSecret: $VSPHERE_VCENTER_CRED_SECRET + +## K8S/CSI-PowerFlex ATTRIBUTES +########################################## +csi-vxflexos: + enabled: $POWERFLEX_ENABLED + version: v2.8.0 + images: + driverRepository: $IMAGE_REPOSITORY + powerflexSdc: dellemc/sdc:3.6.0.6 + certSecretCount: $CERT_SECRET_COUNT + controller: + replication: + enabled: $REPLICATION_ENABLED + image: dellemc/dell-csi-replicator:v1.5.0 + healthMonitor: + enabled: $HEALTH_MONITOR_ENABLED + controllerCount: $CONTROLLER_COUNT + volumeNamePrefix: $VOLUME_NAME_PREFIX + snapshot: + enabled: $SNAPSHOT_ENABLED + resizer: + enabled: $RESIZER_ENABLED + nodeSelector: $CONTROLLER_POD_NODE_SELECTOR + tolerations: $CONTROLLER_TOLERATIONS + node: + healthMonitor: + enabled: $HEALTH_MONITOR_ENABLED + nodeSelector: $NODE_POD_NODE_SELECTOR + tolerations: $NODE_TOLERATIONS + # Uncomment if CSM for Resiliency and CSI Driver pods monitor is enabled + # - key: "offline.vxflexos.storage.dell.com" + # operator: "Exists" + # effect: "NoSchedule" + # - key: "vxflexos.podmon.storage.dell.com" + # operator: "Exists" + # effect: "NoSchedule" + # - key: "offline.unity.storage.dell.com" + # operator: "Exists" + # effect: "NoSchedule" + # - key: "unity.podmon.storage.dell.com" + # operator: "Exists" + # effect: "NoSchedule" + # - key: "offline.isilon.storage.dell.com" + # operator: "Exists" + # effect: "NoSchedule" + # - key: "isilon.podmon.storage.dell.com" + # operator: "Exists" + # effect: "NoSchedule" + monitor: + enabled: $MONITOR_ENABLED + vgsnapshotter: + enabled: $VG_SNAPSHOT_ENABLED + image: dellemc/csi-volumegroup-snapshotter:v1.2.0 + podmon: + enabled: $RESILIENCY_ENABLED + image: dellemc/podmon:v1.6.0 + # controller: + # args: + # - "--csisock=unix:/var/run/csi/csi.sock" + # - "--labelvalue=csi-vxflexos" + # - "--mode=controller" + # - "--skipArrayConnectionValidation=false" + # - "--driver-config-params=/vxflexos-config-params/driver-config-params.yaml" + # - "--driverPodLabelValue=dell-storage" + # - "--ignoreVolumelessPods=false" + # node: + # args: + # - "--csisock=unix:/var/lib/kubelet/plugins/vxflexos.emc.dell.com/csi_sock" + # - "--labelvalue=csi-vxflexos" + # - "--mode=node" + # - "--leaderelection=false" + # - "--driver-config-params=/vxflexos-config-params/driver-config-params.yaml" + # - "--driverPodLabelValue=dell-storage" + # - "--ignoreVolumelessPods=false" + authorization: + enabled: $AUTHORIZATION_ENABLED + sidecarProxyImage: dellemc/csm-authorization-sidecar:v1.7.0 + proxyHost: $AUTHORIZATION_PROXY_HOST + skipCertificateValidation: $AUTHORIZATION_SKIP_CERTIFICATE_VALIDATION + +## K8S/CSI-PowerScale ATTRIBUTES +########################################## +csi-isilon: + enabled: $POWERSCALE_ENABLED + version: "v2.8.0" + certSecretCount: $CERT_SECRET_COUNT + + allowedNetworks: [] + + verbose: 1 + + enableCustomTopology: false + + fsGroupPolicy: $FSGROUP_POLICY + + storageCapacity: + enabled: $STORAGE_CAPACITY_ENABLED + + controller: + controllerCount: $CONTROLLER_COUNT + volumeNamePrefix: $VOLUME_NAME_PREFIX + + replication: + enabled: $REPLICATION_ENABLED + image: dellemc/dell-csi-replicator:v1.5.0 + + snapshot: + enabled: $SNAPSHOT_ENABLED + snapNamePrefix: $SNAP_NAME_PREFIX + + resizer: + enabled: $RESIZER_ENABLED + + healthMonitor: + enabled: $HEALTH_MONITOR_ENABLED + + nodeSelector: $CONTROLLER_POD_NODE_SELECTOR + tolerations: $CONTROLLER_TOLERATIONS + node: + nodeSelector: $NODE_POD_NODE_SELECTOR + tolerations: $NODE_TOLERATIONS + # - key: "node.kubernetes.io/memory-pressure" + # operator: "Exists" + # effect: "NoExecute" + # - key: "node.kubernetes.io/disk-pressure" + # operator: "Exists" + # effect: "NoExecute" + # - key: "node.kubernetes.io/network-unavailable" + # operator: "Exists" + # effect: "NoExecute" + # Uncomment if CSM for Resiliency and CSI Driver pods monitor are enabled + # - key: "offline.vxflexos.storage.dell.com" + # operator: "Exists" + # effect: "NoSchedule" + # - key: "vxflexos.podmon.storage.dell.com" + # operator: "Exists" + # effect: "NoSchedule" + # - key: "offline.unity.storage.dell.com" + # operator: "Exists" + # effect: "NoSchedule" + # - key: "unity.podmon.storage.dell.com" + # operator: "Exists" + # effect: "NoSchedule" + # - key: "offline.isilon.storage.dell.com" + # operator: "Exists" + # effect: "NoSchedule" + # - key: "isilon.podmon.storage.dell.com" + # operator: "Exists" + # effect: "NoSchedule" + + healthMonitor: + enabled: $HEALTH_MONITOR_ENABLED + + authorization: + enabled: $AUTHORIZATION_ENABLED + sidecarProxyImage: dellemc/csm-authorization-sidecar:v1.7.0 + proxyHost: $AUTHORIZATION_PROXY_HOST + skipCertificateValidation: $AUTHORIZATION_SKIP_CERTIFICATE_VALIDATION + + # Enable this feature only after contact support for additional information + podmon: + enabled: $RESILIENCY_ENABLED + image: dellemc/podmon:v1.6.0 + #controller: + # args: + # - "--csisock=unix:/var/run/csi/csi.sock" + # - "--labelvalue=csi-isilon" + # - "--arrayConnectivityPollRate=60" + # - "--driverPath=csi-isilon.dellemc.com" + # - "--mode=controller" + # - "--skipArrayConnectionValidation=false" + # - "--driver-config-params=/csi-isilon-config-params/driver-config-params.yaml" + # - "--driverPodLabelValue=dell-storage" + # - "--ignoreVolumelessPods=false" + + #node: + # args: + # - "--csisock=unix:/var/lib/kubelet/plugins/csi-isilon/csi_sock" + # - "--labelvalue=csi-isilon" + # - "--arrayConnectivityPollRate=60" + # - "--driverPath=csi-isilon.dellemc.com" + # - "--mode=node" + # - "--leaderelection=false" + # - "--driver-config-params=/csi-isilon-config-params/driver-config-params.yaml" + # - "--driverPodLabelValue=dell-storage" + # - "--ignoreVolumelessPods=false" + + images: + driverRepository: $IMAGE_REPOSITORY + +## K8S/CSI-Unity ATTRIBUTES +########################################## +csi-unity: + enabled: $UNITY_ENABLED + version: v2.8.0 + images: + driverRepository: $IMAGE_REPOSITORY + certSecretCount: $CERT_SECRET_COUNT + fsGroupPolicy: $FSGROUP_POLICY + controller: + controllerCount: $CONTROLLER_COUNT + volumeNamePrefix: $VOLUME_NAME_PREFIX + snapshot: + enabled: $SNAPSHOT_ENABLED + snapNamePrefix: $SNAP_NAME_PREFIX + resizer: + enabled: $RESIZER_ENABLED + nodeSelector: $CONTROLLER_POD_NODE_SELECTOR + tolerations: $CONTROLLER_TOLERATIONS + healthMonitor: + enabled: $HEALTH_MONITOR_ENABLED + node: + healthMonitor: + enabled: $HEALTH_MONITOR_ENABLED + nodeSelector: $NODE_POD_NODE_SELECTOR + tolerations: $NODE_TOLERATIONS + # - key: "node.kubernetes.io/memory-pressure" + # operator: "Exists" + # effect: "NoExecute" + # - key: "node.kubernetes.io/disk-pressure" + # operator: "Exists" + # effect: "NoExecute" + # - key: "node.kubernetes.io/network-unavailable" + # operator: "Exists" + # effect: "NoExecute" + # Uncomment if CSM for Resiliency and CSI Driver pods monitor are enabled + # - key: "offline.vxflexos.storage.dell.com" + # operator: "Exists" + # effect: "NoSchedule" + # - key: "vxflexos.podmon.storage.dell.com" + # operator: "Exists" + # effect: "NoSchedule" + # - key: "offline.unity.storage.dell.com" + # operator: "Exists" + # effect: "NoSchedule" + # - key: "unity.podmon.storage.dell.com" + # operator: "Exists" + # effect: "NoSchedule" + # - key: "offline.isilon.storage.dell.com" + # operator: "Exists" + # effect: "NoSchedule" + # - key: "isilon.podmon.storage.dell.com" + # operator: "Exists" + # effect: "NoSchedule" + podmon: + enabled: $RESILIENCY_ENABLED + image: dellemc/podmon:v1.6.0 + controller: + args: + - "--csisock=unix:/var/run/csi/csi.sock" + - "--labelvalue=csi-unity" + - "--driverPath=csi-unity.dellemc.com" + - "--mode=controller" + - "--skipArrayConnectionValidation=false" + - "--driver-config-params=/unity-config/driver-config-params.yaml" + - "--driverPodLabelValue=dell-storage" + - "--ignoreVolumelessPods=false" + node: + args: + - "--csisock=unix:/var/lib/kubelet/plugins/unity.emc.dell.com/csi_sock" + - "--labelvalue=csi-unity" + - "--driverPath=csi-unity.dellemc.com" + - "--mode=node" + - "--leaderelection=false" + - "--driver-config-params=/unity-config/driver-config-params.yaml" + - "--driverPodLabelValue=dell-storage" + - "--ignoreVolumelessPods=false" + +## K8S/Replication Module ATTRIBUTES +########################################## +csm-replication: + enabled: $REPLICATION_ENABLED + +## K8S/Observability Module ATTRIBUTES +########################################## +karavi-observability: + enabled: $OBSERVABILITY_ENABLED + karaviMetricsPowerstore: + enabled: $POWERSTORE_OBSERVABILITY_METRICS_ENABLED + karaviMetricsPowerMax: + enabled: $POWERMAX_OBSERVABILITY_METRICS_ENABLED + karaviMetricsPowerflex: + enabled: $POWERFLEX_OBSERVABILITY_METRICS_ENABLED + karaviMetricsPowerscale: + enabled: $POWERSCALE_OBSERVABILITY_METRICS_ENABLED + cert-manager: + enabled: $OBSERVABILITY_CERT_MANAGER_ENABLED + +## K8S/Cert-manager ATTRIBUTES +########################################## +cert-manager: + enabled: $CERT_MANAGER_ENABLED diff --git a/content/docs/deployment/csminstallationwizard/src/templates/operator/csm-isilon-1.7.0.template b/content/docs/deployment/csminstallationwizard/src/templates/operator/csm-isilon-1.7.0.template new file mode 100644 index 0000000000..e3de95ad09 --- /dev/null +++ b/content/docs/deployment/csminstallationwizard/src/templates/operator/csm-isilon-1.7.0.template @@ -0,0 +1,413 @@ +apiVersion: storage.dell.com/v1 +kind: ContainerStorageModule +metadata: + name: isilon + namespace: $NAMESPACE +spec: + driver: + csiDriverType: "isilon" + csiDriverSpec: + fSGroupPolicy: "$FSGROUP_POLICY" + storageCapacity: $STORAGE_CAPACITY_ENABLED + configVersion: v2.7.0 + authSecret: isilon-creds + replicas: $CONTROLLER_COUNT + dnsPolicy: ClusterFirstWithHostNet + # Uninstall CSI Driver and/or modules when CR is deleted + forceRemoveDriver: true + common: + # Image for CSI PowerScale driver v2.7.0 + image: "dellemc/csi-isilon:v2.7.0" + imagePullPolicy: IfNotPresent + envs: + # X_CSI_VERBOSE: Indicates what content of the OneFS REST API message should be logged in debug level logs + # Allowed Values: + # 0: log full content of the HTTP request and response + # 1: log without the HTTP response body + # 2: log only 1st line of the HTTP request and response + # Default value: 0 + - name: X_CSI_VERBOSE + value: "1" + + # X_CSI_ISI_PORT: Specify the HTTPs port number of the PowerScale OneFS API server + # This value acts as a default value for endpointPort, if not specified for a cluster config in secret + # Allowed value: valid port number + # Default value: 8080 + - name: X_CSI_ISI_PORT + value: "8080" + + # X_CSI_ISI_PATH: The base path for the volumes to be created on PowerScale cluster. + # This value acts as a default value for isiPath, if not specified for a cluster config in secret + # Ensure that this path exists on PowerScale cluster. + # Allowed values: unix absolute path + # Default value: /ifs + # Examples: /ifs/data/csi, /ifs/engineering + - name: X_CSI_ISI_PATH + value: "/ifs/data/csi" + + # X_CSI_ISI_NO_PROBE_ON_START: Indicates whether the controller/node should probe all the PowerScale clusters during driver initialization + # Allowed values: + # true : do not probe all PowerScale clusters during driver initialization + # false: probe all PowerScale clusters during driver initialization + # Default value: false + - name: X_CSI_ISI_NO_PROBE_ON_START + value: "false" + + # X_CSI_ISI_AUTOPROBE: automatically probe the PowerScale cluster if not done already during CSI calls. + # Allowed values: + # true : enable auto probe. + # false: disable auto probe. + # Default value: false + - name: X_CSI_ISI_AUTOPROBE + value: "true" + + # X_CSI_ISI_SKIP_CERTIFICATE_VALIDATION: Specify whether the PowerScale OneFS API server's certificate chain and host name should be verified. + # Formerly this attribute was named as "X_CSI_ISI_INSECURE" + # This value acts as a default value for skipCertificateValidation, if not specified for a cluster config in secret + # Allowed values: + # true: skip OneFS API server's certificate verification + # false: verify OneFS API server's certificates + # Default value: true + - name: X_CSI_ISI_SKIP_CERTIFICATE_VALIDATION + value: "true" + + # X_CSI_CUSTOM_TOPOLOGY_ENABLED: Specify if custom topology label .dellemc.com/: + # has to be used for making connection to backend PowerScale Array. + # If X_CSI_CUSTOM_TOPOLOGY_ENABLED is set to true, then do not specify allowedTopologies in storage class. + # Allowed values: + # true : enable custom topology + # false: disable custom topology + # Default value: false + - name: X_CSI_CUSTOM_TOPOLOGY_ENABLED + value: "false" + + # Specify kubelet config dir path. + # Ensure that the config.yaml file is present at this path. + # Default value: None + - name: KUBELET_CONFIG_DIR + value: "/var/lib/kubelet" + + # certSecretCount: Represents number of certificate secrets, which user is going to create for + # ssl authentication. (isilon-cert-0..isilon-cert-n) + # Allowed values: n, where n > 0 + # Default value: None + - name: "CERT_SECRET_COUNT" + value: "$CERT_SECRET_COUNT" + + # CSI driver log level + # Allowed values: "error", "warn"/"warning", "info", "debug" + # Default value: "debug" + - name: "CSI_LOG_LEVEL" + value: "debug" + + controller: + envs: + # X_CSI_ISI_QUOTA_ENABLED: Indicates whether the provisioner should attempt to set (later unset) quota + # on a newly provisioned volume. + # This requires SmartQuotas to be enabled on PowerScale cluster. + # Allowed values: + # true: set quota for volume + # false: do not set quota for volume + - name: X_CSI_ISI_QUOTA_ENABLED + value: "true" + + # X_CSI_ISI_ACCESS_ZONE: The name of the access zone a volume can be created in. + # If storageclass is missing with AccessZone parameter, then value of X_CSI_ISI_ACCESS_ZONE is used for the same. + # Default value: System + # Examples: System, zone1 + - name: X_CSI_ISI_ACCESS_ZONE + value: "System" + + # X_CSI_ISI_VOLUME_PATH_PERMISSIONS: The permissions for isi volume directory path + # This value acts as a default value for isiVolumePathPermissions, if not specified for a cluster config in secret + # Allowed values: valid octal mode number + # Default value: "0777" + # Examples: "0777", "777", "0755" + - name: X_CSI_ISI_VOLUME_PATH_PERMISSIONS + value: "0777" + + # X_CSI_HEALTH_MONITOR_ENABLED: Enable/Disable health monitor of CSI volumes from Controller plugin- volume status, volume condition. + # Install the 'external-health-monitor' sidecar accordingly. + # Allowed values: + # true: enable checking of health condition of CSI volumes + # false: disable checking of health condition of CSI volumes + # Default value: false + - name: X_CSI_HEALTH_MONITOR_ENABLED + value: "$HEALTH_MONITOR_ENABLED" + + # X_CSI_ISI_IGNORE_UNRESOLVABLE_HOSTS: Ignore unresolvable hosts on the OneFS. + # When set to true, OneFS allows new host to add to existing export list though any of the existing hosts from the + # same exports are unresolvable/doesn't exist anymore. + # Allowed values: + # true: ignore existing unresolvable hosts and append new host to the existing export + # false: exhibits OneFS default behavior i.e. if any of existing hosts are unresolvable while adding new one it fails + # Default value: false + - name: X_CSI_ISI_IGNORE_UNRESOLVABLE_HOSTS + value: "false" + + # X_CSI_MAX_PATH_LIMIT: this parameter is used for setting the maximum Path length for the given volume. + # Default value: 192 + # Examples: 192, 256 + - name: X_CSI_MAX_PATH_LIMIT + value: "192" + + + nodeSelector: $CONTROLLER_POD_NODE_SELECTOR + + tolerations: $CONTROLLER_TOLERATIONS + + + node: + envs: + # X_CSI_MAX_VOLUMES_PER_NODE: Specify default value for maximum number of volumes that controller can publish to the node. + # If value is zero CO SHALL decide how many volumes of this type can be published by the controller to the node. + # This limit is applicable to all the nodes in the cluster for which node label 'max-isilon-volumes-per-node' is not set. + # Allowed values: n, where n >= 0 + # Default value: 0 + - name: X_CSI_MAX_VOLUMES_PER_NODE + value: "0" + + # X_CSI_ALLOWED_NETWORKS: Custom networks for PowerScale export + # Specify list of networks which can be used for NFS I/O traffic; CIDR format should be used. + # Allowed values: list of one or more networks + # Default value: None + # Provide them in the following format: "[net1, net2]" + # CIDR format should be used + # eg: "[192.168.1.0/24, 192.168.100.0/22]" + - name: X_CSI_ALLOWED_NETWORKS + value: "" + + # X_CSI_HEALTH_MONITOR_ENABLED: Enable/Disable health monitor of CSI volumes from Controller plugin- volume status, volume condition. + # Install the 'external-health-monitor' sidecar accordingly. + # Allowed values: + # true: enable checking of health condition of CSI volumes + # false: disable checking of health condition of CSI volumes + # Default value: false + - name: X_CSI_HEALTH_MONITOR_ENABLED + value: "$HEALTH_MONITOR_ENABLED" + + # X_CSI_MAX_PATH_LIMIT: this parameter is used for setting the maximum Path length for the given volume. + # Default value: 192 + # Examples: 192, 256 + - name: X_CSI_MAX_PATH_LIMIT + value: "192" + + nodeSelector: $NODE_POD_NODE_SELECTOR + + tolerations: $NODE_TOLERATIONS + # - key: "node.kubernetes.io/memory-pressure" + # operator: "Exists" + # effect: "NoExecute" + # - key: "node.kubernetes.io/disk-pressure" + # operator: "Exists" + # effect: "NoExecute" + # - key: "node.kubernetes.io/network-unavailable" + # operator: "Exists" + # effect: "NoExecute" + + sideCars: + - name: provisioner + args: ["--volume-name-prefix=csipscale"] + # health monitor is disabled by default, refer to driver documentation before enabling it + - name: external-health-monitor + enabled: false + args: ["--monitor-interval=60s"] + # Uncomment the following to configure how often external-provisioner polls the driver to detect changed capacity + # Configure when the storageCapacity is set as "true" + # Allowed values: 1m,2m,3m,...,10m,...,60m etc. Default value: 5m + #- name: provisioner + # args: ["--capacity-poll-interval=5m"] + + modules: + # Authorization: enable csm-authorization for RBAC + - name: authorization + # enable: Enable/Disable csm-authorization + enabled: $AUTHORIZATION_ENABLED + configVersion: v1.7.0 + components: + - name: karavi-authorization-proxy + image: dellemc/csm-authorization-sidecar:v1.7.0 + envs: + # proxyHost: hostname of the csm-authorization server + - name: "PROXY_HOST" + value: "$AUTHORIZATION_PROXY_HOST" + + # skipCertificateValidation: Enable/Disable certificate validation of the csm-authorization server + - name: "SKIP_CERTIFICATE_VALIDATION" + value: "$AUTHORIZATION_SKIP_CERTIFICATE_VALIDATION" + + # replication: allows to configure replication + # Replication CRDs must be installed before installing driver + - name: replication + enabled: $REPLICATION_ENABLED + configVersion: v1.5.0 + components: + - name: dell-csi-replicator + # image: Image to use for dell-csi-replicator. This shouldn't be changed + # Allowed values: string + # Default value: None + image: dellemc/dell-csi-replicator:v1.5.0 + envs: + # replicationPrefix: prefix to prepend to storage classes parameters + # Allowed values: string + # Default value: replication.storage.dell.com + - name: "X_CSI_REPLICATION_PREFIX" + value: "replication.storage.dell.com" + # replicationContextPrefix: prefix to use for naming of resources created by replication feature + # Allowed values: string + # Default value: powerstore + - name: "X_CSI_REPLICATION_CONTEXT_PREFIX" + value: "powerscale" + + - name: dell-replication-controller-manager + # image: Defines controller image. This shouldn't be changed + # Allowed values: string + image: dellemc/dell-replication-controller:v1.5.0 + envs: + # TARGET_CLUSTERS_IDS: comma separated list of cluster IDs of the targets clusters. DO NOT include the source(wherever CSM Operator is deployed) cluster ID + # Set the value to "self" in case of stretched/single cluster configuration + # Allowed values: string + - name: "TARGET_CLUSTERS_IDS" + value: "target-cluster-1" + # Replication log level + # Allowed values: "error", "warn"/"warning", "info", "debug" + # Default value: "debug" + - name: "REPLICATION_CTRL_LOG_LEVEL" + value: "debug" + + # replicas: Defines number of controller replicas + # Allowed values: int + # Default value: 1 + - name: "REPLICATION_CTRL_REPLICAS" + value: "1" + # retryIntervalMin: Initial retry interval of failed reconcile request. + # It doubles with each failure, upto retry-interval-max + # Allowed values: time + - name: "RETRY_INTERVAL_MIN" + value: "1s" + # RETRY_INTERVAL_MAX: Maximum retry interval of failed reconcile request + # Allowed values: time + - name: "RETRY_INTERVAL_MAX" + value: "5m" + + - name: dell-replication-controller-init + # image: Defines replication init container image. This shouldn't be changed + # Allowed values: string + image: dellemc/dell-replication-init:v1.0.1 + + # observability: allows to configure observability + - name: observability + # enabled: Enable/Disable observability + enabled: $OBSERVABILITY_ENABLED + configVersion: v1.5.0 + components: + - name: topology + # enabled: Enable/Disable topology + enabled: false + image: dellemc/csm-topology:v1.5.0 + envs: + - name: "TOPOLOGY_LOG_LEVEL" + value: "INFO" + + - name: otel-collector + # enabled: Enable/Disable OpenTelemetry Collector + enabled: false + # image: Defines otel-collector image. This shouldn't be changed + # Allowed values: string + image: otel/opentelemetry-collector:0.42.0 + envs: + # image of nginx proxy image + # Allowed values: string + # Default value: "nginxinc/nginx-unprivileged:1.20" + - name: "NGINX_PROXY_IMAGE" + value: "nginxinc/nginx-unprivileged:1.20" + + - name: metrics-powerscale + enabled: $POWERSTORE_OBSERVABILITY_METRICS_ENABLED + image: dellemc/csm-metrics-powerscale:v1.2.0 + envs: + # POWERSCALE_MAX_CONCURRENT_QUERIES: set the default max concurrent queries to PowerScale + # Allowed values: int + # Default value: 10 + - name: "POWERSCALE_MAX_CONCURRENT_QUERIES" + value: "10" + # POWERSCALE_CAPACITY_METRICS_ENABLED: enable/disable collection of capacity metrics + # Allowed values: ture, false + # Default value: true + - name: "POWERSCALE_CAPACITY_METRICS_ENABLED" + value: "true" + # POWERSCALE_PERFORMANCE_METRICS_ENABLED: enable/disable collection of performance metrics + # Allowed values: ture, false + # Default value: true + - name: "POWERSCALE_PERFORMANCE_METRICS_ENABLED" + value: "true" + # POWERSCALE_CLUSTER_CAPACITY_POLL_FREQUENCY: set polling frequency to get cluster capacity metrics data + # Allowed values: int + # Default value: 30 + - name: "POWERSCALE_CLUSTER_CAPACITY_POLL_FREQUENCY" + value: "30" + # POWERSCALE_CLUSTER_PERFORMANCE_POLL_FREQUENCY: set polling frequency to get cluster performance metrics data + # Allowed values: int + # Default value: 20 + - name: "POWERSCALE_CLUSTER_PERFORMANCE_POLL_FREQUENCY" + value: "20" + # POWERSCALE_QUOTA_CAPACITY_POLL_FREQUENCY: set polling frequency to get Quota capacity metrics data + # Allowed values: int + # Default value: 20 + - name: "POWERSCALE_QUOTA_CAPACITY_POLL_FREQUENCY" + value: "30" + # ISICLIENT_INSECURE: set true/false to skip/verify OneFS API server's certificates + # Allowed values: ture, false + # Default value: true + - name: "ISICLIENT_INSECURE" + value: "true" + # ISICLIENT_AUTH_TYPE: set 0/1 to enables session-based/basic Authentication + # Allowed values: ture, false + # Default value: true + - name: "ISICLIENT_AUTH_TYPE" + value: "1" + # ISICLIENT_VERBOSE: set 0/1/2 decide High/Medium/Low content of the OneFS REST API message should be logged in debug level logs + # Allowed values: 0,1,2 + # Default value: 0 + - name: "ISICLIENT_VERBOSE" + value: "0" + # PowerScale metrics log level + # Valid values: TRACE, DEBUG, INFO, WARN, ERROR, FATAL, PANIC + # Default value: "INFO" + - name: "POWERSCALE_LOG_LEVEL" + value: "INFO" + # PowerScale Metrics Output logs in the specified format + # Valid values: TEXT, JSON + # Default value: "TEXT" + - name: "POWERSCALE_LOG_FORMAT" + value: "TEXT" + # Otel collector address + # Allowed values: String + # Default value: "otel-collector:55680" + - name: "COLLECTOR_ADDRESS" + value: "otel-collector:55680" + - name: resiliency + enabled: $RESILIENCY_ENABLED + configVersion: v1.6.0 + components: + - name: podmon-controller + args: + - "--labelvalue=csi-isilon" + - "--arrayConnectivityPollRate=60" + - "--skipArrayConnectionValidation=false" + - "--driverPodLabelValue=dell-storage" + - "--ignoreVolumelessPods=false" + - name: podmon-node + envs: + # podmonAPIPort: Defines the port to be used within the kubernetes cluster + # Allowed values: Any valid and free port (string) + # Default value: 8083 + - name: "X_CSI_PODMON_API_PORT" + value: "8083" + args: + - "--labelvalue=csi-isilon" + - "--arrayConnectivityPollRate=60" + - "--leaderelection=false" + - "--driverPodLabelValue=dell-storage" + - "--ignoreVolumelessPods=false" + \ No newline at end of file diff --git a/content/docs/deployment/csminstallationwizard/src/templates/operator/csm-powerstore-1.7.0.template b/content/docs/deployment/csminstallationwizard/src/templates/operator/csm-powerstore-1.7.0.template new file mode 100644 index 0000000000..8967425ea3 --- /dev/null +++ b/content/docs/deployment/csminstallationwizard/src/templates/operator/csm-powerstore-1.7.0.template @@ -0,0 +1,194 @@ +# +# +# Copyright © 2023 Dell Inc. or its subsidiaries. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# +apiVersion: storage.dell.com/v1 +kind: ContainerStorageModule +metadata: + name: powerstore + namespace: $NAMESPACE +spec: + driver: + csiDriverType: "powerstore" + csiDriverSpec: + # fsGroupPolicy: Defines if the underlying volume supports changing ownership and permission of the volume before being mounted. + # Allowed values: ReadWriteOnceWithFSType, File , None + # Default value: ReadWriteOnceWithFSType + fSGroupPolicy: $FSGROUP_POLICY + # storageCapacity: Helps the scheduler to schedule the pod on a node satisfying the topology constraints, only if the requested capacity is available on the storage array + # Allowed values: + # true: enable storage capacity tracking + # false: disable storage capacity tracking + storageCapacity: $STORAGE_CAPACITY_ENABLED + # Config version for CSI PowerStore v2.7.0 driver + configVersion: v2.7.0 + # authSecret: This is the secret used to validate the default PowerStore secret used for installation + # Allowed values: -config + # For example: If the metadataName is set to powerstore, authSecret value should be set to powerstore-config + authSecret: powerstore-config + # Controller count + replicas: $CONTROLLER_COUNT + dnsPolicy: ClusterFirstWithHostNet + forceUpdate: false + forceRemoveDriver: true + common: + # Image for CSI PowerStore driver v2.7.0 + image: "dellemc/csi-powerstore:v2.7.0" + imagePullPolicy: IfNotPresent + envs: + - name: X_CSI_POWERSTORE_NODE_NAME_PREFIX + value: "csi-node" + - name: X_CSI_FC_PORTS_FILTER_FILE_PATH + value: "/etc/fc-ports-filter" + - name: KUBELET_CONFIG_DIR + value: /var/lib/kubelet + - name: CSI_LOG_LEVEL + value: debug + + sideCars: + # health monitor is disabled by default, refer to driver documentation before enabling it + - name: external-health-monitor + enabled: $HEALTH_MONITOR_ENABLED + args: ["--monitor-interval=60s"] + + # Uncomment the following to configure how often external-provisioner polls the driver to detect changed capacity + # Configure only when the storageCapacity is set as "true" + # Allowed values: 1m,2m,3m,...,10m,...,60m etc. Default value: 5m + #- name: provisioner + # args: ["--capacity-poll-interval=5m"] + + controller: + envs: + # X_CSI_NFS_ACLS: enables setting permissions on NFS mount directory + # This value will be the default value if a storage class and array config in secret + # do not contain the NFS ACL (nfsAcls) parameter specified + # Permissions can be specified in two formats: + # 1) Unix mode (NFSv3) + # 2) NFSv4 ACLs (NFSv4) + # NFSv4 ACLs are supported on NFSv4 share only. + # Allowed values: + # 1) Unix mode: valid octal mode number + # Examples: "0777", "777", "0755" + # 2) NFSv4 acls: valid NFSv4 acls, seperated by comma + # Examples: "A::OWNER@:RWX,A::GROUP@:RWX", "A::OWNER@:rxtncy" + # Optional: true + # Default value: "0777" + # nfsAcls: "0777" + - name: X_CSI_NFS_ACLS + value: "0777" + # X_CSI_HEALTH_MONITOR_ENABLED: Enable/Disable health monitor of CSI volumes from Controller plugin - volume condition. + # Install the 'external-health-monitor' sidecar accordingly. + # Allowed values: + # true: enable checking of health condition of CSI volumes + # false: disable checking of health condition of CSI volumes + # Default value: false + - name: X_CSI_HEALTH_MONITOR_ENABLED + value: $HEALTH_MONITOR_ENABLED + # X_CSI_POWERSTORE_EXTERNAL_ACCESS: Allows to specify additional entries for hostAccess of NFS volumes. Both single IP address and subnet are valid entries. + # Allowed Values: x.x.x.x/xx or x.x.x.x + # Default Value: + - name: X_CSI_POWERSTORE_EXTERNAL_ACCESS + value: + + # nodeSelector: Define node selection constraints for controller pods. + # For the pod to be eligible to run on a node, the node must have each + # of the indicated key-value pairs as labels. + # Leave as blank to consider all nodes + # Allowed values: map of key-value pairs + # Default value: None + nodeSelector: $NODE_POD_NODE_SELECTOR + # Uncomment if nodes you wish to use have the node-role.kubernetes.io/control-plane taint + # node-role.kubernetes.io/control-plane: "" + + # tolerations: Define tolerations for the controllers, if required. + # Leave as blank to install controller on worker nodes + # Default value: None + tolerations: $NODE_TOLERATIONS + # Uncomment if nodes you wish to use have the node-role.kubernetes.io/control-plane taint + # - key: "node-role.kubernetes.io/control-plane" + # operator: "Exists" + # effect: "NoSchedule" + node: + envs: + # Set to "true" to enable ISCSI CHAP Authentication + # CHAP password will be autogenerated by driver + - name: "X_CSI_POWERSTORE_ENABLE_CHAP" + value: "false" + # X_CSI_HEALTH_MONITOR_ENABLED: Enable/Disable health monitor of CSI volumes from node plugin - volume usage + # Allowed values: + # true: enable checking of health condition of CSI volumes + # false: disable checking of health condition of CSI volumes + # Default value: false + - name: X_CSI_HEALTH_MONITOR_ENABLED + value: $HEALTH_MONITOR_ENABLED + + # nodeSelector: Define node selection constraints for node pods. + # For the pod to be eligible to run on a node, the node must have each + # of the indicated key-value pairs as labels. + # Leave as blank to consider all nodes + # Allowed values: map of key-value pairs + # Default value: None + nodeSelector: $NODE_POD_NODE_SELECTOR + # Uncomment if nodes you wish to use have the node-role.kubernetes.io/control-plane taint + # node-role.kubernetes.io/control-plane: "" + + # tolerations: Define tolerations for the controllers, if required. + # Leave as blank to install controller on worker nodes + # Default value: None + tolerations: $NODE_TOLERATIONS + # Uncomment if nodes you wish to use have the node-role.kubernetes.io/control-plane taint + # - key: "node-role.kubernetes.io/control-plane" + # operator: "Exists" + # effect: "NoSchedule" + + modules: + - name: resiliency + # enabled: Enable/Disable Resiliency feature + # Allowed values: + # true: enable Resiliency feature(deploy podmon sidecar) + # false: disable Resiliency feature(do not deploy podmon sidecar) + # Default value: false + enabled: $RESILIENCY_ENABLED + configVersion: v1.6.0 + components: + - name: podmon-controller + args: + - "--labelvalue=csi-powerstore" + - "--arrayConnectivityPollRate=60" + - "--skipArrayConnectionValidation=false" + - "--driverPodLabelValue=dell-storage" + - "--ignoreVolumelessPods=false" + # Below 4 args should not be modified. + - "--csisock=unix:/var/run/csi/csi.sock" + - "--mode=controller" + - "--driver-config-params=/powerstore-config-params/driver-config-params.yaml" + - "--driverPath=csi-powerstore.dellemc.com" + - name: podmon-node + envs: + # podmonAPIPort: Defines the port to be used within the kubernetes cluster + # Allowed values: Any valid and free port (string) + # Default value: 8083 + - name: "X_CSI_PODMON_API_PORT" + value: "8083" + args: + - "--labelvalue=csi-powerstore" + - "--arrayConnectivityPollRate=60" + - "--leaderelection=false" + - "--driverPodLabelValue=dell-storage" + - "--ignoreVolumelessPods=false" + # Below 4 args should not be modified. + - "--csisock=unix:/var/lib/kubelet/plugins/csi-powerstore.dellemc.com/csi_sock" + - "--mode=node" + - "--driver-config-params=/powerstore-config-params/driver-config-params.yaml" + - "--driverPath=csi-powerstore.dellemc.com" \ No newline at end of file From ed1b6deb9044b05139da4e171738c260f506d4d0 Mon Sep 17 00:00:00 2001 From: Rajitha Date: Wed, 12 Jul 2023 13:20:39 +0530 Subject: [PATCH 02/10] Fixed lint issues --- .../src/static/js/generate-yaml.js | 4 +- .../src/static/js/tests/generate-yaml.test.js | 175 +++++++++--------- .../src/static/js/ui-functions.js | 6 +- 3 files changed, 92 insertions(+), 93 deletions(-) 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 4986464632..96f1942b3b 100644 --- a/content/docs/deployment/csminstallationwizard/src/static/js/generate-yaml.js +++ b/content/docs/deployment/csminstallationwizard/src/static/js/generate-yaml.js @@ -56,10 +56,10 @@ function setValues(csmMapValues, CONSTANTS_PARAM) { var labels = DriverValues.nodeSelectorLabel.split(":"); var nodeSelector var taints - if (DriverValues.installationType == CONSTANTS_PARAM.OPERATOR) { + if (DriverValues.installationType === CONSTANTS_PARAM.OPERATOR) { nodeSelector = '\n'.padEnd(8, " ") + labels[0] + ': "' + labels[1] + '"'; taints = CONSTANTS_PARAM.OPERATOR_TAINTS.replace("$KEY", taint).trimEnd(); - }else{ + } else { nodeSelector = '\n'.padEnd(7, " ") + labels[0] + ': "' + labels[1] + '"'; taints = CONSTANTS_PARAM.HELM_TAINTS.replace("$KEY", taint).trimEnd(); } 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 b8bfee9861..cb08ee3058 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 @@ -48,11 +48,11 @@ const CONSTANTS = { operator: "Exists" effect: "NoSchedule" `, - OPERATOR_TAINTS: ` + OPERATOR_TAINTS: ` - key: "$KEY" operator: "Exists" effect: "NoSchedule" - `, + `, COMMENTED_TAINTS: ` #- key: "node-role.kubernetes.io/control-plane" # operator: "Exists" @@ -96,59 +96,59 @@ describe("GIVEN setValues function", () => { `; 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: '', - installationType: 'helm', - 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' + + csmVersion: '1.7.0', + driverVersion: 'v2.7.0', + imageRepository: 'dellemc', + monitor: false, + certSecretCount: '1', + controllerCount: '1', + volNamePrefix: 'csivol', + snapNamePrefix: 'csi-snap', + fsGroupPolicy: 'ReadWriteOnceWithFSType', + driverNamespace: '', + installationType: 'helm', + 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' + + 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: '""', - clusterPrefix: undefined, - portGroups: undefined, - vSphereEnabled: false, - vSphereFCPortGroup: undefined, - vSphereFCHostName: undefined, - vSphereVCenterHost: undefined, - vSphereVCenterCredSecret: undefined + 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: '""', + 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 Operator", () => { + 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: '', - installationType: 'operator', - 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' + + 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: '', + installationType: 'operator', + 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' + + 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: '""', - clusterPrefix: undefined, - portGroups: undefined, - vSphereEnabled: false, - vSphereFCPortGroup: undefined, - vSphereFCHostName: undefined, - vSphereVCenterHost: undefined, - vSphereVCenterCredSecret: undefined - }; + 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: '""', + 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", () => { document.body.innerHTML = ` @@ -250,7 +250,7 @@ describe("GIVEN setValues function", () => { `; const expected = { - installationType: "operator", + installationType: "operator", csmVersion: "1.6.0", driverVersion: "v2.6.0", imageRepository: "dellemc", @@ -275,7 +275,6 @@ describe("GIVEN setValues function", () => { }; const received = setValues(testCSMMap, CONSTANTS); - console.log("***received***", received) expect(received).toEqual(received); }); }); diff --git a/content/docs/deployment/csminstallationwizard/src/static/js/ui-functions.js b/content/docs/deployment/csminstallationwizard/src/static/js/ui-functions.js index dd1a05f101..46048920b1 100644 --- a/content/docs/deployment/csminstallationwizard/src/static/js/ui-functions.js +++ b/content/docs/deployment/csminstallationwizard/src/static/js/ui-functions.js @@ -199,7 +199,7 @@ function displayModules(installationType, driverName, CONSTANTS_PARAM) { $(".storage-capacity").show(); $(".resiliency").show(); document.getElementById("driver-namespace").value = CONSTANTS_PARAM.POWERSTORE_NAMESPACE; - if (installationType == 'operator'){ + if (installationType === 'operator'){ $(".observability").hide(); $(".replication-mod").hide(); $(".image-repository").hide(); @@ -267,13 +267,13 @@ function displayCommands(releaseNameValue, commandTitleValue, commandNoteValue, $("#command-note").show(); $("#command-note").html(commandNoteValue); - if (installationType == 'helm'){ + if (installationType === 'helm'){ $("#command1").html(command1Value); $("#command2-wrapper").show(); var command2 = command2Value.replace("$release-name", releaseNameValue).replace("$namespace", driverNamespace).replace("$version", helmChartVersion); $("#command2").html(command2); - }else{ + } else { $("#command1").html(command3Value); $("#command2-wrapper").hide(); } From cc1279cb9661bd5e4dae8683188fc1bd660dc44d Mon Sep 17 00:00:00 2001 From: Rajitha Date: Wed, 12 Jul 2023 17:55:44 +0530 Subject: [PATCH 03/10] addressed the comments --- .../csm-versions/default-values.properties | 2 +- .../csminstallationwizard/src/index.html | 4 +- .../src/static/js/constants.js | 1 + .../src/static/js/tests/generate-yaml.test.js | 1 + .../src/static/js/tests/ui-functions.test.js | 3 +- .../src/static/js/ui-functions.js | 5 +- .../operator/csm-isilon-1.7.0.template | 413 ------------------ 7 files changed, 11 insertions(+), 418 deletions(-) delete mode 100644 content/docs/deployment/csminstallationwizard/src/templates/operator/csm-isilon-1.7.0.template 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..64f447ed52 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: diff --git a/content/docs/deployment/csminstallationwizard/src/index.html b/content/docs/deployment/csminstallationwizard/src/index.html index 3be2073246..8b6511c4e4 100644 --- a/content/docs/deployment/csminstallationwizard/src/index.html +++ b/content/docs/deployment/csminstallationwizard/src/index.html @@ -85,8 +85,8 @@
diff --git a/content/docs/deployment/csminstallationwizard/src/static/js/constants.js b/content/docs/deployment/csminstallationwizard/src/static/js/constants.js index c69f95f97c..884aac4f7c 100644 --- a/content/docs/deployment/csminstallationwizard/src/static/js/constants.js +++ b/content/docs/deployment/csminstallationwizard/src/static/js/constants.js @@ -38,6 +38,7 @@ const CONSTANTS = { HELM: "helm", OPERATOR: "operator", CSM_HELM_V170: "1.0.0", + CSM_HELM_V180: "1.1.0", HELM_TAINTS: ` - key: "$KEY" operator: "Exists" 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 cb08ee3058..d2e28d2dfc 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 @@ -43,6 +43,7 @@ const CONSTANTS = { HELM: "helm", OPERATOR: "operator", CSM_HELM_V170: "1.0.0", + CSM_HELM_V180: "1.1.0", HELM_TAINTS: ` - key: "$KEY" operator: "Exists" 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 ad5ffb6d52..9132f6f7c5 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 @@ -58,7 +58,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", () => { diff --git a/content/docs/deployment/csminstallationwizard/src/static/js/ui-functions.js b/content/docs/deployment/csminstallationwizard/src/static/js/ui-functions.js index 46048920b1..46a07acdc7 100644 --- a/content/docs/deployment/csminstallationwizard/src/static/js/ui-functions.js +++ b/content/docs/deployment/csminstallationwizard/src/static/js/ui-functions.js @@ -257,8 +257,11 @@ function displayCommands(releaseNameValue, commandTitleValue, commandNoteValue, case "1.7.0": helmChartVersion = CONSTANTS.CSM_HELM_V170; break; + case "1.8.0": + helmChartVersion = CONSTANTS.CSM_HELM_V180; + break; default: - helmChartVersion = CONSTANTS.CSM_HELM_V170; + helmChartVersion = CONSTANTS.CSM_HELM_V180; break; } $("#command-text-area").show(); diff --git a/content/docs/deployment/csminstallationwizard/src/templates/operator/csm-isilon-1.7.0.template b/content/docs/deployment/csminstallationwizard/src/templates/operator/csm-isilon-1.7.0.template deleted file mode 100644 index e3de95ad09..0000000000 --- a/content/docs/deployment/csminstallationwizard/src/templates/operator/csm-isilon-1.7.0.template +++ /dev/null @@ -1,413 +0,0 @@ -apiVersion: storage.dell.com/v1 -kind: ContainerStorageModule -metadata: - name: isilon - namespace: $NAMESPACE -spec: - driver: - csiDriverType: "isilon" - csiDriverSpec: - fSGroupPolicy: "$FSGROUP_POLICY" - storageCapacity: $STORAGE_CAPACITY_ENABLED - configVersion: v2.7.0 - authSecret: isilon-creds - replicas: $CONTROLLER_COUNT - dnsPolicy: ClusterFirstWithHostNet - # Uninstall CSI Driver and/or modules when CR is deleted - forceRemoveDriver: true - common: - # Image for CSI PowerScale driver v2.7.0 - image: "dellemc/csi-isilon:v2.7.0" - imagePullPolicy: IfNotPresent - envs: - # X_CSI_VERBOSE: Indicates what content of the OneFS REST API message should be logged in debug level logs - # Allowed Values: - # 0: log full content of the HTTP request and response - # 1: log without the HTTP response body - # 2: log only 1st line of the HTTP request and response - # Default value: 0 - - name: X_CSI_VERBOSE - value: "1" - - # X_CSI_ISI_PORT: Specify the HTTPs port number of the PowerScale OneFS API server - # This value acts as a default value for endpointPort, if not specified for a cluster config in secret - # Allowed value: valid port number - # Default value: 8080 - - name: X_CSI_ISI_PORT - value: "8080" - - # X_CSI_ISI_PATH: The base path for the volumes to be created on PowerScale cluster. - # This value acts as a default value for isiPath, if not specified for a cluster config in secret - # Ensure that this path exists on PowerScale cluster. - # Allowed values: unix absolute path - # Default value: /ifs - # Examples: /ifs/data/csi, /ifs/engineering - - name: X_CSI_ISI_PATH - value: "/ifs/data/csi" - - # X_CSI_ISI_NO_PROBE_ON_START: Indicates whether the controller/node should probe all the PowerScale clusters during driver initialization - # Allowed values: - # true : do not probe all PowerScale clusters during driver initialization - # false: probe all PowerScale clusters during driver initialization - # Default value: false - - name: X_CSI_ISI_NO_PROBE_ON_START - value: "false" - - # X_CSI_ISI_AUTOPROBE: automatically probe the PowerScale cluster if not done already during CSI calls. - # Allowed values: - # true : enable auto probe. - # false: disable auto probe. - # Default value: false - - name: X_CSI_ISI_AUTOPROBE - value: "true" - - # X_CSI_ISI_SKIP_CERTIFICATE_VALIDATION: Specify whether the PowerScale OneFS API server's certificate chain and host name should be verified. - # Formerly this attribute was named as "X_CSI_ISI_INSECURE" - # This value acts as a default value for skipCertificateValidation, if not specified for a cluster config in secret - # Allowed values: - # true: skip OneFS API server's certificate verification - # false: verify OneFS API server's certificates - # Default value: true - - name: X_CSI_ISI_SKIP_CERTIFICATE_VALIDATION - value: "true" - - # X_CSI_CUSTOM_TOPOLOGY_ENABLED: Specify if custom topology label .dellemc.com/: - # has to be used for making connection to backend PowerScale Array. - # If X_CSI_CUSTOM_TOPOLOGY_ENABLED is set to true, then do not specify allowedTopologies in storage class. - # Allowed values: - # true : enable custom topology - # false: disable custom topology - # Default value: false - - name: X_CSI_CUSTOM_TOPOLOGY_ENABLED - value: "false" - - # Specify kubelet config dir path. - # Ensure that the config.yaml file is present at this path. - # Default value: None - - name: KUBELET_CONFIG_DIR - value: "/var/lib/kubelet" - - # certSecretCount: Represents number of certificate secrets, which user is going to create for - # ssl authentication. (isilon-cert-0..isilon-cert-n) - # Allowed values: n, where n > 0 - # Default value: None - - name: "CERT_SECRET_COUNT" - value: "$CERT_SECRET_COUNT" - - # CSI driver log level - # Allowed values: "error", "warn"/"warning", "info", "debug" - # Default value: "debug" - - name: "CSI_LOG_LEVEL" - value: "debug" - - controller: - envs: - # X_CSI_ISI_QUOTA_ENABLED: Indicates whether the provisioner should attempt to set (later unset) quota - # on a newly provisioned volume. - # This requires SmartQuotas to be enabled on PowerScale cluster. - # Allowed values: - # true: set quota for volume - # false: do not set quota for volume - - name: X_CSI_ISI_QUOTA_ENABLED - value: "true" - - # X_CSI_ISI_ACCESS_ZONE: The name of the access zone a volume can be created in. - # If storageclass is missing with AccessZone parameter, then value of X_CSI_ISI_ACCESS_ZONE is used for the same. - # Default value: System - # Examples: System, zone1 - - name: X_CSI_ISI_ACCESS_ZONE - value: "System" - - # X_CSI_ISI_VOLUME_PATH_PERMISSIONS: The permissions for isi volume directory path - # This value acts as a default value for isiVolumePathPermissions, if not specified for a cluster config in secret - # Allowed values: valid octal mode number - # Default value: "0777" - # Examples: "0777", "777", "0755" - - name: X_CSI_ISI_VOLUME_PATH_PERMISSIONS - value: "0777" - - # X_CSI_HEALTH_MONITOR_ENABLED: Enable/Disable health monitor of CSI volumes from Controller plugin- volume status, volume condition. - # Install the 'external-health-monitor' sidecar accordingly. - # Allowed values: - # true: enable checking of health condition of CSI volumes - # false: disable checking of health condition of CSI volumes - # Default value: false - - name: X_CSI_HEALTH_MONITOR_ENABLED - value: "$HEALTH_MONITOR_ENABLED" - - # X_CSI_ISI_IGNORE_UNRESOLVABLE_HOSTS: Ignore unresolvable hosts on the OneFS. - # When set to true, OneFS allows new host to add to existing export list though any of the existing hosts from the - # same exports are unresolvable/doesn't exist anymore. - # Allowed values: - # true: ignore existing unresolvable hosts and append new host to the existing export - # false: exhibits OneFS default behavior i.e. if any of existing hosts are unresolvable while adding new one it fails - # Default value: false - - name: X_CSI_ISI_IGNORE_UNRESOLVABLE_HOSTS - value: "false" - - # X_CSI_MAX_PATH_LIMIT: this parameter is used for setting the maximum Path length for the given volume. - # Default value: 192 - # Examples: 192, 256 - - name: X_CSI_MAX_PATH_LIMIT - value: "192" - - - nodeSelector: $CONTROLLER_POD_NODE_SELECTOR - - tolerations: $CONTROLLER_TOLERATIONS - - - node: - envs: - # X_CSI_MAX_VOLUMES_PER_NODE: Specify default value for maximum number of volumes that controller can publish to the node. - # If value is zero CO SHALL decide how many volumes of this type can be published by the controller to the node. - # This limit is applicable to all the nodes in the cluster for which node label 'max-isilon-volumes-per-node' is not set. - # Allowed values: n, where n >= 0 - # Default value: 0 - - name: X_CSI_MAX_VOLUMES_PER_NODE - value: "0" - - # X_CSI_ALLOWED_NETWORKS: Custom networks for PowerScale export - # Specify list of networks which can be used for NFS I/O traffic; CIDR format should be used. - # Allowed values: list of one or more networks - # Default value: None - # Provide them in the following format: "[net1, net2]" - # CIDR format should be used - # eg: "[192.168.1.0/24, 192.168.100.0/22]" - - name: X_CSI_ALLOWED_NETWORKS - value: "" - - # X_CSI_HEALTH_MONITOR_ENABLED: Enable/Disable health monitor of CSI volumes from Controller plugin- volume status, volume condition. - # Install the 'external-health-monitor' sidecar accordingly. - # Allowed values: - # true: enable checking of health condition of CSI volumes - # false: disable checking of health condition of CSI volumes - # Default value: false - - name: X_CSI_HEALTH_MONITOR_ENABLED - value: "$HEALTH_MONITOR_ENABLED" - - # X_CSI_MAX_PATH_LIMIT: this parameter is used for setting the maximum Path length for the given volume. - # Default value: 192 - # Examples: 192, 256 - - name: X_CSI_MAX_PATH_LIMIT - value: "192" - - nodeSelector: $NODE_POD_NODE_SELECTOR - - tolerations: $NODE_TOLERATIONS - # - key: "node.kubernetes.io/memory-pressure" - # operator: "Exists" - # effect: "NoExecute" - # - key: "node.kubernetes.io/disk-pressure" - # operator: "Exists" - # effect: "NoExecute" - # - key: "node.kubernetes.io/network-unavailable" - # operator: "Exists" - # effect: "NoExecute" - - sideCars: - - name: provisioner - args: ["--volume-name-prefix=csipscale"] - # health monitor is disabled by default, refer to driver documentation before enabling it - - name: external-health-monitor - enabled: false - args: ["--monitor-interval=60s"] - # Uncomment the following to configure how often external-provisioner polls the driver to detect changed capacity - # Configure when the storageCapacity is set as "true" - # Allowed values: 1m,2m,3m,...,10m,...,60m etc. Default value: 5m - #- name: provisioner - # args: ["--capacity-poll-interval=5m"] - - modules: - # Authorization: enable csm-authorization for RBAC - - name: authorization - # enable: Enable/Disable csm-authorization - enabled: $AUTHORIZATION_ENABLED - configVersion: v1.7.0 - components: - - name: karavi-authorization-proxy - image: dellemc/csm-authorization-sidecar:v1.7.0 - envs: - # proxyHost: hostname of the csm-authorization server - - name: "PROXY_HOST" - value: "$AUTHORIZATION_PROXY_HOST" - - # skipCertificateValidation: Enable/Disable certificate validation of the csm-authorization server - - name: "SKIP_CERTIFICATE_VALIDATION" - value: "$AUTHORIZATION_SKIP_CERTIFICATE_VALIDATION" - - # replication: allows to configure replication - # Replication CRDs must be installed before installing driver - - name: replication - enabled: $REPLICATION_ENABLED - configVersion: v1.5.0 - components: - - name: dell-csi-replicator - # image: Image to use for dell-csi-replicator. This shouldn't be changed - # Allowed values: string - # Default value: None - image: dellemc/dell-csi-replicator:v1.5.0 - envs: - # replicationPrefix: prefix to prepend to storage classes parameters - # Allowed values: string - # Default value: replication.storage.dell.com - - name: "X_CSI_REPLICATION_PREFIX" - value: "replication.storage.dell.com" - # replicationContextPrefix: prefix to use for naming of resources created by replication feature - # Allowed values: string - # Default value: powerstore - - name: "X_CSI_REPLICATION_CONTEXT_PREFIX" - value: "powerscale" - - - name: dell-replication-controller-manager - # image: Defines controller image. This shouldn't be changed - # Allowed values: string - image: dellemc/dell-replication-controller:v1.5.0 - envs: - # TARGET_CLUSTERS_IDS: comma separated list of cluster IDs of the targets clusters. DO NOT include the source(wherever CSM Operator is deployed) cluster ID - # Set the value to "self" in case of stretched/single cluster configuration - # Allowed values: string - - name: "TARGET_CLUSTERS_IDS" - value: "target-cluster-1" - # Replication log level - # Allowed values: "error", "warn"/"warning", "info", "debug" - # Default value: "debug" - - name: "REPLICATION_CTRL_LOG_LEVEL" - value: "debug" - - # replicas: Defines number of controller replicas - # Allowed values: int - # Default value: 1 - - name: "REPLICATION_CTRL_REPLICAS" - value: "1" - # retryIntervalMin: Initial retry interval of failed reconcile request. - # It doubles with each failure, upto retry-interval-max - # Allowed values: time - - name: "RETRY_INTERVAL_MIN" - value: "1s" - # RETRY_INTERVAL_MAX: Maximum retry interval of failed reconcile request - # Allowed values: time - - name: "RETRY_INTERVAL_MAX" - value: "5m" - - - name: dell-replication-controller-init - # image: Defines replication init container image. This shouldn't be changed - # Allowed values: string - image: dellemc/dell-replication-init:v1.0.1 - - # observability: allows to configure observability - - name: observability - # enabled: Enable/Disable observability - enabled: $OBSERVABILITY_ENABLED - configVersion: v1.5.0 - components: - - name: topology - # enabled: Enable/Disable topology - enabled: false - image: dellemc/csm-topology:v1.5.0 - envs: - - name: "TOPOLOGY_LOG_LEVEL" - value: "INFO" - - - name: otel-collector - # enabled: Enable/Disable OpenTelemetry Collector - enabled: false - # image: Defines otel-collector image. This shouldn't be changed - # Allowed values: string - image: otel/opentelemetry-collector:0.42.0 - envs: - # image of nginx proxy image - # Allowed values: string - # Default value: "nginxinc/nginx-unprivileged:1.20" - - name: "NGINX_PROXY_IMAGE" - value: "nginxinc/nginx-unprivileged:1.20" - - - name: metrics-powerscale - enabled: $POWERSTORE_OBSERVABILITY_METRICS_ENABLED - image: dellemc/csm-metrics-powerscale:v1.2.0 - envs: - # POWERSCALE_MAX_CONCURRENT_QUERIES: set the default max concurrent queries to PowerScale - # Allowed values: int - # Default value: 10 - - name: "POWERSCALE_MAX_CONCURRENT_QUERIES" - value: "10" - # POWERSCALE_CAPACITY_METRICS_ENABLED: enable/disable collection of capacity metrics - # Allowed values: ture, false - # Default value: true - - name: "POWERSCALE_CAPACITY_METRICS_ENABLED" - value: "true" - # POWERSCALE_PERFORMANCE_METRICS_ENABLED: enable/disable collection of performance metrics - # Allowed values: ture, false - # Default value: true - - name: "POWERSCALE_PERFORMANCE_METRICS_ENABLED" - value: "true" - # POWERSCALE_CLUSTER_CAPACITY_POLL_FREQUENCY: set polling frequency to get cluster capacity metrics data - # Allowed values: int - # Default value: 30 - - name: "POWERSCALE_CLUSTER_CAPACITY_POLL_FREQUENCY" - value: "30" - # POWERSCALE_CLUSTER_PERFORMANCE_POLL_FREQUENCY: set polling frequency to get cluster performance metrics data - # Allowed values: int - # Default value: 20 - - name: "POWERSCALE_CLUSTER_PERFORMANCE_POLL_FREQUENCY" - value: "20" - # POWERSCALE_QUOTA_CAPACITY_POLL_FREQUENCY: set polling frequency to get Quota capacity metrics data - # Allowed values: int - # Default value: 20 - - name: "POWERSCALE_QUOTA_CAPACITY_POLL_FREQUENCY" - value: "30" - # ISICLIENT_INSECURE: set true/false to skip/verify OneFS API server's certificates - # Allowed values: ture, false - # Default value: true - - name: "ISICLIENT_INSECURE" - value: "true" - # ISICLIENT_AUTH_TYPE: set 0/1 to enables session-based/basic Authentication - # Allowed values: ture, false - # Default value: true - - name: "ISICLIENT_AUTH_TYPE" - value: "1" - # ISICLIENT_VERBOSE: set 0/1/2 decide High/Medium/Low content of the OneFS REST API message should be logged in debug level logs - # Allowed values: 0,1,2 - # Default value: 0 - - name: "ISICLIENT_VERBOSE" - value: "0" - # PowerScale metrics log level - # Valid values: TRACE, DEBUG, INFO, WARN, ERROR, FATAL, PANIC - # Default value: "INFO" - - name: "POWERSCALE_LOG_LEVEL" - value: "INFO" - # PowerScale Metrics Output logs in the specified format - # Valid values: TEXT, JSON - # Default value: "TEXT" - - name: "POWERSCALE_LOG_FORMAT" - value: "TEXT" - # Otel collector address - # Allowed values: String - # Default value: "otel-collector:55680" - - name: "COLLECTOR_ADDRESS" - value: "otel-collector:55680" - - name: resiliency - enabled: $RESILIENCY_ENABLED - configVersion: v1.6.0 - components: - - name: podmon-controller - args: - - "--labelvalue=csi-isilon" - - "--arrayConnectivityPollRate=60" - - "--skipArrayConnectionValidation=false" - - "--driverPodLabelValue=dell-storage" - - "--ignoreVolumelessPods=false" - - name: podmon-node - envs: - # podmonAPIPort: Defines the port to be used within the kubernetes cluster - # Allowed values: Any valid and free port (string) - # Default value: 8083 - - name: "X_CSI_PODMON_API_PORT" - value: "8083" - args: - - "--labelvalue=csi-isilon" - - "--arrayConnectivityPollRate=60" - - "--leaderelection=false" - - "--driverPodLabelValue=dell-storage" - - "--ignoreVolumelessPods=false" - \ No newline at end of file From c5c2d806e5016c7bbe19011265db23c4fb376886 Mon Sep 17 00:00:00 2001 From: Rajitha Date: Wed, 12 Jul 2023 18:00:00 +0530 Subject: [PATCH 04/10] addressed the comment --- .../src/static/js/tests/generate-yaml.test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 d2e28d2dfc..9e3b193b48 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 @@ -43,7 +43,7 @@ const CONSTANTS = { HELM: "helm", OPERATOR: "operator", CSM_HELM_V170: "1.0.0", - CSM_HELM_V180: "1.1.0", + CSM_HELM_V180: "1.1.0", HELM_TAINTS: ` - key: "$KEY" operator: "Exists" From 6ca46199615ec60c04c297e5052ae78d051edb2f Mon Sep 17 00:00:00 2001 From: Rajitha Date: Fri, 14 Jul 2023 16:51:56 +0530 Subject: [PATCH 05/10] added resiliency components --- .../csm-versions/default-values.properties | 3 + .../csminstallationwizard/src/index.html | 57 ++++++++++++++ .../src/static/js/generate-yaml.js | 12 +++ .../src/static/js/tests/generate-yaml.test.js | 28 +++++++ .../src/static/js/tests/ui-functions.test.js | 78 ++++++++++++++++++- .../src/static/js/tests/utility.test.js | 11 ++- .../src/static/js/ui-functions.js | 29 ++++++- .../src/static/js/utility.js | 3 + .../operator/csm-powerstore-1.7.0.template | 30 +++---- 9 files changed, 233 insertions(+), 18 deletions(-) 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 64f447ed52..02ffa6a378 100644 --- a/content/docs/deployment/csminstallationwizard/src/csm-versions/default-values.properties +++ b/content/docs/deployment/csminstallationwizard/src/csm-versions/default-values.properties @@ -6,3 +6,6 @@ taint=node-role.kubernetes.io/control-plane volNamePrefix=csivol snapNamePrefix=csi-snap certSecretCount=1 +labelValue=csi-powerstore +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 8b6511c4e4..41c9f60236 100644 --- a/content/docs/deployment/csminstallationwizard/src/index.html +++ b/content/docs/deployment/csminstallationwizard/src/index.html @@ -129,6 +129,63 @@
+
+
+ + +
+
+
+ +
+
+ +
+ +
+
+ +
+
+ +
+ +
+
+
+ + +
+
+
+ +
+
+ +
+ +
+
+
+ + +
+
+
+
+
Select the features for installation
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 96f1942b3b..186e03e5e2 100644 --- a/content/docs/deployment/csminstallationwizard/src/static/js/generate-yaml.js +++ b/content/docs/deployment/csminstallationwizard/src/static/js/generate-yaml.js @@ -49,6 +49,11 @@ function setValues(csmMapValues, CONSTANTS_PARAM) { DriverValues.fsGroupPolicy = document.getElementById("fsGroup-Policy").value; DriverValues.driverNamespace = document.getElementById("driver-namespace").value; DriverValues.installationType = document.getElementById("installation-type").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 || '""'; @@ -83,6 +88,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 || '""'; @@ -126,6 +132,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 9e3b193b48..95663529dd 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 @@ -92,6 +92,11 @@ describe("GIVEN setValues function", () => { + + + + + `; @@ -136,6 +141,12 @@ describe("GIVEN setValues function", () => { storageArrayId: undefined, storageArrayEndpointUrl: '""', storageArrayBackupEndpointUrl: '""', + operatorResiliency: false, + labelValue: 'csi-powerstore', + pollRate: '60', + driverPodLabel: 'dell-storage', + connectionValidation: false, + volumelessPods: false, clusterPrefix: undefined, portGroups: undefined, vSphereEnabled: false, @@ -146,6 +157,7 @@ describe("GIVEN setValues function", () => { }; const received = setValues(testCSMMap, CONSTANTS); + console.log("***received***", received) expect(expected).toEqual(received); }); @@ -171,6 +183,11 @@ describe("GIVEN setValues function", () => { + + + + + `; const expected = { @@ -213,6 +230,12 @@ describe("GIVEN setValues function", () => { storageArrayId: undefined, storageArrayEndpointUrl: '""', storageArrayBackupEndpointUrl: '""', + operatorResiliency: false, + labelValue: 'csi-powerstore', + pollRate: '60', + driverPodLabel: 'dell-storage', + connectionValidation: false, + volumelessPods: false, clusterPrefix: undefined, portGroups: undefined, vSphereEnabled: false, @@ -248,6 +271,11 @@ describe("GIVEN setValues function", () => { + + + + + `; const expected = { 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 9132f6f7c5..fd680b52b6 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,6 +19,7 @@ const { onAuthorizationChange, onObservabilityChange, onResiliencyChange, + onOperatorResiliencyChange, onSnapshotChange, onVSphereChange, onNodeSelectorChange, @@ -27,6 +28,9 @@ const { resetControllerCount, resetVolNamePrefix, resetSnapNamePrefix, + resetDriverPodLabel, + resetArrayPollRate, + resetLabelValue, resetNodeSelectorLabel, resetDriverNamespace, resetTaint, @@ -134,6 +138,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 = ` + +
- +
@@ -148,7 +148,7 @@
- +
@@ -162,7 +162,7 @@
- +
@@ -180,7 +180,7 @@
- +
@@ -272,7 +272,7 @@
- +
@@ -494,7 +494,7 @@
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 fd680b52b6..63d187ee56 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 @@ -422,7 +422,7 @@ describe("GIVEN resetDriverNamespace function", () => { `; - resetDriverNamespace("csi-powerstore"); + resetDriverNamespace("csi-powerstore", CONSTANTS); expect(document.getElementById("driver-namespace").value).toEqual("csi-powerstore"); }); diff --git a/content/docs/deployment/csminstallationwizard/src/static/js/ui-functions.js b/content/docs/deployment/csminstallationwizard/src/static/js/ui-functions.js index cd5679445b..df5f38f76a 100644 --- a/content/docs/deployment/csminstallationwizard/src/static/js/ui-functions.js +++ b/content/docs/deployment/csminstallationwizard/src/static/js/ui-functions.js @@ -160,8 +160,12 @@ const resetNodeSelectorLabel = csmMapValue => { document.getElementById("node-selector-label").value = String(csmMapValue.get("nodeSelectorLabel")); } -const resetDriverNamespace = driverValue => { - document.getElementById("driver-namespace").value = driverValue; +const resetDriverNamespace = (driverValue, CONSTANTS_PARAM) => { + if (driverValue === CONSTANTS_PARAM.POWERSTORE) { + document.getElementById("driver-namespace").value = CONSTANTS_PARAM.POWERSTORE_NAMESPACE; + } else { + document.getElementById("driver-namespace").value = driverValue; + } } const resetArrayPollRate = csmMapValue => { diff --git a/content/docs/deployment/csminstallationwizard/src/templates/operator/csm-powerstore-1.7.0.template b/content/docs/deployment/csminstallationwizard/src/templates/operator/csm-powerstore-1.7.0.template index a06bf3042c..1a90bdad1b 100644 --- a/content/docs/deployment/csminstallationwizard/src/templates/operator/csm-powerstore-1.7.0.template +++ b/content/docs/deployment/csminstallationwizard/src/templates/operator/csm-powerstore-1.7.0.template @@ -25,7 +25,7 @@ spec: # fsGroupPolicy: Defines if the underlying volume supports changing ownership and permission of the volume before being mounted. # Allowed values: ReadWriteOnceWithFSType, File , None # Default value: ReadWriteOnceWithFSType - fSGroupPolicy: $FSGROUP_POLICY + fSGroupPolicy: "$FSGROUP_POLICY" # storageCapacity: Helps the scheduler to schedule the pod on a node satisfying the topology constraints, only if the requested capacity is available on the storage array # Allowed values: # true: enable storage capacity tracking @@ -94,7 +94,7 @@ spec: # false: disable checking of health condition of CSI volumes # Default value: false - name: X_CSI_HEALTH_MONITOR_ENABLED - value: $HEALTH_MONITOR_ENABLED + value: "$HEALTH_MONITOR_ENABLED" # X_CSI_POWERSTORE_EXTERNAL_ACCESS: Allows to specify additional entries for hostAccess of NFS volumes. Both single IP address and subnet are valid entries. # Allowed Values: x.x.x.x/xx or x.x.x.x # Default Value: @@ -131,7 +131,7 @@ spec: # false: disable checking of health condition of CSI volumes # Default value: false - name: X_CSI_HEALTH_MONITOR_ENABLED - value: $HEALTH_MONITOR_ENABLED + value: "$HEALTH_MONITOR_ENABLED" # nodeSelector: Define node selection constraints for node pods. # For the pod to be eligible to run on a node, the node must have each diff --git a/content/docs/deployment/csminstallationwizard/src/templates/operator/csm-powerstore-1.8.0.template b/content/docs/deployment/csminstallationwizard/src/templates/operator/csm-powerstore-1.8.0.template new file mode 100644 index 0000000000..1a90bdad1b --- /dev/null +++ b/content/docs/deployment/csminstallationwizard/src/templates/operator/csm-powerstore-1.8.0.template @@ -0,0 +1,194 @@ +# +# +# Copyright © 2023 Dell Inc. or its subsidiaries. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# +apiVersion: storage.dell.com/v1 +kind: ContainerStorageModule +metadata: + name: powerstore + namespace: $NAMESPACE +spec: + driver: + csiDriverType: "powerstore" + csiDriverSpec: + # fsGroupPolicy: Defines if the underlying volume supports changing ownership and permission of the volume before being mounted. + # Allowed values: ReadWriteOnceWithFSType, File , None + # Default value: ReadWriteOnceWithFSType + fSGroupPolicy: "$FSGROUP_POLICY" + # storageCapacity: Helps the scheduler to schedule the pod on a node satisfying the topology constraints, only if the requested capacity is available on the storage array + # Allowed values: + # true: enable storage capacity tracking + # false: disable storage capacity tracking + storageCapacity: $STORAGE_CAPACITY_ENABLED + # Config version for CSI PowerStore v2.7.0 driver + configVersion: v2.7.0 + # authSecret: This is the secret used to validate the default PowerStore secret used for installation + # Allowed values: -config + # For example: If the metadataName is set to powerstore, authSecret value should be set to powerstore-config + authSecret: powerstore-config + # Controller count + replicas: $CONTROLLER_COUNT + dnsPolicy: ClusterFirstWithHostNet + forceUpdate: false + forceRemoveDriver: true + common: + # Image for CSI PowerStore driver v2.7.0 + image: "dellemc/csi-powerstore:v2.7.0" + imagePullPolicy: IfNotPresent + envs: + - name: X_CSI_POWERSTORE_NODE_NAME_PREFIX + value: "csi-node" + - name: X_CSI_FC_PORTS_FILTER_FILE_PATH + value: "/etc/fc-ports-filter" + - name: KUBELET_CONFIG_DIR + value: /var/lib/kubelet + - name: CSI_LOG_LEVEL + value: debug + + sideCars: + # health monitor is disabled by default, refer to driver documentation before enabling it + - name: external-health-monitor + enabled: $HEALTH_MONITOR_ENABLED + args: ["--monitor-interval=60s"] + + # Uncomment the following to configure how often external-provisioner polls the driver to detect changed capacity + # Configure only when the storageCapacity is set as "true" + # Allowed values: 1m,2m,3m,...,10m,...,60m etc. Default value: 5m + #- name: provisioner + # args: ["--capacity-poll-interval=5m"] + + controller: + envs: + # X_CSI_NFS_ACLS: enables setting permissions on NFS mount directory + # This value will be the default value if a storage class and array config in secret + # do not contain the NFS ACL (nfsAcls) parameter specified + # Permissions can be specified in two formats: + # 1) Unix mode (NFSv3) + # 2) NFSv4 ACLs (NFSv4) + # NFSv4 ACLs are supported on NFSv4 share only. + # Allowed values: + # 1) Unix mode: valid octal mode number + # Examples: "0777", "777", "0755" + # 2) NFSv4 acls: valid NFSv4 acls, seperated by comma + # Examples: "A::OWNER@:RWX,A::GROUP@:RWX", "A::OWNER@:rxtncy" + # Optional: true + # Default value: "0777" + # nfsAcls: "0777" + - name: X_CSI_NFS_ACLS + value: "0777" + # X_CSI_HEALTH_MONITOR_ENABLED: Enable/Disable health monitor of CSI volumes from Controller plugin - volume condition. + # Install the 'external-health-monitor' sidecar accordingly. + # Allowed values: + # true: enable checking of health condition of CSI volumes + # false: disable checking of health condition of CSI volumes + # Default value: false + - name: X_CSI_HEALTH_MONITOR_ENABLED + value: "$HEALTH_MONITOR_ENABLED" + # X_CSI_POWERSTORE_EXTERNAL_ACCESS: Allows to specify additional entries for hostAccess of NFS volumes. Both single IP address and subnet are valid entries. + # Allowed Values: x.x.x.x/xx or x.x.x.x + # Default Value: + - name: X_CSI_POWERSTORE_EXTERNAL_ACCESS + value: + + # nodeSelector: Define node selection constraints for controller pods. + # For the pod to be eligible to run on a node, the node must have each + # of the indicated key-value pairs as labels. + # Leave as blank to consider all nodes + # Allowed values: map of key-value pairs + # Default value: None + nodeSelector:$NODE_POD_NODE_SELECTOR + # Uncomment if nodes you wish to use have the node-role.kubernetes.io/control-plane taint + # node-role.kubernetes.io/control-plane: "" + + # tolerations: Define tolerations for the controllers, if required. + # Leave as blank to install controller on worker nodes + # Default value: None + tolerations:$NODE_TOLERATIONS + # Uncomment if nodes you wish to use have the node-role.kubernetes.io/control-plane taint + # - key: "node-role.kubernetes.io/control-plane" + # operator: "Exists" + # effect: "NoSchedule" + node: + envs: + # Set to "true" to enable ISCSI CHAP Authentication + # CHAP password will be autogenerated by driver + - name: "X_CSI_POWERSTORE_ENABLE_CHAP" + value: "false" + # X_CSI_HEALTH_MONITOR_ENABLED: Enable/Disable health monitor of CSI volumes from node plugin - volume usage + # Allowed values: + # true: enable checking of health condition of CSI volumes + # false: disable checking of health condition of CSI volumes + # Default value: false + - name: X_CSI_HEALTH_MONITOR_ENABLED + value: "$HEALTH_MONITOR_ENABLED" + + # nodeSelector: Define node selection constraints for node pods. + # For the pod to be eligible to run on a node, the node must have each + # of the indicated key-value pairs as labels. + # Leave as blank to consider all nodes + # Allowed values: map of key-value pairs + # Default value: None + nodeSelector:$NODE_POD_NODE_SELECTOR + # Uncomment if nodes you wish to use have the node-role.kubernetes.io/control-plane taint + # node-role.kubernetes.io/control-plane: "" + + # tolerations: Define tolerations for the controllers, if required. + # Leave as blank to install controller on worker nodes + # Default value: None + tolerations:$NODE_TOLERATIONS + # Uncomment if nodes you wish to use have the node-role.kubernetes.io/control-plane taint + # - key: "node-role.kubernetes.io/control-plane" + # operator: "Exists" + # effect: "NoSchedule" + + modules: + - name: resiliency + # enabled: Enable/Disable Resiliency feature + # Allowed values: + # true: enable Resiliency feature(deploy podmon sidecar) + # false: disable Resiliency feature(do not deploy podmon sidecar) + # Default value: false + enabled: $OPERATOR_RESILIENCY_ENABLED + configVersion: v1.6.0 + components: + - name: podmon-controller + args: + - "--labelvalue=$LABEL_VALUE" + - "--arrayConnectivityPollRate=$POLL_RATE" + - "--skipArrayConnectionValidation=$SKIP_ARRAY_CONNECTION_VALIDATION" + - "--driverPodLabelValue=$DRIVER_POD_LABEL_VALUE" + - "--ignoreVolumelessPods=$IGNORE_VOLUMELESS_PODS" + # Below 4 args should not be modified. + - "--csisock=unix:/var/run/csi/csi.sock" + - "--mode=controller" + - "--driver-config-params=/powerstore-config-params/driver-config-params.yaml" + - "--driverPath=csi-powerstore.dellemc.com" + - name: podmon-node + envs: + # podmonAPIPort: Defines the port to be used within the kubernetes cluster + # Allowed values: Any valid and free port (string) + # Default value: 8083 + - name: "X_CSI_PODMON_API_PORT" + value: "8083" + args: + - "--labelvalue=$LABEL_VALUE" + - "--arrayConnectivityPollRate=$POLL_RATE" + - "--leaderelection=$SKIP_ARRAY_CONNECTION_VALIDATION" + - "--driverPodLabelValue=$DRIVER_POD_LABEL_VALUE" + - "--ignoreVolumelessPods=$IGNORE_VOLUMELESS_PODS" + # Below 4 args should not be modified. + - "--csisock=unix:/var/lib/kubelet/plugins/csi-powerstore.dellemc.com/csi_sock" + - "--mode=node" + - "--driver-config-params=/powerstore-config-params/driver-config-params.yaml" + - "--driverPath=csi-powerstore.dellemc.com" \ No newline at end of file From 96ecc648707e771f3cfccd60c92d7a6cf6581eca Mon Sep 17 00:00:00 2001 From: Rajitha Date: Mon, 17 Jul 2023 14:07:54 +0530 Subject: [PATCH 08/10] Updated template --- .../src/templates/operator/csm-powerstore-1.8.0.template | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/content/docs/deployment/csminstallationwizard/src/templates/operator/csm-powerstore-1.8.0.template b/content/docs/deployment/csminstallationwizard/src/templates/operator/csm-powerstore-1.8.0.template index 1a90bdad1b..8b5c19d764 100644 --- a/content/docs/deployment/csminstallationwizard/src/templates/operator/csm-powerstore-1.8.0.template +++ b/content/docs/deployment/csminstallationwizard/src/templates/operator/csm-powerstore-1.8.0.template @@ -31,8 +31,8 @@ spec: # true: enable storage capacity tracking # false: disable storage capacity tracking storageCapacity: $STORAGE_CAPACITY_ENABLED - # Config version for CSI PowerStore v2.7.0 driver - configVersion: v2.7.0 + # Config version for CSI PowerStore v2.8.0 driver + configVersion: v2.8.0 # authSecret: This is the secret used to validate the default PowerStore secret used for installation # Allowed values: -config # For example: If the metadataName is set to powerstore, authSecret value should be set to powerstore-config @@ -43,8 +43,8 @@ spec: forceUpdate: false forceRemoveDriver: true common: - # Image for CSI PowerStore driver v2.7.0 - image: "dellemc/csi-powerstore:v2.7.0" + # Image for CSI PowerStore driver v2.8.0 + image: "dellemc/csi-powerstore:v2.8.0" imagePullPolicy: IfNotPresent envs: - name: X_CSI_POWERSTORE_NODE_NAME_PREFIX From 101e85282bbd8d43191dc35123141a3a19d513c5 Mon Sep 17 00:00:00 2001 From: Rajitha Date: Mon, 17 Jul 2023 17:15:22 +0530 Subject: [PATCH 09/10] Updated label value for resiliency --- .../src/csm-versions/default-values.properties | 1 - .../csminstallationwizard/src/index.html | 4 ++-- .../src/static/js/constants.js | 1 + .../src/static/js/tests/generate-yaml.test.js | 10 +++++----- .../src/static/js/tests/ui-functions.test.js | 12 +++++------- .../src/static/js/tests/utility.test.js | 3 --- .../src/static/js/ui-functions.js | 17 ++++++++--------- .../src/static/js/utility.js | 1 - 8 files changed, 21 insertions(+), 28 deletions(-) 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 02ffa6a378..1f4bf4ac7b 100644 --- a/content/docs/deployment/csminstallationwizard/src/csm-versions/default-values.properties +++ b/content/docs/deployment/csminstallationwizard/src/csm-versions/default-values.properties @@ -6,6 +6,5 @@ taint=node-role.kubernetes.io/control-plane volNamePrefix=csivol snapNamePrefix=csi-snap certSecretCount=1 -labelValue=csi-powerstore 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 b4e653d7e2..53780f0b2e 100644 --- a/content/docs/deployment/csminstallationwizard/src/index.html +++ b/content/docs/deployment/csminstallationwizard/src/index.html @@ -139,11 +139,11 @@
- +
diff --git a/content/docs/deployment/csminstallationwizard/src/static/js/constants.js b/content/docs/deployment/csminstallationwizard/src/static/js/constants.js index 884aac4f7c..3a59b1020a 100644 --- a/content/docs/deployment/csminstallationwizard/src/static/js/constants.js +++ b/content/docs/deployment/csminstallationwizard/src/static/js/constants.js @@ -26,6 +26,7 @@ const CONSTANTS = { POWERMAX_NAMESPACE: "powermax", POWERSCALE_NAMESPACE: "isilon", UNITY_NAMESPACE: "unity", + POWERSTORE_LABEL_VALUE: "csi-powerstore", VALUES: "values", TEMP_DIR: "templates", TEMP_EXT: ".template", 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 c538c796b5..ddff89c117 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 @@ -92,7 +92,7 @@ describe("GIVEN setValues function", () => { - + @@ -142,7 +142,7 @@ describe("GIVEN setValues function", () => { storageArrayEndpointUrl: '""', storageArrayBackupEndpointUrl: '""', operatorResiliency: false, - labelValue: 'csi-powerstore', + labelValue: "", pollRate: '60', driverPodLabel: 'dell-storage', connectionValidation: false, @@ -182,7 +182,7 @@ describe("GIVEN setValues function", () => { - + @@ -230,7 +230,7 @@ describe("GIVEN setValues function", () => { storageArrayEndpointUrl: '""', storageArrayBackupEndpointUrl: '""', operatorResiliency: false, - labelValue: 'csi-powerstore', + labelValue: "", pollRate: '60', driverPodLabel: 'dell-storage', connectionValidation: false, @@ -270,7 +270,7 @@ describe("GIVEN setValues function", () => { - + 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 63d187ee56..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 @@ -51,6 +51,7 @@ const CONSTANTS = { POWERMAX_NAMESPACE: "powermax", POWERSCALE_NAMESPACE: "isilon", UNITY_NAMESPACE: "unity", + POWERSTORE_LABEL_VALUE: "csi-powerstore", VALUES: "values", TEMP_DIR: "templates", TEMP_EXT: ".template", @@ -369,16 +370,12 @@ describe("GIVEN resetArrayPollRate function", () => { }); describe("GIVEN resetLabelValue function", () => { - const testCSMMap = new Map([ - ["labelValue", "csi-powerstore"] - ]); - test("SHOULD invoke resetLabelValue function", () => { document.body.innerHTML = ` `; - resetLabelValue(testCSMMap); + resetLabelValue("csi-powerstore", CONSTANTS); expect(document.getElementById("label-value").value).toEqual("csi-powerstore"); }); @@ -470,9 +467,10 @@ describe("GIVEN displayModules function", () => {
+ `; - test("SHOULD show expected components for csi-powerstore", () => { + test("SHOULD show expected components for helm csi-powerstore", () => { document.body.innerHTML = testHtml; displayModules("helm", "powerstore", CONSTANTS); @@ -484,7 +482,7 @@ describe("GIVEN displayModules function", () => { expect($(".storage-capacity").css("display")).toEqual("block"); }); - test("SHOULD show expected components for csi-powerstore", () => { + test("SHOULD show expected components for operator csi-powerstore", () => { document.body.innerHTML = testHtml; displayModules("operator", "powerstore", CONSTANTS); diff --git a/content/docs/deployment/csminstallationwizard/src/static/js/tests/utility.test.js b/content/docs/deployment/csminstallationwizard/src/static/js/tests/utility.test.js index 133147876e..8e5d734d1a 100644 --- a/content/docs/deployment/csminstallationwizard/src/static/js/tests/utility.test.js +++ b/content/docs/deployment/csminstallationwizard/src/static/js/tests/utility.test.js @@ -273,7 +273,6 @@ describe("GIVEN setDefaultValues function", () => { - `; @@ -286,7 +285,6 @@ describe("GIVEN setDefaultValues function", () => { ["snapNamePrefix", "csi-snap"], ["certSecretCount", "1"], ["taint", "node-role.kubernetes.io/control-plane"], - ["labelValue", "csi-powerstore"], ["pollRate", "60"], ["driverPodLabel", "dell-storage"] ]); @@ -300,7 +298,6 @@ describe("GIVEN setDefaultValues function", () => { expect(document.getElementById("snapshot-prefix").value).toEqual("csi-snap"); expect(document.getElementById("cert-secret-count").value).toEqual("1"); expect(document.getElementById("taint").value).toEqual("node-role.kubernetes.io/control-plane"); - expect(document.getElementById("label-value").value).toEqual("csi-powerstore"); expect(document.getElementById("poll-rate").value).toEqual("60"); expect(document.getElementById("driver-pod-label").value).toEqual("dell-storage"); diff --git a/content/docs/deployment/csminstallationwizard/src/static/js/ui-functions.js b/content/docs/deployment/csminstallationwizard/src/static/js/ui-functions.js index df5f38f76a..9dbbbd98ef 100644 --- a/content/docs/deployment/csminstallationwizard/src/static/js/ui-functions.js +++ b/content/docs/deployment/csminstallationwizard/src/static/js/ui-functions.js @@ -80,13 +80,7 @@ function onResiliencyChange(podmonNoteValue) { } } -function onOperatorResiliencyChange() { - if ($("#operator-resiliency").prop('checked') === true) { - $('div#podmon-wrapper').show(); - } else { - $('div#podmon-wrapper').hide(); - } -} +const onOperatorResiliencyChange = () => $("#operator-resiliency").prop('checked') === true ? $('div#podmon-wrapper').show() : $('div#podmon-wrapper').hide(); function onSnapshotChange(snapshotNoteValue, driverName, CONSTANTS_PARAM) { if ($("#snapshot").prop('checked') === true) { @@ -172,8 +166,12 @@ const resetArrayPollRate = csmMapValue => { document.getElementById("poll-rate").value = String(csmMapValue.get("pollRate")); } -const resetLabelValue = csmMapValue => { - document.getElementById("label-value").value = String(csmMapValue.get("labelValue")); +const resetLabelValue = (driverValue, CONSTANTS_PARAM) => { + if (driverValue === CONSTANTS_PARAM.POWERSTORE) { + document.getElementById("label-value").value = CONSTANTS_PARAM.POWERSTORE_LABEL_VALUE; + } else { + document.getElementById("label-value").value = driverValue; + } } const resetDriverPodLabel = csmMapValue => { @@ -236,6 +234,7 @@ function displayModules(installationType, driverName, CONSTANTS_PARAM) { $(".snapshot-feature").hide(); $(".vol-name-prefix").hide(); $(".fsGroupPolicy").show(); + document.getElementById("label-value").value = CONSTANTS_PARAM.POWERSTORE_LABEL_VALUE; } break; case CONSTANTS_PARAM.POWERSCALE: diff --git a/content/docs/deployment/csminstallationwizard/src/static/js/utility.js b/content/docs/deployment/csminstallationwizard/src/static/js/utility.js index 6b46b54dd9..8de9b593dc 100644 --- a/content/docs/deployment/csminstallationwizard/src/static/js/utility.js +++ b/content/docs/deployment/csminstallationwizard/src/static/js/utility.js @@ -102,7 +102,6 @@ function setDefaultValues(defaultValuesParam, csmMapValues) { document.getElementById("snapshot-prefix").value = csmMapValues.get("snapNamePrefix"); document.getElementById("cert-secret-count").value = csmMapValues.get("certSecretCount"); document.getElementById("taint").value = csmMapValues.get("taint"); - document.getElementById("label-value").value = csmMapValues.get("labelValue"); document.getElementById("poll-rate").value = csmMapValues.get("pollRate"); document.getElementById("driver-pod-label").value = csmMapValues.get("driverPodLabel"); From c14c15fba16b2456b86c59112beeff46b71d22ab Mon Sep 17 00:00:00 2001 From: Rajitha Date: Mon, 17 Jul 2023 17:49:13 +0530 Subject: [PATCH 10/10] Updated as per review comments --- .../csminstallationwizard/src/static/js/generate-yaml.js | 4 +--- .../src/static/js/tests/generate-yaml.test.js | 3 --- 2 files changed, 1 insertion(+), 6 deletions(-) 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 186e03e5e2..1f047cb092 100644 --- a/content/docs/deployment/csminstallationwizard/src/static/js/generate-yaml.js +++ b/content/docs/deployment/csminstallationwizard/src/static/js/generate-yaml.js @@ -48,7 +48,6 @@ function setValues(csmMapValues, CONSTANTS_PARAM) { DriverValues.snapNamePrefix = document.getElementById("snapshot-prefix").value; DriverValues.fsGroupPolicy = document.getElementById("fsGroup-Policy").value; DriverValues.driverNamespace = document.getElementById("driver-namespace").value; - DriverValues.installationType = document.getElementById("installation-type").value; DriverValues.labelValue = document.getElementById("label-value").value; DriverValues.pollRate = document.getElementById("poll-rate").value; DriverValues.driverPodLabel = document.getElementById("driver-pod-label").value; @@ -61,7 +60,7 @@ function setValues(csmMapValues, CONSTANTS_PARAM) { var labels = DriverValues.nodeSelectorLabel.split(":"); var nodeSelector var taints - if (DriverValues.installationType === CONSTANTS_PARAM.OPERATOR) { + 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 { @@ -118,7 +117,6 @@ function createYamlString(yamlTpl, yamlTplValues, driverParam, CONSTANTS_PARAM) yamlTpl = yamlTpl.replaceAll("$SNAP_NAME_PREFIX", yamlTplValues.snapNamePrefix); yamlTpl = yamlTpl.replaceAll("$FSGROUP_POLICY", yamlTplValues.fsGroupPolicy); yamlTpl = yamlTpl.replaceAll("$NAMESPACE", yamlTplValues.driverNamespace); - yamlTpl = yamlTpl.replaceAll("$INSTALLATIONTYPE", yamlTplValues.installationType); 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); 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 ddff89c117..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 @@ -112,7 +112,6 @@ describe("GIVEN setValues function", () => { snapNamePrefix: 'csi-snap', fsGroupPolicy: 'ReadWriteOnceWithFSType', driverNamespace: '', - installationType: 'helm', controllerPodsNodeSelector: '\n node-role.kubernetes.io/control-plane: ""', nodePodsNodeSelector: '\n node-role.kubernetes.io/control-plane: ""', nodeSelectorLabel: 'node-role.kubernetes.io/control-plane:', @@ -200,7 +199,6 @@ describe("GIVEN setValues function", () => { snapNamePrefix: 'csi-snap', fsGroupPolicy: 'ReadWriteOnceWithFSType', driverNamespace: '', - installationType: 'operator', controllerPodsNodeSelector: '\n node-role.kubernetes.io/control-plane: ""', nodePodsNodeSelector: '\n node-role.kubernetes.io/control-plane: ""', nodeSelectorLabel: 'node-role.kubernetes.io/control-plane:', @@ -278,7 +276,6 @@ describe("GIVEN setValues function", () => { `; const expected = { - installationType: "operator", csmVersion: "1.6.0", driverVersion: "v2.6.0", imageRepository: "dellemc",