1
1
package :
2
2
name : knative-serving-1.18
3
3
version : " 1.18.1"
4
- epoch : 1
4
+ epoch : 2
5
5
description : Kubernetes-based, scale-to-zero, request-driven compute
6
6
copyright :
7
7
- license : Apache-2.0
8
8
dependencies :
9
9
provides :
10
10
- knative-serving=${{package.full-version}}
11
11
12
+ data :
13
+ - name : components
14
+ items :
15
+ queue : queue
16
+ activator : activator
17
+ autoscaler : autoscaler
18
+ controller : controller
19
+ webhook : webhook
20
+
12
21
pipeline :
13
22
- uses : git-checkout
14
23
with :
15
24
expected-commit : 4853ead4b27c0c59472f33f4a54765bd4595dd99
16
25
repository : https://github.com/knative/serving
17
26
tag : knative-v${{package.version}}
18
27
28
+ - uses : go/bump
29
+ with :
30
+ deps : |-
31
+ github.com/golang-jwt/jwt/[email protected]
32
+
19
33
subpackages :
20
- - name : ${{package.name}}-queue
21
- description : " Queue component for Knative serving "
34
+ - range : components
35
+ name : " ${{package.name}}-${{range.key}} "
22
36
dependencies :
23
37
provides :
24
- - knative-serving-queue =${{package.full-version}}
38
+ - knative-serving-${{range.key}} =${{package.full-version}}
25
39
pipeline :
26
40
- uses : go/build
27
41
with :
28
- output : queue
29
- packages : ./cmd/queue
42
+ output : ${{range.value}}
43
+ packages : ./cmd/${{range.value}}
30
44
test :
31
45
environment :
32
- contents :
33
- packages :
34
- - wait-for-it
35
46
environment :
36
- # # dummy environment variables for testing copied over: https://github.com/knative/serving/blob/d4766bee6f56bbcde9af538230562b8cf5a6751b/pkg/reconciler/revision/resources/deploy_test.go#L112
47
+ WEBHOOK_NAME : test
37
48
SERVING_NAMESPACE : foo
38
49
SERVING_SERVICE : " "
39
50
SERVING_CONFIGURATION : " "
@@ -57,7 +68,7 @@ subpackages:
57
68
TRACING_CONFIG_DEBUG : false
58
69
TRACING_CONFIG_SAMPLE_RATE : 0
59
70
USER_PORT : 8080
60
- SYSTEM_NAMESPACE : default-system-namespace
71
+ SYSTEM_NAMESPACE : knative-serving
61
72
METRICS_DOMAIN : default-metrics-domain
62
73
SERVING_READINESS_PROBE : ' {"tcpSocket":{"port":8080,"host":"127.0.0.1"}}'
63
74
ENABLE_PROFILING : false
@@ -68,24 +79,60 @@ subpackages:
68
79
ENABLE_HTTP_FULL_DUPLEX : false
69
80
ROOT_CA : " "
70
81
ENABLE_MULTI_CONTAINER_PROBES : false
82
+ POD_NAME : default-pod
83
+ POD_IP : 192.168.1.200
71
84
pipeline :
72
85
- runs : |
73
- # Define the log file path
74
- # Start the queue and redirect logs to the file
75
- echo "Starting the queue and redirecting logs to /tmp/queue.log"
76
- queue > "/tmp/queue.log" 2>&1 &
77
- wait-for-it -t 30 localhost:8012
78
- grep -q "Starting http server main:8012" /tmp/queue.log
86
+ # queue binary just runs the server on help
87
+ [[ ${{range.key}} != 'queue' ]] && ${{range.value}} --help
88
+ - uses : test/kwok/cluster
89
+ - name : Fix SA token
90
+ runs : |
91
+ #!/usr/bin/env bash
92
+ set -euo pipefail
93
+ # Workaround fix for: "Fail to create in-cluster Kubernetes config: open /var/run/secrets/kubernetes.io/serviceaccount/token: no such file or directory"
94
+ DIR=/var/run/secrets/kubernetes.io/serviceaccount
95
+ mkdir -p "$DIR"
96
+ kwokctl --name kwok kubectl create serviceaccount cpa
97
+ kwokctl --name kwok kubectl -n default create token cpa --duration=8760h > "$DIR/token"
98
+ CA=$(kubectl config view --raw -o jsonpath='{.clusters[0].cluster.certificate-authority}')
99
+ cp $CA /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
100
+ echo default > "$DIR/namespace"
101
+ - name : " start daemon on localhost for ${{range.key}}"
102
+ uses : test/daemon-check-output
103
+ with :
104
+ setup : |
105
+ kubectl create namespace knative-serving || true
106
+ kubectl apply -f https://github.com/knative/serving/releases/download/knative-v${{package.version}}/serving-crds.yaml
107
+ kubectl apply -f https://github.com/knative/serving/releases/download/knative-v${{package.version}}/serving-core.yaml
108
+ kubectl wait --for=condition=Available deploy/autoscaler -n knative-serving --timeout=90s
109
+ start : " ${{range.value}}"
110
+ timeout : 10
111
+ # Omit 'ERROR':
112
+ # * webhook: throws "please apply your changes to the latest version and try again" FP error
113
+ # * activator: throws "Websocket connection could not be established" error, possibly due to kwok or some other issue
114
+ error_strings : |
115
+ FATAL
116
+ FAIL
117
+ Traceback.*most.recent.call
118
+ Exception in thread
119
+ panic
120
+ command not found
121
+ expected_output : |
122
+ Starting
79
123
80
- - name : ${{package.name}}-queue-compat
81
- description : " To match with the upstream image entrypoint"
124
+ - range : components
125
+ name : " ${{package.name}}-${{range.key}}-compat"
126
+ dependencies :
127
+ provides :
128
+ - knative-serving-${{range.key}}-compat=${{package.full-version}}
82
129
pipeline :
83
130
- runs : |
84
131
mkdir -p ${{targets.contextdir}}/ko-app
85
- ln -sf /usr/bin/queue ${{targets.contextdir}}/ko-app/queue
86
- dependencies :
87
- provides :
88
- - knative-serving-queue-compat= ${{package.full-version}}
132
+ ln -sf /usr/bin/${{range.value}} ${{targets.contextdir}}/ko-app/${{range.value}}
133
+ test :
134
+ pipeline :
135
+ - runs : test "$(readlink /ko-app/${{range.value}})" = "/usr/bin/ ${{range.value}}"
89
136
90
137
update :
91
138
enabled : true
0 commit comments