Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install PodDistruptionBudgets when replica greater than 1 #1509

Open
wants to merge 27 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
30f262c
feat: add JOBSERVICE_WEBHOOK_JOB_MAX_RETRY and JOBSERVICE_WEBHOOK_JOB…
Mar 22, 2023
45881e8
feat: add configmap checksum annotation for portal
geneliu Mar 17, 2023
b7a24d6
feat: add config of reaper.max_update_hours & reaper.max_dangling_hours
Apr 17, 2023
4758272
extraEnvVars for all workloads
jouve Apr 11, 2023
46f67fb
feat: add podLabels
boniek83 Apr 19, 2023
5b76956
Update logo path to main for new releases
Apr 7, 2023
7a9bcca
Update README.md (#1488)
Vad1mo May 19, 2023
363710d
Allow `CONFIG_OVERWRITE_JSON` to be set in values file (#1147)
PhilipNelson5 May 19, 2023
16e1d08
feat: remove notary
May 16, 2023
2d87984
fix: add github-ghcr to the list of PERMITTED_REGISTRY_TYPES_FOR_PROX…
May 12, 2023
1374b17
Add TLS 1.3 support for harbor-nginx
kariya-mitsuru May 12, 2023
36ee315
Add TLS 1.3 support for harbor-portal
kariya-mitsuru May 18, 2023
93092f8
Fix incorrect comment on values.yaml
arjungandhi May 28, 2023
21b8211
Add tls checksum
Jun 26, 2023
a20d33c
Allow user to set topologySpreadConstraints
Sep 21, 2022
94d71ed
Fix #1127 - remove capabilities check for prometheus
sudermanjr Jun 19, 2023
f5b1043
feat: add pdb
MarcHenriotMMS Jul 12, 2023
fce0169
feat: add pdb
MarcHenriotMMS Jul 12, 2023
62f997c
fix: set podDisruptionBudget.enabled to false
MarcHenriotMMS Jul 12, 2023
188921f
Merge branch 'master' into master
rgarcia89 Jul 21, 2023
b79f2a2
fix: add matchLabels in spec.selector in all pdb
MarcHenriot Aug 2, 2023
5b153f7
feat: add pdb to exporter
MarcHenriot Aug 2, 2023
deff5f2
Merge branch 'goharbor:master' into master
rgarcia89 Aug 3, 2023
b17fd7f
Merge pull request #2 from MarcHenriot/master
rgarcia89 Aug 3, 2023
9c0e526
Merge branch 'goharbor:main' into master
rgarcia89 Jan 3, 2024
674218e
Merge branch 'main' into master
rgarcia89 Oct 8, 2024
d1fe949
Merge branch 'goharbor:main' into master
rgarcia89 Dec 5, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions templates/core/core-pdb.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{{- if and .Values.core.podDisruptionBudget.enabled (gt (int .Values.core.replicas) 1) }}
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: {{ template "harbor.core" . }}
labels:
{{ include "harbor.labels" . | indent 4 }}
spec:
{{- if .Values.core.podDisruptionBudget.minAvailable }}
minAvailable: {{ .Values.core.podDisruptionBudget.minAvailable }}
{{- end }}
{{- if .Values.core.podDisruptionBudget.maxUnavailable }}
maxUnavailable: {{ .Values.core.podDisruptionBudget.maxUnavailable }}
{{- end }}
selector:
matchLabels:
{{ include "harbor.matchLabels" . | indent 6 }}
component: core
{{- end }}
19 changes: 19 additions & 0 deletions templates/exporter/exporter-pdb.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{{- if and .Values.exporter.podDisruptionBudget.enabled (gt (int .Values.exporter.replicas) 1) }}
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: {{ template "harbor.exporter" . }}
labels:
{{ include "harbor.labels" . | indent 4 }}
spec:
{{- if .Values.exporter.podDisruptionBudget.minAvailable }}
minAvailable: {{ .Values.exporter.podDisruptionBudget.minAvailable }}
{{- end }}
{{- if .Values.exporter.podDisruptionBudget.maxUnavailable }}
maxUnavailable: {{ .Values.exporter.podDisruptionBudget.maxUnavailable }}
{{- end }}
selector:
matchLabels:
{{ include "harbor.matchLabels" . | indent 6 }}
component: exporter
{{- end }}
19 changes: 19 additions & 0 deletions templates/jobservice/jobservice-pdb.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{{- if and .Values.jobservice.podDisruptionBudget.enabled (gt (int .Values.jobservice.replicas) 1) }}
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: {{ template "harbor.jobservice" . }}
labels:
{{ include "harbor.labels" . | indent 4 }}
spec:
{{- if .Values.jobservice.podDisruptionBudget.minAvailable }}
minAvailable: {{ .Values.jobservice.podDisruptionBudget.minAvailable }}
{{- end }}
{{- if .Values.jobservice.podDisruptionBudget.maxUnavailable }}
maxUnavailable: {{ .Values.jobservice.podDisruptionBudget.maxUnavailable }}
{{- end }}
selector:
matchLabels:
{{ include "harbor.matchLabels" . | indent 6 }}
component: jobservice
{{- end }}
19 changes: 19 additions & 0 deletions templates/nginx/nginx-pdb.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{{- if and .Values.nginx.podDisruptionBudget.enabled (gt (int .Values.nginx.replicas) 1) }}
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: {{ template "harbor.nginx" . }}
labels:
{{ include "harbor.labels" . | indent 4 }}
spec:
{{- if .Values.nginx.podDisruptionBudget.minAvailable }}
minAvailable: {{ .Values.nginx.podDisruptionBudget.minAvailable }}
{{- end }}
{{- if .Values.nginx.podDisruptionBudget.maxUnavailable }}
maxUnavailable: {{ .Values.nginx.podDisruptionBudget.maxUnavailable }}
{{- end }}
selector:
matchLabels:
{{ include "harbor.matchLabels" . | indent 6 }}
component: nginx
{{- end }}
19 changes: 19 additions & 0 deletions templates/portal/portal-pdb.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{{- if and .Values.portal.podDisruptionBudget.enabled (gt (int .Values.portal.replicas) 1) }}
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: {{ template "harbor.portal" . }}
labels:
{{ include "harbor.labels" . | indent 4 }}
spec:
{{- if .Values.portal.podDisruptionBudget.minAvailable }}
minAvailable: {{ .Values.portal.podDisruptionBudget.minAvailable }}
{{- end }}
{{- if .Values.portal.podDisruptionBudget.maxUnavailable }}
maxUnavailable: {{ .Values.portal.podDisruptionBudget.maxUnavailable }}
{{- end }}
selector:
matchLabels:
{{ include "harbor.matchLabels" . | indent 6 }}
component: portal
{{- end }}
19 changes: 19 additions & 0 deletions templates/registry/registry-pdb.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{{- if and .Values.registry.podDisruptionBudget.enabled (gt (int .Values.registry.replicas) 1) }}
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: {{ template "harbor.registry" . }}
labels:
{{ include "harbor.labels" . | indent 4 }}
spec:
{{- if .Values.registry.podDisruptionBudget.minAvailable }}
minAvailable: {{ .Values.registry.podDisruptionBudget.minAvailable }}
{{- end }}
{{- if .Values.registry.podDisruptionBudget.maxUnavailable }}
maxUnavailable: {{ .Values.registry.podDisruptionBudget.maxUnavailable }}
{{- end }}
selector:
matchLabels:
{{ include "harbor.matchLabels" . | indent 6 }}
component: registry
{{- end }}
19 changes: 19 additions & 0 deletions templates/trivy/trivy-pdb.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{{- if and .Values.trivy.podDisruptionBudget.enabled (gt (int .Values.trivy.replicas) 1) }}
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: {{ template "harbor.trivy" . }}
labels:
{{ include "harbor.labels" . | indent 4 }}
spec:
{{- if .Values.trivy.podDisruptionBudget.minAvailable }}
minAvailable: {{ .Values.trivy.podDisruptionBudget.minAvailable }}
{{- end }}
{{- if .Values.trivy.podDisruptionBudget.maxUnavailable }}
maxUnavailable: {{ .Values.trivy.podDisruptionBudget.maxUnavailable }}
{{- end }}
selector:
matchLabels:
{{ include "harbor.matchLabels" . | indent 6 }}
component: trivy
{{- end }}
32 changes: 32 additions & 0 deletions values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,10 @@ nginx:
# mount the service account token
automountServiceAccountToken: false
replicas: 1
podDisruptionBudget:
enabled: false
minAvailable: 1
# maxUnavailable: 1
revisionHistoryLimit: 10
# resources:
# requests:
Expand Down Expand Up @@ -520,6 +524,10 @@ portal:
# mount the service account token
automountServiceAccountToken: false
replicas: 1
podDisruptionBudget:
enabled: false
minAvailable: 1
# maxUnavailable: 1
revisionHistoryLimit: 10
# resources:
# requests:
Expand Down Expand Up @@ -560,6 +568,10 @@ core:
# mount the service account token
automountServiceAccountToken: false
replicas: 1
podDisruptionBudget:
enabled: false
minAvailable: 1
# maxUnavailable: 1
revisionHistoryLimit: 10
## Startup probe values
startupProbe:
Expand Down Expand Up @@ -644,6 +656,13 @@ jobservice:
image:
repository: goharbor/harbor-jobservice
tag: dev
replicas: 1
podDisruptionBudget:
enabled: false
minAvailable: 1
# maxUnavailable: 1
revisionHistoryLimit: 10

# set the service account to be used, default if left empty
serviceAccountName: ""
# mount the service account token
Expand Down Expand Up @@ -726,6 +745,10 @@ registry:
# mount the service account token
automountServiceAccountToken: false
replicas: 1
podDisruptionBudget:
enabled: false
minAvailable: 1
# maxUnavailable: 1
revisionHistoryLimit: 10
nodeSelector: {}
tolerations: []
Expand Down Expand Up @@ -803,6 +826,11 @@ trivy:
automountServiceAccountToken: false
# replicas the number of Pod replicas
replicas: 1
podDisruptionBudget:
enabled: false
minAvailable: 1
# maxUnavailable: 1

resources:
requests:
cpu: 200m
Expand Down Expand Up @@ -1036,6 +1064,10 @@ exporter:
# mount the service account token
automountServiceAccountToken: false
replicas: 1
podDisruptionBudget:
enabled: false
minAvailable: 1
# maxUnavailable: 1
revisionHistoryLimit: 10
# resources:
# requests:
Expand Down
Loading