Skip to content

Commit

Permalink
Merge pull request #39 from energywebfoundation/add-pdb
Browse files Browse the repository at this point in the history
Add pdb
  • Loading branch information
michalziobro authored Mar 28, 2024
2 parents 35998b1 + f1d689d commit b462865
Show file tree
Hide file tree
Showing 11 changed files with 25 additions and 3 deletions.
2 changes: 2 additions & 0 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# global owners
* @energywebfoundation/ewf-devops
2 changes: 1 addition & 1 deletion Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 1.2.0
version: 1.3.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# generic-microservice-helm

![Version: 1.1.0](https://img.shields.io/badge/Version-1.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.16.0](https://img.shields.io/badge/AppVersion-1.16.0-informational?style=flat-square)
![Version: 1.3.0](https://img.shields.io/badge/Version-1.3.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.16.0](https://img.shields.io/badge/AppVersion-1.16.0-informational?style=flat-square)

Generic helm chart for Energy Web Foundation microservices

Expand Down Expand Up @@ -78,6 +78,8 @@ pre-commit install-hooks
| livenessProbe.timeoutSeconds | int | `10` | |
| nameOverride | string | `""` | |
| nodeSelector | object | `{}` | |
| pdb.enabled | bool | `false` | |
| pdb.minAvailable | int | `1` | |
| podAnnotations | object | `{}` | |
| podSecurityContext | object | `{}` | |
| pvc.accessModes | string | `"ReadWriteOnce"` | |
Expand All @@ -100,6 +102,7 @@ pre-commit install-hooks
| sealedSecret.enabled | bool | `false` | |
| sealedSecret.encryptedData | object | `{}` | |
| securityContext | object | `{}` | |
| service.portName | string | `""` | |
| service.ports[0].name | string | `"http"` | |
| service.ports[0].port | int | `80` | |
| service.type | string | `"ClusterIP"` | |
Expand Down
Binary file removed generic-microservice-helm-1.0.6.tgz
Binary file not shown.
Binary file removed microservice-1.0.0.tgz
Binary file not shown.
Binary file removed microservice-1.0.1.tgz
Binary file not shown.
Binary file removed microservice-1.0.2.tgz
Binary file not shown.
Binary file removed microservice-1.0.3.tgz
Binary file not shown.
13 changes: 13 additions & 0 deletions templates/pdb.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{{- if and .Values.pdb.enabled (gt .Values.replicaCount 1.0) -}}
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: {{ include "microservice.fullname" . }}
labels:
{{- include "microservice.labels" . | nindent 4 }}
spec:
minAvailable: {{ .Values.pdb.minAvailable }}
selector:
matchLabels:
{{- include "microservice.selectorLabels" . | nindent 6 }}
{{- end -}}
1 change: 0 additions & 1 deletion templates/pvc.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# dynamically provision volume
{{- if .Values.pvc.enabled }}
apiVersion: v1
kind: PersistentVolumeClaim
Expand Down
5 changes: 5 additions & 0 deletions values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@

replicaCount: 1

# Pod disruption budget will be created only if replicaCount > 1
pdb:
enabled: false
minAvailable: 1

deploymentStrategy: RollingUpdate

restartPolicy: Always
Expand Down

0 comments on commit b462865

Please sign in to comment.