Staging instance, all changes can be removed at any time

Skip to content

archive-staging-rke2/next-version: Add empty archive db

Antoine R. Dumont requested to merge initialize-next-version-archive-db into production

We should be able to just create a basic database without anything inside (with the proper roles though).

It will be initialized and populated later (either through init-container or manually via the toolbox).

helm diff
[cluster-components] Comparing changes between branches production and initialize-next-version-archive-db...
Your branch is up to date with 'origin/production'.
[cluster-components] Generate config in production branch for cluster-components/values/admin-rke2.yaml...
[cluster-components] Generate config in production branch for cluster-components/values/archive-production-rke2.yaml...
[cluster-components] Generate config in production branch for cluster-components/values/archive-staging-rke2.yaml...
[cluster-components] Generate config in production branch for cluster-components/values/default.yaml...
[cluster-components] Generate config in production branch for cluster-components/values/gitlab-production.yaml...
[cluster-components] Generate config in production branch for cluster-components/values/gitlab-staging.yaml...
[cluster-components] Generate config in production branch for cluster-components/values/minikube.yaml...
[cluster-components] Generate config in production branch for cluster-components/values/rancher.yaml...
[cluster-components] Generate config in production branch for cluster-components/values/test-staging-rke2.yaml...
[cluster-components] Generate config in initialize-next-version-archive-db branch for cluster-components/values/admin-rke2.yaml...
[cluster-components] Generate config in initialize-next-version-archive-db branch for cluster-components/values/archive-production-rke2.yaml...
[cluster-components] Generate config in initialize-next-version-archive-db branch for cluster-components/values/archive-staging-rke2.yaml...
[cluster-components] Generate config in initialize-next-version-archive-db branch for cluster-components/values/default.yaml...
[cluster-components] Generate config in initialize-next-version-archive-db branch for cluster-components/values/gitlab-production.yaml...
[cluster-components] Generate config in initialize-next-version-archive-db branch for cluster-components/values/gitlab-staging.yaml...
[cluster-components] Generate config in initialize-next-version-archive-db branch for cluster-components/values/minikube.yaml...
[cluster-components] Generate config in initialize-next-version-archive-db branch for cluster-components/values/rancher.yaml...
[cluster-components] Generate config in initialize-next-version-archive-db branch for cluster-components/values/test-staging-rke2.yaml...


------------- diff for cluster-components/values/admin-rke2.yaml -------------

     _        __  __
   _| |_   _ / _|/ _|  between /tmp/swh-chart.cluster-components.TWBy4zY0/admin-rke2.yaml.before, 31 documents
 / _' | | | | |_| |_       and /tmp/swh-chart.cluster-components.TWBy4zY0/admin-rke2.yaml.after, 31 documents
| (_| | |_| |  _|  _|
 \__,_|\__, |_| |_|   returned no differences
        |___/



------------- diff for cluster-components/values/archive-production-rke2.yaml -------------

     _        __  __
   _| |_   _ / _|/ _|  between /tmp/swh-chart.cluster-components.TWBy4zY0/archive-production-rke2.yaml.before, 17 documents
 / _' | | | | |_| |_       and /tmp/swh-chart.cluster-components.TWBy4zY0/archive-production-rke2.yaml.after, 17 documents
| (_| | |_| |  _|  _|
 \__,_|\__, |_| |_|   returned no differences
        |___/



------------- diff for cluster-components/values/archive-staging-rke2.yaml -------------

     _        __  __
   _| |_   _ / _|/ _|  between /tmp/swh-chart.cluster-components.TWBy4zY0/archive-staging-rke2.yaml.before, 22 documents
 / _' | | | | |_| |_       and /tmp/swh-chart.cluster-components.TWBy4zY0/archive-staging-rke2.yaml.after, 23 documents
| (_| | |_| |  _|  _|
 \__,_|\__, |_| |_|   returned two differences
        |___/

(file level)
    ---
    # Source: cluster-config/templates/cloudnative-pg/cluster.yaml
    apiVersion: postgresql.cnpg.io/v1
    kind: Cluster
    metadata:
      name: next-version-swh
      namespace: swh-cassandra-next-version
    spec:
      instances: 1
      enablePDB: false
      # Rolling update strategy:
    # - unsupervised: automated update of the primary once all
    #                 replicas have been upgraded (default)
    # - supervised: requires manual supervision to perform
    #               the switchover of the primary
    # https://cloudnative-pg.io/documentation/1.23/rolling_update/
    primaryUpdateStrategy: unsupervised
      enableSuperuserAccess: true
      affinity:
        nodeAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
            nodeSelectorTerms:
            - matchExpressions:
              - key: swh/db
                operator: In
                values:
                - "true"
      managed:
        roles:
        - name: guest
          comment: Guest
          ensure: present
          login: true
          superuser: false
          passwordSecret:
            name: swh-postgresql-guest-secret
      bootstrap:
        initdb:
          # Use the following to define the database's name (default <app>).
    # And its associated owner
    database: swh
          owner: swh
          # The following optionals are the equivalent of flags passed to initdb
    # commented because those are already the default values
    # --encoding
    # encoding: UTF8
    # --lc-ctype
    # localeCType: C
    # --lc-collate
    # localeCollate: C
    # -k option to enable checksums on data pages to help detect I/O
    # -corruption
    dataChecksums: true
      # Reference to postgresql source cluster to initialize db(s) from

    # Parameters and pg_hba configuration will be append
    # to the default ones to make the cluster work
    postgresql:
        parameters:
          max_worker_processes: 60
        pg_hba:
        - "host all all all md5"
      storage:
        size: 1Gi
        storageClass: local-persistent
      # walStorage:
    #   storageClass: local-persistent
    #   size: 1Gi

    monitoring:
        enablePodMonitor: true

spec  (postgresql.cnpg.io/v1/Cluster/swh-cassandra-next-version/next-version-dbs)
  + one map entry added:
    managed:
      roles:
      - name: guest
        comment: Guest
        ensure: present
        login: true
        superuser: false
        passwordSecret:
          name: swh-postgresql-guest-secret



------------- diff for cluster-components/values/default.yaml -------------

     _        __  __
   _| |_   _ / _|/ _|  between /tmp/swh-chart.cluster-components.TWBy4zY0/default.yaml.before
 / _' | | | | |_| |_       and /tmp/swh-chart.cluster-components.TWBy4zY0/default.yaml.after
| (_| | |_| |  _|  _|
 \__,_|\__, |_| |_|   returned no differences
        |___/



------------- diff for cluster-components/values/gitlab-production.yaml -------------

     _        __  __
   _| |_   _ / _|/ _|  between /tmp/swh-chart.cluster-components.TWBy4zY0/gitlab-production.yaml.before
 / _' | | | | |_| |_       and /tmp/swh-chart.cluster-components.TWBy4zY0/gitlab-production.yaml.after
| (_| | |_| |  _|  _|
 \__,_|\__, |_| |_|   returned no differences
        |___/



------------- diff for cluster-components/values/gitlab-staging.yaml -------------

     _        __  __
   _| |_   _ / _|/ _|  between /tmp/swh-chart.cluster-components.TWBy4zY0/gitlab-staging.yaml.before
 / _' | | | | |_| |_       and /tmp/swh-chart.cluster-components.TWBy4zY0/gitlab-staging.yaml.after
| (_| | |_| |  _|  _|
 \__,_|\__, |_| |_|   returned no differences
        |___/



------------- diff for cluster-components/values/minikube.yaml -------------

     _        __  __
   _| |_   _ / _|/ _|  between /tmp/swh-chart.cluster-components.TWBy4zY0/minikube.yaml.before
 / _' | | | | |_| |_       and /tmp/swh-chart.cluster-components.TWBy4zY0/minikube.yaml.after
| (_| | |_| |  _|  _|
 \__,_|\__, |_| |_|   returned no differences
        |___/



------------- diff for cluster-components/values/rancher.yaml -------------

     _        __  __
   _| |_   _ / _|/ _|  between /tmp/swh-chart.cluster-components.TWBy4zY0/rancher.yaml.before
 / _' | | | | |_| |_       and /tmp/swh-chart.cluster-components.TWBy4zY0/rancher.yaml.after
| (_| | |_| |  _|  _|
 \__,_|\__, |_| |_|   returned no differences
        |___/



------------- diff for cluster-components/values/test-staging-rke2.yaml -------------

     _        __  __
   _| |_   _ / _|/ _|  between /tmp/swh-chart.cluster-components.TWBy4zY0/test-staging-rke2.yaml.before, twelve documents
 / _' | | | | |_| |_       and /tmp/swh-chart.cluster-components.TWBy4zY0/test-staging-rke2.yaml.after, twelve documents
| (_| | |_| |  _|  _|
 \__,_|\__, |_| |_|   returned no differences
        |___/

Refs. swh/infra/sysadm-environment#5344 (closed)

Edited by Antoine R. Dumont

Merge request reports

Loading