diff --git a/.github/environments/values.dev.yaml b/.github/environments/values.dev.yaml index e1d63d35..eef1e238 100644 --- a/.github/environments/values.dev.yaml +++ b/.github/environments/values.dev.yaml @@ -32,25 +32,6 @@ postgres: # --------crunchydb config: ------ # -------------------------------- - # # --- resource allocation ---- - # instances: - # - name: db # do not change this name after initial install, pvc (data) and stateful sets will be deleted - # replicas: 2 - # dataVolumeClaimSpec: - # accessModes: - # - "ReadWriteOnce" - # resources: - # requests: - # storage: 0.5Gi - # storageClassName: "netapp-block-standard" - # resources: - # requests: - # cpu: 50m - # memory: 128Mi - # limits: - # cpu: 100m - # memory: 256Mi - # -------- backups --------- pgBackRestConfig: global: @@ -71,3 +52,49 @@ postgres: requests: storage: 2Gi storageClassName: "netapp-file-backup" + manual: + repoName: repo1 + options: + - --type=full + repoHost: + resources: + requests: + cpu: 20m + memory: 128Mi + limits: + cpu: 50m + memory: 256Mi + sidecars: + pgbackrest: + resources: + requests: + cpu: 5m + memory: 16Mi + limits: + cpu: 20m + memory: 64Mi + pgbackrestConfig: + resources: + requests: + cpu: 5m + memory: 32Mi + limits: + cpu: 20m + memory: 64Mi + jobs: + resources: + requests: + cpu: 10m + memory: 64Mi + limits: + cpu: 50m + memory: 128Mi + + # ----- do a databse backup restore + dataSource: + postgresCluster: + clusterName: postgres-master + repoName: repo1 + options: + - --type=time + - --target="2021-06-09 14:15:11-04" diff --git a/.github/environments/values.pr.yaml b/.github/environments/values.pr.yaml index 6f4820a2..55dd5b49 100644 --- a/.github/environments/values.pr.yaml +++ b/.github/environments/values.pr.yaml @@ -11,16 +11,15 @@ postgres: # --------crunchydb config: ------ # -------------------------------- - # --- resource allocation ---- instances: - name: db # do not change this name after initial install, pvc (data) and stateful sets will be deleted - replicas: 1 + replicas: 3 dataVolumeClaimSpec: accessModes: - "ReadWriteOnce" resources: requests: - storage: 0.5Gi + storage: .5Gi storageClassName: "netapp-block-standard" resources: requests: @@ -29,6 +28,15 @@ postgres: limits: cpu: 100m memory: 256Mi + sidecars: + replicaCertCopy: + resources: + requests: + cpu: 1m + memory: 32Mi + limits: + cpu: 50m + memory: 64Mi # -------- backups --------- pgBackRestConfig: {} diff --git a/.github/environments/values.prod.yaml b/.github/environments/values.prod.yaml index e1cc0650..b22a6077 100644 --- a/.github/environments/values.prod.yaml +++ b/.github/environments/values.prod.yaml @@ -32,7 +32,6 @@ postgres: # --------crunchydb config: ------ # -------------------------------- - # --- cluster resource allocation ---- instances: - name: db # do not change this name after initial install, pvc (data) and stateful sets will be deleted replicas: 3 @@ -41,18 +40,64 @@ postgres: - "ReadWriteOnce" resources: requests: - storage: 5Gi + storage: 2Gi storageClassName: "netapp-block-standard" resources: requests: - cpu: 1m - memory: 256Mi + cpu: 50m + memory: 128Mi limits: cpu: 100m - memory: 512Mi + memory: 256Mi + sidecars: + replicaCertCopy: + resources: + requests: + cpu: 1m + memory: 32Mi + limits: + cpu: 50m + memory: 64Mi # -------- backups --------- pgBackRestConfig: + manual: + repoName: repo1 + options: + - --type=full + repoHost: + resources: + requests: + cpu: 20m + memory: 128Mi + limits: + cpu: 50m + memory: 256Mi + sidecars: + pgbackrest: + resources: + requests: + cpu: 5m + memory: 16Mi + limits: + cpu: 20m + memory: 64Mi + pgbackrestConfig: + resources: + requests: + cpu: 5m + memory: 32Mi + limits: + cpu: 20m + memory: 64Mi + jobs: + resources: + requests: + cpu: 10m + memory: 64Mi + limits: + cpu: 50m + memory: 128Mi configuration: # secret for saving backups to S3 - secret: @@ -87,17 +132,13 @@ postgres: endpoint: https://nrs.objectstore.gov.bc.ca region: us-east-1 - # # ----- pgBouncer (network pooling) ------ - # pgBouncerConfig: - # replicas: 2 - # -------- monitoring --------- monitoring: true monitoringConfig: - resources: - requests: - cpu: 1m - memory: 16Mi - limits: - cpu: 35m - memory: 32Mi + resources: + requests: + cpu: 1m + memory: 16Mi + limits: + cpu: 35m + memory: 32Mi diff --git a/.github/environments/values.test.yaml b/.github/environments/values.test.yaml index 933f01f4..b52cb794 100644 --- a/.github/environments/values.test.yaml +++ b/.github/environments/values.test.yaml @@ -41,7 +41,7 @@ postgres: - "ReadWriteOnce" resources: requests: - storage: 0.5Gi + storage: 1Gi storageClassName: "netapp-block-standard" resources: requests: @@ -50,14 +50,64 @@ postgres: limits: cpu: 100m memory: 256Mi + sidecars: + replicaCertCopy: + resources: + requests: + cpu: 1m + memory: 32Mi + limits: + cpu: 50m + memory: 64Mi # -------- backups --------- pgBackRestConfig: + manual: + repoName: repo1 + options: + - --type=full + repoHost: + resources: + requests: + cpu: 20m + memory: 128Mi + limits: + cpu: 50m + memory: 256Mi + sidecars: + pgbackrest: + resources: + requests: + cpu: 5m + memory: 16Mi + limits: + cpu: 20m + memory: 64Mi + pgbackrestConfig: + resources: + requests: + cpu: 5m + memory: 32Mi + limits: + cpu: 20m + memory: 64Mi + jobs: + resources: + requests: + cpu: 10m + memory: 64Mi + limits: + cpu: 50m + memory: 128Mi global: # log-level-console: debug # --- pvc repo1-retention-full: "2" repo1-retention-diff: "3" + # --- s3 + repo2-path: /backups/common-object-management-service/postgres/test + repo2-retention-full: "30" + repo2-s3-uri-style: path repos: - name: repo1 schedules: @@ -71,7 +121,10 @@ postgres: requests: storage: 2Gi storageClassName: "netapp-file-backup" - - # # ----- pgBouncer (network pooling) ------ - # pgBouncerConfig: - # replicas: 2 + - name: repo2 + schedules: + full: "0 3 * * *" # full backup every day at 3am + s3: + bucket: csstops + endpoint: https://nrs.objectstore.gov.bc.ca + region: us-east-1 diff --git a/charts/coms/Chart.yaml b/charts/coms/Chart.yaml index 4bc0df82..119c57fb 100644 --- a/charts/coms/Chart.yaml +++ b/charts/coms/Chart.yaml @@ -3,7 +3,7 @@ name: common-object-management-service # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 1.1.3 +version: 1.1.5 kubeVersion: ">= 1.13.0" description: A microservice for managing access control to S3 Objects # A chart can be either an 'application' or a 'library' chart. @@ -28,7 +28,7 @@ sources: - https://github.com/bcgov/common-object-management-service dependencies: - name: postgrescluster - version: 1.1.3 + version: 1.1.5 repository: "file://../postgres" condition: postgres.enabled alias: postgres diff --git a/charts/coms/values.yaml b/charts/coms/values.yaml index 40443b0b..c4fb3be4 100644 --- a/charts/coms/values.yaml +++ b/charts/coms/values.yaml @@ -217,7 +217,7 @@ postgres: - "ReadWriteOnce" resources: requests: - storage: 0.5Gi + storage: 1Gi storageClassName: "netapp-block-standard" resources: requests: @@ -281,6 +281,14 @@ postgres: limits: cpu: 20m memory: 64Mi + pgbackrestConfig: + resources: + requests: + cpu: 5m + memory: 32Mi + limits: + cpu: 20m + memory: 64Mi jobs: resources: requests: diff --git a/charts/postgres/Chart.yaml b/charts/postgres/Chart.yaml index c8e06973..01213831 100644 --- a/charts/postgres/Chart.yaml +++ b/charts/postgres/Chart.yaml @@ -3,5 +3,5 @@ name: postgrescluster description: A Helm chart for Kubernetes type: application # The version below should match the version on the PostgresCluster CRD -version: 1.1.3 +version: 1.1.5 appVersion: 5.6.0