From 32b1baee1f86b44ad56380a05d0d4b6da5a51fac Mon Sep 17 00:00:00 2001 From: Kurt <10924313+Kurt108@users.noreply.github.com> Date: Mon, 7 Mar 2022 10:32:28 +0100 Subject: [PATCH] create releases (#41) * feat(gotenberg): VPA and PDB (#35) * Add affinity support for Thumbor (#37) Co-authored-by: Andrew Shagun * Create CODE_OF_CONDUCT.md * doc(thumbor): fix readme (#40) * Gotenberg: Labels and selectors (#39) * feat(gotenberg): allow setting service labels * feat(gotenberg): use helm's selectorLabels * gotenberg: chart v5.1.0 Co-authored-by: Zhelyan Co-authored-by: Andrei Shahun Co-authored-by: Andrew Shagun --- CODE_OF_CONDUCT.md | 127 +++++++++++++++++++++ charts/gotenberg/Chart.yaml | 4 +- charts/gotenberg/README.md | 6 +- charts/gotenberg/templates/_helpers.tpl | 31 +++++ charts/gotenberg/templates/deployment.yaml | 14 +-- charts/gotenberg/templates/hpa.yaml | 1 + charts/gotenberg/templates/ingress.yaml | 7 +- charts/gotenberg/templates/pdb.yaml | 4 +- charts/gotenberg/templates/secrets.yaml | 2 +- charts/gotenberg/templates/service.yaml | 7 +- charts/gotenberg/templates/vpa.yaml | 1 + charts/gotenberg/values.yaml | 4 +- charts/thumbor/README.md | 2 +- 13 files changed, 186 insertions(+), 24 deletions(-) create mode 100644 CODE_OF_CONDUCT.md diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..f1fde49 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,127 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +We as members, contributors, and leaders pledge to make participation in our +community a harassment-free experience for everyone, regardless of age, body +size, visible or invisible disability, ethnicity, sex characteristics, gender +identity and expression, level of experience, education, socio-economic status, +nationality, personal appearance, race, religion, or sexual identity +and orientation. + +We pledge to act and interact in ways that contribute to an open, welcoming, +diverse, inclusive, and healthy community. + +## Our Standards + +Examples of behavior that contributes to a positive environment for our +community include: + +* Demonstrating empathy and kindness toward other people +* Being respectful of differing opinions, viewpoints, and experiences +* Giving and gracefully accepting constructive feedback +* Accepting responsibility and apologizing to those affected by our mistakes, + and learning from the experience +* Focusing on what is best not just for us as individuals, but for the + overall community + +Examples of unacceptable behavior include: + +* The use of sexualized language or imagery, and sexual attention or + advances of any kind +* Trolling, insulting or derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or email + address, without their explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Enforcement Responsibilities + +Community leaders are responsible for clarifying and enforcing our standards of +acceptable behavior and will take appropriate and fair corrective action in +response to any behavior that they deem inappropriate, threatening, offensive, +or harmful. + +Community leaders have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, and will communicate reasons for moderation +decisions when appropriate. + +## Scope + +This Code of Conduct applies within all community spaces, and also applies when +an individual is officially representing the community in public spaces. +Examples of representing our community include using an official e-mail address, +posting via an official social media account, or acting as an appointed +representative at an online or offline event. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported to the community leaders responsible for enforcement using Issues in this repository. +All complaints will be reviewed and investigated promptly and fairly. + +All community leaders are obligated to respect the privacy and security of the +reporter of any incident. + +## Enforcement Guidelines + +Community leaders will follow these Community Impact Guidelines in determining +the consequences for any action they deem in violation of this Code of Conduct: + +### 1. Correction + +**Community Impact**: Use of inappropriate language or other behavior deemed +unprofessional or unwelcome in the community. + +**Consequence**: A private, written warning from community leaders, providing +clarity around the nature of the violation and an explanation of why the +behavior was inappropriate. A public apology may be requested. + +### 2. Warning + +**Community Impact**: A violation through a single incident or series +of actions. + +**Consequence**: A warning with consequences for continued behavior. No +interaction with the people involved, including unsolicited interaction with +those enforcing the Code of Conduct, for a specified period of time. This +includes avoiding interactions in community spaces as well as external channels +like social media. Violating these terms may lead to a temporary or +permanent ban. + +### 3. Temporary Ban + +**Community Impact**: A serious violation of community standards, including +sustained inappropriate behavior. + +**Consequence**: A temporary ban from any sort of interaction or public +communication with the community for a specified period of time. No public or +private interaction with the people involved, including unsolicited interaction +with those enforcing the Code of Conduct, is allowed during this period. +Violating these terms may lead to a permanent ban. + +### 4. Permanent Ban + +**Community Impact**: Demonstrating a pattern of violation of community +standards, including sustained inappropriate behavior, harassment of an +individual, or aggression toward or disparagement of classes of individuals. + +**Consequence**: A permanent ban from any sort of public interaction within +the community. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], +version 2.0, available at +https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. + +Community Impact Guidelines were inspired by [Mozilla's code of conduct +enforcement ladder](https://github.com/mozilla/diversity). + +[homepage]: https://www.contributor-covenant.org + +For answers to common questions about this code of conduct, see the FAQ at +https://www.contributor-covenant.org/faq. Translations are available at +https://www.contributor-covenant.org/translations. diff --git a/charts/gotenberg/Chart.yaml b/charts/gotenberg/Chart.yaml index 184ce84..7533b2f 100644 --- a/charts/gotenberg/Chart.yaml +++ b/charts/gotenberg/Chart.yaml @@ -1,9 +1,9 @@ apiVersion: v1 -appVersion: "7.0.3" +appVersion: "7.5.0" 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: 5.0.0 +version: 5.1.0 home: https://thecodingmachine.github.io/gotenberg/ sources: - https://github.com/thecodingmachine/gotenberg diff --git a/charts/gotenberg/README.md b/charts/gotenberg/README.md index 5671ad6..3450b07 100644 --- a/charts/gotenberg/README.md +++ b/charts/gotenberg/README.md @@ -1,7 +1,7 @@ # gotenberg Gotenberg is a Docker-powered stateless API for converting HTML, Markdown and Office documents to PDF. -5.0.0 +5.1.0 [![Artifact HUB](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/kurt108)](https://artifacthub.io/packages/search?repo=kurt108) ======= @@ -41,12 +41,11 @@ NAME: my-release | basicAuth.enabled | bool | `false` | | | basicAuth.passwordMD5 | string | `"$apr1$zQ7F0fKS$X3aXkUCufHQlVe51VWUKu1"` | | | basicAuth.username | string | `"convert"` | | -| env.open.GOTENBERG_VERSION | string | `"7.0.3"` | | | env.open.LOG_FORMAT | string | `"TEXT"` | | | env.open.LOG_LEVEL | string | `"DEBUG"` | | | image.pullPolicy | string | `"IfNotPresent"` | | | image.repository | string | `"gotenberg/gotenberg"` | | -| image.tag | string | `"7.0.3"` | | +| image.tag | string | `"7.5.0"` | | | ingress.annotations | object | `{}` | | | ingress.className | string | `""` | | | ingress.enabled | bool | `true` | | @@ -59,6 +58,7 @@ NAME: my-release | podDisruptionBudget.maxUnavailable | int | `1` | | | replicaCount | int | `1` | | | resources | object | `{}` | | +| service.labels | object | `{}` | | | service.port | int | `3000` | | | service.type | string | `"ClusterIP"` | | | tolerations | list | `[]` | | diff --git a/charts/gotenberg/templates/_helpers.tpl b/charts/gotenberg/templates/_helpers.tpl index e4fca87..09b50ad 100644 --- a/charts/gotenberg/templates/_helpers.tpl +++ b/charts/gotenberg/templates/_helpers.tpl @@ -30,3 +30,34 @@ Create chart name and version as used by the chart label. {{- define "gotenberg.chart" -}} {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} {{- end -}} + +{{/* +Common labels +*/}} +{{- define "gotenberg.labels" -}} +helm.sh/chart: {{ include "gotenberg.chart" . }} +{{ include "gotenberg.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end }} + +{{/* +Selector labels +*/}} +{{- define "gotenberg.selectorLabels" -}} +app.kubernetes.io/name: {{ include "gotenberg.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} + +{{/* +Create the name of the service account to use +*/}} +{{- define "gotenberg.serviceAccountName" -}} +{{- if .Values.serviceAccount.create }} +{{- default (include "gotenberg.fullname" .) .Values.serviceAccount.name }} +{{- else }} +{{- default "default" .Values.serviceAccount.name }} +{{- end }} +{{- end }} \ No newline at end of file diff --git a/charts/gotenberg/templates/deployment.yaml b/charts/gotenberg/templates/deployment.yaml index 1821e33..a944476 100644 --- a/charts/gotenberg/templates/deployment.yaml +++ b/charts/gotenberg/templates/deployment.yaml @@ -3,9 +3,9 @@ kind: Deployment metadata: name: {{ template "gotenberg.fullname" . }} labels: + {{ include "gotenberg.labels" . | nindent 4 }} app: {{ template "gotenberg.name" . }} chart: {{ template "gotenberg.chart" . }} - release: {{ .Release.Name }} heritage: {{ .Release.Service }} annotations: {{- if .Values.annotations }} @@ -15,13 +15,11 @@ spec: replicas: {{ .Values.replicaCount }} selector: matchLabels: - app: {{ template "gotenberg.name" . }} - release: {{ .Release.Name }} + {{- include "gotenberg.selectorLabels" . | nindent 6 }} template: metadata: labels: - app: {{ template "gotenberg.name" . }} - release: {{ .Release.Name }} + {{- include "gotenberg.selectorLabels" . | nindent 8 }} annotations: checksum/config: {{ include (print $.Template.BasePath "/secrets.yaml") . | sha256sum }} spec: @@ -43,19 +41,19 @@ spec: - name: {{ $name | quote }} value: {{ $value | quote }} {{- end }} - {{- end }} + {{- end }} livenessProbe: httpGet: path: /health port: {{ .Values.service.port }} initialDelaySeconds: 5 - periodSeconds: 60 + periodSeconds: 60 readinessProbe: httpGet: path: /health port: {{ .Values.service.port }} initialDelaySeconds: 5 - periodSeconds: 60 + periodSeconds: 60 resources: {{ toYaml .Values.resources | indent 12 }} {{- with .Values.nodeSelector }} diff --git a/charts/gotenberg/templates/hpa.yaml b/charts/gotenberg/templates/hpa.yaml index 8ca1e12..cca59dd 100644 --- a/charts/gotenberg/templates/hpa.yaml +++ b/charts/gotenberg/templates/hpa.yaml @@ -4,6 +4,7 @@ kind: HorizontalPodAutoscaler metadata: name: {{ include "gotenberg.fullname" . }} labels: + {{ include "gotenberg.labels" . | nindent 4 }} app: {{ template "gotenberg.name" . }} release: {{ .Release.Name }} spec: diff --git a/charts/gotenberg/templates/ingress.yaml b/charts/gotenberg/templates/ingress.yaml index e13b5b3..640187c 100644 --- a/charts/gotenberg/templates/ingress.yaml +++ b/charts/gotenberg/templates/ingress.yaml @@ -17,6 +17,7 @@ kind: Ingress metadata: name: {{ $fullName }} labels: + {{ include "gotenberg.labels" . | nindent 4 }} app: {{ template "gotenberg.name" . }} chart: {{ template "gotenberg.chart" . }} release: {{ .Release.Name }} @@ -31,7 +32,7 @@ metadata: {{ else }} annotations: {{- with .Values.ingress.annotations }} -{{ toYaml . | indent 4 }} +{{ toYaml . | indent 4 }} {{- end }} {{- end }} spec: @@ -61,10 +62,10 @@ spec: name: {{ $fullName }} port: number: {{ $svcPort }} - {{- else }} + {{- else }} serviceName: {{ $fullName }} servicePort: http {{- end }} - {{- end }} + {{- end }} {{- end }} {{- end }} diff --git a/charts/gotenberg/templates/pdb.yaml b/charts/gotenberg/templates/pdb.yaml index 02ee7f5..a27da9c 100644 --- a/charts/gotenberg/templates/pdb.yaml +++ b/charts/gotenberg/templates/pdb.yaml @@ -5,6 +5,7 @@ kind: PodDisruptionBudget metadata: name: {{ include "gotenberg.fullname" . }} labels: + {{ include "gotenberg.labels" . | nindent 4 }} app: {{ template "gotenberg.name" . }} chart: {{ template "gotenberg.chart" . }} release: {{ .Release.Name }} @@ -12,7 +13,6 @@ metadata: spec: selector: matchLabels: - app: {{ template "gotenberg.name" . }} - release: {{ .Release.Name }} + {{- include "gotenberg.selectorLabels" . | nindent 6 }} maxUnavailable: {{ .Values.podDisruptionBudget.maxUnavailable }} {{- end }} diff --git a/charts/gotenberg/templates/secrets.yaml b/charts/gotenberg/templates/secrets.yaml index 341335d..2d37620 100644 --- a/charts/gotenberg/templates/secrets.yaml +++ b/charts/gotenberg/templates/secrets.yaml @@ -6,6 +6,7 @@ kind: Secret metadata: name: {{ template "gotenberg.fullname" . }} labels: + {{ include "gotenberg.labels" . | nindent 4 }} app: {{ template "gotenberg.name" . }} chart: {{ template "gotenberg.chart" . }} release: {{ .Release.Name }} @@ -14,4 +15,3 @@ type: Opaque data: auth: {{ (printf "%s:%s" .Values.basicAuth.username .Values.basicAuth.passwordMD5) | b64enc | quote }} {{- end }} - diff --git a/charts/gotenberg/templates/service.yaml b/charts/gotenberg/templates/service.yaml index f314166..1dfeb6a 100644 --- a/charts/gotenberg/templates/service.yaml +++ b/charts/gotenberg/templates/service.yaml @@ -3,9 +3,13 @@ kind: Service metadata: name: {{ template "gotenberg.fullname" . }} labels: + {{ include "gotenberg.labels" . | nindent 4 }} app: {{ template "gotenberg.name" . }} release: {{ .Release.Name }} heritage: {{ .Release.Service }} + {{- if .Values.service.labels }} + {{ toYaml .Values.service.labels }} + {{- end }} spec: type: {{ .Values.service.type }} ports: @@ -14,5 +18,4 @@ spec: protocol: TCP name: http selector: - app: {{ template "gotenberg.name" . }} - release: {{ .Release.Name }} + {{- include "gotenberg.selectorLabels" . | nindent 4 }} diff --git a/charts/gotenberg/templates/vpa.yaml b/charts/gotenberg/templates/vpa.yaml index e2f4956..177dbc8 100644 --- a/charts/gotenberg/templates/vpa.yaml +++ b/charts/gotenberg/templates/vpa.yaml @@ -4,6 +4,7 @@ kind: VerticalPodAutoscaler metadata: name: {{ include "gotenberg.fullname" . }} labels: + {{ include "gotenberg.labels" . | nindent 4 }} app: {{ template "gotenberg.name" . }} chart: {{ template "gotenberg.chart" . }} release: {{ .Release.Name }} diff --git a/charts/gotenberg/values.yaml b/charts/gotenberg/values.yaml index f8f4c22..85e4c4d 100644 --- a/charts/gotenberg/values.yaml +++ b/charts/gotenberg/values.yaml @@ -6,18 +6,18 @@ replicaCount: 1 image: repository: gotenberg/gotenberg - tag: 7.0.3 + tag: 7.5.0 pullPolicy: IfNotPresent env: open: - GOTENBERG_VERSION: "7.0.3" LOG_FORMAT: "TEXT" LOG_LEVEL: "DEBUG" service: type: ClusterIP port: 3000 + labels: {} basicAuth: enabled: false diff --git a/charts/thumbor/README.md b/charts/thumbor/README.md index 4a4bdb2..ff51660 100644 --- a/charts/thumbor/README.md +++ b/charts/thumbor/README.md @@ -1,7 +1,7 @@ # thumbor A chart containing Thumbor -1.0.29 +1.0.30 [![Artifact HUB](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/kurt108)](https://artifacthub.io/packages/search?repo=kurt108)