Skip to content

Commit

Permalink
Merge pull request #4 from ethpandaops/feat/add-cloudflare-tunnel-pdb
Browse files Browse the repository at this point in the history
feat(cloudflare-tunnel): Add PDB
  • Loading branch information
samcm authored Nov 23, 2023
2 parents 1daa329 + 1441d04 commit cb7d65d
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 2 deletions.
2 changes: 1 addition & 1 deletion charts/cloudflare-tunnel/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: cloudflare-tunnel
description: Creation of a cloudflared deployment - a reverse tunnel for an environment
type: application
version: 0.1.3
version: 0.2.0
icon: https://developers.cloudflare.com/cloudflare-one/favicon-32x32.png
maintainers:
- name: barnabasbusa
Expand Down
3 changes: 2 additions & 1 deletion charts/cloudflare-tunnel/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# cloudflare-tunnel

![Version: 0.1.3](https://img.shields.io/badge/Version-0.1.3-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)
![Version: 0.2.0](https://img.shields.io/badge/Version-0.2.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)

Creation of a cloudflared deployment - a reverse tunnel for an environment

Expand All @@ -24,6 +24,7 @@ Creation of a cloudflared deployment - a reverse tunnel for an environment
| nameOverride | string | `""` | |
| nodeSelector | object | `{}` | |
| podAnnotations | object | `{}` | |
| podDisruptionBudget | object | `{"minAvailable":1}` | Define the PodDisruptionBudget spec If not set then a PodDisruptionBudget will not be created |
| podSecurityContext.runAsNonRoot | bool | `true` | |
| podSecurityContext.runAsUser | int | `65532` | |
| replicaCount | int | `2` | |
Expand Down
18 changes: 18 additions & 0 deletions charts/cloudflare-tunnel/templates/pdb.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{{- if or .Values.podDisruptionBudget.minAvailable .Values.podDisruptionBudget.maxUnavailable -}}
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: {{ include "cloudflare-tunnel.fullname" . }}
labels:
{{- include "cloudflare-tunnel.labels" . | nindent 4 }}
spec:
selector:
matchLabels:
{{- include "cloudflare-tunnel.selectorLabels" . | nindent 6 }}
{{- if .Values.podDisruptionBudget.minAvailable }}
minAvailable: {{ .Values.podDisruptionBudget.minAvailable }}
{{- end }}
{{- if .Values.podDisruptionBudget.maxUnavailable }}
maxUnavailable: {{ .Values.podDisruptionBudget.maxUnavailable }}
{{- end }}
{{- end -}}
6 changes: 6 additions & 0 deletions charts/cloudflare-tunnel/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,9 @@ tolerations: []

# Default affinity is to spread out over nodes; use this to override.
affinity: {}

# -- Define the PodDisruptionBudget spec
# If not set then a PodDisruptionBudget will not be created
podDisruptionBudget:
minAvailable: 1
# maxUnavailable: 1

0 comments on commit cb7d65d

Please sign in to comment.