From 8dea7f9bcb50dc9c26e59bf4abe7b6d1f50b7855 Mon Sep 17 00:00:00 2001 From: boya murthy Date: Tue, 8 Aug 2023 14:21:16 +0530 Subject: [PATCH 01/14] Adding operator support for Powermax --- .../csminstallationwizard/src/index.html | 52 +++ .../src/static/js/commands.js | 1 + .../src/static/js/constants.js | 1 + .../src/static/js/generate-yaml.js | 10 + .../src/static/js/ui-functions.js | 25 ++ .../src/static/js/utility.js | 7 + .../operator/csm-powermax-1.7.0.template | 399 +++++++++++++++++ .../operator/csm-powermax-1.8.0.template | 405 ++++++++++++++++++ 8 files changed, 900 insertions(+) create mode 100644 content/docs/deployment/csminstallationwizard/src/templates/operator/csm-powermax-1.7.0.template create mode 100644 content/docs/deployment/csminstallationwizard/src/templates/operator/csm-powermax-1.8.0.template diff --git a/content/docs/deployment/csminstallationwizard/src/index.html b/content/docs/deployment/csminstallationwizard/src/index.html index 1269abf094..fa5a989503 100644 --- a/content/docs/deployment/csminstallationwizard/src/index.html +++ b/content/docs/deployment/csminstallationwizard/src/index.html @@ -323,6 +323,26 @@ +
+
+ +
+
+ +
+
+ +
+ +
+
+ +
+
+
+
+ +
@@ -350,6 +370,38 @@
+
+
+ +
+
+ +
+
+
+ +
+
+ + +
+
+ +
+
+ + +
+
+
+ + +
+
+
+ + +
diff --git a/content/docs/deployment/csminstallationwizard/src/static/js/commands.js b/content/docs/deployment/csminstallationwizard/src/static/js/commands.js index 053e7af0bb..af2862bf77 100644 --- a/content/docs/deployment/csminstallationwizard/src/static/js/commands.js +++ b/content/docs/deployment/csminstallationwizard/src/static/js/commands.js @@ -27,3 +27,4 @@ const certmanagerNote = 'If cert-manager is enabled, ensure the cert-manager CRD const veleroNote = 'If Velero is enabled, please add the respective credentials and configurations in the YAML file.'; const podmonNote = 'Uncomment tolerations under node property, if CSM for Resiliency and CSI Driver pods monitor are enabled in the generated YAML'; const authorizationNote = 'Only the Authorization sidecar is enabled by the CSM Installation Wizard. The Proxy Server has to be installed and configured separately'; +const topologyNote = 'If Node Topology is enabled, make sure topology configmap is created'; diff --git a/content/docs/deployment/csminstallationwizard/src/static/js/constants.js b/content/docs/deployment/csminstallationwizard/src/static/js/constants.js index 3a59b1020a..3710b05d55 100644 --- a/content/docs/deployment/csminstallationwizard/src/static/js/constants.js +++ b/content/docs/deployment/csminstallationwizard/src/static/js/constants.js @@ -27,6 +27,7 @@ const CONSTANTS = { POWERSCALE_NAMESPACE: "isilon", UNITY_NAMESPACE: "unity", POWERSTORE_LABEL_VALUE: "csi-powerstore", + POWERMAX_LABEL_VALUE: "csi-powermax", VALUES: "values", TEMP_DIR: "templates", TEMP_EXT: ".template", 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 878ee84c3b..04eff1a19f 100644 --- a/content/docs/deployment/csminstallationwizard/src/static/js/generate-yaml.js +++ b/content/docs/deployment/csminstallationwizard/src/static/js/generate-yaml.js @@ -80,6 +80,7 @@ function setValues(csmMapValues, CONSTANTS_PARAM) { DriverValues.snapshot = $("#snapshot").prop('checked') ? true : false; DriverValues.vgsnapshot = $("#vgsnapshot").prop('checked') ? true : false; DriverValues.resizer = $("#resizer").prop('checked') ? true : false; + DriverValues.iscsichap = $("#iscsichap").prop('checked') ? true : false; DriverValues.healthMonitor = $("#health-monitor").prop('checked') ? true : false; DriverValues.replication = $("#replication").prop('checked') ? true : false; DriverValues.migration = $("#migration").prop('checked') ? true : false; @@ -92,6 +93,7 @@ function setValues(csmMapValues, CONSTANTS_PARAM) { DriverValues.authorizationSkipCertValidation = $("#authorization-skip-cert-validation").prop('checked') ? true : false; DriverValues.authorizationProxyHost = document.getElementById("authorization-proxy-host").value || '""'; DriverValues.certManagerEnabled = $("#certmanager").prop('checked') ? true : false; + DriverValues.topologyEnabled = $("#topology").prop('checked') ? true : false; observabilityEnabled = DriverValues.observability; authorizationEnabled = DriverValues.authorization; replicationEnabled = DriverValues.replication; @@ -99,8 +101,11 @@ function setValues(csmMapValues, CONSTANTS_PARAM) { DriverValues.storageArrayId = $("#storage-array-id").val(); DriverValues.storageArrayEndpointUrl = $("#storage-array-endpoint-url").val() || '""'; DriverValues.storageArrayBackupEndpointUrl = $("#storage-array-backup-endpoint-url").val() || '""'; + DriverValues.manageArrayId = $("#manage-array-id").val(); + DriverValues.manageArrayEndpointUrl = $("#manage-array-endpoint-url").val() || '""'; DriverValues.clusterPrefix = $("#cluster-prefix").val(); DriverValues.portGroups = $("#port-groups").val(); + DriverValues.transportProtocol = $("#transport-protocol").val(); DriverValues.vSphereEnabled = $("#vSphere").prop('checked') ? true : false; DriverValues.vSphereFCPortGroup = $("#vSphere-fc-port-group").val(); @@ -123,6 +128,8 @@ function createYamlString(yamlTpl, yamlTplValues, driverParam, CONSTANTS_PARAM) yamlTpl = yamlTpl.replaceAll("$VG_SNAPSHOT_ENABLED", yamlTplValues.vgsnapshot); yamlTpl = yamlTpl.replaceAll("$SNAPSHOT_ENABLED", yamlTplValues.snapshot); yamlTpl = yamlTpl.replaceAll("$RESIZER_ENABLED", yamlTplValues.resizer); + yamlTpl = yamlTpl.replaceAll("$ISCSI_CHAP_ENABLED", yamlTplValues.iscsichap); + yamlTpl = yamlTpl.replaceAll("$TOPOLOGY_ENABLED", yamlTplValues.topologyEnabled); yamlTpl = yamlTpl.replaceAll("$REPLICATION_ENABLED", yamlTplValues.replication); yamlTpl = yamlTpl.replaceAll("$MIGRATION_ENABLED", yamlTplValues.migration); yamlTpl = yamlTpl.replaceAll("$AUTHORIZATION_ENABLED", yamlTplValues.authorization); @@ -143,8 +150,11 @@ function createYamlString(yamlTpl, yamlTplValues, driverParam, CONSTANTS_PARAM) yamlTpl = yamlTpl.replaceAll("$POWERMAX_STORAGE_ARRAY_ENDPOINT_URL", yamlTplValues.storageArrayEndpointUrl); yamlTpl = yamlTpl.replaceAll("$POWERMAX_STORAGE_ARRAY_BACKUP_ENDPOINT_URL", yamlTplValues.storageArrayBackupEndpointUrl); yamlTpl = yamlTpl.replaceAll("$POWERMAX_MANAGEMENT_SERVERS_ENDPOINT_URL", yamlTplValues.storageArrayEndpointUrl); + yamlTpl = yamlTpl.replaceAll("$POWERMAX_MANAGE_ARRAY_ID", yamlTplValues.storageArrayId); + yamlTpl = yamlTpl.replaceAll("$POWERMAX_MANAGEE_ARRAY_ENDPOINT_URL", yamlTplValues.storageArrayEndpointUrl); yamlTpl = yamlTpl.replaceAll("$POWERMAX_CLUSTER_PREFIX", yamlTplValues.clusterPrefix); yamlTpl = yamlTpl.replaceAll("$POWERMAX_PORT_GROUPS", yamlTplValues.portGroups); + yamlTpl = yamlTpl.replaceAll("TRANSPORT_PROTOCOL", yamlTplValues.transportProtocol); yamlTpl = yamlTpl.replaceAll("$VSPHERE_ENABLED", yamlTplValues.vSphereEnabled); yamlTpl = yamlTpl.replaceAll("$VSPHERE_FC_PORT_GROUP", yamlTplValues.vSphereFCPortGroup); yamlTpl = yamlTpl.replaceAll("$VSPHERE_FC_HOST_NAME", yamlTplValues.vSphereFCHostName); 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 9e1cf003a6..175b340a9d 100644 --- a/content/docs/deployment/csminstallationwizard/src/static/js/ui-functions.js +++ b/content/docs/deployment/csminstallationwizard/src/static/js/ui-functions.js @@ -49,6 +49,7 @@ function onArrayChange() { onResiliencyChange(podmonNote); onSnapshotChange(snapshotNote, driver, CONSTANTS); onCertManagerChange(certmanagerNote); + onTopologyChange(topologyNote); onVSphereChange(); validateInput(validateForm, CONSTANTS); }); @@ -105,6 +106,15 @@ function onCertManagerChange(certmanagerNoteValue) { } } +function onTopologyChange(topologyNoteValue) { + if ($("#topology").prop('checked') === true) { + $('div#topology-note-wrapper').show(); + $("#topology-note").html(topologyNoteValue); + } else { + $('div#topology-note-wrapper').hide(); + } +} + function onVSphereChange() { if ($("#vSphere").prop('checked') === true) { $('div#vSphere-wrapper').show(); @@ -260,10 +270,24 @@ function displayModules(installationType, driverName, CONSTANTS_PARAM) { $(".storageArrays").show(); $(".cluster-prefix").show(); $(".port-groups").show(); + $(".transport-protocol").show(); $(".migration").show(); $(".vSphere").show(); $(".storage-capacity").show(); + $(".snapshot-feature").show(); document.getElementById("driver-namespace").value = CONSTANTS_PARAM.POWERMAX_NAMESPACE; + if (installationType === 'operator'){ + $(".observability").show(); + $(".replication-mod").show(); + $(".image-repository").hide(); + $(".cert-manager").hide(); + $(".storageArrays").hide(); + $(".managedArrays").show(); + $(".migration").hide(); + $(".resizer").hide(); + $(".fsGroupPolicy").show(); + document.getElementById("label-value").value = CONSTANTS_PARAM.POWERMAX_LABEL_VALUE; + } break; case CONSTANTS_PARAM.POWERFLEX: $(".monitor").show(); @@ -361,6 +385,7 @@ if (typeof exports !== 'undefined') { onOperatorResiliencyChange, onSnapshotChange, onCertManagerChange, + onTopologyChange, onVSphereChange, onNodeSelectorChange, onCopyButtonClickHandler, diff --git a/content/docs/deployment/csminstallationwizard/src/static/js/utility.js b/content/docs/deployment/csminstallationwizard/src/static/js/utility.js index 8de9b593dc..0d565e89b7 100644 --- a/content/docs/deployment/csminstallationwizard/src/static/js/utility.js +++ b/content/docs/deployment/csminstallationwizard/src/static/js/utility.js @@ -51,6 +51,13 @@ function validateForm(CONSTANTS_PARAM) { if (document.getElementById('cluster-prefix').value.trim() === "") { return false; } + if (document.getElementById('manage-array-id').value.trim() === "") { + return false; + } + if (document.getElementById('manage-array-endpoint-url').value.trim() === "") { + return false; + } + if (vSphereEnabled) { if (document.getElementById('vSphere-fc-port-group').value.trim() === "") { diff --git a/content/docs/deployment/csminstallationwizard/src/templates/operator/csm-powermax-1.7.0.template b/content/docs/deployment/csminstallationwizard/src/templates/operator/csm-powermax-1.7.0.template new file mode 100644 index 0000000000..bfb4e5cdef --- /dev/null +++ b/content/docs/deployment/csminstallationwizard/src/templates/operator/csm-powermax-1.7.0.template @@ -0,0 +1,399 @@ +# +# 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: powermax + namespace: $NAMESPACE +spec: + # Add fields here + driver: + csiDriverType: "powermax" + 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 PowerMax v2.7.0 driver + configVersion: v2.7.0 + # replica: Define the number of PowerMax controller nodes + # to deploy to the Kubernetes release + # Allowed values: n, where n > 0 + # Default value: None + replicas: $CONTROLLER_COUNT + # Default credential secret for Powermax, if not set it to "" + authSecret: powermax-creds + dnsPolicy: ClusterFirstWithHostNet + forceUpdate: false + forceRemoveDriver: true + common: + # Image for CSI PowerMax driver v2.7.0 + image: dellemc/csi-powermax:v2.7.0 + # imagePullPolicy: Policy to determine if the image should be pulled prior to starting the container. + # Allowed values: + # Always: Always pull the image. + # IfNotPresent: Only pull the image if it does not already exist on the node. + # Never: Never pull the image. + # Default value: None + imagePullPolicy: IfNotPresent + envs: + # X_CSI_MANAGED_ARRAYS: Serial ID of the arrays that will be used for provisioning + # Default value: None + # Examples: "000000000001", "000000000002" + - name: X_CSI_MANAGED_ARRAYS + value: $POWERMAX_MANAGE_ARRAY_ID + # X_CSI_POWERMAX_ENDPOINT: Address of the Unisphere server that is managing the PowerMax arrays + # In case of multi-array, provide an endpoint of locally attached array + # Default value: None + # Example: https://0.0.0.1:8443 + - name: X_CSI_POWERMAX_ENDPOINT + value: $POWERMAX_MANAGEE_ARRAY_ENDPOINT_URL + # X_CSI_K8S_CLUSTER_PREFIX: Define a prefix that is appended onto + # all resources created in the Array + # This should be unique per K8s/CSI deployment + # maximum length of this value is 3 characters + # Default value: None + # Examples: "XYZ", "EMC" + - name: X_CSI_K8S_CLUSTER_PREFIX + value: $POWERMAX_CLUSTER_PREFIX + # 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 + # X_CSI_POWERMAX_PORTGROUPS: Define the set of existing port groups that the driver will use. + # It is a comma separated list of portgroup names. + # Required only in case of iSCSI port groups + # Allowed values: iSCSI Port Group names + # Default value: None + # Examples: "pg1", "pg1, pg2" + - name: X_CSI_POWERMAX_PORTGROUPS + value: $POWERMAX_PORT_GROUPS + # "X_CSI_TRANSPORT_PROTOCOL" can be "FC" or "FIBRE" for fibrechannel, + # "ISCSI" for iSCSI, or "" for autoselection. + # Allowed values: + # "FC" - Fiber Channel protocol + # "FIBER" - Fiber Channel protocol + # "ISCSI" - iSCSI protocol + # "" - Automatic selection of transport protocol + # Default value: "" + - name: X_CSI_TRANSPORT_PROTOCOL + value: $TRANSPORT_PROTOCOL + # X_CSI_POWERMAX_PROXY_SERVICE_NAME: Refers to the name of the proxy service in kubernetes + # Allowed values: "csipowermax-reverseproxy" + # default values: "csipowermax-reverseproxy" + - name: X_CSI_POWERMAX_PROXY_SERVICE_NAME + value: "csipowermax-reverseproxy" + # VMware/vSphere virtualization support + # set X_CSI_VSPHERE_ENABLED to true, if you to enable VMware virtualized environment support via RDM + # Allowed values: + # "true" - vSphere volumes are enabled + # "false" - vSphere volumes are disabled + # Default value: "false" + - name: "X_CSI_VSPHERE_ENABLED" + value: $VSPHERE_ENABLED + # X_CSI_VSPHERE_PORTGROUP: An existing portGroup that driver will use for vSphere + # recommended format: csi-x-VC-PG, x can be anything of user choice + # Allowed value: valid existing port group on the array + # Default value: "" + - name: "X_CSI_VSPHERE_PORTGROUP" + value: $VSPHERE_FC_PORT_GROUP + # X_CSI_VSPHERE_HOSTNAME: An existing host(initiator group)/ host group(cascaded initiator group) that driver will use for vSphere + # this host should contain initiators from all the ESXs/ESXi host where the cluster is deployed + # recommended format: csi-x-VC-HN, x can be anything of user choice + # Allowed value: valid existing host/host group on the array + # Default value: "" + - name: "X_CSI_VSPHERE_HOSTNAME" + value: $VSPHERE_FC_HOST_NAME + # X_CSI_VCENTER_HOST: URL/endpoint of the vCenter where all the ESX are present + # Allowed value: valid vCenter host endpoint + # Default value: "" + - name: "X_CSI_VCENTER_HOST" + value: $VSPHERE_VCENTER_HOST + controller: + envs: + # X_CSI_HEALTH_MONITOR_ENABLED: Enable/Disable health monitor of CSI volumes from node plugin- volume usage, volume condition + # 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 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 that would be applied to controller deployment + # Leave as blank to install controller on worker nodes + # Allowed values: map of key-value pairs + # 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: + # X_CSI_POWERMAX_ISCSI_ENABLE_CHAP: Determine if the driver is going to configure + # ISCSI node databases on the nodes with the CHAP credentials + # If enabled, the CHAP secret must be provided in the credentials secret + # and set to the key "chapsecret" + # Allowed values: + # "true" - CHAP is enabled + # "false" - CHAP is disabled + # Default value: "false" + - name: X_CSI_POWERMAX_ISCSI_ENABLE_CHAP + value: $ISCSI_CHAP_ENABLED + # X_CSI_HEALTH_MONITOR_ENABLED: Enable/Disable health monitor of CSI volumes from node plugin- volume usage, volume condition + # 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_TOPOLOGY_CONTROL_ENABLED provides a way to filter topology keys on a node based on array and transport protocol + # if enabled, user can create custom topology keys by editing node-topology-config configmap. + # Allowed values: + # true: enable the filtration based on config map + # false: disable the filtration based on config map + # Default value: false + - name: X_CSI_TOPOLOGY_CONTROL_ENABLED + value: $TOPOLOGY_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 that would be applied to node daemonset + # Add/Remove tolerations as per requirement + # Leave as blank if you wish to not apply any tolerations + # Allowed values: map of key-value pairs + # Default value: None + 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: + # 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" ] + + modules: + # CSI Powermax Reverseproxy is a mandatory module for Powermax + - name: csireverseproxy + # enabled: Always set to true + enabled: true + configVersion: v2.6.0 + forceRemoveModule: true + components: + - name: csipowermax-reverseproxy + # image: Define the container images used for the reverse proxy + # Default value: None + # Example: "csipowermax-reverseproxy:v2.6.0" + image: dellemc/csipowermax-reverseproxy:v2.6.0 + envs: + # "tlsSecret" defines the TLS secret that is created with certificate + # and its associated key + # Default value: None + # Example: "tls-secret" + - name: X_CSI_REVPROXY_TLS_SECRET + value: "csirevproxy-tls-secret" + - name: X_CSI_REVPROXY_PORT + value: "2222" + - name: X_CSI_CONFIG_MAP_NAME + value: "powermax-reverseproxy-config" + + # Authorization: enable csm-authorization for RBAC + - name: authorization + # enabled: 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 configuring replication module + # Replication CRDs must be installed before installing driver + - name: replication + # enabled: Enable/Disable replication feature + # Allowed values: + # true: enable replication feature(install dell-csi-replicator sidecar) + # false: disable replication feature(do not install dell-csi-replicator sidecar) + # Default value: false + 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: powermax + - name: "X_CSI_REPLICATION_CONTEXT_PREFIX" + value: "powermax" + + - 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: Defines karavi-topology image. This shouldn't be changed + # Allowed values: string + image: dellemc/csm-topology:v1.5.0 + envs: + # topology log level + # Valid values: TRACE, DEBUG, INFO, WARN, ERROR, FATAL, PANIC + # Default value: "INFO" + - 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-powermax + # enabled: Enable/Disable PowerMax metrics + enabled: $POWERMAX_OBSERVABILITY_METRICS_ENABLED + # image: Defines PowerMax metrics image. This shouldn't be changed + image: dellemc/csm-metrics-powermax:v1.1.0 + envs: + # POWERMAX_MAX_CONCURRENT_QUERIES: set the default max concurrent queries to PowerMax + # Allowed values: int + # Default value: 10 + - name: "POWERMAX_MAX_CONCURRENT_QUERIES" + value: "10" + # POWERMAX_CAPACITY_METRICS_ENABLED: enable/disable collection of capacity metrics + # Allowed values: ture, false + # Default value: true + - name: "POWERMAX_CAPACITY_METRICS_ENABLED" + value: "true" + # POWERMAX_PERFORMANCE_METRICS_ENABLED: enable/disable collection of volume performance metrics + # Allowed values: ture, false + # Default value: true + - name: "POWERMAX_PERFORMANCE_METRICS_ENABLED" + value: "true" + # POWERMAX_CAPACITY_POLL_FREQUENCY: set polling frequency to get capacity metrics data + # Allowed values: int + # Default value: 10 + - name: "POWERMAX_CAPACITY_POLL_FREQUENCY" + value: "10" + # POWERMAX_PERFORMANCE_POLL_FREQUENCY: set polling frequency to get volume performance data + # Allowed values: int + # Default value: 10 + - name: "POWERMAX_PERFORMANCE_POLL_FREQUENCY" + value: "10" + # PowerMax metrics log level + # Valid values: TRACE, DEBUG, INFO, WARN, ERROR, FATAL, PANIC + # Default value: "INFO" + - name: "POWERMAX_LOG_LEVEL" + value: "INFO" + # PowerMax Metrics Output logs in the specified format + # Valid values: TEXT, JSON + # Default value: "TEXT" + - name: "POWERMAX_LOG_FORMAT" + value: "TEXT" + # otel collector address + # Allowed values: String + # Default value: "otel-collector:55680" + - name: "COLLECTOR_ADDRESS" + value: "otel-collector:55680" + # configMap name which has all array/endpoint related info + - name: "X_CSI_CONFIG_MAP_NAME" + value: "powermax-reverseproxy-config" diff --git a/content/docs/deployment/csminstallationwizard/src/templates/operator/csm-powermax-1.8.0.template b/content/docs/deployment/csminstallationwizard/src/templates/operator/csm-powermax-1.8.0.template new file mode 100644 index 0000000000..c1837b72d5 --- /dev/null +++ b/content/docs/deployment/csminstallationwizard/src/templates/operator/csm-powermax-1.8.0.template @@ -0,0 +1,405 @@ +# +# 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: powermax + namespace: $NAMESPACE +spec: + # Add fields here + driver: + csiDriverType: "powermax" + 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 PowerMax v2.8.0 driver + configVersion: v2.8.0 + # replica: Define the number of PowerMax controller nodes + # to deploy to the Kubernetes release + # Allowed values: n, where n > 0 + # Default value: None + replicas: $CONTROLLER_COUNT + # Default credential secret for Powermax, if not set it to "" + authSecret: powermax-creds + dnsPolicy: ClusterFirstWithHostNet + forceUpdate: false + forceRemoveDriver: true + common: + # Image for CSI PowerMax driver v2.8.0 + image: dellemc/csi-powermax:v2.8.0 + # imagePullPolicy: Policy to determine if the image should be pulled prior to starting the container. + # Allowed values: + # Always: Always pull the image. + # IfNotPresent: Only pull the image if it does not already exist on the node. + # Never: Never pull the image. + # Default value: None + imagePullPolicy: IfNotPresent + envs: + # X_CSI_MANAGED_ARRAYS: Serial ID of the arrays that will be used for provisioning + # Default value: None + # Examples: "000000000001", "000000000002" + - name: X_CSI_MANAGED_ARRAYS + value: $POWERMAX_MANAGE_ARRAY_ID + # X_CSI_POWERMAX_ENDPOINT: Address of the Unisphere server that is managing the PowerMax arrays + # In case of multi-array, provide an endpoint of locally attached array + # Default value: None + # Example: https://0.0.0.1:8443 + - name: X_CSI_POWERMAX_ENDPOINT + value: $POWERMAX_MANAGEE_ARRAY_ENDPOINT_URL + # X_CSI_K8S_CLUSTER_PREFIX: Define a prefix that is appended onto + # all resources created in the Array + # This should be unique per K8s/CSI deployment + # maximum length of this value is 3 characters + # Default value: None + # Examples: "XYZ", "EMC" + - name: X_CSI_K8S_CLUSTER_PREFIX + value: $POWERMAX_CLUSTER_PREFIX + # 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 + # X_CSI_POWERMAX_PORTGROUPS: Define the set of existing port groups that the driver will use. + # It is a comma separated list of portgroup names. + # Required only in case of iSCSI port groups + # Allowed values: iSCSI Port Group names + # Default value: None + # Examples: "pg1", "pg1, pg2" + - name: X_CSI_POWERMAX_PORTGROUPS + value: $POWERMAX_PORT_GROUPS + # "X_CSI_TRANSPORT_PROTOCOL" can be "FC" or "FIBRE" for fibrechannel, + # "ISCSI" for iSCSI, or "" for autoselection. + # Allowed values: + # "FC" - Fiber Channel protocol + # "FIBER" - Fiber Channel protocol + # "ISCSI" - iSCSI protocol + # "" - Automatic selection of transport protocol + # Default value: "" + - name: X_CSI_TRANSPORT_PROTOCOL + value: $TRANSPORT_PROTOCOL + # X_CSI_POWERMAX_PROXY_SERVICE_NAME: Refers to the name of the proxy service in kubernetes + # Allowed values: "csipowermax-reverseproxy" + # default values: "csipowermax-reverseproxy" + - name: X_CSI_POWERMAX_PROXY_SERVICE_NAME + value: "csipowermax-reverseproxy" + # VMware/vSphere virtualization support + # set X_CSI_VSPHERE_ENABLED to true, if you to enable VMware virtualized environment support via RDM + # Allowed values: + # "true" - vSphere volumes are enabled + # "false" - vSphere volumes are disabled + # Default value: "false" + - name: "X_CSI_VSPHERE_ENABLED" + value: $VSPHERE_ENABLED + # X_CSI_VSPHERE_PORTGROUP: An existing portGroup that driver will use for vSphere + # recommended format: csi-x-VC-PG, x can be anything of user choice + # Allowed value: valid existing port group on the array + # Default value: "" + - name: "X_CSI_VSPHERE_PORTGROUP" + value: $VSPHERE_FC_PORT_GROUP + # X_CSI_VSPHERE_HOSTNAME: An existing host(initiator group)/ host group(cascaded initiator group) that driver will use for vSphere + # this host should contain initiators from all the ESXs/ESXi host where the cluster is deployed + # recommended format: csi-x-VC-HN, x can be anything of user choice + # Allowed value: valid existing host/host group on the array + # Default value: "" + - name: "X_CSI_VSPHERE_HOSTNAME" + value: $VSPHERE_FC_HOST_NAME + # X_CSI_VCENTER_HOST: URL/endpoint of the vCenter where all the ESX are present + # Allowed value: valid vCenter host endpoint + # Default value: "" + - name: "X_CSI_VCENTER_HOST" + value: $VSPHERE_VCENTER_HOST + controller: + envs: + # X_CSI_HEALTH_MONITOR_ENABLED: Enable/Disable health monitor of CSI volumes from node plugin- volume usage, volume condition + # 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 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 that would be applied to controller deployment + # Leave as blank to install controller on worker nodes + # Allowed values: map of key-value pairs + # 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: + # X_CSI_POWERMAX_ISCSI_ENABLE_CHAP: Determine if the driver is going to configure + # ISCSI node databases on the nodes with the CHAP credentials + # If enabled, the CHAP secret must be provided in the credentials secret + # and set to the key "chapsecret" + # Allowed values: + # "true" - CHAP is enabled + # "false" - CHAP is disabled + # Default value: "false" + - name: X_CSI_POWERMAX_ISCSI_ENABLE_CHAP + value: $ISCSI_CHAP_ENABLED + # X_CSI_HEALTH_MONITOR_ENABLED: Enable/Disable health monitor of CSI volumes from node plugin- volume usage, volume condition + # 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_TOPOLOGY_CONTROL_ENABLED provides a way to filter topology keys on a node based on array and transport protocol + # if enabled, user can create custom topology keys by editing node-topology-config configmap. + # Allowed values: + # true: enable the filtration based on config map + # false: disable the filtration based on config map + # Default value: false + - name: X_CSI_TOPOLOGY_CONTROL_ENABLED + value: $TOPOLOGY_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 that would be applied to node daemonset + # Add/Remove tolerations as per requirement + # Leave as blank if you wish to not apply any tolerations + # Allowed values: map of key-value pairs + # Default value: None + 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: + # 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"] + + modules: + # CSI Powermax Reverseproxy is a mandatory module for Powermax + - name: csireverseproxy + # enabled: Always set to true + enabled: true + configVersion: v2.6.0 + forceRemoveModule: true + components: + - name: csipowermax-reverseproxy + # image: Define the container images used for the reverse proxy + # Default value: None + # Example: "csipowermax-reverseproxy:v2.6.0" + image: dellemc/csipowermax-reverseproxy:v2.6.0 + envs: + # "tlsSecret" defines the TLS secret that is created with certificate + # and its associated key + # Default value: None + # Example: "tls-secret" + - name: X_CSI_REVPROXY_TLS_SECRET + value: "csirevproxy-tls-secret" + - name: X_CSI_REVPROXY_PORT + value: "2222" + - name: X_CSI_CONFIG_MAP_NAME + value: "powermax-reverseproxy-config" + + # Authorization: enable csm-authorization for RBAC + - name: authorization + # enabled: 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 configuring replication module + # Replication CRDs must be installed before installing driver + - name: replication + # enabled: Enable/Disable replication feature + # Allowed values: + # true: enable replication feature(install dell-csi-replicator sidecar) + # false: disable replication feature(do not install dell-csi-replicator sidecar) + # Default value: false + 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: powermax + - name: "X_CSI_REPLICATION_CONTEXT_PREFIX" + value: "powermax" + + - 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: Defines karavi-topology image. This shouldn't be changed + # Allowed values: string + image: dellemc/csm-topology:v1.5.0 + envs: + # topology log level + # Valid values: TRACE, DEBUG, INFO, WARN, ERROR, FATAL, PANIC + # Default value: "INFO" + - 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-powermax + # enabled: Enable/Disable PowerMax metrics + enabled: $POWERMAX_OBSERVABILITY_METRICS_ENABLED + # image: Defines PowerMax metrics image. This shouldn't be changed + image: dellemc/csm-metrics-powermax:v1.1.0 + envs: + # POWERMAX_MAX_CONCURRENT_QUERIES: set the default max concurrent queries to PowerMax + # Allowed values: int + # Default value: 10 + - name: "POWERMAX_MAX_CONCURRENT_QUERIES" + value: "10" + # POWERMAX_CAPACITY_METRICS_ENABLED: enable/disable collection of capacity metrics + # Allowed values: ture, false + # Default value: true + - name: "POWERMAX_CAPACITY_METRICS_ENABLED" + value: "true" + # POWERMAX_PERFORMANCE_METRICS_ENABLED: enable/disable collection of volume performance metrics + # Allowed values: ture, false + # Default value: true + - name: "POWERMAX_PERFORMANCE_METRICS_ENABLED" + value: "true" + # POWERMAX_CAPACITY_POLL_FREQUENCY: set polling frequency to get capacity metrics data + # Allowed values: int + # Default value: 10 + - name: "POWERMAX_CAPACITY_POLL_FREQUENCY" + value: "10" + # POWERMAX_PERFORMANCE_POLL_FREQUENCY: set polling frequency to get volume performance data + # Allowed values: int + # Default value: 10 + - name: "POWERMAX_PERFORMANCE_POLL_FREQUENCY" + value: "10" + # PowerMax metrics log level + # Valid values: TRACE, DEBUG, INFO, WARN, ERROR, FATAL, PANIC + # Default value: "INFO" + - name: "POWERMAX_LOG_LEVEL" + value: "INFO" + # PowerMax Metrics Output logs in the specified format + # Valid values: TEXT, JSON + # Default value: "TEXT" + - name: "POWERMAX_LOG_FORMAT" + value: "TEXT" + # otel collector address + # Allowed values: String + # Default value: "otel-collector:55680" + - name: "COLLECTOR_ADDRESS" + value: "otel-collector:55680" + # configMap name which has all array/endpoint related info + - name: "X_CSI_CONFIG_MAP_NAME" + value: "powermax-reverseproxy-config" From 50b8ee72b662befb43174c876d06ef0d8dc01fd2 Mon Sep 17 00:00:00 2001 From: boya murthy Date: Tue, 8 Aug 2023 17:12:06 +0530 Subject: [PATCH 02/14] Adding observability support --- .../csminstallationwizard/src/index.html | 26 ++++++ .../src/static/js/generate-yaml.js | 12 +++ .../src/static/js/ui-functions.js | 19 ++++- .../operator/csm-powermax-1.7.0.template | 81 ------------------- .../operator/csm-powermax-1.8.0.template | 16 ++-- 5 files changed, 64 insertions(+), 90 deletions(-) diff --git a/content/docs/deployment/csminstallationwizard/src/index.html b/content/docs/deployment/csminstallationwizard/src/index.html index fa5a989503..e66933f730 100644 --- a/content/docs/deployment/csminstallationwizard/src/index.html +++ b/content/docs/deployment/csminstallationwizard/src/index.html @@ -109,6 +109,32 @@
+
+
+ + +
+
+
+ + +
+
+
+
+ + +
+
+
+
+ + +
+
+
+ +
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 04eff1a19f..fd374074d2 100644 --- a/content/docs/deployment/csminstallationwizard/src/static/js/generate-yaml.js +++ b/content/docs/deployment/csminstallationwizard/src/static/js/generate-yaml.js @@ -18,6 +18,7 @@ var template = ""; var version = ""; var observabilityEnabled = false; +var observabilityOperatorEnabled = false; var authorizationEnabled = false; var replicationEnabled = false; @@ -86,6 +87,10 @@ function setValues(csmMapValues, CONSTANTS_PARAM) { DriverValues.migration = $("#migration").prop('checked') ? true : false; DriverValues.observability = $("#observability").prop('checked') ? true : false; DriverValues.observabilityMetrics = $("#observability-metrics").prop('checked') ? true : false; + DriverValues.observabilityOperator = $("#observability-operator").prop('checked') ? true : false; + DriverValues.observabilityOperatorMetrics = $("#observability-operator-metrics").prop('checked') ? true : false; + DriverValues.observabilityOperatorTopology = $("#observability-operator-topology").prop('checked') ? true : false; + DriverValues.observabilityOperatorOtel = $("#observability-operator-otel").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; @@ -95,6 +100,7 @@ function setValues(csmMapValues, CONSTANTS_PARAM) { DriverValues.certManagerEnabled = $("#certmanager").prop('checked') ? true : false; DriverValues.topologyEnabled = $("#topology").prop('checked') ? true : false; observabilityEnabled = DriverValues.observability; + observabilityOperatorEnabled = DriverValues.observabilityOperator; authorizationEnabled = DriverValues.authorization; replicationEnabled = DriverValues.replication; @@ -136,6 +142,7 @@ function createYamlString(yamlTpl, yamlTplValues, driverParam, CONSTANTS_PARAM) yamlTpl = yamlTpl.replaceAll("$AUTHORIZATION_PROXY_HOST", yamlTplValues.authorizationProxyHost); yamlTpl = yamlTpl.replaceAll("$AUTHORIZATION_SKIP_CERTIFICATE_VALIDATION", yamlTplValues.authorizationSkipCertValidation); yamlTpl = yamlTpl.replaceAll("$OBSERVABILITY_ENABLED", yamlTplValues.observability); + yamlTpl = yamlTpl.replaceAll("$OBSERVABILITY_OPERATOR_ENABLED", yamlTplValues.observabilityOperator); yamlTpl = yamlTpl.replaceAll("$RESILIENCY_ENABLED", yamlTplValues.resiliency); yamlTpl = yamlTpl.replaceAll("$OPERATOR_RESILIENCY_ENABLED", yamlTplValues.operatorResiliency); yamlTpl = yamlTpl.replaceAll("$LABEL_VALUE", yamlTplValues.labelValue); @@ -196,6 +203,11 @@ function createYamlString(yamlTpl, yamlTplValues, driverParam, CONSTANTS_PARAM) yamlTpl = yamlTpl.replaceAll("$POWERSCALE_OBSERVABILITY_METRICS_ENABLED", true); } } + yamlTpl = yamlTpl.replaceAll("$OBSERVABILITY_OPERATOR_ENABLED_TOPOLOGY", yamlTplValues.observabilityOperatorTopology); + yamlTpl = yamlTpl.replaceAll("$OBSERVABILITY_OPERATOR_ENABLED_METRICS", yamlTplValues.observabilityOperatorMetrics); + yamlTpl = yamlTpl.replaceAll("$OBSERVABILITY_OPERATOR_ENABLED_OTEL", yamlTplValues.observabilityOperatorOtel); + + yamlTpl = yamlTpl.replaceAll("$POWERSTORE_OBSERVABILITY_METRICS_ENABLED", false); yamlTpl = yamlTpl.replaceAll("$POWERMAX_OBSERVABILITY_METRICS_ENABLED", false); yamlTpl = yamlTpl.replaceAll("$POWERFLEX_OBSERVABILITY_METRICS_ENABLED", false); 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 175b340a9d..0010d1bdda 100644 --- a/content/docs/deployment/csminstallationwizard/src/static/js/ui-functions.js +++ b/content/docs/deployment/csminstallationwizard/src/static/js/ui-functions.js @@ -45,6 +45,7 @@ function onArrayChange() { setDefaultValues(defaultValues, csmMap); $(".namespace").show(); onObservabilityChange(); + onObservabilityOperatorChange(); onAuthorizationChange(); onResiliencyChange(podmonNote); onSnapshotChange(snapshotNote, driver, CONSTANTS); @@ -73,6 +74,19 @@ function onObservabilityChange() { } } +function onObservabilityOperatorChange() { + if ($("#observability-operator").prop('checked') === true) { + $('div#observability-operator-metrics-wrapper').show(); + $('div#observability-operator-topology-wrapper').show(); + $('div#observability-operator-otel-wrapper').show(); + } else { + $('div#observability-operator-metrics-wrapper').hide(); + $('div#observability-operator-topology-wrapper').hide(); + $('div#observability-operator-otel-wrapper').hide(); + } +} + + function onResiliencyChange(podmonNoteValue) { if ($("#resiliency").prop('checked') === true) { $('div#podmon-note-wrapper').show(); @@ -138,6 +152,7 @@ const onCSMVersionChange = () => { document.getElementById("csm-version").value !== "" ? loadTemplate(document.getElementById("array").value, document.getElementById("installation-type").value, document.getElementById("csm-version").value) : null; displayModules(installationType, driver, CONSTANTS); onObservabilityChange(); + onObservabilityOperatorChange(); onAuthorizationChange(); }; @@ -277,7 +292,7 @@ function displayModules(installationType, driverName, CONSTANTS_PARAM) { $(".snapshot-feature").show(); document.getElementById("driver-namespace").value = CONSTANTS_PARAM.POWERMAX_NAMESPACE; if (installationType === 'operator'){ - $(".observability").show(); + $(".observability").hide(); $(".replication-mod").show(); $(".image-repository").hide(); $(".cert-manager").hide(); @@ -286,6 +301,7 @@ function displayModules(installationType, driverName, CONSTANTS_PARAM) { $(".migration").hide(); $(".resizer").hide(); $(".fsGroupPolicy").show(); + $(".observability-operator").show(); document.getElementById("label-value").value = CONSTANTS_PARAM.POWERMAX_LABEL_VALUE; } break; @@ -381,6 +397,7 @@ if (typeof exports !== 'undefined') { module.exports = { onAuthorizationChange, onObservabilityChange, + onObservabilityOperatorChange, onResiliencyChange, onOperatorResiliencyChange, onSnapshotChange, diff --git a/content/docs/deployment/csminstallationwizard/src/templates/operator/csm-powermax-1.7.0.template b/content/docs/deployment/csminstallationwizard/src/templates/operator/csm-powermax-1.7.0.template index bfb4e5cdef..f8ec10482f 100644 --- a/content/docs/deployment/csminstallationwizard/src/templates/operator/csm-powermax-1.7.0.template +++ b/content/docs/deployment/csminstallationwizard/src/templates/operator/csm-powermax-1.7.0.template @@ -316,84 +316,3 @@ spec: # 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: Defines karavi-topology image. This shouldn't be changed - # Allowed values: string - image: dellemc/csm-topology:v1.5.0 - envs: - # topology log level - # Valid values: TRACE, DEBUG, INFO, WARN, ERROR, FATAL, PANIC - # Default value: "INFO" - - 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-powermax - # enabled: Enable/Disable PowerMax metrics - enabled: $POWERMAX_OBSERVABILITY_METRICS_ENABLED - # image: Defines PowerMax metrics image. This shouldn't be changed - image: dellemc/csm-metrics-powermax:v1.1.0 - envs: - # POWERMAX_MAX_CONCURRENT_QUERIES: set the default max concurrent queries to PowerMax - # Allowed values: int - # Default value: 10 - - name: "POWERMAX_MAX_CONCURRENT_QUERIES" - value: "10" - # POWERMAX_CAPACITY_METRICS_ENABLED: enable/disable collection of capacity metrics - # Allowed values: ture, false - # Default value: true - - name: "POWERMAX_CAPACITY_METRICS_ENABLED" - value: "true" - # POWERMAX_PERFORMANCE_METRICS_ENABLED: enable/disable collection of volume performance metrics - # Allowed values: ture, false - # Default value: true - - name: "POWERMAX_PERFORMANCE_METRICS_ENABLED" - value: "true" - # POWERMAX_CAPACITY_POLL_FREQUENCY: set polling frequency to get capacity metrics data - # Allowed values: int - # Default value: 10 - - name: "POWERMAX_CAPACITY_POLL_FREQUENCY" - value: "10" - # POWERMAX_PERFORMANCE_POLL_FREQUENCY: set polling frequency to get volume performance data - # Allowed values: int - # Default value: 10 - - name: "POWERMAX_PERFORMANCE_POLL_FREQUENCY" - value: "10" - # PowerMax metrics log level - # Valid values: TRACE, DEBUG, INFO, WARN, ERROR, FATAL, PANIC - # Default value: "INFO" - - name: "POWERMAX_LOG_LEVEL" - value: "INFO" - # PowerMax Metrics Output logs in the specified format - # Valid values: TEXT, JSON - # Default value: "TEXT" - - name: "POWERMAX_LOG_FORMAT" - value: "TEXT" - # otel collector address - # Allowed values: String - # Default value: "otel-collector:55680" - - name: "COLLECTOR_ADDRESS" - value: "otel-collector:55680" - # configMap name which has all array/endpoint related info - - name: "X_CSI_CONFIG_MAP_NAME" - value: "powermax-reverseproxy-config" diff --git a/content/docs/deployment/csminstallationwizard/src/templates/operator/csm-powermax-1.8.0.template b/content/docs/deployment/csminstallationwizard/src/templates/operator/csm-powermax-1.8.0.template index c1837b72d5..043eec22e9 100644 --- a/content/docs/deployment/csminstallationwizard/src/templates/operator/csm-powermax-1.8.0.template +++ b/content/docs/deployment/csminstallationwizard/src/templates/operator/csm-powermax-1.8.0.template @@ -322,15 +322,15 @@ spec: # 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 + # observability: allows to configure observability - name: observability # enabled: Enable/Disable observability - enabled: $OBSERVABILITY_ENABLED + enabled: $OBSERVABILITY_OPERATOR_ENABLED configVersion: v1.5.0 components: - name: topology # enabled: Enable/Disable topology - enabled: false + enabled: $OBSERVABILITY_OPERATOR_ENABLED_TOPOLOGY # image: Defines karavi-topology image. This shouldn't be changed # Allowed values: string image: dellemc/csm-topology:v1.5.0 @@ -343,7 +343,7 @@ spec: - name: otel-collector # enabled: Enable/Disable OpenTelemetry Collector - enabled: false + enabled: $OBSERVABILITY_OPERATOR_ENABLED_OTEL # image: Defines otel-collector image. This shouldn't be changed # Allowed values: string image: otel/opentelemetry-collector:0.42.0 @@ -356,9 +356,9 @@ spec: - name: metrics-powermax # enabled: Enable/Disable PowerMax metrics - enabled: $POWERMAX_OBSERVABILITY_METRICS_ENABLED + enabled: $OBSERVABILITY_OPERATOR_ENABLED_METRICS # image: Defines PowerMax metrics image. This shouldn't be changed - image: dellemc/csm-metrics-powermax:v1.1.0 + image: dellemc/csm-metrics-powermax:v1.0.0 envs: # POWERMAX_MAX_CONCURRENT_QUERIES: set the default max concurrent queries to PowerMax # Allowed values: int @@ -400,6 +400,6 @@ spec: # Default value: "otel-collector:55680" - name: "COLLECTOR_ADDRESS" value: "otel-collector:55680" - # configMap name which has all array/endpoint related info + # configMap name which has all array/endpoint related info - name: "X_CSI_CONFIG_MAP_NAME" - value: "powermax-reverseproxy-config" + value: "powermax-reverseproxy-config" From 26497ae76a2f0b9cdd82449616f391dc13fdf596 Mon Sep 17 00:00:00 2001 From: Boya Murthy Date: Thu, 10 Aug 2023 11:14:46 +0530 Subject: [PATCH 03/14] updating tests --- .../src/static/js/tests/ui-functions.test.js | 20 +++++++++++++ .../src/static/js/ui-functions.js | 23 ++++++++++++--- .../src/static/js/utility.js | 28 +++++++++++-------- 3 files changed, 55 insertions(+), 16 deletions(-) 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 f382499d8c..05f61bd322 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 @@ -212,6 +212,26 @@ describe("GIVEN onCertManagerChange function", () => { }); }); +describe("GIVEN onTopologyChange function", () => { + test("SHOULD hide topology components when option not checked", () => { + document.body.innerHTML = ` + +
+ `; + onCertManagerChange("Temp topology note"); + expect($("div#topology-note-wrapper").css("display")).toEqual("none"); + }); + + test("SHOULD show topology components when option checked", () => { + document.body.innerHTML = ` + +
+
+
+ + +
+
+ +
+
+ +
+
+
+
+ + +
+
+
diff --git a/content/docs/deployment/csminstallationwizard/src/static/js/commands.js b/content/docs/deployment/csminstallationwizard/src/static/js/commands.js index af2862bf77..e30fffcf10 100644 --- a/content/docs/deployment/csminstallationwizard/src/static/js/commands.js +++ b/content/docs/deployment/csminstallationwizard/src/static/js/commands.js @@ -28,3 +28,4 @@ const veleroNote = 'If Velero is enabled, please add the respective credentials const podmonNote = 'Uncomment tolerations under node property, if CSM for Resiliency and CSI Driver pods monitor are enabled in the generated YAML'; const authorizationNote = 'Only the Authorization sidecar is enabled by the CSM Installation Wizard. The Proxy Server has to be installed and configured separately'; const topologyNote = 'If Node Topology is enabled, make sure topology configmap is created'; +const replicationNote = 'If Replication is enabled, ensure the Replication CRDs are installed and secrets are created. Enter the target cluster ID or "self" in case of stretched/single cluster'; 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 fd374074d2..231101d08f 100644 --- a/content/docs/deployment/csminstallationwizard/src/static/js/generate-yaml.js +++ b/content/docs/deployment/csminstallationwizard/src/static/js/generate-yaml.js @@ -21,6 +21,8 @@ var observabilityEnabled = false; var observabilityOperatorEnabled = false; var authorizationEnabled = false; var replicationEnabled = false; +var replicationOperatorEnabled = false; + function generateYamlFile(tmpl) { var yamlFile = null; @@ -47,6 +49,7 @@ function setValues(csmMapValues, CONSTANTS_PARAM) { DriverValues.controllerCount = document.getElementById("controller-count").value; DriverValues.volNamePrefix = document.getElementById("vol-name-prefix").value; DriverValues.snapNamePrefix = document.getElementById("snapshot-prefix").value; + DriverValues.targetClusterId = document.getElementById("target-cluster-id").value; DriverValues.fsGroupPolicy = document.getElementById("fsGroup-Policy").value; DriverValues.driverNamespace = document.getElementById("driver-namespace").value; DriverValues.labelValue = document.getElementById("label-value").value; @@ -78,6 +81,7 @@ function setValues(csmMapValues, CONSTANTS_PARAM) { DriverValues.nodePodsNodeSelector = nodeSelector; DriverValues.nodeTolerations = taints; } + DriverValues.replicationOperator = $("#replication-operator").prop('checked') ? true : false; DriverValues.snapshot = $("#snapshot").prop('checked') ? true : false; DriverValues.vgsnapshot = $("#vgsnapshot").prop('checked') ? true : false; DriverValues.resizer = $("#resizer").prop('checked') ? true : false; @@ -126,6 +130,8 @@ function createYamlString(yamlTpl, yamlTplValues, driverParam, CONSTANTS_PARAM) yamlTpl = yamlTpl.replaceAll("$CONTROLLER_COUNT", yamlTplValues.controllerCount); yamlTpl = yamlTpl.replaceAll("$VOLUME_NAME_PREFIX", yamlTplValues.volNamePrefix); yamlTpl = yamlTpl.replaceAll("$SNAP_NAME_PREFIX", yamlTplValues.snapNamePrefix); + yamlTpl = yamlTpl.replaceAll("$REPLICATION_OPERATOR_ENABLED", yamlTplValues.replicationOperator); + yamlTpl = yamlTpl.replaceAll("$TARGET_CLUSTER_ID", yamlTplValues.targetClusterId); yamlTpl = yamlTpl.replaceAll("$FSGROUP_POLICY", yamlTplValues.fsGroupPolicy); yamlTpl = yamlTpl.replaceAll("$NAMESPACE", yamlTplValues.driverNamespace); yamlTpl = yamlTpl.replaceAll("$CONTROLLER_POD_NODE_SELECTOR", yamlTplValues.controllerPodsNodeSelector); 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 05f61bd322..a4cc2551d8 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 @@ -164,6 +164,40 @@ describe("GIVEN onOperatorResiliencyChange function", () => { }); }); + +describe("GIVEN onObservabilityOperatorChange function", () => { + test("SHOULD hide observability components when option not checked", () => { + document.body.innerHTML = ` + +
+
+
+ + `; + + onObservabilityOperatorChange(); + + expect($("div#observability-operator-metrics-wrapper").css("display")).toEqual("none"); + expect($("div#observability-operator-topology-wrapper").css("display")).toEqual("none"); + expect($("div#observability-operator-otel-wrapper").css("display")).toEqual("none"); + }); + + test("SHOULD show podmon components when option checked", () => { + document.body.innerHTML = ` + +