This is an automated email from the ASF dual-hosted git repository.
chengpan pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/celeborn.git
The following commit(s) were added to refs/heads/main by this push:
new d5a85d6a2 [CELEBORN-1415][HELM] Move all the master and worker
resource manifests to dedicated directories respectively
d5a85d6a2 is described below
commit d5a85d6a27b4fc7eb485a5695980bea731a0621c
Author: Yi Chen <[email protected]>
AuthorDate: Tue May 14 12:05:50 2024 +0800
[CELEBORN-1415][HELM] Move all the master and worker resource manifests to
dedicated directories respectively
### What changes were proposed in this pull request?
This PR will do some file renaming, include:
- Move all the master/worker resource manifests to
`charts/celeborn/templates/master` and `charts/celeborn/templates/worker`
directories, respectively.
- Divide the podmonitor template file into two separate templates for
master and worker repectively
### Why are the changes needed?
As dicussed in #2499 , I will break it down into serveral smaller dedicated
patches.
### Does this PR introduce _any_ user-facing change?
No.
### How was this patch tested?
Local test.
Closes #2506 from ChenYi015/helm-charts-dev.
Authored-by: Yi Chen <[email protected]>
Signed-off-by: Cheng Pan <[email protected]>
---
.../podmonitor.yaml} | 23 +---------------------
.../priorityclass.yaml} | 0
.../{master-service.yaml => master/service.yaml} | 0
.../statefulset.yaml} | 0
.../podmonitor.yaml} | 23 +---------------------
.../priorityclass.yaml} | 0
.../{worker-service.yaml => worker/service.yaml} | 0
.../statefulset.yaml} | 0
8 files changed, 2 insertions(+), 44 deletions(-)
diff --git a/charts/celeborn/templates/prometheus-podmonitor.yaml
b/charts/celeborn/templates/master/podmonitor.yaml
similarity index 68%
copy from charts/celeborn/templates/prometheus-podmonitor.yaml
copy to charts/celeborn/templates/master/podmonitor.yaml
index f44b7eea5..32852eaef 100644
--- a/charts/celeborn/templates/prometheus-podmonitor.yaml
+++ b/charts/celeborn/templates/master/podmonitor.yaml
@@ -15,7 +15,7 @@
# limitations under the License.
#
-{{ if .Values.podMonitor.enable }}
+{{- if .Values.podMonitor.enable }}
{{- if .Capabilities.APIVersions.Has "monitoring.coreos.com/v1/PodMonitor" -}}
apiVersion: monitoring.coreos.com/v1
kind: PodMonitor
@@ -37,26 +37,5 @@ spec:
matchLabels:
{{- include "celeborn.selectorLabels" . | nindent 6 }}
app.kubernetes.io/role: master
----
-apiVersion: monitoring.coreos.com/v1
-kind: PodMonitor
-metadata:
- name: {{ .Release.Name }}-worker-podmonitor
- labels:
- {{- include "celeborn.labels" . | nindent 4 }}
-spec:
- podMetricsEndpoints:
- - interval: {{ .Values.podMonitor.podMetricsEndpoint.interval }}
- port: {{ .Values.podMonitor.podMetricsEndpoint.portName | quote }}
- scheme: {{ .Values.podMonitor.podMetricsEndpoint.scheme }}
- path: /metrics/prometheus
- jobLabel: celeborn-worker-podmonitor
- namespaceSelector:
- matchNames:
- - {{ .Release.Namespace }}
- selector:
- matchLabels:
- {{- include "celeborn.selectorLabels" . | nindent 6 }}
- app.kubernetes.io/role: worker
{{- end }}
{{- end }}
diff --git a/charts/celeborn/templates/master-priorityclass.yaml
b/charts/celeborn/templates/master/priorityclass.yaml
similarity index 100%
rename from charts/celeborn/templates/master-priorityclass.yaml
rename to charts/celeborn/templates/master/priorityclass.yaml
diff --git a/charts/celeborn/templates/master-service.yaml
b/charts/celeborn/templates/master/service.yaml
similarity index 100%
rename from charts/celeborn/templates/master-service.yaml
rename to charts/celeborn/templates/master/service.yaml
diff --git a/charts/celeborn/templates/master-statefulset.yaml
b/charts/celeborn/templates/master/statefulset.yaml
similarity index 100%
rename from charts/celeborn/templates/master-statefulset.yaml
rename to charts/celeborn/templates/master/statefulset.yaml
diff --git a/charts/celeborn/templates/prometheus-podmonitor.yaml
b/charts/celeborn/templates/worker/podmonitor.yaml
similarity index 68%
rename from charts/celeborn/templates/prometheus-podmonitor.yaml
rename to charts/celeborn/templates/worker/podmonitor.yaml
index f44b7eea5..74e3e0815 100644
--- a/charts/celeborn/templates/prometheus-podmonitor.yaml
+++ b/charts/celeborn/templates/worker/podmonitor.yaml
@@ -15,31 +15,10 @@
# limitations under the License.
#
-{{ if .Values.podMonitor.enable }}
+{{- if .Values.podMonitor.enable }}
{{- if .Capabilities.APIVersions.Has "monitoring.coreos.com/v1/PodMonitor" -}}
apiVersion: monitoring.coreos.com/v1
kind: PodMonitor
-metadata:
- name: {{ .Release.Name }}-master-podmonitor
- labels:
- {{- include "celeborn.labels" . | nindent 4 }}
-spec:
- podMetricsEndpoints:
- - interval: {{ .Values.podMonitor.podMetricsEndpoint.interval }}
- port: {{ .Values.podMonitor.podMetricsEndpoint.portName | quote }}
- scheme: {{ .Values.podMonitor.podMetricsEndpoint.scheme }}
- path: /metrics/prometheus
- jobLabel: celeborn-master-podmonitor
- namespaceSelector:
- matchNames:
- - {{ .Release.Namespace }}
- selector:
- matchLabels:
- {{- include "celeborn.selectorLabels" . | nindent 6 }}
- app.kubernetes.io/role: master
----
-apiVersion: monitoring.coreos.com/v1
-kind: PodMonitor
metadata:
name: {{ .Release.Name }}-worker-podmonitor
labels:
diff --git a/charts/celeborn/templates/worker-priorityclass.yaml
b/charts/celeborn/templates/worker/priorityclass.yaml
similarity index 100%
rename from charts/celeborn/templates/worker-priorityclass.yaml
rename to charts/celeborn/templates/worker/priorityclass.yaml
diff --git a/charts/celeborn/templates/worker-service.yaml
b/charts/celeborn/templates/worker/service.yaml
similarity index 100%
rename from charts/celeborn/templates/worker-service.yaml
rename to charts/celeborn/templates/worker/service.yaml
diff --git a/charts/celeborn/templates/worker-statefulset.yaml
b/charts/celeborn/templates/worker/statefulset.yaml
similarity index 100%
rename from charts/celeborn/templates/worker-statefulset.yaml
rename to charts/celeborn/templates/worker/statefulset.yaml