Skip to content

Commit db2254f

Browse files
netapp_nvme with netapp credentials as volume mount
1 parent c46b34c commit db2254f

File tree

4 files changed

+57
-0
lines changed

4 files changed

+57
-0
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
apiVersion: external-secrets.io/v1beta1
3+
kind: ExternalSecret
4+
metadata:
5+
name: cinder-netapp-config
6+
namespace: openstack
7+
spec:
8+
refreshInterval: 1h
9+
secretStoreRef:
10+
kind: ClusterSecretStore
11+
name: openstack
12+
target:
13+
name: cinder-netapp-config
14+
creationPolicy: Owner
15+
deletionPolicy: Delete
16+
template:
17+
engineVersion: v2
18+
data:
19+
netapp_nvme.conf: |
20+
[netapp_nvme]
21+
netapp_login = {{ .netapp_username }}
22+
netapp_password = {{ .netapp_password }}
23+
netapp_server_hostname = {{ .netapp_host }}
24+
netapp_server_port = 443
25+
netapp_storage_family = ontap_cluster
26+
netapp_storage_protocol = nvme
27+
netapp_transport_type = https
28+
netapp_use_legacy_client = false
29+
netapp_vserver = data-svm1
30+
volume_backend_name = netapp_nvme
31+
volume_driver = cinder.volume.drivers.netapp.common.NetAppDriver
32+
data:
33+
- secretKey: netapp_username
34+
remoteRef:
35+
key: svc-acct-netapp
36+
property: username
37+
- secretKey: netapp_password
38+
remoteRef:
39+
key: svc-acct-netapp
40+
property: password
41+
- secretKey: netapp_host
42+
remoteRef:
43+
key: svc-acct-netapp
44+
property: host

components/cinder/kustomization.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ kind: Kustomization
55
resources:
66
- cinder-mariadb-db.yaml
77
- cinder-rabbitmq-queue.yaml
8+
- cinder-volume-netapp.yaml

components/cinder/values.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ conf:
55
backends:
66
# disable the hardcoded one in the OpenStack Helm values.yaml
77
rbd1: null
8+
cinder:
9+
DEFAULT:
10+
enabled_backends: netapp_nvme
11+
default_volume_type: netapp_nvme
812

913
# typically overridden by environmental
1014
# values, but should include all endpoints
@@ -56,9 +60,16 @@ pod:
5660
volumeMounts:
5761
- mountPath: /var/lib/cinder
5862
name: var-lib-cinder
63+
- mountPath: /etc/cinder/cinder.conf.d/netapp_nvme.conf
64+
subPath: netapp_nvme.conf
65+
name: volume-backend
66+
readOnly: true
5967
volumes:
6068
- name: var-lib-cinder
6169
emptyDir: {}
70+
- name: volume-backend
71+
secret:
72+
secretName: cinder-netapp-config
6273
lifecycle:
6374
disruption_budget:
6475
deployments:

components/openstack/secretstore-openstack.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ rules:
2626
- watch
2727
resourceNames:
2828
- svc-acct-argoworkflow
29+
- svc-acct-netapp
2930
- apiGroups:
3031
- authorization.k8s.io
3132
resources:

0 commit comments

Comments
 (0)