From 0048bea95ca3ea445202e85416c3d2f22cd38695 Mon Sep 17 00:00:00 2001 From: Manuel Ruck Date: Mon, 2 Oct 2023 22:57:07 +0200 Subject: [PATCH 1/5] remove gorush Signed-off-by: Manuel Ruck --- kustomize/base/gorush/gorush-config.yaml | 47 ------------- kustomize/base/gorush/gorush-configmap.yaml | 9 --- kustomize/base/gorush/gorush-deployment.yaml | 67 ------------------- kustomize/base/gorush/gorush-namespace.yaml | 4 -- .../base/gorush/gorush-redis-deployment.yaml | 24 ------- .../base/gorush/gorush-redis-service.yaml | 17 ----- kustomize/base/gorush/gorush-service.yaml | 15 ----- kustomize/base/gorush/kustomization.yaml | 14 ---- kustomize/base/main/kustomization.yaml | 1 - .../overlays/local/push-notifications.env | 1 - 10 files changed, 199 deletions(-) delete mode 100644 kustomize/base/gorush/gorush-config.yaml delete mode 100644 kustomize/base/gorush/gorush-configmap.yaml delete mode 100644 kustomize/base/gorush/gorush-deployment.yaml delete mode 100644 kustomize/base/gorush/gorush-namespace.yaml delete mode 100644 kustomize/base/gorush/gorush-redis-deployment.yaml delete mode 100644 kustomize/base/gorush/gorush-redis-service.yaml delete mode 100644 kustomize/base/gorush/gorush-service.yaml delete mode 100644 kustomize/base/gorush/kustomization.yaml diff --git a/kustomize/base/gorush/gorush-config.yaml b/kustomize/base/gorush/gorush-config.yaml deleted file mode 100644 index b6ed47c..0000000 --- a/kustomize/base/gorush/gorush-config.yaml +++ /dev/null @@ -1,47 +0,0 @@ -core: - enabled: true - mode: "release" - port: "8088" - max_notification: 5000 - sync: true - -api: - push_uri: "/api/push" - stat_go_uri: "/api/stat/go" - stat_app_uri: "/api/stat/app" - config_uri: "/api/config" - sys_stat_uri: "/sys/stats" - metric_uri: "/metrics" - health_uri: "/healthz" - -log: - format: "string" # string or json - access_log: "stdout" # stdout: output to console, or define log path like "log/access_log" - access_level: "debug" - error_log: "stderr" # stderr: output to console, or define log path like "log/error_log" - error_level: "error" - hide_token: false - -android: - enabled: true - apikey: "setup in `gorush-secret` secret with key `android.apikey`" - max_retry: 3 # resend fail notification, default value zero is disabled - -ios: - enabled: true - key_path: "/data/ssl/AuthKey_WKG6X45GSC.p8" - key_type: "p8" # could be pem, p12 or p8 type - production: true - max_concurrent_pushes: 100 # just for push ios notification - max_retry: 3 # resend fail notification, default value zero is disabled - key_id: "WKG6X45GSC" # KeyID from developer account (Certificates, Identifiers & Profiles -> Keys) - team_id: "A4B84UJD7M" # TeamID from developer account (View Account -> Membership) - -huawei: - enabled: false - apikey: "1234" - appid: "1234" - max_retry: 0 - -queue: - engine: "local" \ No newline at end of file diff --git a/kustomize/base/gorush/gorush-configmap.yaml b/kustomize/base/gorush/gorush-configmap.yaml deleted file mode 100644 index fdb4865..0000000 --- a/kustomize/base/gorush/gorush-configmap.yaml +++ /dev/null @@ -1,9 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: gorush-config - # namespace: gorush -data: - # stat - stat.engine: redis - stat.redis.host: redis:6379 diff --git a/kustomize/base/gorush/gorush-deployment.yaml b/kustomize/base/gorush/gorush-deployment.yaml deleted file mode 100644 index f18ffb1..0000000 --- a/kustomize/base/gorush/gorush-deployment.yaml +++ /dev/null @@ -1,67 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: gorush - # namespace: gorush -spec: - # replicas: 1 - selector: - matchLabels: - app: gorush - tier: frontend - template: - metadata: - labels: - app: gorush - tier: frontend - spec: - containers: - - image: appleboy/gorush:1.14.0 - name: gorush - imagePullPolicy: Always - ports: - - containerPort: 8088 - livenessProbe: - httpGet: - path: /healthz - port: 8088 - initialDelaySeconds: 3 - periodSeconds: 3 - env: - - name: GORUSH_STAT_ENGINE - valueFrom: - configMapKeyRef: - name: gorush-config - key: stat.engine - - name: GORUSH_STAT_REDIS_ADDR - valueFrom: - configMapKeyRef: - name: gorush-config - key: stat.redis.host - - name: GORUSH_ANDROID_APIKEY - valueFrom: - secretKeyRef: - name: gorush-secret - key: android.apikey - volumeMounts: - - name: ios-push-secret-vol - mountPath: /data/ssl/AuthKey_WKG6X45GSC.p8 - subPath: AuthKey_WKG6X45GSC.p8 - readOnly: true - - name: gorush-config-file-vol - mountPath: /config.yml - readOnly: true - subPath: config.yml - volumes: - - name: gorush-config-file-vol - configMap: - name: gorush-config-yml - items: - - key: gorush-config.yaml - path: config.yml - - name: ios-push-secret-vol - secret: - secretName: ios-push-secret - items: - - key: AuthKey_WKG6X45GSC.p8 - path: AuthKey_WKG6X45GSC.p8 diff --git a/kustomize/base/gorush/gorush-namespace.yaml b/kustomize/base/gorush/gorush-namespace.yaml deleted file mode 100644 index 9bac3da..0000000 --- a/kustomize/base/gorush/gorush-namespace.yaml +++ /dev/null @@ -1,4 +0,0 @@ -apiVersion: v1 -kind: Namespace -metadata: - name: gorush diff --git a/kustomize/base/gorush/gorush-redis-deployment.yaml b/kustomize/base/gorush/gorush-redis-deployment.yaml deleted file mode 100644 index 7006495..0000000 --- a/kustomize/base/gorush/gorush-redis-deployment.yaml +++ /dev/null @@ -1,24 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: redis - # namespace: gorush -spec: - selector: - matchLabels: - app: redis - role: master - tier: backend - replicas: 1 - template: - metadata: - labels: - app: redis - role: master - tier: backend - spec: - containers: - - name: master - image: redis - ports: - - containerPort: 6379 diff --git a/kustomize/base/gorush/gorush-redis-service.yaml b/kustomize/base/gorush/gorush-redis-service.yaml deleted file mode 100644 index ffe2cf8..0000000 --- a/kustomize/base/gorush/gorush-redis-service.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: redis - # namespace: gorush - labels: - app: redis - role: master - tier: backend -spec: - ports: - - port: 6379 - targetPort: 6379 - selector: - app: redis - role: master - tier: backend diff --git a/kustomize/base/gorush/gorush-service.yaml b/kustomize/base/gorush/gorush-service.yaml deleted file mode 100644 index d914cbd..0000000 --- a/kustomize/base/gorush/gorush-service.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: gorush - labels: - app: gorush - tier: frontend -spec: - selector: - app: gorush - ports: - - name: gorush - protocol: TCP - port: 8088 - targetPort: 8088 diff --git a/kustomize/base/gorush/kustomization.yaml b/kustomize/base/gorush/kustomization.yaml deleted file mode 100644 index 7af1e74..0000000 --- a/kustomize/base/gorush/kustomization.yaml +++ /dev/null @@ -1,14 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization -resources: - - gorush-configmap.yaml - - gorush-deployment.yaml - # - gorush-namespace.yaml - - gorush-redis-deployment.yaml - - gorush-redis-service.yaml - - gorush-service.yaml - -configMapGenerator: - - name: gorush-config-yml - files: - - gorush-config.yaml diff --git a/kustomize/base/main/kustomization.yaml b/kustomize/base/main/kustomization.yaml index 1232cb1..284b099 100644 --- a/kustomize/base/main/kustomization.yaml +++ b/kustomize/base/main/kustomization.yaml @@ -2,7 +2,6 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: - - ../gorush - bundestagio-admin-depl.yaml - bundestagio-depl.yaml - votes-ai.yaml diff --git a/kustomize/overlays/local/push-notifications.env b/kustomize/overlays/local/push-notifications.env index ce45336..1e26b38 100644 --- a/kustomize/overlays/local/push-notifications.env +++ b/kustomize/overlays/local/push-notifications.env @@ -1,3 +1,2 @@ APN_TOPIC=de.democracy-deutschland.clientapp.internal -GORUSH_URL=http://gorush:8088 APPLE_TEAMID=A4B84UJD7M From 6ecd6ad9f3243b5709d7c7bea1570b725c4b03e6 Mon Sep 17 00:00:00 2001 From: Manuel Ruck Date: Tue, 3 Oct 2023 18:41:20 +0200 Subject: [PATCH 2/5] add container ports to democracy-app Signed-off-by: Manuel Ruck --- kustomize/base/cluster/patches/democracy-app-depl.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/kustomize/base/cluster/patches/democracy-app-depl.yaml b/kustomize/base/cluster/patches/democracy-app-depl.yaml index ecca17e..435999d 100644 --- a/kustomize/base/cluster/patches/democracy-app-depl.yaml +++ b/kustomize/base/cluster/patches/democracy-app-depl.yaml @@ -7,6 +7,9 @@ spec: spec: containers: - name: democracy-app + ports: + - containerPort: 3000 + protocol: TCP # livenessProbe: # httpGet: # path: / From bdef20f742767e8524c9e104754b742eb04eea38 Mon Sep 17 00:00:00 2001 From: Manuel Ruck Date: Tue, 3 Oct 2023 18:53:24 +0200 Subject: [PATCH 3/5] fix add container port for democracy-app Signed-off-by: Manuel Ruck --- kustomize/base/cluster/patches/democracy-app-depl.yaml | 3 --- kustomize/base/main/democracy-app-depl.yaml | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/kustomize/base/cluster/patches/democracy-app-depl.yaml b/kustomize/base/cluster/patches/democracy-app-depl.yaml index 435999d..ecca17e 100644 --- a/kustomize/base/cluster/patches/democracy-app-depl.yaml +++ b/kustomize/base/cluster/patches/democracy-app-depl.yaml @@ -7,9 +7,6 @@ spec: spec: containers: - name: democracy-app - ports: - - containerPort: 3000 - protocol: TCP # livenessProbe: # httpGet: # path: / diff --git a/kustomize/base/main/democracy-app-depl.yaml b/kustomize/base/main/democracy-app-depl.yaml index a44067b..14a24dd 100644 --- a/kustomize/base/main/democracy-app-depl.yaml +++ b/kustomize/base/main/democracy-app-depl.yaml @@ -18,6 +18,9 @@ spec: envFrom: - configMapRef: name: democracy-app-config + ports: + - containerPort: 3000 + protocol: TCP --- apiVersion: v1 kind: Service From f561e43f2fdb1a4503c5377d54a814b1eb578233 Mon Sep 17 00:00:00 2001 From: Manuel Ruck Date: Tue, 3 Oct 2023 18:57:47 +0200 Subject: [PATCH 4/5] add missing container ports Signed-off-by: Manuel Ruck --- kustomize/base/main/bundestagio-admin-depl.yaml | 3 +++ kustomize/base/main/bundestagio-depl.yaml | 3 +++ kustomize/base/main/bundestagio-dip-depl.yaml | 3 +++ kustomize/base/main/democracy-api-depl.yaml | 3 +++ kustomize/base/main/nats-depl.yaml | 5 +++++ kustomize/base/main/qr-code-handler-depl.yaml | 3 +++ 6 files changed, 20 insertions(+) diff --git a/kustomize/base/main/bundestagio-admin-depl.yaml b/kustomize/base/main/bundestagio-admin-depl.yaml index a608a39..364912b 100644 --- a/kustomize/base/main/bundestagio-admin-depl.yaml +++ b/kustomize/base/main/bundestagio-admin-depl.yaml @@ -22,6 +22,9 @@ spec: name: ai-votes-access-token key: ACCESS_TOKEN optional: false + ports: + - containerPort: 3000 + protocol: TCP envFrom: - configMapRef: name: bio-admin-config diff --git a/kustomize/base/main/bundestagio-depl.yaml b/kustomize/base/main/bundestagio-depl.yaml index b3f1941..e8d5bc0 100644 --- a/kustomize/base/main/bundestagio-depl.yaml +++ b/kustomize/base/main/bundestagio-depl.yaml @@ -15,6 +15,9 @@ spec: containers: - name: bundestagio image: democracy/bundestag.io:0.1.58 + ports: + - containerPort: 3100 + protocol: TCP envFrom: - configMapRef: name: bio-api-config diff --git a/kustomize/base/main/bundestagio-dip-depl.yaml b/kustomize/base/main/bundestagio-dip-depl.yaml index 82a1a78..2638dcf 100644 --- a/kustomize/base/main/bundestagio-dip-depl.yaml +++ b/kustomize/base/main/bundestagio-dip-depl.yaml @@ -15,6 +15,9 @@ spec: containers: - name: bundestagio-dip image: democracy/bundestag.io-dip:0.1.7 + ports: + - containerPort: 3101 + protocol: TCP envFrom: - secretRef: name: dip-api-token diff --git a/kustomize/base/main/democracy-api-depl.yaml b/kustomize/base/main/democracy-api-depl.yaml index 06d8441..1a7ebf7 100644 --- a/kustomize/base/main/democracy-api-depl.yaml +++ b/kustomize/base/main/democracy-api-depl.yaml @@ -15,6 +15,9 @@ spec: containers: - name: democracy-api image: democracy/democracy-server:0.2.64 + ports: + - containerPort: 3000 + protocol: TCP envFrom: - configMapRef: name: democracy-api-config diff --git a/kustomize/base/main/nats-depl.yaml b/kustomize/base/main/nats-depl.yaml index 85ae200..71c33c8 100644 --- a/kustomize/base/main/nats-depl.yaml +++ b/kustomize/base/main/nats-depl.yaml @@ -31,6 +31,11 @@ spec: '-cid', 'ticketing', ] + ports: + - containerPort: 4222 + protocol: TCP + - containerPort: 8222 + protocol: TCP --- apiVersion: v1 kind: Service diff --git a/kustomize/base/main/qr-code-handler-depl.yaml b/kustomize/base/main/qr-code-handler-depl.yaml index f4dabc6..6e10528 100644 --- a/kustomize/base/main/qr-code-handler-depl.yaml +++ b/kustomize/base/main/qr-code-handler-depl.yaml @@ -16,6 +16,9 @@ spec: - name: qr-code-handler image: democracy/qr-code-handler:1.0.9 imagePullPolicy: Always + ports: + - containerPort: 3000 + protocol: TCP envFrom: - configMapRef: name: qr-code-handler-config From fe415903666fa8b321183a0372f4f018f9f556de Mon Sep 17 00:00:00 2001 From: Manuel Ruck Date: Wed, 8 May 2024 20:03:12 +0200 Subject: [PATCH 5/5] cleanup Signed-off-by: Manuel Ruck --- .../base/local/democracy-mongo-depl.yaml | 2 + kustomize/base/main/kustomization.yaml | 1 - kustomize/base/main/nats-depl.yaml | 55 ------------------- 3 files changed, 2 insertions(+), 56 deletions(-) delete mode 100644 kustomize/base/main/nats-depl.yaml diff --git a/kustomize/base/local/democracy-mongo-depl.yaml b/kustomize/base/local/democracy-mongo-depl.yaml index 88bf1ff..34ad18b 100644 --- a/kustomize/base/local/democracy-mongo-depl.yaml +++ b/kustomize/base/local/democracy-mongo-depl.yaml @@ -19,6 +19,8 @@ spec: containers: - name: democracy-mongo image: mongo:4 + ports: + - containerPort: 27017 volumeMounts: - name: mongo-storage mountPath: /data/db diff --git a/kustomize/base/main/kustomization.yaml b/kustomize/base/main/kustomization.yaml index 284b099..cfc5f44 100644 --- a/kustomize/base/main/kustomization.yaml +++ b/kustomize/base/main/kustomization.yaml @@ -8,7 +8,6 @@ resources: - bundestagio-dip-depl.yaml - democracy-api-depl.yaml - democracy-app-depl.yaml - - nats-depl.yaml - democracy-sync-procedures-cronjob.yaml - democracy-sync-named-polls-cronjob.yaml - democracy-sync-deputy-profiles.yaml diff --git a/kustomize/base/main/nats-depl.yaml b/kustomize/base/main/nats-depl.yaml deleted file mode 100644 index 71c33c8..0000000 --- a/kustomize/base/main/nats-depl.yaml +++ /dev/null @@ -1,55 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: nats-depl -spec: - replicas: 1 - selector: - matchLabels: - app: nats - template: - metadata: - labels: - app: nats - spec: - containers: - - name: nats - image: nats-streaming:0.17.0 - args: - [ - '-p', - '4222', - '-m', - '8222', - '-hbi', - '5s', - '-hbt', - '5s', - '-hbf', - '2', - '-SD', - '-cid', - 'ticketing', - ] - ports: - - containerPort: 4222 - protocol: TCP - - containerPort: 8222 - protocol: TCP ---- -apiVersion: v1 -kind: Service -metadata: - name: nats-srv -spec: - selector: - app: nats - ports: - - name: client - protocol: TCP - port: 4222 - targetPort: 4222 - - name: monitoring - protocol: TCP - port: 8222 - targetPort: 8222