Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIFI-14148 Adapt to the idiosyncrasies of each cluster env #286

Merged
merged 1 commit into from
Sep 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading