Skip to content

Commit

Permalink
WIFI-14148 Adapt to the idiosyncrasies of each cluster env
Browse files Browse the repository at this point in the history
Signed-off-by: Carsten Schafer <[email protected]>
  • Loading branch information
Carsten Schafer authored and Carsten Schafer committed Sep 19, 2024
1 parent 91f1f24 commit 7399215
Show file tree
Hide file tree
Showing 6 changed files with 59 additions and 40 deletions.
44 changes: 4 additions & 40 deletions cgw/helmfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -196,39 +196,21 @@ releases:
- values/certs.tip.yaml
# this one is generated from GH secrets:
- values/certs.device.yaml
- values/cgw.yaml
- values/cgw-{{ .Environment.Values.global.name }}-1.yaml
- images:
cgw:
tag: {{ .Environment.Values.cgw.tag }}
- public_env_variables:
CGW_ID: 0
CGW_DB_HOST: pgsql
CGW_DB_PORT: "5432"
CGW_DB_USERNAME: "{{ .Environment.Values.postgres.cgwUser.name }}"
CGW_KAFKA_HOST: kafka
CGW_KAFKA_PORT: "9092"
CGW_REDIS_HOST: redis-master
CGW_REDIS_PORT: "6379"
CGW_ALLOW_CERT_MISMATCH: "yes"
# use (#cpus * 2) - 2
DEFAULT_WSS_THREAD_NUM: "4"
# Useful for debugging:
#CGW_LOG_LEVEL: "debug"
#RUST_BACKTRACE: "full"
- secret_env_variables:
CGW_DB_PASSWORD: "{{ .Environment.Values.postgres.cgwUser.password }}"
- services:
cgw:
type: LoadBalancer
annotations:
external-dns.alpha.kubernetes.io/hostname: cgw-{{ .Environment.Values.global.name }}.{{ .Environment.Values.global.domain }}
#service.beta.kubernetes.io/aws-load-balancer-type: nlb-ip
service.beta.kubernetes.io/aws-load-balancer-scheme: internet-facing
service.beta.kubernetes.io/aws-load-balancer-backend-protocol: ssl
service.beta.kubernetes.io/aws-load-balancer-ssl-cert: {{ .Environment.Values.global.certificateARN }}
service.beta.kubernetes.io/aws-load-balancer-healthcheck-port: "15003"
service.beta.kubernetes.io/aws-load-balancer-target-group-attributes: preserve_client_ip.enabled=true
service.beta.kubernetes.io/aws-load-balancer-ssl-ports: "16002"
alb.ingress.kubernetes.io/healthcheck-path: /health

- name: cgw2
namespace: {{ .Environment.Values.global.namespace }}
Expand All @@ -243,36 +225,18 @@ releases:
- values/certs.tip.yaml
# this one is generated from GH secrets:
- values/certs.device.yaml
- values/cgw.yaml
- values/cgw-{{ .Environment.Values.global.name }}-2.yaml
- images:
cgw:
tag: {{ .Environment.Values.cgw.tag }}
- public_env_variables:
CGW_ID: 1
CGW_DB_HOST: pgsql
CGW_DB_PORT: "5432"
CGW_DB_USERNAME: "{{ .Environment.Values.postgres.cgwUser.name }}"
CGW_KAFKA_HOST: kafka
CGW_KAFKA_PORT: "9092"
CGW_REDIS_HOST: redis-master
CGW_REDIS_PORT: "6379"
CGW_ALLOW_CERT_MISMATCH: "yes"
# use (#cpus * 2) - 2
DEFAULT_WSS_THREAD_NUM: "4"
# Useful for debugging:
#CGW_LOG_LEVEL: "debug"
#RUST_BACKTRACE: "full"
- secret_env_variables:
CGW_DB_PASSWORD: "{{ .Environment.Values.postgres.cgwUser.password }}"
- services:
cgw:
type: LoadBalancer
annotations:
external-dns.alpha.kubernetes.io/hostname: cgw2-{{ .Environment.Values.global.name }}.{{ .Environment.Values.global.domain }}
#service.beta.kubernetes.io/aws-load-balancer-type: nlb-ip
service.beta.kubernetes.io/aws-load-balancer-scheme: internet-facing
service.beta.kubernetes.io/aws-load-balancer-backend-protocol: ssl
service.beta.kubernetes.io/aws-load-balancer-ssl-cert: {{ .Environment.Values.global.certificateARN }}
service.beta.kubernetes.io/aws-load-balancer-healthcheck-port: "15003"
service.beta.kubernetes.io/aws-load-balancer-target-group-attributes: preserve_client_ip.enabled=true
service.beta.kubernetes.io/aws-load-balancer-ssl-ports: "16002"
alb.ingress.kubernetes.io/healthcheck-path: /health
Empty file added cgw/values/cgw-cgw01-1.yaml
Empty file.
Empty file added cgw/values/cgw-cgw01-2.yaml
Empty file.
15 changes: 15 additions & 0 deletions cgw/values/cgw-devcgw-1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: alpha.eksctl.io/nodegroup-name
operator: In
values:
- gwmed

tolerations:
- effect: NoSchedule
key: type
operator: Equal
value: onlygwmed
16 changes: 16 additions & 0 deletions cgw/values/cgw-devcgw-2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: alpha.eksctl.io/nodegroup-name
operator: In
values:
- gwm5lrg

tolerations:
- effect: NoSchedule
key: type
operator: Equal
value: onlygwm5lrg

24 changes: 24 additions & 0 deletions cgw/values/cgw.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
public_env_variables:
CGW_DB_HOST: pgsql
CGW_DB_PORT: "5432"
CGW_KAFKA_HOST: kafka
CGW_KAFKA_PORT: "9092"
CGW_REDIS_HOST: redis-master
CGW_REDIS_PORT: "6379"
CGW_ALLOW_CERT_MISMATCH: "yes"
# use (#cpus * 2) - 2
DEFAULT_WSS_THREAD_NUM: "4"
# Useful for debugging:
#CGW_LOG_LEVEL: "debug"
#RUST_BACKTRACE: "full"
services:
cgw:
type: LoadBalancer
annotations:
#service.beta.kubernetes.io/aws-load-balancer-type: nlb-ip
service.beta.kubernetes.io/aws-load-balancer-scheme: internet-facing
service.beta.kubernetes.io/aws-load-balancer-backend-protocol: ssl
service.beta.kubernetes.io/aws-load-balancer-healthcheck-port: "15003"
service.beta.kubernetes.io/aws-load-balancer-target-group-attributes: preserve_client_ip.enabled=true
service.beta.kubernetes.io/aws-load-balancer-ssl-ports: "16002"
alb.ingress.kubernetes.io/healthcheck-path: /health

0 comments on commit 7399215

Please sign in to comment.