Skip to content

Commit 402992b

Browse files
authored
MKS and image manipulation (#221)
* MKS and image manipulation Signed-off-by: Michael Mattsson <[email protected]>
1 parent 7e73458 commit 402992b

File tree

5 files changed

+112
-9
lines changed

5 files changed

+112
-9
lines changed

docs/csi_driver/deployment.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -147,15 +147,15 @@ kubectl get csv -n my-hpe-csi-operator
147147
Next, a `HPECSIDriver` object needs to be instantiated. Create a file named `hpe-csi-operator.yaml`, edit and apply (or copy the command from the top of the content).
148148

149149
```yaml fct_label="HPE CSI Operator v2.5.1"
150-
# kubectl apply -f {{ config.site_url }}csi_driver/examples/deployment/hpecsidriver-v2.5.1-sample.yaml
150+
# kubectl apply -n hpe-storage -f {{ config.site_url }}csi_driver/examples/deployment/hpecsidriver-v2.5.1-sample.yaml
151151
{% include "csi_driver/examples/deployment/hpecsidriver-v2.5.1-sample.yaml" %}```
152152

153153
```yaml fct_label="v2.4.2"
154-
# kubectl apply -f {{ config.site_url }}csi_driver/examples/deployment/hpecsidriver-v2.4.2-sample.yaml
154+
# kubectl apply -n hpe-storage -f {{ config.site_url }}csi_driver/examples/deployment/hpecsidriver-v2.4.2-sample.yaml
155155
{% include "csi_driver/examples/deployment/hpecsidriver-v2.4.2-sample.yaml" %}```
156156

157157
```yaml fct_label="v2.4.1"
158-
# kubectl apply -f {{ config.site_url }}csi_driver/examples/deployment/hpecsidriver-v2.4.1-sample.yaml
158+
# kubectl apply -n hpe-storage -f {{ config.site_url }}csi_driver/examples/deployment/hpecsidriver-v2.4.1-sample.yaml
159159
{% include "csi_driver/examples/deployment/hpecsidriver-v2.4.1-sample.yaml" %}```
160160

161161
!!! tip

docs/csi_driver/operations.md

+74
Original file line numberDiff line numberDiff line change
@@ -541,3 +541,77 @@ mount -t nfs4 192.168.1.40:/export /mnt
541541

542542
!!! note
543543
If the NFS server is rescheduled in the Kubernetes cluster, the load balancer IP address follows, and the client will recover and resume IO after a few minutes.
544+
545+
## Apply Custom Images to the Helm Chart and Operator
546+
547+
Container images that comprise the CSI driver can be individually replaced supply a fix, workaround or address a particular Common Vulnerability and Exposure (CVE).
548+
549+
It's preferred to perform these actions while using the Helm chart or Operator. Images may be changed directly in running `Deployments` and `DaemonSets` while the CSI driver is deployed with either YAML manifests or the Helm chart. The Operator will not tolerate runtime changes and the `HPECSIDriver` resource needs to be updated for the change to take.
550+
551+
!!! important
552+
The examples below demonstrates how to replace the CSI node and controller driver only. HPE may ask to replace any number of images comprising the HPE CSI Driver, such as a CSP or upstream sidecar.
553+
554+
### Helm
555+
556+
Parameters supplied to a Helm can be inserted either on the command-line or using a "values" YAML file. For an overview of parameters and in this case container images that needs to be manipulated, dump the values file for the chart.
557+
558+
```text
559+
helm show values hpe-storage/hpe-csi-driver
560+
```
561+
562+
!!! tip "Clarification"
563+
The above command will dump the values for the latest chart in the repository. It will not contain any locally installed values. To pull the values of an installed CSI driver chart, use `helm get values -n hpe-storage my-hpe-csi-driver`.
564+
565+
The section of the values file that concerns container image manipulation is `.images`.
566+
567+
#### Via Command-Line
568+
569+
Imagine there's a patch release from engineering to address a particular issue, say "CON-1234" in the CSI driver images.
570+
571+
```text
572+
helm install --create-namespace -n hpe-storage my-hpe-csi-driver \
573+
--set images.csiNodeDriver=quay.io/hpestorage/csi-driver:v0.0.0-CON-1234 \
574+
--set images.csiControllerDriver=quay.io/hpestorage/csi-driver:v0.0.0-CON-1234 \
575+
hpe-storage/hpe-csi-driver
576+
```
577+
578+
#### Via values.yaml
579+
580+
Since the built-in values provide sane defaults, it's only necessary to manipulate the keys and values that are relevant to the change. If there are other changes that are necessary for this particular install, supply those parameters as well.
581+
582+
```yaml
583+
---
584+
images:
585+
csiNodeDriver: quay.io/hpestorage/csi-driver:v0.0.0-CON-1234
586+
csiControllerDriver: quay.io/hpestorage/csi-driver:v0.0.0-CON-1234
587+
```
588+
589+
Install the chart with the contents above in a `values.yaml` file:
590+
591+
```text
592+
helm install --create-namespace -nhpe-storage my-hpe-csi-driver \
593+
-f values.yaml \
594+
hpe-storage/hpe-csi-driver
595+
```
596+
597+
!!! note
598+
These are generic circumstances to illustrate the relevant steps to apply custom parameters. Be aware of the particular parameters the CSI driver has been installed with for your situation.
599+
600+
### Operator
601+
602+
The Operator manages the Helm chart with a `HPECSIDriver` resource in the chosen `Namespace`, usually "hpe-storage". Changes can be made to the `HPECSIDriver` resource during runtime using either "edit" or "patch" commands but it's recommended to manipulate the source YAML file.
603+
604+
Similar to the Helm chart, the `.spec.images` section needs to be manipulated.
605+
606+
```yaml
607+
---
608+
spec:
609+
images:
610+
csiNodeDriver: quay.io/hpestorage/csi-driver:v0.0.0-CON-1234
611+
csiControllerDriver: quay.io/hpestorage/csi-driver:v0.0.0-CON-1234
612+
```
613+
614+
Visit the [Deployment section](deployment.md#upstream_kubernetes_and_others) for instructions on how to apply the `HPECSIDriver` resource.
615+
616+
!!! tip "Good to Know"
617+
It's recommended to run the CSI driver with the bundled images and only apply changes when instructed by HPE. Customers may replace images as they desire but may need to revert installations when engaging with HPE support.
Original file line numberDiff line numberDiff line change
@@ -1 +1,30 @@
1-
Placeholder.
1+
# Introduction
2+
3+
HPE Morpheus Kubernetes Service allows customers to deploy and manage Kubernetes clusters through the Morpheus hybrid cloud management platform. Since Morpheus uses a standard Linux distribution and upstream Kubernetes, the solution is fully supported by HPE CSI Driver for Kubernetes.
4+
5+
Familiarize yourself on how to install a [Morpheus Kubernetes Service](https://docs.morpheusdata.com/en/latest/infrastructure/clusters/clusters.html#kubernetes-clusters) cluster on your infrastructure
6+
7+
[TOC]
8+
9+
!!! tip "Brownfield Managed Clusters"
10+
Clusters that have been deployed prior to being managed by Morpheus are subject to qualification using the [Compatibility and Support](../../index.md#latest_release) matrix. Both the host OS and Kubernetes distribution needs to be supported.
11+
12+
## Installation
13+
14+
Users may deploy the HPE CSI Driver for Kubernetes on the managed cluster with their preferred method. HPE strongly recommend using the Helm chart.
15+
16+
- Visit [ArtifactHub.io](https://artifacthub.io/packages/helm/hpe-storage/hpe-csi-driver) for installation instructions for the Helm chart.
17+
- Instructions how to [install via the Operator-managed](../../deployment.md#operator) Helm chart.
18+
19+
### Next Steps
20+
21+
Once the CSI driver is installed, a `Secret` and a `StorageClass` is needed to provision `PersistentVolumes`.
22+
23+
- [Add an HPE storage backend](../../deployment.md#add_an_hpe_storage_backend).
24+
- [Create a base `StorageClass`](../../using.md#base_storageclass_parameters).
25+
26+
## Known Issues and Limitations
27+
28+
All most recent configurations will most likely work and be supported by HPE. Here are some of the current limitations and issues.
29+
30+
- Morpheus allows users to deploy and manage Kubernetes on AWS. The logical choice for storage would be [HPE GreenLake Block Storage for AWS](https://aws.amazon.com/marketplace/pp/prodview-rvhlswizjagfs) but the HPE CSI Driver for Kubernetes is not yet supported with the storage platform.

docs/csi_driver/using.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -149,10 +149,10 @@ Common HPE CSI Driver `StorageClass` parameters across CSPs.
149149
| nfsNodeSelector | Text | Customize the `nodeSelector` label value for the NFS `Pod`. The default behavior is to omit the `nodeSelector`. |
150150
| nfsMountOptions | Text | Customize NFS mount options for the `Pods` to the server `Deployment`. Uses `mount` command defaults from the node. |
151151
| nfsProvisionerImage | Text | Customize provisioner image for the server `Deployment`. Default: Official build from "hpestorage/nfs-provisioner" repo |
152-
| nfsResourceRequestsCpuM | Text | Specify CPU requests for the server `Deployment` in milli CPU. Default: "500m". Example: "4000m" |
153-
| nfsResourceRequestsMemoryMi | Text | Specify memory requests (in megabytes) for the server `Deployment`. Default: "512Mi". Example: "4096Mi". |
154-
| nfsResourceLimitsCpuM | Text | Specify CPU limits for the server `Deployment` in milli CPU. Default: "1000m". Example: "4000m" |
155-
| nfsResourceLimitsMemoryMi | Text | Specify memory limits (in megabytes) for the server `Deployment`. Default: "2048Mi". Example: "500Mi". Recommended minimum: "2048Mi". |
152+
| nfsResourceRequestsCpuM | Text | Specify CPU requests for the server `Deployment` in milli CPU. Default: "500m". Example: "4000m". Set to "0" to disable. |
153+
| nfsResourceRequestsMemoryMi | Text | Specify memory requests (in megabytes) for the server `Deployment`. Default: "512Mi". Example: "4096Mi". Set to "0" to disable. |
154+
| nfsResourceLimitsCpuM | Text | Specify CPU limits for the server `Deployment` in milli CPU. Default: "1000m". Example: "4000m". Set to "0" to disable. |
155+
| nfsResourceLimitsMemoryMi | Text | Specify memory limits (in megabytes) for the server `Deployment`. Default: "2048Mi". Example: "500Mi". Recommended minimum: "2048Mi". Set to "0" to disable. |
156156
| hostEncryption | Boolean | Direct the CSI driver to invoke Linux Unified Key Setup (LUKS) via the `dm-crypt` kernel module. Default: "false". See [Volume encryption](#using_volume_encryption) to learn more. |
157157
| hostEncryptionSecretName | Text | Name of the `Secret` to use for the volume encryption. Mandatory if "hostEncryption" is enabled. Default: "" |
158158
| hostEncryptionSecretNamespace | Text | `Namespace` where to find "hostEncryptionSecretName". Default: "" |

mkdocs.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ nav:
6868
- 'Auxiliary Operations': 'csi_driver/operations.md'
6969
- 'Diagnostics': 'csi_driver/diagnostics.md'
7070
- 'Partner Ecosystems':
71+
- 'HPE Morpheus Kubernetes Service': 'csi_driver/partners/hpe_morpheus/install.md'
7172
- 'HPE Ezmeral Runtime Enterprise': 'csi_driver/partners/hpe_ezmeral/install.md'
72-
# - 'HPE Morpheus Kubernetes Service': 'csi_driver/partners/hpe_morpheus/install.md'
7373
- 'Amazon EKS Anywhere': 'csi_driver/partners/amazon_eks_anywhere/index.md'
7474
- 'Canonical': 'csi_driver/partners/canonical/index.md'
7575
- 'Cohesity': 'csi_driver/partners/cohesity/index.md'

0 commit comments

Comments
 (0)