Skip to content

Commit

Permalink
create secret for serviceaccount if k8s version >= 1.24
Browse files Browse the repository at this point in the history
  • Loading branch information
larrywax committed Sep 18, 2023
1 parent 3c9c2ed commit 70aa5ea
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions charts/airbyte/templates/serviceaccount.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,18 @@ metadata:
{{- with .Values.serviceAccount.annotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- if semverCompare ">=1.24.0" .Capabilities.KubeVersion.GitVersion -}}
---
apiVersion: v1
kind: Secret
metadata:
name: {{ include "airbyte.serviceAccountName" . }}.service-account-token
annotations:
helm.sh/hook: pre-install,pre-upgrade
helm.sh/hook-weight: "-10"
kubernetes.io/service-account.name: {{ include "airbyte.serviceAccountName" . }}
type: kubernetes.io/service-account-token
{{- end }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
Expand Down

0 comments on commit 70aa5ea

Please sign in to comment.