From 8eea4b444052e707fb5585c864239538b96d5d5e Mon Sep 17 00:00:00 2001 From: Pavel Basov Date: Thu, 5 Dec 2024 15:07:46 +0100 Subject: [PATCH] Fix release version collision, vmalert config, cleanup cruft --- .github/workflows/release.yml | 3 +-- .../templates/victoria/vmalert.yaml | 8 +++--- demo/README.md | 27 ------------------- 3 files changed, 5 insertions(+), 33 deletions(-) delete mode 100644 demo/README.md diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 88b3878..bf0979a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -43,5 +43,4 @@ jobs: - name: Run chart-releaser uses: helm/chart-releaser-action@v1.6.0 env: - CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" - CR_SKIP_EXISTING: true \ No newline at end of file + CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" \ No newline at end of file diff --git a/charts/motel-regional/templates/victoria/vmalert.yaml b/charts/motel-regional/templates/victoria/vmalert.yaml index 484bb02..638718c 100644 --- a/charts/motel-regional/templates/victoria/vmalert.yaml +++ b/charts/motel-regional/templates/victoria/vmalert.yaml @@ -7,7 +7,7 @@ metadata: spec: configMaps: [] datasource: - url: http://vmselect-cluster.mon.svc:8481/select/0/prometheus + url: http://vmselect-cluster.{{ .Release.Namespace }}.svc:8481/select/0/prometheus evaluationInterval: 15s externalLabels: {} extraArgs: @@ -17,11 +17,11 @@ spec: tag: v1.105.0 license: {} notifiers: - - url: http://vmalertmanager-cluster-0.vmalertmanager-cluster.mon.svc:9093/ + - url: http://vmalertmanager-cluster-0.vmalertmanager-cluster.{{ .Release.Namespace }}.svc:9093/ port: "8080" remoteRead: - url: {{ .Values.victoriametrics.vmalert.remoteRead | default "http://vmselect-cluster.mon.svc:8481/select/0/prometheus" }} + url: {{ .Values.victoriametrics.vmalert.remoteRead | default (printf "http://vmselect-cluster.%s.svc:8481/select/0/prometheus" .Release.Namespace) }} remoteWrite: - url: http://vminsert-cluster.mon.svc:8480/insert/0/prometheus/api/v1/write + url: http://vminsert-cluster.{{ .Release.Namespace }}.svc:8480/insert/0/prometheus/api/v1/write selectAllByDefault: true {{- end }} \ No newline at end of file diff --git a/demo/README.md b/demo/README.md deleted file mode 100644 index 37db371..0000000 --- a/demo/README.md +++ /dev/null @@ -1,27 +0,0 @@ -## add helm repo -helm repo add -## deploy mothership chart -helm upgrade -i mothership pbasov/motel-motheship -n hmc-system -f demo-mothership-values.yaml - -## deploy demo regional managedcluster -kubectl apply -f ./cluster/aws-motel-regional.yaml - -## deploy demo child cluster -kubectl apply -f ./cluster/aws-motel-child.yaml - -## pull kubeconfig -kubectl get secret -o jsonpath={.data.value} -n motel aws-motel-regional-kubeconfig | base64 -d > /tmp/regional-kc.yaml - -## pull auth creds -KUBECONFIG=/tmp/regional-kc.yaml kubectl get secret -o jsonpath={'data.admin-password'} | base64 -d > /tmp/regional-grafana.yaml - -## print links and creds -echo $INGRESS -echo admin:$(cat /tmp/regional-grafana.yaml) - -## deploy a second set -kubectl apply -f ./cluster/aws-motel-child.yaml - -# pull mothership creds - -# print mothership link and creds (port-forward?) \ No newline at end of file