Skip to content

Commit

Permalink
Add metrics-api and web PDB. Install them only if replicas > 1.
Browse files Browse the repository at this point in the history
Signed-off-by: Matias Charriere <[email protected]>
  • Loading branch information
mcharriere committed Nov 17, 2023
1 parent 4f6d9e7 commit 90d630f
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 2 deletions.
21 changes: 21 additions & 0 deletions viz/charts/linkerd-viz/templates/metrics-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -123,3 +123,24 @@ spec:
seccompProfile:
type: RuntimeDefault
serviceAccountName: metrics-api
{{- if and .Values.enablePodDisruptionBudget (gt (int .Values.metricsAPI.replicas) 1) }}
---
kind: PodDisruptionBudget
apiVersion: policy/v1
metadata:
name: metrics-api
namespace: {{ .Release.Namespace }}
labels:
linkerd.io/extension: viz
component: metrics-api
namespace: {{.Release.Namespace}}
{{- with .Values.commonLabels }}{{ toYaml . | trim | nindent 4 }}{{- end }}
annotations:
{{ include "partials.annotations.created-by" . }}
spec:
maxUnavailable: 1
selector:
matchLabels:
linkerd.io/extension: viz
component: metrics-api
{{- end }}
2 changes: 1 addition & 1 deletion viz/charts/linkerd-viz/templates/tap-injector.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ spec:
- name: tls
secret:
secretName: tap-injector-k8s-tls
{{- if .Values.enablePodDisruptionBudget }}
{{- if and .Values.enablePodDisruptionBudget (gt (int .Values.tapInjector.replicas) 1) }}
---
kind: PodDisruptionBudget
apiVersion: policy/v1
Expand Down
2 changes: 1 addition & 1 deletion viz/charts/linkerd-viz/templates/tap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ spec:
- name: tls
secret:
secretName: tap-k8s-tls
{{- if .Values.enablePodDisruptionBudget }}
{{- if and .Values.enablePodDisruptionBudget (gt (int .Values.tap.replicas) 1) }}
---
kind: PodDisruptionBudget
apiVersion: policy/v1
Expand Down
21 changes: 21 additions & 0 deletions viz/charts/linkerd-viz/templates/web.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -139,3 +139,24 @@ spec:
seccompProfile:
type: RuntimeDefault
serviceAccountName: web
{{- if and .Values.enablePodDisruptionBudget (gt (int .Values.dashboard.replicas) 1) }}
---
kind: PodDisruptionBudget
apiVersion: policy/v1
metadata:
name: web
namespace: {{ .Release.Namespace }}
labels:
linkerd.io/extension: viz
component: web
namespace: {{.Release.Namespace}}
{{- with .Values.commonLabels }}{{ toYaml . | trim | nindent 4 }}{{- end }}
annotations:
{{ include "partials.annotations.created-by" . }}
spec:
maxUnavailable: 1
selector:
matchLabels:
linkerd.io/extension: viz
component: web
{{- end }}

0 comments on commit 90d630f

Please sign in to comment.