-
Notifications
You must be signed in to change notification settings - Fork 136
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Scheduler pprof support in helm chart (#3799)
Co-authored-by: Robert Smith <robert.smith@gresearch.co.uk>
- Loading branch information
1 parent
24bcdf9
commit 1fd9a0a
Showing
3 changed files
with
67 additions
and
3 deletions.
There are no files selected for viewing
41 changes: 41 additions & 0 deletions
41
deployment/scheduler/templates/scheduler-profiling-ingress.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
{{- if and .Values.scheduler.applicationConfig.profiling .Values.scheduler.applicationConfig.profiling.port }} | ||
{{- $root := . -}} | ||
{{- range $i := until (int .Values.scheduler.replicas) }} | ||
apiVersion: networking.k8s.io/v1 | ||
kind: Ingress | ||
metadata: | ||
name: {{ $root.Values.scheduler.ingress.nameOverride | default (include "armada-scheduler.name" $root) }}-{{ $i }}-profiling | ||
namespace: {{ $root.Release.Namespace }} | ||
annotations: | ||
certmanager.k8s.io/cluster-issuer: {{ required "A value is required for $root.Values.scheduler.clusterIssuer" $root.Values.scheduler.clusterIssuer }} | ||
cert-manager.io/cluster-issuer: {{ required "A value is required for $root.Values.scheduler.clusterIssuer" $root.Values.scheduler.clusterIssuer }} | ||
labels: | ||
{{- include "armada-scheduler.labels.all" $root | nindent 4 }} | ||
spec: | ||
rules: | ||
{{- range required "A value is required for .Values.scheduler.hostnames" $root.Values.scheduler.hostnames }} | ||
{{- $splits := splitList "." . -}} | ||
{{- $hostname := (list (first $splits) "-" $i "-profiling." (rest $splits | join ".")) | join "" }} | ||
- host: {{ $hostname }} | ||
http: | ||
paths: | ||
- path: / | ||
pathType: Prefix | ||
backend: | ||
service: | ||
name: {{ include "armada-scheduler.name" $root }}-{{ $i }}-profiling | ||
port: | ||
number: {{ $root.Values.scheduler.applicationConfig.profiling.port }} | ||
{{ end -}} | ||
tls: | ||
- hosts: | ||
{{- range required "A value is required for .Values.scheduler.hostnames" $root.Values.scheduler.hostnames }} | ||
{{- $splits := splitList "." . -}} | ||
{{- $hostname := (list (first $splits) "-" $i "-profiling." (rest $splits | join ".")) | join "" }} | ||
- {{ $hostname -}} | ||
{{ end }} | ||
secretName: armada-scheduler-{{ $i }}-profiling-service-tls | ||
|
||
--- | ||
{{- end }} | ||
{{- end }} |
22 changes: 22 additions & 0 deletions
22
deployment/scheduler/templates/scheduler-profiling-service.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{{- if and .Values.scheduler.applicationConfig.profiling .Values.scheduler.applicationConfig.profiling.port }} | ||
{{- $root := . -}} | ||
{{- range $i := until (int .Values.scheduler.replicas) }} | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: {{ include "armada-scheduler.name" $root }}-{{ $i }}-profiling | ||
namespace: {{ $root.Release.Namespace }} | ||
labels: | ||
{{- include "armada-scheduler.labels.all" $root | nindent 4 }} | ||
name: {{ include "armada-scheduler.name" $root }}-{{ $i }}-profiling | ||
spec: | ||
selector: | ||
statefulset.kubernetes.io/pod-name: {{ include "armada-scheduler.name" $root }}-{{ $i }} | ||
{{- include "armada-scheduler.labels.identity" $root | nindent 4 }} | ||
ports: | ||
- name: profiling | ||
protocol: TCP | ||
port: {{ $root.Values.scheduler.applicationConfig.profiling.port }} | ||
--- | ||
{{- end }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters