Skip to content

SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.

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

Andrei Kvapil38befb133d3c
diff --git a/k8s/charts/seaweedfs/templates/ca-cert.yaml b/k8s/charts/seaweedfs/templates/ca-cert.yaml
index fc002aebe3..0fd6615e10 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 42e080fd65..9f243d07c5 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 d3d839e364..75d3ec32c3 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 46fc80c700..15e5fa6d4b 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 0e303a2b06..78227fdebe 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" . }}