diff --git a/hetzner-test-helm-values.yaml b/hetzner-test-helm-values.yaml new file mode 100644 index 00000000..2277e3dc --- /dev/null +++ b/hetzner-test-helm-values.yaml @@ -0,0 +1,83 @@ +# Provide additional config in toml format. Broker and result-backend connection strings are generated by the chart and do not need to be supplied here. +# customConfig: | +# wms-read-timeout = 700 + +celery: + image: + repository: repo.heigit.org/heigit/sketch-map-tool + tag: main + + # Configuration for the volume that holds the weights + persistence: + accessModes: + - ReadWriteOnce + size: 10Gi + storageClassName: local-lvm + + resources: + limits: + cpu: 2000m + memory: 24Gi + requests: + # scheduling of new pod (minimal resource requirement) + cpu: 500m + memory: 15Gi + +flask: + image: + repository: repo.heigit.org/heigit/sketch-map-tool + tag: main + + ingress: + # Tell proxy to make flask public + enabled: true + className: traefik + annotations: + cert-manager.io/cluster-issuer: letsencrypt-prod + hosts: + - host: smt.heigitk8s.de + paths: + - path: / + pathType: ImplementationSpecific + tls: + - secretName: smt-heigitk8s-de-tls + hosts: + - smt.heigitk8s.de + + resources: + limits: + cpu: 400m + memory: 2Gi + requests: + cpu: 200m + memory: 1Gi + +flower: + image: + repository: repo.heigit.org/heigit/sketch-map-tool + tag: main + + ingress: + enabled: false + + resources: + limits: + cpu: 200m + memory: 1Gi + requests: + cpu: 100m + memory: 512Mi + +postgres: + nodeSelector: + instance.hetzner.cloud/provided-by: cloud + storage: + requestedSize: 100Gi + className: hcloud-volumes + +redis: + nodeSelector: + instance.hetzner.cloud/provided-by: cloud + storage: + requestedSize: 10Gi + className: hcloud-volumes diff --git a/manifests/.gitignore b/manifests/.gitignore new file mode 100644 index 00000000..1a162213 --- /dev/null +++ b/manifests/.gitignore @@ -0,0 +1,2 @@ +sketch-map-tool/charts/ +Chart.lock diff --git a/manifests/sketch-map-tool/.helmignore b/manifests/sketch-map-tool/.helmignore new file mode 100644 index 00000000..0e8a0eb3 --- /dev/null +++ b/manifests/sketch-map-tool/.helmignore @@ -0,0 +1,23 @@ +# 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/manifests/sketch-map-tool/Chart.yaml b/manifests/sketch-map-tool/Chart.yaml new file mode 100644 index 00000000..b7063a16 --- /dev/null +++ b/manifests/sketch-map-tool/Chart.yaml @@ -0,0 +1,32 @@ +apiVersion: v2 +name: sketch-map-tool +description: A Helm chart for SketchMapTool +icon: https://heigit.org/wp-content/uploads/2025/11/SketchMap_Logo.svg +type: application + +sources: + - https://github.com/GIScience/sketch-map-tool +maintainers: + - name: HeiGIT + url: https://heigit.org/ + +dependencies: + - name: postgres + repository: https://groundhog2k.github.io/helm-charts + condition: postgres.enabled + version: 1.6.1 + - name: redis + repository: https://groundhog2k.github.io/helm-charts + condition: redis.enabled + version: 2.3.0 + +# 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: 0.3.1 + +# 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 +# follow Semantic Versioning. They should reflect the version the application is using. +# It is recommended to use it with quotes. +appVersion: "2025.11.28" diff --git a/manifests/sketch-map-tool/README.md b/manifests/sketch-map-tool/README.md new file mode 100644 index 00000000..adbf97a1 --- /dev/null +++ b/manifests/sketch-map-tool/README.md @@ -0,0 +1,16 @@ +# SketchMapTool Helm chart +## Result-backend database configuration +SketchMapTool requires a postgres database to run. +- Default config: A database will be deployed along side SMT with default passwords. +- Supply your own database: Set `postgres.enabled` to `false`. Provide the connection details of your external postgres host at `postgres.external`. + +## Broker cache configuration +SketchMapTool requires a redis cache to run. +- Default config: A redis cache will be deployed along side SMT. +- Supply your own cache: Set `redis.enabled` to `false`. Provide the connection details of your external redis host at `redis.external.connectionString`. + +## Generic configuration +Any additional config options can be supplied in toml format under the `customConfig` key. + +## External access +By default this chart deploys two services to kubernetes, flask and flower. These are not exposed outside the cluster unless you enable either ingress or httpRoute for them, depending on which API your cluster supports. If, for example, you want to expose flask with an ingress you should set `flask.ingress.enabled` to true and configure your ingress with the other options under `flask.ingress`. diff --git a/manifests/sketch-map-tool/templates/_helpers.tpl b/manifests/sketch-map-tool/templates/_helpers.tpl new file mode 100644 index 00000000..241a29fc --- /dev/null +++ b/manifests/sketch-map-tool/templates/_helpers.tpl @@ -0,0 +1,122 @@ +{{/* +Expand the name of the chart. +*/}} +{{- define "sketch-map-tool.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 "sketch-map-tool.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 "sketch-map-tool.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Common labels +*/}} +{{- define "sketch-map-tool.labels" -}} +helm.sh/chart: {{ include "sketch-map-tool.chart" . }} +{{ include "sketch-map-tool.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end }} + +{{/* +Selector labels +*/}} +{{- define "sketch-map-tool.selectorLabels" -}} +app.kubernetes.io/name: {{ include "sketch-map-tool.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} + +{{- define "sketch-map-tool.postgresVars" -}} +- name: SMT_POSTGRES_HOST + value: {{ ternary (printf "%s-postgres" .Release.Name) .Values.postgres.external.host .Values.postgres.enabled }} +{{- with .Values.postgres.external.port }} +- name: SMT_POSTGRES_PORT + value: {{ quote .Values.postgres.external.port }} +{{- end }} +- name: SMT_POSTGRES_DBNAME + {{- if .Values.postgres.enabled }} + {{- if .Values.postgres.userDatabase.name.secretKey }} + valueFrom: + secretKeyRef: + key: {{ .Values.postgres.userDatabase.name.secretKey }} + name: {{ .Values.postgres.userDatabase.existingSecret }} + {{- else }} + value: {{ .Values.postgres.userDatabase.name.value }} + {{- end }} + {{- else }} + value: {{ .Values.postgres.external.database }} + {{- end }} +- name: SMT_POSTGRES_USER + {{- if .Values.postgres.enabled }} + {{- if .Values.postgres.userDatabase.user.secretKey }} + valueFrom: + secretKeyRef: + key: {{ .Values.postgres.userDatabase.user.secretKey }} + name: {{ .Values.postgres.userDatabase.existingSecret }} + {{- else }} + value: {{ .Values.postgres.userDatabase.user.value }} + {{- end }} + {{- else }} + value: {{ .Values.postgres.external.user }} + {{- end }} +- name: SMT_POSTGRES_PASSWORD + {{- if .Values.postgres.enabled }} + {{- if .Values.postgres.userDatabase.password.secretKey }} + valueFrom: + secretKeyRef: + key: {{ .Values.postgres.userDatabase.password.secretKey }} + name: {{ .Values.postgres.userDatabase.existingSecret }} + {{- else }} + value: {{ .Values.postgres.userDatabase.password.value }} + {{- end }} + {{- else }} + value: {{ .Values.postgres.external.password }} + {{- end }} +{{- end }} + +{{- define "sketch-map-tool.redisVars" -}} +- name: SMT_REDIS_HOST + value: {{ ternary (printf "%s-redis" .Release.Name) .Values.redis.external.host .Values.redis.enabled }} +{{- with .Values.redis.external.port }} +- name: SMT_REDIS_PORT + value: {{ quote .Values.redis.external.port }} +{{- end }} +{{- if not .Values.redis.enabled }} +{{- with .Values.redis.external.dbNumber }} +- name: SMT_REDIS_DB_NUMBER + value: {{ quote .Values.redis.external.dbNumber }} +{{- end }} +{{- with .Values.redis.external.username }} +- name: SMT_REDIS_USERNAME + value: {{ quote .Values.redis.external.username }} +{{- end }} +{{- with .Values.redis.external.password }} +- name: SMT_REDIS_PASSWORD + value: {{ quote .Values.redis.external.password }} +{{- end }} +{{- end }} +{{- end }} diff --git a/manifests/sketch-map-tool/templates/celery/deployment.yaml b/manifests/sketch-map-tool/templates/celery/deployment.yaml new file mode 100644 index 00000000..220b95eb --- /dev/null +++ b/manifests/sketch-map-tool/templates/celery/deployment.yaml @@ -0,0 +1,74 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "sketch-map-tool.fullname" . }}-celery + labels: + {{- include "sketch-map-tool.labels" . | nindent 4 }} + app.kubernetes.io/component: celery +spec: + replicas: 1 + selector: + matchLabels: + {{- include "sketch-map-tool.selectorLabels" . | nindent 6 }} + app.kubernetes.io/component: celery + strategy: + type: Recreate + template: + metadata: + labels: + {{- include "sketch-map-tool.selectorLabels" . | nindent 8 }} + app.kubernetes.io/component: celery + spec: + initContainers: + - name: download-weights + image: debian:stable-slim + command: + - sh + - -c + args: + - "apt-get update && apt-get install -y wget && wget --timestamping --directory-prefix /data/weights {{ .Values.celery.weightsSourceUrl.osm }} {{ .Values.celery.weightsSourceUrl.esri }} {{ .Values.celery.weightsSourceUrl.cls }}" + volumeMounts: + - name: weights + mountPath: /data/weights + containers: + - name: celery + image: "{{ .Values.celery.image.repository }}:{{ .Values.celery.image.tag | default .Chart.AppVersion }}" + command: + - celery + - --app + - sketch_map_tool.tasks + - worker + - --beat + - --concurrency + - "6" + - --loglevel + - INFO + - -E + env: + {{- include "sketch-map-tool.postgresVars" . | nindent 12 }} + {{- include "sketch-map-tool.redisVars" . | nindent 12 }} + {{- with .Values.celery.resources }} + resources: + {{- toYaml . | nindent 12 }} + {{- end }} + volumeMounts: + - name: weights + mountPath: /app/weights + {{- if .Values.customConfig }} + - name: config + mountPath: /app/config + {{- end }} + {{- with .Values.celery.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + restartPolicy: Always + volumes: + - name: weights + persistentVolumeClaim: + claimName: {{ include "sketch-map-tool.fullname" . }}-celery-weights + {{- if .Values.customConfig }} + - name: config + secret: + secretName: {{ include "sketch-map-tool.fullname" . }}-custom-config + {{- end }} diff --git a/manifests/sketch-map-tool/templates/celery/persistent-volume-claim.yaml b/manifests/sketch-map-tool/templates/celery/persistent-volume-claim.yaml new file mode 100644 index 00000000..a8005469 --- /dev/null +++ b/manifests/sketch-map-tool/templates/celery/persistent-volume-claim.yaml @@ -0,0 +1,18 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: {{ include "sketch-map-tool.fullname" . }}-celery-weights + labels: + {{- include "sketch-map-tool.labels" . | nindent 4 }} + app.kubernetes.io/component: celery +spec: + accessModes: + {{- range .Values.celery.persistence.accessModes }} + - {{ . | quote }} + {{- end }} + resources: + requests: + storage: {{ .Values.celery.persistence.size | quote }} + {{- if .Values.celery.persistence.storageClassName }} + storageClassName: {{ .Values.celery.persistence.storageClassName }} + {{- end }} diff --git a/manifests/sketch-map-tool/templates/custom-config.yaml b/manifests/sketch-map-tool/templates/custom-config.yaml new file mode 100644 index 00000000..9cf28ceb --- /dev/null +++ b/manifests/sketch-map-tool/templates/custom-config.yaml @@ -0,0 +1,9 @@ +{{- if .Values.customConfig }} +apiVersion: v1 +kind: Secret +metadata: + name: {{ include "sketch-map-tool.fullname" . }}-custom-config +stringData: + config.toml: | + {{- .Values.customConfig | nindent 4 }} +{{- end }} diff --git a/manifests/sketch-map-tool/templates/flask/deployment.yaml b/manifests/sketch-map-tool/templates/flask/deployment.yaml new file mode 100644 index 00000000..63358c09 --- /dev/null +++ b/manifests/sketch-map-tool/templates/flask/deployment.yaml @@ -0,0 +1,52 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "sketch-map-tool.fullname" . }}-flask + labels: + {{- include "sketch-map-tool.labels" . | nindent 4 }} + app.kubernetes.io/component: flask +spec: + replicas: 1 + selector: + matchLabels: + {{- include "sketch-map-tool.selectorLabels" . | nindent 6 }} + app.kubernetes.io/component: flask + template: + metadata: + labels: + {{- include "sketch-map-tool.selectorLabels" . | nindent 8 }} + app.kubernetes.io/component: flask + spec: + containers: + - name: flask + image: "{{ .Values.flask.image.repository }}:{{ .Values.flask.image.tag | default .Chart.AppVersion }}" + command: + - waitress-serve + - sketch_map_tool.routes:app + env: + {{- include "sketch-map-tool.postgresVars" . | nindent 12 }} + {{- include "sketch-map-tool.redisVars" . | nindent 12 }} + ports: + - name: http + containerPort: 8080 + protocol: TCP + {{- with .Values.flask.resources }} + resources: + {{- toYaml . | nindent 12 }} + {{- end }} + {{- if .Values.customConfig }} + volumeMounts: + - name: config + mountPath: /app/config + {{- end }} + {{- with .Values.flask.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + restartPolicy: Always + {{- if .Values.customConfig }} + volumes: + - name: config + secret: + secretName: {{ include "sketch-map-tool.fullname" . }}-custom-config + {{- end }} diff --git a/manifests/sketch-map-tool/templates/flask/http-route.yaml b/manifests/sketch-map-tool/templates/flask/http-route.yaml new file mode 100644 index 00000000..e8f0e9be --- /dev/null +++ b/manifests/sketch-map-tool/templates/flask/http-route.yaml @@ -0,0 +1,37 @@ +{{- if .Values.flask.httpRoute.enabled -}} +apiVersion: gateway.networking.k8s.io/v1 +kind: HTTPRoute +metadata: + name: {{ include "sketch-map-tool.fullname" . }}-flask + labels: + {{- include "sketch-map-tool.labels" . | nindent 4 }} + app.kubernetes.io/component: flask + {{- with .Values.flask.httpRoute.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + parentRefs: + {{- with .Values.flask.httpRoute.parentRefs }} + {{- toYaml . | nindent 4 }} + {{- end }} + {{- with .Values.flask.httpRoute.hostnames }} + hostnames: + {{- toYaml . | nindent 4 }} + {{- end }} + rules: + {{- range .Values.flask.httpRoute.rules }} + {{- with .matches }} + - matches: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .filters }} + filters: + {{- toYaml . | nindent 8 }} + {{- end }} + backendRefs: + - name: {{ include "sketch-map-tool.fullname" . }}-flask + port: 8080 + weight: 1 + {{- end }} +{{- end }} diff --git a/manifests/sketch-map-tool/templates/flask/ingress.yaml b/manifests/sketch-map-tool/templates/flask/ingress.yaml new file mode 100644 index 00000000..a0c0a0f7 --- /dev/null +++ b/manifests/sketch-map-tool/templates/flask/ingress.yaml @@ -0,0 +1,44 @@ +{{- if .Values.flask.ingress.enabled -}} +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: {{ include "sketch-map-tool.fullname" . }}-flask + labels: + {{- include "sketch-map-tool.labels" . | nindent 4 }} + app.kubernetes.io/component: flask + {{- with .Values.flask.ingress.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + {{- with .Values.flask.ingress.className }} + ingressClassName: {{ . }} + {{- end }} + {{- if .Values.flask.ingress.tls }} + tls: + {{- range .Values.flask.ingress.tls }} + - hosts: + {{- range .hosts }} + - {{ . | quote }} + {{- end }} + secretName: {{ .secretName }} + {{- end }} + {{- end }} + rules: + {{- range .Values.flask.ingress.hosts }} + - host: {{ .host | quote }} + http: + paths: + {{- range .paths }} + - path: {{ .path }} + {{- with .pathType }} + pathType: {{ . }} + {{- end }} + backend: + service: + name: {{ include "sketch-map-tool.fullname" $ }}-flask + port: + name: http + {{- end }} + {{- end }} +{{- end }} diff --git a/manifests/sketch-map-tool/templates/flask/service.yaml b/manifests/sketch-map-tool/templates/flask/service.yaml new file mode 100644 index 00000000..01eaeda3 --- /dev/null +++ b/manifests/sketch-map-tool/templates/flask/service.yaml @@ -0,0 +1,16 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "sketch-map-tool.fullname" . }}-flask + labels: + {{- include "sketch-map-tool.labels" . | nindent 4 }} + app.kubernetes.io/component: flask +spec: + ports: + - name: http + port: 8080 + protocol: TCP + targetPort: http + selector: + {{- include "sketch-map-tool.selectorLabels" . | nindent 4 }} + app.kubernetes.io/component: flask diff --git a/manifests/sketch-map-tool/templates/flower/deployment.yaml b/manifests/sketch-map-tool/templates/flower/deployment.yaml new file mode 100644 index 00000000..3030ad4e --- /dev/null +++ b/manifests/sketch-map-tool/templates/flower/deployment.yaml @@ -0,0 +1,40 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "sketch-map-tool.fullname" . }}-flower + labels: + {{- include "sketch-map-tool.labels" . | nindent 4 }} + app.kubernetes.io/component: flower +spec: + replicas: 1 + selector: + matchLabels: + {{- include "sketch-map-tool.selectorLabels" . | nindent 6 }} + app.kubernetes.io/component: flower + template: + metadata: + labels: + {{- include "sketch-map-tool.selectorLabels" . | nindent 8 }} + app.kubernetes.io/component: flower + spec: + containers: + - name: flower + image: "{{ .Values.flower.image.repository }}:{{ .Values.flower.image.tag | default .Chart.AppVersion }}" + command: + - celery + - --app + - sketch_map_tool.tasks + - flower + ports: + - name: http + containerPort: 5555 + protocol: TCP + {{- with .Values.flower.resources }} + resources: + {{- toYaml . | nindent 12 }} + {{- end }} + {{- with .Values.flower.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + restartPolicy: Always diff --git a/manifests/sketch-map-tool/templates/flower/http-route.yaml b/manifests/sketch-map-tool/templates/flower/http-route.yaml new file mode 100644 index 00000000..60f67664 --- /dev/null +++ b/manifests/sketch-map-tool/templates/flower/http-route.yaml @@ -0,0 +1,37 @@ +{{- if .Values.flower.httpRoute.enabled -}} +apiVersion: gateway.networking.k8s.io/v1 +kind: HTTPRoute +metadata: + name: {{ include "sketch-map-tool.fullname" . }}-flower + labels: + {{- include "sketch-map-tool.labels" . | nindent 4 }} + app.kubernetes.io/component: flower + {{- with .Values.flower.httpRoute.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + parentRefs: + {{- with .Values.flower.httpRoute.parentRefs }} + {{- toYaml . | nindent 4 }} + {{- end }} + {{- with .Values.flower.httpRoute.hostnames }} + hostnames: + {{- toYaml . | nindent 4 }} + {{- end }} + rules: + {{- range .Values.flower.httpRoute.rules }} + {{- with .matches }} + - matches: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .filters }} + filters: + {{- toYaml . | nindent 8 }} + {{- end }} + backendRefs: + - name: {{ include "sketch-map-tool.fullname" . }}-flower + port: 5555 + weight: 1 + {{- end }} +{{- end }} diff --git a/manifests/sketch-map-tool/templates/flower/ingress.yaml b/manifests/sketch-map-tool/templates/flower/ingress.yaml new file mode 100644 index 00000000..19dafbe6 --- /dev/null +++ b/manifests/sketch-map-tool/templates/flower/ingress.yaml @@ -0,0 +1,44 @@ +{{- if .Values.flower.ingress.enabled -}} +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: {{ include "sketch-map-tool.fullname" . }}-flower + labels: + {{- include "sketch-map-tool.labels" . | nindent 4 }} + app.kubernetes.io/component: flower + {{- with .Values.flower.ingress.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + {{- with .Values.flower.ingress.className }} + ingressClassName: {{ . }} + {{- end }} + {{- if .Values.flower.ingress.tls }} + tls: + {{- range .Values.flower.ingress.tls }} + - hosts: + {{- range .hosts }} + - {{ . | quote }} + {{- end }} + secretName: {{ .secretName }} + {{- end }} + {{- end }} + rules: + {{- range .Values.flower.ingress.hosts }} + - host: {{ .host | quote }} + http: + paths: + {{- range .paths }} + - path: {{ .path }} + {{- with .pathType }} + pathType: {{ . }} + {{- end }} + backend: + service: + name: {{ include "sketch-map-tool.fullname" $ }}-flower + port: + name: http + {{- end }} + {{- end }} +{{- end }} diff --git a/manifests/sketch-map-tool/templates/flower/service.yaml b/manifests/sketch-map-tool/templates/flower/service.yaml new file mode 100644 index 00000000..aadf928f --- /dev/null +++ b/manifests/sketch-map-tool/templates/flower/service.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "sketch-map-tool.fullname" . }}-flower + labels: + {{- include "sketch-map-tool.labels" . | nindent 4 }} + app.kubernetes.io/component: flower +spec: + ports: + - name: http + port: 5555 + protocol: TCP + targetPort: http + selector: + {{- include "sketch-map-tool.selectorLabels" . | nindent 4 }} diff --git a/manifests/sketch-map-tool/values.yaml b/manifests/sketch-map-tool/values.yaml new file mode 100644 index 00000000..fb74d138 --- /dev/null +++ b/manifests/sketch-map-tool/values.yaml @@ -0,0 +1,193 @@ +# Default values for sketch-map-tool. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +# Provide additional config in toml format. Broker and result-backend connection strings are generated by the chart and do not need to be supplied here. +# customConfig: | +# wms-read-timeout = 700 + +celery: + image: + repository: repo.example.org/smt + # Overrides the image tag whose default is the chart appVersion. + tag: "" + + # Configuration for the volume that holds the weights + persistence: + accessModes: + - ReadWriteOnce + size: 1Gi + # storageClassName: + + nodeSelector: {} + + weightsSourceUrl: + osm: "https://downloads.ohsome.org/sketch-map-tool/weights/SMT-OSM.pt" + esri: "https://downloads.ohsome.org/sketch-map-tool/weights/SMT-ESRI.pt" + cls: "https://downloads.ohsome.org/sketch-map-tool/weights/SMT-CLS.pt" + +flask: + image: + repository: repo.example.org/smt + # Overrides the image tag whose default is the chart appVersion. + tag: "" + + nodeSelector: {} + + ingress: + enabled: false + className: "" + annotations: {} + hosts: + - host: chart-example.local + paths: + - path: / + pathType: ImplementationSpecific + tls: [] + # - secretName: chart-example-tls + # hosts: + # - chart-example.local + + # -- Expose flask via gateway-api HTTPRoute + # Requires Gateway API resources and suitable controller installed within the cluster + # (see: https://gateway-api.sigs.k8s.io/guides/) + httpRoute: + # HTTPRoute enabled. + enabled: false + # HTTPRoute annotations. + annotations: {} + # Which Gateways this Route is attached to. + parentRefs: + - name: gateway + sectionName: http + # namespace: default + # Hostnames matching HTTP header. + hostnames: + - chart-example.local + # List of rules and filters applied. + rules: + - matches: + - path: + type: PathPrefix + value: / + +flower: + image: + repository: repo.example.org/smt + # Overrides the image tag whose default is the chart appVersion. + tag: "" + + nodeSelector: {} + + ingress: + enabled: false + className: "" + annotations: {} + hosts: + - host: chart-example.local + paths: + - path: / + pathType: ImplementationSpecific + tls: [] + # - secretName: chart-example-tls + # hosts: + # - chart-example.local + + # -- Expose flower via gateway-api HTTPRoute + # Requires Gateway API resources and suitable controller installed within the cluster + # (see: https://gateway-api.sigs.k8s.io/guides/) + httpRoute: + # HTTPRoute enabled. + enabled: false + # HTTPRoute annotations. + annotations: {} + # Which Gateways this Route is attached to. + parentRefs: + - name: gateway + sectionName: http + # namespace: default + # Hostnames matching HTTP header. + hostnames: + - chart-example.local + # List of rules and filters applied. + rules: + - matches: + - path: + type: PathPrefix + value: / + +postgres: + # When enabled groundhog2k/postgres helm chart is deployed along side the SketchMapTool. Set to false when using your own Postgres database in- or outside of Kubernetes. + # For full values see here https://artifacthub.io/packages/helm/groundhog2k/postgres?modal=values + enabled: true + # When postgres.enabled is false set the connection credentials here. Ignored otherwises + external: + host: "" + # port: "" + database: "" + user: "" + password: "" + settings: + superuserPassword: + value: smtpgadminpw + userDatabase: + name: + value: smt + user: + value: smtuser + password: + value: smtuserpw + resources: + limits: + cpu: 500m + memory: 1024Mi + requests: + cpu: 500m + memory: 1024Mi + customConfig: | + # Generated with https://pgtune.leopard.in.ua/ + # DB Version: 17 + # OS Type: linux + # DB Type: web + # Total Memory (RAM): 1 GB + # Data Storage: ssd + + max_connections = 200 + shared_buffers = 256MB + effective_cache_size = 768MB + maintenance_work_mem = 64MB + checkpoint_completion_target = 0.9 + wal_buffers = 7864kB + default_statistics_target = 100 + random_page_cost = 1.1 + effective_io_concurrency = 200 + work_mem = 1260kB + huge_pages = off + min_wal_size = 1GB + max_wal_size = 4GB + storage: + requestedSize: 100Gi + # className: + +redis: + # When enabled groundhog2k/redis helm chart is deployed along side the SketchMapTool. Set to false when using your own redis cache in- or outside of Kubernetes. + # For full values see here https://artifacthub.io/packages/helm/groundhog2k/redis?modal=values + enabled: true + # When redis.enabled is false set the connection credentials here. Ignored otherwises + external: + host: "" + # port: "" + # dbNumber: "" + # username: "" + # password: "" + + resources: + limits: + cpu: 100m + memory: 512Mi + requests: + cpu: 100m + memory: 512Mi + storage: + requestedSize: 10Gi + # className: