feat: Added cnpg
This commit is contained in:
@@ -9,6 +9,7 @@ resources:
|
|||||||
- ../../controllers/spegel/spegel.yaml
|
- ../../controllers/spegel/spegel.yaml
|
||||||
- ../../controllers/longhorn/longhorn.yaml
|
- ../../controllers/longhorn/longhorn.yaml
|
||||||
- ../../controllers/local-path-provisioner/local-path-provisioner.yaml
|
- ../../controllers/local-path-provisioner/local-path-provisioner.yaml
|
||||||
|
- ../../controllers/cnpg/cnpg.yaml
|
||||||
|
|
||||||
- ../../configs/artifacts.yaml
|
- ../../configs/artifacts.yaml
|
||||||
- ../../configs/letsencrypt/letsencrypt.yaml
|
- ../../configs/letsencrypt/letsencrypt.yaml
|
||||||
|
|||||||
@@ -37,5 +37,10 @@ spec:
|
|||||||
- name: local-path-provisioner
|
- name: local-path-provisioner
|
||||||
originRevision: "@foundation"
|
originRevision: "@foundation"
|
||||||
copy:
|
copy:
|
||||||
- from: "@foundation/controllers/local-path-provisioner/**"
|
- from: "@foundation/controllers/local-path-provisioner**"
|
||||||
|
to: "@artifact/"
|
||||||
|
- name: cnpg
|
||||||
|
originRevision: "@foundation"
|
||||||
|
copy:
|
||||||
|
- from: "@foundation/controllers/cnpg/**"
|
||||||
to: "@artifact/"
|
to: "@artifact/"
|
||||||
|
|||||||
29
controllers/cnpg/base/helm-release.yaml
Normal file
29
controllers/cnpg/base/helm-release.yaml
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||||
|
kind: HelmRelease
|
||||||
|
metadata:
|
||||||
|
name: cnpg
|
||||||
|
namespace: cnpg-system
|
||||||
|
spec:
|
||||||
|
interval: 12h
|
||||||
|
install:
|
||||||
|
strategy:
|
||||||
|
name: RetryOnFailure
|
||||||
|
retryInterval: 2m
|
||||||
|
upgrade:
|
||||||
|
strategy:
|
||||||
|
name: RetryOnFailure
|
||||||
|
retryInterval: 3m
|
||||||
|
chart:
|
||||||
|
spec:
|
||||||
|
chart: cloudnative-pg
|
||||||
|
version: "0.27.x"
|
||||||
|
sourceRef:
|
||||||
|
kind: HelmRepository
|
||||||
|
name: cnpg
|
||||||
|
interval: 24h
|
||||||
|
valuesFrom:
|
||||||
|
- kind: ConfigMap
|
||||||
|
name: values-base
|
||||||
|
- kind: ConfigMap
|
||||||
|
name: values-overlay
|
||||||
|
optional: true
|
||||||
8
controllers/cnpg/base/helm-repository.yaml
Normal file
8
controllers/cnpg/base/helm-repository.yaml
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
apiVersion: source.toolkit.fluxcd.io/v1
|
||||||
|
kind: HelmRepository
|
||||||
|
metadata:
|
||||||
|
name: cnpg
|
||||||
|
namespace: cnpg-system
|
||||||
|
spec:
|
||||||
|
interval: 24h
|
||||||
|
url: https://cloudnative-pg.github.io/charts
|
||||||
15
controllers/cnpg/base/kustomization.yaml
Normal file
15
controllers/cnpg/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: cnpg-system
|
||||||
|
files:
|
||||||
|
- values.yaml
|
||||||
6
controllers/cnpg/base/name-reference.yaml
Normal file
6
controllers/cnpg/base/name-reference.yaml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
nameReference:
|
||||||
|
- kind: ConfigMap
|
||||||
|
version: v1
|
||||||
|
fieldSpecs:
|
||||||
|
- path: spec/valuesFrom/name
|
||||||
|
kind: HelmRelease
|
||||||
4
controllers/cnpg/base/namespace.yaml
Normal file
4
controllers/cnpg/base/namespace.yaml
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Namespace
|
||||||
|
metadata:
|
||||||
|
name: cnpg-system
|
||||||
0
controllers/cnpg/base/values.yaml
Normal file
0
controllers/cnpg/base/values.yaml
Normal file
15
controllers/cnpg/cnpg.yaml
Normal file
15
controllers/cnpg/cnpg.yaml
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
apiVersion: kustomize.toolkit.fluxcd.io/v1
|
||||||
|
kind: Kustomization
|
||||||
|
metadata:
|
||||||
|
name: cnpg
|
||||||
|
namespace: flux-system
|
||||||
|
spec:
|
||||||
|
interval: 1h
|
||||||
|
retryInterval: 2m
|
||||||
|
timeout: 5m
|
||||||
|
sourceRef:
|
||||||
|
kind: ExternalArtifact
|
||||||
|
name: cnpg
|
||||||
|
path: ./${cluster_env}
|
||||||
|
prune: true
|
||||||
|
wait: true
|
||||||
10
controllers/cnpg/production/kustomization.yaml
Normal file
10
controllers/cnpg/production/kustomization.yaml
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
resources:
|
||||||
|
- ../base
|
||||||
|
|
||||||
|
configMapGenerator:
|
||||||
|
- name: values-overlay
|
||||||
|
namespace: cnpg-system
|
||||||
|
files:
|
||||||
|
- values.yaml
|
||||||
1
controllers/cnpg/production/values.yaml
Normal file
1
controllers/cnpg/production/values.yaml
Normal file
@@ -0,0 +1 @@
|
|||||||
|
replicaCount: 2
|
||||||
10
controllers/cnpg/staging/kustomization.yaml
Normal file
10
controllers/cnpg/staging/kustomization.yaml
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
resources:
|
||||||
|
- ../base
|
||||||
|
|
||||||
|
configMapGenerator:
|
||||||
|
- name: values-overlay
|
||||||
|
namespace: cnpg-system
|
||||||
|
files:
|
||||||
|
- values.yaml
|
||||||
1
controllers/cnpg/staging/values.yaml
Normal file
1
controllers/cnpg/staging/values.yaml
Normal file
@@ -0,0 +1 @@
|
|||||||
|
replicaCount: 1
|
||||||
Reference in New Issue
Block a user