Skip to content

Commit

Permalink
Helm: Be able to customize the Namespace (#830)
Browse files Browse the repository at this point in the history
* Add release namespace for loki

* Add Release namespace for promtail chart

* Add Release namespace for loki-stack chart

* Add doumentation

* Increase chart version
  • Loading branch information
mmatur authored and cyriltovena committed Aug 1, 2019
1 parent e7fb205 commit 664537e
Show file tree
Hide file tree
Showing 22 changed files with 27 additions and 3 deletions.
6 changes: 6 additions & 0 deletions production/helm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion production/helm/loki-stack/Chart.yaml
Original file line number Diff line number Diff line change
@@ -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."
Expand Down
1 change: 1 addition & 0 deletions production/helm/loki-stack/templates/datasources.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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" . }}
Expand Down
2 changes: 1 addition & 1 deletion production/helm/loki/Chart.yaml
Original file line number Diff line number Diff line change
@@ -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."
Expand Down
1 change: 1 addition & 0 deletions production/helm/loki/templates/networkpolicy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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" . }}
Expand Down
1 change: 1 addition & 0 deletions production/helm/loki/templates/pdb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
1 change: 1 addition & 0 deletions production/helm/loki/templates/podsecuritypolicy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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" . }}
Expand Down
1 change: 1 addition & 0 deletions production/helm/loki/templates/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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" . }}
Expand Down
1 change: 1 addition & 0 deletions production/helm/loki/templates/rolebinding.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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" . }}
Expand Down
1 change: 1 addition & 0 deletions production/helm/loki/templates/secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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" . }}
Expand Down
1 change: 1 addition & 0 deletions production/helm/loki/templates/service-headless.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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" . }}
Expand Down
1 change: 1 addition & 0 deletions production/helm/loki/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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" . }}
Expand Down
1 change: 1 addition & 0 deletions production/helm/loki/templates/serviceaccount.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ metadata:
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
name: {{ template "loki.serviceAccountName" . }}
namespace: {{ .Release.Namespace }}
{{- end }}

1 change: 1 addition & 0 deletions production/helm/loki/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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" . }}
Expand Down
2 changes: 1 addition & 1 deletion production/helm/promtail/Chart.yaml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
1 change: 1 addition & 0 deletions production/helm/promtail/templates/clusterrole.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
1 change: 1 addition & 0 deletions production/helm/promtail/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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" . }}
Expand Down
1 change: 1 addition & 0 deletions production/helm/promtail/templates/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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" . }}
Expand Down
1 change: 1 addition & 0 deletions production/helm/promtail/templates/podsecuritypolicy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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" . }}
Expand Down
1 change: 1 addition & 0 deletions production/helm/promtail/templates/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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" . }}
Expand Down
1 change: 1 addition & 0 deletions production/helm/promtail/templates/rolebinding.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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" . }}
Expand Down
1 change: 1 addition & 0 deletions production/helm/promtail/templates/serviceaccount.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ metadata:
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
name: {{ template "promtail.serviceAccountName" . }}
namespace: {{ .Release.Namespace }}
{{- end }}

0 comments on commit 664537e

Please sign in to comment.