Add Flux CD for Helm deployment
Sem-Ver: feature
Change-Id: I27b08b4be9504045727a4cc2793f7d71c190a1c1
diff --git a/roles/ceph_csi_rbd/tasks/main.yml b/roles/ceph_csi_rbd/tasks/main.yml
index b8839ee..5cdcbd4 100644
--- a/roles/ceph_csi_rbd/tasks/main.yml
+++ b/roles/ceph_csi_rbd/tasks/main.yml
@@ -54,32 +54,52 @@
_ceph_rbd_csi_ceph_keyring: "{{ _ceph_key.stdout | from_json | first }}"
- name: Deploy Helm chart
- kubernetes.core.helm:
- name: ceph-csi-rbd
- chart_ref: ceph/ceph-csi-rbd
- chart_version: 3.5.1
- release_namespace: kube-system
- kubeconfig: /etc/kubernetes/admin.conf
- values:
- csiConfig:
- - clusterID: "{{ ceph_csi_rbd_ceph_fsid }}"
- monitors: "{{ ceph_monitors }}"
- nodeplugin:
- httpMetrics:
- containerPort: 8081
- provisioner:
- nodeSelector:
- openstack-control-plane: enabled
- storageClass:
- create: true
- name: general
- annotations:
- storageclass.kubernetes.io/is-default-class: "true"
- clusterID: "{{ ceph_csi_rbd_ceph_fsid }}"
- pool: "{{ ceph_csi_rbd_pool }}"
- mountOptions:
- - discard
- secret:
- create: true
- userID: "{{ ceph_csi_rbd_id }}"
- userKey: "{{ _ceph_rbd_csi_ceph_keyring.key }}"
+ kubernetes.core.k8s:
+ state: present
+ definition:
+ - apiVersion: source.toolkit.fluxcd.io/v1beta2
+ kind: HelmRepository
+ metadata:
+ name: ceph
+ namespace: kube-system
+ spec:
+ interval: 60s
+ url: https://ceph.github.io/csi-charts
+
+ - apiVersion: helm.toolkit.fluxcd.io/v2beta1
+ kind: HelmRelease
+ metadata:
+ name: ceph-csi-rbd
+ namespace: kube-system
+ spec:
+ interval: 60s
+ chart:
+ spec:
+ chart: ceph-csi-rbd
+ version: 3.5.1
+ sourceRef:
+ kind: HelmRepository
+ name: ceph
+ values:
+ csiConfig:
+ - clusterID: "{{ ceph_csi_rbd_ceph_fsid }}"
+ monitors: "{{ ceph_monitors }}"
+ nodeplugin:
+ httpMetrics:
+ containerPort: 8081
+ provisioner:
+ nodeSelector:
+ openstack-control-plane: enabled
+ storageClass:
+ create: true
+ name: general
+ annotations:
+ storageclass.kubernetes.io/is-default-class: "true"
+ clusterID: "{{ ceph_csi_rbd_ceph_fsid }}"
+ pool: "{{ ceph_csi_rbd_pool }}"
+ mountOptions:
+ - discard
+ secret:
+ create: true
+ userID: "{{ ceph_csi_rbd_id }}"
+ userKey: "{{ _ceph_rbd_csi_ceph_keyring.key }}"