From bce37da86f47044eac3c9b89b87fd22f0191103f Mon Sep 17 00:00:00 2001 From: hairmare <116588+hairmare@users.noreply.github.com> Date: Tue, 3 Sep 2024 16:18:44 +0200 Subject: [PATCH] chore(caasperli): Remove chart (#1306) --- charts/caasperli/.helmignore | 23 - charts/caasperli/Chart.yaml | 11 - charts/caasperli/README.md | 79 --- charts/caasperli/ci/prometheus-values.yaml | 29 - .../dashboards/caasperli-frontend.json | 564 ------------------ charts/caasperli/templates/NOTES.txt | 37 -- charts/caasperli/templates/_helpers.tpl | 62 -- charts/caasperli/templates/deployment.yaml | 61 -- .../grafana/configmap-dashboard.yaml | 27 - charts/caasperli/templates/hpa.yaml | 28 - charts/caasperli/templates/ingress.yaml | 61 -- .../templates/prometheus/podmonitor.yaml | 33 - .../templates/prometheus/servicemonitor.yaml | 33 - charts/caasperli/templates/service.yaml | 15 - .../caasperli/templates/serviceaccount.yaml | 12 - .../templates/tests/test-connection.yaml | 15 - charts/caasperli/values.yaml | 133 ----- 17 files changed, 1223 deletions(-) delete mode 100644 charts/caasperli/.helmignore delete mode 100644 charts/caasperli/Chart.yaml delete mode 100644 charts/caasperli/README.md delete mode 100644 charts/caasperli/ci/prometheus-values.yaml delete mode 100644 charts/caasperli/grafana/dashboards/caasperli-frontend.json delete mode 100644 charts/caasperli/templates/NOTES.txt delete mode 100644 charts/caasperli/templates/_helpers.tpl delete mode 100644 charts/caasperli/templates/deployment.yaml delete mode 100644 charts/caasperli/templates/grafana/configmap-dashboard.yaml delete mode 100644 charts/caasperli/templates/hpa.yaml delete mode 100644 charts/caasperli/templates/ingress.yaml delete mode 100644 charts/caasperli/templates/prometheus/podmonitor.yaml delete mode 100644 charts/caasperli/templates/prometheus/servicemonitor.yaml delete mode 100644 charts/caasperli/templates/service.yaml delete mode 100644 charts/caasperli/templates/serviceaccount.yaml delete mode 100644 charts/caasperli/templates/tests/test-connection.yaml delete mode 100644 charts/caasperli/values.yaml diff --git a/charts/caasperli/.helmignore b/charts/caasperli/.helmignore deleted file mode 100644 index 0e8a0eb36..000000000 --- a/charts/caasperli/.helmignore +++ /dev/null @@ -1,23 +0,0 @@ -# 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 -*.orig -*~ -# Various IDEs -.project -.idea/ -*.tmproj -.vscode/ diff --git a/charts/caasperli/Chart.yaml b/charts/caasperli/Chart.yaml deleted file mode 100644 index af1febb34..000000000 --- a/charts/caasperli/Chart.yaml +++ /dev/null @@ -1,11 +0,0 @@ -apiVersion: v2 -name: caasperli -description: Deploy Caasperli to a Kubernetes Cluster -type: application -version: 0.10.5 -appVersion: latest -home: https://github.com/adfinis/potz-holzoepfel-und-zipfelchape -deprecated: true -sources: - - https://github.com/adfinis/potz-holzoepfel-und-zipfelchape - - https://github.com/adfinis/helm-charts/tree/main/charts/caasperli diff --git a/charts/caasperli/README.md b/charts/caasperli/README.md deleted file mode 100644 index cd1ef8f7e..000000000 --- a/charts/caasperli/README.md +++ /dev/null @@ -1,79 +0,0 @@ -# caasperli - -> **:exclamation: This Helm Chart is deprecated!** - -![Version: 0.10.5](https://img.shields.io/badge/Version-0.10.5-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: latest](https://img.shields.io/badge/AppVersion-latest-informational?style=flat-square) - -Deploy Caasperli to a Kubernetes Cluster - -**Homepage:** - -## Source Code - -* -* - -## Values - -| Key | Type | Default | Description | -|-----|------|---------|-------------| -| affinity | object | `{}` | | -| autoscaling.enabled | bool | `false` | | -| autoscaling.maxReplicas | int | `100` | | -| autoscaling.minReplicas | int | `1` | | -| autoscaling.targetCPUUtilizationPercentage | int | `80` | | -| fullnameOverride | string | `""` | | -| grafana.defaultLabel | bool | `true` | Add a default `grafana_dashboard: 1` label | -| grafana.enabled | bool | `false` | Enable Grafana Dashboards | -| grafana.extraAnnotations | object | `{}` | Annotations to add to all Grafana integration resources | -| grafana.extraLabels | object | `{}` | Labels to add to all Grafana integration resources | -| image.pullPolicy | string | `"Always"` | When to pull the container image | -| image.repository | string | `"ghcr.io/adfinis/potz-holzoepfel-und-zipfelchape"` | Container image to deploy | -| image.tag | string | `""` | Overrides the image tag whose default is the chart version. | -| imagePullSecrets | list | `[]` | | -| ingress.annotations | object | `{}` | Annotations to add to the ingress resource | -| ingress.className | string | `""` | Which Ingress class to configure for the ingress resource | -| ingress.enabled | bool | `false` | Enable ingress | -| ingress.hosts | list | `[]` | List of hosts to expose via ingress | -| ingress.tls | list | `[]` | TLS configuration for ingress | -| nameOverride | string | `""` | | -| nodeSelector | object | `{}` | | -| podAnnotations | object | `{}` | Annotations to add to Pod. | -| podSecurityContext | object | `{}` | [PodSecurityContext](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#podsecuritycontext-v1-core) | -| prometheus.enabled | bool | `false` | Enable Prometheus integration | -| prometheus.extraAnnotations | object | `{}` | Annotations to add to all Prometheus integration resources | -| prometheus.extraLabels | object | `{}` | Labels to add to all Prometheus integration resources | -| prometheus.podMonitor.enabled | bool | `true` | Enable creation of a PodMonitor CRD | -| prometheus.podMonitor.interval | string | `"30s"` | Interval at which metrics should be scraped | -| prometheus.podMonitor.metricRelabelings | list | `[]` | MetricRelabelConfigs to apply to samples before ingestion | -| prometheus.podMonitor.relabelings | list | `[]` | RelabelConfigs to apply to samples before scraping | -| prometheus.serviceMonitor.enabled | bool | `false` | Enable creation of a ServiceMonitor CRD | -| prometheus.serviceMonitor.interval | string | `"30s"` | Interval at which metrics should be scraped | -| prometheus.serviceMonitor.metricRelabelings | list | `[]` | MetricRelabelConfigs to apply to samples before ingestion | -| prometheus.serviceMonitor.relabelings | list | `[]` | RelabelConfigs to apply to samples before scraping | -| replicaCount | int | `1` | How many caasperlis to deploy | -| resources | object | `{}` | | -| securityContext | object | `{}` | [SecurityContext](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#securitycontext-v1-core) | -| service.port | int | `80` | Port the service will expose | -| service.type | string | `"ClusterIP"` | Type of the service to create | -| serviceAccount.annotations | object | `{}` | Annotations to add to the service account | -| serviceAccount.create | bool | `true` | 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 | -| tolerations | list | `[]` | | - -## About this chart - -Adfinis fights for a software world that is more open, where the quality is -better and where software must be accessible to everyone. This chart -is part of the action behind this commitment. Feel free to -[contact](https://adfinis.com/kontakt/?pk_campaign=github&pk_kwd=helm-charts) -us if you have any questions. - -## License - -This Helm chart is free software: you can redistribute it and/or modify it under the terms -of the GNU Affero General Public License as published by the Free Software Foundation, -version 3 of the License. - ----------------------------------------------- -Autogenerated from chart metadata using [helm-docs](https://github.com/norwoodj/helm-docs/) diff --git a/charts/caasperli/ci/prometheus-values.yaml b/charts/caasperli/ci/prometheus-values.yaml deleted file mode 100644 index 567760379..000000000 --- a/charts/caasperli/ci/prometheus-values.yaml +++ /dev/null @@ -1,29 +0,0 @@ -deploymentAnnotations: - k8s.adfinis.com/ci: test - -prometheus: - enabled: true - extraLabels: - k8s.example.com: foo-bar - serviceMonitor: - enabled: true - metricRelabelings: - - regex: '(.*)' - replacement: '$1' - relabelings: - - sourceLabels: - - foo - targetLabel: bar - podMonitor: - enabled: true - metricRelabelings: - - regex: '(.*)' - replacement: '$1' - relabelings: - - sourceLabels: - - foo - targetLabel: bar -grafana: - enabled: true - extraLabels: - k8s.example.com: bar-baz diff --git a/charts/caasperli/grafana/dashboards/caasperli-frontend.json b/charts/caasperli/grafana/dashboards/caasperli-frontend.json deleted file mode 100644 index 654cdefd9..000000000 --- a/charts/caasperli/grafana/dashboards/caasperli-frontend.json +++ /dev/null @@ -1,564 +0,0 @@ -{ - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "type": "dashboard" - } - ] - }, - "editable": false, - "gnetId": null, - "graphTooltip": 0, - "id": 27, - "iteration": 1589448263217, - "links": [], - "panels": [ - { - "cacheTimeout": null, - "colorBackground": false, - "colorValue": false, - "colors": [ - "#299c46", - "rgba(237, 129, 40, 0.89)", - "#d44a3a" - ], - "datasource": "$datasource", - "format": "none", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": false, - "thresholdLabels": false, - "thresholdMarkers": true - }, - "gridPos": { - "h": 7, - "w": 4, - "x": 0, - "y": 0 - }, - "id": 2, - "interval": null, - "links": [], - "mappingType": 1, - "mappingTypes": [ - { - "name": "value to text", - "value": 1 - }, - { - "name": "range to text", - "value": 2 - } - ], - "maxDataPoints": 100, - "nullPointMode": "connected", - "nullText": null, - "options": {}, - "postfix": "", - "postfixFontSize": "50%", - "prefix": "", - "prefixFontSize": "50%", - "rangeMaps": [ - { - "from": "null", - "text": "N/A", - "to": "null" - } - ], - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": false, - "lineColor": "rgb(31, 120, 193)", - "show": false - }, - "tableColumn": "", - "targets": [ - { - "expr": "sum(up{container=\"caasperli\"})", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "", - "refId": "A" - } - ], - "thresholds": "", - "title": "Up", - "tooltip": { - "shared": false - }, - "type": "singlestat", - "valueFontSize": "80%", - "valueMaps": [ - { - "op": "=", - "text": "N/A", - "value": "null" - } - ], - "valueName": "min" - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 7, - "w": 20, - "x": 4, - "y": 0 - }, - "hiddenSeries": false, - "id": 4, - "legend": { - "alignAsTable": "true", - "avg": false, - "current": "true", - "max": false, - "min": false, - "rightSide": "true", - "show": "true", - "sort": null, - "sortDesc": null, - "total": false, - "values": "true" - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "options": { - "dataLinks": [] - }, - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "repeat": null, - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "histogram_quantile(0.99, sum(rate(http_request_duration_seconds_bucket{container=\"caasperli\", instance=~\"$instance\"}[5m])) by (method, le))", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{method}}", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Request duration 99th quantile", - "tooltip": { - "shared": false, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "s", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "s", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 7, - "w": 8, - "x": 0, - "y": 7 - }, - "hiddenSeries": false, - "id": 11, - "legend": { - "alignAsTable": false, - "avg": false, - "current": false, - "max": false, - "min": false, - "rightSide": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "options": { - "dataLinks": [] - }, - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "repeat": null, - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "process_resident_memory_bytes{container=\"caasperli\",instance=~\"$instance\"}", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{instance}}", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Memory", - "tooltip": { - "shared": false, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "bytes", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "bytes", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 7, - "w": 8, - "x": 8, - "y": 7 - }, - "hiddenSeries": false, - "id": 12, - "legend": { - "alignAsTable": false, - "avg": false, - "current": false, - "max": false, - "min": false, - "rightSide": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "options": { - "dataLinks": [] - }, - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "repeat": null, - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "rate(process_cpu_seconds_total{container=\"caasperli\",instance=~\"$instance\"}[5m])", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{instance}}", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "CPU usage", - "tooltip": { - "shared": false, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": 0, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 7, - "w": 8, - "x": 16, - "y": 7 - }, - "hiddenSeries": false, - "id": 13, - "legend": { - "alignAsTable": false, - "avg": false, - "current": false, - "max": false, - "min": false, - "rightSide": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "options": { - "dataLinks": [] - }, - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "repeat": null, - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "go_goroutines{container=\"caasperli\",instance=~\"$instance\"}", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{instance}}", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Goroutines", - "tooltip": { - "shared": false, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - } - ], - "refresh": "", - "schemaVersion": 22, - "style": "dark", - "tags": [], - "templating": { - "list": [ - { - "current": { - "selected": true, - "text": "Prometheus", - "value": "Prometheus" - }, - "hide": 0, - "includeAll": false, - "label": null, - "multi": false, - "name": "datasource", - "options": [], - "query": "prometheus", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "type": "datasource" - }, - { - "allValue": null, - "current": { - "selected": true, - "text": "All", - "value": "$__all" - }, - "datasource": "$datasource", - "definition": "label_values(go_info{container=\"caasperli\"},instance)", - "hide": 0, - "includeAll": true, - "label": null, - "multi": false, - "name": "instance", - "options": [], - "query": "label_values(go_info{container=\"caasperli\"},instance)", - "refresh": 2, - "regex": "", - "skipUrlSync": false, - "sort": 1, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "time": { - "from": "now-1h", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "title": "Caasperli / Frontend" -} diff --git a/charts/caasperli/templates/NOTES.txt b/charts/caasperli/templates/NOTES.txt deleted file mode 100644 index 3ea7c8af0..000000000 --- a/charts/caasperli/templates/NOTES.txt +++ /dev/null @@ -1,37 +0,0 @@ - _____ _ _ _ _ _ _ -|_ _| (_) | | | | | | | | | - | |_ __ _ | |_ _ __ __ _ | |_ _ __ _ _| | | __ _ | | __ _ - | | '__| | | __| '__/ _` | | __| '__| | | | | |/ _` | | |/ _` | - | | | | | | |_| | | (_| | | |_| | | |_| | | | (_| | | | (_| | - \_/_| |_| \__|_| \__,_| \__|_| \__,_|_|_|\__,_| |_|\__,_| - -1. Get the application URL by running these commands: -{{- if .Values.ingress.enabled }} -{{- range $host := .Values.ingress.hosts }} - {{- range .paths }} - http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ .path }} - {{- end }} -{{- end }} -{{- else if contains "NodePort" .Values.service.type }} - export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "caasperli.fullname" . }}) - export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") - echo http://$NODE_IP:$NODE_PORT -{{- else if contains "LoadBalancer" .Values.service.type }} - NOTE: It may take a few minutes for the LoadBalancer IP to be available. - You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "caasperli.fullname" . }}' - export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "caasperli.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}") - echo http://$SERVICE_IP:{{ .Values.service.port }} -{{- else if contains "ClusterIP" .Values.service.type }} - export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "caasperli.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") - echo "Visit http://127.0.0.1:8080 to use your application" - kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:8080 -{{- end }} -{{- if .Values.prometheus.enabled }} -2. To monitor your application we have configured the following resouces: -{{- if .Values.prometheus.serviceMonitor.enabled }} - * monitoring.coreos.com/v1/ServiceMonitor: {{ template "caasperli.fullname" . }} -{{- end }} -{{- if .Values.prometheus.podMonitor.enabled }} - * monitoring.coreos.com/v1/PodMonitor: {{ template "caasperli.fullname" . }} -{{- end }} -{{- end }} diff --git a/charts/caasperli/templates/_helpers.tpl b/charts/caasperli/templates/_helpers.tpl deleted file mode 100644 index 478a36f83..000000000 --- a/charts/caasperli/templates/_helpers.tpl +++ /dev/null @@ -1,62 +0,0 @@ -{{/* -Expand the name of the chart. -*/}} -{{- define "caasperli.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} -{{- end }} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "caasperli.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 "caasperli.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} -{{- end }} - -{{/* -Common labels -*/}} -{{- define "caasperli.labels" -}} -helm.sh/chart: {{ include "caasperli.chart" . }} -{{ include "caasperli.selectorLabels" . }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end }} - -{{/* -Selector labels -*/}} -{{- define "caasperli.selectorLabels" -}} -app.kubernetes.io/name: {{ include "caasperli.name" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{- end }} - -{{/* -Create the name of the service account to use -*/}} -{{- define "caasperli.serviceAccountName" -}} -{{- if .Values.serviceAccount.create }} -{{- default (include "caasperli.fullname" .) .Values.serviceAccount.name }} -{{- else }} -{{- default "default" .Values.serviceAccount.name }} -{{- end }} -{{- end }} diff --git a/charts/caasperli/templates/deployment.yaml b/charts/caasperli/templates/deployment.yaml deleted file mode 100644 index 0dea1b9a1..000000000 --- a/charts/caasperli/templates/deployment.yaml +++ /dev/null @@ -1,61 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ include "caasperli.fullname" . }} - labels: - {{- include "caasperli.labels" . | nindent 4 }} -spec: - {{- if not .Values.autoscaling.enabled }} - replicas: {{ .Values.replicaCount }} - {{- end }} - selector: - matchLabels: - {{- include "caasperli.selectorLabels" . | nindent 6 }} - template: - metadata: - {{- with .Values.podAnnotations }} - annotations: - {{- toYaml . | nindent 8 }} - {{- end }} - labels: - {{- include "caasperli.selectorLabels" . | nindent 8 }} - spec: - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - serviceAccountName: {{ include "caasperli.serviceAccountName" . }} - securityContext: - {{- toYaml .Values.podSecurityContext | nindent 8 }} - containers: - - name: {{ .Chart.Name }} - securityContext: - {{- toYaml .Values.securityContext | nindent 12 }} - image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" - imagePullPolicy: {{ .Values.image.pullPolicy }} - ports: - - name: http - containerPort: 8080 - protocol: TCP - livenessProbe: - httpGet: - path: /healthz - port: http - readinessProbe: - httpGet: - path: /healthz - port: http - resources: - {{- toYaml .Values.resources | nindent 12 }} - {{- with .Values.nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.affinity }} - affinity: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.tolerations }} - tolerations: - {{- toYaml . | nindent 8 }} - {{- end }} diff --git a/charts/caasperli/templates/grafana/configmap-dashboard.yaml b/charts/caasperli/templates/grafana/configmap-dashboard.yaml deleted file mode 100644 index c3af856f0..000000000 --- a/charts/caasperli/templates/grafana/configmap-dashboard.yaml +++ /dev/null @@ -1,27 +0,0 @@ -{{- if .Values.grafana.enabled }} -{{- $files := .Files.Glob "grafana/dashboards/*.json" }} -{{- if $files }} -{{- range $path, $fileContents := $files }} -{{- $dashboardName := regexReplaceAll "(^.*/)(.*)\\.json$" $path "${2}" }} ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ printf "%s-%s" (include "caasperli.fullname" $) $dashboardName | trunc 63 | trimSuffix "-" }} - labels: - {{- include "caasperli.labels" $ | nindent 4 }} - {{- if $.Values.grafana.defaultLabel }} - grafana_dashboard: "1" - {{- end }} - {{- if $.Values.grafana.extraLabels }} - {{- $.Values.grafana.extraLabels | toYaml | nindent 4 }} - {{- end }} - {{- if $.Values.grafana.extraAnnotations }} - annotations: - {{- $.Values.grafana.extraAnnotations | toYaml | nindent 4 }} - {{- end }} -data: - {{ $dashboardName }}.json: {{ $.Files.Get $path | toJson }} -{{- end }} -{{- end }} -{{- end }} diff --git a/charts/caasperli/templates/hpa.yaml b/charts/caasperli/templates/hpa.yaml deleted file mode 100644 index 33c5d89e0..000000000 --- a/charts/caasperli/templates/hpa.yaml +++ /dev/null @@ -1,28 +0,0 @@ -{{- if .Values.autoscaling.enabled }} -apiVersion: autoscaling/v2beta1 -kind: HorizontalPodAutoscaler -metadata: - name: {{ include "caasperli.fullname" . }} - labels: - {{- include "caasperli.labels" . | nindent 4 }} -spec: - scaleTargetRef: - apiVersion: apps/v1 - kind: Deployment - name: {{ include "caasperli.fullname" . }} - minReplicas: {{ .Values.autoscaling.minReplicas }} - maxReplicas: {{ .Values.autoscaling.maxReplicas }} - metrics: - {{- if .Values.autoscaling.targetCPUUtilizationPercentage }} - - type: Resource - resource: - name: cpu - targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} - {{- end }} - {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} - - type: Resource - resource: - name: memory - targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} - {{- end }} -{{- end }} diff --git a/charts/caasperli/templates/ingress.yaml b/charts/caasperli/templates/ingress.yaml deleted file mode 100644 index df0eeb8de..000000000 --- a/charts/caasperli/templates/ingress.yaml +++ /dev/null @@ -1,61 +0,0 @@ -{{- if .Values.ingress.enabled -}} -{{- $fullName := include "caasperli.fullname" . -}} -{{- $svcPort := .Values.service.port -}} -{{- if and .Values.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }} - {{- if not (hasKey .Values.ingress.annotations "kubernetes.io/ingress.class") }} - {{- $_ := set .Values.ingress.annotations "kubernetes.io/ingress.class" .Values.ingress.className}} - {{- end }} -{{- end }} -{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}} -apiVersion: networking.k8s.io/v1 -{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} -apiVersion: networking.k8s.io/v1beta1 -{{- else -}} -apiVersion: extensions/v1beta1 -{{- end }} -kind: Ingress -metadata: - name: {{ $fullName }} - labels: - {{- include "caasperli.labels" . | nindent 4 }} - {{- with .Values.ingress.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -spec: - {{- if and .Values.ingress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }} - ingressClassName: {{ .Values.ingress.className }} - {{- end }} - {{- if .Values.ingress.tls }} - tls: - {{- range .Values.ingress.tls }} - - hosts: - {{- range .hosts }} - - {{ . | quote }} - {{- end }} - secretName: {{ .secretName }} - {{- end }} - {{- end }} - rules: - {{- range .Values.ingress.hosts }} - - host: {{ .host | quote }} - http: - paths: - {{- range .paths }} - - path: {{ .path }} - {{- if and .pathType (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion) }} - pathType: {{ .pathType }} - {{- end }} - backend: - {{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }} - service: - name: {{ $fullName }} - port: - number: {{ $svcPort }} - {{- else }} - serviceName: {{ $fullName }} - servicePort: {{ $svcPort }} - {{- end }} - {{- end }} - {{- end }} -{{- end }} diff --git a/charts/caasperli/templates/prometheus/podmonitor.yaml b/charts/caasperli/templates/prometheus/podmonitor.yaml deleted file mode 100644 index fbe037cf5..000000000 --- a/charts/caasperli/templates/prometheus/podmonitor.yaml +++ /dev/null @@ -1,33 +0,0 @@ -{{- if and .Values.prometheus.enabled .Values.prometheus.podMonitor.enabled }} -apiVersion: monitoring.coreos.com/v1 -kind: PodMonitor -metadata: - name: {{ template "caasperli.fullname" . }} - labels: - {{- include "caasperli.labels" . | nindent 4 }} - {{- if .Values.prometheus.extraLabels }} - {{- .Values.prometheus.extraLabels | toYaml | nindent 4 }} - {{- end }} - {{- if .Values.prometheus.extraAnnotations }} - annotations: - {{- .Values.prometheus.extraAnnotations | toYaml | nindent 4 }} - {{- end }} -spec: - selector: - matchLabels: - {{- include "caasperli.selectorLabels" . | nindent 6 }} - podMetricsEndpoints: - - port: http - {{- if .Values.prometheus.podMonitor.interval }} - interval: {{ .Values.prometheus.podMonitor.interval }} - {{- end }} - path: "/metrics" - {{- if .Values.prometheus.podMonitor.metricRelabelings }} - metricRelabelings: - {{- toYaml .Values.prometheus.podMonitor.metricRelabelings | nindent 6 }} - {{- end }} - {{- if .Values.prometheus.podMonitor.relabelings }} - relabelings: - {{- toYaml .Values.prometheus.podMonitor.relabelings | nindent 6 }} - {{- end }} -{{- end }} diff --git a/charts/caasperli/templates/prometheus/servicemonitor.yaml b/charts/caasperli/templates/prometheus/servicemonitor.yaml deleted file mode 100644 index e85c1d69e..000000000 --- a/charts/caasperli/templates/prometheus/servicemonitor.yaml +++ /dev/null @@ -1,33 +0,0 @@ -{{- if and .Values.prometheus.enabled .Values.prometheus.serviceMonitor.enabled }} -apiVersion: monitoring.coreos.com/v1 -kind: ServiceMonitor -metadata: - name: {{ template "caasperli.fullname" . }} - labels: - {{- include "caasperli.labels" . | nindent 4 }} - {{- if .Values.prometheus.extraLabels }} - {{- .Values.prometheus.extraLabels | toYaml | nindent 4 }} - {{- end }} - {{- if .Values.prometheus.extraAnnotations }} - annotations: - {{- .Values.prometheus.extraAnnotations | toYaml | nindent 4 }} - {{- end }} -spec: - selector: - matchLabels: - {{- include "caasperli.selectorLabels" . | nindent 6 }} - endpoints: - - port: http - {{- if .Values.prometheus.serviceMonitor.interval }} - interval: {{ .Values.prometheus.serviceMonitor.interval }} - {{- end }} - path: "/metrics" - {{- if .Values.prometheus.serviceMonitor.metricRelabelings }} - metricRelabelings: - {{- toYaml .Values.prometheus.serviceMonitor.metricRelabelings | nindent 6 }} - {{- end }} - {{- if .Values.prometheus.serviceMonitor.relabelings }} - relabelings: - {{- toYaml .Values.prometheus.serviceMonitor.relabelings | nindent 6 }} - {{- end }} -{{- end }} diff --git a/charts/caasperli/templates/service.yaml b/charts/caasperli/templates/service.yaml deleted file mode 100644 index 99d5fe125..000000000 --- a/charts/caasperli/templates/service.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ include "caasperli.fullname" . }} - labels: - {{- include "caasperli.labels" . | nindent 4 }} -spec: - type: {{ .Values.service.type }} - ports: - - port: {{ .Values.service.port }} - targetPort: http - protocol: TCP - name: http - selector: - {{- include "caasperli.selectorLabels" . | nindent 4 }} diff --git a/charts/caasperli/templates/serviceaccount.yaml b/charts/caasperli/templates/serviceaccount.yaml deleted file mode 100644 index 102a48a00..000000000 --- a/charts/caasperli/templates/serviceaccount.yaml +++ /dev/null @@ -1,12 +0,0 @@ -{{- if .Values.serviceAccount.create -}} -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ include "caasperli.serviceAccountName" . }} - labels: - {{- include "caasperli.labels" . | nindent 4 }} - {{- with .Values.serviceAccount.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -{{- end }} diff --git a/charts/caasperli/templates/tests/test-connection.yaml b/charts/caasperli/templates/tests/test-connection.yaml deleted file mode 100644 index 99c7617ff..000000000 --- a/charts/caasperli/templates/tests/test-connection.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: v1 -kind: Pod -metadata: - name: "{{ include "caasperli.fullname" . }}-test-connection" - labels: - {{- include "caasperli.labels" . | nindent 4 }} - annotations: - "helm.sh/hook": test -spec: - containers: - - name: wget - image: busybox - command: ['wget'] - args: ['{{ include "caasperli.fullname" . }}:{{ .Values.service.port }}'] - restartPolicy: Never diff --git a/charts/caasperli/values.yaml b/charts/caasperli/values.yaml deleted file mode 100644 index aec354f0a..000000000 --- a/charts/caasperli/values.yaml +++ /dev/null @@ -1,133 +0,0 @@ -# Default values for caasperli. -# This is a YAML-formatted file. -# Declare variables to be passed into your templates. - -# -- How many caasperlis to deploy -replicaCount: 1 - -image: - # -- Container image to deploy - repository: ghcr.io/adfinis/potz-holzoepfel-und-zipfelchape - # -- When to pull the container image - pullPolicy: Always - # -- Overrides the image tag whose default is the chart version. - tag: "" - -imagePullSecrets: [] -nameOverride: "" -fullnameOverride: "" - -serviceAccount: - # -- Specifies whether a service account should be created - create: true - # -- Annotations to add to the service account - annotations: {} - # -- The name of the service account to use. - # If not set and create is true, a name is generated using the fullname template - name: "" - -# -- Annotations to add to Pod. -podAnnotations: {} - -# -- [PodSecurityContext](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#podsecuritycontext-v1-core) -podSecurityContext: {} - # fsGroup: 2000 - -# -- [SecurityContext](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#securitycontext-v1-core) -securityContext: {} - # capabilities: - # drop: - # - ALL - # readOnlyRootFilesystem: true - # runAsNonRoot: true - # runAsUser: 1000 - -service: - # -- Type of the service to create - type: ClusterIP - # -- Port the service will expose - port: 80 - -ingress: - # -- Enable ingress - enabled: false - # -- Which Ingress class to configure for the ingress resource - className: "" - # -- Annotations to add to the ingress resource - annotations: {} - # kubernetes.io/ingress.class: nginx - # kubernetes.io/tls-acme: "true" - # -- List of hosts to expose via ingress - hosts: [] - # - host: chart-example.local - # paths: - # - path: / - # pathType: Prefix - # -- TLS configuration for ingress - tls: [] - # - secretName: chart-example-tls - # hosts: - # - chart-example.local - -resources: {} - # We usually recommend not to specify default resources and to leave this as a conscious - # choice for the user. This also increases chances charts run on environments with little - # resources, such as Minikube. If you do want to specify resources, uncomment the following - # lines, adjust them as necessary, and remove the curly braces after 'resources:'. - # limits: - # cpu: 100m - # memory: 128Mi - # requests: - # cpu: 100m - # memory: 128Mi - -autoscaling: - enabled: false - minReplicas: 1 - maxReplicas: 100 - targetCPUUtilizationPercentage: 80 - # targetMemoryUtilizationPercentage: 80 - -nodeSelector: {} - -tolerations: [] - -affinity: {} - -# Configure how Caasperli is to be monitored using Prometheus -prometheus: - # -- Enable Prometheus integration - enabled: false - # -- Labels to add to all Prometheus integration resources - extraLabels: {} - # -- Annotations to add to all Prometheus integration resources - extraAnnotations: {} - serviceMonitor: - # -- Enable creation of a ServiceMonitor CRD - enabled: false - # -- Interval at which metrics should be scraped - interval: "30s" - # -- MetricRelabelConfigs to apply to samples before ingestion - metricRelabelings: [] - # -- RelabelConfigs to apply to samples before scraping - relabelings: [] - podMonitor: - # -- Enable creation of a PodMonitor CRD - enabled: true - # -- Interval at which metrics should be scraped - interval: "30s" - # -- MetricRelabelConfigs to apply to samples before ingestion - metricRelabelings: [] - # -- RelabelConfigs to apply to samples before scraping - relabelings: [] - -# Configure if Caasperli should be deployed with Grafana templates -grafana: - # -- Enable Grafana Dashboards - enabled: false - # -- Add a default `grafana_dashboard: 1` label - defaultLabel: true - # -- Labels to add to all Grafana integration resources - extraLabels: {} - # -- Annotations to add to all Grafana integration resources - extraAnnotations: {}