diff --git a/.github/workflows/chart-publish.yaml b/.github/workflows/chart-publish.yaml deleted file mode 100644 index 7620cbb4..00000000 --- a/.github/workflows/chart-publish.yaml +++ /dev/null @@ -1,30 +0,0 @@ -name: Release Charts - -on: - push: - branches: - - main - -jobs: - release: - permissions: - contents: write - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - 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@v3 - - - name: Run chart-releaser - uses: helm/chart-releaser-action@v1.6.0 - env: - CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" diff --git a/charts/brouter/.helmignore b/charts/brouter/.helmignore deleted file mode 100644 index 0e8a0eb3..00000000 --- a/charts/brouter/.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/brouter/Chart.yaml b/charts/brouter/Chart.yaml deleted file mode 100644 index d3747fc6..00000000 --- a/charts/brouter/Chart.yaml +++ /dev/null @@ -1,24 +0,0 @@ -apiVersion: v2 -name: brouter-web -description: A Helm chart for Kubernetes - -# A chart can be either an 'application' or a 'library' chart. -# -# Application charts are a collection of templates that can be packaged into versioned archives -# to be deployed. -# -# Library charts provide useful utilities or functions for the chart developer. They're included as -# a dependency of application charts to inject those utilities and functions into the rendering -# pipeline. Library charts do not define any templates and therefore cannot be deployed. -type: application - -# This is the chart version. This version number should be incremented each time you make changes -# to the chart and its templates, including the app version. -# Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.1.0 - -# This is the version number of the application being deployed. This version number should be -# incremented each time you make changes to the application. Versions are not expected to -# follow Semantic Versioning. They should reflect the version the application is using. -# It is recommended to use it with quotes. -appVersion: "1.16.0" diff --git a/charts/brouter/deployment.yaml b/charts/brouter/deployment.yaml deleted file mode 100644 index cc6308ea..00000000 --- a/charts/brouter/deployment.yaml +++ /dev/null @@ -1,324 +0,0 @@ ---- -# Source: brouter-web/templates/web-config.yaml -apiVersion: v1 -kind: ConfigMap -metadata: - name: brouter-web-config - namespace: default -data: - config.js: |- - (function () { - var hostname = window.location.hostname; - var origin = window.location.protocol + '//' + hostname + (window.location.port ? ':' + window.location.port : ''); - - BR.conf = {}; - - // Switch for intermodal routing demo - BR.conf.transit = false; - // or as query parameter (index.html?transit=true#zoom=...) - // (uses search/query (?) not hash (#) params, as config only executed once at load) - // TODO not included in permalink (better replace permalink with hash plugin) - //var params = new URLSearchParams(window.location.search.slice(1)); - //BR.conf.transit = params.has('transit') && (params.get('transit') === 'true'); - - BR.conf.host = origin; - BR.conf.profilesUrl = origin + '/brouter/profiles2/'; - - // name of the web app/instance, e.g. used as GPX creator and link text - BR.conf.appName = 'BRouter-Web'; - BR.conf.privacyPolicyUrl = '/privacypolicy.html'; - - // Set the initial position and zoom level of the map - BR.conf.initialMapLocation = [50.99, 9.86]; - BR.conf.initialMapZoom = 5; - - BR.conf.profiles = [ - 'trekking', - 'fastbike', - 'car-eco', - 'car-fast', - 'safety', - 'shortest', - 'trekking-ignore-cr', - 'trekking-steep', - 'trekking-noferries', - 'trekking-nosteps', - 'moped', - 'rail', - 'river', - 'vm-forum-liegerad-schnell', - 'vm-forum-velomobil-schnell', - 'fastbike-lowtraffic', - 'fastbike-asia-pacific', - 'hiking-mountain', - ]; - - // Map old, renamed legacy profile to new name (from hash of shared or bookmarked URLs) - BR.conf.profilesRename = { - 'hiking-beta': 'hiking-mountain', - }; - - // Removes default base layers when 'true'. Useful for only having custom layers (see below). - BR.conf.clearBaseLayers = false; - - // Add custom tile layers - // URL template see http://leafletjs.com/reference.html#tilelayer - // Multiple entries separated by comma (,) - BR.conf.baseLayers = { - // 'display name': 'url'[,] - // e.g. for offline tiles with https://github.com/develar/mapsforge-tile-server - //'Mapsforge Tile Server': 'http://localhost:6090/{z}/{x}/{y}.png' - }; - - // Base layer to show on start, as position number in the layer switcher, starting from 0, default is first - BR.conf.defaultBaseLayerIndex = 0; - - // Initial route line transparency (0-1, overridden by stored slider setting) - BR.conf.defaultOpacity = 0.67; - - // Minimum transparency slider value on load, values between 0 and 1 (0=invisible). - // 0 = no minimum, use stored setting; 1 = always reset to full visibility on load - BR.conf.minOpacity = 0.3; - - BR.conf.routingStyles = { - trailer: { - weight: 5, - dashArray: [10, 10], - opacity: 0.6, - color: 'magenta', - }, - track: { - weight: 5, - color: 'magenta', - opacity: BR.conf.defaultOpacity, - }, - trackCasing: { - weight: 8, - color: 'white', - // assumed to be same as track, see setOpacity - opacity: BR.conf.defaultOpacity, - }, - nodata: { - color: 'darkred', - }, - beeline: { - weight: 5, - dashArray: [1, 10], - color: 'magenta', - opacity: BR.conf.defaultOpacity, - }, - beelineTrailer: { - weight: 5, - dashArray: [1, 10], - opacity: 0.6, - color: 'magenta', - }, - }; - - BR.conf.markerColors = { - // awesome-markers colors (by color picker) - poi: '#436978', - start: '#72b026', - via: '#38aadd', - stop: '#d63e2a', - }; - - // transit (intermodal routing) demo config - if (BR.conf.transit) { - BR.conf.profiles = [ - '../im/bike', - '../im/foot', - '../im/like-bike', - '../im/like-foot', - 'trekking', - 'fastbike', - 'shortest', - 'moped', - 'car-test', - ]; - } - - // regex needs to be in sync with server, see ServerHandler.getTrackName() - BR.conf.tracknameAllowedChars = 'a-zA-Z0-9 \\._\\-'; - - BR.conf.overpassBaseUrl = 'https://overpass.kumi.systems/api/interpreter'; - - // File size limit in kb for loading tracks - BR.conf.trackSizeLimit = 1024 * 10; - })(); ---- -# Source: brouter-web/templates/service.yaml -apiVersion: v1 -kind: Service -metadata: - name: brouter-api-service - namespace: default - labels: - app: brouter-api -spec: - selector: - app: brouter-api - ports: - - name: api - protocol: TCP - port: 17777 - targetPort: 17777 - type: ClusterIP ---- -# Source: brouter-web/templates/service.yaml -apiVersion: v1 -kind: Service -metadata: - name: brouter-web-service - namespace: default - labels: - app: brouter-web -spec: - selector: - app: brouter-web - ports: - - name: web - protocol: TCP - port: 80 - targetPort: 80 - type: ClusterIP ---- -# Source: brouter-web/templates/deployment.yaml -apiVersion: apps/v1 -kind: Deployment -metadata: - name: brouter-deployment - namespace: default - labels: - app: brouter-api -spec: - selector: - matchLabels: - app: brouter-api - template: - metadata: - labels: - app: brouter-api - spec: - containers: - - name: brouter-api - image: "ghcr.io/koskev/brouter:2024.03.06" - imagePullPolicy: "IfNotPresent" - resources: - requests: - memory: "128Mi" - env: - - name: CLASSPATH - value: "/brouter.jar" - - name: SEGMENTSPATH - value: "/segments4" - - name: PROFILESPATH - value: "/profiles2" - - name: CUSTOMPROFILESPATH - value: "customprofiles" - volumeMounts: - - mountPath: "/segments4" - name: segments - volumes: - - hostPath: - path: /mnt/shared_data/k8s/brouter/segments4 - name: segments ---- -# Source: brouter-web/templates/web-deployment.yaml -apiVersion: apps/v1 -kind: Deployment -metadata: - name: brouter-web-deployment - namespace: default - labels: - app: brouter-web -spec: - selector: - matchLabels: - app: brouter-web - template: - metadata: - labels: - app: brouter-web - spec: - containers: - - name: brouter-web - image: "ghcr.io/koskev/brouter-web:2024.03.06" - imagePullPolicy: "Always" - livenessProbe: - httpGet: - path: / - port: 80 - periodSeconds: 60 - timeoutSeconds: 10 - failureThreshold: 5 - volumeMounts: - - name: brouter-web-config - mountPath: /usr/share/nginx/html/config.js - subPath: config.js - resources: - requests: - memory: "128Mi" - volumes: - - name: brouter-web-config - configMap: - name: brouter-web-config ---- -# Source: brouter-web/templates/cron.yaml -apiVersion: batch/v1 -kind: CronJob -metadata: - name: brouter-segment-update -spec: - schedule: "@weekly" - jobTemplate: - spec: - template: - spec: - containers: - - name: updater - image: busybox:1.36 - imagePullPolicy: IfNotPresent - command: - - /bin/sh - - -c - - "cd /segments4 && for f in *.rd5; do wget -N http://brouter.de/brouter/segments4/$f; done" - volumeMounts: - - mountPath: /segments4 - name: segments - volumes: - - hostPath: - path: /mnt/shared_data/k8s/brouter/segments4 - name: segments - restartPolicy: Never ---- -# Source: brouter-web/templates/ingress.yaml -apiVersion: networking.k8s.io/v1 -kind: Ingress -metadata: - name: brouter-ingress - namespace: default -spec: - ingressClassName: nginx-external - rules: - - host: brouter.kokev.de - http: - paths: - - pathType: Prefix - backend: - service: - name: brouter-web-service - port: - number: 80 - path: / - - pathType: Prefix - backend: - service: - name: brouter-api-service - port: - number: 17777 - path: /brouter - tls: - - hosts: - - brouter.kokev.de - secretName: brouter-tls diff --git a/charts/brouter/templates/cron.yaml b/charts/brouter/templates/cron.yaml deleted file mode 100644 index 5ce5fbd6..00000000 --- a/charts/brouter/templates/cron.yaml +++ /dev/null @@ -1,27 +0,0 @@ -apiVersion: batch/v1 -kind: CronJob -metadata: - name: {{ .Release.Name }}-segment-update -spec: - schedule: "@weekly" - jobTemplate: - spec: - template: - spec: - containers: - - name: updater - image: busybox:1.36 - imagePullPolicy: IfNotPresent - command: - - /bin/sh - - -c - - "cd /segments4 && for f in *.rd5; do wget -N {{ .Values.update.url }}/$f; done" - volumeMounts: - - mountPath: /segments4 - name: segments - {{- with .Values.brouter.volumes }} - volumes: - {{- toYaml . | nindent 12 }} - {{- end }} - restartPolicy: Never - diff --git a/charts/brouter/templates/deployment.yaml b/charts/brouter/templates/deployment.yaml deleted file mode 100644 index 28407ca7..00000000 --- a/charts/brouter/templates/deployment.yaml +++ /dev/null @@ -1,43 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ .Release.Name }}-deployment - namespace: {{ .Release.Namespace }} - labels: - app: {{ .Release.Name }}-api -spec: - selector: - matchLabels: - app: {{ .Release.Name }}-api - template: - metadata: - labels: - app: {{ .Release.Name }}-api - spec: - {{- with .Values.nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 8 }} - {{- end }} - containers: - - name: {{ .Release.Name }}-api - image: "{{ .Values.brouter.image.repository }}:{{ .Values.brouter.image.tag }}" - imagePullPolicy: "{{ .Values.brouter.image.pullPolicy }}" - resources: - requests: - memory: "128Mi" - env: - - name: CLASSPATH - value: "/brouter.jar" - - name: SEGMENTSPATH - value: "/segments4" - - name: PROFILESPATH - value: "/profiles2" - - name: CUSTOMPROFILESPATH - value: "customprofiles" - volumeMounts: - - mountPath: "/segments4" - name: segments - {{- with .Values.brouter.volumes }} - volumes: - {{- toYaml . | nindent 8 }} - {{- end }} diff --git a/charts/brouter/templates/ingress.yaml b/charts/brouter/templates/ingress.yaml deleted file mode 100644 index 43b068f4..00000000 --- a/charts/brouter/templates/ingress.yaml +++ /dev/null @@ -1,37 +0,0 @@ -{{- if .Values.ingress.enabled }} -apiVersion: networking.k8s.io/v1 -kind: Ingress -metadata: - name: {{ .Release.Name }}-ingress - namespace: {{ .Release.Namespace }} -{{- if and .Values.ingress.tls.enabled .Values.ingress.tls.issuer }} - annotations: - cert-manager.io/cluster-issuer: {{ .Values.ingress.tls.issuer }} -{{ end }} -spec: - ingressClassName: {{ .Values.ingress.ingress_class }} - rules: - - host: {{ .Values.ingress.host }} - http: - paths: - - pathType: Prefix - backend: - service: - name: {{ .Release.Name }}-web-service - port: - number: 80 - path: / - - pathType: Prefix - backend: - service: - name: {{ .Release.Name }}-api-service - port: - number: 17777 - path: /brouter -{{- if .Values.ingress.tls.enabled }} - tls: - - hosts: - - {{ .Values.ingress.host }} - secretName: {{ .Values.ingress.tls.secret }} -{{ end }} -{{ end }} diff --git a/charts/brouter/templates/service.yaml b/charts/brouter/templates/service.yaml deleted file mode 100644 index 81348cc7..00000000 --- a/charts/brouter/templates/service.yaml +++ /dev/null @@ -1,33 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ .Release.Name }}-api-service - namespace: {{ .Release.Namespace }} - labels: - app: {{ .Release.Name }}-api -spec: - selector: - app: {{ .Release.Name }}-api - ports: - - name: api - protocol: TCP - port: 17777 - targetPort: 17777 - type: ClusterIP ---- -apiVersion: v1 -kind: Service -metadata: - name: {{ .Release.Name }}-web-service - namespace: {{ .Release.Namespace }} - labels: - app: {{ .Release.Name }}-web -spec: - selector: - app: {{ .Release.Name }}-web - ports: - - name: web - protocol: TCP - port: 80 - targetPort: 80 - type: ClusterIP diff --git a/charts/brouter/templates/web-config.yaml b/charts/brouter/templates/web-config.yaml deleted file mode 100644 index 763cde53..00000000 --- a/charts/brouter/templates/web-config.yaml +++ /dev/null @@ -1,147 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ .Release.Name }}-web-config - namespace: {{ .Release.Namespace }} -data: - config.js: |- - (function () { - var hostname = window.location.hostname; - var origin = window.location.protocol + '//' + hostname + (window.location.port ? ':' + window.location.port : ''); - - BR.conf = {}; - - // Switch for intermodal routing demo - BR.conf.transit = false; - // or as query parameter (index.html?transit=true#zoom=...) - // (uses search/query (?) not hash (#) params, as config only executed once at load) - // TODO not included in permalink (better replace permalink with hash plugin) - //var params = new URLSearchParams(window.location.search.slice(1)); - //BR.conf.transit = params.has('transit') && (params.get('transit') === 'true'); - - BR.conf.host = origin; - BR.conf.profilesUrl = origin + '/brouter/profiles2/'; - - // name of the web app/instance, e.g. used as GPX creator and link text - BR.conf.appName = 'BRouter-Web'; - BR.conf.privacyPolicyUrl = '/privacypolicy.html'; - - // Set the initial position and zoom level of the map - BR.conf.initialMapLocation = [50.99, 9.86]; - BR.conf.initialMapZoom = 5; - - BR.conf.profiles = [ - 'trekking', - 'fastbike', - 'car-eco', - 'car-fast', - 'safety', - 'shortest', - 'trekking-ignore-cr', - 'trekking-steep', - 'trekking-noferries', - 'trekking-nosteps', - 'moped', - 'rail', - 'river', - 'vm-forum-liegerad-schnell', - 'vm-forum-velomobil-schnell', - 'fastbike-lowtraffic', - 'fastbike-asia-pacific', - 'hiking-mountain', - ]; - - // Map old, renamed legacy profile to new name (from hash of shared or bookmarked URLs) - BR.conf.profilesRename = { - 'hiking-beta': 'hiking-mountain', - }; - - // Removes default base layers when 'true'. Useful for only having custom layers (see below). - BR.conf.clearBaseLayers = false; - - // Add custom tile layers - // URL template see http://leafletjs.com/reference.html#tilelayer - // Multiple entries separated by comma (,) - BR.conf.baseLayers = { - // 'display name': 'url'[,] - // e.g. for offline tiles with https://github.com/develar/mapsforge-tile-server - //'Mapsforge Tile Server': 'http://localhost:6090/{z}/{x}/{y}.png' - }; - - // Base layer to show on start, as position number in the layer switcher, starting from 0, default is first - BR.conf.defaultBaseLayerIndex = 0; - - // Initial route line transparency (0-1, overridden by stored slider setting) - BR.conf.defaultOpacity = 0.67; - - // Minimum transparency slider value on load, values between 0 and 1 (0=invisible). - // 0 = no minimum, use stored setting; 1 = always reset to full visibility on load - BR.conf.minOpacity = 0.3; - - BR.conf.routingStyles = { - trailer: { - weight: 5, - dashArray: [10, 10], - opacity: 0.6, - color: 'magenta', - }, - track: { - weight: 5, - color: 'magenta', - opacity: BR.conf.defaultOpacity, - }, - trackCasing: { - weight: 8, - color: 'white', - // assumed to be same as track, see setOpacity - opacity: BR.conf.defaultOpacity, - }, - nodata: { - color: 'darkred', - }, - beeline: { - weight: 5, - dashArray: [1, 10], - color: 'magenta', - opacity: BR.conf.defaultOpacity, - }, - beelineTrailer: { - weight: 5, - dashArray: [1, 10], - opacity: 0.6, - color: 'magenta', - }, - }; - - BR.conf.markerColors = { - // awesome-markers colors (by color picker) - poi: '#436978', - start: '#72b026', - via: '#38aadd', - stop: '#d63e2a', - }; - - // transit (intermodal routing) demo config - if (BR.conf.transit) { - BR.conf.profiles = [ - '../im/bike', - '../im/foot', - '../im/like-bike', - '../im/like-foot', - 'trekking', - 'fastbike', - 'shortest', - 'moped', - 'car-test', - ]; - } - - // regex needs to be in sync with server, see ServerHandler.getTrackName() - BR.conf.tracknameAllowedChars = 'a-zA-Z0-9 \\._\\-'; - - BR.conf.overpassBaseUrl = 'https://overpass.kumi.systems/api/interpreter'; - - // File size limit in kb for loading tracks - BR.conf.trackSizeLimit = 1024 * 10; - })(); - diff --git a/charts/brouter/templates/web-deployment.yaml b/charts/brouter/templates/web-deployment.yaml deleted file mode 100644 index 5fa3102b..00000000 --- a/charts/brouter/templates/web-deployment.yaml +++ /dev/null @@ -1,42 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ .Release.Name }}-web-deployment - namespace: {{ .Release.Namespace }} - labels: - app: {{ .Release.Name }}-web -spec: - selector: - matchLabels: - app: {{ .Release.Name }}-web - template: - metadata: - labels: - app: {{ .Release.Name }}-web - spec: - {{- with .Values.nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 8 }} - {{- end }} - containers: - - name: {{ .Release.Name }}-web - image: "{{ .Values.brouter_web.image.repository }}:{{ .Values.brouter_web.image.tag }}" - imagePullPolicy: "{{ .Values.brouter_web.image.pullPolicy }}" - livenessProbe: - httpGet: - path: / - port: 80 - periodSeconds: 60 - timeoutSeconds: 10 - failureThreshold: 5 - volumeMounts: - - name: brouter-web-config - mountPath: /usr/share/nginx/html/config.js - subPath: config.js - resources: - requests: - memory: "128Mi" - volumes: - - name: brouter-web-config - configMap: - name: {{ .Release.Name }}-web-config diff --git a/charts/brouter/values.yaml b/charts/brouter/values.yaml deleted file mode 100644 index ecbe2372..00000000 --- a/charts/brouter/values.yaml +++ /dev/null @@ -1,34 +0,0 @@ - -ingress: - enabled: true - ingress_class: nginx-external - host: brouter.kokev.de - tls: - enabled: true - issuer: "kokev-issuer" - secret: brouter-tls - -update: - url: http://brouter.de/brouter/segments4 - -brouter: - image: - repository: ghcr.io/koskev/brouter - pullPolicy: IfNotPresent - tag: "2024.03.06" - volumes: - - name: segments - hostPath: - path: /mnt/shared_data/k8s/brouter/segments4 - -brouter_web: - image: - repository: ghcr.io/koskev/brouter-web - pullPolicy: IfNotPresent - tag: "2024.03.06" - - - - - -