feat: Separate config for production/testing
This commit is contained in:
@@ -22,17 +22,9 @@ spec:
|
|||||||
kind: HelmRepository
|
kind: HelmRepository
|
||||||
name: longhorn
|
name: longhorn
|
||||||
interval: 24h
|
interval: 24h
|
||||||
values:
|
valuesFrom:
|
||||||
# TODO: These settings are specific to testing
|
- kind: ConfigMap
|
||||||
defaultSettings:
|
name: values-base
|
||||||
defaultReplicaCount: 1
|
- kind: ConfigMap
|
||||||
defaultDataPath: /var/mnt/longhorn
|
name: values-overlay
|
||||||
replicaAutoBalance: best-effort
|
optional: true
|
||||||
defaultDataLocality: best-effort
|
|
||||||
freezeFilesystemForSnapshot: true
|
|
||||||
storageReservedPercentageForDefaultDisk: 0
|
|
||||||
storageMinimalAvailablePercentage: 10
|
|
||||||
storageOverProvisioningPercentage: 25
|
|
||||||
persistence:
|
|
||||||
defaultClassReplicaCount: 1
|
|
||||||
defaultDataLocality: best-effort
|
|
||||||
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:
|
sourceRef:
|
||||||
kind: ExternalArtifact
|
kind: ExternalArtifact
|
||||||
name: longhorn
|
name: longhorn
|
||||||
path: ./
|
path: ./${cluster_env}
|
||||||
prune: true
|
prune: true
|
||||||
wait: 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