Skip to content

Commit 3ebc0f2

Browse files
DentraxAnmolVirdi
andauthored
Added all knative components (with range) (#58145)
Range work of #58046 --------- Signed-off-by: Anmol Virdi <[email protected]> Signed-off-by: Dentrax <[email protected]> Co-authored-by: Anmol Virdi <[email protected]>
1 parent 3662e4c commit 3ebc0f2

File tree

1 file changed

+70
-23
lines changed

1 file changed

+70
-23
lines changed

knative-serving-1.18.yaml

Lines changed: 70 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,50 @@
11
package:
22
name: knative-serving-1.18
33
version: "1.18.1"
4-
epoch: 1
4+
epoch: 2
55
description: Kubernetes-based, scale-to-zero, request-driven compute
66
copyright:
77
- license: Apache-2.0
88
dependencies:
99
provides:
1010
- knative-serving=${{package.full-version}}
1111

12+
data:
13+
- name: components
14+
items:
15+
queue: queue
16+
activator: activator
17+
autoscaler: autoscaler
18+
controller: controller
19+
webhook: webhook
20+
1221
pipeline:
1322
- uses: git-checkout
1423
with:
1524
expected-commit: 4853ead4b27c0c59472f33f4a54765bd4595dd99
1625
repository: https://github.com/knative/serving
1726
tag: knative-v${{package.version}}
1827

28+
- uses: go/bump
29+
with:
30+
deps: |-
31+
github.com/golang-jwt/jwt/[email protected]
32+
1933
subpackages:
20-
- name: ${{package.name}}-queue
21-
description: "Queue component for Knative serving"
34+
- range: components
35+
name: "${{package.name}}-${{range.key}}"
2236
dependencies:
2337
provides:
24-
- knative-serving-queue=${{package.full-version}}
38+
- knative-serving-${{range.key}}=${{package.full-version}}
2539
pipeline:
2640
- uses: go/build
2741
with:
28-
output: queue
29-
packages: ./cmd/queue
42+
output: ${{range.value}}
43+
packages: ./cmd/${{range.value}}
3044
test:
3145
environment:
32-
contents:
33-
packages:
34-
- wait-for-it
3546
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
3748
SERVING_NAMESPACE: foo
3849
SERVING_SERVICE: ""
3950
SERVING_CONFIGURATION: ""
@@ -57,7 +68,7 @@ subpackages:
5768
TRACING_CONFIG_DEBUG: false
5869
TRACING_CONFIG_SAMPLE_RATE: 0
5970
USER_PORT: 8080
60-
SYSTEM_NAMESPACE: default-system-namespace
71+
SYSTEM_NAMESPACE: knative-serving
6172
METRICS_DOMAIN: default-metrics-domain
6273
SERVING_READINESS_PROBE: '{"tcpSocket":{"port":8080,"host":"127.0.0.1"}}'
6374
ENABLE_PROFILING: false
@@ -68,24 +79,60 @@ subpackages:
6879
ENABLE_HTTP_FULL_DUPLEX: false
6980
ROOT_CA: ""
7081
ENABLE_MULTI_CONTAINER_PROBES: false
82+
POD_NAME: default-pod
83+
POD_IP: 192.168.1.200
7184
pipeline:
7285
- 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
79123
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}}
82129
pipeline:
83130
- runs: |
84131
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}}"
89136

90137
update:
91138
enabled: true

0 commit comments

Comments
 (0)