Skip to content

Commit

Permalink
Feature: add datasetReferenceLabel to all the resources created by fluid
Browse files Browse the repository at this point in the history
Signed-off-by: jiuyu <guotongyu.gty@alibaba-inc.com>
  • Loading branch information
jiuyu committed Jan 20, 2025
1 parent 228af51 commit abc1417
Show file tree
Hide file tree
Showing 119 changed files with 404 additions and 227 deletions.
1 change: 1 addition & 0 deletions charts/alluxio/templates/fuse/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ spec:
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
role: alluxio-fuse
{{- include "library.fluid.labels" . | nindent 8 }}
{{- if .Values.fuse.labels }}
{{- range $key, $val := .Values.fuse.labels }}
{{ $key | quote }}: {{ $val | quote }}
Expand Down
1 change: 1 addition & 0 deletions charts/alluxio/templates/master/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ spec:
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
role: alluxio-master
{{- include "library.fluid.labels" . | nindent 8 }}
{{- if .Values.master.labels }}
{{- range $key, $val := .Values.master.labels }}
{{ $key | quote }}: {{ $val | quote }}
Expand Down
5 changes: 3 additions & 2 deletions charts/alluxio/templates/worker/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ metadata:
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
role: alluxio-worker
fluid.io/dataset: {{ .Values.fullNamespacedNameOverride }}
fluid.io/dataset: {{ .Values.ownerDatasetIdentification }}
fluid.io/dataset-placement: {{ .Values.placement }}
{{- include "library.fluid.labels" . | nindent 4 }}
ownerReferences:
Expand Down Expand Up @@ -60,8 +60,9 @@ spec:
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
role: alluxio-worker
fluid.io/dataset: {{ .Values.fullNamespacedNameOverride }}
fluid.io/dataset: {{ .Values.ownerDatasetIdentification }}
fluid.io/dataset-placement: {{ .Values.placement }}
{{- include "library.fluid.labels" . | nindent 8 }}
{{- if .Values.worker.labels }}
{{- range $key, $val := .Values.worker.labels }}
{{ $key | quote }}: {{ $val | quote }}
Expand Down
5 changes: 3 additions & 2 deletions charts/efc/templates/worker/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ metadata:
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
role: efc-worker
fluid.io/dataset: {{ .Values.fullNamespacedNameOverride }}
fluid.io/dataset: {{ .Values.ownerDatasetIdentification }}
fluid.io/dataset-placement: {{ .Values.placement }}
{{- include "library.fluid.labels" . | nindent 4 }}
ownerReferences:
Expand Down Expand Up @@ -45,8 +45,9 @@ spec:
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
role: efc-worker
fluid.io/dataset: {{ .Values.fullNamespacedNameOverride }}
fluid.io/dataset: {{ .Values.ownerDatasetIdentification }}
fluid.io/dataset-placement: {{ .Values.placement }}
{{- include "library.fluid.labels" . | nindent 8 }}
{{- if .Values.worker.labels }}
{{- range $key, $val := .Values.worker.labels }}
{{ $key | quote }}: {{ $val | quote }}
Expand Down
1 change: 1 addition & 0 deletions charts/fluid-dataloader/alluxio/templates/cronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ spec:
app: alluxio
cronjob: {{ printf "%s-job" .Release.Name }}
targetDataset: {{ required "targetDataset should be set" .Values.dataloader.targetDataset }}
{{- include "library.fluid.labels" . | nindent 12 }}
{{- if .Values.dataloader.labels }}
{{- range $key, $val := .Values.dataloader.labels }}
{{ $key | quote }}: {{ $val | quote }}
Expand Down
1 change: 1 addition & 0 deletions charts/fluid-dataloader/goosefs/templates/cronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ spec:
app: goosefs
cronjob: {{ printf "%s-job" .Release.Name }}
targetDataset: {{ required "targetDataset should be set" .Values.dataloader.targetDataset }}
{{- include "library.fluid.labels" . | nindent 12 }}
spec:
{{- include "library.fluid.dataload.cronJobCommonTemplateSpec" . | nindent 10 }}
containers:
Expand Down
1 change: 1 addition & 0 deletions charts/fluid-dataloader/jindo/templates/cronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ spec:
app: jindofs
cronjob: {{ printf "%s-job" .Release.Name }}
targetDataset: {{ required "targetDataset should be set" .Values.dataloader.targetDataset }}
{{- include "library.fluid.labels" . | nindent 12 }}
spec:
{{- include "library.fluid.dataload.cronJobCommonTemplateSpec" . | nindent 10 }}
containers:
Expand Down
1 change: 1 addition & 0 deletions charts/fluid-dataloader/jindocache/templates/cronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ spec:
app: jindocache
cronjob: {{ printf "%s-job" .Release.Name }}
targetDataset: {{ required "targetDataset should be set" .Values.dataloader.targetDataset }}
{{- include "library.fluid.labels" . | nindent 12 }}
{{- if .Values.dataloader.labels }}
{{- range $key, $val := .Values.dataloader.labels }}
{{ $key | quote }}: {{ $val | quote }}
Expand Down
1 change: 1 addition & 0 deletions charts/fluid-dataloader/jindofsx/templates/cronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ spec:
app: jondofsx
cronjob: {{ printf "%s-job" .Release.Name }}
targetDataset: {{ required "targetDataset should be set" .Values.dataloader.targetDataset }}
{{- include "library.fluid.labels" . | nindent 12 }}
{{- if .Values.dataloader.labels }}
{{- range $key, $val := .Values.dataloader.labels }}
{{ $key | quote }}: {{ $val | quote }}
Expand Down
1 change: 1 addition & 0 deletions charts/fluid-dataloader/juicefs/templates/cronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ spec:
app: juicefs
cronjob: {{ printf "%s-job" .Release.Name }}
targetDataset: {{ required "targetDataset should be set" .Values.dataloader.targetDataset }}
{{- include "library.fluid.labels" . | nindent 12 }}
{{- if .Values.dataloader.labels }}
{{- range $key, $val := .Values.dataloader.labels }}
{{ $key | quote }}: {{ $val | quote }}
Expand Down
1 change: 1 addition & 0 deletions charts/fluid-datamigrate/juicefs/templates/cronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ spec:
app: juicefs
cronjob: {{ printf "%s-migrate" .Release.Name }}
targetDataset: {{ required "targetDataset should be set" .Values.datamigrate.targetDataset }}
{{- include "library.fluid.labels" . | nindent 12 }}
{{- if .Values.datamigrate.labels }}
{{- range $key, $val := .Values.datamigrate.labels }}
{{ $key | quote }}: {{ $val | quote }}
Expand Down
2 changes: 1 addition & 1 deletion charts/fluid-datamigrate/juicefs/templates/job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ spec:
role: datamigrate-pod
app: juicefs
targetDataset: {{ required "targetDataset should be set" .Values.datamigrate.targetDataset }}
fluid.io/operation: migrate-{{ .Values.fullNamespacedNameOverride }}
fluid.io/operation: migrate-{{ .Values.ownerDatasetIdentification }}
{{- include "library.fluid.labels" . | nindent 8 }}
{{- if .Values.datamigrate.labels }}
{{- range $key, $val := .Values.datamigrate.labels }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ spec:
metadata:
labels:
app: {{ printf "%s-workers" .Release.Name }}
fluid.io/operation: migrate-{{ .Values.fullNamespacedNameOverride }}
fluid.io/operation: migrate-{{ .Values.ownerDatasetIdentification }}
spec:
containers:
- name: worker
Expand Down
1 change: 1 addition & 0 deletions charts/goosefs/templates/fuse/client-daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ spec:
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
role: goosefs-fuse-client
{{- include "library.fluid.labels" . | nindent 8 }}
spec:
tolerations:
- operator: Exists
Expand Down
1 change: 1 addition & 0 deletions charts/goosefs/templates/fuse/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ spec:
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
role: goosefs-fuse
{{- include "library.fluid.labels" . | nindent 8 }}
spec:
{{- if .Values.fuse.criticalPod }}
priorityClassName: system-node-critical
Expand Down
1 change: 1 addition & 0 deletions charts/goosefs/templates/master/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ spec:
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
role: goosefs-master
{{- include "library.fluid.labels" . | nindent 8 }}
spec:
enableServiceLinks: false
hostNetwork: {{ $hostNetwork }}
Expand Down
5 changes: 3 additions & 2 deletions charts/goosefs/templates/worker/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ metadata:
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
role: goosefs-worker
fluid.io/dataset: {{ .Values.fullNamespacedNameOverride }}
fluid.io/dataset: {{ .Values.ownerDatasetIdentification }}
fluid.io/dataset-placement: {{ .Values.placement }}
{{- include "library.fluid.labels" . | nindent 4 }}
spec:
Expand All @@ -37,8 +37,9 @@ spec:
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
role: goosefs-worker
fluid.io/dataset: {{ .Values.fullNamespacedNameOverride }}
fluid.io/dataset: {{ .Values.ownerDatasetIdentification }}
fluid.io/dataset-placement: {{ .Values.placement }}
{{- include "library.fluid.labels" . | nindent 8 }}
spec:
enableServiceLinks: false
hostNetwork: {{ $hostNetwork }}
Expand Down
1 change: 1 addition & 0 deletions charts/jindocache/templates/fuse/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ spec:
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
role: jindofs-fuse
{{- include "library.fluid.labels" . | nindent 8 }}
{{- if .Values.fuse.labels }}
{{- range $key, $val := .Values.fuse.labels }}
{{ $key | quote }}: {{ $val | quote }}
Expand Down
1 change: 1 addition & 0 deletions charts/jindocache/templates/master/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ spec:
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
role: jindofs-master
{{- include "library.fluid.labels" . | nindent 8 }}
{{- if .Values.master.labels }}
{{- range $key, $val := .Values.master.labels }}
{{ $key | quote }}: {{ $val | quote }}
Expand Down
5 changes: 3 additions & 2 deletions charts/jindocache/templates/worker/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ metadata:
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
role: jindofs-worker
fluid.io/dataset: {{ .Values.fullNamespacedNameOverride }}
fluid.io/dataset: {{ .Values.ownerDatasetIdentification }}
fluid.io/dataset-placement: {{ .Values.placement }}
{{- include "library.fluid.labels" . | nindent 4 }}
ownerReferences:
Expand Down Expand Up @@ -49,8 +49,9 @@ spec:
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
role: jindofs-worker
fluid.io/dataset: {{ .Values.fullNamespacedNameOverride }}
fluid.io/dataset: {{ .Values.ownerDatasetIdentification }}
fluid.io/dataset-placement: {{ .Values.placement }}
{{- include "library.fluid.labels" . | nindent 8 }}
{{- if .Values.worker.labels }}
{{- range $key, $val := .Values.worker.labels }}
{{ $key | quote }}: {{ $val | quote }}
Expand Down
1 change: 1 addition & 0 deletions charts/jindofs/templates/fuse/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ spec:
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
role: jindofs-fuse
{{- include "library.fluid.labels" . | nindent 8 }}
{{- if .Values.labels }}
{{ toYaml .Values.labels | trim | indent 8 }}
{{- end }}
Expand Down
1 change: 1 addition & 0 deletions charts/jindofs/templates/master/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ spec:
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
role: jindofs-master
{{- include "library.fluid.labels" . | nindent 8 }}
{{- if .Values.labels }}
{{ toYaml .Values.labels | trim | indent 8 }}
{{- end }}
Expand Down
5 changes: 3 additions & 2 deletions charts/jindofs/templates/worker/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ metadata:
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
role: jindofs-worker
fluid.io/dataset: {{ .Values.fullNamespacedNameOverride }}
fluid.io/dataset: {{ .Values.ownerDatasetIdentification }}
fluid.io/dataset-placement: {{ .Values.placement }}
{{- include "library.fluid.labels" . | nindent 4 }}
ownerReferences:
Expand Down Expand Up @@ -44,8 +44,9 @@ spec:
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
role: jindofs-worker
fluid.io/dataset: {{ .Values.fullNamespacedNameOverride }}
fluid.io/dataset: {{ .Values.ownerDatasetIdentification }}
fluid.io/dataset-placement: {{ .Values.placement }}
{{- include "library.fluid.labels" . | nindent 8 }}
{{- if .Values.labels }}
{{ toYaml .Values.labels | trim | indent 8 }}
{{- end }}
Expand Down
1 change: 1 addition & 0 deletions charts/jindofsx/templates/fuse/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ spec:
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
role: jindofs-fuse
{{- include "library.fluid.labels" . | nindent 8 }}
{{- if .Values.fuse.labels }}
{{- range $key, $val := .Values.fuse.labels }}
{{ $key | quote }}: {{ $val | quote }}
Expand Down
1 change: 1 addition & 0 deletions charts/jindofsx/templates/master/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ spec:
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
role: jindofs-master
{{- include "library.fluid.labels" . | nindent 8 }}
{{- if .Values.master.labels }}
{{- range $key, $val := .Values.master.labels }}
{{ $key | quote }}: {{ $val | quote }}
Expand Down
5 changes: 3 additions & 2 deletions charts/jindofsx/templates/worker/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ metadata:
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
role: jindofs-worker
fluid.io/dataset: {{ .Values.fullNamespacedNameOverride }}
fluid.io/dataset: {{ .Values.ownerDatasetIdentification }}
fluid.io/dataset-placement: {{ .Values.placement }}
{{- include "library.fluid.labels" . | nindent 4 }}
ownerReferences:
Expand Down Expand Up @@ -49,8 +49,9 @@ spec:
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
role: jindofs-worker
fluid.io/dataset: {{ .Values.fullNamespacedNameOverride }}
fluid.io/dataset: {{ .Values.ownerDatasetIdentification }}
fluid.io/dataset-placement: {{ .Values.placement }}
{{- include "library.fluid.labels" . | nindent 8 }}
{{- if .Values.worker.labels }}
{{- range $key, $val := .Values.worker.labels }}
{{ $key | quote }}: {{ $val | quote }}
Expand Down
1 change: 1 addition & 0 deletions charts/juicefs/templates/fuse/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ spec:
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
role: juicefs-fuse
{{- include "library.fluid.labels" . | nindent 8 }}
{{- if .Values.fuse.labels }}
{{- range $key, $val := .Values.fuse.labels }}
{{ $key | quote }}: {{ $val | quote }}
Expand Down
5 changes: 3 additions & 2 deletions charts/juicefs/templates/worker/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ metadata:
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
role: juicefs-worker
fluid.io/dataset: {{ .Values.fullNamespacedNameOverride }}
fluid.io/dataset: {{ .Values.ownerDatasetIdentification }}
fluid.io/dataset-placement: {{ .Values.placement }}
{{- include "library.fluid.labels" . | nindent 4 }}
ownerReferences:
Expand Down Expand Up @@ -48,8 +48,9 @@ spec:
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
role: juicefs-worker
fluid.io/dataset: {{ .Values.fullNamespacedNameOverride }}
fluid.io/dataset: {{ .Values.ownerDatasetIdentification }}
fluid.io/dataset-placement: {{ .Values.placement }}
{{- include "library.fluid.labels" . | nindent 8 }}
{{- if .Values.worker.labels }}
{{- range $key, $val := .Values.worker.labels }}
{{ $key | quote}}: {{ $val | quote }}
Expand Down
1 change: 1 addition & 0 deletions charts/library/templates/_recommended_labels.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ app.kubernetes.io/name: {{ .Chart.Name }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
fluid.io/managed-by: fluid
fluid.io/dataset-identification: {{ .Values.ownerDatasetIdentification }}
{{- end }}
1 change: 1 addition & 0 deletions charts/thin/templates/fuse/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ spec:
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
role: thin-fuse
{{- include "library.fluid.labels" . | nindent 8 }}
spec:
{{- if .Values.fuse.imagePullSecrets }}
imagePullSecrets:
Expand Down
5 changes: 3 additions & 2 deletions charts/thin/templates/worker/statefuleset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ metadata:
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
role: thin-worker
fluid.io/dataset: {{ .Values.fullNamespacedNameOverride }}
fluid.io/dataset: {{ .Values.ownerDatasetIdentification }}
fluid.io/dataset-placement: {{ .Values.placement }}
{{- include "library.fluid.labels" . | nindent 4 }}
ownerReferences:
Expand Down Expand Up @@ -41,8 +41,9 @@ spec:
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
role: thin-worker
fluid.io/dataset: {{ .Values.fullNamespacedNameOverride }}
fluid.io/dataset: {{ .Values.ownerDatasetIdentification }}
fluid.io/dataset-placement: {{ .Values.placement }}
{{- include "library.fluid.labels" . | nindent 8 }}
spec:
{{- if .Values.worker.imagePullSecrets }}
imagePullSecrets:
Expand Down
1 change: 1 addition & 0 deletions charts/vineyard/templates/fuse/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ spec:
chart: {{ $chart }}
release: {{ .Release.Name }}
role: vineyard-fuse
{{- include "library.fluid.labels" . | nindent 8 }}
{{- if .Values.fuse.labels }}
{{- range $key, $val := .Values.fuse.labels }}
{{ $key | quote }}: {{ $val | quote }}
Expand Down
1 change: 1 addition & 0 deletions charts/vineyard/templates/master/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ spec:
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
role: vineyard-master
{{- include "library.fluid.labels" . | nindent 8 }}
{{- if .Values.master.labels }}
{{- range $key, $val := .Values.master.labels }}
{{ $key | quote }}: {{ $val | quote }}
Expand Down
9 changes: 4 additions & 5 deletions charts/vineyard/templates/worker/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ metadata:
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
role: vineyard-worker
fluid.io/dataset: {{ .Values.fullNamespacedNameOverride }}
fluid.io/dataset: {{ .Values.ownerDatasetIdentification }}
{{- include "library.fluid.labels" . | nindent 4 }}
{{- if .Values.owner.enabled }}
ownerReferences:
Expand All @@ -46,7 +46,6 @@ spec:
chart: {{ $chart }}
release: {{ .Release.Name }}
role: vineyard-worker
app.kubernetes.io/instance: {{ .Values.fullNamespacedNameOverride }}-worker
template:
metadata:
annotations:
Expand All @@ -62,8 +61,8 @@ spec:
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
role: vineyard-worker
fluid.io/dataset: {{ .Values.fullNamespacedNameOverride }}
app.kubernetes.io/instance: {{ .Values.fullNamespacedNameOverride }}-worker
fluid.io/dataset: {{ .Values.ownerDatasetIdentification }}
{{- include "library.fluid.labels" . | nindent 8 }}
{{- if .Values.worker.labels }}
{{- range $key, $val := .Values.worker.labels }}
{{ $key | quote }}: {{ $val | quote }}
Expand Down Expand Up @@ -215,5 +214,5 @@ spec:
- key: app.kubernetes.io/instance
operator: In
values:
- {{ .Values.fullNamespacedNameOverride }}-worker
- {{ .Values.ownerDatasetIdentification }}-worker
topologyKey: "kubernetes.io/hostname"
Loading

0 comments on commit abc1417

Please sign in to comment.