From 21009ca883b56544b2ce1c8165a02b90f734cfa8 Mon Sep 17 00:00:00 2001 From: Roman Zavodskikh Date: Mon, 4 Mar 2024 17:10:51 +0100 Subject: [PATCH] Add a flag for canary-only skipper-ingress deployment Signed-off-by: Roman Zavodskikh --- cluster/config-defaults.yaml | 1 + cluster/manifests/deletions.yaml | 2 +- cluster/manifests/skipper/deployment.yaml | 4 +++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/cluster/config-defaults.yaml b/cluster/config-defaults.yaml index 3b666c7db0..398803a087 100644 --- a/cluster/config-defaults.yaml +++ b/cluster/config-defaults.yaml @@ -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 diff --git a/cluster/manifests/deletions.yaml b/cluster/manifests/deletions.yaml index 8b3b41a946..04729a64ee 100644 --- a/cluster/manifests/deletions.yaml +++ b/cluster/manifests/deletions.yaml @@ -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 diff --git a/cluster/manifests/skipper/deployment.yaml b/cluster/manifests/skipper/deployment.yaml index 2fffe51788..80167cae03 100644 --- a/cluster/manifests/skipper/deployment.yaml +++ b/cluster/manifests/skipper/deployment.yaml @@ -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 @@ -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: