Browse Source

[heml] complete redesign of labels (#4788)

pull/4789/head
Dmitriy Pavlov 1 year ago
committed by GitHub
parent
commit
56aef67912
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      k8s/charts/seaweedfs/templates/ca-cert.yaml
  2. 5
      k8s/charts/seaweedfs/templates/cert-caissuer.yaml
  3. 5
      k8s/charts/seaweedfs/templates/cert-clusterissuer.yaml
  4. 5
      k8s/charts/seaweedfs/templates/client-cert.yaml
  5. 6
      k8s/charts/seaweedfs/templates/filer-cert.yaml
  6. 11
      k8s/charts/seaweedfs/templates/filer-service-client.yaml
  7. 11
      k8s/charts/seaweedfs/templates/filer-service.yaml
  8. 11
      k8s/charts/seaweedfs/templates/filer-servicemonitor.yaml
  9. 27
      k8s/charts/seaweedfs/templates/filer-statefulset.yaml
  10. 45
      k8s/charts/seaweedfs/templates/filler-ingress.yaml
  11. 6
      k8s/charts/seaweedfs/templates/master-cert.yaml
  12. 42
      k8s/charts/seaweedfs/templates/master-ingress.yaml
  13. 10
      k8s/charts/seaweedfs/templates/master-service.yaml
  14. 7
      k8s/charts/seaweedfs/templates/master-servicemonitor.yaml
  15. 26
      k8s/charts/seaweedfs/templates/master-statefulset.yaml
  16. 24
      k8s/charts/seaweedfs/templates/s3-deployment.yaml
  17. 10
      k8s/charts/seaweedfs/templates/s3-service.yaml
  18. 7
      k8s/charts/seaweedfs/templates/s3-servicemonitor.yaml
  19. 6
      k8s/charts/seaweedfs/templates/seaweedfs-s3-secret.yaml
  20. 5
      k8s/charts/seaweedfs/templates/secret-seaweedfs-db.yaml
  21. 8
      k8s/charts/seaweedfs/templates/security-configmap.yaml
  22. 15
      k8s/charts/seaweedfs/templates/service-account.yaml
  23. 6
      k8s/charts/seaweedfs/templates/volume-cert.yaml
  24. 10
      k8s/charts/seaweedfs/templates/volume-service.yaml
  25. 11
      k8s/charts/seaweedfs/templates/volume-servicemonitor.yaml
  26. 26
      k8s/charts/seaweedfs/templates/volume-statefulset.yaml
  27. 1
      k8s/charts/seaweedfs/values.yaml

5
k8s/charts/seaweedfs/templates/ca-cert.yaml

@ -4,6 +4,11 @@ kind: Certificate
metadata: metadata:
name: {{ template "seaweedfs.name" . }}-ca-cert name: {{ template "seaweedfs.name" . }}-ca-cert
namespace: {{ .Release.Namespace }} namespace: {{ .Release.Namespace }}
labels:
app.kubernetes.io/name: {{ template "seaweedfs.name" . }}
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/instance: {{ .Release.Name }}
spec: spec:
secretName: {{ template "seaweedfs.name" . }}-ca-cert secretName: {{ template "seaweedfs.name" . }}-ca-cert
commonName: "{{ template "seaweedfs.name" . }}-root-ca" commonName: "{{ template "seaweedfs.name" . }}-root-ca"

5
k8s/charts/seaweedfs/templates/cert-caissuer.yaml

@ -4,6 +4,11 @@ kind: Issuer
metadata: metadata:
name: {{ template "seaweedfs.name" . }}-ca-issuer name: {{ template "seaweedfs.name" . }}-ca-issuer
namespace: {{ .Release.Namespace }} namespace: {{ .Release.Namespace }}
labels:
app.kubernetes.io/name: {{ template "seaweedfs.name" . }}
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/instance: {{ .Release.Name }}
spec: spec:
ca: ca:
secretName: {{ template "seaweedfs.name" . }}-ca-cert secretName: {{ template "seaweedfs.name" . }}-ca-cert

5
k8s/charts/seaweedfs/templates/cert-clusterissuer.yaml

@ -3,6 +3,11 @@ apiVersion: cert-manager.io/v1{{ if .Values.global.certificates.alphacrds }}alph
kind: ClusterIssuer kind: ClusterIssuer
metadata: metadata:
name: {{ template "seaweedfs.name" . }}-clusterissuer name: {{ template "seaweedfs.name" . }}-clusterissuer
labels:
app.kubernetes.io/name: {{ template "seaweedfs.name" . }}
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/instance: {{ .Release.Name }}
spec: spec:
selfSigned: {} selfSigned: {}
{{- end }} {{- end }}

5
k8s/charts/seaweedfs/templates/client-cert.yaml

@ -4,6 +4,11 @@ kind: Certificate
metadata: metadata:
name: {{ template "seaweedfs.name" . }}-client-cert name: {{ template "seaweedfs.name" . }}-client-cert
namespace: {{ .Release.Namespace }} namespace: {{ .Release.Namespace }}
labels:
app.kubernetes.io/name: {{ template "seaweedfs.name" . }}
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/instance: {{ .Release.Name }}
spec: spec:
secretName: {{ template "seaweedfs.name" . }}-client-cert secretName: {{ template "seaweedfs.name" . }}-client-cert
issuerRef: issuerRef:

6
k8s/charts/seaweedfs/templates/filer-cert.yaml

@ -4,6 +4,12 @@ kind: Certificate
metadata: metadata:
name: {{ template "seaweedfs.name" . }}-filer-cert name: {{ template "seaweedfs.name" . }}-filer-cert
namespace: {{ .Release.Namespace }} namespace: {{ .Release.Namespace }}
labels:
app.kubernetes.io/name: {{ template "seaweedfs.name" . }}
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: filer
spec: spec:
secretName: {{ template "seaweedfs.name" . }}-filer-cert secretName: {{ template "seaweedfs.name" . }}-filer-cert
issuerRef: issuerRef:

11
k8s/charts/seaweedfs/templates/filer-service-client.yaml

@ -4,8 +4,11 @@ metadata:
name: {{ template "seaweedfs.name" . }}-filer-client name: {{ template "seaweedfs.name" . }}-filer-client
namespace: {{ .Release.Namespace }} namespace: {{ .Release.Namespace }}
labels: labels:
app: {{ template "seaweedfs.name" . }}
component: filer
app.kubernetes.io/name: {{ template "seaweedfs.name" . }}
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: filer
{{- if .Values.filer.metricsPort }} {{- if .Values.filer.metricsPort }}
monitoring: "true" monitoring: "true"
{{- end }} {{- end }}
@ -27,5 +30,5 @@ spec:
protocol: TCP protocol: TCP
{{- end }} {{- end }}
selector: selector:
app: {{ template "seaweedfs.name" . }}
component: filer
app.kubernetes.io/name: {{ template "seaweedfs.name" . }}
app.kubernetes.io/component: filer

11
k8s/charts/seaweedfs/templates/filer-service.yaml

@ -6,8 +6,11 @@ metadata:
name: {{ template "seaweedfs.name" . }}-filer name: {{ template "seaweedfs.name" . }}-filer
namespace: {{ .Release.Namespace }} namespace: {{ .Release.Namespace }}
labels: labels:
app: {{ template "seaweedfs.name" . }}
component: filer
app.kubernetes.io/name: {{ template "seaweedfs.name" . }}
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: filer
spec: spec:
clusterIP: None clusterIP: None
publishNotReadyAddresses: true publishNotReadyAddresses: true
@ -39,5 +42,5 @@ spec:
protocol: TCP protocol: TCP
{{- end }} {{- end }}
selector: selector:
app: {{ template "seaweedfs.name" . }}
component: filer
app.kubernetes.io/name: {{ template "seaweedfs.name" . }}
app.kubernetes.io/component: filer

11
k8s/charts/seaweedfs/templates/filer-servicemonitor.yaml

@ -6,8 +6,11 @@ metadata:
name: {{ template "seaweedfs.name" . }}-filer name: {{ template "seaweedfs.name" . }}-filer
namespace: {{ .Release.Namespace }} namespace: {{ .Release.Namespace }}
labels: labels:
app: {{ template "seaweedfs.name" . }}
component: filer
app.kubernetes.io/name: {{ template "seaweedfs.name" . }}
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: filer
spec: spec:
endpoints: endpoints:
- interval: 30s - interval: 30s
@ -15,7 +18,7 @@ spec:
scrapeTimeout: 5s scrapeTimeout: 5s
selector: selector:
matchLabels: matchLabels:
app: {{ template "seaweedfs.name" . }}
component: filer
app.kubernetes.io/name: {{ template "seaweedfs.name" . }}
app.kubernetes.io/component: filer
{{- end }} {{- end }}
{{- end }} {{- end }}

27
k8s/charts/seaweedfs/templates/filer-statefulset.yaml

@ -5,10 +5,11 @@ metadata:
name: {{ template "seaweedfs.name" . }}-filer name: {{ template "seaweedfs.name" . }}-filer
namespace: {{ .Release.Namespace }} namespace: {{ .Release.Namespace }}
labels: labels:
app: {{ template "seaweedfs.name" . }}
chart: {{ template "seaweedfs.chart" . }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
app.kubernetes.io/name: {{ template "seaweedfs.name" . }}
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: filer
spec: spec:
serviceName: {{ template "seaweedfs.name" . }}-filer serviceName: {{ template "seaweedfs.name" . }}-filer
podManagementPolicy: Parallel podManagementPolicy: Parallel
@ -21,17 +22,17 @@ spec:
{{- end }} {{- end }}
selector: selector:
matchLabels: matchLabels:
app: {{ template "seaweedfs.name" . }}
chart: {{ template "seaweedfs.chart" . }}
release: {{ .Release.Name }}
component: filer
app.kubernetes.io/name: {{ template "seaweedfs.name" . }}
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: filer
template: template:
metadata: metadata:
labels: labels:
app: {{ template "seaweedfs.name" . }}
chart: {{ template "seaweedfs.chart" . }}
release: {{ .Release.Name }}
component: filer
app.kubernetes.io/name: {{ template "seaweedfs.name" . }}
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: filer
spec: spec:
restartPolicy: {{ default .Values.global.restartPolicy .Values.filer.restartPolicy }} restartPolicy: {{ default .Values.global.restartPolicy .Values.filer.restartPolicy }}
{{- if .Values.filer.affinity }} {{- if .Values.filer.affinity }}
@ -180,8 +181,10 @@ spec:
{{- end }} {{- end }}
-master={{ range $index := until (.Values.master.replicas | int) }}${SEAWEEDFS_FULLNAME}-master-{{ $index }}.${SEAWEEDFS_FULLNAME}-master.{{ $.Release.Namespace }}:{{ $.Values.master.port }}{{ if lt $index (sub ($.Values.master.replicas | int) 1) }},{{ end }}{{ end }} -master={{ range $index := until (.Values.master.replicas | int) }}${SEAWEEDFS_FULLNAME}-master-{{ $index }}.${SEAWEEDFS_FULLNAME}-master.{{ $.Release.Namespace }}:{{ $.Values.master.port }}{{ if lt $index (sub ($.Values.master.replicas | int) 1) }},{{ end }}{{ end }}
volumeMounts: volumeMounts:
{{- if eq .Values.filer.logs.type "hostPath" }}
- name: seaweedfs-filer-log-volume - name: seaweedfs-filer-log-volume
mountPath: "/logs/" mountPath: "/logs/"
{{- end }}
- mountPath: /etc/sw - mountPath: /etc/sw
name: config-users name: config-users
readOnly: true readOnly: true

45
k8s/charts/seaweedfs/templates/ingress.yaml → k8s/charts/seaweedfs/templates/filler-ingress.yaml

@ -12,6 +12,12 @@ metadata:
namespace: {{ .Release.Namespace }} namespace: {{ .Release.Namespace }}
annotations: annotations:
{{ omit .Values.filer.ingress.annotations "kubernetes.io/ingress.class" | toYaml | nindent 4 }} {{ omit .Values.filer.ingress.annotations "kubernetes.io/ingress.class" | toYaml | nindent 4 }}
labels:
app.kubernetes.io/name: {{ template "seaweedfs.name" . }}
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: filer
spec: spec:
ingressClassName: {{ .Values.filer.ingress.className | quote }} ingressClassName: {{ .Values.filer.ingress.className | quote }}
tls: tls:
@ -35,41 +41,4 @@ spec:
{{- if .Values.filer.ingress.host }} {{- if .Values.filer.ingress.host }}
host: {{ .Values.filer.ingress.host }} host: {{ .Values.filer.ingress.host }}
{{- end }} {{- end }}
{{- end }}
---
{{- if .Values.master.ingress.enabled }}
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion }}
apiVersion: networking.k8s.io/v1
{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion }}
apiVersion: networking.k8s.io/v1beta1
{{- else }}
apiVersion: extensions/v1beta1
{{- end }}
kind: Ingress
metadata:
name: ingress-{{ template "seaweedfs.name" . }}-master
namespace: {{ .Release.Namespace }}
annotations:
{{ omit .Values.master.ingress.annotations "kubernetes.io/ingress.class" | toYaml | nindent 4 }}
spec:
ingressClassName: {{ .Values.master.ingress.className | quote }}
rules:
- http:
paths:
- path: /sw-master/?(.*)
pathType: ImplementationSpecific
backend:
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion }}
service:
name: {{ template "seaweedfs.name" . }}-master
port:
number: {{ .Values.master.port }}
#name:
{{- else }}
serviceName: {{ template "seaweedfs.name" . }}-master
servicePort: {{ .Values.master.port }}
{{- end }}
{{- if .Values.filer.ingress.host }}
host: {{ .Values.master.ingress.host }}
{{- end }}
{{- end }}
{{- end }}

6
k8s/charts/seaweedfs/templates/master-cert.yaml

@ -4,6 +4,12 @@ kind: Certificate
metadata: metadata:
name: {{ template "seaweedfs.name" . }}-master-cert name: {{ template "seaweedfs.name" . }}-master-cert
namespace: {{ .Release.Namespace }} namespace: {{ .Release.Namespace }}
labels:
app.kubernetes.io/name: {{ template "seaweedfs.name" . }}
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: master
spec: spec:
secretName: {{ template "seaweedfs.name" . }}-master-cert secretName: {{ template "seaweedfs.name" . }}-master-cert
issuerRef: issuerRef:

42
k8s/charts/seaweedfs/templates/master-ingress.yaml

@ -0,0 +1,42 @@
{{- if .Values.master.ingress.enabled }}
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion }}
apiVersion: networking.k8s.io/v1
{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion }}
apiVersion: networking.k8s.io/v1beta1
{{- else }}
apiVersion: extensions/v1beta1
{{- end }}
kind: Ingress
metadata:
name: ingress-{{ template "seaweedfs.name" . }}-master
namespace: {{ .Release.Namespace }}
annotations:
{{ omit .Values.master.ingress.annotations "kubernetes.io/ingress.class" | toYaml | nindent 4 }}
labels:
app.kubernetes.io/name: {{ template "seaweedfs.name" . }}
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: master
spec:
ingressClassName: {{ .Values.master.ingress.className | quote }}
rules:
- http:
paths:
- path: /sw-master/?(.*)
pathType: ImplementationSpecific
backend:
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion }}
service:
name: {{ template "seaweedfs.name" . }}-master
port:
number: {{ .Values.master.port }}
#name:
{{- else }}
serviceName: {{ template "seaweedfs.name" . }}-master
servicePort: {{ .Values.master.port }}
{{- end }}
{{- if .Values.filer.ingress.host }}
host: {{ .Values.master.ingress.host }}
{{- end }}
{{- end }}

10
k8s/charts/seaweedfs/templates/master-service.yaml

@ -4,8 +4,10 @@ metadata:
name: {{ template "seaweedfs.name" . }}-master name: {{ template "seaweedfs.name" . }}-master
namespace: {{ .Release.Namespace }} namespace: {{ .Release.Namespace }}
labels: labels:
app: {{ template "seaweedfs.name" . }}
component: master
app.kubernetes.io/name: {{ template "seaweedfs.name" . }}
app.kubernetes.io/component: master
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
annotations: annotations:
service.alpha.kubernetes.io/tolerate-unready-endpoints: "true" service.alpha.kubernetes.io/tolerate-unready-endpoints: "true"
spec: spec:
@ -27,5 +29,5 @@ spec:
protocol: TCP protocol: TCP
{{- end }} {{- end }}
selector: selector:
app: {{ template "seaweedfs.name" . }}
component: master
app.kubernetes.io/name: {{ template "seaweedfs.name" . }}
app.kubernetes.io/component: master

7
k8s/charts/seaweedfs/templates/master-servicemonitor.yaml

@ -6,8 +6,11 @@ metadata:
name: {{ template "seaweedfs.name" . }}-master name: {{ template "seaweedfs.name" . }}-master
namespace: {{ .Release.Namespace }} namespace: {{ .Release.Namespace }}
labels: labels:
app: {{ template "seaweedfs.name" . }}
component: master
app.kubernetes.io/name: {{ template "seaweedfs.name" . }}
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: master
spec: spec:
endpoints: endpoints:
- interval: 30s - interval: 30s

26
k8s/charts/seaweedfs/templates/master-statefulset.yaml

@ -5,10 +5,10 @@ metadata:
name: {{ template "seaweedfs.name" . }}-master name: {{ template "seaweedfs.name" . }}-master
namespace: {{ .Release.Namespace }} namespace: {{ .Release.Namespace }}
labels: labels:
app: {{ template "seaweedfs.name" . }}
chart: {{ template "seaweedfs.chart" . }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
app.kubernetes.io/name: {{ template "seaweedfs.name" . }}
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/instance: {{ .Release.Name }}
spec: spec:
serviceName: {{ template "seaweedfs.name" . }}-master serviceName: {{ template "seaweedfs.name" . }}-master
podManagementPolicy: Parallel podManagementPolicy: Parallel
@ -21,17 +21,17 @@ spec:
{{- end }} {{- end }}
selector: selector:
matchLabels: matchLabels:
app: {{ template "seaweedfs.name" . }}
chart: {{ template "seaweedfs.chart" . }}
release: {{ .Release.Name }}
component: master
app.kubernetes.io/name: {{ template "seaweedfs.name" . }}
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: master
template: template:
metadata: metadata:
labels: labels:
app: {{ template "seaweedfs.name" . }}
chart: {{ template "seaweedfs.chart" . }}
release: {{ .Release.Name }}
component: master
app.kubernetes.io/name: {{ template "seaweedfs.name" . }}
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: master
spec: spec:
restartPolicy: {{ default .Values.global.restartPolicy .Values.master.restartPolicy }} restartPolicy: {{ default .Values.global.restartPolicy .Values.master.restartPolicy }}
{{- if .Values.master.affinity }} {{- if .Values.master.affinity }}
@ -135,8 +135,10 @@ spec:
volumeMounts: volumeMounts:
- name : data-{{ .Release.Namespace }} - name : data-{{ .Release.Namespace }}
mountPath: /data mountPath: /data
{{- if eq .Values.master.logs.type "hostPath" }}
- name: seaweedfs-master-log-volume - name: seaweedfs-master-log-volume
mountPath: "/logs/" mountPath: "/logs/"
{{- end }}
{{- if .Values.global.enableSecurity }} {{- if .Values.global.enableSecurity }}
- name: security-config - name: security-config
readOnly: true readOnly: true

24
k8s/charts/seaweedfs/templates/s3-deployment.yaml

@ -5,25 +5,25 @@ metadata:
name: {{ template "seaweedfs.name" . }}-s3 name: {{ template "seaweedfs.name" . }}-s3
namespace: {{ .Release.Namespace }} namespace: {{ .Release.Namespace }}
labels: labels:
app: {{ template "seaweedfs.name" . }}
chart: {{ template "seaweedfs.chart" . }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
app.kubernetes.io/name: {{ template "seaweedfs.name" . }}
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/instance: {{ .Release.Name }}
spec: spec:
replicas: {{ .Values.s3.replicas }} replicas: {{ .Values.s3.replicas }}
selector: selector:
matchLabels: matchLabels:
app: {{ template "seaweedfs.name" . }}
chart: {{ template "seaweedfs.chart" . }}
release: {{ .Release.Name }}
component: s3
app.kubernetes.io/name: {{ template "seaweedfs.name" . }}
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: s3
template: template:
metadata: metadata:
labels: labels:
app: {{ template "seaweedfs.name" . }}
chart: {{ template "seaweedfs.chart" . }}
release: {{ .Release.Name }}
component: s3
app.kubernetes.io/name: {{ template "seaweedfs.name" . }}
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: s3
spec: spec:
restartPolicy: {{ default .Values.global.restartPolicy .Values.s3.restartPolicy }} restartPolicy: {{ default .Values.global.restartPolicy .Values.s3.restartPolicy }}
{{- if .Values.s3.tolerations }} {{- if .Values.s3.tolerations }}

10
k8s/charts/seaweedfs/templates/s3-service.yaml

@ -4,8 +4,10 @@ metadata:
name: {{ template "seaweedfs.name" . }}-s3 name: {{ template "seaweedfs.name" . }}-s3
namespace: {{ .Release.Namespace }} namespace: {{ .Release.Namespace }}
labels: labels:
app: {{ template "seaweedfs.name" . }}
component: s3
app.kubernetes.io/name: {{ template "seaweedfs.name" . }}
app.kubernetes.io/component: s3
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
spec: spec:
ports: ports:
- name: "swfs-s3" - name: "swfs-s3"
@ -25,5 +27,5 @@ spec:
protocol: TCP protocol: TCP
{{- end }} {{- end }}
selector: selector:
app: {{ template "seaweedfs.name" . }}
component: {{ if .Values.s3.enabled }}s3{{ else }}filer{{ end }}
app.kubernetes.io/name: {{ template "seaweedfs.name" . }}
app.kubernetes.io/component: {{ if .Values.s3.enabled }}s3{{ else }}filer{{ end }}

7
k8s/charts/seaweedfs/templates/s3-servicemonitor.yaml

@ -6,8 +6,11 @@ metadata:
name: {{ template "seaweedfs.name" . }}-s3 name: {{ template "seaweedfs.name" . }}-s3
namespace: {{ .Release.Namespace }} namespace: {{ .Release.Namespace }}
labels: labels:
app: {{ template "seaweedfs.name" . }}
component: s3
app.kubernetes.io/name: {{ template "seaweedfs.name" . }}
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: s3
spec: spec:
endpoints: endpoints:
- interval: 30s - interval: 30s

6
k8s/charts/seaweedfs/templates/seaweedfs-s3-secret.yaml

@ -12,6 +12,12 @@ metadata:
annotations: annotations:
"helm.sh/resource-policy": keep "helm.sh/resource-policy": keep
"helm.sh/hook": "pre-install" "helm.sh/hook": "pre-install"
labels:
app.kubernetes.io/name: {{ template "seaweedfs.name" . }}
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: s3
stringData: stringData:
admin_access_key_id: {{ $access_key_admin }} admin_access_key_id: {{ $access_key_admin }}
admin_secret_access_key: {{ $secret_key_admin }} admin_secret_access_key: {{ $secret_key_admin }}

5
k8s/charts/seaweedfs/templates/secret-seaweedfs-db.yaml

@ -7,6 +7,11 @@ metadata:
annotations: annotations:
"helm.sh/resource-policy": keep "helm.sh/resource-policy": keep
"helm.sh/hook": "pre-install" "helm.sh/hook": "pre-install"
labels:
app.kubernetes.io/name: {{ template "seaweedfs.name" . }}
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/instance: {{ .Release.Name }}
stringData: stringData:
user: "YourSWUser" user: "YourSWUser"
password: "HardCodedPassword" password: "HardCodedPassword"

8
k8s/charts/seaweedfs/templates/security-configmap.yaml

@ -5,10 +5,10 @@ metadata:
name: {{ template "seaweedfs.name" . }}-security-config name: {{ template "seaweedfs.name" . }}-security-config
namespace: {{ .Release.Namespace }} namespace: {{ .Release.Namespace }}
labels: labels:
app: {{ template "seaweedfs.name" . }}
chart: {{ template "seaweedfs.chart" . }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
app.kubernetes.io/name: {{ template "seaweedfs.name" . }}
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/instance: {{ .Release.Name }}
data: data:
security.toml: |- security.toml: |-
# this file is read by master, volume server, and filer # this file is read by master, volume server, and filer

15
k8s/charts/seaweedfs/templates/service-account.yaml

@ -5,6 +5,11 @@ kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1 apiVersion: rbac.authorization.k8s.io/v1
metadata: metadata:
name: seaweedfs-rw-cr name: seaweedfs-rw-cr
labels:
app.kubernetes.io/name: {{ template "seaweedfs.name" . }}
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/instance: {{ .Release.Name }}
rules: rules:
- apiGroups: [""] - apiGroups: [""]
resources: ["pods"] resources: ["pods"]
@ -15,11 +20,21 @@ kind: ServiceAccount
metadata: metadata:
name: seaweedfs-rw-sa name: seaweedfs-rw-sa
namespace: {{ .Release.Namespace }} namespace: {{ .Release.Namespace }}
labels:
app.kubernetes.io/name: {{ template "seaweedfs.name" . }}
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/instance: {{ .Release.Name }}
--- ---
kind: ClusterRoleBinding kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1 apiVersion: rbac.authorization.k8s.io/v1
metadata: metadata:
name: system:serviceaccount:seaweedfs-rw-sa:default name: system:serviceaccount:seaweedfs-rw-sa:default
labels:
app.kubernetes.io/name: {{ template "seaweedfs.name" . }}
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/instance: {{ .Release.Name }}
subjects: subjects:
- kind: ServiceAccount - kind: ServiceAccount
name: seaweedfs-rw-sa name: seaweedfs-rw-sa

6
k8s/charts/seaweedfs/templates/volume-cert.yaml

@ -4,6 +4,12 @@ kind: Certificate
metadata: metadata:
name: {{ template "seaweedfs.name" . }}-volume-cert name: {{ template "seaweedfs.name" . }}-volume-cert
namespace: {{ .Release.Namespace }} namespace: {{ .Release.Namespace }}
labels:
app.kubernetes.io/name: {{ template "seaweedfs.name" . }}
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: volume
spec: spec:
secretName: {{ template "seaweedfs.name" . }}-volume-cert secretName: {{ template "seaweedfs.name" . }}-volume-cert
issuerRef: issuerRef:

10
k8s/charts/seaweedfs/templates/volume-service.yaml

@ -4,8 +4,10 @@ metadata:
name: {{ template "seaweedfs.name" . }}-volume name: {{ template "seaweedfs.name" . }}-volume
namespace: {{ .Release.Namespace }} namespace: {{ .Release.Namespace }}
labels: labels:
app: {{ template "seaweedfs.name" . }}
component: volume
app.kubernetes.io/name: {{ template "seaweedfs.name" . }}
app.kubernetes.io/component: volume
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
spec: spec:
clusterIP: None clusterIP: None
ports: ports:
@ -24,5 +26,5 @@ spec:
protocol: TCP protocol: TCP
{{- end }} {{- end }}
selector: selector:
app: {{ template "seaweedfs.name" . }}
component: volume
app.kubernetes.io/name: {{ template "seaweedfs.name" . }}
app.kubernetes.io/component: volume

11
k8s/charts/seaweedfs/templates/volume-servicemonitor.yaml

@ -6,8 +6,11 @@ metadata:
name: {{ template "seaweedfs.name" . }}-volume name: {{ template "seaweedfs.name" . }}-volume
namespace: {{ .Release.Namespace }} namespace: {{ .Release.Namespace }}
labels: labels:
app: {{ template "seaweedfs.name" . }}
component: volume
app.kubernetes.io/name: {{ template "seaweedfs.name" . }}
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: volume
spec: spec:
endpoints: endpoints:
- interval: 30s - interval: 30s
@ -15,7 +18,7 @@ spec:
scrapeTimeout: 5s scrapeTimeout: 5s
selector: selector:
matchLabels: matchLabels:
app: {{ template "seaweedfs.name" . }}
component: volume
app.kubernetes.io/name: {{ template "seaweedfs.name" . }}
app.kubernetes.io/component: volume
{{- end }} {{- end }}
{{- end }} {{- end }}

26
k8s/charts/seaweedfs/templates/volume-statefulset.yaml

@ -5,27 +5,27 @@ metadata:
name: {{ template "seaweedfs.name" . }}-volume name: {{ template "seaweedfs.name" . }}-volume
namespace: {{ .Release.Namespace }} namespace: {{ .Release.Namespace }}
labels: labels:
app: {{ template "seaweedfs.name" . }}
chart: {{ template "seaweedfs.chart" . }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
app.kubernetes.io/name: {{ template "seaweedfs.name" . }}
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/instance: {{ .Release.Name }}
spec: spec:
serviceName: {{ template "seaweedfs.name" . }}-volume serviceName: {{ template "seaweedfs.name" . }}-volume
replicas: {{ .Values.volume.replicas }} replicas: {{ .Values.volume.replicas }}
podManagementPolicy: Parallel podManagementPolicy: Parallel
selector: selector:
matchLabels: matchLabels:
app: {{ template "seaweedfs.name" . }}
chart: {{ template "seaweedfs.chart" . }}
release: {{ .Release.Name }}
component: volume
app.kubernetes.io/name: {{ template "seaweedfs.name" . }}
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: volume
template: template:
metadata: metadata:
labels: labels:
app: {{ template "seaweedfs.name" . }}
chart: {{ template "seaweedfs.chart" . }}
release: {{ .Release.Name }}
component: volume
app.kubernetes.io/name: {{ template "seaweedfs.name" . }}
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: volume
spec: spec:
{{- if .Values.volume.affinity }} {{- if .Values.volume.affinity }}
affinity: affinity:
@ -145,8 +145,10 @@ spec:
- name: idx - name: idx
mountPath: "{{ .Values.volume.dir_idx }}/" mountPath: "{{ .Values.volume.dir_idx }}/"
{{- end }} {{- end }}
{{- if eq .Values.volume.logs.type "hostPath" }}
- name: logs - name: logs
mountPath: "/logs/" mountPath: "/logs/"
{{- end }}
{{- if .Values.global.enableSecurity }} {{- if .Values.global.enableSecurity }}
- name: security-config - name: security-config
readOnly: true readOnly: true

1
k8s/charts/seaweedfs/values.yaml

@ -265,7 +265,6 @@ volume:
# ref: https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/ # ref: https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/
priorityClassName: "" priorityClassName: ""
filer: filer:
enabled: true enabled: true
repository: null repository: null

Loading…
Cancel
Save