helm: fix resource not respect namespace (#9678)

**What this PR does / why we need it**:

this PR make all resources have some behavior when running `helm
template loki grafana/loki --name istio-system`

istio use it here:
https://github.com/istio/istio/blob/master/manifests/addons/gen.sh#L89

**Which issue(s) this PR fixes**:
Fixes #<issue number>

**Special notes for your reviewer**:

**Checklist**
- [x] Reviewed the
[`CONTRIBUTING.md`](https://github.com/grafana/loki/blob/main/CONTRIBUTING.md)
guide (**required**)
- [ ] Documentation added
- [ ] Tests updated
- [ ] `CHANGELOG.md` updated
- [ ] Changes that require user attention or interaction to upgrade are
documented in `docs/sources/upgrading/_index.md`
- [ ] For Helm chart changes bump the Helm chart version in
`production/helm/loki/Chart.yaml` and update
`production/helm/loki/CHANGELOG.md` and
`production/helm/loki/README.md`. [Example
PR](d10549e3ec)

Signed-off-by: hejianpeng <hejianpeng2@huawei.com>
pull/9725/head
zirain 2 years ago committed by GitHub
parent 61d407b4bb
commit 8bf4e12edf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      production/helm/loki/templates/config.yaml

@ -7,6 +7,7 @@ kind: ConfigMap
{{- end }} {{- end }}
metadata: metadata:
name: {{ tpl .Values.loki.externalConfigSecretName . }} name: {{ tpl .Values.loki.externalConfigSecretName . }}
namespace: {{ $.Release.Namespace }}
labels: labels:
{{- include "loki.labels" . | nindent 4 }} {{- include "loki.labels" . | nindent 4 }}
{{- if eq .Values.loki.configStorageType "Secret" }} {{- if eq .Values.loki.configStorageType "Secret" }}

Loading…
Cancel
Save