feat: Separate config for production/testing
This commit is contained in:
@@ -22,17 +22,9 @@ spec:
|
||||
kind: HelmRepository
|
||||
name: longhorn
|
||||
interval: 24h
|
||||
values:
|
||||
# TODO: These settings are specific to testing
|
||||
defaultSettings:
|
||||
defaultReplicaCount: 1
|
||||
defaultDataPath: /var/mnt/longhorn
|
||||
replicaAutoBalance: best-effort
|
||||
defaultDataLocality: best-effort
|
||||
freezeFilesystemForSnapshot: true
|
||||
storageReservedPercentageForDefaultDisk: 0
|
||||
storageMinimalAvailablePercentage: 10
|
||||
storageOverProvisioningPercentage: 25
|
||||
persistence:
|
||||
defaultClassReplicaCount: 1
|
||||
defaultDataLocality: best-effort
|
||||
valuesFrom:
|
||||
- kind: ConfigMap
|
||||
name: values-base
|
||||
- kind: ConfigMap
|
||||
name: values-overlay
|
||||
optional: true
|
||||
15
controllers/longhorn/base/kustomization.yaml
Normal file
15
controllers/longhorn/base/kustomization.yaml
Normal file
@@ -0,0 +1,15 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- namespace.yaml
|
||||
- helm-repository.yaml
|
||||
- helm-release.yaml
|
||||
|
||||
configurations:
|
||||
- name-reference.yaml
|
||||
|
||||
configMapGenerator:
|
||||
- name: values-base
|
||||
namespace: longhorn-system
|
||||
files:
|
||||
- values.yaml
|
||||
6
controllers/longhorn/base/name-reference.yaml
Normal file
6
controllers/longhorn/base/name-reference.yaml
Normal file
@@ -0,0 +1,6 @@
|
||||
nameReference:
|
||||
- kind: ConfigMap
|
||||
version: v1
|
||||
fieldSpecs:
|
||||
- path: spec/valuesFrom/name
|
||||
kind: HelmRelease
|
||||
10
controllers/longhorn/base/values.yaml
Normal file
10
controllers/longhorn/base/values.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
defaultSettings:
|
||||
defaultDataPath: /var/mnt/longhorn
|
||||
replicaAutoBalance: best-effort
|
||||
defaultDataLocality: best-effort
|
||||
freezeFilesystemForSnapshot: true
|
||||
storageReservedPercentageForDefaultDisk: 0
|
||||
storageMinimalAvailablePercentage: 10
|
||||
storageOverProvisioningPercentage: 25
|
||||
persistence:
|
||||
defaultDataLocality: best-effort
|
||||
@@ -1,6 +0,0 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- namespace.yaml
|
||||
- helm-repository.yaml
|
||||
- helm-release.yaml
|
||||
@@ -10,6 +10,6 @@ spec:
|
||||
sourceRef:
|
||||
kind: ExternalArtifact
|
||||
name: longhorn
|
||||
path: ./
|
||||
path: ./${cluster_env}
|
||||
prune: true
|
||||
wait: true
|
||||
|
||||
10
controllers/longhorn/production/kustomization.yaml
Normal file
10
controllers/longhorn/production/kustomization.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- ../base
|
||||
|
||||
configMapGenerator:
|
||||
- name: values-overlay
|
||||
namespace: longhorn-system
|
||||
files:
|
||||
- values.yaml
|
||||
4
controllers/longhorn/production/values.yaml
Normal file
4
controllers/longhorn/production/values.yaml
Normal file
@@ -0,0 +1,4 @@
|
||||
defaultSettings:
|
||||
defaultReplicaCount: 2
|
||||
persistence:
|
||||
defaultClassReplicaCount: 2
|
||||
10
controllers/longhorn/staging/kustomization.yaml
Normal file
10
controllers/longhorn/staging/kustomization.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- ../base
|
||||
|
||||
configMapGenerator:
|
||||
- name: values-overlay
|
||||
namespace: longhorn-system
|
||||
files:
|
||||
- values.yaml
|
||||
4
controllers/longhorn/staging/values.yaml
Normal file
4
controllers/longhorn/staging/values.yaml
Normal file
@@ -0,0 +1,4 @@
|
||||
defaultSettings:
|
||||
defaultReplicaCount: 1
|
||||
persistence:
|
||||
defaultClassReplicaCount: 1
|
||||
Reference in New Issue
Block a user