Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
Signed-off-by: greg pereira <grpereir@redhat.com>
  • Loading branch information
Gregory-Pereira committed Dec 10, 2024
1 parent f130f4c commit e60da09
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 11 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/lint-jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ jobs:
- uses: actions/checkout@v4
- name: Run ShellCheck
uses: ludeeus/action-shellcheck@master
env:
SHELLCHECK_OPTS: "-e SC1091" # ignores using .env for source as issue

markdown-lint:
runs-on: ubuntu-latest
steps:
Expand Down
2 changes: 0 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -176,15 +176,13 @@ deploy: wait-for-readiness ## Deploy a InstructLab UI development stack onto a k
redeploy: ui-image load-images ## Redeploy the InstructLab UI stack onto a kubernetes cluster
$(CMD_PREFIX) kubectl --context=$(ILAB_KUBE_CONTEXT) -n $(ILAB_KUBE_NAMESPACE) rollout restart deploy/ui
$(CMD_PREFIX) kubectl --context=$(ILAB_KUBE_CONTEXT) -n $(ILAB_KUBE_NAMESPACE) rollout restart deploy/pathservice
$(CMD_PREFIX) kubectl --context=$(ILAB_KUBE_CONTEXT) -n $(UMAMI_KUBE_NAMESPACE) rollout restart deploy/umami

.PHONY: undeploy
undeploy: ## Undeploy the InstructLab UI stack from a kubernetes cluster
$(CMD_PREFIX) if [ -f ./deploy/k8s/overlays/kind/.env ]; then \
rm ./deploy/k8s/overlays/kind/.env ; \
fi
$(CMD_PREFIX) kubectl --context=$(ILAB_KUBE_CONTEXT) delete namespace $(ILAB_KUBE_NAMESPACE)
$(CMD_PREFIX) kubectl --context=$(ILAB_KUBE_CONTEXT) delete namespace $(UMAMI_KUBE_NAMESPACE)

.PHONY: deploy-umami-kind
deploy-umami-kind: wait-for-readiness load-images
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,13 @@ cluster_domain=$(kubectl cluster-info | grep 'Kubernetes control plane' | awk -F

# Note: `.env` value UMAMI_APP_SECRET is re-routed to APP_SECRET intentionally
kubectl create secret generic umami-secret \
--from-literal DATABASE_TYPE=${DATABASE_TYPE} \
--from-literal ${UMAMI_DATABASE_NAME_KEY_NAME}=${UMAMI_DATABASE_NAME} \
--from-literal ${UMAMI_DATABASE_USER_KEY_NAME}=${UMAMI_DATABASE_USER} \
--from-literal ${UMAMI_DATABASE_PASSWORD_KEY_NAME}=${UMAMI_DATABASE_PASSWORD} \
--from-literal APP_SECRET=${UMAMI_APP_SECRET} \
--from-literal DATABASE_URL=${DATABASE_URL} \
--namespace ${NAMESPACE} \
--from-literal "DATABASE_TYPE=${DATABASE_TYPE}" \
--from-literal "${UMAMI_DATABASE_NAME_KEY_NAME}=${UMAMI_DATABASE_NAME}" \
--from-literal "${UMAMI_DATABASE_USER_KEY_NAME}=${UMAMI_DATABASE_USER}" \
--from-literal "${UMAMI_DATABASE_PASSWORD_KEY_NAME}=${UMAMI_DATABASE_PASSWORD}" \
--from-literal "APP_SECRET=${UMAMI_APP_SECRET}" \
--from-literal "DATABASE_URL=${DATABASE_URL}" \
--namespace "${NAMESPACE}" \
--dry-run=client \
-o yaml > ${UMAMI_SECRET_FILE_PATH}

Expand Down
2 changes: 0 additions & 2 deletions docs/umami_metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ but best security practices are to set it.
Also, we have chosen to use `UMAMI_APP_SECRET` in the `.env` file but in the deployment process this gets mapped to `APP_SECRET`. We chose this
pattern because it brings clarity to what the variable does in the context of the `.env` file.


| Variable | Description | Example Value |
|-------------------------|---------------------------------------------------------------------------|----------------------------------------------------|
| UMAMI_APP_SECRET | Used as Hash Salt for the Database | YbSbtb |
Expand All @@ -26,7 +25,6 @@ pattern because it brings clarity to what the variable does in the context of th
| UMAMI_DATABASE_PASSWORD | Password for the user of the database for Umami | db-pass |
| DATABASE_URL | The URL the Umami pod will use to access the DB | postgresql://db-user:db-pass@umami-db:5432/db-name |


> [!IMPORTANT]
> The `DATABASE_URL` is derrived from the other variables plus the [name of the service](../deploy/k8s/base/umami/postgresql-service.yaml#L4) used in deployment.
> The env variables `UMAMI_DATABASE_NAME`, `UMAMI_DATABASE_USER` and `UMAMI_DATABASE_PASSWORD` get mapped to the environment variables for the container image
Expand Down

0 comments on commit e60da09

Please sign in to comment.