Skip to content

Commit 2fc4ad8

Browse files
authored
Bump to Knative 1.2 (#503)
1 parent 1206473 commit 2fc4ad8

File tree

2,651 files changed

+251852
-210099
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,651 files changed

+251852
-210099
lines changed

.github/workflows/minkind-apply.yaml

Lines changed: 4 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ jobs:
2222
# To cut down on redundant testing, test each suite against a
2323
# particular version of K8s.
2424
include:
25-
- k8s-version: v1.20.x
26-
selfhost-variant: dockerfile
2725
- k8s-version: v1.21.x
28-
selfhost-variant: buildpacks
26+
selfhost-variant: dockerfile
2927
- k8s-version: v1.22.x
28+
selfhost-variant: buildpacks
29+
- k8s-version: v1.23.x
3030
selfhost-variant: ko
3131

3232
env:
@@ -84,7 +84,6 @@ jobs:
8484
working-directory: ./src/github.com/mattmoor/mink
8585
run: |
8686
./hack/setup-kind.sh \
87-
--authenticated-registry \
8887
--registry-url $(echo ${KO_DOCKER_REPO} | cut -d'/' -f 1) \
8988
--cluster-suffix c${{ github.run_id }}.local \
9089
--nodes 3 \
@@ -98,8 +97,6 @@ jobs:
9897
mink install --replicas=3
9998
10099
cat > $HOME/.mink.yaml <<EOF
101-
as: me
102-
103100
# Number of concurrent builds to allow.
104101
# We match this to nodes
105102
parallelism: 3
@@ -190,32 +187,8 @@ jobs:
190187
# Make sure we can curl the sample.
191188
curl "${URL}/?sleep=100"
192189
193-
- name: Collect ksvc diagnostics
194-
if: ${{ failure() }}
195-
run: kubectl get services.serving.knative.dev -oyaml
196-
197-
- name: Collect pod diagnostics
190+
- uses: chainguard-dev/actions/kind-diag@main
198191
if: ${{ failure() }}
199-
run: kubectl describe pods
200-
201-
- name: Collect system diagnostics
202-
if: ${{ failure() }}
203-
run: |
204-
kubectl -n${SYSTEM_NAMESPACE} get pods
205-
206-
echo '::group:: describe'
207-
kubectl -n${SYSTEM_NAMESPACE} describe pods
208-
echo '::endgroup::'
209-
210-
for x in $(kubectl get pods -n${SYSTEM_NAMESPACE} -oname); do
211-
echo "::group:: describe $x"
212-
kubectl -n${SYSTEM_NAMESPACE} describe $x
213-
echo '::endgroup::'
214-
215-
echo "::group:: $x logs"
216-
kubectl -n${SYSTEM_NAMESPACE} logs $x --all-containers
217-
echo '::endgroup::'
218-
done
219192

220193
- name: Post failure notice to Slack
221194
uses: rtCamp/action-slack-notify@v2.1.0

.github/workflows/minkind-bundle.yaml

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ jobs:
5757
working-directory: ./src/github.com/mattmoor/mink
5858
run: |
5959
./hack/setup-kind.sh \
60-
--authenticated-registry \
6160
--registry-url $(echo ${KO_DOCKER_REPO} | cut -d'/' -f 1) \
6261
--cluster-suffix c${{ github.run_id }}.local \
6362
--nodes 3 \
@@ -95,24 +94,8 @@ jobs:
9594
exit 1
9695
fi
9796
98-
- name: Collect system diagnostics
97+
- uses: chainguard-dev/actions/kind-diag@main
9998
if: ${{ failure() }}
100-
run: |
101-
kubectl -n${SYSTEM_NAMESPACE} get pods
102-
103-
echo '::group:: describe'
104-
kubectl -n${SYSTEM_NAMESPACE} describe pods
105-
echo '::endgroup::'
106-
107-
for x in $(kubectl get pods -n${SYSTEM_NAMESPACE} -oname); do
108-
echo "::group:: describe $x"
109-
kubectl -n${SYSTEM_NAMESPACE} describe $x
110-
echo '::endgroup::'
111-
112-
echo "::group:: $x logs"
113-
kubectl -n${SYSTEM_NAMESPACE} logs $x --all-containers
114-
echo '::endgroup::'
115-
done
11699

117100
- name: Post failure notice to Slack
118101
uses: rtCamp/action-slack-notify@v2.1.0

.github/workflows/minkind-cli.yaml

Lines changed: 18 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,16 @@ jobs:
2323
# particular version of K8s.
2424
include:
2525
- suite: GCP buildpacks
26-
k8s-version: v1.20.x
27-
- suite: Paketo buildpacks
2826
k8s-version: v1.21.x
29-
- suite: Boson buildpacks
27+
- suite: Paketo buildpacks
3028
k8s-version: v1.22.x
31-
ko-flags: --platform=linux/amd64,linux/arm64
29+
# TODO: The layout of the func stuff has gotten complicated,
30+
# and manifest.yaml are no longer 1:1 with samples.
31+
# - suite: Boson buildpacks
32+
# k8s-version: v1.23.x
33+
# ko-flags: --platform=linux/amd64,linux/arm64
3234
- suite: Knative helloworld
33-
k8s-version: v1.22.x
35+
k8s-version: v1.23.x
3436

3537
env:
3638
GOPATH: ${{ github.workspace }}
@@ -87,7 +89,6 @@ jobs:
8789
working-directory: ./src/github.com/mattmoor/mink
8890
run: |
8991
./hack/setup-kind.sh \
90-
--authenticated-registry \
9192
--registry-url $(echo ${KO_DOCKER_REPO} | cut -d'/' -f 1) \
9293
--cluster-suffix c${{ github.run_id }}.local \
9394
--nodes 3 \
@@ -104,8 +105,6 @@ jobs:
104105
mink install --replicas=3
105106
106107
cat > $HOME/.mink.yaml <<EOF
107-
as: me
108-
109108
# Bundle source context to here by default!
110109
bundle: ${KO_DOCKER_REPO}/bundle:latest
111110
@@ -134,7 +133,7 @@ jobs:
134133
working-directory: ./src/github.com/knative/docs
135134
run: |
136135
ERROR=0
137-
for dir in $(find ./docs/serving/samples/hello-world/ -mindepth 1 -maxdepth 1 -type d); do
136+
for dir in $(find ./code-samples/serving/hello-world/ -mindepth 1 -maxdepth 1 -type d); do
138137
TEST="$(basename $dir)"
139138
140139
if [[ ! -f $dir/Dockerfile ]]; then
@@ -148,6 +147,13 @@ jobs:
148147
continue
149148
fi
150149
150+
if [[ "${TEST}" =~ "csharp" ]]; then
151+
# TODO: this consistently hits:
152+
# unlinkat //product_uuid: device or resource busy
153+
echo Skipping csharp sample: ${TEST}
154+
continue
155+
fi
156+
151157
echo "::group:: Test ${TEST}"
152158
# Build and deploy this sample.
153159
kn service create ${TEST} --image=$(mink build --directory=$dir)
@@ -260,9 +266,9 @@ jobs:
260266
if: matrix.suite == 'Boson buildpacks'
261267
working-directory: ./src/github.com/boson-project/faas
262268
run: |
263-
for cfg in $(find templates -name '.builders.yaml'); do
269+
for cfg in $(find templates -name 'manifest.yaml'); do
264270
TEST="$(echo $dir | sed 's@^./@@g' | sed 's@[/_]@-@g')";
265-
BUILDER="$(yq r $cfg default)"
271+
BUILDER="$(yq r $cfg builders.default)"
266272
267273
if [[ "${TEST}" =~ "spring" ]]; then
268274
# TODO(https://github.com/boson-project/faas/pull/231): Support Spring
@@ -346,32 +352,8 @@ jobs:
346352
347353
exit ${ERROR}
348354
349-
- name: Collect ksvc diagnostics
355+
- uses: chainguard-dev/actions/kind-diag@main
350356
if: ${{ failure() }}
351-
run: kubectl get services.serving.knative.dev -oyaml
352-
353-
- name: Collect pod diagnostics
354-
if: ${{ failure() }}
355-
run: kubectl describe pods
356-
357-
- name: Collect system diagnostics
358-
if: ${{ failure() }}
359-
run: |
360-
kubectl -n${SYSTEM_NAMESPACE} get pods
361-
362-
echo '::group:: describe'
363-
kubectl -n${SYSTEM_NAMESPACE} describe pods
364-
echo '::endgroup::'
365-
366-
for x in $(kubectl get pods -n${SYSTEM_NAMESPACE} -oname); do
367-
echo "::group:: describe $x"
368-
kubectl -n${SYSTEM_NAMESPACE} describe $x
369-
echo '::endgroup::'
370-
371-
echo "::group:: $x logs"
372-
kubectl -n${SYSTEM_NAMESPACE} logs $x --all-containers
373-
echo '::endgroup::'
374-
done
375357

376358
- name: Post failure notice to Slack
377359
uses: rtCamp/action-slack-notify@v2.1.0

.github/workflows/minkind-cosigned.yaml

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -98,24 +98,8 @@ jobs:
9898
sed -i 's/cosign-system/mink-system/g' ./vendor/github.com/sigstore/cosign/test/e2e_test_cosigned.sh
9999
bash ./vendor/github.com/sigstore/cosign/test/e2e_test_cosigned.sh
100100
101-
- name: Collect system diagnostics
101+
- uses: chainguard-dev/actions/kind-diag@main
102102
if: ${{ failure() }}
103-
run: |
104-
kubectl -n${SYSTEM_NAMESPACE} get pods
105-
106-
echo '::group:: describe'
107-
kubectl -n${SYSTEM_NAMESPACE} describe pods
108-
echo '::endgroup::'
109-
110-
for x in $(kubectl get pods -n${SYSTEM_NAMESPACE} -oname); do
111-
echo "::group:: describe $x"
112-
kubectl -n${SYSTEM_NAMESPACE} describe $x
113-
echo '::endgroup::'
114-
115-
echo "::group:: $x logs"
116-
kubectl -n${SYSTEM_NAMESPACE} logs $x --all-containers
117-
echo '::endgroup::'
118-
done
119103

120104
- name: Post failure notice to Slack
121105
uses: rtCamp/action-slack-notify@v2.1.0

.github/workflows/minkind-run.yaml

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ jobs:
5757
working-directory: ./src/github.com/mattmoor/mink
5858
run: |
5959
./hack/setup-kind.sh \
60-
--authenticated-registry \
6160
--registry-url $(echo ${KO_DOCKER_REPO} | cut -d'/' -f 1) \
6261
--cluster-suffix c${{ github.run_id }}.local \
6362
--nodes 3 \
@@ -210,24 +209,8 @@ jobs:
210209
mink run task --as=me kaniko --git-url=https://github.com/kubernetes-up-and-running/kuard.git
211210
echo '::endgroup::'
212211
213-
- name: Collect system diagnostics
212+
- uses: chainguard-dev/actions/kind-diag@main
214213
if: ${{ failure() }}
215-
run: |
216-
kubectl -n${SYSTEM_NAMESPACE} get pods
217-
218-
echo '::group:: describe'
219-
kubectl -n${SYSTEM_NAMESPACE} describe pods
220-
echo '::endgroup::'
221-
222-
for x in $(kubectl get pods -n${SYSTEM_NAMESPACE} -oname); do
223-
echo "::group:: describe $x"
224-
kubectl -n${SYSTEM_NAMESPACE} describe $x
225-
echo '::endgroup::'
226-
227-
echo "::group:: $x logs"
228-
kubectl -n${SYSTEM_NAMESPACE} logs $x --all-containers
229-
echo '::endgroup::'
230-
done
231214

232215
- name: Post failure notice to Slack
233216
uses: rtCamp/action-slack-notify@v2.1.0

.github/workflows/minkind.yaml

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ jobs:
2020
fail-fast: false # Keep running if one leg fails.
2121
matrix:
2222
k8s-version:
23-
- v1.20.x
2423
- v1.21.x
2524
- v1.22.x
25+
- v1.23.x
2626

2727
leg:
2828
- ingress conformance
@@ -194,32 +194,8 @@ jobs:
194194
${{ matrix.extra-go-flags }} ${{ matrix.test-suite }} \
195195
${{ matrix.extra-test-flags }}
196196
197-
- name: Collect ksvc diagnostics
197+
- uses: chainguard-dev/actions/kind-diag@main
198198
if: ${{ failure() }}
199-
run: kubectl get ksvc -oyaml
200-
201-
- name: Collect pod diagnostics
202-
if: ${{ failure() }}
203-
run: kubectl describe pods
204-
205-
- name: Collect system diagnostics
206-
if: ${{ failure() }}
207-
run: |
208-
kubectl -n${SYSTEM_NAMESPACE} get pods
209-
210-
echo '::group:: describe'
211-
kubectl -n${SYSTEM_NAMESPACE} describe pods
212-
echo '::endgroup::'
213-
214-
for x in $(kubectl get pods -n${SYSTEM_NAMESPACE} -oname); do
215-
echo "::group:: describe $x"
216-
kubectl -n${SYSTEM_NAMESPACE} describe $x
217-
echo '::endgroup::'
218-
219-
echo "::group:: $x logs"
220-
kubectl -n${SYSTEM_NAMESPACE} logs $x --all-containers
221-
echo '::endgroup::'
222-
done
223199

224200
- name: Dump Artifacts
225201
if: ${{ failure() }}

cmd/webhook/main.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ import (
2727
chains "github.com/tektoncd/chains/pkg/reconciler/taskrun"
2828
"github.com/tektoncd/pipeline/pkg/apis/pipeline"
2929
"github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1"
30+
"github.com/tektoncd/pipeline/pkg/clock"
3031
"github.com/tektoncd/pipeline/pkg/reconciler/pipelinerun"
3132
"github.com/tektoncd/pipeline/pkg/reconciler/taskrun"
3233
"knative.dev/eventing/pkg/reconciler/apiserversource"
@@ -88,6 +89,7 @@ func main() {
8889
flag.StringVar(&opts.Images.GsutilImage, "gsutil-image", "", "The container image containing gsutil")
8990
flag.StringVar(&opts.Images.PRImage, "pr-image", "", "The container image containing our PR binary.")
9091
flag.StringVar(&opts.Images.ImageDigestExporterImage, "imagedigest-exporter-image", "", "The container image containing our image digest exporter binary.")
92+
flag.StringVar(&opts.Images.WorkingDirInitImage, "workingdirinit-image", "", "The container image containing our working dir init binary.")
9193

9294
flag.Parse()
9395

@@ -166,8 +168,8 @@ func main() {
166168
sinkbinding.NewController, newSinkBindingWebhook(sbSelector),
167169

168170
// Tekton stuff
169-
taskrun.NewController(opts),
170-
pipelinerun.NewController(opts),
171+
taskrun.NewController(opts, clock.RealClock{}),
172+
pipelinerun.NewController(opts, clock.RealClock{}),
171173
chains.NewController,
172174

173175
// HTTP01 Solver

config/core/200-imported/200-serving/100-resources/configuration.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,12 +119,12 @@ spec:
119119
type: object
120120
properties:
121121
args:
122-
description: 'Arguments to the entrypoint. The docker image''s CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container''s environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell'
122+
description: 'Arguments to the entrypoint. The docker image''s CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container''s environment. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell'
123123
type: array
124124
items:
125125
type: string
126126
command:
127-
description: 'Entrypoint array. Not executed within a shell. The docker image''s ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container''s environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell'
127+
description: 'Entrypoint array. Not executed within a shell. The docker image''s ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container''s environment. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell'
128128
type: array
129129
items:
130130
type: string
@@ -141,7 +141,7 @@ spec:
141141
description: Name of the environment variable. Must be a C_IDENTIFIER.
142142
type: string
143143
value:
144-
description: 'Variable references $(VAR_NAME) are expanded using the previous defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".'
144+
description: 'Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".'
145145
type: string
146146
valueFrom:
147147
description: Source for the environment variable's value. Cannot be used if value is not empty.
@@ -407,7 +407,7 @@ spec:
407407
- type: string
408408
x-kubernetes-int-or-string: true
409409
securityContext:
410-
description: 'Security options the pod should run with. More info: https://kubernetes.io/docs/concepts/policy/security-context/ More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/'
410+
description: 'SecurityContext defines the security options the container should be run with. If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext. More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/'
411411
type: object
412412
properties:
413413
capabilities:

0 commit comments

Comments
 (0)