Skip to content

Commit

Permalink
Revert cluster role (#186)
Browse files Browse the repository at this point in the history
* Revert "feat: Remove ClusterRole (#169)"

This reverts commit 2c53130.

* add toggle for clusterrole

* bump version
  • Loading branch information
BeryJu committed Jul 13, 2023
1 parent 7f13cc6 commit 9eb23f2
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 3 deletions.
2 changes: 1 addition & 1 deletion charts/authentik-remote-cluster/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apiVersion: v2
version: 1.2.1
version: 1.2.2
appVersion: 2023.6.0
name: authentik-remote-cluster
description: RBAC required for a remote cluster to be connected to authentik.
Expand Down
3 changes: 2 additions & 1 deletion charts/authentik-remote-cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
---

[![](https://img.shields.io/discord/809154715984199690?label=Discord&style=for-the-badge)](https://goauthentik.io/discord)
![Version: 1.2.1](https://img.shields.io/badge/Version-1.2.1-informational?style=for-the-badge)
![Version: 1.2.2](https://img.shields.io/badge/Version-1.2.2-informational?style=for-the-badge)
![AppVersion: 2023.6.0](https://img.shields.io/badge/AppVersion-2023.6.0-informational?style=for-the-badge)

RBAC required for a remote cluster to be connected to authentik.
Expand All @@ -28,6 +28,7 @@ RBAC required for a remote cluster to be connected to authentik.
| Key | Type | Default | Description |
|-----|------|---------|-------------|
| annotations | object | `{}` | |
| clusterRole.enabled | bool | `true` | |
| fullnameOverride | string | `""` | |
| nameOverride | string | `""` | |
| serviceAccountSecret.enabled | bool | `true` | |
2 changes: 1 addition & 1 deletion charts/authentik-remote-cluster/README.md.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
---

[![](https://img.shields.io/discord/809154715984199690?label=Discord&style=for-the-badge)](https://goauthentik.io/discord)
![Version: 1.2.1](https://img.shields.io/badge/Version-1.2.1-informational?style=for-the-badge)
![Version: 1.2.2](https://img.shields.io/badge/Version-1.2.2-informational?style=for-the-badge)
![AppVersion: 2023.6.0](https://img.shields.io/badge/AppVersion-2023.6.0-informational?style=for-the-badge)

{{ template "chart.deprecationWarning" . }}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{{- if .Values.clusterRole.enabled -}}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: {{ include "authentik-remote-cluster.fullname" . }}-{{ .Release.Namespace }}
labels:
{{- include "authentik-remote-cluster.labels" . | nindent 4 }}
{{- with .Values.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: {{ include "authentik-remote-cluster.fullname" . }}-{{ .Release.Namespace }}
subjects:
- kind: ServiceAccount
name: {{ include "authentik-remote-cluster.fullname" . }}
namespace: {{ .Release.Namespace }}
{{- end }}
20 changes: 20 additions & 0 deletions charts/authentik-remote-cluster/templates/cluster-role.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{{- if .Values.clusterRole.enabled -}}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: {{ include "authentik-remote-cluster.fullname" . }}-{{ .Release.Namespace }}
labels:
{{- include "authentik-remote-cluster.labels" . | nindent 4 }}
{{- with .Values.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
rules:
- apiGroups:
- apiextensions.k8s.io
resources:
- customresourcedefinitions
verbs:
- list
{{- end }}
3 changes: 3 additions & 0 deletions charts/authentik-remote-cluster/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@ annotations: {}

serviceAccountSecret:
enabled: true

clusterRole:
enabled: true

0 comments on commit 9eb23f2

Please sign in to comment.