From d3a7303cb129074e6fc760a618595c73be0b0c99 Mon Sep 17 00:00:00 2001 From: Kurt <10924313+Kurt108@users.noreply.github.com> Date: Fri, 17 Sep 2021 15:45:48 +0200 Subject: [PATCH 1/2] create tags (#33) * Develop (#28) * fix readme-template. add exif-option to thumbor * master = > main * upgrade helm-docs * master to main * latest version is 1.0.24 * bump chart * fix readme * readme * use updated workflow from https://github.com/helm/chart-releaser-action bebaut the old workflow was broken * version bump for new ci-workflow * initial chart for statping (some bugs) * enable persistence * enable detectors * enable a fresh deployment if configfile changes --- .github/workflows/release.yaml | 12 ++++-- charts/statping/.gitignore | 1 + charts/statping/.helmignore | 21 ++++++++++ charts/statping/Chart.yaml | 12 ++++++ charts/statping/README.md | 37 +++++++++++++++++ charts/statping/README.md.gotmpl | 29 +++++++++++++ charts/statping/templates/NOTES.txt | 0 charts/statping/templates/_helpers.tpl | 32 +++++++++++++++ charts/statping/templates/deployment.yaml | 50 +++++++++++++++++++++++ charts/statping/templates/ingress.yaml | 49 ++++++++++++++++++++++ charts/statping/templates/pvc.yaml | 27 ++++++++++++ charts/statping/templates/service.yaml | 18 ++++++++ charts/statping/values.yaml | 40 ++++++++++++++++++ charts/thumbor/Chart.yaml | 2 +- charts/thumbor/README.md | 3 +- charts/thumbor/templates/configmap.yaml | 2 +- charts/thumbor/templates/deployment.yaml | 4 +- charts/thumbor/values.yaml | 3 ++ 18 files changed, 335 insertions(+), 7 deletions(-) create mode 100644 charts/statping/.gitignore create mode 100755 charts/statping/.helmignore create mode 100755 charts/statping/Chart.yaml create mode 100644 charts/statping/README.md create mode 100644 charts/statping/README.md.gotmpl create mode 100755 charts/statping/templates/NOTES.txt create mode 100755 charts/statping/templates/_helpers.tpl create mode 100755 charts/statping/templates/deployment.yaml create mode 100755 charts/statping/templates/ingress.yaml create mode 100644 charts/statping/templates/pvc.yaml create mode 100755 charts/statping/templates/service.yaml create mode 100755 charts/statping/values.yaml diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 8307709..566b59e 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -5,7 +5,6 @@ on: branches: - master - jobs: release: runs-on: ubuntu-latest @@ -14,11 +13,18 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 + - name: Configure Git run: | git config user.name "$GITHUB_ACTOR" git config user.email "$GITHUB_ACTOR@users.noreply.github.com" + + - name: Install Helm + uses: azure/setup-helm@v1 + with: + version: v3.4.0 + - name: Run chart-releaser - uses: helm/chart-releaser-action@main + uses: helm/chart-releaser-action@v1.2.1 env: - CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" \ No newline at end of file + CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" diff --git a/charts/statping/.gitignore b/charts/statping/.gitignore new file mode 100644 index 0000000..14d0c73 --- /dev/null +++ b/charts/statping/.gitignore @@ -0,0 +1 @@ +charts/.* \ No newline at end of file diff --git a/charts/statping/.helmignore b/charts/statping/.helmignore new file mode 100755 index 0000000..f0c1319 --- /dev/null +++ b/charts/statping/.helmignore @@ -0,0 +1,21 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj diff --git a/charts/statping/Chart.yaml b/charts/statping/Chart.yaml new file mode 100755 index 0000000..a3183d5 --- /dev/null +++ b/charts/statping/Chart.yaml @@ -0,0 +1,12 @@ +apiVersion: v1 +name: statping +icon: https://camo.githubusercontent.com/adc90af589fd69235a49fc1e71eb55d6a9a9890c786ebcd578d1ac04fe8a884f/68747470733a2f2f73332d75732d776573742d322e616d617a6f6e6177732e636f6d2f676974696d67732f7374617470696e672e706e67 +version: 0.0.2 +appVersion: "v.0.90.74" +description: A chart containing statping +home: https://github.com/statping/statping +sources: + - https://github.com/statping/statping +maintainers: + - name: kurt108 +deprecated: false diff --git a/charts/statping/README.md b/charts/statping/README.md new file mode 100644 index 0000000..701ec2d --- /dev/null +++ b/charts/statping/README.md @@ -0,0 +1,37 @@ +[![Artifact HUB](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/kurt108)](https://artifacthub.io/packages/search?repo=kurt108) + +# statping + +A chart containing statping + +0.0.2 + +Installing the Chart + +```console +$ helm repo add kurt108 https://kurt108.github.io/helm-charts +"kurt108" has been added to your repositories +$ helm repo update +Hang tight while we grab the latest from your chart repositories... +...Successfully got an update from the "kurt108" chart repository +... +Update Complete. ⎈ Happy Helming!⎈ +$ helm install my-release kurt108/statping +NAME: my-release +... +``` + +## Values + +| Key | Type | Default | Description | +|-----|------|---------|-------------| +| image.pullPolicy | string | `"IfNotPresent"` | | +| image.repository | string | `"statping/statping"` | | +| image.tag | string | `"v0.90.74"` | | +| ingress.annotations | object | `{}` | | +| ingress.hosts[0] | string | `"statping.domain"` | | +| ingress.path | string | `"/"` | | +| replicaCount | int | `1` | | +| resources | object | `{}` | | +| service.name | string | `"statping"` | | +| service.type | string | `"ClusterIP"` | | \ No newline at end of file diff --git a/charts/statping/README.md.gotmpl b/charts/statping/README.md.gotmpl new file mode 100644 index 0000000..bd635e2 --- /dev/null +++ b/charts/statping/README.md.gotmpl @@ -0,0 +1,29 @@ +[![Artifact HUB](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/kurt108)](https://artifacthub.io/packages/search?repo=kurt108) + + +{{ template "chart.header" . }} +{{ template "chart.description" . }} + + +{{ template "chart.version" . }} + + + +Installing the Chart + +```console +$ helm repo add kurt108 https://kurt108.github.io/helm-charts +"kurt108" has been added to your repositories +$ helm repo update +Hang tight while we grab the latest from your chart repositories... +...Successfully got an update from the "kurt108" chart repository +... +Update Complete. ⎈ Happy Helming!⎈ +$ helm install my-release kurt108/statping +NAME: my-release +... +``` + +{{ template "chart.requirementsSection" . }} + +{{- template "chart.valuesSection" . -}} diff --git a/charts/statping/templates/NOTES.txt b/charts/statping/templates/NOTES.txt new file mode 100755 index 0000000..e69de29 diff --git a/charts/statping/templates/_helpers.tpl b/charts/statping/templates/_helpers.tpl new file mode 100755 index 0000000..10d7bd1 --- /dev/null +++ b/charts/statping/templates/_helpers.tpl @@ -0,0 +1,32 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "statping.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 24 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +*/}} +{{- define "statping.fullname" -}} +{{- if .Values.fullnameOverride -}} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- if contains $name .Release.Name -}} +{{- .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "statping.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} + diff --git a/charts/statping/templates/deployment.yaml b/charts/statping/templates/deployment.yaml new file mode 100755 index 0000000..25bca8a --- /dev/null +++ b/charts/statping/templates/deployment.yaml @@ -0,0 +1,50 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ template "statping.fullname" . }} + labels: + chart: {{ template "statping.name" . }} + app: {{ template "statping.name" . }} + chart: {{ template "statping.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + app: {{ template "statping.name" . }} + release: {{ .Release.Name }} + template: + metadata: + labels: + app: {{ template "statping.name" . }} + release: {{ .Release.Name }} + spec: + volumes: + - name: {{ template "statping.fullname" . }}-storage + {{- if .Values.persistence.enabled }} + persistentVolumeClaim: + claimName: {{ .Values.persistence.existingClaim | default (include "statping.fullname" .) }}-storage + {{- else }} + emptyDir: {} + {{ end }} + containers: + - name: {{ .Chart.Name }} + image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + ports: + - name: http + containerPort: 8080 + env: +{{- range $name, $value := .Values.env.open }} +{{- if not (empty $value) }} + - name: {{ $name | quote }} + value: {{ $value | quote }} +{{- end }} +{{- end }} + resources: +{{ toYaml .Values.resources | indent 12 }} + volumeMounts: + - name: {{ template "statping.fullname" . }}-storage + mountPath: /app + readOnly: false \ No newline at end of file diff --git a/charts/statping/templates/ingress.yaml b/charts/statping/templates/ingress.yaml new file mode 100755 index 0000000..608a476 --- /dev/null +++ b/charts/statping/templates/ingress.yaml @@ -0,0 +1,49 @@ +{{- $fullName := include "statping.fullname" . -}} +{{- $servicePath := .Values.ingress.path -}} +{{- if .Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress" }} +apiVersion: networking.k8s.io/v1 +{{- else if .Capabilities.APIVersions.Has "networking.k8s.io/v1beta1/Ingress" }} +apiVersion: networking.k8s.io/v1beta1 +{{- end }} +kind: Ingress +metadata: + name: {{ $fullName }} + {{- if .Values.ingress.annotations }} + annotations: +{{ toYaml .Values.ingress.annotations | indent 4 }} +{{- end }} + labels: + app: {{ template "statping.name" . }} + chart: {{ template "statping.chart" . }} + heritage: {{ .Release.Service }} + release: {{ .Release.Name }} +{{- if .labels }} +{{ toYaml .labels | indent 4 }} +{{- end }} +spec: + rules: +{{- if .Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress" }} + {{- range $host := .Values.ingress.hosts }} + - host: {{ $host }} + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: {{ $fullName }} + port: + number: 8080 +{{- end }} +{{- else if .Capabilities.APIVersions.Has "networking.k8s.io/v1beta1/Ingress" }} + {{- range $host := .Values.ingress.hosts }} + - host: {{ $host }} + http: + paths: + - path: / + backend: + serviceName: {{ $fullName }} + servicePort: 8080 +{{- end }} +{{- end }} + diff --git a/charts/statping/templates/pvc.yaml b/charts/statping/templates/pvc.yaml new file mode 100644 index 0000000..e30992e --- /dev/null +++ b/charts/statping/templates/pvc.yaml @@ -0,0 +1,27 @@ +{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) }} +kind: PersistentVolumeClaim +apiVersion: v1 +metadata: + name: {{ template "statping.fullname" . }}-storage +{{- with .Values.persistence.annotations }} + annotations: +{{ toYaml . | indent 4 }} +{{- end }} + labels: + app: {{ template "statping.fullname" . }} + release: "{{ .Release.Name }}" + heritage: "{{ .Release.Service }}" +spec: + accessModes: + - {{ .Values.persistence.accessMode | quote }} + resources: + requests: + storage: {{ .Values.persistence.size | quote }} +{{- if .Values.persistence.storageClass }} +{{- if (eq "-" .Values.persistence.storageClass) }} + storageClassName: "" +{{- else }} + storageClassName: "{{ .Values.persistence.storageClass }}" +{{- end }} +{{- end }} +{{- end }} \ No newline at end of file diff --git a/charts/statping/templates/service.yaml b/charts/statping/templates/service.yaml new file mode 100755 index 0000000..13f86f5 --- /dev/null +++ b/charts/statping/templates/service.yaml @@ -0,0 +1,18 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ template "statping.fullname" . }} + labels: + app: {{ template "statping.name" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + type: {{ .Values.service.type }} + ports: + - port: 8080 + targetPort: 8080 + protocol: TCP + name: {{ .Values.service.name }} + selector: + app: {{ template "statping.name" . }} + release: {{ .Release.Name }} \ No newline at end of file diff --git a/charts/statping/values.yaml b/charts/statping/values.yaml new file mode 100755 index 0000000..7266a31 --- /dev/null +++ b/charts/statping/values.yaml @@ -0,0 +1,40 @@ +replicaCount: 1 + +env: + open: + VIRTUAL_HOST: localhost + VIRTUAL_PORT: 8080 + DB_HOST: postgres + DB_USER: statup + DB_PASS: password123 + DB_DATABASE: statup + NAME: STATPING + DESCRIPTION: This is a Statping instance + +ingress: + enabled: true + hosts: + - "statping.domain" + # Use this if you are using Traefik as your ingress-router + # path: "/scale" + # Use this if you are using nginx as your ingress-router + path: "/" + annotations: {} + +image: + repository: statping/statping + tag: v0.90.74 + pullPolicy: IfNotPresent + +service: + name: statping + type: ClusterIP + + +resources: {} + +persistence: + enabled: false + storageClass: generic + accessMode: ReadWriteOnce + size: 8Gi \ No newline at end of file diff --git a/charts/thumbor/Chart.yaml b/charts/thumbor/Chart.yaml index 379ff57..5040c12 100755 --- a/charts/thumbor/Chart.yaml +++ b/charts/thumbor/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v1 name: thumbor icon: https://camo.githubusercontent.com/8add159463b5ef31481d1e0cc9fb590cd662fe62/68747470733a2f2f73332e65752d776573742d322e616d617a6f6e6177732e636f6d2f6d696e696d616c2d636f6d706163742f696d616765732f6d632d7468756d626f722e706e67 -version: 1.0.24 +version: 1.0.27 appVersion: "6.7.5" description: A chart containing Thumbor home: http://thumbor.org/ diff --git a/charts/thumbor/README.md b/charts/thumbor/README.md index 773faa1..0ec4cd1 100644 --- a/charts/thumbor/README.md +++ b/charts/thumbor/README.md @@ -4,7 +4,8 @@ A chart containing Thumbor -1.0.24 +1.0.27 + Based on the fanastic work from Cloudposse: https://charts.cloudposse.com/incubator/ diff --git a/charts/thumbor/templates/configmap.yaml b/charts/thumbor/templates/configmap.yaml index 4e94a02..c97ef39 100644 --- a/charts/thumbor/templates/configmap.yaml +++ b/charts/thumbor/templates/configmap.yaml @@ -110,7 +110,7 @@ data: #'thumbor.detectors.feature_detector', #'thumbor.detectors.face_detector', #] - DETECTORS = [] + DETECTORS = [{{ .Values.conf.detectors }}] FACE_DETECTOR_CASCADE_FILE = 'haarcascade_frontalface_alt.xml' GLASSES_DETECTOR_CASCADE_FILE = 'haarcascade_eye_tree_eyeglasses.xml' PROFILE_DETECTOR_CASCADE_FILE = 'haarcascade_profileface.xml' diff --git a/charts/thumbor/templates/deployment.yaml b/charts/thumbor/templates/deployment.yaml index 56e514d..3bd7cb0 100755 --- a/charts/thumbor/templates/deployment.yaml +++ b/charts/thumbor/templates/deployment.yaml @@ -18,7 +18,9 @@ spec: metadata: labels: app: {{ template "thumbor.name" . }} - release: {{ .Release.Name }} + release: {{ .Release.Name }} + annotations: + checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} spec: volumes: - name: {{ template "thumbor.fullname" . }}-storage diff --git a/charts/thumbor/values.yaml b/charts/thumbor/values.yaml index 3c95539..a6b733b 100755 --- a/charts/thumbor/values.yaml +++ b/charts/thumbor/values.yaml @@ -18,6 +18,9 @@ conf: maxAge: "259200" maxAgeTempImage: "60" storageExpirationSeconds: "86400" + detectors: "" + + ingress: hosts: From 927aaf65ba9adbaae262cc295d669b70a51eb9c4 Mon Sep 17 00:00:00 2001 From: Kurt Bendlin Date: Fri, 17 Sep 2021 15:53:46 +0200 Subject: [PATCH 2/2] upgrade thumbor chart because of merge conflicts --- charts/thumbor/Chart.yaml | 2 +- charts/thumbor/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/thumbor/Chart.yaml b/charts/thumbor/Chart.yaml index 5040c12..84143c6 100755 --- a/charts/thumbor/Chart.yaml +++ b/charts/thumbor/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v1 name: thumbor icon: https://camo.githubusercontent.com/8add159463b5ef31481d1e0cc9fb590cd662fe62/68747470733a2f2f73332e65752d776573742d322e616d617a6f6e6177732e636f6d2f6d696e696d616c2d636f6d706163742f696d616765732f6d632d7468756d626f722e706e67 -version: 1.0.27 +version: 1.0.28 appVersion: "6.7.5" description: A chart containing Thumbor home: http://thumbor.org/ diff --git a/charts/thumbor/README.md b/charts/thumbor/README.md index 0ec4cd1..50c21c6 100644 --- a/charts/thumbor/README.md +++ b/charts/thumbor/README.md @@ -4,7 +4,7 @@ A chart containing Thumbor -1.0.27 +1.0.28 Based on the fanastic work from Cloudposse: https://charts.cloudposse.com/incubator/