From de7be5cb971e88dd3fda7b527a004194bdae0330 Mon Sep 17 00:00:00 2001 From: greg pereira Date: Wed, 11 Dec 2024 09:44:11 -0800 Subject: [PATCH] fix umami prod argocd changes: - creating qa and prod overlays - better manifest labeling - docs updates with deployment timing information Signed-off-by: greg pereira --- .gitignore | 3 ++- Makefile | 22 ++++++---------- ...y-umami-openshift-env-secret-conversion.sh | 26 ++++++++++++------- deploy/k8s/base/umami/kustomization.yaml | 2 -- deploy/k8s/base/umami/postgresql-pvc.yaml | 2 ++ deploy/k8s/base/umami/postgresql-service.yaml | 4 +-- deploy/k8s/base/umami/umami-service.yaml | 4 +-- .../overlays/kind/umami/kustomization.yaml | 1 + .../overlays/kind/umami/umami-ingress.yaml | 5 ++++ .../umami/{ => common}/kustomization.yaml | 3 +-- .../umami/{ => common}/umami-route.yaml | 5 +++- .../openshift/umami/prod/kustomization.yaml | 5 ++++ .../umami/prod/umami-secret.sealedsecret.yaml | 25 ++++++++++++++++++ .../openshift/umami/qa/kustomization.yaml | 5 ++++ .../umami/umami-secret.sealedsecret.yaml | 22 ---------------- docs/umami_metrics.md | 7 +++++ 16 files changed, 86 insertions(+), 55 deletions(-) rename deploy/k8s/overlays/openshift/umami/{ => common}/kustomization.yaml (91%) rename deploy/k8s/overlays/openshift/umami/{ => common}/umami-route.yaml (59%) create mode 100644 deploy/k8s/overlays/openshift/umami/prod/kustomization.yaml create mode 100644 deploy/k8s/overlays/openshift/umami/prod/umami-secret.sealedsecret.yaml create mode 100644 deploy/k8s/overlays/openshift/umami/qa/kustomization.yaml delete mode 100644 deploy/k8s/overlays/openshift/umami/umami-secret.sealedsecret.yaml diff --git a/.gitignore b/.gitignore index d9f26242..e00add2b 100644 --- a/.gitignore +++ b/.gitignore @@ -29,4 +29,5 @@ pathservice.pid playwright/.auth # dont track secrets in git deploy/k8s/overlays/kind/umami/umami-secret.yaml -deploy/k8s/overlays/openshift/umami/umami-secret.yaml +deploy/k8s/overlays/openshift/umami/qa/umami-secret.yaml +deploy/k8s/overlays/openshift/umami/prod/umami-secret.yaml diff --git a/Makefile b/Makefile index e45d387f..5d878bdd 100644 --- a/Makefile +++ b/Makefile @@ -193,7 +193,6 @@ deploy-umami-kind: wait-for-readiness load-images $(CMD_PREFIX) kubectl --context=$(ILAB_KUBE_CONTEXT) create namespace $(UMAMI_KUBE_NAMESPACE) --dry-run=client -o yaml | kubectl apply -f - $(CMD_PREFIX) bash -c "source .env && \ deploy/k8s/base/umami/deploy-umami-openshift-env-secret-conversion.sh KIND $(UMAMI_KUBE_NAMESPACE)" - $(CMD_PREFIX) kubectl create -f ./deploy/k8s/overlays/kind/umami/umami-secret.yaml $(CMD_PREFIX) kubectl --context=$(ILAB_KUBE_CONTEXT) apply -k ./deploy/k8s/overlays/kind/umami $(CMD_PREFIX) echo "Waiting for Umami Deployment (pods: postgresql and umami) ..." $(CMD_PREFIX) kubectl --context=$(ILAB_KUBE_CONTEXT) wait --for=condition=Ready pods -n $(UMAMI_KUBE_NAMESPACE) --all -l app.kubernetes.io/part-of=umami --timeout=15m @@ -203,7 +202,6 @@ deploy-umami-kind: wait-for-readiness load-images .PHONY: undeploy-umami-kind undeploy-umami-kind: -$(CMD_PREFIX) kubectl --context=$(ILAB_KUBE_CONTEXT) scale --replicas=0 deployment/umami -n $(UMAMI_KUBE_NAMESPACE) - -$(CMD_PREFIX) kubectl --context=$(ILAB_KUBE_CONTEXT) delete -f ./deploy/k8s/overlays/kind/umami/umami-secret.yaml -$(CMD_PREFIX) kubectl --context=$(ILAB_KUBE_CONTEXT) delete -k ./deploy/k8s/overlays/kind/umami .PHONY: start-dev-kind ## Run the development environment on Kind cluster @@ -240,9 +238,8 @@ deploy-umami-qa-openshift: fi $(CMD_PREFIX) $(OC) create namespace $(UMAMI_KUBE_NAMESPACE) --dry-run=client -o yaml | $(OC) apply -f - $(CMD_PREFIX) source .env && \ - deploy/k8s/base/umami/deploy-umami-openshift-env-secret-conversion.sh OPENSHIFT $(UMAMI_KUBE_NAMESPACE) - $(CMD_PREFIX) $(OC) apply -f ./deploy/k8s/overlays/openshift/umami/umami-secret.yaml - $(CMD_PREFIX) $(OC) apply -k ./deploy/k8s/overlays/openshift/umami + deploy/k8s/base/umami/deploy-umami-openshift-env-secret-conversion.sh QA_OPENSHIFT $(UMAMI_KUBE_NAMESPACE) + $(CMD_PREFIX) $(OC) apply -k ./deploy/k8s/overlays/openshift/umami/qa $(CMD_PREFIX) echo "Waiting for Umami Deployment (pods: postgresql and umami) ..." $(CMD_PREFIX) $(OC) wait --for=condition=Ready pods -n $(UMAMI_KUBE_NAMESPACE) --all -l app.kubernetes.io/part-of=umami --timeout=15m $(CMD_PREFIX) umami_route=$$($(OC) get route umami -n $(UMAMI_KUBE_NAMESPACE) | tail -n 1 | awk '{print $$2}') ; \ @@ -251,8 +248,7 @@ deploy-umami-qa-openshift: .PHONY: undeploy-umami-qa-openshift undeploy-umami-qa-openshift: -$(CMD_PREFIX) $(OC) scale --replicas=0 deployment/umami -n $(UMAMI_KUBE_NAMESPACE) - -$(CMD_PREFIX) $(OC) delete -f ./deploy/k8s/overlays/openshift/umami/umami-secret.yaml - -$(CMD_PREFIX) $(OC) delete -k ./deploy/k8s/overlays/openshift/umami + -$(CMD_PREFIX) $(OC) delete -k ./deploy/k8s/overlays/openshift/umami/qa .PHONY: deploy-prod-openshift deploy-prod-openshift: ## Deploy production stack of the InstructLab UI on OpenShift @@ -284,13 +280,12 @@ deploy-umami-prod-openshift: check-kubeseal check-sealed-secrets-controller fi $(CMD_PREFIX) $(OC) create namespace $(UMAMI_KUBE_NAMESPACE) --dry-run=client -o yaml | $(OC) apply -f - $(CMD_PREFIX) source .env && \ - deploy/k8s/base/umami/deploy-umami-openshift-env-secret-conversion.sh "OPENSHIFT" $(UMAMI_KUBE_NAMESPACE) - $(CMD_PREFIX) cat deploy/k8s/overlays/openshift/umami/umami-secret.yaml | kubeseal \ + deploy/k8s/base/umami/deploy-umami-openshift-env-secret-conversion.sh PROD_OPENSHIFT $(UMAMI_KUBE_NAMESPACE) + $(CMD_PREFIX) cat ./deploy/k8s/overlays/openshift/umami/prod/umami-secret.yaml | kubeseal \ --controller-name=${SEALED_SECRETS_CONTROLLER_NAME} \ --controller-namespace=${SEALED_SECRETS_CONTROLLER_NAMESPACE} \ - --format yaml > ./deploy/k8s/overlays/openshift/umami/umami-secret.sealedsecret.yaml - $(CMD_PREFIX) $(OC) apply -f deploy/k8s/overlays/openshift/umami/umami-secret.sealedsecret.yaml - $(CMD_PREFIX) $(OC) apply -k deploy/k8s/overlays/openshift/umami + --format yaml > ./deploy/k8s/overlays/openshift/umami/prod/umami-secret.sealedsecret.yaml + $(CMD_PREFIX) $(OC) apply -k ./deploy/k8s/overlays/openshift/umami/prod $(CMD_PREFIX) echo "Waiting for Umami Deployment (pods: postgresql and umami) ..." $(CMD_PREFIX) $(OC) wait --for=condition=Ready pods -n $(UMAMI_KUBE_NAMESPACE) --all -l app.kubernetes.io/part-of=umami --timeout=15m $(CMD_PREFIX) umami_route=$$($(OC) get route umami -n $(UMAMI_KUBE_NAMESPACE) | tail -n 1 | awk '{print $$2}') ; \ @@ -299,8 +294,7 @@ deploy-umami-prod-openshift: check-kubeseal check-sealed-secrets-controller .PHONY: undeploy-umami-prod-openshift undeploy-umami-prod-openshift: -$(CMD_PREFIX) $(OC) scale --replicas=0 deployment/umami -n $(UMAMI_KUBE_NAMESPACE) - -$(CMD_PREFIX) $(OC) delete -f ./deploy/k8s/overlays/openshift/umami/umami-secret.sealedsecret.yaml - -$(CMD_PREFIX) $(OC) delete -k ./deploy/k8s/overlays/openshift/umami + -$(CMD_PREFIX) $(OC) delete -k ./deploy/k8s/overlays/openshift/umami/prod .PHONY: check-dev-container-installed check-dev-container-installed: diff --git a/deploy/k8s/base/umami/deploy-umami-openshift-env-secret-conversion.sh b/deploy/k8s/base/umami/deploy-umami-openshift-env-secret-conversion.sh index b1b89625..7f46f3d9 100755 --- a/deploy/k8s/base/umami/deploy-umami-openshift-env-secret-conversion.sh +++ b/deploy/k8s/base/umami/deploy-umami-openshift-env-secret-conversion.sh @@ -11,7 +11,7 @@ fi if [ "$#" -ne 2 ]; then echo "USAGE: $0 TARGET NAMESPACE - TARGET: The deployment target. Options: [\"OPENSHIFT\", \"KIND\"] + TARGET: The deployment target. Options: [\"KIND\", \"QA_OPENSHIFT\", \"PROD_OPENSHIFT\"] NAMESPACE: The namespace where you want to deploy the umami-secret." 1>&2 exit 1 fi @@ -19,19 +19,24 @@ fi TARGET="$1" NAMESPACE="$2" -if [ "${TARGET}" == "OPENSHIFT" ]; then - UMAMI_SECRET_FILE_PATH="deploy/k8s/overlays/openshift/umami/umami-secret.yaml" - UMAMI_DATABASE_NAME_KEY_NAME=POSTGRESQL_DATABASE - UMAMI_DATABASE_USER_KEY_NAME=POSTGRESQL_USER - UMAMI_DATABASE_PASSWORD_KEY_NAME=POSTGRESQL_PASSWORD -elif [ "${TARGET}" == "KIND" ]; then +if [ "${TARGET}" == "KIND" ]; then UMAMI_SECRET_FILE_PATH="deploy/k8s/overlays/kind/umami/umami-secret.yaml" UMAMI_DATABASE_NAME_KEY_NAME=POSTGRES_DB UMAMI_DATABASE_USER_KEY_NAME=POSTGRES_USER UMAMI_DATABASE_PASSWORD_KEY_NAME=POSTGRES_PASSWORD +elif [ "${TARGET}" == "QA_OPENSHIFT" ]; then + UMAMI_SECRET_FILE_PATH="deploy/k8s/overlays/openshift/umami/qa/umami-secret.yaml" + UMAMI_DATABASE_NAME_KEY_NAME=POSTGRESQL_DATABASE + UMAMI_DATABASE_USER_KEY_NAME=POSTGRESQL_USER + UMAMI_DATABASE_PASSWORD_KEY_NAME=POSTGRESQL_PASSWORD +elif [ "${TARGET}" == "PROD_OPENSHIFT" ]; then + UMAMI_SECRET_FILE_PATH="deploy/k8s/overlays/openshift/umami/prod/umami-secret.yaml" + UMAMI_DATABASE_NAME_KEY_NAME=POSTGRESQL_DATABASE + UMAMI_DATABASE_USER_KEY_NAME=POSTGRESQL_USER + UMAMI_DATABASE_PASSWORD_KEY_NAME=POSTGRESQL_PASSWORD else echo "Error, \$TARGET ${TARGET} not recongnized. - TARGET options: [\"OPENSHIFT\", \"KIND\"]" + TARGET options: [\"KIND\", \"QA_OPENSHIFT\", \"PROD_OPENSHIFT\"]" exit 1 fi @@ -73,6 +78,9 @@ kubectl create secret generic umami-secret \ --dry-run=client \ -o yaml > ${UMAMI_SECRET_FILE_PATH} -yq eval ".metadata.labels.cluster_domain = \"${cluster_domain}\"" -i ${UMAMI_SECRET_FILE_PATH} +yq eval ".metadata.labels.sealed-secrets-controller-cluster-domain = \"${cluster_domain}\"" -i ${UMAMI_SECRET_FILE_PATH} +yq eval ".metadata.labels.\"app.kubernetes.io/app\" = \"umami\"" -i ${UMAMI_SECRET_FILE_PATH} +yq eval ".metadata.labels.\"app.kubernetes.io/instance\" = \"umami\"" -i ${UMAMI_SECRET_FILE_PATH} +yq eval ".metadata.labels.\"app.kubernetes.io/part-of\" = \"umami\"" -i ${UMAMI_SECRET_FILE_PATH} echo "Secret manifest has been created: ${UMAMI_SECRET_FILE_PATH}." diff --git a/deploy/k8s/base/umami/kustomization.yaml b/deploy/k8s/base/umami/kustomization.yaml index afa29a2e..03cfeda5 100644 --- a/deploy/k8s/base/umami/kustomization.yaml +++ b/deploy/k8s/base/umami/kustomization.yaml @@ -10,8 +10,6 @@ resources: labels: - includeSelectors: true pairs: - app: umami - app.kubernetes.io/component: umami app.kubernetes.io/instance: umami app.kubernetes.io/name: umami app.kubernetes.io/part-of: umami diff --git a/deploy/k8s/base/umami/postgresql-pvc.yaml b/deploy/k8s/base/umami/postgresql-pvc.yaml index 3eaa5a4a..a8560873 100644 --- a/deploy/k8s/base/umami/postgresql-pvc.yaml +++ b/deploy/k8s/base/umami/postgresql-pvc.yaml @@ -2,6 +2,8 @@ apiVersion: v1 kind: PersistentVolumeClaim metadata: name: umami-postgresql-db-data + labels: + app.kubernetes.io/component: umami-postgresql spec: accessModes: - ReadWriteOnce diff --git a/deploy/k8s/base/umami/postgresql-service.yaml b/deploy/k8s/base/umami/postgresql-service.yaml index e4e88fb0..6a092211 100644 --- a/deploy/k8s/base/umami/postgresql-service.yaml +++ b/deploy/k8s/base/umami/postgresql-service.yaml @@ -3,10 +3,10 @@ kind: Service metadata: name: umami-db labels: - component: db + app.kubernetes.io/component: umami-postgresql spec: ports: - port: 5432 name: postgres selector: - app: umami + app.kubernetes.io/name: umami diff --git a/deploy/k8s/base/umami/umami-service.yaml b/deploy/k8s/base/umami/umami-service.yaml index 47078319..d17d7d0c 100644 --- a/deploy/k8s/base/umami/umami-service.yaml +++ b/deploy/k8s/base/umami/umami-service.yaml @@ -4,11 +4,11 @@ kind: Service metadata: name: umami labels: - component: web + app.kubernetes.io/component: umami-web spec: ports: - name: web port: 3001 selector: - app: umami + app.kubernetes.io/name: umami type: ClusterIP diff --git a/deploy/k8s/overlays/kind/umami/kustomization.yaml b/deploy/k8s/overlays/kind/umami/kustomization.yaml index 4f6bce68..8fce5e63 100644 --- a/deploy/k8s/overlays/kind/umami/kustomization.yaml +++ b/deploy/k8s/overlays/kind/umami/kustomization.yaml @@ -4,3 +4,4 @@ namespace: umami resources: - ../../../base/umami - umami-ingress.yaml + - umami-secret.yaml diff --git a/deploy/k8s/overlays/kind/umami/umami-ingress.yaml b/deploy/k8s/overlays/kind/umami/umami-ingress.yaml index c6b2da28..8d87c365 100644 --- a/deploy/k8s/overlays/kind/umami/umami-ingress.yaml +++ b/deploy/k8s/overlays/kind/umami/umami-ingress.yaml @@ -5,6 +5,11 @@ metadata: annotations: kubernetes.io/ingress.class: nginx nginx.ingress.kubernetes.io/rewrite-target: / + labels: + app.kubernetes.io/component: umami-web + app.kubernetes.io/instance: umami + app.kubernetes.io/name: umami + app.kubernetes.io/part-of: umami spec: ingressClassName: nginx rules: diff --git a/deploy/k8s/overlays/openshift/umami/kustomization.yaml b/deploy/k8s/overlays/openshift/umami/common/kustomization.yaml similarity index 91% rename from deploy/k8s/overlays/openshift/umami/kustomization.yaml rename to deploy/k8s/overlays/openshift/umami/common/kustomization.yaml index 20b76a85..9c0b970b 100644 --- a/deploy/k8s/overlays/openshift/umami/kustomization.yaml +++ b/deploy/k8s/overlays/openshift/umami/common/kustomization.yaml @@ -1,9 +1,8 @@ -# Umami will be deployed on the QA cluster but host metrics for both prod and QA apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization namespace: umami resources: - - ../../../base/umami + - ../../../../base/umami - umami-route.yaml patches: - target: diff --git a/deploy/k8s/overlays/openshift/umami/umami-route.yaml b/deploy/k8s/overlays/openshift/umami/common/umami-route.yaml similarity index 59% rename from deploy/k8s/overlays/openshift/umami/umami-route.yaml rename to deploy/k8s/overlays/openshift/umami/common/umami-route.yaml index bc4e5c49..c0bee6d3 100644 --- a/deploy/k8s/overlays/openshift/umami/umami-route.yaml +++ b/deploy/k8s/overlays/openshift/umami/common/umami-route.yaml @@ -3,7 +3,10 @@ kind: Route metadata: name: umami labels: - name: umami + app.kubernetes.io/component: umami-web + app.kubernetes.io/instance: umami + app.kubernetes.io/name: umami + app.kubernetes.io/part-of: umami spec: port: targetPort: 3001 diff --git a/deploy/k8s/overlays/openshift/umami/prod/kustomization.yaml b/deploy/k8s/overlays/openshift/umami/prod/kustomization.yaml new file mode 100644 index 00000000..83a05ce4 --- /dev/null +++ b/deploy/k8s/overlays/openshift/umami/prod/kustomization.yaml @@ -0,0 +1,5 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - ../common + - umami-secret.sealedsecret.yaml diff --git a/deploy/k8s/overlays/openshift/umami/prod/umami-secret.sealedsecret.yaml b/deploy/k8s/overlays/openshift/umami/prod/umami-secret.sealedsecret.yaml new file mode 100644 index 00000000..8eb5394a --- /dev/null +++ b/deploy/k8s/overlays/openshift/umami/prod/umami-secret.sealedsecret.yaml @@ -0,0 +1,25 @@ +apiVersion: bitnami.com/v1alpha1 +kind: SealedSecret +metadata: + creationTimestamp: null + name: umami-secret + namespace: umami +spec: + encryptedData: + APP_SECRET: AgAQagK0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1mz0Uc5ktEBpcZw4ElodkEpoHb0aJQWSgGkQHKmHLR9xQ== + template: + metadata: + creationTimestamp: null + labels: + app.kubernetes.io/app: umami + app.kubernetes.io/instance: umami + app.kubernetes.io/part-of: umami + sealed-secrets-controller-cluster-domain: c130-e.us-south.containers.cloud.ibm.com + name: umami-secret + namespace: umami + diff --git a/deploy/k8s/overlays/openshift/umami/qa/kustomization.yaml b/deploy/k8s/overlays/openshift/umami/qa/kustomization.yaml new file mode 100644 index 00000000..c3736590 --- /dev/null +++ b/deploy/k8s/overlays/openshift/umami/qa/kustomization.yaml @@ -0,0 +1,5 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - ../common + - umami-secret.yaml diff --git a/deploy/k8s/overlays/openshift/umami/umami-secret.sealedsecret.yaml b/deploy/k8s/overlays/openshift/umami/umami-secret.sealedsecret.yaml deleted file mode 100644 index 7b14c242..00000000 --- a/deploy/k8s/overlays/openshift/umami/umami-secret.sealedsecret.yaml +++ /dev/null @@ -1,22 +0,0 @@ -apiVersion: bitnami.com/v1alpha1 -kind: SealedSecret -metadata: - creationTimestamp: null - name: umami-secret - namespace: umami -spec: - encryptedData: - APP_SECRET: AgAqI0ncJPD7kW3hjNvw+y7O1nwqugOZ/0lAfpQPw/bTQEdmc6TLDO3jsaPqMqibE9rgCc9bqwUst7ftadbEEgaiy5n6dm7K5FlsdqskG5sRLYAtNjEOEGgdV09hAc5oQPFTI65BVlrebk+brfRrnlN1ugrYBtDbxs9SW36Vz+wLNYM3bG9LlViOag30xVCJSA8a/GLNh2eUiHppjvV4SIvOrrgN8wp9RaiVUoDoRpwOiGeiBNhLkpC6R9CcS0aUSbIp2inSMLnjJ7gOSKblxDcV1GN+yTNOedmAQDGhx1KiKUPhokE6FTG/v++ALcBz4LbJvCMyXiDWHuP1YIPhOyXFmHaS+EclOJ6a8+NJbs/tRnhngHLT5vcY0I8QLHL8n5eMcEeNt9DbS3B7j+ytbvZZydeIo4u2wCotu+wz33U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rs1VODkpaPNAtWWdMQQGAVUJmveUbF1qw== - POSTGRESQL_USER: AgBP0Ecq1alJMZ8jkT8C1RaEX5euu4wnXoRr433sCXGICLjvhHNHp7qgXxJ5R9R3RWFxl/cyWyySm5hEtVgBQMJDKBfMWwLrK/qYywVlC2UzHXHzpHE9OmaKb014GlnQPAHw4s40bOmBUvXM0eC7m630TQgYTAqWoHHgReSVpvQvyBs6aP/E1BW+vb0bRxYmNqDWJrG5wIiPhHjD0ipLE1cOvyaCFmYaGcdTiMaAu4bBdMkGn7D6lvqMvKfzEON+1tw+FPWubfVgnx90oGOehsAtzU1UcCK2LXfGauoTHhqZqPwA32h2tnmf8CQ8ZNN4cXAeWKyq8xFbHhDktA7ev7d7ObMZLH5OLIIZd+gtV0q80TMG5vhRemDFs8AL19FkGsGZEdQISBfmGiCU8AQ5xKuYI8UnsHaDN8uhUhUdsJ7xKi8FOzWW1rQu1eRYCjTnccX85AoPBg9fZBPoCE1FRDZK72jZMXD+DHHVxWjSsuSt870N+e6aqB0Sia3Bq13n/Z71Datb1hgo1epbKCrbS7azUh3tlaZKUtOhAyTLcm6jwW5V6tqPaqhWz+XVLFglNwIBXcmjC3BjNhBAgi2m+OQsKnZb280GBn9+v0EkYKPY6Jmo5D0vdjPjIkXIZGYbTQZyEv0iZqT6R/dESLrAqwMq9ycR5QNsHdw/im+6Ci02dbi+fbM7zBNhRcI/OYBIWDt3uqAKqw== - template: - metadata: - creationTimestamp: null - labels: - cluster_domain: c130-e.us-south.containers.cloud.ibm.com - name: umami-secret - namespace: umami - diff --git a/docs/umami_metrics.md b/docs/umami_metrics.md index 45cb73eb..dee0db7e 100644 --- a/docs/umami_metrics.md +++ b/docs/umami_metrics.md @@ -45,6 +45,9 @@ a vanila `curl`. In my testing with this `sleep` there are no crashes, but if yo create our own image from the `ghcr.io/umami-software/umami:postgresql-latest` and add networking tools to detect if the psql container is up to avoid annoying restart crashloops. +It should also be noted that deployment times for Umami vary between environment. Deployments to `kind` can sometimes take up to 5 minutes, although +this is certainly unusual. Deployments on `openshift` are typically a bit faster, taking up to 3 minutes at most. + ### Make Targets Make targets are our prefered method of deployment. @@ -98,3 +101,7 @@ goes down. Once teams and users are properly setup, setup a `site` for each environment we want to deploy. Once created it will provision a script tag to inject into the typescript code to start tracking metrics. + +To access the portal, navigate to the correct endpoint based on your deployment method: +`kind`: `http://umami.localhost:80` +`openshift`: `umami-umami.`. You can find the exact value by running: `oc get route umami -n umami -o jsonpath='{.spec.rules[*].host}'`