diff --git a/charts/admin-stack/charts/dubbo-admin/templates/_helpers.tpl b/charts/admin-stack/charts/dubbo-admin/templates/_helpers.tpl index b7ea4c9ed..538e61c9a 100644 --- a/charts/admin-stack/charts/dubbo-admin/templates/_helpers.tpl +++ b/charts/admin-stack/charts/dubbo-admin/templates/_helpers.tpl @@ -84,4 +84,20 @@ Create the name of the service account to use {{- else }} {{- default "default" .Values.serviceAccount.nameTest }} {{- end }} +{{- end }} + +{{- define "dubbo-admin.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 }} + +{{- define "dubbo-admin.podDisruptionBudget.apiVersion" -}} +{{- if $.Capabilities.APIVersions.Has "policy/v1/PodDisruptionBudget" }} +{{- print "policy/v1" }} +{{- else }} +{{- print "policy/v1beta1" }} +{{- end }} {{- end }} \ No newline at end of file diff --git a/charts/admin-stack/charts/dubbo-admin/templates/rolebinding.yaml b/charts/admin-stack/charts/dubbo-admin/templates/rolebinding.yaml index ecf0b94af..357f9352f 100644 --- a/charts/admin-stack/charts/dubbo-admin/templates/rolebinding.yaml +++ b/charts/admin-stack/charts/dubbo-admin/templates/rolebinding.yaml @@ -17,8 +17,8 @@ roleRef: apiGroup: rbac.authorization.k8s.io kind: Role name: {{ include "dubbo-admin.fullname" . }} - {{- end }} subjects: - kind: ServiceAccount name: {{ include "dubbo-admin.serviceAccountName" . }} namespace: {{ include "dubbo-admin.namespace" . }} +{{- end }} diff --git a/charts/admin-stack/charts/dubbo-admin/values.yaml b/charts/admin-stack/charts/dubbo-admin/values.yaml index 557d2218a..cf9ff5e1a 100644 --- a/charts/admin-stack/charts/dubbo-admin/values.yaml +++ b/charts/admin-stack/charts/dubbo-admin/values.yaml @@ -5,7 +5,7 @@ image: repository: apache/dubbo-admin ## ## - tag: "0.5.0" + tag: "0.6.0" ## ## debug: false