Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[aws-for-fluent-bit] Fix rbac.apiVersion #319

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion stable/aws-for-fluent-bit/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v1
name: aws-for-fluent-bit
description: A Helm chart to deploy aws-for-fluent-bit project
version: 0.1.7
version: 0.1.8
appVersion: 2.7.0
home: https://github.com/aws/eks-charts
icon: https://raw.githubusercontent.com/aws/eks-charts/master/docs/logo/aws.png
Expand Down
10 changes: 10 additions & 0 deletions stable/aws-for-fluent-bit/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,13 @@ Allow the release namespace to be overridden for multi-namespace deployments in
{{- end -}}
{{- end -}}

{{/*
Return the appropriate apiVersion for ClusterRole and ClusterRoleBinding.
*/}}
{{- define "rbac.apiVersion" -}}
{{- if .Capabilities.APIVersions.Has "rbac.authorization.k8s.io/v1" -}}
{{- print "rbac.authorization.k8s.io/v1" -}}
{{- else -}}
{{- print "rbac.authorization.k8s.io/v1beta1" -}}
{{- end -}}
{{- end -}}
2 changes: 1 addition & 1 deletion stable/aws-for-fluent-bit/templates/clusterrole.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: rbac.authorization.k8s.io/v1beta1
apiVersion: {{ include "rbac.apiVersion" . }}
kind: ClusterRole
metadata:
name: {{ include "aws-for-fluent-bit.fullname" . }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: rbac.authorization.k8s.io/v1beta1
apiVersion: {{ include "rbac.apiVersion" . }}
kind: ClusterRoleBinding
metadata:
name: {{ include "aws-for-fluent-bit.fullname" . }}
Expand Down