FATAL: database "gitlab" does not exist for gitlab-postgresql pod
I am trying to install gitlab on kubernetes using the below values.yaml but I am facing error in postgressql database
global:
hosts:
domain: gitlab.xxxxxxx.com
externalIP: x.x.x.x
gitlab:
name: gitlab.xxxxxxx.com
registry:
name: registry.xxxxxx.com
minio:
name: minio.xxxxxxx.com
ingress:
configureCertmanager: true
annotations:
certmanager.k8s.io/acme-challenge-type: http01
certmanager.k8s.io/cluster-issuer: letsencrypt-production
kubernetes.io/ingress.class: ""
enabled: true
minio:
enabled: true
certmanager-issuer:
email: noc@xxxxxxxxx.com
registry:
enabled: false
certmanager:
install: false
nginx-ingress:
enabled: false
prometheus:
install: false
# Minio chart provides Minio servics for Object Storage
minio:
persistence:
size: 10Gi
storageClass: thin-disk
postgresql:
persistence:
size: 5Gi
storageClass: thin-disk
redis:
persistence:
size: 5Gi
storageClass: thin-disk
# GitLab sub-chart
gitlab:
# Unicorn (and workhorse) chart
unicorn:
enabled: true
image.repository: registry.gitlab.com/gitlab-org/build/cng/gitlab-unicorn-ce
psql:
# Sidekiq chart, with split queues (see charts/gitlab/charts/sidekiq/values.yaml)
sidekiq:
enabled: true
image.repository: registry.gitlab.com/gitlab-org/build/cng/gitlab-sidekiq-ce
psql:
# Shell provides SSH access
gitlab-shell:
enabled: true
# Gitaly provides storage & API access to Git repository data
gitaly:
enabled: true
persistence:
size: 5Gi
storageClass: thin-disk
# Handle database init and upgrade migrations, via gitlab-rails codebase
migrations:
enabled: true
image.repository: registry.gitlab.com/gitlab-org/build/cng/gitlab-rails-ce
initialRootPassword: "minikube"
psql:
registry:
host: hub.xxxxxxxx.com
port: 443
kubectl logs -f gitlab-postgresql-65bd954977-4cl2m gitlab-postgresql
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.
The database cluster will be initialized with locale "en_US.utf8".
The default database encoding has accordingly been set to "UTF8".
The default text search configuration will be set to "english".
Data page checksums are disabled.
fixing permissions on existing directory /var/lib/postgresql/data/pgdata ... ok
creating subdirectories ... ok
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting dynamic shared memory implementation ... posix
creating configuration files ... ok
running bootstrap script ... ok
performing post-bootstrap initialization ... ok
syncing data to disk ... ok
Success. You can now start the database server using:
pg_ctl -D /var/lib/postgresql/data/pgdata -l logfile start
WARNING: enabling "trust" authentication for local connections
You can change this by editing pg_hba.conf or using the option -A, or
--auth-local and --auth-host, the next time you run initdb.
waiting for server to start....LOG: database system was shut down at 2018-08-26 17:36:52 UTC
LOG: MultiXact member wraparound protections are now enabled
LOG: autovacuum launcher started
LOG: database system is ready to accept connections
FATAL: role "gitlab" does not exist
done
server started
CREATE DATABASE
CREATE ROLE
/usr/local/bin/docker-entrypoint.sh: ignoring /docker-entrypoint-initdb.d/*
LOG: received fast shutdown request
waiting for server to shut down...LOG: aborting any active transactions
.LOG: autovacuum launcher shutting down
LOG: shutting down
LOG: database system is shut down
done
server stopped
PostgreSQL init process complete; ready for start up.
LOG: database system was shut down at 2018-08-26 17:36:54 UTC
LOG: MultiXact member wraparound protections are now enabled
LOG: autovacuum launcher started
LOG: database system is ready to accept connections
FATAL: database "gitlab" does not exist
FATAL: database "gitlab" does not exist
FATAL: database "gitlab" does not exist
FATAL: database "gitlab" does not exist
FATAL: database "gitlab" does not exist
FATAL: database "gitlab" does not exist
FATAL: database "gitlab" does not exist