generated from onedr0p/cluster-template
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
destroy cpng cluster #791
Merged
Merged
destroy cpng cluster #791
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
no longer needed for the moment.
--- kubernetes/apps Kustomization: flux-system/cluster-apps Kustomization: flux-system/cloudnative-pg-cluster
+++ kubernetes/apps Kustomization: flux-system/cluster-apps Kustomization: flux-system/cloudnative-pg-cluster
@@ -1,42 +0,0 @@
----
-apiVersion: kustomize.toolkit.fluxcd.io/v1
-kind: Kustomization
-metadata:
- labels:
- kustomize.toolkit.fluxcd.io/name: cluster-apps
- kustomize.toolkit.fluxcd.io/namespace: flux-system
- name: cloudnative-pg-cluster
- namespace: flux-system
-spec:
- commonMetadata:
- labels:
- app.kubernetes.io/name: cloudnative-pg-cluster
- decryption:
- provider: sops
- secretRef:
- name: sops-age
- dependsOn:
- - name: cloudnative-pg
- interval: 30m
- path: ./kubernetes/apps/database/cloudnative-pg/cluster
- postBuild:
- substituteFrom:
- - kind: ConfigMap
- name: cluster-settings
- - kind: Secret
- name: cluster-secrets
- - kind: ConfigMap
- name: cluster-settings-user
- optional: true
- - kind: Secret
- name: cluster-secrets-user
- optional: true
- prune: true
- retryInterval: 1m
- sourceRef:
- kind: GitRepository
- name: home-kubernetes
- targetNamespace: database
- timeout: 5m
- wait: true
-
--- kubernetes/apps/database/cloudnative-pg/cluster Kustomization: flux-system/cloudnative-pg-cluster Cluster: database/postgres16
+++ kubernetes/apps/database/cloudnative-pg/cluster Kustomization: flux-system/cloudnative-pg-cluster Cluster: database/postgres16
@@ -1,61 +0,0 @@
----
-apiVersion: postgresql.cnpg.io/v1
-kind: Cluster
-metadata:
- labels:
- app.kubernetes.io/name: cloudnative-pg-cluster
- kustomize.toolkit.fluxcd.io/name: cloudnative-pg-cluster
- kustomize.toolkit.fluxcd.io/namespace: flux-system
- name: postgres16
- namespace: database
-spec:
- backup:
- barmanObjectStore:
- data:
- compression: bzip2
- destinationPath: s3://cnpg/
- endpointURL: http://minio.storage.svc.cluster.local:9000
- s3Credentials:
- accessKeyId:
- key: ACCESS_KEY_ID
- name: pg-backup-creds
- secretAccessKey:
- key: ACCESS_SECRET_KEY
- name: pg-backup-creds
- serverName: postgres16-v1
- wal:
- compression: bzip2
- maxParallel: 8
- retentionPolicy: 30d
- enableSuperuserAccess: true
- imageName: ghcr.io/cloudnative-pg/postgresql:16.3-1
- instances: 2
- monitoring:
- enablePodMonitor: true
- podMonitorMetricRelabelings:
- - action: replace
- sourceLabels:
- - cluster
- targetLabel: cnpg_cluster
- - action: labeldrop
- regex: cluster
- nodeMaintenanceWindow:
- inProgress: false
- reusePVC: true
- postgresql:
- parameters:
- max_connections: '200'
- shared_buffers: 256MB
- primaryUpdateStrategy: unsupervised
- resources:
- limits:
- memory: 4Gi
- requests:
- cpu: 250m
- memory: 512Mi
- storage:
- size: 2Gi
- storageClass: openebs-hostpath
- superuserSecret:
- name: cloudnative-pg-superuser
-
--- kubernetes/apps/database/cloudnative-pg/cluster Kustomization: flux-system/cloudnative-pg-cluster ScheduledBackup: database/postgres
+++ kubernetes/apps/database/cloudnative-pg/cluster Kustomization: flux-system/cloudnative-pg-cluster ScheduledBackup: database/postgres
@@ -1,17 +0,0 @@
----
-apiVersion: postgresql.cnpg.io/v1
-kind: ScheduledBackup
-metadata:
- labels:
- app.kubernetes.io/name: cloudnative-pg-cluster
- kustomize.toolkit.fluxcd.io/name: cloudnative-pg-cluster
- kustomize.toolkit.fluxcd.io/namespace: flux-system
- name: postgres
- namespace: database
-spec:
- backupOwnerReference: self
- cluster:
- name: postgres16
- immediate: true
- schedule: '@daily'
-
--- kubernetes/apps/database/cloudnative-pg/cluster Kustomization: flux-system/cloudnative-pg-cluster PrometheusRule: database/cloudnative-pg-rules
+++ kubernetes/apps/database/cloudnative-pg/cluster Kustomization: flux-system/cloudnative-pg-cluster PrometheusRule: database/cloudnative-pg-rules
@@ -1,69 +0,0 @@
----
-apiVersion: monitoring.coreos.com/v1
-kind: PrometheusRule
-metadata:
- labels:
- app.kubernetes.io/name: cloudnative-pg-cluster
- kustomize.toolkit.fluxcd.io/name: cloudnative-pg-cluster
- kustomize.toolkit.fluxcd.io/namespace: flux-system
- prometheus: k8s
- role: alert-rules
- name: cloudnative-pg-rules
- namespace: database
-spec:
- groups:
- - name: cloudnative-pg.rules
- rules:
- - alert: LongRunningTransaction
- annotations:
- description: Pod {{ $labels.pod }} is taking more than 5 minutes (300 seconds)
- for a query.
- summary: A query is taking longer than 5 minutes.
- expr: cnpg_backends_max_tx_duration_seconds > 300
- for: 1m
- labels:
- severity: warning
- - alert: BackendsWaiting
- annotations:
- description: Pod {{ $labels.pod }} has been waiting for longer than 5 minutes
- summary: If a backend is waiting for longer than 5 minutes
- expr: cnpg_backends_waiting_total > 300
- for: 1m
- labels:
- severity: warning
- - alert: PGDatabase
- annotations:
- description: Over 150,000,000 transactions from frozen xid on pod {{ $labels.pod
- }}
- summary: Number of transactions from the frozen XID to the current one
- expr: cnpg_pg_database_xid_age > 150000000
- for: 1m
- labels:
- severity: warning
- - alert: PGReplication
- annotations:
- description: Standby is lagging behind by over 300 seconds (5 minutes)
- summary: The standby is lagging behind the primary
- expr: cnpg_pg_replication_lag > 300
- for: 1m
- labels:
- severity: warning
- - alert: LastFailedArchiveTime
- annotations:
- description: Archiving failed for {{ $labels.pod }}
- summary: Checks the last time archiving failed. Will be < 0 when it has not
- failed.
- expr: (cnpg_pg_stat_archiver_last_failed_time - cnpg_pg_stat_archiver_last_archived_time)
- > 1
- for: 1m
- labels:
- severity: warning
- - alert: DatabaseDeadlockConflicts
- annotations:
- description: There are over 10 deadlock conflicts in {{ $labels.pod }}
- summary: Checks the number of database conflicts
- expr: cnpg_pg_stat_database_deadlocks > 10
- for: 1m
- labels:
- severity: warning
-
--- kubernetes/apps/database/cloudnative-pg/cluster Kustomization: flux-system/cloudnative-pg-cluster Service: database/postgres-lb
+++ kubernetes/apps/database/cloudnative-pg/cluster Kustomization: flux-system/cloudnative-pg-cluster Service: database/postgres-lb
@@ -1,24 +0,0 @@
----
-apiVersion: v1
-kind: Service
-metadata:
- annotations:
- external-dns.alpha.kubernetes.io/hostname: postgres...PLACEHOLDER_SECRET_DOMAIN..
- io.cilium/lb-ipam-ips: 192.168.1.213
- labels:
- app.kubernetes.io/name: cloudnative-pg-cluster
- kustomize.toolkit.fluxcd.io/name: cloudnative-pg-cluster
- kustomize.toolkit.fluxcd.io/namespace: flux-system
- name: postgres-lb
- namespace: database
-spec:
- ports:
- - name: postgres
- port: 5432
- protocol: TCP
- targetPort: 5432
- selector:
- cnpg.io/cluster: postgres16
- role: primary
- type: LoadBalancer
- |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
no longer needed for the moment.