From 447306c0769622c48c3730bde2ada5d19a6e4baa Mon Sep 17 00:00:00 2001 From: Sebastian Choren Date: Wed, 9 Oct 2024 11:06:19 -0300 Subject: [PATCH] fix: enable usage of tilt (#23) --- .gitignore | 4 ++- charts/tracetest-auth/templates/secret.yaml | 8 ++--- .../tracetest-cloud/templates/deployment.yaml | 2 +- charts/tracetest-cloud/values.yaml | 1 + .../templates/configmap.yaml | 4 ++- charts/tracetest-onprem/requirements.yaml | 32 +++++++++++++++++++ scripts/bump_charts.sh | 2 ++ scripts/setup_kind_cluster.sh | 2 +- 8 files changed, 47 insertions(+), 8 deletions(-) create mode 100644 charts/tracetest-onprem/requirements.yaml diff --git a/.gitignore b/.gitignore index f4eb3c4d..f2cdfe08 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,6 @@ **/*/Chart.lock **/*/charts/* cluster.env -tracetest.kubeconfig \ No newline at end of file +tracetest.kubeconfig +.env +*.bkp \ No newline at end of file diff --git a/charts/tracetest-auth/templates/secret.yaml b/charts/tracetest-auth/templates/secret.yaml index a412e3c1..39c6bab1 100644 --- a/charts/tracetest-auth/templates/secret.yaml +++ b/charts/tracetest-auth/templates/secret.yaml @@ -36,7 +36,7 @@ data: # COOKIE: {{ randAlphaNum 32 | b64enc }} # CIPHER: {{ randAlphaNum 32 | b64enc }} # SMTP_URI: {{ .Values.global.smtp.uri | b64enc }} - GOOGLE_CLIENT_ID: {{ .Values.global.sso.google.clientID | b64enc }} - GOOGLE_CLIENT_SECRET: {{ .Values.global.sso.google.clientSecret | b64enc }} - GITHUB_CLIENT_ID: {{ .Values.global.sso.github.clientID | b64enc }} - GITHUB_CLIENT_SECRET: {{ .Values.global.sso.github.clientSecret | b64enc }} \ No newline at end of file + GOOGLE_CLIENT_ID: {{ .Values.global.sso.google.clientID | b64enc | quote }} + GOOGLE_CLIENT_SECRET: {{ .Values.global.sso.google.clientSecret | b64enc | quote }} + GITHUB_CLIENT_ID: {{ .Values.global.sso.github.clientID | b64enc | quote }} + GITHUB_CLIENT_SECRET: {{ .Values.global.sso.github.clientSecret | b64enc | quote }} \ No newline at end of file diff --git a/charts/tracetest-cloud/templates/deployment.yaml b/charts/tracetest-cloud/templates/deployment.yaml index c91eb1d5..9148eb16 100644 --- a/charts/tracetest-cloud/templates/deployment.yaml +++ b/charts/tracetest-cloud/templates/deployment.yaml @@ -198,7 +198,7 @@ spec: secretKeyRef: name: {{ include "tracetest-cloud.fullname" . }}-secrets key: LICENSE - imagePullPolicy: Always + imagePullPolicy: {{ .Values.image.pullPolicy }} resources: {{- toYaml .Values.deployment.resources | nindent 12 }} ports: diff --git a/charts/tracetest-cloud/values.yaml b/charts/tracetest-cloud/values.yaml index db400d3f..b35cf4a0 100644 --- a/charts/tracetest-cloud/values.yaml +++ b/charts/tracetest-cloud/values.yaml @@ -85,6 +85,7 @@ deployment: image: repository: kubeshop/tracetest-cloud + pullPolicy: IfNotPresent config: sendgridApiKey: some-value diff --git a/charts/tracetest-frontend/templates/configmap.yaml b/charts/tracetest-frontend/templates/configmap.yaml index b1f504e9..7ffe027d 100644 --- a/charts/tracetest-frontend/templates/configmap.yaml +++ b/charts/tracetest-frontend/templates/configmap.yaml @@ -10,4 +10,6 @@ data: REACT_APP_ORY_KRATOS_PUBLIC_API_URL: {{ include "tracetest-common.url" .Values.global.urls.auth | quote}} REACT_APP_AGENT_URL: "{{ .Values.global.urls.agents.domain }}:{{ .Values.global.urls.agents.port }}" REACT_APP_UI_URL: {{ include "tracetest-common.url" .Values.global.urls.web | quote}} - REACT_APP_DISABLE_TELEMETRY: "{{ .Values.global.urls.api }}" \ No newline at end of file + REACT_APP_DISABLE_TELEMETRY: "{{ .Values.global.urls.api }}" + REACT_APP_FEATURE_FLAG_MONITORS: "true" + \ No newline at end of file diff --git a/charts/tracetest-onprem/requirements.yaml b/charts/tracetest-onprem/requirements.yaml new file mode 100644 index 00000000..31d5ca8d --- /dev/null +++ b/charts/tracetest-onprem/requirements.yaml @@ -0,0 +1,32 @@ +dependencies: +- name: tracetest-frontend + version: v1.13.0 + repository: file://../tracetest-frontend + condition: tracetest-frontend.enabled +- name: tracetest-core + version: v1.33.0 + repository: file://../tracetest-core + condition: tracetest-core.enabled +- name: tracetest-cloud + version: v1.38.0 + repository: file://../tracetest-cloud + condition: tracetest-cloud.enabled +- name: tracetest-agent-operator + version: v1.21.0 + repository: file://../tracetest-agent-operator + condition: tracetest-agent-operator.enabled +- name: tracetest-monitor-operator + version: v1.14.0 + repository: file://../tracetest-monitor-operator + condition: tracetest-monitor-operator.enabled +- name: tracetest-auth + version: v1.33.0 + repository: file://../tracetest-auth + condition: tracetest-auth.enabled +- name: tracetest-common + version: v1.5.0 + repository: file://../tracetest-common +- name: nats + version: 1.1.11 + repository: https://nats-io.github.io/k8s/helm/charts/ + condition: nats.enabled diff --git a/scripts/bump_charts.sh b/scripts/bump_charts.sh index 514a79e0..101152ed 100755 --- a/scripts/bump_charts.sh +++ b/scripts/bump_charts.sh @@ -1,6 +1,7 @@ #!/bin/bash ONPREM_CHART_FILE="charts/tracetest-onprem/Chart.yaml" +ONPREM_REQUIREMENTS_FILE="charts/tracetest-onprem/requirements.yaml" ONPREM_CHART_NAME="tracetest-onprem" changed_charts=$(git --no-pager diff --name-only HEAD~1 charts | grep '/' | cut -d'/' -f1-2 | uniq) @@ -37,6 +38,7 @@ for chart in $changed_charts; do echo "Update $chartName to $newChartVersion in $ONPREM_CHART_FILE" yq eval '.dependencies[] |= (select(.name == "'"$chartName"'").version = "'"$newChartVersion"'")' "$ONPREM_CHART_FILE" -i + yq eval '.dependencies[] |= (select(.name == "'"$chartName"'").version = "'"$newChartVersion"'")' "$ONPREM_REQUIREMENTS_FILE" -i if [[ $? -ne 0 ]]; then echo "Error occurred while updating $chartName in $ONPREM_CHART_FILE" diff --git a/scripts/setup_kind_cluster.sh b/scripts/setup_kind_cluster.sh index 1f145325..a8d9aa93 100755 --- a/scripts/setup_kind_cluster.sh +++ b/scripts/setup_kind_cluster.sh @@ -23,7 +23,7 @@ if [[ "$@" == *"--help"* ]]; then fi PROJECT_ROOT=$(dirname "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)") -KUBECONFIG_FILE=$(pwd)/tracetest.kubeconfig +KUBECONFIG_FILE=$PROJECT_ROOT/tracetest.kubeconfig ENV_FILE=$PROJECT_ROOT/cluster.env HELM_EXTRA_FLAGS=()