Helm: Be able to customize the Namespace (#830)

* Add release namespace for loki

* Add Release namespace for promtail chart

* Add Release namespace for loki-stack chart

* Add doumentation

* Increase chart version
pull/824/head^2
Michael 7 years ago committed by Cyril Tovena
parent e7fb205827
commit 664537e152
  1. 6
      production/helm/README.md
  2. 2
      production/helm/loki-stack/Chart.yaml
  3. 1
      production/helm/loki-stack/templates/datasources.yaml
  4. 2
      production/helm/loki/Chart.yaml
  5. 1
      production/helm/loki/templates/networkpolicy.yaml
  6. 1
      production/helm/loki/templates/pdb.yaml
  7. 1
      production/helm/loki/templates/podsecuritypolicy.yaml
  8. 1
      production/helm/loki/templates/role.yaml
  9. 1
      production/helm/loki/templates/rolebinding.yaml
  10. 1
      production/helm/loki/templates/secret.yaml
  11. 1
      production/helm/loki/templates/service-headless.yaml
  12. 1
      production/helm/loki/templates/service.yaml
  13. 1
      production/helm/loki/templates/serviceaccount.yaml
  14. 1
      production/helm/loki/templates/statefulset.yaml
  15. 2
      production/helm/promtail/Chart.yaml
  16. 1
      production/helm/promtail/templates/clusterrole.yaml
  17. 1
      production/helm/promtail/templates/configmap.yaml
  18. 1
      production/helm/promtail/templates/daemonset.yaml
  19. 1
      production/helm/promtail/templates/podsecuritypolicy.yaml
  20. 1
      production/helm/promtail/templates/role.yaml
  21. 1
      production/helm/promtail/templates/rolebinding.yaml
  22. 1
      production/helm/promtail/templates/serviceaccount.yaml

@ -24,6 +24,12 @@ $ helm repo update
$ helm upgrade --install loki loki/loki-stack
```
### Deploy in a custom namespace
```bash
$ helm upgrade --install loki --namespace=loki-stack loki/loki-stack
```
### Deploy with custom config
```bash

@ -1,5 +1,5 @@
name: loki-stack
version: 0.11.1
version: 0.12.0
appVersion: 0.0.1
kubeVersion: "^1.10.0-0"
description: "Loki: like Prometheus, but for logs."

@ -3,6 +3,7 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: {{ template "loki-stack.fullname" . }}
namespace: {{ .Release.Namespace }}
labels:
app: {{ template "loki-stack.name" . }}
chart: {{ template "loki-stack.chart" . }}

@ -1,5 +1,5 @@
name: loki
version: 0.10.0
version: 0.11.0
appVersion: 0.0.1
kubeVersion: "^1.10.0-0"
description: "Loki: like Prometheus, but for logs."

@ -3,6 +3,7 @@ apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: {{ template "loki.fullname" . }}
namespace: {{ .Release.Namespace }}
labels:
app: {{ template "loki.name" . }}
chart: {{ template "loki.chart" . }}

@ -3,6 +3,7 @@ apiVersion: policy/v1beta1
kind: PodDisruptionBudget
metadata:
name: {{ template "loki.fullname" . }}
namespace: {{ .Release.Namespace }}
labels:
app: {{ template "loki.name" . }}
heritage: {{ .Release.Service }}

@ -3,6 +3,7 @@ apiVersion: policy/v1beta1
kind: PodSecurityPolicy
metadata:
name: {{ template "loki.fullname" . }}
namespace: {{ .Release.Namespace }}
labels:
app: {{ template "loki.name" . }}
chart: {{ template "loki.chart" . }}

@ -3,6 +3,7 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: {{ template "loki.fullname" . }}
namespace: {{ .Release.Namespace }}
labels:
app: {{ template "loki.name" . }}
chart: {{ template "loki.chart" . }}

@ -3,6 +3,7 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: {{ template "loki.fullname" . }}
namespace: {{ .Release.Namespace }}
labels:
app: {{ template "loki.name" . }}
chart: {{ template "loki.chart" . }}

@ -2,6 +2,7 @@ apiVersion: v1
kind: Secret
metadata:
name: {{ template "loki.fullname" . }}
namespace: {{ .Release.Namespace }}
labels:
app: {{ template "loki.name" . }}
chart: {{ template "loki.chart" . }}

@ -2,6 +2,7 @@ apiVersion: v1
kind: Service
metadata:
name: {{ template "loki.fullname" . }}-headless
namespace: {{ .Release.Namespace }}
labels:
app: {{ template "loki.name" . }}
chart: {{ template "loki.chart" . }}

@ -2,6 +2,7 @@ apiVersion: v1
kind: Service
metadata:
name: {{ template "loki.fullname" . }}
namespace: {{ .Release.Namespace }}
labels:
app: {{ template "loki.name" . }}
chart: {{ template "loki.chart" . }}

@ -8,5 +8,6 @@ metadata:
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
name: {{ template "loki.serviceAccountName" . }}
namespace: {{ .Release.Namespace }}
{{- end }}

@ -2,6 +2,7 @@ apiVersion: apps/v1
kind: StatefulSet
metadata:
name: {{ template "loki.fullname" . }}
namespace: {{ .Release.Namespace }}
labels:
app: {{ template "loki.name" . }}
chart: {{ template "loki.chart" . }}

@ -1,5 +1,5 @@
name: promtail
version: 0.8.1
version: 0.9.0
appVersion: 0.0.1
kubeVersion: "^1.10.0-0"
description: "Responsible for gathering logs and sending them to Loki"

@ -8,6 +8,7 @@ metadata:
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
name: {{ template "promtail.fullname" . }}-clusterrole
namespace: {{ .Release.Namespace }}
rules:
- apiGroups: [""] # "" indicates the core API group
resources:

@ -2,6 +2,7 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: {{ template "promtail.fullname" . }}
namespace: {{ .Release.Namespace }}
labels:
app: {{ template "promtail.name" . }}
chart: {{ template "promtail.chart" . }}

@ -2,6 +2,7 @@ apiVersion: apps/v1
kind: DaemonSet
metadata:
name: {{ template "promtail.fullname" . }}
namespace: {{ .Release.Namespace }}
labels:
app: {{ template "promtail.name" . }}
chart: {{ template "promtail.chart" . }}

@ -3,6 +3,7 @@ apiVersion: policy/v1beta1
kind: PodSecurityPolicy
metadata:
name: {{ template "promtail.fullname" . }}
namespace: {{ .Release.Namespace }}
labels:
app: {{ template "promtail.name" . }}
chart: {{ template "promtail.chart" . }}

@ -3,6 +3,7 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: {{ template "promtail.fullname" . }}
namespace: {{ .Release.Namespace }}
labels:
app: {{ template "promtail.name" . }}
chart: {{ template "promtail.chart" . }}

@ -3,6 +3,7 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: {{ template "promtail.fullname" . }}
namespace: {{ .Release.Namespace }}
labels:
app: {{ template "promtail.name" . }}
chart: {{ template "promtail.chart" . }}

@ -8,5 +8,6 @@ metadata:
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
name: {{ template "promtail.serviceAccountName" . }}
namespace: {{ .Release.Namespace }}
{{- end }}

Loading…
Cancel
Save