Skip to content

Commit 25e96fc

Browse files
This commit includes topics following:
- update expected*.yaml - update test.sh for getting kubectl v1.27 instead of v1.26 - update guestbook_controller
1 parent 6ddcfe7 commit 25e96fc

File tree

16 files changed

+23
-24
lines changed

16 files changed

+23
-24
lines changed

examples/guestbook-operator/controllers/guestbook_controller.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,14 +78,13 @@ func (r *GuestbookReconciler) SetupWithManager(mgr ctrl.Manager) error {
7878
}
7979

8080
// Watch for changes to Guestbook
81-
err = c.Watch(&source.Kind{Type: &api.Guestbook{}}, &handler.EnqueueRequestForObject{})
81+
err = c.Watch(source.Kind(mgr.GetCache(), &api.Guestbook{}), &handler.EnqueueRequestForObject{})
8282
if err != nil {
8383
return err
8484
}
8585

8686
// Watch for changes to deployed objects
87-
_, err = declarative.WatchChildren(declarative.WatchChildrenOptions{Manager: mgr, Controller: c, Reconciler: r, LabelMaker: r.watchLabels})
88-
if err != nil {
87+
err = declarative.WatchChildren(declarative.WatchChildrenOptions{Manager: mgr, Controller: c, Reconciler: r, LabelMaker: r.watchLabels}) if err != nil {
8988
return err
9089
}
9190

hack/ci/test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ REPO_ROOT=$(pwd)
3131
if [[ ! -f "bin/kubectl" ]]; then
3232
echo "Downloading kubectl to bin/kubectl"
3333
mkdir -p bin/
34-
curl -L -o bin/kubectl https://dl.k8s.io/release/v1.26.0/bin/linux/amd64/kubectl
34+
curl -L -o bin/kubectl https://dl.k8s.io/release/v1.27.0/bin/linux/amd64/kubectl
3535
fi
3636
chmod +x bin/kubectl
3737
export PATH="${REPO_ROOT}/bin:$PATH"

pkg/patterns/declarative/pkg/applier/testdata/applylib/simple1/expected.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
GET http://kube-apiserver/api/v1?timeout=32s
1+
GET http://kube-apiserver/api/v1
22
Accept: application/json, */*
33

44
200 OK

pkg/patterns/declarative/pkg/applier/testdata/applylib/simple2/expected.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
GET http://kube-apiserver/api/v1?timeout=32s
1+
GET http://kube-apiserver/api/v1
22
Accept: application/json, */*
33

44
200 OK

pkg/patterns/declarative/pkg/applier/testdata/applylib/simple3/expected.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
GET http://kube-apiserver/api/v1?timeout=32s
1+
GET http://kube-apiserver/api/v1
22
Accept: application/json, */*
33

44
200 OK

pkg/patterns/declarative/pkg/applier/testdata/direct/simple1/expected.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
GET http://kube-apiserver/api/v1?timeout=32s
1+
GET http://kube-apiserver/api/v1
22
Accept: application/json, */*
33

44
200 OK

pkg/patterns/declarative/pkg/applier/testdata/direct/simple2/expected.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
GET http://kube-apiserver/api/v1?timeout=32s
1+
GET http://kube-apiserver/api/v1
22
Accept: application/json, */*
33

44
200 OK

pkg/patterns/declarative/pkg/applier/testdata/direct/simple3/expected.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
GET http://kube-apiserver/api/v1?timeout=32s
1+
GET http://kube-apiserver/api/v1
22
Accept: application/json, */*
33

44
200 OK

pkg/patterns/declarative/pkg/applier/testdata/kubectl/simple1/expected-apiserver.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Kubectl-Command: kubectl apply
2727

2828
---
2929

30-
GET /api/v1?timeout=32s
30+
GET /api/v1
3131
Accept: application/json, */*
3232
Accept-Encoding: gzip
3333
Kubectl-Command: kubectl apply

pkg/patterns/declarative/pkg/applier/testdata/kubectl/simple1/expected.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
GET http://kube-apiserver/api/v1?timeout=32s
1+
GET http://kube-apiserver/api/v1
22
Accept: application/json, */*
33

44
200 OK

0 commit comments

Comments
 (0)