Skip to content

Commit

Permalink
Merge pull request #36 from relu/service-annotations
Browse files Browse the repository at this point in the history
Add support for configuring and overriding various settings
  • Loading branch information
MaikuMori committed Jun 5, 2024
2 parents 4a56154 + 5b6107c commit bad180b
Show file tree
Hide file tree
Showing 8 changed files with 76 additions and 2 deletions.
8 changes: 8 additions & 0 deletions charts/gotenberg/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 1.4.0

- Add ability to create and configure `PodDisruptionBudget` (Thanks to Aurel Canciu | [@relu](https://github.com/relu))
- Add ability to configure Deployment `topologySpreadConstraints` (Thanks to Aurel Canciu | [@relu](https://github.com/relu))
- Add ability to override Deployment `progressDeadlineSeconds` (Thanks to Aurel Canciu | [@relu](https://github.com/relu))
- Add ability to configure Deployment `strategy` (Thanks to Aurel Canciu | [@relu](https://github.com/relu))
- Add ability to set Service `annotations` (Thanks to Aurel Canciu | [@relu](https://github.com/relu))

## 1.3.0

- Add `securityContext` compatibility with OpenShift platform. (Thanks to Jonas Geiler | [@jonasgeiler](https://github.com/jonasgeiler))
Expand Down
2 changes: 1 addition & 1 deletion charts/gotenberg/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,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.3.0"
version: "1.4.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
10 changes: 9 additions & 1 deletion charts/gotenberg/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Gotenberg

[![Artifact Hub](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/gotenberg)](https://artifacthub.io/packages/helm/maikumori/gotenberg)
![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: 8.5.1](https://img.shields.io/badge/AppVersion-8.5.1-informational?style=flat-square)
![Version: 1.4.0](https://img.shields.io/badge/Version-1.4.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 8.5.1](https://img.shields.io/badge/AppVersion-8.5.1-informational?style=flat-square)

This is a HELM chart for Gotenberg.

Expand Down Expand Up @@ -99,24 +99,32 @@ helm upgrade my-release maikumori/gotenberg --install
| logging.level | string | `""` | Set the log level - error, warn, info, or debug (default "info") |
| nameOverride | string | `""` | |
| nodeSelector | object | `{}` | |
| pdb.create | bool | `false` | |
| pdb.maxUnavailable | string | `""` | |
| pdb.minAvailable | int | `1` | |
| pdb.unhealthyPodEvictionPolicy | string | `nil` | This is a beta feature, so it's not enabled by default. |
| pdfEngines.disableRoutes | bool | `false` | Disable the routes |
| pdfEngines.engines | string | `""` | Set the PDF engines and their order - all by default |
| podAnnotations | object | `{}` | |
| podLabels | object | `{}` | List of additional pod labels |
| podSecurityContext | object | `{}` | |
| progressDeadlineSeconds | int | `120` | |
| prometheus.collectInterval | string | `""` | Set the interval for collecting modules' metrics (default 1s) |
| prometheus.disableCollect | bool | `false` | Disable the collect of metrics |
| prometheus.disableRouterLogging | bool | `false` | Disable the route logging |
| prometheus.namespace | string | `""` | Set the namespace of modules' metrics (default "gotenberg") |
| replicaCount | int | `1` | |
| resources | object | `{}` | |
| securityContext | object | `{ privileged: false, runAsUser: 1001 }`, except in OpenShift where `runAsUser` is not set. | Define the security context for the container. By default will use upstream recommended values. |
| service.annotations | object | `{}` | Annotations to add to the service |
| service.port | int | `80` | |
| service.type | string | `"ClusterIP"` | |
| serviceAccount.annotations | object | `{}` | Annotations to add to the service account |
| serviceAccount.create | bool | `false` | Specifies whether a service account should be created |
| serviceAccount.name | string | `""` | The name of the service account to use. # If not set and create is true, a name is generated using the fullname template |
| strategy | object | `{}` | |
| tolerations | list | `[]` | |
| topologySpreadConstraints | list | `[]` | |
| volumeMounts | list | `[]` | |
| volumes | list | `[]` | |
| webhook.allowList | string | `""` | Set the allowed URLs for the webhook feature using a regular expression |
Expand Down
9 changes: 9 additions & 0 deletions charts/gotenberg/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ spec:
{{- if not .Values.autoscaling.enabled }}
replicas: {{ .Values.replicaCount }}
{{- end }}
{{- with .Values.strategy }}
strategy:
{{- toYaml . | nindent 4 }}
{{- end }}
progressDeadlineSeconds: {{ .Values.progressDeadlineSeconds }}
selector:
matchLabels:
{{- include "gotenberg.selectorLabels" . | nindent 6 }}
Expand Down Expand Up @@ -220,6 +225,10 @@ spec:
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.topologySpreadConstraints }}
topologySpreadConstraints:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.volumes }}
volumes:
{{- toYaml . | nindent 8 }}
Expand Down
21 changes: 21 additions & 0 deletions charts/gotenberg/templates/pdb.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{{- if .Values.pdb.create -}}
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: {{ include "gotenberg.fullname" . }}
labels:
{{- include "gotenberg.labels" . | nindent 4 }}
spec:
selector:
matchLabels:
{{- include "gotenberg.selectorLabels" . | nindent 6 }}
{{- if .Values.pdb.minAvailable }}
minAvailable: {{ .Values.pdb.minAvailable }}
{{- end }}
{{- if .Values.pdb.maxUnavailable }}
maxUnavailable: {{ .Values.pdb.maxUnavailable }}
{{- end }}
{{- if .Values.pdb.unhealthyPodEvictionPolicy }}
unhealthyPodEvictionPolicy: {{ .Values.pdb.unhealthyPodEvictionPolicy }}
{{- end }}
{{- end }}
4 changes: 4 additions & 0 deletions charts/gotenberg/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ metadata:
name: {{ include "gotenberg.fullname" . }}
labels:
{{- include "gotenberg.labels" . | nindent 4 }}
{{- with .Values.service.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
type: {{ .Values.service.type }}
ports:
Expand Down
17 changes: 17 additions & 0 deletions charts/gotenberg/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,14 @@ securityContext:
service:
type: ClusterIP
port: 80
# -- Annotations to add to the service
annotations: {}

# Strategy is utilized to configure the desired upgrade approach and
# configuration for the deployment.
strategy: {}

progressDeadlineSeconds: 120

resources:
{}
Expand All @@ -61,12 +69,21 @@ autoscaling:
targetCPUUtilizationPercentage: 80
# targetMemoryUtilizationPercentage: 80

pdb:
create: false
minAvailable: 1
maxUnavailable: ""
# -- This is a beta feature, so it's not enabled by default.
unhealthyPodEvictionPolicy:

nodeSelector: {}

tolerations: []

affinity: {}

topologySpreadConstraints: []

volumes: []
# - name: tmp-volume
# emptyDir:
Expand Down
7 changes: 7 additions & 0 deletions ci-values.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
pdb:
create: true
minAvailable: 1
maxUnavailable: ""
# This is a beta feature, so it's not enabled by default.
unhealthyPodEvictionPolicy:

serviceAccount:
create: true

Expand Down

0 comments on commit bad180b

Please sign in to comment.