Skip to content

Commit

Permalink
feat(flame): Add RBAC support (#653)
Browse files Browse the repository at this point in the history
* Expose option to create serviceAccount

* Create RBAC resources

* Bump chart version

* chore(flame): Update changelog entry to indicate added feature

* chore(flame): Update chart metadata

---------

Co-authored-by: Gabe Cook <[email protected]>
  • Loading branch information
djjudas21 and gabe565 authored Jul 17, 2024
1 parent 5171085 commit 3c6aefc
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 5 deletions.
6 changes: 3 additions & 3 deletions charts/flame/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: Flame is self-hosted startpage for your server. Easily manage your
home: https://charts.gabe565.com/charts/flame/
icon: https://raw.githubusercontent.com/gabe565/charts/main/charts/flame/icon.svg
type: application
version: 0.5.4
version: 0.6.0
# renovate datasource=docker depName=pawelmalak/flame
appVersion: multiarch2.3.1
kubeVersion: ">=1.22.0-0"
Expand All @@ -21,8 +21,8 @@ sources:
- https://github.com/pawelmalak/flame
annotations:
artifacthub.io/changes: |-
- kind: changed
description: Pin bjw-s common chart links to v1
- kind: added
description: Add RBAC support
artifacthub.io/links: |-
- name: App Source
url: https://github.com/pawelmalak/flame
Expand Down
9 changes: 7 additions & 2 deletions charts/flame/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<img src="https://raw.githubusercontent.com/gabe565/charts/main/charts/flame/icon.svg" align="right" width="92" alt="flame logo">

![Version: 0.5.4](https://img.shields.io/badge/Version-0.5.4-informational?style=flat)
![Version: 0.6.0](https://img.shields.io/badge/Version-0.6.0-informational?style=flat)
![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat)
![AppVersion: multiarch2.3.1](https://img.shields.io/badge/AppVersion-multiarch2.3.1-informational?style=flat)

Expand All @@ -11,7 +11,7 @@ Flame is self-hosted startpage for your server. Easily manage your apps and book
**Homepage:** <https://charts.gabe565.com/charts/flame/>

**This chart is not maintained by the upstream project and any issues with the chart should be raised
[here](https://github.com/gabe565/charts/issues/new?assignees=gabe565&labels=bug&template=bug_report.yaml&name=flame&version=0.5.4)**
[here](https://github.com/gabe565/charts/issues/new?assignees=gabe565&labels=bug&template=bug_report.yaml&name=flame&version=0.6.0)**

## Source Code

Expand Down Expand Up @@ -90,7 +90,12 @@ N/A
| image.tag | string | `"multiarch2.3.1"` | image tag |
| ingress.main | object | See [values.yaml](./values.yaml) | Enable and configure ingress settings for the chart under this key. |
| persistence | object | See [values.yaml](./values.yaml) | Configure persistence settings for the chart under this key. |
| rbac.create | bool | `true` | Create RBAC resources |
| service | object | See [values.yaml](./values.yaml) | Configures service settings for the chart. |
| serviceAccount.annotations | object | `{}` | Annotations to add to the service account |
| serviceAccount.create | bool | `true` | Specifies whether a service account should be created |
| serviceAccount.labels | object | `{}` | Labels to add to the service account |
| serviceAccount.name | string | `""` | The name of the service account to use. If not set and create is true, a name is generated using the fullname template |

---
Autogenerated from chart metadata using [helm-docs](https://github.com/norwoodj/helm-docs)
10 changes: 10 additions & 0 deletions charts/flame/templates/clusterrole.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{{- if .Values.rbac.create }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: {{ include "bjw-s.common.lib.chart.names.fullname" . }}
rules:
- apiGroups: ["networking.k8s.io"]
resources: ["ingresses"]
verbs: ["get", "watch", "list"]
{{- end }}
14 changes: 14 additions & 0 deletions charts/flame/templates/clusterrolebinding.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{{- if .Values.rbac.create }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: {{ include "bjw-s.common.lib.chart.names.fullname" . }}
subjects:
- kind: ServiceAccount
name: {{ include "bjw-s.common.lib.chart.names.fullname" . }}
namespace: {{ .Release.Namespace }}
roleRef:
kind: ClusterRole
name: {{ include "bjw-s.common.lib.chart.names.fullname" . }}
apiGroup: rbac.authorization.k8s.io
{{- end }}
18 changes: 18 additions & 0 deletions charts/flame/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,24 @@ service:
http:
port: 5005

serviceAccount:
# -- Specifies whether a service account should be created
create: true

# -- Annotations to add to the service account
annotations: {}

# -- Labels to add to the service account
labels: {}

# -- The name of the service account to use.
# If not set and create is true, a name is generated using the fullname template
name: ""

rbac:
# -- Create RBAC resources
create: true

ingress:
# -- Enable and configure ingress settings for the chart under this key.
# @default -- See [values.yaml](./values.yaml)
Expand Down

0 comments on commit 3c6aefc

Please sign in to comment.