Skip to content

Commit 10293ba

Browse files
authored
Merge pull request #8134 from zalando-incubator/add-canary-controller
canary-controller: add manifests
2 parents 1a26c81 + bcaa4a0 commit 10293ba

File tree

3 files changed

+103
-1
lines changed

3 files changed

+103
-1
lines changed

cluster/config-defaults.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ skipper_ingress_health_check_options: "period=10s,min-requests=10,min-drop-proba
8989
# Enables deployment of canary version
9090
skipper_ingress_canary_enabled: "true"
9191
skipper_ingress_test_single_pod: "false"
92-
92+
skipper_canary_controller_enabled: "false"
9393
# When set to true (and dedicated node pool for skipper is also true) the
9494
# daemonset overhead will be subtracted from the cpu settings such
9595
# that skipper will perfectly fit on the node.
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# {{ if eq .Cluster.ConfigItems.skipper_canary_controller_enabled "true" }}
2+
apiVersion: v1
3+
kind: ServiceAccount
4+
metadata:
5+
name: skipper-canary-controller
6+
namespace: kube-system
7+
labels:
8+
application: skipper-ingress
9+
component: canary
10+
---
11+
apiVersion: rbac.authorization.k8s.io/v1
12+
kind: ClusterRole
13+
metadata:
14+
name: skipper-canary-controller
15+
labels:
16+
application: skipper-ingress
17+
component: canary
18+
rules:
19+
- apiGroups:
20+
- "apps"
21+
resources:
22+
- deployments
23+
verbs:
24+
- get
25+
- list
26+
- watch
27+
- update
28+
- apiGroups:
29+
- "apps"
30+
resources:
31+
- controllerrevisions
32+
verbs:
33+
- get
34+
- list
35+
- delete
36+
- create
37+
---
38+
apiVersion: rbac.authorization.k8s.io/v1
39+
kind: ClusterRoleBinding
40+
metadata:
41+
name: skipper-canary-controller
42+
labels:
43+
application: skipper-ingress
44+
component: canary
45+
roleRef:
46+
apiGroup: rbac.authorization.k8s.io
47+
kind: ClusterRole
48+
name: skipper-canary-controller
49+
subjects:
50+
- kind: ServiceAccount
51+
name: skipper-canary-controller
52+
namespace: kube-system
53+
# {{ end }}
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# {{ if eq .Cluster.ConfigItems.skipper_canary_controller_enabled "true" }}
2+
apiVersion: batch/v1
3+
kind: CronJob
4+
metadata:
5+
name: skipper-canary-conrtroller
6+
namespace: kube-system
7+
labels:
8+
application: skipper-ingress
9+
component: canary
10+
spec:
11+
# schedule: "0 9-19 * * *" # every hour from 9 to 17 -> migrate to this when we are sure everything is ok
12+
schedule: "*/30 * * * *"
13+
jobTemplate:
14+
spec:
15+
template:
16+
metadata:
17+
labels:
18+
application: skipper-ingress
19+
component: canary
20+
spec:
21+
serviceAccountName: skipper-canary-controller
22+
# Make sure the job run only once
23+
restartPolicy: Never
24+
concurrencyPolicy: Forbid
25+
backoffLimit: 0
26+
containers:
27+
- name: skipper-canary-controller
28+
terminationMessagePolicy: FallbackToLogsOnError
29+
image: container-registry.zalando.net/gwproxy/skipper-canary-controller:main-20
30+
env:
31+
- name: _PLATFORM_OBSERVABILITY_ACCESS_TOKEN
32+
valueFrom:
33+
secretKeyRef:
34+
name: skipper-ingress
35+
key: lightstep-token
36+
- name: LIGHTSTEP_DEBUG
37+
value: "true"
38+
args:
39+
- "--dry-mode=true"
40+
- "--prometheus-url=http://prometheus.kube-system.svc.cluster.local"
41+
- "--log-level=debug"
42+
- "--run-once=true"
43+
- "--use-mem-query"
44+
- "--use-status-query"
45+
resources:
46+
limits:
47+
memory: "128Mi"
48+
cpu: "500m"
49+
# {{ end }}

0 commit comments

Comments
 (0)