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

skipper: automate canary version update #8193

Merged
merged 1 commit into from
Sep 25, 2024
Merged
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
27 changes: 15 additions & 12 deletions cluster/manifests/skipper/deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
{{ $internal_version := "v0.21.198-1017" }}
{{ $canary_internal_version := "v0.21.198-1017" }}
{{/* image-updater-bot detects *image variables so use __ suffux to disable it for main image */}}

{{ $main_image__ := "container-registry.zalando.net/teapot/skipper-internal:v0.21.198-1017" }}
{{ $canary_image := "container-registry.zalando.net/teapot/skipper-internal:v0.21.198-1017" }}


{{/* Optional canary arguments separated by "[cf724afc]" to allow whitespaces, e.g. "-foo=has a whitespace[cf724afc]-baz=qux" */}}
{{ $canary_args := "" }}

{{ template "skipper-ingress" dict
"name" "skipper-ingress"
"internal_version" $internal_version
"image" $main_image__

"Cluster" .Cluster
"Values" .Values
Expand All @@ -15,7 +18,7 @@
{{ if eq .Cluster.ConfigItems.skipper_ingress_canary_enabled "true" }}
{{ template "skipper-ingress" dict
"name" "skipper-ingress-canary"
"internal_version" $canary_internal_version
"image" $canary_image
"replicas" 1
"args" $canary_args

Expand All @@ -25,7 +28,7 @@
{{ end }}

{{ define "skipper-ingress" }}
{{ $version := index (split .internal_version "-") 0 }}
{{ $version := index (split (index (split .image ":") 1) "-") 0 }}
---
apiVersion: apps/v1
kind: Deployment
Expand Down Expand Up @@ -85,7 +88,7 @@ spec:
hostNetwork: true
containers:
- name: skipper-ingress
image: container-registry.zalando.net/teapot/skipper-internal:{{ .internal_version }}
image: "{{ .image }}"
terminationMessagePolicy: FallbackToLogsOnError
ports:
- name: ingress-port
Expand Down Expand Up @@ -225,7 +228,7 @@ spec:
tag=application=skipper-ingress
tag=account={{ .Cluster.Alias }}
tag=cluster={{ .Cluster.Alias }}
tag=artifact=container-registry.zalando.net/teapot/skipper-internal:{{ .internal_version }}
tag=artifact={{ .image }}
max-buffered-spans={{ .Cluster.ConfigItems.skipper_ingress_tracing_buffer }}
grpc-max-msg-size={{ .Cluster.ConfigItems.skipper_ingress_lightstep_grpc_max_msg_size }}
max-period={{ .Cluster.ConfigItems.skipper_ingress_lightstep_max_period }}
Expand Down Expand Up @@ -444,7 +447,7 @@ spec:
{{ end }}

{{ if ne .Cluster.ConfigItems.skipper_routesrv_enabled "false" }}
{{ $version := index (split $internal_version "-") 0 }}
{{ $main_version := index (split (index (split $main_image__ ":") 1) "-") 0 }}
---
apiVersion: apps/v1
kind: Deployment
Expand All @@ -453,7 +456,7 @@ metadata:
namespace: kube-system
labels:
application: skipper-ingress
version: {{ $version }}
version: "{{ $main_version }}"
component: routesrv
spec:
strategy:
Expand All @@ -469,7 +472,7 @@ spec:
labels:
deployment: skipper-ingress-routesrv
application: skipper-ingress
version: {{ $version }}
version: "{{ $main_version }}"
component: routesrv
annotations:
config/hash: {{"secret.yaml" | manifestHash}}
Expand Down Expand Up @@ -513,7 +516,7 @@ spec:
{{- end }}
containers:
- name: routesrv
image: container-registry.zalando.net/teapot/skipper:{{ $version }}
image: container-registry.zalando.net/teapot/skipper:{{ $main_version }}
terminationMessagePolicy: FallbackToLogsOnError
ports:
- name: ingress-port
Expand Down Expand Up @@ -567,7 +570,7 @@ spec:
tag=component=routesrv
tag=account={{ .Cluster.Alias }}
tag=cluster={{ .Cluster.Alias }}
tag=artifact=container-registry.zalando.net/teapot/skipper:{{ $version }}
tag=artifact=container-registry.zalando.net/teapot/skipper:{{ $main_version }}
max-buffered-spans={{ .Cluster.ConfigItems.skipper_ingress_tracing_buffer }}
grpc-max-msg-size={{ .Cluster.ConfigItems.skipper_ingress_lightstep_grpc_max_msg_size }}
max-period=2500ms
Expand Down