Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding PowerFlex in installation wizard ui #562

Merged
merged 6 commits into from
Apr 10, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions content/docs/deployment/csminstallationwizard/src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
<option value="csi-powerstore">PowerStore</option>
<option value="powermax">PowerMax</option>
<option value="csi-powerscale" disabled>PowerScale</option>
<option value="csi-powerflex" disabled>PowerFlex</option>
<option value="csi-powerflex">PowerFlex</option>
<option value="csi-unity" disabled>Unity</option>
</select>
</div>
Expand Down Expand Up @@ -331,6 +331,22 @@
</div>
</div>

<div class="row mb-4 monitor">
<div class="col-sm-12">
<input class="form-check-input" type="checkbox" id="monitor" value="">
<label for="monitor" class="form-check-label ms-2 text-dark" data-bs-toggle="tooltip" data-bs-placement="right" title="Allows the configuration of the SDC monitoring pod.">Allow Monitoring Pod</label>
</div>
</div>

<div class="row mb-4 cert-secret-count-wrapper">
<label for="cert-secret-count" class="col-sm-2 col-form-label" data-bs-toggle="tooltip" data-bs-placement="right" title="Represents the number of certificate secrets, which the user is going to create for SSL authentication." style="width: 180px;">CERT Secret Count</label>
samihan-dell marked this conversation as resolved.
Show resolved Hide resolved
<div class="row">
<div class="col-sm-2">
<input class="form-control input-sm" type="number" id="cert-secret-count" min="0" value="0">
</div>
</div>
</div>

<div class="was-validated row mb-4">
<label for="controller-count" class="col-sm-2 col-form-label" data-bs-toggle="tooltip" data-bs-placement="right" title="Defines the number of controller pods to deploy." style="width: 180px;">Controller Pods Count</label>
<div class="row">
Expand Down Expand Up @@ -506,4 +522,4 @@
})();
</script>
</body>
</html>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ function setValues(csmMapValues, CONSTANTS_PARAM) {
DriverValues.csmVersion = document.getElementById("csm-version").value
DriverValues.driverVersion = csmMapValues.get("driverVersion");
DriverValues.imageRepository = document.getElementById("image-repository").value;
DriverValues.monitor = $("#monitor").prop('checked') ? true : false;
DriverValues.certSecretCount = document.getElementById("cert-secret-count").value;
DriverValues.controllerCount = document.getElementById("controller-count").value;
DriverValues.controllerPodsNodeSelector = $("#controller-pods-node-selector").prop('checked') ? true : false;
DriverValues.nodePodsNodeSelector = $("#node-pods-node-selector").prop('checked') ? true : false;
Expand All @@ -73,7 +75,7 @@ function setValues(csmMapValues, CONSTANTS_PARAM) {
DriverValues.resiliency = $("#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;
DriverValues.authorizationProxyHost = document.getElementById("authorization-proxy-host").value || '""';
DriverValues.vgsnapshotImage = DriverValues.imageRepository + CONSTANTS_PARAM.SLASH + csmMapValues.get("vgsnapshotImage");
DriverValues.replicationImage = DriverValues.imageRepository + CONSTANTS_PARAM.SLASH + csmMapValues.get("replicationImage");
DriverValues.migrationImage = DriverValues.imageRepository + CONSTANTS_PARAM.SLASH + csmMapValues.get("migrationImage");
Expand Down Expand Up @@ -117,6 +119,8 @@ function setValues(csmMapValues, CONSTANTS_PARAM) {
function createYamlString(yaml, obj, driverParam, CONSTANTS_PARAM) {
yaml = yaml.replaceAll("$IMAGE_REPOSITORY", obj.imageRepository);
yaml = yaml.replaceAll("$VERSION", obj.driverVersion);
yaml = yaml.replaceAll("$MONITOR_ENABLED", obj.monitor);
yaml = yaml.replaceAll("$CERT_SECRET_COUNT", obj.certSecretCount);
yaml = yaml.replaceAll("$CONTROLLER_COUNT", obj.controllerCount);
yaml = yaml.replaceAll("$CONTROLLER_POD_NODE_SELECTOR", obj.controllerPodsNodeSelector);
yaml = yaml.replaceAll("$NODE_POD_NODE_SELECTOR", obj.nodePodsNodeSelector);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ describe("GIVEN setValues function", () => {
<option value="1.4.0">CSM 1.4</option>
</select>
<input type="text" id="image-repository" value="dellemc">
<input type="number" id="cert-secret-count" value="0">
<input type="number" id="controller-count" value="2">
<input type="text" id="node-selector-label" value="node-role.kubernetes.io/control-plane:">
<input type="checkbox" id="controller-pods-node-selector" checked>
Expand All @@ -67,6 +68,7 @@ describe("GIVEN setValues function", () => {
csmVersion: "1.4.0",
driverVersion: "v2.4.0",
imageRepository: "dellemc",
certSecretCount: "0",
controllerCount: "2",
controllerPodsNodeSelector: '\n node-role.kubernetes.io/control-plane: ""',
nodePodsNodeSelector: '\n node-role.kubernetes.io/control-plane: ""',
Expand All @@ -92,6 +94,64 @@ describe("GIVEN setValues function", () => {

expect(received).toEqual(received);
});

test("SHOULD return expected DriverValues for csm version 1.6.0", () => {
document.body.innerHTML = `
<select id="csm-version">
<option value="1.6.0">CSM 1.6</option>
</select>
<input type="text" id="image-repository" value="dellemc">
<input type="number" id="cert-secret-count" value="0">
<input type="number" id="controller-count" value="2">
<input type="text" id="node-selector-label" value="node-role.kubernetes.io/control-plane:">
<input type="checkbox" id="controller-pods-node-selector" checked>
<input type="checkbox" id="node-pods-node-selector" checked>
<input type="text" id="driver-namespace" value="">
<input type="text" id="module-namespace" value="">
<input type="text" id="authorization-proxy-host" value="">
`;

const testCSMMap = new Map([
["csmVersion", "1.6.0"],
["imageRepository", "dellemc"],
["controllerCount", "2"],
["nodeSelectorLabel", "node-role.kubernetes.io/control-plane:"],
["driverVersion", "v2.6.0"],
["vgsnapshotImage", "csi-volumegroup-snapshotter:v1.2.0"],
["replicationImage", "dell-csi-replicator:v1.4.0"],
["authorizationImage", "csm-authorization-sidecar:v1.6.0"]
]);

const expected = {
csmVersion: "1.6.0",
driverVersion: "v2.6.0",
imageRepository: "dellemc",
certSecretCount: "0",
controllerCount: "2",
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,
vgsnapshotImage: "dellemc/csi-volumegroup-snapshotter:v1.2.0",
replicationImage: "dellemc/dell-csi-replicator:v1.4.0",
authorizationImage: "dellemc/csm-authorization-sidecar:v1.6.0",
applicationMobility: false,
certManagerEnabled: false,
singleNamespaceEnabled: false
};

const received = setValues(testCSMMap, CONSTANTS);

expect(received).toEqual(received);
});
});

describe("GIVEN createYamlString function", () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ function displayModules(driverName, CONSTANTS_PARAM) {
$(".storage-capacity").hide();
$(".migration").hide();
$(".vSphere").hide();
$(".cert-secret-count-wrapper").hide();

const selectedCSMVersion = document.getElementById("csm-version").value;

Expand Down Expand Up @@ -211,6 +212,8 @@ function displayModules(driverName, CONSTANTS_PARAM) {
$(".vSphere").show();
break;
case CONSTANTS_PARAM.POWERFLEX:
$(".resiliency").show();
$(".cert-secret-count-wrapper").show();
break;
case CONSTANTS_PARAM.UNITY:
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,66 @@ csi-powermax:
vCenterHost: "$VSPHERE_VCENTER_HOST"
vCenterCredSecret: $VSPHERE_VCENTER_CRED_SECRET


## CSI PowerFlex
########################
csi-vxflexos:
enabled: $POWERFLEX_ENABLED
version: $VERSION
images:
driverRepository: $IMAGE_REPOSITORY
powerflexSdc: dellemc/sdc:3.6.0.6
certSecretCount: $CERT_SECRET_COUNT
controller:
replication:
enabled: $REPLICATION_ENABLED
image: $REPLICATION_IMAGE
healthMonitor:
enabled: $HEALTH_MONITOR_ENABLED
controllerCount: $CONTROLLER_COUNT
snapshot:
enabled: $SNAPSHOT_ENABLED
resizer:
enabled: $RESIZER_ENABLED
nodeSelector: $CONTROLLER_POD_NODE_SELECTOR
node:
healthMonitor:
enabled: $HEALTH_MONITOR_ENABLED
nodeSelector: $NODE_POD_NODE_SELECTOR
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: $VG_SNAPSHOT_IMAGE
podmon:
enabled: $RESILIENCY_ENABLED
image: $PODMAN_IMAGE
authorization:
enabled: $AUTHORIZATION_ENABLED
sidecarProxyImage: $AUTHORIZATION_IMAGE
proxyHost: $AUTHORIZATION_PROXY_HOST


## K8S/Replication Module ATTRIBUTES
##########################################
csm-replication:
Expand Down