Skip to content

Commit 7c9003e

Browse files
toVersusJSticklerJayclifford345
authored
fix(helm): create namespaced RBAC when sidecar is enabled (#16776)
Signed-off-by: Tsubasa Nagasawa <[email protected]> Signed-off-by: Jay Clifford <[email protected]> Co-authored-by: J Stickler <[email protected]> Co-authored-by: Jay Clifford <[email protected]>
1 parent ab426be commit 7c9003e

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

production/helm/loki/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ Entries should include a reference to the pull request that introduced the chang
1313

1414
[//]: # (<AUTOMATED_UPDATES_LOCATOR> : do not remove this line. This locator is used by the CI pipeline to automatically create a changelog entry for each new Loki release. Add other chart versions and respective changelog entries bellow this line.)
1515

16+
- [BUGFIX] Create missing RBAC for the rules sidecar when RBAC is namespaced
1617
- [FEATURE] Allow setting custom labels for ingester statefulsets [#18536](https://github.com/grafana/loki/pull/18536)
1718
- [BUGFIX] Ensure the scc is actually allowing to use hostPath volumes when the rbac.sccAllowHostDirVolumePlugin is set to true
1819
- [BUGFIX] Fix serviceName in zone-aware ingester statefulsets [#18558](https://github.com/grafana/loki/pull/18558)
1920
- [FEATURE] Added support for chunk-cache-l2 [#17556](https://github.com/grafana/loki/pull/17556)
2021
- [ENHANCEMENT] Add FOLDER_ANNOTATATION logic for sidecar container. [#13289](https://github.com/grafana/loki/pull/13289)
2122
- [ENHANCEMENT] Add configurable `livenessProbe` and `startupProbe` for admin-api. [#18546](https://github.com/grafana/loki/pull/18546)
2223
- [FEATURE] Added support for chunk-cache-l2 [#17556](https://github.com/grafana/loki/pull/17556)
23-
- [ENHANCEMENT] Add FOLDER_ANNOTATATION logic for sidecar container. [#13289](https://github.com/grafana/loki/pull/13289)
2424
- [ENHANCEMENT] Expose Loki UI in pure ingress. [18400](https://github.com/grafana/loki/pull/18400)
2525

2626
## 6.33.0
Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
{{- if or .Values.rbac.pspEnabled .Values.rbac.sccEnabled }}
1+
{{- if or (or .Values.rbac.pspEnabled .Values.rbac.sccEnabled) (and .Values.rbac.namespaced .Values.sidecar.rules.enabled) }}
22
apiVersion: rbac.authorization.k8s.io/v1
33
kind: Role
44
metadata:
55
name: {{ include "loki.name" . }}
66
namespace: {{ $.Release.Namespace }}
77
labels:
88
{{- include "loki.labels" . | nindent 4 }}
9-
{{- if .Values.rbac.pspEnabled }}
109
rules:
10+
{{- if .Values.rbac.pspEnabled }}
1111
- apiGroups:
1212
- policy
1313
resources:
@@ -16,9 +16,8 @@ rules:
1616
- use
1717
resourceNames:
1818
- {{ include "loki.name" . }}
19-
{{- end }}
20-
{{- if .Values.rbac.sccEnabled }}
21-
rules:
19+
{{- end }}
20+
{{- if .Values.rbac.sccEnabled }}
2221
- apiGroups:
2322
- security.openshift.io
2423
resources:
@@ -27,10 +26,10 @@ rules:
2726
- use
2827
resourceNames:
2928
- {{ include "loki.name" . }}
29+
{{- end }}
3030
{{- if and .Values.rbac.namespaced .Values.sidecar.rules.enabled }}
3131
- apiGroups: [""] # "" indicates the core API group
3232
resources: ["configmaps", "secrets"]
3333
verbs: ["get", "watch", "list"]
3434
{{- end }}
3535
{{- end }}
36-
{{- end }}

production/helm/loki/templates/rolebinding.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{{- if or .Values.rbac.pspEnabled .Values.rbac.sccEnabled }}
1+
{{- if or (or .Values.rbac.pspEnabled .Values.rbac.sccEnabled) (and .Values.rbac.namespaced .Values.sidecar.rules.enabled) }}
22
apiVersion: rbac.authorization.k8s.io/v1
33
kind: RoleBinding
44
metadata:

0 commit comments

Comments
 (0)