Browse Source

Fix: Resolve conflicts for deployment in diferent namespaces (#5862)

Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
pull/5865/head
Andrei Kvapil 5 months ago
committed by GitHub
parent
commit
38befb133d
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 4
      k8s/charts/seaweedfs/templates/ca-cert.yaml
  2. 4
      k8s/charts/seaweedfs/templates/cert-issuer.yaml
  3. 8
      k8s/charts/seaweedfs/templates/cosi-cluster-role.yaml
  4. 2
      k8s/charts/seaweedfs/templates/cosi-deployment.yaml
  5. 2
      k8s/charts/seaweedfs/templates/cosi-service-account.yaml

4
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 }}

4
k8s/charts/seaweedfs/templates/cert-clusterissuer.yaml → 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 "+" "_" }}

8
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 }}

2
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 }}

2
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" . }}

Loading…
Cancel
Save