diff --git a/bases/readsb/redux/readsb.yaml b/bases/readsb/redux/readsb.yaml index 81c5b52..f953b21 100644 --- a/bases/readsb/redux/readsb.yaml +++ b/bases/readsb/redux/readsb.yaml @@ -7,7 +7,8 @@ spec: spec: volumes: - name: run - emptyDir: {} + emptyDir: + medium: Memory - name: serve-run-http-config configMap: name: serve-run-http-config @@ -20,22 +21,19 @@ spec: resources: limits: cpu: "1" - memory: 512Mi + memory: 768Mi requests: cpu: 100m - memory: 128Mi + memory: 256Mi startupProbe: tcpSocket: port: 30004 - initialDelaySeconds: 15 livenessProbe: tcpSocket: port: 30004 - initialDelaySeconds: 15 readinessProbe: tcpSocket: port: 30004 - initialDelaySeconds: 15 ports: - containerPort: 30004 name: adsb-in diff --git a/manifests/default/kustomization.yaml b/manifests/default/kustomization.yaml index 41b2d9c..59bdfa3 100644 --- a/manifests/default/kustomization.yaml +++ b/manifests/default/kustomization.yaml @@ -21,4 +21,4 @@ images: - name: ghcr.io/adsblol/mlat-server-sync-map newTag: master-413c02fc-1675794709 # {"$imagepolicy": "adsblol:mlat-server-sync-map:tag"} - name: ghcr.io/katlol/readsb - newTag: 3ef880844dde1a18d5b053cb0775064083171f93 + newTag: dev diff --git a/manifests/default/planes/test/kustomization.yaml b/manifests/default/planes/test/kustomization.yaml index 23495e9..88231e4 100644 --- a/manifests/default/planes/test/kustomization.yaml +++ b/manifests/default/planes/test/kustomization.yaml @@ -12,7 +12,9 @@ configMapGenerator: literals: - config.js=PageName = "ADSB.lol - Open Source ADSB/MLAT aggregator."; BingMapsAPIKey = "AqCdYNFHcAZuy4k9zT_UXZMdfSo5zN-mImkwN6PzcXNYyo0bYHaHik2F8qg-h1c1"; shareBaseUrl = "https://test.adsb.lol";MapType_tar1090="osm"; - globeRates.json={"refresh:" 500} - +- name: mount-run + files: + - run.sh patches: - target: kind: Deployment @@ -27,6 +29,7 @@ patches: - op: add path: /spec/template/spec/containers/0/command value: + - /mount-run/run.sh - /usr/local/bin/readsb - --net - --quiet @@ -44,7 +47,7 @@ patches: - --net-json-port=30047 - --net-api-port=30152 - --net-sbs-in-port=32006 - - --net-connector=hub-readsb,30006,beast_in + - --net-connector=hub-readsb,30005,beast_in - --net-connector=mlat-mlat-server,30104,sbs_in_mlat - --debug=nS - --net-receiver-id @@ -104,23 +107,41 @@ patches: requests: storage: 10Gi # Add another volumeClaimTemplate for run-readsb (remove & add to avoid index 0) - - op: remove - path: /spec/template/spec/volumes/0 - - op: add - path: /spec/volumeClaimTemplates/- - value: - metadata: - name: run - spec: - storageClassName: nfs-provisioner - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 10Gi - op: add path: /spec/template/spec/volumes/- value: name: html-overlay configMap: name: html-overlay + # Add mount-run + - op: add + path: /spec/template/spec/volumes/- + value: + name: mount-run + configMap: + name: mount-run + defaultMode: 0755 + # Add volumeMount for container 0 for mount-run/run.sh + - op: add + path: /spec/template/spec/containers/0/volumeMounts/- + value: + name: mount-run + mountPath: /mount-run/run.sh + subPath: run.sh + - op: add + path: /spec/template/spec/containers/0/resources/limits/memory + value: 1500Mi + # add stdin/tty to the container + - op: add + path: /spec/template/spec/containers/0/stdin + value: true + - op: add + path: /spec/template/spec/containers/0/tty + value: true + # UpdateStrategy + - op: add + path: /spec/updateStrategy + value: + type: RollingUpdate + rollingUpdate: + partition: 0 diff --git a/manifests/default/planes/test/run.sh b/manifests/default/planes/test/run.sh new file mode 100644 index 0000000..14b7fd3 --- /dev/null +++ b/manifests/default/planes/test/run.sh @@ -0,0 +1,8 @@ +#!/bin/bash +set -ex + +if [ "$HOSTNAME" = planes-readsb-test-0 ]; then + exec gdb -ex="set breakpoint pending on" -ex="break exit" -ex="break _exit" -ex=run --args $* +else + exec $* +fi diff --git a/manifests/default/resources.yaml b/manifests/default/resources.yaml index 6a0a68c..72d3d13 100644 --- a/manifests/default/resources.yaml +++ b/manifests/default/resources.yaml @@ -114,9 +114,9 @@ metadata: name: globe-reapi annotations: external-dns.alpha.kubernetes.io/cloudflare-proxied: "true" - # nginx.ingress.kubernetes.io/affinity: "cookie" - # nginx.ingress.kubernetes.io/session-cookie-name: "globe-reapi-sticky" - # nginx.ingress.kubernetes.io/session-cookie-max-age: "86400" + nginx.ingress.kubernetes.io/affinity: "cookie" + nginx.ingress.kubernetes.io/session-cookie-name: "globe-reapi-sticky" + nginx.ingress.kubernetes.io/session-cookie-max-age: "86400" spec: tls: - hosts: @@ -130,7 +130,7 @@ spec: pathType: Prefix backend: service: - name: planes-readsb + name: planes-readsb-test port: name: http-api - host: test.adsb.lol @@ -140,7 +140,7 @@ spec: pathType: Prefix backend: service: - name: planes-readsb-test + name: planes-readsb port: name: http-api --- @@ -149,11 +149,11 @@ apiVersion: networking.k8s.io/v1 metadata: name: tar1090 annotations: + nginx.ingress.kubernetes.io/affinity: "cookie" + nginx.ingress.kubernetes.io/session-cookie-name: "tar1090-sticky" + nginx.ingress.kubernetes.io/session-cookie-max-age: "86400" external-dns.alpha.kubernetes.io/cloudflare-proxied: "true" nginx.ingress.kubernetes.io/configuration-snippet: | - location /graphs1090 { - return 302 https://grafana.adsb.lol/public-dashboards/4fcdab6726f34960b73be95ecb74386e; - } location /globeRates.json { return 200 "{\"refresh\": 500}" ;} spec: tls: @@ -168,7 +168,7 @@ spec: pathType: Prefix backend: service: - name: planes-readsb + name: planes-readsb-test port: name: http - host: test.adsb.lol @@ -178,7 +178,7 @@ spec: pathType: Prefix backend: service: - name: planes-readsb-test + name: planes-readsb port: name: http --- @@ -295,6 +295,30 @@ spec: port: name: http --- +kind: Ingress +apiVersion: networking.k8s.io/v1 +metadata: + name: re-api + annotations: + external-dns.alpha.kubernetes.io/cloudflare-proxied: "true" +spec: + tls: + - hosts: + - adsb.lol + secretName: adsblol-tls + rules: + - host: re-api.adsb.lol + http: + paths: + - path: /re-api/ + pathType: Prefix + backend: + service: + name: reapi-readsb + port: + name: http-api + +--- apiVersion: networking.k8s.io/v1 kind: NetworkPolicy metadata: