Skip to content

Commit

Permalink
feat(gotenberg): VPA and PDB (#35) (#36)
Browse files Browse the repository at this point in the history
Co-authored-by: Zhelyan <[email protected]>
  • Loading branch information
Kurt108 and zhelyan authored Oct 19, 2021
1 parent d852b47 commit 2d98772
Show file tree
Hide file tree
Showing 6 changed files with 59 additions and 4 deletions.
2 changes: 1 addition & 1 deletion charts/gotenberg/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ appVersion: "7.0.3"
description: Gotenberg is a Docker-powered stateless API for converting HTML, Markdown and Office documents to PDF.
name: gotenberg
icon: https://user-images.githubusercontent.com/8983173/69229423-ac731300-0b85-11ea-8c2e-2cc00ecdb269.PNG
version: 4.0.6
version: 5.0.0
home: https://thecodingmachine.github.io/gotenberg/
sources:
- https://github.com/thecodingmachine/gotenberg
Expand Down
9 changes: 7 additions & 2 deletions charts/gotenberg/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# gotenberg

Gotenberg is a Docker-powered stateless API for converting HTML, Markdown and Office documents to PDF.
4.0.6
5.0.0
[![Artifact HUB](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/kurt108)](https://artifacthub.io/packages/search?repo=kurt108)

=======
Expand All @@ -11,6 +11,7 @@ Gotenberg is a Docker-powered stateless API for converting HTML, Markdown and Of
* 2.x: Gotenberg 6
* 3.x: Gotenberg 7, K8s Version >=1.19
* 4.x: Gotenberg 7, Fixed Ingress Warnings
* 5.x: Gotenberg 7, PDB and VPA

## Installing the Chart

Expand Down Expand Up @@ -48,14 +49,18 @@ NAME: my-release
| image.tag | string | `"7.0.3"` | |
| ingress.annotations | object | `{}` | |
| ingress.className | string | `""` | |
| ingress.enabled | bool | `false` | |
| ingress.enabled | bool | `true` | |
| ingress.hosts[0].host | string | `"gotenberg.local"` | |
| ingress.hosts[0].paths[0].path | string | `"/"` | |
| ingress.hosts[0].paths[0].pathType | string | `"Prefix"` | |
| ingress.tls | list | `[]` | |
| nodeSelector | object | `{}` | |
| podDisruptionBudget.enabled | bool | `false` | |
| podDisruptionBudget.maxUnavailable | int | `1` | |
| replicaCount | int | `1` | |
| resources | object | `{}` | |
| service.port | int | `3000` | |
| service.type | string | `"ClusterIP"` | |
| tolerations | list | `[]` | |
| verticalAutoscaling.enabled | bool | `false` | |
| verticalAutoscaling.minAllowed | string | `"50m"` | |
1 change: 1 addition & 0 deletions charts/gotenberg/README.md.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
* 2.x: Gotenberg 6
* 3.x: Gotenberg 7, K8s Version >=1.19
* 4.x: Gotenberg 7, Fixed Ingress Warnings
* 5.x: Gotenberg 7, PDB and VPA

## Installing the Chart

Expand Down
18 changes: 18 additions & 0 deletions charts/gotenberg/templates/pdb.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{{- if .Values.podDisruptionBudget.enabled }}
---
apiVersion: policy/v1beta1
kind: PodDisruptionBudget
metadata:
name: {{ include "gotenberg.fullname" . }}
labels:
app: {{ template "gotenberg.name" . }}
chart: {{ template "gotenberg.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
selector:
matchLabels:
app: {{ template "gotenberg.name" . }}
release: {{ .Release.Name }}
maxUnavailable: {{ .Values.podDisruptionBudget.maxUnavailable }}
{{- end }}
23 changes: 23 additions & 0 deletions charts/gotenberg/templates/vpa.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{{- if .Values.verticalAutoscaling.enabled }}
apiVersion: autoscaling.k8s.io/v1
kind: VerticalPodAutoscaler
metadata:
name: {{ include "gotenberg.fullname" . }}
labels:
app: {{ template "gotenberg.name" . }}
chart: {{ template "gotenberg.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
targetRef:
apiVersion: apps/v1
kind: Deployment
name: {{ include "gotenberg.fullname" . }}
updatePolicy:
updateMode: Auto
resourcePolicy:
containerPolicies:
- containerName: {{ .Chart.Name }}
minAllowed:
cpu: {{ .Values.verticalAutoscaling.minAllowed }}
{{- end }}
10 changes: 9 additions & 1 deletion charts/gotenberg/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ basicAuth:

ingress:
enabled: true
className: ""
className: ""
annotations: {}
# kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true"
Expand Down Expand Up @@ -62,3 +62,11 @@ tolerations: []
affinity: {}

annotations: {}

verticalAutoscaling:
enabled: false
minAllowed: 50m

podDisruptionBudget:
enabled: false
maxUnavailable: 1

0 comments on commit 2d98772

Please sign in to comment.