Skip to content

Commit

Permalink
feat: common labels
Browse files Browse the repository at this point in the history
  • Loading branch information
bagnaram committed Nov 22, 2024
1 parent e55f030 commit d2570dc
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 0 deletions.
17 changes: 17 additions & 0 deletions charts/openfga/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,23 @@ This will deploy a 3-replica deployment of OpenFGA on the Kubernetes cluster usi


## Customization
If you wish to customize the OpenFGA deployment you may supply paremeters such as the ones listed in the [values.yaml](/charts/openfga/values.yaml).

### Installing with Custom Common Labels
You can specify custom labels to insert into resources inline or via Values files:

```sh
$ helm install openfga openfga/openfga \
--set-json 'commonLabels={"app.example.com/domain": "example", "app.example.com/system": "permissions"}'
```

```yaml
commonLabels:
app.example.com/system: permissions
app.example.com/domain: example
```
### Installing with Postgres
If you do not already have a Postgres deployment, you can deploy OpenFGA with Postgres with the following command:
Expand Down
1 change: 1 addition & 0 deletions charts/openfga/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ Common labels
{{- define "openfga.labels" -}}
helm.sh/chart: {{ include "openfga.chart" . }}
{{ include "openfga.selectorLabels" . }}
{{ .Values.commonLabels | toYaml }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
Expand Down
5 changes: 5 additions & 0 deletions charts/openfga/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@
},
"additionalProperties": false
},
"commonLabels": {
"type": "object",
"description": "Common labels to apply to OpenFGA resources",
"default": ""
},
"fullnameOverride": {
"type": "string",
"description": "Overrides the default fully qualified app name",
Expand Down
7 changes: 7 additions & 0 deletions charts/openfga/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""

# Specify additional labels to apply to OpenFGA resources
# Usage example:
# commonLabels:
# app.example.com/system: permissions
# app.example.com/domain: example
commonLabels: {}

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

0 comments on commit d2570dc

Please sign in to comment.