Skip to content

update the config for not having to embed the gitlab CN chart in ours

Benjamin Tissoires requested to merge bentiss/helm-gitlab-omnibus:master into master

This circles back itself a little, but I did it so I was sure not breaking anything.

See https://gitlab.freedesktop.org/freedesktop/helm-gitlab-config/-/merge_requests/16 for the config part (note: this also requires a secrets update)

The idea is to drop the files we maintain one by one from the CN chart in our config. To achieve that:

  • merge all the other diffs, and build the config settings to disable all those new items
  • replace those files from the CN chart by a simple change in requirements.yaml
  • fix the remaining bits (mostly the custom grafana ingress)
  • re-order the produced template so we can compare
  • and compare the templates:
--- /tmp/deployed.config	2020-04-27 12:08:26.992405910 +0200
+++ /tmp/new.config	2020-04-27 12:20:12.347746791 +0200
@@ -1077,8 +1077,6 @@
     # Gitaly secret
     generate_secret_if_needed "gitlab-prod-gitaly-secret" --from-literal="token"=$(gen_random 'a-zA-Z0-9' 64)
     
-    # Minio secret
-    generate_secret_if_needed "gitlab-prod-minio-secret" --from-literal=accesskey=$(gen_random 'a-zA-Z0-9' 64) --from-literal=secretkey=$(gen_random 'a-zA-Z0-9' 64)

Doesn't really need that, minio is disabled

     
     
     # Gitlab runner secret
@@ -1152,36 +1150,19 @@
 apiVersion: v1
 kind: ConfigMap
 metadata:
-  name: gitlab-prod-helm-gitlab-omnibus-chart-info
+  name: gitlab-prod-gitlab-chart-info
   namespace: default
   labels:
-    app: helm-gitlab-omnibus
-    chart: helm-gitlab-omnibus-3.2.2
+    app: gitlab
+    chart: gitlab-3.3.1
     release: gitlab-prod
     heritage: Tiller
     
 data:
   gitlabVersion: "12.10.1"
-  gitlabChartVersion: "3.2.2"
+  gitlabChartVersion: "3.3.1"

This is now closer to what it should be in the end. This is just informational after all.

 
 ---
-# Source: helm-gitlab-omnibus/templates/initdb-configmap.yaml
-apiVersion: v1
-kind: ConfigMap
-metadata:
-  name: gitlab-prod-postgresql-init-db
-  namespace: default
-  labels:
-    app: helm-gitlab-omnibus
-    chart: helm-gitlab-omnibus-3.2.2
-    release: gitlab-prod
-    heritage: Tiller
-    
-data:
-  enable_extensions.sh: |
-    PGPASS=$(cat ${POSTGRES_POSTGRES_PASSWORD_FILE}) psql -d gitlab_production -U postgres -c 'CREATE EXTENSION pg_trgm;'
-# Leave this here - This line denotes end of block to the parser.
----

we are not using the up to date postgresdb, so the init configmap can go away

 # Source: helm-gitlab-omnibus/charts/gitlab-omnibus/templates/fast-storage/storage.yaml
 
 kind: StorageClass
@@ -11544,7 +11525,7 @@
 apiVersion: batch/v1
 kind: Job
 metadata:
-  name: gitlab-prod-shared-secrets.0-6ws
+  name: gitlab-prod-shared-secrets.0-a10
   namespace: default
   labels:
     app: shared-secrets
@@ -11632,15 +11613,15 @@
           restartPolicy: OnFailure

this change happens all the time at each upgrade

 ---
-# Source: helm-gitlab-omnibus/charts/gitlab/charts/gitlab-grafana/templates/custom-ingress.yaml
+# Source: helm-gitlab-omnibus/charts/freedesktop/templates/grafana-custom-ingress.yaml
 apiVersion: extensions/v1beta1
 kind: Ingress
 metadata:
   name: gitlab-prod-grafana-root
   namespace: default
   labels:
-    app: gitlab-grafana
-    chart: gitlab-grafana-3.3.1
+    app: freedesktop
+    chart: freedesktop-0.1.0
     release: gitlab-prod
     heritage: Tiller
     
@@ -12056,6 +12037,165 @@
 # Source: helm-gitlab-omnibus/charts/certmanager/templates/webhook-validating-webhook.yaml

result of moving the ingress from gitlab-chart to freedesktop: only the labels are impacted.

 
 ---
+# Source: helm-gitlab-omnibus/charts/gitlab/charts/geo-logcursor/templates/configmap.yml
+
+---
+# Source: helm-gitlab-omnibus/charts/gitlab/charts/geo-logcursor/templates/deployment.yaml
+
+
+---
+# Source: helm-gitlab-omnibus/charts/gitlab/charts/gitaly/templates/configmap.yml
+
+
+---
+# Source: helm-gitlab-omnibus/charts/gitlab/charts/gitaly/templates/pause_job.yaml
+
+
+---
+# Source: helm-gitlab-omnibus/charts/gitlab/charts/gitaly/templates/pdb.yaml
+
+---
+# Source: helm-gitlab-omnibus/charts/gitlab/charts/gitaly/templates/service.yaml
+
+
+---
+# Source: helm-gitlab-omnibus/charts/gitlab/charts/gitaly/templates/statefulset.yml
+
+
+---
+# Source: helm-gitlab-omnibus/charts/gitlab/charts/gitlab-shell/templates/configmap-sshd.yml
+
+
+---
+# Source: helm-gitlab-omnibus/charts/gitlab/charts/gitlab-shell/templates/configmap.yml
+
+
+---
+# Source: helm-gitlab-omnibus/charts/gitlab/charts/gitlab-shell/templates/deployment.yaml
+
+
+---
+# Source: helm-gitlab-omnibus/charts/gitlab/charts/gitlab-shell/templates/hpa.yaml
+
+---
+# Source: helm-gitlab-omnibus/charts/gitlab/charts/gitlab-shell/templates/nginx-tcp-configmap.yml
+
+---
+# Source: helm-gitlab-omnibus/charts/gitlab/charts/gitlab-shell/templates/pdb.yaml
+
+---
+# Source: helm-gitlab-omnibus/charts/gitlab/charts/gitlab-shell/templates/service.yaml
+
+
+---
+# Source: helm-gitlab-omnibus/charts/gitlab/charts/mailroom/templates/configmap.yaml
+
+
+---
+# Source: helm-gitlab-omnibus/charts/gitlab/charts/mailroom/templates/deployment.yaml
+
+
+---
+# Source: helm-gitlab-omnibus/charts/gitlab/charts/mailroom/templates/hpa.yaml
+
+---
+# Source: helm-gitlab-omnibus/charts/gitlab/charts/mailroom/templates/networkpolicy.yaml
+
+---
+# Source: helm-gitlab-omnibus/charts/gitlab/charts/migrations/templates/configmap.yaml
+
+
+---
+# Source: helm-gitlab-omnibus/charts/gitlab/charts/migrations/templates/job.yaml
+
+
+---
+# Source: helm-gitlab-omnibus/charts/gitlab/charts/operator/templates/deployment.yaml
+
+
+---
+# Source: helm-gitlab-omnibus/charts/gitlab/charts/operator/templates/gitlab.yaml
+
+
+---
+# Source: helm-gitlab-omnibus/charts/gitlab/charts/operator/templates/rbac.yaml
+
+
+---
+# Source: helm-gitlab-omnibus/charts/gitlab/charts/sidekiq/templates/configmap-queue.yaml
+
+
+---
+# Source: helm-gitlab-omnibus/charts/gitlab/charts/sidekiq/templates/configmap.yaml
+
+
+---
+# Source: helm-gitlab-omnibus/charts/gitlab/charts/sidekiq/templates/deployment.yaml
+
+
+---
+# Source: helm-gitlab-omnibus/charts/gitlab/charts/sidekiq/templates/hpa.yaml
+
+---
+# Source: helm-gitlab-omnibus/charts/gitlab/charts/sidekiq/templates/networkpolicy.yaml
+
+---
+# Source: helm-gitlab-omnibus/charts/gitlab/charts/sidekiq/templates/pause_job.yaml
+
+
+---
+# Source: helm-gitlab-omnibus/charts/gitlab/charts/sidekiq/templates/pdb.yaml
+
+---
+# Source: helm-gitlab-omnibus/charts/gitlab/charts/task-runner/templates/backup-job.yaml
+
+
+---
+# Source: helm-gitlab-omnibus/charts/gitlab/charts/task-runner/templates/configmap.yaml
+
+
+---
+# Source: helm-gitlab-omnibus/charts/gitlab/charts/task-runner/templates/deployment.yaml
+
+
+---
+# Source: helm-gitlab-omnibus/charts/gitlab/charts/task-runner/templates/pvc.yaml
+
+
+---
+# Source: helm-gitlab-omnibus/charts/gitlab/charts/unicorn/templates/configmap.yml
+
+
+---
+# Source: helm-gitlab-omnibus/charts/gitlab/charts/unicorn/templates/deployment.yaml
+
+
+---
+# Source: helm-gitlab-omnibus/charts/gitlab/charts/unicorn/templates/hpa.yaml
+
+---
+# Source: helm-gitlab-omnibus/charts/gitlab/charts/unicorn/templates/ingress.yaml
+
+---
+# Source: helm-gitlab-omnibus/charts/gitlab/charts/unicorn/templates/pause_job.yaml
+
+
+---
+# Source: helm-gitlab-omnibus/charts/gitlab/charts/unicorn/templates/pdb.yaml
+
+---
+# Source: helm-gitlab-omnibus/charts/gitlab/charts/unicorn/templates/service.yaml
+
+
+---
+# Source: helm-gitlab-omnibus/charts/gitlab/charts/unicorn/templates/tests/test-runner.yaml
+
+
+---
+# Source: helm-gitlab-omnibus/charts/gitlab/charts/unicorn/templates/tests/tests.yaml
+
+
+---
 # Source: helm-gitlab-omnibus/charts/grafana/templates/dashboards-json-configmap.yaml
 
 
@@ -12108,6 +12248,36 @@
 
 
 ---
+# Source: helm-gitlab-omnibus/charts/minio/templates/create-buckets-job.yaml
+
+
+---
+# Source: helm-gitlab-omnibus/charts/minio/templates/ingress.yaml
+
+---
+# Source: helm-gitlab-omnibus/charts/minio/templates/minio_deployment.yaml
+
+
+---
+# Source: helm-gitlab-omnibus/charts/minio/templates/minio_networkpolicy.yaml
+
+
+---
+# Source: helm-gitlab-omnibus/charts/minio/templates/minio_pvc.yaml
+
+
+---
+# Source: helm-gitlab-omnibus/charts/minio/templates/minio_svc.yaml
+
+
+---
+# Source: helm-gitlab-omnibus/charts/minio/templates/minioconfig_configmap.yaml
+
+
+---
+# Source: helm-gitlab-omnibus/charts/minio/templates/pdb.yaml
+
+---
 # Source: helm-gitlab-omnibus/charts/nginx-ingress/templates/clusterrole.yaml
 
 ---
@@ -12324,6 +12494,27 @@
 # Source: helm-gitlab-omnibus/charts/redis/templates/secret.yaml
 
 ---
+# Source: helm-gitlab-omnibus/charts/registry/templates/configmap.yaml
+
+---
+# Source: helm-gitlab-omnibus/charts/registry/templates/deployment.yaml
+
+---
+# Source: helm-gitlab-omnibus/charts/registry/templates/hpa.yaml
+
+---
+# Source: helm-gitlab-omnibus/charts/registry/templates/ingress.yaml
+
+---
+# Source: helm-gitlab-omnibus/charts/registry/templates/networkpolicy.yaml
+
+---
+# Source: helm-gitlab-omnibus/charts/registry/templates/pdb.yaml
+
+---
+# Source: helm-gitlab-omnibus/charts/registry/templates/service.yaml
+
+---
 # Source: helm-gitlab-omnibus/charts/shared-secrets/templates/self-signed-cert-job.yml
 
 
@@ -12331,3 +12522,10 @@
 ---
 # Source: helm-gitlab-omnibus/templates/application.yaml
 
+---
+# Source: helm-gitlab-omnibus/templates/initdb-configmap.yaml
+
+---
+# Source: helm-gitlab-omnibus/templates/upgrade_check_hook.yaml
+
+

bunch of useless information: these files are not generating any k8s object

Cc: @daniels this is pretty much a FYI, and a reminder that you'll have to update all 3 repos next time ;)

Merge request reports