From 8a878af99e48577f97325f81ac9bb6ad5365d7dd Mon Sep 17 00:00:00 2001 From: Abhinandan Purkait Date: Fri, 8 Mar 2024 12:11:07 +0000 Subject: [PATCH] feat(charts): add values to control etcd and loki hostpath sc creation Signed-off-by: Abhinandan Purkait --- chart/templates/etcd/storage/localpv-storageclass.yaml | 2 +- chart/templates/loki-stack/storage/localpv-storageclass.yaml | 2 +- chart/values.yaml | 4 ++++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/chart/templates/etcd/storage/localpv-storageclass.yaml b/chart/templates/etcd/storage/localpv-storageclass.yaml index 0f1614819..46e1cdb2e 100644 --- a/chart/templates/etcd/storage/localpv-storageclass.yaml +++ b/chart/templates/etcd/storage/localpv-storageclass.yaml @@ -1,4 +1,4 @@ -{{ if and (index .Values "localpv-provisioner" "enabled") .Values.etcd.persistence.enabled }} +{{ if and (index .Values "localpv-provisioner" "createEtcdSc") .Values.etcd.persistence.enabled }} apiVersion: storage.k8s.io/v1 kind: StorageClass metadata: diff --git a/chart/templates/loki-stack/storage/localpv-storageclass.yaml b/chart/templates/loki-stack/storage/localpv-storageclass.yaml index 57c457b6d..20fe31cd3 100644 --- a/chart/templates/loki-stack/storage/localpv-storageclass.yaml +++ b/chart/templates/loki-stack/storage/localpv-storageclass.yaml @@ -1,4 +1,4 @@ -{{ if and (index .Values "localpv-provisioner" "enabled") (index .Values "loki-stack" "loki" "persistence" "enabled") (index .Values "loki-stack" "enabled") }} +{{ if and (index .Values "localpv-provisioner" "createLokiSc") (index .Values "loki-stack" "loki" "persistence" "enabled") (index .Values "loki-stack" "enabled") }} apiVersion: storage.k8s.io/v1 kind: StorageClass metadata: diff --git a/chart/values.yaml b/chart/values.yaml index 977fe6a9e..1adaf8419 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -756,3 +756,7 @@ localpv-provisioner: enabled: false hostpathClass: enabled: false + # Create a hostpath storage class for mayastor-etcd. + createEtcdSc: true + # Create a hostpath storage class for Loki Stack. + createLokiSc: true