Skip to content

Commit

Permalink
undo changing defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
kondratyevd committed Dec 4, 2024
1 parent 8b73468 commit fa9f43b
Show file tree
Hide file tree
Showing 10 changed files with 29 additions and 14 deletions.
2 changes: 1 addition & 1 deletion helm/templates/envoy-configmaps.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ metadata:
data:
envoy-filter.lua: |-
{{- /* Read and process the Lua configuration file */}}
{{- $luaConfig := $.Files.Get default "cfg/envoy-filter.lua" .envoy.configs.luaConfig | nindent 4 }}
{{- $luaConfig := $.Files.Get .envoy.configs.luaConfig | nindent 4 }}
{{- $luaConfig = $luaConfig | replace "SERVER_AVAIL_METRIC" (quote .prometheus.serverAvailabilityMetric) }}
{{- $luaConfig = $luaConfig | replace "SERVER_AVAIL_THRESHOLD" (quote .prometheus.serverAvailabilityThreshold) }}
{{- $luaConfig = $luaConfig | replace "PROMETHEUS_URL" .prometheus.url }}
Expand Down
2 changes: 1 addition & 1 deletion helm/templates/envoy-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ kind: Deployment
metadata:
name: {{ .envoy.name }}
spec:
replicas: {{ .envoy.replicas }}
replicas: {{ .envoy.replicas | default 1 }}
selector:
matchLabels:
app: {{ .envoy.name }}
Expand Down
2 changes: 1 addition & 1 deletion helm/templates/ingress.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{- range .Values.servers }}

{{ if .ingress.enabled }}
{{ if .ingress.enabled | default false }}

apiVersion: networking.k8s.io/v1
kind: Ingress
Expand Down
20 changes: 10 additions & 10 deletions helm/templates/so.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

{{- if .autoscaler.enabled }}

{{- $scaleUp := .autoscaler.scaleUp }}
{{- $scaleDown := .autoscaler.scaleDown }}
{{- $scaleUp := .autoscaler.scaleUp | default dict }}
{{- $scaleDown := .autoscaler.scaleDown | default dict }}
{{- $prometheusAddress := printf "http://%s:%d" .prometheus.url (int .prometheus.port) | quote }}

apiVersion: keda.sh/v1alpha1
Expand All @@ -17,23 +17,23 @@ spec:
pollingInterval: 30
cooldownPeriod: 120
idleReplicaCount: 0
minReplicaCount: {{ .autoscaler.minReplicas }}
maxReplicaCount: {{ .autoscaler.maxReplicas }}
minReplicaCount: {{ default 1 .autoscaler.minReplicas }}
maxReplicaCount: {{ default 14 .autoscaler.maxReplicas }}
advanced:
horizontalPodAutoscalerConfig:
behavior:
scaleDown:
stabilizationWindowSeconds: {{ $scaleDown.window }}
stabilizationWindowSeconds: {{ default 120 $scaleDown.window }}
policies:
- periodSeconds: {{ $scaleDown.period }}
- periodSeconds: {{ default 30 $scaleDown.period }}
type: Pods
value: {{ $scaleDown.stepsize }}
value: {{ default 1 $scaleDown.stepsize }}
scaleUp:
stabilizationWindowSeconds: {{ $scaleUp.window }}
stabilizationWindowSeconds: {{ default 120 $scaleUp.window }}
policies:
- periodSeconds: {{ $scaleUp.period }}
- periodSeconds: {{ default 30 $scaleUp.period }}
type: Pods
value: {{ $scaleUp.stepsize }}
value: {{ default 1 $scaleUp.stepsize }}

triggers:
- type: prometheus
Expand Down
2 changes: 1 addition & 1 deletion helm/templates/triton-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ kind: Deployment
metadata:
name: {{ .triton.name }}
spec:
replicas: {{ .triton.replicas }}
replicas: {{ .triton.replicas | default 1 }}
selector:
matchLabels:
app: {{ .triton.name }}
Expand Down
3 changes: 3 additions & 0 deletions values/values-cms-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ servers:
resources:
requests: { cpu: 1, memory: 2Gi }
limits: { cpu: 1, memory: 2Gi }
configs:
luaConfig: "cfg/envoy-filter.lua"
loadBalancerPolicy: LEAST_REQUEST
prometheus:
url: "prometheus-service.cms.geddes.rcac.purdue.edu"
port: 8080
Expand Down
3 changes: 3 additions & 0 deletions values/values-geddes-cms.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ servers:
resources:
requests: { cpu: 8, memory: 8Gi }
limits: { cpu: 16, memory: 8Gi }
configs:
luaConfig: "cfg/envoy-filter.lua"
loadBalancerPolicy: LEAST_REQUEST
prometheus:
url: "prometheus-service.cms.geddes.rcac.purdue.edu"
port: 8080
Expand Down
3 changes: 3 additions & 0 deletions values/values-nautilus-atlas.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ servers:
resources:
requests: { cpu: 1, memory: 2Gi }
limits: { cpu: 2, memory: 4Gi }
configs:
luaConfig: "cfg/envoy-filter.lua"
loadBalancerPolicy: LEAST_REQUEST
prometheus:
url: "prometheus.nrp-nautilus.io"
port: 443
Expand Down
3 changes: 3 additions & 0 deletions values/values-nautilus-cms.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ servers:
resources:
requests: { cpu: 1, memory: 2Gi }
limits: { cpu: 2, memory: 4Gi }
configs:
luaConfig: "cfg/envoy-filter.lua"
loadBalancerPolicy: LEAST_REQUEST
prometheus:
url: "prometheus.nrp-nautilus.io"
port: 443
Expand Down
3 changes: 3 additions & 0 deletions values/values-nautilus-icecube.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,16 @@ servers:
resources:
requests: { cpu: 1, memory: 2Gi }
limits: { cpu: 2, memory: 4Gi }
configs:
luaConfig: "cfg/envoy-filter.lua"
auth:
enabled: true
jwt_issuer: https://keycloak.icecube.wisc.edu/auth/realms/IceCube
jwt_remote_jwks_uri: https://keycloak.icecube.wisc.edu/auth/realms/IceCube/protocol/openid-connect/certs
audiences: [icecube]
url: keycloak.icecube.wisc.edu
port: 443
loadBalancerPolicy: LEAST_REQUEST
prometheus:
url: "prometheus.nrp-nautilus.io"
port: 443
Expand Down

0 comments on commit fa9f43b

Please sign in to comment.