Skip to content

Commit 704e65a

Browse files
Merge branch 'release-0.6.0' into CR-22965-argocd-2.10
2 parents 67be96e + e69dda2 commit 704e65a

File tree

8 files changed

+87
-3
lines changed

8 files changed

+87
-3
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,5 @@ output
1313

1414
# ignore local dev
1515
values-dev.yaml
16-
dry-run.yaml
16+
dry-run.yaml
17+
values-test.yaml

charts/gitops-runtime/Chart.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ annotations:
2020
description: "update codefresh-gitops-operator chart to 1.0.9 to handle promotions"
2121
- kind: changed
2222
description: "update cap-app-proxy to 1.2727.0 (exopse gitLog endpoint)"
23+
- kind: added
24+
description: "Add PDB templates for internal-router and app-proxy"
2325
dependencies:
2426
- name: argo-cd
2527
repository: oci://quay.io/codefresh/charts/dev

charts/gitops-runtime/README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
## Codefresh gitops runtime
2-
![Version: 0.5.2](https://img.shields.io/badge/Version-0.5.2-informational?style=flat-square) ![AppVersion: 0.1.44](https://img.shields.io/badge/AppVersion-0.1.44-informational?style=flat-square)
2+
![Version: 0.6.0](https://img.shields.io/badge/Version-0.6.0-informational?style=flat-square) ![AppVersion: 0.1.44](https://img.shields.io/badge/AppVersion-0.1.44-informational?style=flat-square)
33

44
## Prerequisites
55

@@ -27,7 +27,7 @@ We have created a helper utility to resolve this issue:
2727
The utility is packaged in a container image. Below are instructions on executing the utility using Docker:
2828

2929
```
30-
docker run -v <output_dir>:/output quay.io/codefresh/gitops-runtime-private-registry-utils:0.5.2 <local_registry>
30+
docker run -v <output_dir>:/output quay.io/codefresh/gitops-runtime-private-registry-utils:0.6.0 <local_registry>
3131
```
3232
`output_dir` - is a local directory where the utility will output files. <br>
3333
`local_registry` - is your local registry where you want to mirror the images to
@@ -119,6 +119,9 @@ sealed-secrets:
119119
| app-proxy.livenessProbe.timeoutSeconds | int | `10` | Number of seconds after which the [probe] times out. |
120120
| app-proxy.nameOverride | string | `""` | |
121121
| app-proxy.nodeSelector | object | `{}` | |
122+
| app-proxy.pdb.enabled | bool | `false` | Enable PDB |
123+
| app-proxy.pdb.maxUnavailable | string | `""` | Set number of pods that are unavailable after eviction as number or percentage |
124+
| app-proxy.pdb.minAvailable | int | `1` | Set number of pods that are available after eviction as number or percentage |
122125
| app-proxy.podAnnotations | object | `{}` | |
123126
| app-proxy.podLabels | object | `{}` | |
124127
| app-proxy.podSecurityContext | object | `{}` | |
@@ -306,6 +309,9 @@ sealed-secrets:
306309
| internal-router.imagePullSecrets | list | `[]` | |
307310
| internal-router.nameOverride | string | `""` | |
308311
| internal-router.nodeSelector | object | `{}` | |
312+
| internal-router.pdb.enabled | bool | `false` | Enable PDB |
313+
| internal-router.pdb.maxUnavailable | string | `""` | Set number of pods that are unavailable after eviction as number or percentage |
314+
| internal-router.pdb.minAvailable | int | `1` | Set number of pods that are available after eviction as number or percentage |
309315
| internal-router.podAnnotations | object | `{}` | |
310316
| internal-router.podLabels | object | `{}` | |
311317
| internal-router.podSecurityContext | object | `{}` | |
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{{- define "cap-app-proxy.resources.pdb" }}
2+
apiVersion: policy/v1
3+
kind: PodDisruptionBudget
4+
metadata:
5+
name: {{ include "cap-app-proxy.fullname" . }}
6+
labels:
7+
{{- include "cap-app-proxy.labels" . | nindent 4 }}
8+
spec:
9+
{{- if or .Values.pdb.minAvailable .Values.pdb.maxUnavailable }}
10+
{{- with .Values.pdb.minAvailable }}
11+
minAvailable: {{ . }}
12+
{{- end }}
13+
{{- with .Values.pdb.maxUnavailable }}
14+
maxUnavailable: {{ . }}
15+
{{- end }}
16+
{{- else }}
17+
{{- fail (printf "ERROR: pdb.minAvailable or pdb.maxUnavailable is required!" ) }}
18+
{{- end }}
19+
selector:
20+
matchLabels: {{- include "cap-app-proxy.selectorLabels" . | nindent 6 }}
21+
{{- end }}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{{- define "internal-router.resources.pdb" }}
2+
apiVersion: policy/v1
3+
kind: PodDisruptionBudget
4+
metadata:
5+
name: {{ include "internal-router.fullname" . }}
6+
labels:
7+
{{- include "internal-router.labels" . | nindent 4 }}
8+
spec:
9+
{{- if or .Values.pdb.minAvailable .Values.pdb.maxUnavailable }}
10+
{{- with .Values.pdb.minAvailable }}
11+
minAvailable: {{ . }}
12+
{{- end }}
13+
{{- with .Values.pdb.maxUnavailable }}
14+
maxUnavailable: {{ . }}
15+
{{- end }}
16+
{{- else }}
17+
{{- fail (printf "ERROR: pdb.minAvailable or pdb.maxUnavailable is required!" ) }}
18+
{{- end }}
19+
selector:
20+
matchLabels: {{- include "internal-router.selectorLabels" . | nindent 6 }}
21+
{{- end }}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{{- $appProxyContext := deepCopy . }}
2+
{{- $_ := set $appProxyContext "Values" (get .Values "app-proxy") }}
3+
{{- $_ := set $appProxyContext.Values "global" (get .Values "global") }}
4+
5+
{{- if $appProxyContext.Values.pdb.enabled }}
6+
{{- include "cap-app-proxy.resources.pdb" $appProxyContext }}
7+
{{- end }}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{{- $internalRouterContext := deepCopy . }}
2+
{{- $_ := set $internalRouterContext "Values" (get .Values "internal-router") }}
3+
{{- $_ := set $internalRouterContext.Values "global" (get .Values "global") }}
4+
5+
{{- if $internalRouterContext.Values.pdb.enabled }}
6+
{{- include "internal-router.resources.pdb" $internalRouterContext }}
7+
{{- end }}

charts/gitops-runtime/values.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -420,6 +420,16 @@ internal-router:
420420
dnsService: kube-dns
421421
dnsNamespace: kube-system
422422
clusterDomain: cluster.local
423+
424+
## Internal-Router Pod Disruption Budget
425+
pdb:
426+
# -- Enable PDB
427+
enabled: false
428+
# -- Set number of pods that are available after eviction as number or percentage
429+
minAvailable: 1
430+
# -- Set number of pods that are unavailable after eviction as number or percentage
431+
maxUnavailable: ""
432+
423433
#-----------------------------------------------------------------------------------------------------------------------
424434
# tunnel client
425435
#-----------------------------------------------------------------------------------------------------------------------
@@ -588,6 +598,15 @@ app-proxy:
588598
# -- extra volumes
589599
extraVolumes: []
590600

601+
## App-Proxy Pod Disruption Budget
602+
pdb:
603+
# -- Enable PDB
604+
enabled: false
605+
# -- Set number of pods that are available after eviction as number or percentage
606+
minAvailable: 1
607+
# -- Set number of pods that are unavailable after eviction as number or percentage
608+
maxUnavailable: ""
609+
591610
#-----------------------------------------------------------------------------------------------------------------------
592611
# gitops-operator
593612
#-----------------------------------------------------------------------------------------------------------------------

0 commit comments

Comments
 (0)