Skip to content

Commit

Permalink
enhancement: add common labels to resources that managed by fluid (fl…
Browse files Browse the repository at this point in the history
…uid-cloudnative#3720)

* Add common helm library chart

Signed-off-by: trafalgarzzz <trafalgarz@outlook.com>

* Add common labels to Allluxio chart

Signed-off-by: trafalgarzzz <trafalgarz@outlook.com>

* Fix library chart dependency

Signed-off-by: trafalgarzzz <trafalgarz@outlook.com>

* follow helm chart best practice

Signed-off-by: trafalgarzzz <trafalgarz@outlook.com>

* Add shell script for automatically injecting library chart

Signed-off-by: trafalgarzzz <trafalgarz@outlook.com>

* Inject library chart(symlink) to all charts

Signed-off-by: trafalgarzzz <trafalgarz@outlook.com>

* Add empty EOF line

Signed-off-by: trafalgarzzz <trafalgarz@outlook.com>

* Add common labels to EFCRuntime

Signed-off-by: trafalgarzzz <trafalgarz@outlook.com>

* Add common labels to DataBackup

Signed-off-by: trafalgarzzz <trafalgarz@outlook.com>

* Add common labels to DataLoad

Signed-off-by: trafalgarzzz <trafalgarz@outlook.com>

* Add common labels to DataMigrate

Signed-off-by: trafalgarzzz <trafalgarz@outlook.com>

* Add common labels to DataProcess

Signed-off-by: trafalgarzzz <trafalgarz@outlook.com>

* Add common labels to GooseFSRuntime

Signed-off-by: trafalgarzzz <trafalgarz@outlook.com>

* Add common labels to JindoCache engine

Signed-off-by: trafalgarzzz <trafalgarz@outlook.com>

* Add common labels to JindoFS engine

Signed-off-by: trafalgarzzz <trafalgarz@outlook.com>

* Add common labels to JindoFSx engine

Signed-off-by: trafalgarzzz <trafalgarz@outlook.com>

* Add common labels to JuiceFS engine

Signed-off-by: trafalgarzzz <trafalgarz@outlook.com>

* Add common labels to Thin engine

Signed-off-by: trafalgarzzz <trafalgarz@outlook.com>

* Add common labels to Vineyard engine

Signed-off-by: trafalgarzzz <trafalgarz@outlook.com>

* Fix Dockerfile for adding library chart to JindoRuntime controller

Signed-off-by: trafalgarzzz <trafalgarz@outlook.com>

---------

Signed-off-by: trafalgarzzz <trafalgarz@outlook.com>
  • Loading branch information
TrafalgarZZZ authored Feb 21, 2024
1 parent 8cb485e commit ad3039a
Show file tree
Hide file tree
Showing 121 changed files with 268 additions and 11 deletions.
6 changes: 5 additions & 1 deletion charts/alluxio/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#

name: alluxio
apiVersion: v1
apiVersion: v2
description: Open source data orchestration for analytics and machine learning in any cloud.
version: 0.9.13
home: https://www.alluxio.io/
Expand All @@ -27,3 +27,7 @@ maintainers:
email: sichen.zhao@outlook.com
- name: Ni Wang
email: niwangzz@163.com
dependencies:
- name: library
version: "0.1.0"
repository: "file://../library"
1 change: 1 addition & 0 deletions charts/alluxio/charts/library
1 change: 1 addition & 0 deletions charts/alluxio/templates/config/alluxio-conf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ metadata:
chart: {{ $chart }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- include "library.fluid.labels" . | nindent 4 }}
ownerReferences:
{{- if .Values.owner.enabled }}
- apiVersion: {{ .Values.owner.apiVersion }}
Expand Down
1 change: 1 addition & 0 deletions charts/alluxio/templates/config/alluxio-mount-conf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ metadata:
chart: {{ template "alluxio.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- include "library.fluid.labels" . | nindent 4 }}
ownerReferences:
{{- if .Values.owner.enabled }}
- apiVersion: {{ .Values.owner.apiVersion }}
Expand Down
1 change: 1 addition & 0 deletions charts/alluxio/templates/fuse/client-daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ metadata:
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
role: alluxio-fuse-client
{{- include "library.fluid.labels" . | nindent 4 }}
spec:
selector:
matchLabels:
Expand Down
1 change: 1 addition & 0 deletions charts/alluxio/templates/fuse/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ metadata:
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
role: alluxio-fuse
{{- include "library.fluid.labels" . | nindent 4 }}
ownerReferences:
{{- if .Values.owner.enabled }}
- apiVersion: {{ .Values.owner.apiVersion }}
Expand Down
2 changes: 2 additions & 0 deletions charts/alluxio/templates/master/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
{{- $fullName := include "alluxio.fullname" . }}
{{- $chart := include "alluxio.chart" . }}
{{- $owner := $.Values.owner }}
{{- $labels := include "library.fluid.labels" . }}
{{- range $i := until $masterCount }}
{{- $masterName := printf "master-%v" $i }}
{{- $masterJavaOpts := printf " -Dalluxio.master.hostname=%v-%v " $fullName $masterName }}
Expand All @@ -40,6 +41,7 @@ metadata:
release: {{ $release.Name }}
heritage: {{ $release.Service }}
role: alluxio-master
{{- $labels | nindent 4 }}
{{- if $isMonitored }}
monitor: {{ $metricsLabel }}
{{- end }}
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 @@ -31,6 +31,7 @@ metadata:
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
role: alluxio-master
{{- include "library.fluid.labels" . | nindent 4 }}
ownerReferences:
{{- if .Values.owner.enabled }}
- apiVersion: {{ .Values.owner.apiVersion }}
Expand Down
1 change: 1 addition & 0 deletions charts/alluxio/templates/worker/domain-socket-pvc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ metadata:
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
role: alluxio-worker
{{- include "library.fluid.labels" . | nindent 4 }}
spec:
volumeMode: Filesystem
resources:
Expand Down
1 change: 1 addition & 0 deletions charts/alluxio/templates/worker/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ metadata:
role: alluxio-worker
fluid.io/dataset: {{ .Release.Namespace }}-{{ .Release.Name }}
fluid.io/dataset-placement: {{ .Values.placement }}
{{- include "library.fluid.labels" . | nindent 4 }}
ownerReferences:
{{- if .Values.owner.enabled }}
- apiVersion: {{ .Values.owner.apiVersion }}
Expand Down
7 changes: 6 additions & 1 deletion charts/efc/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: v1
apiVersion: v2
name: efc
description: A fuse filesystem for NAS with distributed cache.
version: 0.1.4
Expand All @@ -7,3 +7,8 @@ maintainers:
email: mayingchun.myc@alibaba-inc.com
- name: Yi Zhan
email: hanson.yj@alibaba-inc.com

dependencies:
- name: library
version: "0.1.0"
repository: "file://../library"
1 change: 1 addition & 0 deletions charts/efc/charts/library
1 change: 1 addition & 0 deletions charts/efc/templates/fuse/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ metadata:
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
role: efc-fuse
{{- include "library.fluid.labels" . | nindent 4 }}
ownerReferences:
{{- if .Values.owner.enabled }}
- apiVersion: {{ .Values.owner.apiVersion }}
Expand Down
1 change: 1 addition & 0 deletions charts/efc/templates/master/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ metadata:
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
role: efc-master
{{- include "library.fluid.labels" . | nindent 4 }}
ownerReferences:
{{- if .Values.owner.enabled }}
- apiVersion: {{ .Values.owner.apiVersion }}
Expand Down
1 change: 1 addition & 0 deletions charts/efc/templates/worker/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ metadata:
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
role: efc-worker-endpoints
{{- include "library.fluid.labels" . | nindent 4 }}
ownerReferences:
{{- if .Values.owner.enabled }}
- apiVersion: {{ .Values.owner.apiVersion }}
Expand Down
1 change: 1 addition & 0 deletions charts/efc/templates/worker/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ metadata:
role: efc-worker
fluid.io/dataset: {{ .Release.Namespace }}-{{ .Release.Name }}
fluid.io/dataset-placement: {{ .Values.placement }}
{{- include "library.fluid.labels" . | nindent 4 }}
ownerReferences:
{{- if .Values.owner.enabled }}
- apiVersion: {{ .Values.owner.apiVersion }}
Expand Down
5 changes: 5 additions & 0 deletions charts/fluid-databackup/alluxio/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,8 @@ version: 0.1.0
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
appVersion: 0.1.0

dependencies:
- name: library
version: "0.1.0"
repository: "file://../../library"
1 change: 1 addition & 0 deletions charts/fluid-databackup/alluxio/charts/library
2 changes: 2 additions & 0 deletions charts/fluid-databackup/alluxio/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: {{ .Values.dataBackup.name }}-script
labels:
{{- include "library.fluid.labels" . | nindent 4 }}
data:
databackuper.alluxio: |
#!/bin/bash
Expand Down
2 changes: 2 additions & 0 deletions charts/fluid-databackup/alluxio/templates/databackup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ metadata:
{{- if .Values.dataBackup.namespace }}
namespace: {{ .Values.dataBackup.namespace }}
{{- end }}
labels:
{{- include "library.fluid.labels" . | nindent 4 }}
spec:
{{- if .Values.dataBackup.nodeName }}
nodeName: {{ .Values.dataBackup.nodeName }}
Expand Down
5 changes: 5 additions & 0 deletions charts/fluid-databackup/goosefs/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,8 @@ version: 0.1.0
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
appVersion: 0.1.0

dependencies:
- name: library
version: "0.1.0"
repository: "file://../../library"
1 change: 1 addition & 0 deletions charts/fluid-databackup/goosefs/charts/library
2 changes: 2 additions & 0 deletions charts/fluid-databackup/goosefs/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: {{ .Values.dataBackup.name }}-script
labels:
{{- include "library.fluid.labels" . | nindent 4 }}
data:
databackuper.goosefs: |
#!/bin/bash
Expand Down
2 changes: 2 additions & 0 deletions charts/fluid-databackup/goosefs/templates/databackup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ metadata:
{{- if .Values.dataBackup.namespace }}
namespace: {{ .Values.dataBackup.namespace }}
{{- end }}
labels:
{{- include "library.fluid.labels" . | nindent 4 }}
spec:
{{- if .Values.dataBackup.nodeName }}
nodeName: {{ .Values.dataBackup.nodeName }}
Expand Down
5 changes: 5 additions & 0 deletions charts/fluid-dataloader/alluxio/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,8 @@ version: 0.3.0
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
appVersion: 0.3.0

dependencies:
- name: library
version: "0.1.0"
repository: "file://../../library"
1 change: 1 addition & 0 deletions charts/fluid-dataloader/alluxio/charts/library
1 change: 1 addition & 0 deletions charts/fluid-dataloader/alluxio/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ metadata:
labels:
release: {{ .Release.Name }}
role: dataload-job
{{- include "library.fluid.labels" . | nindent 4 }}
data:
dataloader.alluxio.init: |
#!/usr/bin/env bash
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 @@ -22,6 +22,7 @@ metadata:
targetDataset: {{ required "targetDataset should be set" .Values.dataloader.targetDataset }}
dataload: {{ .Values.name }}
fluid.io/jobPolicy: cron
{{- include "library.fluid.labels" . | nindent 4 }}
ownerReferences:
{{- if .Values.owner.enabled }}
- apiVersion: {{ .Values.owner.apiVersion }}
Expand Down
1 change: 1 addition & 0 deletions charts/fluid-dataloader/alluxio/templates/job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ metadata:
role: dataload-job
app: alluxio
targetDataset: {{ required "targetDataset should be set" .Values.dataloader.targetDataset }}
{{- include "library.fluid.labels" . | nindent 4 }}
ownerReferences:
{{- if .Values.owner.enabled }}
- apiVersion: {{ .Values.owner.apiVersion }}
Expand Down
5 changes: 5 additions & 0 deletions charts/fluid-dataloader/goosefs/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,8 @@ version: 0.1.0
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
appVersion: 0.1.0

dependencies:
- name: library
version: "0.1.0"
repository: "file://../../library"
1 change: 1 addition & 0 deletions charts/fluid-dataloader/goosefs/charts/library
1 change: 1 addition & 0 deletions charts/fluid-dataloader/goosefs/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ metadata:
labels:
release: {{ .Release.Name }}
role: dataload-job
{{- include "library.fluid.labels" . | nindent 4 }}
data:
dataloader.goosefs.init: |
#!/usr/bin/env bash
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 @@ -19,6 +19,7 @@ metadata:
targetDataset: {{ required "targetDataset should be set" .Values.dataloader.targetDataset }}
dataload: {{ .Values.name }}
fluid.io/jobPolicy: cron
{{- include "library.fluid.labels" . | nindent 4 }}
ownerReferences:
{{- if .Values.owner.enabled }}
- apiVersion: {{ .Values.owner.apiVersion }}
Expand Down
1 change: 1 addition & 0 deletions charts/fluid-dataloader/goosefs/templates/job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ metadata:
role: dataload-job
app: goosefs
targetDataset: {{ required "targetDataset should be set" .Values.dataloader.targetDataset }}
{{- include "library.fluid.labels" . | nindent 4 }}
ownerReferences:
{{- if .Values.owner.enabled }}
- apiVersion: {{ .Values.owner.apiVersion }}
Expand Down
5 changes: 5 additions & 0 deletions charts/fluid-dataloader/jindo/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,8 @@ version: 0.2.0
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
appVersion: 0.2.0

dependencies:
- name: library
version: "0.1.0"
repository: "file://../../library"
1 change: 1 addition & 0 deletions charts/fluid-dataloader/jindo/charts/library
1 change: 1 addition & 0 deletions charts/fluid-dataloader/jindo/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ metadata:
labels:
release: {{ .Release.Name }}
role: dataload-job
{{- include "library.fluid.labels" . | nindent 4 }}
data:
dataloader.jindo.init: |
#!/usr/bin/env bash
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 @@ -22,6 +22,7 @@ metadata:
targetDataset: {{ required "targetDataset should be set" .Values.dataloader.targetDataset }}
dataload: {{ .Values.name }}
fluid.io/jobPolicy: cron
{{- include "library.fluid.labels" . | nindent 4 }}
ownerReferences:
{{- if .Values.owner.enabled }}
- apiVersion: {{ .Values.owner.apiVersion }}
Expand Down
1 change: 1 addition & 0 deletions charts/fluid-dataloader/jindo/templates/job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ metadata:
role: dataload-job
app: jindofs
targetDataset: {{ required "targetDataset should be set" .Values.dataloader.targetDataset }}
{{- include "library.fluid.labels" . | nindent 4 }}
ownerReferences:
{{- if .Values.owner.enabled }}
- apiVersion: {{ .Values.owner.apiVersion }}
Expand Down
5 changes: 5 additions & 0 deletions charts/fluid-dataloader/jindocache/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,8 @@ version: 0.5.0
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
appVersion: 0.5.0

dependencies:
- name: library
version: "0.1.0"
repository: "file://../../library"
1 change: 1 addition & 0 deletions charts/fluid-dataloader/jindocache/charts/library
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ metadata:
labels:
release: {{ .Release.Name }}
role: dataload-job
{{- include "library.fluid.labels" . | nindent 4 }}
data:
dataloader.jindo.init: |
#!/usr/bin/env bash
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 @@ -22,6 +22,7 @@ metadata:
targetDataset: {{ required "targetDataset should be set" .Values.dataloader.targetDataset }}
dataload: {{ .Values.name }}
fluid.io/jobPolicy: cron
{{- include "library.fluid.labels" . | nindent 4 }}
ownerReferences:
{{- if .Values.owner.enabled }}
- apiVersion: {{ .Values.owner.apiVersion }}
Expand Down
1 change: 1 addition & 0 deletions charts/fluid-dataloader/jindocache/templates/job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ metadata:
role: dataload-job
app: jindocache
targetDataset: {{ required "targetDataset should be set" .Values.dataloader.targetDataset }}
{{- include "library.fluid.labels" . | nindent 4 }}
ownerReferences:
{{- if .Values.owner.enabled }}
- apiVersion: {{ .Values.owner.apiVersion }}
Expand Down
5 changes: 5 additions & 0 deletions charts/fluid-dataloader/jindofsx/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,8 @@ version: 0.5.0
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
appVersion: 0.5.0

dependencies:
- name: library
version: "0.1.0"
repository: "file://../../library"
1 change: 1 addition & 0 deletions charts/fluid-dataloader/jindofsx/charts/library
1 change: 1 addition & 0 deletions charts/fluid-dataloader/jindofsx/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ metadata:
labels:
release: {{ .Release.Name }}
role: dataload-job
{{- include "library.fluid.labels" . | nindent 4 }}
data:
dataloader.jindo.init: |
#!/usr/bin/env bash
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 @@ -22,6 +22,7 @@ metadata:
targetDataset: {{ required "targetDataset should be set" .Values.dataloader.targetDataset }}
dataload: {{ .Values.name }}
fluid.io/jobPolicy: cron
{{- include "library.fluid.labels" . | nindent 4 }}
ownerReferences:
{{- if .Values.owner.enabled }}
- apiVersion: {{ .Values.owner.apiVersion }}
Expand Down
1 change: 1 addition & 0 deletions charts/fluid-dataloader/jindofsx/templates/job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ metadata:
role: dataload-job
app: jindofsx
targetDataset: {{ required "targetDataset should be set" .Values.dataloader.targetDataset }}
{{- include "library.fluid.labels" . | nindent 4 }}
ownerReferences:
{{- if .Values.owner.enabled }}
- apiVersion: {{ .Values.owner.apiVersion }}
Expand Down
5 changes: 5 additions & 0 deletions charts/fluid-dataloader/juicefs/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,8 @@ version: 0.2.0
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
appVersion: 0.2.0

dependencies:
- name: library
version: "0.1.0"
repository: "file://../../library"
1 change: 1 addition & 0 deletions charts/fluid-dataloader/juicefs/charts/library
Loading

0 comments on commit ad3039a

Please sign in to comment.