diff --git a/cluster/config-defaults.yaml b/cluster/config-defaults.yaml index 980c128731..b20812d0d6 100644 --- a/cluster/config-defaults.yaml +++ b/cluster/config-defaults.yaml @@ -70,6 +70,9 @@ skipper_ingress_min_replicas: "2" {{end}} skipper_ingress_cpu: "1000m" skipper_ingress_memory: "1500Mi" + +skipper_ingress_canary_internal_version: "" + # When set to true (and dedicated node pool for skipper is also true) the # daemonset overhead will be subtracted from the cpu settings such # that skipper will perfectly fit on the node. diff --git a/cluster/manifests/deletions.yaml b/cluster/manifests/deletions.yaml index 05bfd0b48d..5945a24348 100644 --- a/cluster/manifests/deletions.yaml +++ b/cluster/manifests/deletions.yaml @@ -59,6 +59,12 @@ post_apply: kind: ClusterRoleBinding {{- end }} +{{ if not .Cluster.ConfigItems.skipper_ingress_canary_internal_version }} +- name: skipper-ingress-canary + namespace: kube-system + kind: Deployment +{{ end }} + {{ if eq .Cluster.ConfigItems.skipper_routesrv_enabled "false" }} - name: skipper-ingress-routesrv namespace: kube-system diff --git a/cluster/manifests/skipper/deployment.yaml b/cluster/manifests/skipper/deployment.yaml index cda4a03267..99285a2b4a 100644 --- a/cluster/manifests/skipper/deployment.yaml +++ b/cluster/manifests/skipper/deployment.yaml @@ -1,27 +1,44 @@ {{ $internal_version := "v0.18.42-691" }} -{{ $version := index (split $internal_version "-") 0 }} +{{ template "skipper-ingress" dict + "name" "skipper-ingress" + "internal_version" $internal_version +}} + +{{ if .ConfigItems.skipper_ingress_canary_internal_version }} +{{ template "skipper-ingress" dict + "name" "skipper-ingress-canary" + "internal_version" .ConfigItems.skipper_ingress_canary_internal_version + "replicas" 1 +{{ end }} + +{{ define "skipper-ingress" }} +--- +{{ $version := index (split .internal_version "-") 0 }} apiVersion: apps/v1 kind: Deployment metadata: - name: skipper-ingress + name: "{{ .name }}" namespace: kube-system labels: application: skipper-ingress version: {{ $version }} component: ingress spec: +{{ if index . "replicas" }} + replicas: {{ .replicas }} +{{ end }} strategy: rollingUpdate: maxSurge: 1 maxUnavailable: 0 selector: matchLabels: - deployment: skipper-ingress + deployment: "{{ .name }}" template: metadata: labels: - deployment: skipper-ingress + deployment: "{{ .name }}" application: skipper-ingress version: {{ $version }} component: ingress @@ -397,6 +414,7 @@ spec: key: dedicated value: skipper-ingress {{ end }} +{{ end }} {{ if ne .ConfigItems.skipper_routesrv_enabled "false" }} ---