Skip to content

Commit

Permalink
Add a flag for canary-only skipper-ingress deployment
Browse files Browse the repository at this point in the history
Signed-off-by: Roman Zavodskikh <[email protected]>
  • Loading branch information
Roman Zavodskikh committed Mar 4, 2024
1 parent 67d9128 commit 21009ca
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions cluster/config-defaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ skipper_ingress_memory: "1500Mi"

# Enables deployment of canary version
skipper_ingress_canary_enabled: "true"
skipper_ingress_test_single_pod: "false"

# When set to true (and dedicated node pool for skipper is also true) the
# daemonset overhead will be subtracted from the cpu settings such
Expand Down
2 changes: 1 addition & 1 deletion cluster/manifests/deletions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ post_apply:
kind: ClusterRoleBinding
{{- end }}

{{ if ne .Cluster.ConfigItems.skipper_ingress_canary_enabled "true" }}
{{ if and (ne .Cluster.ConfigItems.skipper_ingress_canary_enabled "true") (ne .Cluster.ConfigItems.skipper_ingress_test_single_pod "true") }}
- name: skipper-ingress-canary
namespace: kube-system
kind: Deployment
Expand Down
4 changes: 3 additions & 1 deletion cluster/manifests/skipper/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"Values" .Values
}}

{{ if eq .Cluster.ConfigItems.skipper_ingress_canary_enabled "true" }}
{{ if or (eq .Cluster.ConfigItems.skipper_ingress_canary_enabled "true") (eq .Cluster.ConfigItems.skipper_ingress_test_single_pod "true") }}
{{ template "skipper-ingress" dict
"name" "skipper-ingress-canary"
"internal_version" $canary_internal_version
Expand All @@ -39,6 +39,8 @@ metadata:
spec:
{{ if index . "replicas" }}
replicas: {{ .replicas }}
{{ else if eq .Cluster.ConfigItems.skipper_ingress_test_single_pod "true" }}
replicas: 0
{{ end }}
strategy:
rollingUpdate:
Expand Down

0 comments on commit 21009ca

Please sign in to comment.