diff --git a/Makefile b/Makefile index 102865111cb..396ef9b6ee7 100644 --- a/Makefile +++ b/Makefile @@ -161,13 +161,13 @@ csi-build: CGO_ENABLED=0 GOOS=linux GOARCH=${ARCH} GO111MODULE=${GO_MODULE} go build ${GC_FLAGS} -a -o bin/fluid-csi -ldflags '${LDFLAGS}' cmd/csi/main.go dataset-controller-build: - CGO_ENABLED=0 GOOS=linux GOARCH=${ARCH} GO111MODULE=${GO_MODULE} go build ${GC_FLAGS} -a -o bin/dataset-controller -ldflags '${LDFLAGS}' cmd/dataset/main.go + CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=${GO_MODULE} go build ${GC_FLAGS} -a -o bin/dataset-controller -ldflags '${LDFLAGS}' cmd/dataset/main.go alluxioruntime-controller-build: CGO_ENABLED=0 GOOS=linux GOARCH=${ARCH} GO111MODULE=${GO_MODULE} go build ${GC_FLAGS} -a -o bin/alluxioruntime-controller -ldflags '${LDFLAGS}' cmd/alluxio/main.go jindoruntime-controller-build: - CGO_ENABLED=0 GOOS=linux GOARCH=${ARCH} GO111MODULE=${GO_MODULE} go build ${GC_FLAGS} -a -o bin/jindoruntime-controller -ldflags '${LDFLAGS}' cmd/jindo/main.go + CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=${GO_MODULE} go build ${GC_FLAGS} -a -o bin/jindoruntime-controller -ldflags '${LDFLAGS}' cmd/jindo/main.go goosefsruntime-controller-build: CGO_ENABLED=0 GOOS=linux GOARCH=${ARCH} GO111MODULE=${GO_MODULE} go build ${GC_FLAGS} -a -o bin/goosefsruntime-controller -ldflags '${LDFLAGS}' cmd/goosefs/main.go diff --git a/charts/alluxio/charts/library b/charts/alluxio/charts/library deleted file mode 120000 index 494d3c39e3a..00000000000 --- a/charts/alluxio/charts/library +++ /dev/null @@ -1 +0,0 @@ -../../library \ No newline at end of file diff --git a/charts/alluxio/charts/library/Chart.yaml b/charts/alluxio/charts/library/Chart.yaml new file mode 100644 index 00000000000..8eb26dd3bca --- /dev/null +++ b/charts/alluxio/charts/library/Chart.yaml @@ -0,0 +1,5 @@ +apiVersion: v2 +name: library +description: A library chart consisting commonly used helm templates for Fluid runtimes. +type: library # https://helm.sh/docs/topics/library_charts/ +version: 0.1.0 diff --git a/charts/alluxio/charts/library/templates/_recommended_labels.tpl b/charts/alluxio/charts/library/templates/_recommended_labels.tpl new file mode 100644 index 00000000000..da374930aa9 --- /dev/null +++ b/charts/alluxio/charts/library/templates/_recommended_labels.tpl @@ -0,0 +1,11 @@ +{{/* +Common labels. Follow the following guidance: +- https://kubernetes.io/docs/concepts/overview/working-with-objects/common-labels/#labels +- https://helm.sh/docs/chart_best_practices/labels/#standard-labels +*/}} +{{- define "library.fluid.labels" -}} +app.kubernetes.io/name: {{ .Chart.Name }} +app.kubernetes.io/instance: {{ .Release.Name }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +fluid.io/managed-by: fluid +{{- end }} diff --git a/charts/efc/charts/library b/charts/efc/charts/library deleted file mode 120000 index 494d3c39e3a..00000000000 --- a/charts/efc/charts/library +++ /dev/null @@ -1 +0,0 @@ -../../library \ No newline at end of file diff --git a/charts/efc/charts/library/Chart.yaml b/charts/efc/charts/library/Chart.yaml new file mode 100644 index 00000000000..8eb26dd3bca --- /dev/null +++ b/charts/efc/charts/library/Chart.yaml @@ -0,0 +1,5 @@ +apiVersion: v2 +name: library +description: A library chart consisting commonly used helm templates for Fluid runtimes. +type: library # https://helm.sh/docs/topics/library_charts/ +version: 0.1.0 diff --git a/charts/efc/charts/library/templates/_recommended_labels.tpl b/charts/efc/charts/library/templates/_recommended_labels.tpl new file mode 100644 index 00000000000..da374930aa9 --- /dev/null +++ b/charts/efc/charts/library/templates/_recommended_labels.tpl @@ -0,0 +1,11 @@ +{{/* +Common labels. Follow the following guidance: +- https://kubernetes.io/docs/concepts/overview/working-with-objects/common-labels/#labels +- https://helm.sh/docs/chart_best_practices/labels/#standard-labels +*/}} +{{- define "library.fluid.labels" -}} +app.kubernetes.io/name: {{ .Chart.Name }} +app.kubernetes.io/instance: {{ .Release.Name }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +fluid.io/managed-by: fluid +{{- end }} diff --git a/charts/fluid-databackup/alluxio/charts/library b/charts/fluid-databackup/alluxio/charts/library deleted file mode 120000 index ba40d2f56b5..00000000000 --- a/charts/fluid-databackup/alluxio/charts/library +++ /dev/null @@ -1 +0,0 @@ -../../../library \ No newline at end of file diff --git a/charts/fluid-databackup/alluxio/charts/library/Chart.yaml b/charts/fluid-databackup/alluxio/charts/library/Chart.yaml new file mode 100644 index 00000000000..8eb26dd3bca --- /dev/null +++ b/charts/fluid-databackup/alluxio/charts/library/Chart.yaml @@ -0,0 +1,5 @@ +apiVersion: v2 +name: library +description: A library chart consisting commonly used helm templates for Fluid runtimes. +type: library # https://helm.sh/docs/topics/library_charts/ +version: 0.1.0 diff --git a/charts/fluid-databackup/alluxio/charts/library/templates/_recommended_labels.tpl b/charts/fluid-databackup/alluxio/charts/library/templates/_recommended_labels.tpl new file mode 100644 index 00000000000..da374930aa9 --- /dev/null +++ b/charts/fluid-databackup/alluxio/charts/library/templates/_recommended_labels.tpl @@ -0,0 +1,11 @@ +{{/* +Common labels. Follow the following guidance: +- https://kubernetes.io/docs/concepts/overview/working-with-objects/common-labels/#labels +- https://helm.sh/docs/chart_best_practices/labels/#standard-labels +*/}} +{{- define "library.fluid.labels" -}} +app.kubernetes.io/name: {{ .Chart.Name }} +app.kubernetes.io/instance: {{ .Release.Name }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +fluid.io/managed-by: fluid +{{- end }} diff --git a/charts/fluid-databackup/goosefs/charts/library b/charts/fluid-databackup/goosefs/charts/library deleted file mode 120000 index ba40d2f56b5..00000000000 --- a/charts/fluid-databackup/goosefs/charts/library +++ /dev/null @@ -1 +0,0 @@ -../../../library \ No newline at end of file diff --git a/charts/fluid-databackup/goosefs/charts/library/Chart.yaml b/charts/fluid-databackup/goosefs/charts/library/Chart.yaml new file mode 100644 index 00000000000..8eb26dd3bca --- /dev/null +++ b/charts/fluid-databackup/goosefs/charts/library/Chart.yaml @@ -0,0 +1,5 @@ +apiVersion: v2 +name: library +description: A library chart consisting commonly used helm templates for Fluid runtimes. +type: library # https://helm.sh/docs/topics/library_charts/ +version: 0.1.0 diff --git a/charts/fluid-databackup/goosefs/charts/library/templates/_recommended_labels.tpl b/charts/fluid-databackup/goosefs/charts/library/templates/_recommended_labels.tpl new file mode 100644 index 00000000000..da374930aa9 --- /dev/null +++ b/charts/fluid-databackup/goosefs/charts/library/templates/_recommended_labels.tpl @@ -0,0 +1,11 @@ +{{/* +Common labels. Follow the following guidance: +- https://kubernetes.io/docs/concepts/overview/working-with-objects/common-labels/#labels +- https://helm.sh/docs/chart_best_practices/labels/#standard-labels +*/}} +{{- define "library.fluid.labels" -}} +app.kubernetes.io/name: {{ .Chart.Name }} +app.kubernetes.io/instance: {{ .Release.Name }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +fluid.io/managed-by: fluid +{{- end }} diff --git a/charts/fluid-dataloader/alluxio/charts/library b/charts/fluid-dataloader/alluxio/charts/library deleted file mode 120000 index ba40d2f56b5..00000000000 --- a/charts/fluid-dataloader/alluxio/charts/library +++ /dev/null @@ -1 +0,0 @@ -../../../library \ No newline at end of file diff --git a/charts/fluid-dataloader/alluxio/charts/library/Chart.yaml b/charts/fluid-dataloader/alluxio/charts/library/Chart.yaml new file mode 100644 index 00000000000..8eb26dd3bca --- /dev/null +++ b/charts/fluid-dataloader/alluxio/charts/library/Chart.yaml @@ -0,0 +1,5 @@ +apiVersion: v2 +name: library +description: A library chart consisting commonly used helm templates for Fluid runtimes. +type: library # https://helm.sh/docs/topics/library_charts/ +version: 0.1.0 diff --git a/charts/fluid-dataloader/alluxio/charts/library/templates/_recommended_labels.tpl b/charts/fluid-dataloader/alluxio/charts/library/templates/_recommended_labels.tpl new file mode 100644 index 00000000000..da374930aa9 --- /dev/null +++ b/charts/fluid-dataloader/alluxio/charts/library/templates/_recommended_labels.tpl @@ -0,0 +1,11 @@ +{{/* +Common labels. Follow the following guidance: +- https://kubernetes.io/docs/concepts/overview/working-with-objects/common-labels/#labels +- https://helm.sh/docs/chart_best_practices/labels/#standard-labels +*/}} +{{- define "library.fluid.labels" -}} +app.kubernetes.io/name: {{ .Chart.Name }} +app.kubernetes.io/instance: {{ .Release.Name }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +fluid.io/managed-by: fluid +{{- end }} diff --git a/charts/fluid-dataloader/goosefs/charts/library b/charts/fluid-dataloader/goosefs/charts/library deleted file mode 120000 index ba40d2f56b5..00000000000 --- a/charts/fluid-dataloader/goosefs/charts/library +++ /dev/null @@ -1 +0,0 @@ -../../../library \ No newline at end of file diff --git a/charts/fluid-dataloader/goosefs/charts/library/Chart.yaml b/charts/fluid-dataloader/goosefs/charts/library/Chart.yaml new file mode 100644 index 00000000000..8eb26dd3bca --- /dev/null +++ b/charts/fluid-dataloader/goosefs/charts/library/Chart.yaml @@ -0,0 +1,5 @@ +apiVersion: v2 +name: library +description: A library chart consisting commonly used helm templates for Fluid runtimes. +type: library # https://helm.sh/docs/topics/library_charts/ +version: 0.1.0 diff --git a/charts/fluid-dataloader/goosefs/charts/library/templates/_recommended_labels.tpl b/charts/fluid-dataloader/goosefs/charts/library/templates/_recommended_labels.tpl new file mode 100644 index 00000000000..da374930aa9 --- /dev/null +++ b/charts/fluid-dataloader/goosefs/charts/library/templates/_recommended_labels.tpl @@ -0,0 +1,11 @@ +{{/* +Common labels. Follow the following guidance: +- https://kubernetes.io/docs/concepts/overview/working-with-objects/common-labels/#labels +- https://helm.sh/docs/chart_best_practices/labels/#standard-labels +*/}} +{{- define "library.fluid.labels" -}} +app.kubernetes.io/name: {{ .Chart.Name }} +app.kubernetes.io/instance: {{ .Release.Name }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +fluid.io/managed-by: fluid +{{- end }} diff --git a/charts/fluid-dataloader/jindo/charts/library b/charts/fluid-dataloader/jindo/charts/library deleted file mode 120000 index ba40d2f56b5..00000000000 --- a/charts/fluid-dataloader/jindo/charts/library +++ /dev/null @@ -1 +0,0 @@ -../../../library \ No newline at end of file diff --git a/charts/fluid-dataloader/jindo/charts/library/Chart.yaml b/charts/fluid-dataloader/jindo/charts/library/Chart.yaml new file mode 100644 index 00000000000..8eb26dd3bca --- /dev/null +++ b/charts/fluid-dataloader/jindo/charts/library/Chart.yaml @@ -0,0 +1,5 @@ +apiVersion: v2 +name: library +description: A library chart consisting commonly used helm templates for Fluid runtimes. +type: library # https://helm.sh/docs/topics/library_charts/ +version: 0.1.0 diff --git a/charts/fluid-dataloader/jindo/charts/library/templates/_recommended_labels.tpl b/charts/fluid-dataloader/jindo/charts/library/templates/_recommended_labels.tpl new file mode 100644 index 00000000000..da374930aa9 --- /dev/null +++ b/charts/fluid-dataloader/jindo/charts/library/templates/_recommended_labels.tpl @@ -0,0 +1,11 @@ +{{/* +Common labels. Follow the following guidance: +- https://kubernetes.io/docs/concepts/overview/working-with-objects/common-labels/#labels +- https://helm.sh/docs/chart_best_practices/labels/#standard-labels +*/}} +{{- define "library.fluid.labels" -}} +app.kubernetes.io/name: {{ .Chart.Name }} +app.kubernetes.io/instance: {{ .Release.Name }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +fluid.io/managed-by: fluid +{{- end }} diff --git a/charts/fluid-dataloader/jindocache/charts/library b/charts/fluid-dataloader/jindocache/charts/library deleted file mode 120000 index ba40d2f56b5..00000000000 --- a/charts/fluid-dataloader/jindocache/charts/library +++ /dev/null @@ -1 +0,0 @@ -../../../library \ No newline at end of file diff --git a/charts/fluid-dataloader/jindocache/charts/library/Chart.yaml b/charts/fluid-dataloader/jindocache/charts/library/Chart.yaml new file mode 100644 index 00000000000..8eb26dd3bca --- /dev/null +++ b/charts/fluid-dataloader/jindocache/charts/library/Chart.yaml @@ -0,0 +1,5 @@ +apiVersion: v2 +name: library +description: A library chart consisting commonly used helm templates for Fluid runtimes. +type: library # https://helm.sh/docs/topics/library_charts/ +version: 0.1.0 diff --git a/charts/fluid-dataloader/jindocache/charts/library/templates/_recommended_labels.tpl b/charts/fluid-dataloader/jindocache/charts/library/templates/_recommended_labels.tpl new file mode 100644 index 00000000000..da374930aa9 --- /dev/null +++ b/charts/fluid-dataloader/jindocache/charts/library/templates/_recommended_labels.tpl @@ -0,0 +1,11 @@ +{{/* +Common labels. Follow the following guidance: +- https://kubernetes.io/docs/concepts/overview/working-with-objects/common-labels/#labels +- https://helm.sh/docs/chart_best_practices/labels/#standard-labels +*/}} +{{- define "library.fluid.labels" -}} +app.kubernetes.io/name: {{ .Chart.Name }} +app.kubernetes.io/instance: {{ .Release.Name }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +fluid.io/managed-by: fluid +{{- end }} diff --git a/charts/fluid-dataloader/jindofsx/charts/library b/charts/fluid-dataloader/jindofsx/charts/library deleted file mode 120000 index ba40d2f56b5..00000000000 --- a/charts/fluid-dataloader/jindofsx/charts/library +++ /dev/null @@ -1 +0,0 @@ -../../../library \ No newline at end of file diff --git a/charts/fluid-dataloader/jindofsx/charts/library/Chart.yaml b/charts/fluid-dataloader/jindofsx/charts/library/Chart.yaml new file mode 100644 index 00000000000..8eb26dd3bca --- /dev/null +++ b/charts/fluid-dataloader/jindofsx/charts/library/Chart.yaml @@ -0,0 +1,5 @@ +apiVersion: v2 +name: library +description: A library chart consisting commonly used helm templates for Fluid runtimes. +type: library # https://helm.sh/docs/topics/library_charts/ +version: 0.1.0 diff --git a/charts/fluid-dataloader/jindofsx/charts/library/templates/_recommended_labels.tpl b/charts/fluid-dataloader/jindofsx/charts/library/templates/_recommended_labels.tpl new file mode 100644 index 00000000000..da374930aa9 --- /dev/null +++ b/charts/fluid-dataloader/jindofsx/charts/library/templates/_recommended_labels.tpl @@ -0,0 +1,11 @@ +{{/* +Common labels. Follow the following guidance: +- https://kubernetes.io/docs/concepts/overview/working-with-objects/common-labels/#labels +- https://helm.sh/docs/chart_best_practices/labels/#standard-labels +*/}} +{{- define "library.fluid.labels" -}} +app.kubernetes.io/name: {{ .Chart.Name }} +app.kubernetes.io/instance: {{ .Release.Name }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +fluid.io/managed-by: fluid +{{- end }} diff --git a/charts/fluid-dataloader/juicefs/charts/library b/charts/fluid-dataloader/juicefs/charts/library deleted file mode 120000 index ba40d2f56b5..00000000000 --- a/charts/fluid-dataloader/juicefs/charts/library +++ /dev/null @@ -1 +0,0 @@ -../../../library \ No newline at end of file diff --git a/charts/fluid-dataloader/juicefs/charts/library/Chart.yaml b/charts/fluid-dataloader/juicefs/charts/library/Chart.yaml new file mode 100644 index 00000000000..8eb26dd3bca --- /dev/null +++ b/charts/fluid-dataloader/juicefs/charts/library/Chart.yaml @@ -0,0 +1,5 @@ +apiVersion: v2 +name: library +description: A library chart consisting commonly used helm templates for Fluid runtimes. +type: library # https://helm.sh/docs/topics/library_charts/ +version: 0.1.0 diff --git a/charts/fluid-dataloader/juicefs/charts/library/templates/_recommended_labels.tpl b/charts/fluid-dataloader/juicefs/charts/library/templates/_recommended_labels.tpl new file mode 100644 index 00000000000..da374930aa9 --- /dev/null +++ b/charts/fluid-dataloader/juicefs/charts/library/templates/_recommended_labels.tpl @@ -0,0 +1,11 @@ +{{/* +Common labels. Follow the following guidance: +- https://kubernetes.io/docs/concepts/overview/working-with-objects/common-labels/#labels +- https://helm.sh/docs/chart_best_practices/labels/#standard-labels +*/}} +{{- define "library.fluid.labels" -}} +app.kubernetes.io/name: {{ .Chart.Name }} +app.kubernetes.io/instance: {{ .Release.Name }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +fluid.io/managed-by: fluid +{{- end }} diff --git a/charts/fluid-datamigrate/juicefs/charts/library b/charts/fluid-datamigrate/juicefs/charts/library deleted file mode 120000 index ba40d2f56b5..00000000000 --- a/charts/fluid-datamigrate/juicefs/charts/library +++ /dev/null @@ -1 +0,0 @@ -../../../library \ No newline at end of file diff --git a/charts/fluid-datamigrate/juicefs/charts/library/Chart.yaml b/charts/fluid-datamigrate/juicefs/charts/library/Chart.yaml new file mode 100644 index 00000000000..8eb26dd3bca --- /dev/null +++ b/charts/fluid-datamigrate/juicefs/charts/library/Chart.yaml @@ -0,0 +1,5 @@ +apiVersion: v2 +name: library +description: A library chart consisting commonly used helm templates for Fluid runtimes. +type: library # https://helm.sh/docs/topics/library_charts/ +version: 0.1.0 diff --git a/charts/fluid-datamigrate/juicefs/charts/library/templates/_recommended_labels.tpl b/charts/fluid-datamigrate/juicefs/charts/library/templates/_recommended_labels.tpl new file mode 100644 index 00000000000..da374930aa9 --- /dev/null +++ b/charts/fluid-datamigrate/juicefs/charts/library/templates/_recommended_labels.tpl @@ -0,0 +1,11 @@ +{{/* +Common labels. Follow the following guidance: +- https://kubernetes.io/docs/concepts/overview/working-with-objects/common-labels/#labels +- https://helm.sh/docs/chart_best_practices/labels/#standard-labels +*/}} +{{- define "library.fluid.labels" -}} +app.kubernetes.io/name: {{ .Chart.Name }} +app.kubernetes.io/instance: {{ .Release.Name }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +fluid.io/managed-by: fluid +{{- end }} diff --git a/charts/fluid-dataprocess/common/charts/library b/charts/fluid-dataprocess/common/charts/library deleted file mode 120000 index ba40d2f56b5..00000000000 --- a/charts/fluid-dataprocess/common/charts/library +++ /dev/null @@ -1 +0,0 @@ -../../../library \ No newline at end of file diff --git a/charts/fluid-dataprocess/common/charts/library/Chart.yaml b/charts/fluid-dataprocess/common/charts/library/Chart.yaml new file mode 100644 index 00000000000..8eb26dd3bca --- /dev/null +++ b/charts/fluid-dataprocess/common/charts/library/Chart.yaml @@ -0,0 +1,5 @@ +apiVersion: v2 +name: library +description: A library chart consisting commonly used helm templates for Fluid runtimes. +type: library # https://helm.sh/docs/topics/library_charts/ +version: 0.1.0 diff --git a/charts/fluid-dataprocess/common/charts/library/templates/_recommended_labels.tpl b/charts/fluid-dataprocess/common/charts/library/templates/_recommended_labels.tpl new file mode 100644 index 00000000000..da374930aa9 --- /dev/null +++ b/charts/fluid-dataprocess/common/charts/library/templates/_recommended_labels.tpl @@ -0,0 +1,11 @@ +{{/* +Common labels. Follow the following guidance: +- https://kubernetes.io/docs/concepts/overview/working-with-objects/common-labels/#labels +- https://helm.sh/docs/chart_best_practices/labels/#standard-labels +*/}} +{{- define "library.fluid.labels" -}} +app.kubernetes.io/name: {{ .Chart.Name }} +app.kubernetes.io/instance: {{ .Release.Name }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +fluid.io/managed-by: fluid +{{- end }} diff --git a/charts/goosefs/charts/library b/charts/goosefs/charts/library deleted file mode 120000 index 494d3c39e3a..00000000000 --- a/charts/goosefs/charts/library +++ /dev/null @@ -1 +0,0 @@ -../../library \ No newline at end of file diff --git a/charts/goosefs/charts/library/Chart.yaml b/charts/goosefs/charts/library/Chart.yaml new file mode 100644 index 00000000000..8eb26dd3bca --- /dev/null +++ b/charts/goosefs/charts/library/Chart.yaml @@ -0,0 +1,5 @@ +apiVersion: v2 +name: library +description: A library chart consisting commonly used helm templates for Fluid runtimes. +type: library # https://helm.sh/docs/topics/library_charts/ +version: 0.1.0 diff --git a/charts/goosefs/charts/library/templates/_recommended_labels.tpl b/charts/goosefs/charts/library/templates/_recommended_labels.tpl new file mode 100644 index 00000000000..da374930aa9 --- /dev/null +++ b/charts/goosefs/charts/library/templates/_recommended_labels.tpl @@ -0,0 +1,11 @@ +{{/* +Common labels. Follow the following guidance: +- https://kubernetes.io/docs/concepts/overview/working-with-objects/common-labels/#labels +- https://helm.sh/docs/chart_best_practices/labels/#standard-labels +*/}} +{{- define "library.fluid.labels" -}} +app.kubernetes.io/name: {{ .Chart.Name }} +app.kubernetes.io/instance: {{ .Release.Name }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +fluid.io/managed-by: fluid +{{- end }} diff --git a/charts/jindocache/charts/library b/charts/jindocache/charts/library deleted file mode 120000 index 494d3c39e3a..00000000000 --- a/charts/jindocache/charts/library +++ /dev/null @@ -1 +0,0 @@ -../../library \ No newline at end of file diff --git a/charts/jindocache/charts/library/Chart.yaml b/charts/jindocache/charts/library/Chart.yaml new file mode 100644 index 00000000000..8eb26dd3bca --- /dev/null +++ b/charts/jindocache/charts/library/Chart.yaml @@ -0,0 +1,5 @@ +apiVersion: v2 +name: library +description: A library chart consisting commonly used helm templates for Fluid runtimes. +type: library # https://helm.sh/docs/topics/library_charts/ +version: 0.1.0 diff --git a/charts/jindocache/charts/library/templates/_recommended_labels.tpl b/charts/jindocache/charts/library/templates/_recommended_labels.tpl new file mode 100644 index 00000000000..da374930aa9 --- /dev/null +++ b/charts/jindocache/charts/library/templates/_recommended_labels.tpl @@ -0,0 +1,11 @@ +{{/* +Common labels. Follow the following guidance: +- https://kubernetes.io/docs/concepts/overview/working-with-objects/common-labels/#labels +- https://helm.sh/docs/chart_best_practices/labels/#standard-labels +*/}} +{{- define "library.fluid.labels" -}} +app.kubernetes.io/name: {{ .Chart.Name }} +app.kubernetes.io/instance: {{ .Release.Name }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +fluid.io/managed-by: fluid +{{- end }} diff --git a/charts/jindofs/charts/library b/charts/jindofs/charts/library deleted file mode 120000 index 494d3c39e3a..00000000000 --- a/charts/jindofs/charts/library +++ /dev/null @@ -1 +0,0 @@ -../../library \ No newline at end of file diff --git a/charts/jindofs/charts/library/Chart.yaml b/charts/jindofs/charts/library/Chart.yaml new file mode 100644 index 00000000000..8eb26dd3bca --- /dev/null +++ b/charts/jindofs/charts/library/Chart.yaml @@ -0,0 +1,5 @@ +apiVersion: v2 +name: library +description: A library chart consisting commonly used helm templates for Fluid runtimes. +type: library # https://helm.sh/docs/topics/library_charts/ +version: 0.1.0 diff --git a/charts/jindofs/charts/library/templates/_recommended_labels.tpl b/charts/jindofs/charts/library/templates/_recommended_labels.tpl new file mode 100644 index 00000000000..da374930aa9 --- /dev/null +++ b/charts/jindofs/charts/library/templates/_recommended_labels.tpl @@ -0,0 +1,11 @@ +{{/* +Common labels. Follow the following guidance: +- https://kubernetes.io/docs/concepts/overview/working-with-objects/common-labels/#labels +- https://helm.sh/docs/chart_best_practices/labels/#standard-labels +*/}} +{{- define "library.fluid.labels" -}} +app.kubernetes.io/name: {{ .Chart.Name }} +app.kubernetes.io/instance: {{ .Release.Name }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +fluid.io/managed-by: fluid +{{- end }} diff --git a/charts/jindofsx/charts/library b/charts/jindofsx/charts/library deleted file mode 120000 index 494d3c39e3a..00000000000 --- a/charts/jindofsx/charts/library +++ /dev/null @@ -1 +0,0 @@ -../../library \ No newline at end of file diff --git a/charts/jindofsx/charts/library/Chart.yaml b/charts/jindofsx/charts/library/Chart.yaml new file mode 100644 index 00000000000..8eb26dd3bca --- /dev/null +++ b/charts/jindofsx/charts/library/Chart.yaml @@ -0,0 +1,5 @@ +apiVersion: v2 +name: library +description: A library chart consisting commonly used helm templates for Fluid runtimes. +type: library # https://helm.sh/docs/topics/library_charts/ +version: 0.1.0 diff --git a/charts/jindofsx/charts/library/templates/_recommended_labels.tpl b/charts/jindofsx/charts/library/templates/_recommended_labels.tpl new file mode 100644 index 00000000000..da374930aa9 --- /dev/null +++ b/charts/jindofsx/charts/library/templates/_recommended_labels.tpl @@ -0,0 +1,11 @@ +{{/* +Common labels. Follow the following guidance: +- https://kubernetes.io/docs/concepts/overview/working-with-objects/common-labels/#labels +- https://helm.sh/docs/chart_best_practices/labels/#standard-labels +*/}} +{{- define "library.fluid.labels" -}} +app.kubernetes.io/name: {{ .Chart.Name }} +app.kubernetes.io/instance: {{ .Release.Name }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +fluid.io/managed-by: fluid +{{- end }} diff --git a/charts/juicefs/charts/library b/charts/juicefs/charts/library deleted file mode 120000 index 494d3c39e3a..00000000000 --- a/charts/juicefs/charts/library +++ /dev/null @@ -1 +0,0 @@ -../../library \ No newline at end of file diff --git a/charts/juicefs/charts/library/Chart.yaml b/charts/juicefs/charts/library/Chart.yaml new file mode 100644 index 00000000000..8eb26dd3bca --- /dev/null +++ b/charts/juicefs/charts/library/Chart.yaml @@ -0,0 +1,5 @@ +apiVersion: v2 +name: library +description: A library chart consisting commonly used helm templates for Fluid runtimes. +type: library # https://helm.sh/docs/topics/library_charts/ +version: 0.1.0 diff --git a/charts/juicefs/charts/library/templates/_recommended_labels.tpl b/charts/juicefs/charts/library/templates/_recommended_labels.tpl new file mode 100644 index 00000000000..da374930aa9 --- /dev/null +++ b/charts/juicefs/charts/library/templates/_recommended_labels.tpl @@ -0,0 +1,11 @@ +{{/* +Common labels. Follow the following guidance: +- https://kubernetes.io/docs/concepts/overview/working-with-objects/common-labels/#labels +- https://helm.sh/docs/chart_best_practices/labels/#standard-labels +*/}} +{{- define "library.fluid.labels" -}} +app.kubernetes.io/name: {{ .Chart.Name }} +app.kubernetes.io/instance: {{ .Release.Name }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +fluid.io/managed-by: fluid +{{- end }} diff --git a/charts/thin/charts/library b/charts/thin/charts/library deleted file mode 120000 index 494d3c39e3a..00000000000 --- a/charts/thin/charts/library +++ /dev/null @@ -1 +0,0 @@ -../../library \ No newline at end of file diff --git a/charts/thin/charts/library/Chart.yaml b/charts/thin/charts/library/Chart.yaml new file mode 100644 index 00000000000..8eb26dd3bca --- /dev/null +++ b/charts/thin/charts/library/Chart.yaml @@ -0,0 +1,5 @@ +apiVersion: v2 +name: library +description: A library chart consisting commonly used helm templates for Fluid runtimes. +type: library # https://helm.sh/docs/topics/library_charts/ +version: 0.1.0 diff --git a/charts/thin/charts/library/templates/_recommended_labels.tpl b/charts/thin/charts/library/templates/_recommended_labels.tpl new file mode 100644 index 00000000000..da374930aa9 --- /dev/null +++ b/charts/thin/charts/library/templates/_recommended_labels.tpl @@ -0,0 +1,11 @@ +{{/* +Common labels. Follow the following guidance: +- https://kubernetes.io/docs/concepts/overview/working-with-objects/common-labels/#labels +- https://helm.sh/docs/chart_best_practices/labels/#standard-labels +*/}} +{{- define "library.fluid.labels" -}} +app.kubernetes.io/name: {{ .Chart.Name }} +app.kubernetes.io/instance: {{ .Release.Name }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +fluid.io/managed-by: fluid +{{- end }} diff --git a/charts/vineyard/charts/library b/charts/vineyard/charts/library deleted file mode 120000 index 494d3c39e3a..00000000000 --- a/charts/vineyard/charts/library +++ /dev/null @@ -1 +0,0 @@ -../../library \ No newline at end of file diff --git a/charts/vineyard/charts/library/Chart.yaml b/charts/vineyard/charts/library/Chart.yaml new file mode 100644 index 00000000000..8eb26dd3bca --- /dev/null +++ b/charts/vineyard/charts/library/Chart.yaml @@ -0,0 +1,5 @@ +apiVersion: v2 +name: library +description: A library chart consisting commonly used helm templates for Fluid runtimes. +type: library # https://helm.sh/docs/topics/library_charts/ +version: 0.1.0 diff --git a/charts/vineyard/charts/library/templates/_recommended_labels.tpl b/charts/vineyard/charts/library/templates/_recommended_labels.tpl new file mode 100644 index 00000000000..da374930aa9 --- /dev/null +++ b/charts/vineyard/charts/library/templates/_recommended_labels.tpl @@ -0,0 +1,11 @@ +{{/* +Common labels. Follow the following guidance: +- https://kubernetes.io/docs/concepts/overview/working-with-objects/common-labels/#labels +- https://helm.sh/docs/chart_best_practices/labels/#standard-labels +*/}} +{{- define "library.fluid.labels" -}} +app.kubernetes.io/name: {{ .Chart.Name }} +app.kubernetes.io/instance: {{ .Release.Name }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +fluid.io/managed-by: fluid +{{- end }} diff --git a/docker/Dockerfile.dataset b/docker/Dockerfile.dataset index 33d84c563c4..469ff52e368 100644 --- a/docker/Dockerfile.dataset +++ b/docker/Dockerfile.dataset @@ -17,7 +17,7 @@ RUN apk add --update curl tzdata iproute2 bash libc6-compat vim && \ echo "Asia/Shanghai" > /etc/timezone ARG TARGETARCH -RUN curl -o helm-v3.11.3-linux-${TARGETARCH}.tar.gz https://get.helm.sh/helm-v3.11.3-linux-${TARGETARCH}.tar.gz && \ +RUN export HTTPS_PROXY=socks5://host.docker.internal:13659 && curl -o helm-v3.11.3-linux-${TARGETARCH}.tar.gz https://get.helm.sh/helm-v3.11.3-linux-${TARGETARCH}.tar.gz && \ tar -xvf helm-v3.11.3-linux-${TARGETARCH}.tar.gz && \ mv linux-${TARGETARCH}/helm /usr/local/bin/ddc-helm && \ chmod u+x /usr/local/bin/ddc-helm && \ diff --git a/docker/Dockerfile.jindoruntime b/docker/Dockerfile.jindoruntime index 643296e4079..07c438ea2a6 100644 --- a/docker/Dockerfile.jindoruntime +++ b/docker/Dockerfile.jindoruntime @@ -14,7 +14,7 @@ RUN apk add --update curl tzdata iproute2 bash libc6-compat vim && \ echo "Asia/Shanghai" > /etc/timezone ARG TARGETARCH -RUN curl -o helm-v3.11.3-linux-${TARGETARCH}.tar.gz https://get.helm.sh/helm-v3.11.3-linux-${TARGETARCH}.tar.gz && \ +RUN export HTTPS_PROXY=socks5://host.docker.internal:13659 && curl -o helm-v3.11.3-linux-${TARGETARCH}.tar.gz https://get.helm.sh/helm-v3.11.3-linux-${TARGETARCH}.tar.gz && \ tar -xvf helm-v3.11.3-linux-${TARGETARCH}.tar.gz && \ mv linux-${TARGETARCH}/helm /usr/local/bin/ddc-helm && \ chmod u+x /usr/local/bin/ddc-helm && \ diff --git a/pkg/ddc/jindocache/ufs.go b/pkg/ddc/jindocache/ufs.go index 34c17e49be3..3a26d53de54 100644 --- a/pkg/ddc/jindocache/ufs.go +++ b/pkg/ddc/jindocache/ufs.go @@ -17,6 +17,8 @@ limitations under the License. package jindocache import ( + "fmt" + "github.com/fluid-cloudnative/fluid/pkg/ddc/jindocache/operations" "github.com/fluid-cloudnative/fluid/pkg/utils" ) @@ -110,3 +112,49 @@ func (e *JindoCacheEngine) ShouldUpdateUFS() (ufsToUpdate *utils.UFSToUpdate) { func (e *JindoCacheEngine) UpdateOnUFSChange(*utils.UFSToUpdate) (updateReady bool, err error) { return } + +func (e *JindoCacheEngine) shouldRemountMountpoint() { + runtime, err := e.getRuntime() + if err != nil { + e.Log.Error(err, "failed to execute shouldRemountMountpoint", "runtime", e.name) + return + } + + masterPodName, masterContainerName := e.getMasterPodInfo() + masterPod, err := e.getMasterPod(masterPodName, e.namespace) + if err != nil { + e.Log.Error(err, "checkIfRemountRequired", "master pod", e.name) + return + } + + var startedAt *metav1.Time + for _, containerStatus := range masterPod.Status.ContainerStatuses { + if containerStatus.Name == masterContainerName { + if containerStatus.State.Running == nil { + e.Log.Error(fmt.Errorf("container is not running"), "checkIfRemountRequired", "master pod", masterPodName) + return + } else { + startedAt = &containerStatus.State.Running.StartedAt + break + } + } + } + + // If mounttime is earlier than master container starttime, remount is necessary + if startedAt != nil && runtime.Status.MountTime != nil && runtime.Status.MountTime.Before(startedAt) { + e.Log.Info("remount on master restart", "jindocache", e.name) + + unmountedPaths, err := e.FindUnmountedUFS() + if err != nil { + e.Log.Error(err, "Failed in finding unmounted ufs") + return + } + + if len(unmountedPaths) != 0 { + ufsToUpdate.AddMountPaths(unmountedPaths) + } else { + // if no path can be mounted, set mountTime to be now + e.updateMountTime() + } + } +} diff --git a/pkg/ddc/jindocache/utils.go b/pkg/ddc/jindocache/utils.go index b2b93a3531d..886e0bdd067 100644 --- a/pkg/ddc/jindocache/utils.go +++ b/pkg/ddc/jindocache/utils.go @@ -27,6 +27,7 @@ import ( "github.com/fluid-cloudnative/fluid/pkg/utils" appsv1 "k8s.io/api/apps/v1" "k8s.io/apimachinery/pkg/types" + v1 "k8s.io/client-go/applyconfigurations/core/v1" ) func (e *JindoCacheEngine) getTieredStoreType(runtime *datav1alpha1.JindoRuntime) int { @@ -109,6 +110,10 @@ func (e *JindoCacheEngine) getMasterPodInfo() (podName string, containerName str return } +func (e *JindoCacheEngine) getMasterPod() (*v1.Pod, error) { + +} + // return total storage size of Jindo in bytes func (e *JindoCacheEngine) TotalJindoStorageBytes() (value int64, err error) { podName, containerName := e.getMasterPodInfo()