Skip to content

Commit

Permalink
feat: Add extraResources section to Helm chart
Browse files Browse the repository at this point in the history
  • Loading branch information
achetronic committed Aug 13, 2024
1 parent 4e8d17d commit e7238c4
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 20 deletions.
16 changes: 16 additions & 0 deletions charts/bucket-simple-server/templates/extraresources.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{{- if .Values.extraResources }}
{{- range .Values.extraResources }}
---
{{- $resource := . | deepCopy }}

{{- $objectLabels := include "bucketSimpleServer.labels" $ | fromYaml }}

{{- if $resource.metadata.labels }}
{{- $objectLabels = merge $objectLabels $resource.metadata.labels }}
{{- end }}

{{ $_ := set $resource.metadata "labels" $objectLabels -}}

{{ toYaml $resource | nindent 0 }}
{{- end }}
{{- end }}
33 changes: 13 additions & 20 deletions charts/bucket-simple-server/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,6 @@
nameOverride: ""
fullnameOverride: ""

# Following custom ClusterRole is a place where to add the type of resources
# allowed to be treated by PG Selector.
customClusterRole:
# Specifies whether a custom clusterRole should be created
create: true

# Annotations to add to the clusterRole
annotations: {}

# A set of rules as documented here : https://kubernetes.io/docs/reference/access-authn-authz/rbac/
rules:
- apiGroups: ['*']
resources: ['*']
verbs: ['*']

clusterRoleBinding:
# Annotations to add to the clusterRoleBinding
annotations: {}

# TODO
agent:

# Specify the configuration
Expand Down Expand Up @@ -105,3 +85,16 @@ agent:
tolerations: []

affinity: {}

# Define some extra resources to be created
# This section is useful when you need ExternalResource or Secrets, etc.
extraResources: []
# - apiVersion: v1
# kind: Secret
# metadata:
# name: example-secret
# labels: {}
# type: Opaque
# stringData:
# username: admin
# password: mypassword

0 comments on commit e7238c4

Please sign in to comment.