diff --git a/k8s/charts/seaweedfs/templates/ca-cert.yaml b/k8s/charts/seaweedfs/templates/ca-cert.yaml index fc002aebe..0fd6615e1 100644 --- a/k8s/charts/seaweedfs/templates/ca-cert.yaml +++ b/k8s/charts/seaweedfs/templates/ca-cert.yaml @@ -14,6 +14,6 @@ spec: commonName: "{{ template "seaweedfs.name" . }}-root-ca" isCA: true issuerRef: - name: {{ template "seaweedfs.name" . }}-clusterissuer - kind: ClusterIssuer + name: {{ template "seaweedfs.name" . }}-issuer + kind: Issuer {{- end }} diff --git a/k8s/charts/seaweedfs/templates/cert-clusterissuer.yaml b/k8s/charts/seaweedfs/templates/cert-issuer.yaml similarity index 86% rename from k8s/charts/seaweedfs/templates/cert-clusterissuer.yaml rename to k8s/charts/seaweedfs/templates/cert-issuer.yaml index 42e080fd6..9f243d07c 100644 --- a/k8s/charts/seaweedfs/templates/cert-clusterissuer.yaml +++ b/k8s/charts/seaweedfs/templates/cert-issuer.yaml @@ -1,8 +1,8 @@ {{- if and .Values.global.enableSecurity (not .Values.certificates.externalCertificates.enabled)}} apiVersion: cert-manager.io/v1{{ if .Values.global.certificates.alphacrds }}alpha1{{ end }} -kind: ClusterIssuer +kind: Issuer metadata: - name: {{ template "seaweedfs.name" . }}-clusterissuer + name: {{ template "seaweedfs.name" . }}-issuer labels: app.kubernetes.io/name: {{ template "seaweedfs.name" . }} helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} diff --git a/k8s/charts/seaweedfs/templates/cosi-cluster-role.yaml b/k8s/charts/seaweedfs/templates/cosi-cluster-role.yaml index d3d839e36..75d3ec32c 100644 --- a/k8s/charts/seaweedfs/templates/cosi-cluster-role.yaml +++ b/k8s/charts/seaweedfs/templates/cosi-cluster-role.yaml @@ -3,7 +3,7 @@ kind: ClusterRole apiVersion: rbac.authorization.k8s.io/v1 metadata: - name: {{ template "seaweedfs.name" . }}-objectstorage-provisioner + name: {{ .Values.global.serviceAccountName }}-objectstorage-provisioner labels: app.kubernetes.io/name: {{ template "seaweedfs.name" . }} helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} @@ -52,7 +52,7 @@ rules: kind: ClusterRoleBinding apiVersion: rbac.authorization.k8s.io/v1 metadata: - name: {{ template "seaweedfs.name" . }}-objectstorage-provisioner + name: {{ .Values.global.serviceAccountName }}-objectstorage-provisioner labels: app.kubernetes.io/name: {{ template "seaweedfs.name" . }} helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} @@ -60,10 +60,10 @@ metadata: app.kubernetes.io/instance: {{ .Release.Name }} subjects: - kind: ServiceAccount - name: {{ template "seaweedfs.name" . }}-objectstorage-provisioner + name: {{ .Values.global.serviceAccountName }}-objectstorage-provisioner namespace: {{ .Release.Namespace }} roleRef: kind: ClusterRole - name: {{ template "seaweedfs.name" . }}-objectstorage-provisioner + name: {{ .Values.global.serviceAccountName }}-objectstorage-provisioner apiGroup: rbac.authorization.k8s.io {{- end }} diff --git a/k8s/charts/seaweedfs/templates/cosi-deployment.yaml b/k8s/charts/seaweedfs/templates/cosi-deployment.yaml index 46fc80c70..15e5fa6d4 100644 --- a/k8s/charts/seaweedfs/templates/cosi-deployment.yaml +++ b/k8s/charts/seaweedfs/templates/cosi-deployment.yaml @@ -49,7 +49,7 @@ spec: priorityClassName: {{ .Values.cosi.priorityClassName | quote }} {{- end }} enableServiceLinks: false - serviceAccountName: {{ template "seaweedfs.name" . }}-objectstorage-provisioner + serviceAccountName: {{ .Values.global.serviceAccountName }}-objectstorage-provisioner {{- if .Values.cosi.initContainers }} initContainers: {{ tpl .Values.cosi.initContainers . | nindent 8 | trim }} diff --git a/k8s/charts/seaweedfs/templates/cosi-service-account.yaml b/k8s/charts/seaweedfs/templates/cosi-service-account.yaml index 0e303a2b0..78227fdeb 100644 --- a/k8s/charts/seaweedfs/templates/cosi-service-account.yaml +++ b/k8s/charts/seaweedfs/templates/cosi-service-account.yaml @@ -2,7 +2,7 @@ apiVersion: v1 kind: ServiceAccount metadata: - name: {{ template "seaweedfs.name" . }}-objectstorage-provisioner + name: {{ .Values.global.serviceAccountName }}-objectstorage-provisioner namespace: {{ .Release.Namespace }} labels: app.kubernetes.io/name: {{ template "seaweedfs.name" . }}