mirror of
https://github.com/wahyd4/home-argocd.git
synced 2026-08-08 21:05:09 +10:00
137 lines
3.6 KiB
YAML
137 lines
3.6 KiB
YAML
apiVersion: argoproj.io/v1alpha1
|
|
kind: Application
|
|
metadata:
|
|
name: new-postgres
|
|
namespace: argocd
|
|
spec:
|
|
project: default
|
|
source:
|
|
chart: postgresql
|
|
repoURL: https://charts.bitnami.com/bitnami
|
|
path: postgresql
|
|
targetRevision: 11.9.13
|
|
helm:
|
|
releaseName: new-postgres
|
|
# valueFiles: ['postgres-values.yaml']
|
|
values: |
|
|
# image:
|
|
# repository: postgres
|
|
# tag: 11
|
|
# postgresqlDataDir: /bitnami/postgresql
|
|
postgresqlDatabase: home
|
|
|
|
global:
|
|
# storageClass: local-storage
|
|
postgresql:
|
|
auth:
|
|
database: junv-db
|
|
# TODO: need to UPDATE DATA before update this image tag
|
|
# error: DETAIL: The data directory was initialized by PostgreSQL version 11, which is not compatible with this version 14.1.
|
|
image:
|
|
tag: 11
|
|
|
|
volumePermissions:
|
|
enabled: true
|
|
securityContext:
|
|
fsGroup: 1000
|
|
runAsUser: 1000
|
|
metrics:
|
|
enabled: true
|
|
extraEnvVars:
|
|
- name: PG_EXPORTER_AUTO_DISCOVER_DATABASES
|
|
value: "true"
|
|
- name: DATA_SOURCE_NAME
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: postgresql-data-source-name
|
|
key: DATA_SOURCE_NAME
|
|
serviceMonitor:
|
|
enabled: true
|
|
namespace: db
|
|
selector:
|
|
app.kubernetes.io/instance: new-postgres
|
|
app.kubernetes.io/name: postgresql
|
|
app.kubernetes.io/component: primary
|
|
|
|
|
|
customLivenessProbe:
|
|
exec:
|
|
command:
|
|
- telnet
|
|
- localhost
|
|
- 5432
|
|
initialDelaySeconds: 15
|
|
periodSeconds: 5
|
|
timeoutSeconds: 5
|
|
successThreshold: 2
|
|
failureThreshold: 6
|
|
|
|
customRreadinessProbe:
|
|
exec:
|
|
command:
|
|
- telnet
|
|
- localhost
|
|
- 5432
|
|
initialDelaySeconds: 15
|
|
periodSeconds: 5
|
|
timeoutSeconds: 5
|
|
successThreshold: 2
|
|
failureThreshold: 6
|
|
|
|
primary:
|
|
podSecurityContext:
|
|
enabled: true
|
|
fsGroup: 1000
|
|
containerSecurityContext:
|
|
enabled: true
|
|
runAsUser: 1000
|
|
extendedConfiguration: |
|
|
max_connections = 300
|
|
shared_buffers = 128MB
|
|
labels:
|
|
role: primary
|
|
service:
|
|
type: ClusterIP
|
|
nodePort:
|
|
postgresql: 32222
|
|
terminationGracePeriodSeconds: 5
|
|
resources:
|
|
requests:
|
|
memory: 400Mi
|
|
cpu: 250m
|
|
persistence:
|
|
mountPath: /bitnami/postgresql
|
|
existingClaim: postgres-local-pvc
|
|
nodeSelector:
|
|
kubernetes.io/hostname: server-3
|
|
tolerations:
|
|
- key: "node"
|
|
operator: "Equal"
|
|
value: "special"
|
|
effect: "NoSchedule"
|
|
- key: node-role.kubernetes.io/master
|
|
operator: Equal
|
|
value: ""
|
|
effect: NoSchedule
|
|
- key: node-role.kubernetes.io/control-plane
|
|
operator: Equal
|
|
value: ""
|
|
effect: NoSchedule
|
|
|
|
readReplicas:
|
|
replicaCount: 1
|
|
persistence:
|
|
enabled: true
|
|
storageClass: nfs-client
|
|
size: 20Gi
|
|
|
|
|
|
|
|
destination:
|
|
server: https://kubernetes.default.svc
|
|
namespace: db
|
|
syncPolicy:
|
|
automated:
|
|
prune: true
|
|
selfHeal: true
|