Skip to content

Commit

Permalink
Enable expose profiling port for remaining charts, better profiling e…
Browse files Browse the repository at this point in the history
…rror handling (#3809)

Co-authored-by: Robert Smith <[email protected]>
Signed-off-by: Robert Smith <[email protected]>
  • Loading branch information
robertdavidsmith and robdsmith authored Jul 22, 2024
1 parent f8013fc commit bf3ba99
Show file tree
Hide file tree
Showing 22 changed files with 345 additions and 17 deletions.
2 changes: 1 addition & 1 deletion deployment/armada/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ spec:
{{- if and .Values.applicationConfig.profiling .Values.applicationConfig.profiling.port }}
- containerPort: {{ .Values.applicationConfig.profiling.port }}
protocol: TCP
name: pprof
name: profiling
{{- end }}
volumeMounts:
- name: user-config
Expand Down
35 changes: 35 additions & 0 deletions deployment/armada/templates/profiling-ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{{- if and .Values.applicationConfig.profiling .Values.applicationConfig.profiling.hostnames }}
{{- $root := . -}}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ include "armada.name" . }}-profiling
namespace: {{ .Release.Namespace }}
annotations:
certmanager.k8s.io/cluster-issuer: {{ required "A value is required for .Values.applicationConfig.profiling.clusterIssuer" .Values.applicationConfig.profiling.clusterIssuer }}
cert-manager.io/cluster-issuer: {{ required "A value is required for .Values.applicationConfig.profiling.clusterIssuer" .Values.applicationConfig.profiling.clusterIssuer }}
labels:
{{- include "armada.labels.all" . | nindent 4 }}
spec:
rules:
{{- range required "A value is required for .Values.applicationConfig.profiling.hostnames" .Values.applicationConfig.profiling.hostnames }}
- host: {{ . }}
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: {{ include "armada.name" $root }}-server-profiling
port:
number: {{ $root.Values.applicationConfig.profiling.port }}
{{ end -}}
tls:
- hosts:
{{- range required "A value is required for .Values.applicationConfig.profiling.hostnames" .Values.applicationConfig.profiling.hostnames }}
- {{ . -}}
{{ end }}
secretName: {{ include "armada.name" $root }}-profiling-service-tls
---
{{- end }}

19 changes: 19 additions & 0 deletions deployment/armada/templates/profiling-service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{{- if and .Values.applicationConfig.profiling .Values.applicationConfig.profiling.port }}
apiVersion: v1
kind: Service
metadata:
name: {{ include "armada.name" . }}-server-profiling
namespace: {{ .Release.Namespace }}
labels:
{{- include "armada.labels.all" . | nindent 4 }}
name: {{ include "armada.name" . }}-profiling
spec:
selector:
app: {{ include "armada.name" . }}
ports:
- name: profiling
protocol: TCP
port: {{ .Values.applicationConfig.profiling.port }}
---
{{- end }}

2 changes: 1 addition & 1 deletion deployment/binoculars/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ spec:
{{- if and .Values.applicationConfig.profiling .Values.applicationConfig.profiling.port }}
- containerPort: {{ .Values.applicationConfig.profiling.port }}
protocol: TCP
name: pprof
name: profiling
{{- end }}
volumeMounts:
- name: user-config
Expand Down
35 changes: 35 additions & 0 deletions deployment/binoculars/templates/profiling-ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{{- if and .Values.applicationConfig.profiling .Values.applicationConfig.profiling.hostnames }}
{{- $root := . -}}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ include "binoculars.name" . }}-profiling
namespace: {{ .Release.Namespace }}
annotations:
certmanager.k8s.io/cluster-issuer: {{ required "A value is required for .Values.applicationConfig.profiling.clusterIssuer" .Values.applicationConfig.profiling.clusterIssuer }}
cert-manager.io/cluster-issuer: {{ required "A value is required for .Values.applicationConfig.profiling.clusterIssuer" .Values.applicationConfig.profiling.clusterIssuer }}
labels:
{{- include "binoculars.labels.all" . | nindent 4 }}
spec:
rules:
{{- range required "A value is required for .Values.applicationConfig.profiling.hostnames" .Values.applicationConfig.profiling.hostnames }}
- host: {{ . }}
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: {{ include "binoculars.name" $root }}-profiling
port:
number: {{ $root.Values.applicationConfig.profiling.port }}
{{ end -}}
tls:
- hosts:
{{- range required "A value is required for .Values.applicationConfig.profiling.hostnames" .Values.applicationConfig.profiling.hostnames }}
- {{ . -}}
{{ end }}
secretName: {{ include "binoculars.name" $root }}-profiling-service-tls
---
{{- end }}

19 changes: 19 additions & 0 deletions deployment/binoculars/templates/profiling-service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{{- if and .Values.applicationConfig.profiling .Values.applicationConfig.profiling.port }}
apiVersion: v1
kind: Service
metadata:
name: {{ include "binoculars.name" . }}-profiling
namespace: {{ .Release.Namespace }}
labels:
{{- include "binoculars.labels.all" . | nindent 4 }}
name: {{ include "binoculars.name" . }}-profiling
spec:
selector:
app: {{ include "binoculars.name" . }}
ports:
- name: profiling
protocol: TCP
port: {{ .Values.applicationConfig.profiling.port }}
---
{{- end }}

2 changes: 1 addition & 1 deletion deployment/event-ingester/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ spec:
{{- if and .Values.applicationConfig.profiling .Values.applicationConfig.profiling.port }}
- containerPort: {{ .Values.applicationConfig.profiling.port }}
protocol: TCP
name: pprof
name: profiling
{{- end }}
- containerPort: {{ .Values.applicationConfig.metricsPort }}
protocol: TCP
Expand Down
35 changes: 35 additions & 0 deletions deployment/event-ingester/templates/profiling-ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{{- if and .Values.applicationConfig.profiling .Values.applicationConfig.profiling.hostnames }}
{{- $root := . -}}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ include "event_ingester.name" . }}-profiling
namespace: {{ .Release.Namespace }}
annotations:
certmanager.k8s.io/cluster-issuer: {{ required "A value is required for .Values.applicationConfig.profiling.clusterIssuer" .Values.applicationConfig.profiling.clusterIssuer }}
cert-manager.io/cluster-issuer: {{ required "A value is required for .Values.applicationConfig.profiling.clusterIssuer" .Values.applicationConfig.profiling.clusterIssuer }}
labels:
{{- include "event_ingester.labels.all" . | nindent 4 }}
spec:
rules:
{{- range required "A value is required for .Values.applicationConfig.profiling.hostnames" .Values.applicationConfig.profiling.hostnames }}
- host: {{ . }}
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: {{ include "event_ingester.name" $root }}-profiling
port:
number: {{ $root.Values.applicationConfig.profiling.port }}
{{ end -}}
tls:
- hosts:
{{- range required "A value is required for .Values.applicationConfig.profiling.hostnames" .Values.applicationConfig.profiling.hostnames }}
- {{ . -}}
{{ end }}
secretName: {{ include "event_ingester.name" $root }}-profiling-service-tls
---
{{- end }}

19 changes: 19 additions & 0 deletions deployment/event-ingester/templates/profiling-service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{{- if and .Values.applicationConfig.profiling .Values.applicationConfig.profiling.port }}
apiVersion: v1
kind: Service
metadata:
name: {{ include "event_ingester.name" . }}-profiling
namespace: {{ .Release.Namespace }}
labels:
{{- include "event_ingester.labels.all" . | nindent 4 }}
name: {{ include "event_ingester.name" . }}-profiling
spec:
selector:
app: {{ include "event_ingester.name" . }}
ports:
- name: profiling
protocol: TCP
port: {{ .Values.applicationConfig.profiling.port }}
---
{{- end }}

2 changes: 1 addition & 1 deletion deployment/executor/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ spec:
{{- if and .Values.applicationConfig.profiling .Values.applicationConfig.profiling.port }}
- containerPort: {{ .Values.applicationConfig.profiling.port }}
protocol: TCP
name: pprof
name: profiling
{{- end }}
volumeMounts:
- name: user-config
Expand Down
35 changes: 35 additions & 0 deletions deployment/executor/templates/profiling-ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{{- if and .Values.applicationConfig.profiling .Values.applicationConfig.profiling.hostnames }}
{{- $root := . -}}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ include "executor.name" . }}-profiling
namespace: {{ .Release.Namespace }}
annotations:
certmanager.k8s.io/cluster-issuer: {{ required "A value is required for .Values.applicationConfig.profiling.clusterIssuer" .Values.applicationConfig.profiling.clusterIssuer }}
cert-manager.io/cluster-issuer: {{ required "A value is required for .Values.applicationConfig.profiling.clusterIssuer" .Values.applicationConfig.profiling.clusterIssuer }}
labels:
{{- include "executor.labels.all" . | nindent 4 }}
spec:
rules:
{{- range required "A value is required for .Values.applicationConfig.profiling.hostnames" .Values.applicationConfig.profiling.hostnames }}
- host: {{ . }}
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: {{ include "executor.name" $root }}-profiling
port:
number: {{ $root.Values.applicationConfig.profiling.port }}
{{ end -}}
tls:
- hosts:
{{- range required "A value is required for .Values.applicationConfig.profiling.hostnames" .Values.applicationConfig.profiling.hostnames }}
- {{ . -}}
{{ end }}
secretName: {{ include "executor.name" $root }}-profiling-service-tls
---
{{- end }}

19 changes: 19 additions & 0 deletions deployment/executor/templates/profiling-service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{{- if and .Values.applicationConfig.profiling .Values.applicationConfig.profiling.port }}
apiVersion: v1
kind: Service
metadata:
name: {{ include "executor.name" . }}-profiling
namespace: {{ .Release.Namespace }}
labels:
{{- include "executor.labels.all" . | nindent 4 }}
name: {{ include "executor.name" . }}-profiling
spec:
selector:
app: {{ include "executor.name" . }}
ports:
- name: profiling
protocol: TCP
port: {{ .Values.applicationConfig.profiling.port }}
---
{{- end }}

2 changes: 1 addition & 1 deletion deployment/lookout-ingester-v2/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ spec:
{{- if and .Values.applicationConfig.profiling .Values.applicationConfig.profiling.port }}
- containerPort: {{ .Values.applicationConfig.profiling.port }}
protocol: TCP
name: pprof
name: profiling
{{- end }}
- containerPort: {{ .Values.applicationConfig.metricsPort }}
protocol: TCP
Expand Down
35 changes: 35 additions & 0 deletions deployment/lookout-ingester-v2/templates/profiling-ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{{- if and .Values.applicationConfig.profiling .Values.applicationConfig.profiling.hostnames }}
{{- $root := . -}}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ include "lookout_ingester_v2.name" . }}-profiling
namespace: {{ .Release.Namespace }}
annotations:
certmanager.k8s.io/cluster-issuer: {{ required "A value is required for .Values.applicationConfig.profiling.clusterIssuer" .Values.applicationConfig.profiling.clusterIssuer }}
cert-manager.io/cluster-issuer: {{ required "A value is required for .Values.applicationConfig.profiling.clusterIssuer" .Values.applicationConfig.profiling.clusterIssuer }}
labels:
{{- include "lookout_ingester_v2.labels.all" . | nindent 4 }}
spec:
rules:
{{- range required "A value is required for .Values.applicationConfig.profiling.hostnames" .Values.applicationConfig.profiling.hostnames }}
- host: {{ . }}
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: {{ include "lookout_ingester_v2.name" $root }}-profiling
port:
number: {{ $root.Values.applicationConfig.profiling.port }}
{{ end -}}
tls:
- hosts:
{{- range required "A value is required for .Values.applicationConfig.profiling.hostnames" .Values.applicationConfig.profiling.hostnames }}
- {{ . -}}
{{ end }}
secretName: {{ include "lookout_ingester_v2.name" $root }}-profiling-service-tls
---
{{- end }}

19 changes: 19 additions & 0 deletions deployment/lookout-ingester-v2/templates/profiling-service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{{- if and .Values.applicationConfig.profiling .Values.applicationConfig.profiling.port }}
apiVersion: v1
kind: Service
metadata:
name: {{ include "lookout_ingester_v2.name" . }}-profiling
namespace: {{ .Release.Namespace }}
labels:
{{- include "lookout_ingester_v2.labels.all" . | nindent 4 }}
name: {{ include "lookout_ingester_v2.name" . }}-profiling
spec:
selector:
app: {{ include "lookout_ingester_v2.name" . }}
ports:
- name: profiling
protocol: TCP
port: {{ .Values.applicationConfig.profiling.port }}
---
{{- end }}

2 changes: 1 addition & 1 deletion deployment/lookout-v2/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ spec:
{{- if and .Values.applicationConfig.profiling .Values.applicationConfig.profiling.port }}
- containerPort: {{ .Values.applicationConfig.profiling.port }}
protocol: TCP
name: pprof
name: profiling
{{- end }}
- containerPort: {{ .Values.applicationConfig.metricsPort }}
protocol: TCP
Expand Down
35 changes: 35 additions & 0 deletions deployment/lookout-v2/templates/profiling-ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{{- if and .Values.applicationConfig.profiling .Values.applicationConfig.profiling.hostnames }}
{{- $root := . -}}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ include "lookout_v2.name" . }}-profiling
namespace: {{ .Release.Namespace }}
annotations:
certmanager.k8s.io/cluster-issuer: {{ required "A value is required for .Values.applicationConfig.profiling.clusterIssuer" .Values.applicationConfig.profiling.clusterIssuer }}
cert-manager.io/cluster-issuer: {{ required "A value is required for .Values.applicationConfig.profiling.clusterIssuer" .Values.applicationConfig.profiling.clusterIssuer }}
labels:
{{- include "lookout_v2.labels.all" . | nindent 4 }}
spec:
rules:
{{- range required "A value is required for .Values.applicationConfig.profiling.hostnames" .Values.applicationConfig.profiling.hostnames }}
- host: {{ . }}
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: {{ include "lookout_v2.name" $root }}-profiling
port:
number: {{ $root.Values.applicationConfig.profiling.port }}
{{ end -}}
tls:
- hosts:
{{- range required "A value is required for .Values.applicationConfig.profiling.hostnames" .Values.applicationConfig.profiling.hostnames }}
- {{ . -}}
{{ end }}
secretName: {{ include "lookout_v2.name" $root }}-profiling-service-tls
---
{{- end }}

19 changes: 19 additions & 0 deletions deployment/lookout-v2/templates/profiling-service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{{- if and .Values.applicationConfig.profiling .Values.applicationConfig.profiling.port }}
apiVersion: v1
kind: Service
metadata:
name: {{ include "lookout_v2.name" . }}-profiling
namespace: {{ .Release.Namespace }}
labels:
{{- include "lookout_v2.labels.all" . | nindent 4 }}
name: {{ include "lookout_v2.name" . }}-profiling
spec:
selector:
app: {{ include "lookout_v2.name" . }}
ports:
- name: profiling
protocol: TCP
port: {{ .Values.applicationConfig.profiling.port }}
---
{{- end }}

Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ metadata:
spec:
selector:
app: {{ include "armada-scheduler.name" . }}-ingester
{{- include "armada-scheduler-ingester.labels.all" . | nindent 4 }}
ports:
- name: profiling
protocol: TCP
Expand Down
Loading

0 comments on commit bf3ba99

Please sign in to comment.