diff --git a/deploy/internal/configmap-postgres-initdb.yaml b/deploy/internal/configmap-postgres-initdb.yaml deleted file mode 100644 index b4ddc7a5d7..0000000000 --- a/deploy/internal/configmap-postgres-initdb.yaml +++ /dev/null @@ -1,87 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: noobaa-postgres-initdb-sh - labels: - app: noobaa -data: - initdb.sh: | - # If the config file is present, the DB is initiazed - # and we're out of here - export PGDATA=$HOME/data/userdata - if [ -f $PGDATA/postgresql.conf ]; then - echo postgresql.conf file is found - exit 0 - fi - - # Wrap the postgres binary, force huge_pages=off for initdb - # see https://bugzilla.redhat.com/show_bug.cgi?id=1946792 - p=/opt/rh/rh-postgresql12/root/usr/bin/postgres - - # Latest RH images moved the postgres binary - # from /opt/rh/rh-postgresql12/root/usr/bin/postgres to /usr/bin/postgres - # see https://bugzilla.redhat.com/show_bug.cgi?id=2051249 - if [ ! -x $p ]; then - p=/usr/bin/postgres - fi - - mv $p $p.orig - echo exec $p.orig \"\$@\" -c huge_pages=off > $p - chmod 755 $p - - # The NooBaa DB runs with UID 10001 GID 0 - sed -i -e 's/^\(postgres:[^:]\):[0-9]*:[0-9]*:/\1:10001:0:/' /etc/passwd - - # Init the DB and exit once the DB is ready to run - sed -i -e 's/^exec.*$/exit 0/' \ - -e 's/^pg_ctl\sstart.*/pg_ctl start || true/' \ - /usr/bin/run-postgresql - su postgres -c "bash -x /usr/bin/run-postgresql" - - - dumpdb.sh: | - set -e - sed -i -e 's/^\(postgres:[^:]\):[0-9]*:[0-9]*:/\1:10001:0:/' /etc/passwd - su postgres -c "bash -x /usr/bin/run-postgresql" & - THRESHOLD=33 - USE=$(df -h --output=pcent "/$HOME/data" | tail -n 1 | tr -d '[:space:]%') - # Check if the used space is more than the threshold - if [ "$USE" -gt "$THRESHOLD" ]; then - echo "Warning: Free space $USE% is above $THRESHOLD% threshold. Can't start upgrade!" - exit 1 - fi - echo "Info: Free space $USE% is below $THRESHOLD% threshold. Starting upgrade!" - until pg_isready; do sleep 1; done; - pg_dumpall -U postgres > /$HOME/data/dump.sql - exit 0 - - upgradedb.sh: | - set -e - PGDATA=$HOME/data/userdata - PGDATA_12=$HOME/data/userdata-12 - THRESHOLD=33 - USE=$(df -h --output=pcent "/$HOME/data" | tail -n 1 | tr -d '[:space:]%') - # Check if the used space is more than the threshold - if [ "$USE" -gt "$THRESHOLD" ]; then - echo "Warning: Free space $USE% is above $THRESHOLD% threshold. Can't start upgrade!" - exit 1 - fi - echo "Info: Free space $USE% is below $THRESHOLD% threshold. Starting upgrade!" - if [ ! -d $PGDATA_12 ]; then - mv $PGDATA $PGDATA_12 - fi - sed -i -e 's/^\(postgres:[^:]\):[0-9]*:[0-9]*:/\1:10001:0:/' /etc/passwd - su postgres -c "bash -x /usr/bin/run-postgresql" & - until pg_isready; do sleep 1; done; - psql -U postgres < /$HOME/data/dump.sql - rm /$HOME/data/dump.sql - exit 0 - - revertdb.sh: | - PGDATA=$HOME/data/userdata - PGDATA_12=$HOME/data/userdata-12 - if [ -d $PGDATA_12 ]; then - rm -rf $PGDATA - mv $PGDATA_12 $PGDATA - fi - exit 0 diff --git a/deploy/internal/statefulset-db.yaml b/deploy/internal/statefulset-db.yaml new file mode 100644 index 0000000000..f4688ecd17 --- /dev/null +++ b/deploy/internal/statefulset-db.yaml @@ -0,0 +1,57 @@ +apiVersion: apps/v1 +kind: StatefulSet +metadata: + name: noobaa-db + labels: + app: noobaa +spec: + replicas: 1 + selector: + matchLabels: + noobaa-db: noobaa + serviceName: noobaa-db + updateStrategy: + type: RollingUpdate + template: + metadata: + labels: + app: noobaa + noobaa-db: noobaa + spec: + serviceAccountName: noobaa-db + terminationGracePeriodSeconds: 60 + containers: + #--------------------# + # DATABASE CONTAINER # + #--------------------# + - name: db + image: NOOBAA_DB_IMAGE + command: + - bash + - -c + - /opt/rh/rh-mongodb36/root/usr/bin/mongod --port 27017 --bind_ip_all --dbpath /data/mongo/cluster/shard1 + resources: + requests: + cpu: "2" + memory: "4Gi" + limits: + cpu: "2" + memory: "4Gi" + volumeMounts: + - name: db + mountPath: /data + securityContext: + runAsUser: 10001 + runAsGroup: 0 + volumeClaimTemplates: + - metadata: + name: db + labels: + app: noobaa + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 50Gi + diff --git a/deploy/internal/statefulset-postgres-db.yaml b/deploy/internal/statefulset-postgres-db.yaml index ad0ff8d24d..60422f21a8 100644 --- a/deploy/internal/statefulset-postgres-db.yaml +++ b/deploy/internal/statefulset-postgres-db.yaml @@ -19,92 +19,47 @@ spec: noobaa-db: postgres spec: serviceAccountName: noobaa-db - initContainers: - #-----------------# - # INIT CONTAINERS # - #-----------------# - - name: initialize-database - image: NOOBAA_DB_IMAGE - env: - - name: POSTGRESQL_DATABASE - value: nbcore - - name: LC_COLLATE - value: C - - name: POSTGRESQL_USER - valueFrom: - secretKeyRef: - key: user - name: noobaa-db - - name: POSTGRESQL_PASSWORD - valueFrom: - secretKeyRef: - key: password - name: noobaa-db - command: - - sh - - -x - - /init/initdb.sh - securityContext: - runAsUser: 0 - runAsGroup: 0 - resources: - requests: - cpu: "500m" - memory: "500Mi" - limits: - cpu: "500m" - memory: "500Mi" - volumeMounts: - - name: db - mountPath: /var/lib/pgsql - - name: noobaa-postgres-initdb-sh-volume - mountPath: /init containers: - #--------------------# - # Postgres CONTAINER # - #--------------------# - - name: db - image: NOOBAA_DB_IMAGE - env: - - name: POSTGRESQL_DATABASE - value: nbcore - - name: LC_COLLATE - value: C - - name: POSTGRESQL_USER - valueFrom: - secretKeyRef: - key: user - name: noobaa-db - - name: POSTGRESQL_PASSWORD - valueFrom: - secretKeyRef: - key: password - name: noobaa-db - imagePullPolicy: "IfNotPresent" - ports: - - containerPort: 5432 - resources: - requests: - cpu: "500m" - memory: "4Gi" - limits: - cpu: "500m" - memory: "4Gi" - volumeMounts: - - name: db - mountPath: /var/lib/pgsql - - name: noobaa-postgres-config-volume - mountPath: /opt/app-root/src/postgresql-cfg - - name: noobaa-postgres-initdb-sh-volume - mountPath: /init + #--------------------# + # Postgres CONTAINER # + #--------------------# + - name: db + image: NOOBAA_DB_IMAGE + env: + - name: POSTGRESQL_DATABASE + value: nbcore + - name: LC_COLLATE + value: C + - name: POSTGRESQL_USER + valueFrom: + secretKeyRef: + key: user + name: noobaa-db + - name: POSTGRESQL_PASSWORD + valueFrom: + secretKeyRef: + key: password + name: noobaa-db + imagePullPolicy: "IfNotPresent" + ports: + - containerPort: 5432 + resources: + requests: + cpu: "500m" + memory: "4Gi" + limits: + cpu: "500m" + memory: "4Gi" + volumeMounts: + - name: db + mountPath: /var/lib/pgsql + - name: noobaa-postgres-config-volume + mountPath: /opt/app-root/src/postgresql-cfg volumes: - - name: noobaa-postgres-config-volume - configMap: - name: noobaa-postgres-config - - name: noobaa-postgres-initdb-sh-volume - configMap: - name: noobaa-postgres-initdb-sh - securityContext: + - name: noobaa-postgres-config-volume + configMap: + name: noobaa-postgres-config + securityContext: runAsUser: 10001 runAsGroup: 0 fsGroup: 0 diff --git a/deploy/role_db.yaml b/deploy/role_db.yaml index a5d6617287..df4b355756 100644 --- a/deploy/role_db.yaml +++ b/deploy/role_db.yaml @@ -3,11 +3,11 @@ kind: Role metadata: name: noobaa-db rules: -- apiGroups: - - security.openshift.io - resourceNames: - - noobaa-db - resources: - - securitycontextconstraints - verbs: - - use + - apiGroups: + - security.openshift.io + resourceNames: + - noobaa-db + resources: + - securitycontextconstraints + verbs: + - use diff --git a/deploy/scc_db.yaml b/deploy/scc_db.yaml index 00f75b3e8d..7fdc104312 100644 --- a/deploy/scc_db.yaml +++ b/deploy/scc_db.yaml @@ -2,7 +2,7 @@ apiVersion: security.openshift.io/v1 kind: SecurityContextConstraints metadata: name: noobaa-db -allowPrivilegeEscalation: true +allowPrivilegeEscalation: false allowHostDirVolumePlugin: false allowHostIPC: false allowHostNetwork: false @@ -10,9 +10,6 @@ allowHostPID: false allowHostPorts: false allowPrivilegedContainer: false readOnlyRootFilesystem: false -allowedCapabilities: -- SETUID -- SETGID fsGroup: type: RunAsAny runAsUser: diff --git a/pkg/bundle/deploy.go b/pkg/bundle/deploy.go index 3619333f00..6c652a917f 100644 --- a/pkg/bundle/deploy.go +++ b/pkg/bundle/deploy.go @@ -3791,97 +3791,6 @@ data: shared_preload_libraries = 'pg_stat_statements' ` -const Sha256_deploy_internal_configmap_postgres_initdb_yaml = "9ce7163b6de6bf58c2804ca6be2efc69fef7c90951fa549d17fa08a3a2684fc8" - -const File_deploy_internal_configmap_postgres_initdb_yaml = `apiVersion: v1 -kind: ConfigMap -metadata: - name: noobaa-postgres-initdb-sh - labels: - app: noobaa -data: - initdb.sh: | - # If the config file is present, the DB is initiazed - # and we're out of here - export PGDATA=$HOME/data/userdata - if [ -f $PGDATA/postgresql.conf ]; then - echo postgresql.conf file is found - exit 0 - fi - - # Wrap the postgres binary, force huge_pages=off for initdb - # see https://bugzilla.redhat.com/show_bug.cgi?id=1946792 - p=/opt/rh/rh-postgresql12/root/usr/bin/postgres - - # Latest RH images moved the postgres binary - # from /opt/rh/rh-postgresql12/root/usr/bin/postgres to /usr/bin/postgres - # see https://bugzilla.redhat.com/show_bug.cgi?id=2051249 - if [ ! -x $p ]; then - p=/usr/bin/postgres - fi - - mv $p $p.orig - echo exec $p.orig \"\$@\" -c huge_pages=off > $p - chmod 755 $p - - # The NooBaa DB runs with UID 10001 GID 0 - sed -i -e 's/^\(postgres:[^:]\):[0-9]*:[0-9]*:/\1:10001:0:/' /etc/passwd - - # Init the DB and exit once the DB is ready to run - sed -i -e 's/^exec.*$/exit 0/' \ - -e 's/^pg_ctl\sstart.*/pg_ctl start || true/' \ - /usr/bin/run-postgresql - su postgres -c "bash -x /usr/bin/run-postgresql" - - - dumpdb.sh: | - set -e - sed -i -e 's/^\(postgres:[^:]\):[0-9]*:[0-9]*:/\1:10001:0:/' /etc/passwd - su postgres -c "bash -x /usr/bin/run-postgresql" & - THRESHOLD=33 - USE=$(df -h --output=pcent "/$HOME/data" | tail -n 1 | tr -d '[:space:]%') - # Check if the used space is more than the threshold - if [ "$USE" -gt "$THRESHOLD" ]; then - echo "Warning: Free space $USE% is above $THRESHOLD% threshold. Can't start upgrade!" - exit 1 - fi - echo "Info: Free space $USE% is below $THRESHOLD% threshold. Starting upgrade!" - until pg_isready; do sleep 1; done; - pg_dumpall -U postgres > /$HOME/data/dump.sql - exit 0 - - upgradedb.sh: | - set -e - PGDATA=$HOME/data/userdata - PGDATA_12=$HOME/data/userdata-12 - THRESHOLD=33 - USE=$(df -h --output=pcent "/$HOME/data" | tail -n 1 | tr -d '[:space:]%') - # Check if the used space is more than the threshold - if [ "$USE" -gt "$THRESHOLD" ]; then - echo "Warning: Free space $USE% is above $THRESHOLD% threshold. Can't start upgrade!" - exit 1 - fi - echo "Info: Free space $USE% is below $THRESHOLD% threshold. Starting upgrade!" - if [ ! -d $PGDATA_12 ]; then - mv $PGDATA $PGDATA_12 - fi - sed -i -e 's/^\(postgres:[^:]\):[0-9]*:[0-9]*:/\1:10001:0:/' /etc/passwd - su postgres -c "bash -x /usr/bin/run-postgresql" & - until pg_isready; do sleep 1; done; - psql -U postgres < /$HOME/data/dump.sql - rm /$HOME/data/dump.sql - exit 0 - - revertdb.sh: | - PGDATA=$HOME/data/userdata - PGDATA_12=$HOME/data/userdata-12 - if [ -d $PGDATA_12 ]; then - rm -rf $PGDATA - mv $PGDATA_12 $PGDATA - fi - exit 0 -` - const Sha256_deploy_internal_deployment_endpoint_yaml = "bcce4839c69c3353ba36fd94aea2c8d7cf46e570a0106467f8bd7430acea18b7" const File_deploy_internal_deployment_endpoint_yaml = `apiVersion: apps/v1 @@ -5078,7 +4987,68 @@ spec: resource: limits.memory ` -const Sha256_deploy_internal_statefulset_postgres_db_yaml = "0accc047982dbd1b8c207c81ef2bb1ae8c61c312915d3c2d196799ca6f146816" +const Sha256_deploy_internal_statefulset_db_yaml = "0bd0b5d15a6cbdc7e713cd6a13944a80e9a9c6bc8183fce433f908b5056af7bd" + +const File_deploy_internal_statefulset_db_yaml = `apiVersion: apps/v1 +kind: StatefulSet +metadata: + name: noobaa-db + labels: + app: noobaa +spec: + replicas: 1 + selector: + matchLabels: + noobaa-db: noobaa + serviceName: noobaa-db + updateStrategy: + type: RollingUpdate + template: + metadata: + labels: + app: noobaa + noobaa-db: noobaa + spec: + serviceAccountName: noobaa-db + terminationGracePeriodSeconds: 60 + containers: + #--------------------# + # DATABASE CONTAINER # + #--------------------# + - name: db + image: NOOBAA_DB_IMAGE + command: + - bash + - -c + - /opt/rh/rh-mongodb36/root/usr/bin/mongod --port 27017 --bind_ip_all --dbpath /data/mongo/cluster/shard1 + resources: + requests: + cpu: "2" + memory: "4Gi" + limits: + cpu: "2" + memory: "4Gi" + volumeMounts: + - name: db + mountPath: /data + securityContext: + runAsUser: 10001 + runAsGroup: 0 + volumeClaimTemplates: + - metadata: + name: db + labels: + app: noobaa + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 50Gi + +` + +const Sha256_deploy_internal_statefulset_postgres_db_yaml = "947307ea1e93ce5b7789bd16352eb7848e1483cd36e7fc489d9ee156e4e7d8bd" const File_deploy_internal_statefulset_postgres_db_yaml = `apiVersion: apps/v1 kind: StatefulSet @@ -5101,92 +5071,47 @@ spec: noobaa-db: postgres spec: serviceAccountName: noobaa-db - initContainers: - #-----------------# - # INIT CONTAINERS # - #-----------------# - - name: initialize-database - image: NOOBAA_DB_IMAGE - env: - - name: POSTGRESQL_DATABASE - value: nbcore - - name: LC_COLLATE - value: C - - name: POSTGRESQL_USER - valueFrom: - secretKeyRef: - key: user - name: noobaa-db - - name: POSTGRESQL_PASSWORD - valueFrom: - secretKeyRef: - key: password - name: noobaa-db - command: - - sh - - -x - - /init/initdb.sh - securityContext: - runAsUser: 0 - runAsGroup: 0 - resources: - requests: - cpu: "500m" - memory: "500Mi" - limits: - cpu: "500m" - memory: "500Mi" - volumeMounts: - - name: db - mountPath: /var/lib/pgsql - - name: noobaa-postgres-initdb-sh-volume - mountPath: /init containers: - #--------------------# - # Postgres CONTAINER # - #--------------------# - - name: db - image: NOOBAA_DB_IMAGE - env: - - name: POSTGRESQL_DATABASE - value: nbcore - - name: LC_COLLATE - value: C - - name: POSTGRESQL_USER - valueFrom: - secretKeyRef: - key: user - name: noobaa-db - - name: POSTGRESQL_PASSWORD - valueFrom: - secretKeyRef: - key: password - name: noobaa-db - imagePullPolicy: "IfNotPresent" - ports: - - containerPort: 5432 - resources: - requests: - cpu: "500m" - memory: "4Gi" - limits: - cpu: "500m" - memory: "4Gi" - volumeMounts: - - name: db - mountPath: /var/lib/pgsql - - name: noobaa-postgres-config-volume - mountPath: /opt/app-root/src/postgresql-cfg - - name: noobaa-postgres-initdb-sh-volume - mountPath: /init + #--------------------# + # Postgres CONTAINER # + #--------------------# + - name: db + image: NOOBAA_DB_IMAGE + env: + - name: POSTGRESQL_DATABASE + value: nbcore + - name: LC_COLLATE + value: C + - name: POSTGRESQL_USER + valueFrom: + secretKeyRef: + key: user + name: noobaa-db + - name: POSTGRESQL_PASSWORD + valueFrom: + secretKeyRef: + key: password + name: noobaa-db + imagePullPolicy: "IfNotPresent" + ports: + - containerPort: 5432 + resources: + requests: + cpu: "500m" + memory: "4Gi" + limits: + cpu: "500m" + memory: "4Gi" + volumeMounts: + - name: db + mountPath: /var/lib/pgsql + - name: noobaa-postgres-config-volume + mountPath: /opt/app-root/src/postgresql-cfg volumes: - - name: noobaa-postgres-config-volume - configMap: - name: noobaa-postgres-config - - name: noobaa-postgres-initdb-sh-volume - configMap: - name: noobaa-postgres-initdb-sh - securityContext: + - name: noobaa-postgres-config-volume + configMap: + name: noobaa-postgres-config + securityContext: runAsUser: 10001 runAsGroup: 0 fsGroup: 0 @@ -6347,21 +6272,21 @@ subjects: name: custom-metrics-prometheus-adapter ` -const Sha256_deploy_role_db_yaml = "8a7b6895de2e9847ec4a9e6e298b63251253f446961eb97f4dee50ee156f6d12" +const Sha256_deploy_role_db_yaml = "bc7eeca1125dfcdb491ab8eb69e3dcbce9f004a467b88489f85678b3c6872cce" const File_deploy_role_db_yaml = `apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: name: noobaa-db rules: -- apiGroups: - - security.openshift.io - resourceNames: - - noobaa-db - resources: - - securitycontextconstraints - verbs: - - use + - apiGroups: + - security.openshift.io + resourceNames: + - noobaa-db + resources: + - securitycontextconstraints + verbs: + - use ` const Sha256_deploy_role_endpoint_yaml = "27ace6cdcae4d87add5ae79265c4eee9d247e5910fc8a74368139d31add6dac2" @@ -6476,13 +6401,13 @@ rules: - bucketclasses ` -const Sha256_deploy_scc_db_yaml = "d91c727214d8879843da81ee8778bf6ad6d06af6bdea0a36ac494b5ccc706d7a" +const Sha256_deploy_scc_db_yaml = "747ebcab94f3f3d42037016f30fa82df085ee5a0a405cbee61e8fdfdfcfc37b0" const File_deploy_scc_db_yaml = `apiVersion: security.openshift.io/v1 kind: SecurityContextConstraints metadata: name: noobaa-db -allowPrivilegeEscalation: true +allowPrivilegeEscalation: false allowHostDirVolumePlugin: false allowHostIPC: false allowHostNetwork: false @@ -6490,9 +6415,6 @@ allowHostPID: false allowHostPorts: false allowPrivilegedContainer: false readOnlyRootFilesystem: false -allowedCapabilities: -- SETUID -- SETGID fsGroup: type: RunAsAny runAsUser: diff --git a/pkg/system/phase2_creating.go b/pkg/system/phase2_creating.go index ff1750ca3f..067bde3774 100644 --- a/pkg/system/phase2_creating.go +++ b/pkg/system/phase2_creating.go @@ -244,20 +244,9 @@ func (r *Reconciler) SetDesiredNooBaaDB() error { podSpec.SecurityContext.RunAsGroup = &defaulfGID podSpec.SecurityContext.FSGroup = &defaultFSGroup podSpec.SecurityContext.FSGroupChangePolicy = &defaultFSGroupChangePolicy - podSpec.InitContainers = util.FilterSlice( - podSpec.InitContainers, - func(c corev1.Container) bool { - // remove the init container that is not needed - return c.Name != "init" - }, - ) + // remove the init conatainer. It was used to workaround a hugepages issue, which was resolved in Postgres + podSpec.InitContainers = nil - for i := range podSpec.InitContainers { - c := &podSpec.InitContainers[i] - if c.Name == "initialize-database" { - c.Image = GetDesiredDBImage(r.NooBaa) - } - } for i := range podSpec.Containers { c := &podSpec.Containers[i] if c.Name == "db" { @@ -1106,11 +1095,6 @@ func (r *Reconciler) ReconcileDB() error { // if the configMap was not created at this step, NooBaaPostgresDB // would fail to start. - isDBInitUpdated, reconcileDbError := r.ReconcileDBConfigMap(r.PostgresDBInitDb, r.SetDesiredPostgresDBInitDb) - if reconcileDbError != nil { - return reconcileDbError - } - isDBConfUpdated, reconcileDbError := r.ReconcileDBConfigMap(r.PostgresDBConf, r.SetDesiredPostgresDBConf) if reconcileDbError != nil { return reconcileDbError @@ -1120,7 +1104,7 @@ func (r *Reconciler) ReconcileDB() error { if reconcilePostgresError != nil { return reconcilePostgresError } - if !r.isObjectUpdated(result) && (isDBInitUpdated || isDBConfUpdated) { + if !r.isObjectUpdated(result) && (isDBConfUpdated) { r.Logger.Warn("One of the db configMap was updated but not postgres db") restartError := r.RestartDbPods() if restartError != nil { @@ -1157,13 +1141,6 @@ func (r *Reconciler) SetDesiredPostgresDBConf() error { return nil } -// SetDesiredPostgresDBInitDb fill desired postgres db init config map -func (r *Reconciler) SetDesiredPostgresDBInitDb() error { - postgresDBInitDbYaml := util.KubeObject(bundle.File_deploy_internal_configmap_postgres_initdb_yaml).(*corev1.ConfigMap) - r.PostgresDBInitDb.Data = postgresDBInitDbYaml.Data - return nil -} - // RestartDbPods restart db pods func (r *Reconciler) RestartDbPods() error { r.Logger.Warn("Restarting postgres db pods") diff --git a/pkg/system/reconciler.go b/pkg/system/reconciler.go index a0fbe44338..f060098ff9 100644 --- a/pkg/system/reconciler.go +++ b/pkg/system/reconciler.go @@ -74,7 +74,6 @@ type Reconciler struct { CoreAppConfig *corev1.ConfigMap DefaultCoreApp *corev1.Container PostgresDBConf *corev1.ConfigMap - PostgresDBInitDb *corev1.ConfigMap NooBaaPostgresDB *appsv1.StatefulSet ServiceMgmt *corev1.Service ServiceS3 *corev1.Service @@ -142,7 +141,6 @@ func NewReconciler( CoreApp: util.KubeObject(bundle.File_deploy_internal_statefulset_core_yaml).(*appsv1.StatefulSet), CoreAppConfig: util.KubeObject(bundle.File_deploy_internal_configmap_empty_yaml).(*corev1.ConfigMap), PostgresDBConf: util.KubeObject(bundle.File_deploy_internal_configmap_postgres_db_yaml).(*corev1.ConfigMap), - PostgresDBInitDb: util.KubeObject(bundle.File_deploy_internal_configmap_postgres_initdb_yaml).(*corev1.ConfigMap), NooBaaPostgresDB: util.KubeObject(bundle.File_deploy_internal_statefulset_postgres_db_yaml).(*appsv1.StatefulSet), ServiceDb: util.KubeObject(bundle.File_deploy_internal_service_db_yaml).(*corev1.Service), ServiceDbPg: util.KubeObject(bundle.File_deploy_internal_service_db_yaml).(*corev1.Service), @@ -185,7 +183,6 @@ func NewReconciler( r.CoreApp.Namespace = r.Request.Namespace r.CoreAppConfig.Namespace = r.Request.Namespace r.PostgresDBConf.Namespace = r.Request.Namespace - r.PostgresDBInitDb.Namespace = r.Request.Namespace r.NooBaaPostgresDB.Namespace = r.Request.Namespace r.ServiceMgmt.Namespace = r.Request.Namespace r.ServiceS3.Namespace = r.Request.Namespace @@ -307,7 +304,6 @@ func (r *Reconciler) CheckAll() { util.KubeCheck(r.SecretDB) if r.NooBaa.Spec.ExternalPgSecret == nil { util.KubeCheck(r.PostgresDBConf) - util.KubeCheck(r.PostgresDBInitDb) util.KubeCheck(r.NooBaaPostgresDB) util.KubeCheck(r.ServiceDbPg) }