Skip to content

Commit

Permalink
fix(k8s): add environment definitions to subhelmfiles (#1429)
Browse files Browse the repository at this point in the history
It appears that without these present helmfile uses the
default environment (and thus kubecontext) for applying
changes due to these subhelm files.

This is a big issue; it means that you may accidentally apply
to the wrong environment and there will be no hint
  • Loading branch information
tarrow authored Feb 13, 2024
1 parent 1cd6d30 commit da2b7e9
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
21 changes: 21 additions & 0 deletions k8s/helmfile/istio-control-plane.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
environments:
default:
kubeContext: INVALID-ENVIRONMENT
production:
kubeContext: gke_wikibase-cloud_europe-west3-a_wbaas-3
values:
- ./env/production/base.yaml
- ./env/production/private.yaml
staging:
kubeContext: gke_wikibase-cloud_europe-west3-a_wbaas-2
values:
- ./env/staging/base.yaml
- ./env/staging/private.yaml
local:
kubeContext: minikube-wbaas
values:
- ./env/local/base.yaml
- ./env/local/private.yaml

---

releases:
- name: istio-base
namespace: istio-system
Expand Down
21 changes: 21 additions & 0 deletions k8s/helmfile/prometheus-operator.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
environments:
default:
kubeContext: INVALID-ENVIRONMENT
production:
kubeContext: gke_wikibase-cloud_europe-west3-a_wbaas-3
values:
- ./env/production/base.yaml
- ./env/production/private.yaml
staging:
kubeContext: gke_wikibase-cloud_europe-west3-a_wbaas-2
values:
- ./env/staging/base.yaml
- ./env/staging/private.yaml
local:
kubeContext: minikube-wbaas
values:
- ./env/local/base.yaml
- ./env/local/private.yaml

---

releases:
- name: prometheus-operator-crds
namespace: monitoring
Expand Down

0 comments on commit da2b7e9

Please sign in to comment.