Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ Bump to v1.17.2 #47

Closed
wants to merge 204 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
204 commits
Select commit Hold shift + click to select a range
3c9775c
:seedling: Bump k8s.io/apiserver from 0.28.0 to 0.28.1
dependabot[bot] Aug 28, 2023
d8712d0
:seedling: Bump github.com/onsi/ginkgo/v2 from 2.11.0 to 2.12.0
dependabot[bot] Aug 28, 2023
3bf7f5d
Update generated code
dependabot[bot] Aug 28, 2023
b34a22b
Update generated code
dependabot[bot] Aug 28, 2023
bc35946
Proposal for dynamic informer cache
maxsmythe Apr 22, 2023
f4dbd14
Add RemoveInformer for delegatingByGVK Cache
maxsmythe Aug 29, 2023
b522d7e
Merge pull request #2458 from kubernetes-sigs/dependabot/go_modules/g…
k8s-ci-robot Aug 29, 2023
aa9f8c9
Merge pull request #2457 from kubernetes-sigs/dependabot/go_modules/k…
k8s-ci-robot Aug 29, 2023
e92e5ee
add corev1, coordinationv1 scheme for leader election when LeaderElec…
troy0820 Aug 30, 2023
c1d71fc
Merge pull request #2461 from troy0820/troy0820/add-types-to-leader-e…
k8s-ci-robot Aug 31, 2023
d17751f
Refactor tests to drop hard otel dependency
howardjohn Aug 29, 2023
b9d662b
use http client from leaderElectionConfig
troy0820 Aug 31, 2023
4332e3a
Merge pull request #2460 from howardjohn/16/drop-otel
k8s-ci-robot Aug 31, 2023
1449c36
Merge pull request #2464 from troy0820/troy0820/leader-election-httpC…
k8s-ci-robot Sep 1, 2023
4d071f5
:seedling: Bump actions/checkout from 3 to 4
dependabot[bot] Sep 4, 2023
34bab8c
:seedling: Bump golang.org/x/sys from 0.11.0 to 0.12.0
dependabot[bot] Sep 4, 2023
2c87bd6
Update generated code
dependabot[bot] Sep 4, 2023
a1808ae
Merge pull request #2469 from kubernetes-sigs/dependabot/github_actio…
k8s-ci-robot Sep 5, 2023
2a553d6
Merge pull request #2470 from kubernetes-sigs/dependabot/go_modules/g…
k8s-ci-robot Sep 5, 2023
26a23a9
:bug: Return NoResourceMatchError when appropriate for backwards comp…
porridge Sep 6, 2023
3cff062
🐛 Default namespace only for namespaced object (#2480)
acumino Sep 9, 2023
14d669d
🐛 Do not update anything but status when using subresource client (#…
troy0820 Sep 9, 2023
e368149
:bug: Fix status subresource getting updated on Update when it is empty
alvaroaleman Sep 9, 2023
9dd4fc7
Merge pull request #2484 from kubernetes-sigs/status-zeroing
k8s-ci-robot Sep 9, 2023
422c831
:bug: Fix returning object after status update (#2489)
alvaroaleman Sep 10, 2023
482dd1a
Merge pull request #2472 from porridge/fix-2354
k8s-ci-robot Sep 11, 2023
1eb9a0c
create RemoveOwnerReference function in controllerutil
troy0820 Aug 30, 2023
8117577
Merge pull request #2462 from troy0820/troy0820/add-remove-owner-refe…
k8s-ci-robot Sep 12, 2023
8659251
docs: fix a grammer mistake in comment
Sep 18, 2023
f1c940e
Merge pull request #2497 from feiyudev/main
k8s-ci-robot Sep 18, 2023
f6b27aa
:seedling: Bump k8s.io/apiserver from 0.28.1 to 0.28.2
dependabot[bot] Sep 18, 2023
fedf013
:seedling: Bump go.uber.org/zap from 1.25.0 to 1.26.0
dependabot[bot] Sep 18, 2023
4929d89
Update generated code
dependabot[bot] Sep 18, 2023
55cb36f
Update generated code
dependabot[bot] Sep 18, 2023
9ac9a6c
Merge pull request #2500 from kubernetes-sigs/dependabot/go_modules/k…
k8s-ci-robot Sep 19, 2023
e9ee15e
:seedling: Bump github.com/evanphx/json-patch/v5 from 5.6.0 to 5.7.0
dependabot[bot] Sep 19, 2023
e3b9bc9
Update generated code
dependabot[bot] Sep 19, 2023
cda3b29
Merge pull request #2499 from kubernetes-sigs/dependabot/go_modules/g…
k8s-ci-robot Sep 19, 2023
1ca7aaf
:seedling: Bump github.com/evanphx/json-patch
dependabot[bot] Sep 19, 2023
88e62e2
Update generated code
dependabot[bot] Sep 19, 2023
e520ca9
Merge pull request #2502 from kubernetes-sigs/dependabot/go_modules/g…
k8s-ci-robot Sep 19, 2023
d5bc873
Merge pull request #2501 from kubernetes-sigs/dependabot/go_modules/g…
k8s-ci-robot Sep 19, 2023
d80e33f
update dependency go-restful to 3.11.0
troy0820 Sep 22, 2023
3499c8f
correctly identify if patch was done in status
acumino Sep 22, 2023
af3afdb
Merge pull request #2507 from troy0820/troy0820/update-go-restful
k8s-ci-robot Sep 22, 2023
6288e08
Add test
acumino Sep 22, 2023
da41833
add function RemoveControllerReference and HasControllerReference to …
troy0820 Sep 23, 2023
dcf55bd
Merge pull request #2508 from acumino/fake-client-sub
k8s-ci-robot Sep 24, 2023
bb09db8
✨ SetErrorWatchHandler on SharedIndexInformer (#2494)
troy0820 Sep 24, 2023
c74c3b6
:seedling: Bump github.com/onsi/ginkgo/v2 from 2.12.0 to 2.12.1
dependabot[bot] Sep 25, 2023
6324b03
Update generated code
dependabot[bot] Sep 25, 2023
e787eaa
:book: Add more examples in documentation (#2498)
aerfio Sep 26, 2023
c93e2ab
Merge pull request #2514 from kubernetes-sigs/dependabot/go_modules/g…
k8s-ci-robot Sep 26, 2023
8fa179d
Bump go-apidiff
acumino Sep 27, 2023
553bd00
Sync envtest go.mod dep with main go.mod
acumino Sep 27, 2023
4318954
:seedling: Bump github.com/prometheus/client_golang
dependabot[bot] Oct 2, 2023
c61743e
Update generated code
dependabot[bot] Oct 2, 2023
067b29f
🐛 Handle unstructured status update with fake client (#2495)
scothis Oct 5, 2023
d3adb4a
Merge pull request #2520 from kubernetes-sigs/dependabot/go_modules/g…
k8s-ci-robot Oct 5, 2023
7e78108
:seedling: Bump github.com/onsi/gomega from 1.27.10 to 1.28.0
dependabot[bot] Oct 5, 2023
ec5614a
Update generated code
dependabot[bot] Oct 5, 2023
2764d1d
Merge pull request #2521 from kubernetes-sigs/dependabot/go_modules/g…
k8s-ci-robot Oct 5, 2023
bb023ca
:bug: envtest: CRDs that aren't convertible should unset spec.conversion
vincepri Oct 5, 2023
5771399
Merge pull request #2525 from vincepri/webhook-crd-convertible-fix
k8s-ci-robot Oct 5, 2023
f2fcfbb
fix: goroutine leak
0xff-dev Oct 7, 2023
65ba74b
Merge pull request #2509 from troy0820/troy0820/hascontrollerreference
k8s-ci-robot Oct 7, 2023
86a2e50
Merge pull request #2517 from acumino/bump-dep
k8s-ci-robot Oct 7, 2023
d94cf60
Merge pull request #2527 from 0xff-dev/main
k8s-ci-robot Oct 8, 2023
414b86e
:sparkles: Cache: Allow defining options that apply to all namespaces…
alvaroaleman Oct 8, 2023
968daa8
Merge pull request #2528 from kubernetes-sigs/allow-all-but
k8s-ci-robot Oct 8, 2023
cb5be1f
:running: Make client.MatchingLabels faster
alvaroaleman Oct 9, 2023
8ac8b9f
Merge pull request #2529 from kubernetes-sigs/speed-up
k8s-ci-robot Oct 9, 2023
642ae7e
🌱 Bump envtest to 1.28.0 (#2531)
xrstf Oct 9, 2023
69b4c1f
:seedling: Bump kubernetes-sigs/kubebuilder-release-tools
dependabot[bot] Oct 9, 2023
e83e8ec
Merge pull request #2532 from kubernetes-sigs/dependabot/github_actio…
k8s-ci-robot Oct 9, 2023
249ab0e
:seedling: Bump golang.org/x/sys from 0.12.0 to 0.13.0 (#2533)
dependabot[bot] Oct 9, 2023
0f07539
:seedling: Bump github.com/onsi/ginkgo/v2 from 2.12.1 to 2.13.0 (#2534)
dependabot[bot] Oct 9, 2023
e39539c
:seedling: Bump github.com/prometheus/client_model from 0.4.1-0.20230…
dependabot[bot] Oct 9, 2023
78b3ce6
client: client.MatchingFields support multiple indexes (#2512)
halfcrazy Oct 10, 2023
949a418
deps: bump golang.org/x/net to 0.17.0
joelanford Oct 12, 2023
e25aeeb
Merge pull request #2540 from joelanford/bump-golang-x-net
k8s-ci-robot Oct 12, 2023
bf15e44
📖Update go version in setupenv-test README. Update release-notes lin…
troy0820 Oct 15, 2023
7dddccd
:seedling: Bump github.com/google/go-cmp from 0.5.9 to 0.6.0
dependabot[bot] Oct 16, 2023
0361068
Update generated code
dependabot[bot] Oct 16, 2023
aa53499
Merge pull request #2545 from kubernetes-sigs/dependabot/go_modules/g…
k8s-ci-robot Oct 17, 2023
1b74135
[fix]: Bump k8s to 1.28.3
varshaprasad96 Oct 18, 2023
c033388
Merge pull request #2553 from varshaprasad96/bump/k8s-1.28.3-main
k8s-ci-robot Oct 18, 2023
70141d0
envtest: allow to ignore scheme.Convertible check for CRDs
vincepri Oct 19, 2023
15d7928
Merge pull request #2555 from vincepri/add-flag-ignore-convertible
k8s-ci-robot Oct 19, 2023
b10b858
envtest: improve process cleanup
vincepri Oct 23, 2023
cc2a25b
Merge pull request #2285 from maxsmythe/dynamic-informer-cache
k8s-ci-robot Oct 23, 2023
8d7bcba
:seedling: Bump github.com/fsnotify/fsnotify from 1.6.0 to 1.7.0
dependabot[bot] Oct 23, 2023
f7830dc
:seedling: Bump github.com/onsi/gomega from 1.28.0 to 1.28.1
dependabot[bot] Oct 23, 2023
2b6e706
Update generated code
dependabot[bot] Oct 23, 2023
9788c6c
Update generated code
dependabot[bot] Oct 23, 2023
a3f8142
Merge pull request #2561 from kubernetes-sigs/dependabot/go_modules/g…
k8s-ci-robot Oct 24, 2023
f1c5dd3
Merge pull request #2562 from kubernetes-sigs/dependabot/go_modules/g…
k8s-ci-robot Oct 24, 2023
658c552
Merge pull request #2560 from vincepri/better-cleanup
k8s-ci-robot Oct 27, 2023
70cb17d
:seedling: Bump github.com/go-logr/logr from 1.2.4 to 1.3.0
dependabot[bot] Oct 30, 2023
0d006aa
:seedling: Bump sigs.k8s.io/yaml from 1.3.0 to 1.4.0
dependabot[bot] Oct 30, 2023
70ea3a5
:seedling: Bump go.uber.org/goleak from 1.2.1 to 1.3.0
dependabot[bot] Oct 30, 2023
8d6a6aa
Update generated code
dependabot[bot] Oct 30, 2023
58d5fae
Update generated code
dependabot[bot] Oct 30, 2023
1ac68a5
Update generated code
dependabot[bot] Oct 30, 2023
e6926ab
Merge pull request #2569 from kubernetes-sigs/dependabot/go_modules/g…
k8s-ci-robot Oct 31, 2023
bda8c64
:seedling: Bump github.com/onsi/gomega from 1.28.1 to 1.29.0
dependabot[bot] Oct 31, 2023
c787851
Update generated code
dependabot[bot] Oct 31, 2023
1951b40
Merge pull request #2567 from kubernetes-sigs/dependabot/go_modules/s…
k8s-ci-robot Oct 31, 2023
edb7fe9
Merge pull request #2568 from kubernetes-sigs/dependabot/go_modules/g…
k8s-ci-robot Oct 31, 2023
c30c66d
Merge pull request #2566 from kubernetes-sigs/dependabot/go_modules/g…
k8s-ci-robot Nov 2, 2023
994963b
:seedling: Bump golang.org/x/sys from 0.13.0 to 0.14.0
dependabot[bot] Nov 6, 2023
3877360
:seedling: Bump k8s.io/klog/v2 from 2.100.1 to 2.110.1
dependabot[bot] Nov 6, 2023
23d8c97
:seedling: Bump github.com/go-logr/zapr from 1.2.4 to 1.3.0
dependabot[bot] Nov 6, 2023
447263f
Update generated code
dependabot[bot] Nov 6, 2023
2d884e4
Update generated code
dependabot[bot] Nov 6, 2023
fd35c3e
Update generated code
dependabot[bot] Nov 6, 2023
cc4b3d6
:seedling: Bump kubernetes-sigs/kubebuilder-release-tools
dependabot[bot] Nov 6, 2023
4fd8d38
Merge pull request #2572 from kubernetes-sigs/dependabot/go_modules/g…
k8s-ci-robot Nov 7, 2023
0fb2940
Merge pull request #2573 from kubernetes-sigs/dependabot/go_modules/k…
k8s-ci-robot Nov 7, 2023
9f9f369
Merge pull request #2574 from kubernetes-sigs/dependabot/go_modules/g…
k8s-ci-robot Nov 7, 2023
818a2e1
Merge pull request #2575 from kubernetes-sigs/dependabot/github_actio…
k8s-ci-robot Nov 8, 2023
48b5aa2
:seedling: Bump github.com/onsi/ginkgo/v2 from 2.13.0 to 2.13.1
dependabot[bot] Nov 13, 2023
8f256a5
Update generated code
dependabot[bot] Nov 13, 2023
d8f8012
Merge pull request #2578 from kubernetes-sigs/dependabot/go_modules/g…
k8s-ci-robot Nov 13, 2023
6c6cbc4
:seedling: Bump github.com/onsi/gomega from 1.29.0 to 1.30.0
dependabot[bot] Nov 13, 2023
15d3d31
Update generated code
dependabot[bot] Nov 13, 2023
b81fc66
Merge pull request #2579 from kubernetes-sigs/dependabot/go_modules/g…
k8s-ci-robot Nov 14, 2023
3ddde48
replace k8s.io/utils/pointer with k8s.io/utils/ptr
inteon Nov 20, 2023
53cd67b
Merge pull request #2488 from inteon/upgrade_dependencies
k8s-ci-robot Nov 21, 2023
7296c20
:seedling: Bump k8s.io/apiserver from 0.28.3 to 0.28.4
dependabot[bot] Nov 21, 2023
693885d
Update generated code
dependabot[bot] Nov 21, 2023
2154ffb
Merge pull request #2588 from kubernetes-sigs/dependabot/go_modules/k…
k8s-ci-robot Nov 21, 2023
9c4611e
remove owner passed in to RemoveControlleReference only when that own…
troy0820 Nov 24, 2023
6981d11
Fix typo in Reconciler interface comment
boseabhishek Nov 29, 2023
a50d5d7
:seedling: Bump golang.org/x/sys from 0.14.0 to 0.15.0 (#2597)
dependabot[bot] Dec 1, 2023
ddba256
Fix komega godoc examples
erikgb Dec 2, 2023
1657cf6
Merge pull request #2602 from erikgb/fix-komega-godoc-examples
k8s-ci-robot Dec 2, 2023
13c946d
cleanup webhook variable assignment
inteon Dec 3, 2023
8d817e7
Merge pull request #2604 from inteon/webhook_codecleanup
k8s-ci-robot Dec 3, 2023
cf7eab0
add missing NoBody handling
inteon Dec 3, 2023
0376af3
Merge pull request #2605 from inteon/handle_empty_http_bodies
k8s-ci-robot Dec 3, 2023
fc88f2b
bump golang version in GH actions
inteon Dec 3, 2023
8fa865b
Merge pull request #2609 from inteon/bump_golang_in_ci
k8s-ci-robot Dec 3, 2023
c2179ec
Merge pull request #2599 from boseabhishek/main
k8s-ci-robot Dec 4, 2023
1fe3341
Merge pull request #2595 from troy0820/troy0820/remove-controller-ref…
k8s-ci-robot Dec 4, 2023
2643995
:seedling: Bump github.com/onsi/ginkgo/v2 from 2.13.1 to 2.13.2
dependabot[bot] Dec 4, 2023
4b1fbac
Update generated code
dependabot[bot] Dec 4, 2023
1c599dd
Merge pull request #2610 from kubernetes-sigs/dependabot/go_modules/g…
k8s-ci-robot Dec 5, 2023
cadc020
:warning: Drop DiscoveryRESTMapper
alvaroaleman Dec 6, 2023
f0ccc08
Merge pull request #2611 from alvaroaleman/drop-discovery-restmapper
k8s-ci-robot Dec 6, 2023
b97744c
:warning: Update k8s.io/* deps to 1.29-rc1
alvaroaleman Dec 3, 2023
1ea2be5
Merge pull request #2612 from alvaroaleman/update-129
k8s-ci-robot Dec 6, 2023
ee4d245
Update k8s.kio/* deps to 1.29-rc2
sbueringer Dec 11, 2023
9b51cb5
Merge pull request #2615 from sbueringer/pr-1.29-rc2
k8s-ci-robot Dec 11, 2023
c18b8a8
:seedling: Bump actions/setup-go from 4 to 5
dependabot[bot] Dec 11, 2023
9193d0b
:seedling: Bump kubernetes-sigs/kubebuilder-release-tools
dependabot[bot] Dec 11, 2023
76b5567
Merge pull request #2617 from kubernetes-sigs/dependabot/github_actio…
k8s-ci-robot Dec 12, 2023
eeaa31c
Merge pull request #2618 from kubernetes-sigs/dependabot/github_actio…
k8s-ci-robot Dec 12, 2023
52c391f
Update k8s.kio/* deps to 1.29
sbueringer Dec 14, 2023
4c4a90c
Merge pull request #2621 from sbueringer/pr-bump-to-1.29
k8s-ci-robot Dec 15, 2023
51d7681
add flowcontrol v1 for v1.29.0
troy0820 Dec 14, 2023
1b80b96
Merge pull request #2623 from troy0820/troy0820/remove-flowcontrol-api
k8s-ci-robot Dec 15, 2023
9f3bcfe
:seedling: Bump github.com/go-logr/logr from 1.3.0 to 1.4.1
dependabot[bot] Dec 25, 2023
cade5a7
Update generated code
dependabot[bot] Dec 25, 2023
68102dc
Merge pull request #2630 from kubernetes-sigs/dependabot/go_modules/g…
k8s-ci-robot Jan 1, 2024
a4180fc
:seedling: Bump github.com/prometheus/client_golang
dependabot[bot] Jan 1, 2024
86aad9f
Update generated code
dependabot[bot] Jan 1, 2024
5e8d572
Merge pull request #2632 from kubernetes-sigs/dependabot/go_modules/g…
k8s-ci-robot Jan 2, 2024
7f316f1
⚠️ RESTMapper: don't treat non-existing GroupVersions as errors (#2571)
ary1992 Jan 2, 2024
f6052ab
:warning: Fakeclient: Only set TypeMeta for unstructured
alvaroaleman Jan 3, 2024
91f642b
Merge pull request #2633 from alvaroaleman/pointer
k8s-ci-robot Jan 4, 2024
f4fe233
pkg/metrics: add 100/1000s buckets for workqueue histograms
seankhliao Jan 5, 2024
1c704b9
:warning: Deprecate admission.Validator and admission.Defaulter
alvaroaleman Jan 6, 2024
5804716
📖 Add documentation note describing behavior with status (#2635)
jfremy Jan 6, 2024
5c21730
Merge pull request #2639 from alvaroaleman/deprecate-validator
k8s-ci-robot Jan 7, 2024
69e14f1
⚠️ Use limited reader in webhooks (#2598)
inteon Jan 8, 2024
ac0b704
:seedling: Bump golang.org/x/sys from 0.15.0 to 0.16.0
dependabot[bot] Jan 8, 2024
11d4bbb
Update generated code
dependabot[bot] Jan 8, 2024
bf3d274
Merge pull request #2642 from kubernetes-sigs/dependabot/go_modules/g…
k8s-ci-robot Jan 9, 2024
984a121
✨ Add reconcile.ObjectReconciler (#2592)
JamesOwenHall Jan 9, 2024
8858b93
Downgrade github.com/evanphx/json-patch library to v4 to match upstre…
aerfio Jan 10, 2024
5172a23
Avoid dependency on apiserver/options if metrics/filters are used
sbueringer Jan 10, 2024
8f8247f
Merge pull request #2645 from sbueringer/pr-avoid-deps
k8s-ci-robot Jan 10, 2024
8dab940
Fix client-related comments
fxierh Jan 10, 2024
0a90173
Merge pull request #2638 from seankhliao/higher-end-buckets
k8s-ci-robot Jan 11, 2024
6006754
Bump to controller-tools v0.14.0
sbueringer Jan 11, 2024
7679253
Merge pull request #2649 from sbueringer/pr-bump-ct
k8s-ci-robot Jan 11, 2024
f29ed4e
Elaborate in which cases the client reads from a cache
fxierh Jan 11, 2024
48d9a7b
Merge pull request #2647 from fxierh/fix-client-comments
k8s-ci-robot Jan 12, 2024
ea529dd
:bug: Don't truncate large int64s in MergePatch
alvaroaleman Jan 12, 2024
9e6e3b1
Merge pull request #2650 from alvaroaleman/bump-jsonpatch
k8s-ci-robot Jan 15, 2024
a23bdc8
:seedling: Bump github.com/onsi/ginkgo/v2 from 2.13.2 to 2.14.0
dependabot[bot] Jan 15, 2024
d5f5430
Update generated code
dependabot[bot] Jan 15, 2024
672d678
bump go-apidiff to v0.8.2
joelanford Jan 16, 2024
66939d4
Merge pull request #2655 from joelanford/bump-apidiff
k8s-ci-robot Jan 16, 2024
11e5a5e
Merge pull request #2651 from kubernetes-sigs/dependabot/go_modules/g…
k8s-ci-robot Jan 16, 2024
40b41df
Clean restmapper cache if a version is notFound
g-gaston Jan 24, 2024
0811bad
Address review comments
g-gaston Feb 6, 2024
5923139
Merge pull request #2676 from k8s-infra-cherrypick-robot/cherry-pick-…
k8s-ci-robot Feb 8, 2024
984aee6
bug: Fakeclient: Do not consider an apply patch to be a strategic mer…
alvaroaleman Feb 9, 2024
59c26c0
Merge pull request #2681 from k8s-infra-cherrypick-robot/cherry-pick-…
k8s-ci-robot Feb 12, 2024
565aa5b
Fix lazy rest mapper cache invalidation
g-gaston Feb 14, 2024
d0396a3
Merge pull request #2688 from k8s-infra-cherrypick-robot/cherry-pick-…
k8s-ci-robot Feb 15, 2024
b8077b1
Merge remote-tracking branch 'kcp-dev/kcp-1.28' into kcp-1.28-1.17.2
sttts Feb 29, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ jobs:
- ""
- tools/setup-envtest
steps:
- uses: actions/setup-go@v4
- uses: actions/setup-go@v5
with:
go-version: '1.20'
go-version: '1.21'
cache: false
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.53.3
version: v1.54.0
working-directory: ${{matrix.working-directory}}
6 changes: 3 additions & 3 deletions .github/workflows/pr-dependabot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # tag=v3.5.3
uses: actions/checkout@v4 # tag=v3.5.3
- name: Set up Go
uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # tag=v4.0.1
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # tag=v5.0.0
with:
go-version: '1.20'
go-version: '1.21'
- name: Update all modules
run: make modules
- uses: EndBug/add-and-commit@1bad3abcf0d6ec49a5857d124b0bfb52dc7bb081 # tag=v9.1.3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ jobs:
steps:
- name: Verifier action
id: verifier
uses: kubernetes-sigs/kubebuilder-release-tools@v0.3.0
uses: kubernetes-sigs/kubebuilder-release-tools@v0.4.3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
4 changes: 2 additions & 2 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ linters-settings:
- pkg: sigs.k8s.io/controller-runtime
alias: ctrl
staticcheck:
go: "1.20"
go: "1.21"
stylecheck:
go: "1.20"
go: "1.21"
revive:
rules:
# The following rules are recommended https://github.com/mgechev/revive#recommended-configuration
Expand Down
14 changes: 9 additions & 5 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ The Kubernetes controller-runtime Project is released on an as-needed basis. The

**Note:** Releases are done from the `release-MAJOR.MINOR` branches. For PATCH releases is not required
to create a new branch you will just need to ensure that all big fixes are cherry-picked into the respective
`release-MAJOR.MINOR` branch. To know more about versioning check https://semver.org/.
`release-MAJOR.MINOR` branch. To know more about versioning check https://semver.org/.

## How to do a release
## How to do a release

### Create the new branch and the release tag

Expand All @@ -15,7 +15,7 @@ to create a new branch you will just need to ensure that all big fixes are cherr

### Now, let's generate the changelog

1. Create the changelog from the new branch `release-<MAJOR.MINOR>` (`git checkout release-<MAJOR.MINOR>`).
1. Create the changelog from the new branch `release-<MAJOR.MINOR>` (`git checkout release-<MAJOR.MINOR>`).
You will need to use the [kubebuilder-release-tools][kubebuilder-release-tools] to generate the notes. See [here][release-notes-generation]

> **Note**
Expand All @@ -24,12 +24,12 @@ You will need to use the [kubebuilder-release-tools][kubebuilder-release-tools]
### Draft a new release from GitHub

1. Create a new tag with the correct version from the new `release-<MAJOR.MINOR>` branch
1. Create a new tag with the correct version from the new `release-<MAJOR.MINOR>` branch
2. Add the changelog on it and publish. Now, the code source is released !

### Add a new Prow test the for the new branch release

1. Create a new prow test under [github.com/kubernetes/test-infra/tree/master/config/jobs/kubernetes-sigs/controller-runtime](https://github.com/kubernetes/test-infra/tree/master/config/jobs/kubernetes-sigs/controller-runtime)
1. Create a new prow test under [github.com/kubernetes/test-infra/tree/master/config/jobs/kubernetes-sigs/controller-runtime](https://github.com/kubernetes/test-infra/tree/master/config/jobs/kubernetes-sigs/controller-runtime)
for the new `release-<MAJOR.MINOR>` branch. (i.e. for the `0.11.0` release see the PR: https://github.com/kubernetes/test-infra/pull/25205)
2. Ping the infra PR in the controller-runtime slack channel for reviews.

Expand All @@ -45,3 +45,7 @@ For more info, see the release page: https://github.com/kubernetes-sigs/controll
````

2. An announcement email is sent to `kubebuilder@googlegroups.com` with the subject `[ANNOUNCE] Controller-Runtime $VERSION is released`

[kubebuilder-release-tools]: https://github.com/kubernetes-sigs/kubebuilder-release-tools
[release-notes-generation]: https://github.com/kubernetes-sigs/kubebuilder-release-tools/blob/master/README.md#release-notes-generation
[release-process]: https://github.com/kubernetes-sigs/kubebuilder/blob/master/VERSIONING.md#releasing
99 changes: 97 additions & 2 deletions example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,21 @@ package controllerruntime_test

import (
"context"
"encoding/json"
"fmt"
"os"
"time"

appsv1 "k8s.io/api/apps/v1"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/types"

ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/controller-runtime/pkg/handler"
"sigs.k8s.io/controller-runtime/pkg/reconcile"

// since we invoke tests with -ginkgo.junit-report we need to import ginkgo.
_ "github.com/onsi/ginkgo/v2"
Expand All @@ -38,7 +45,7 @@ import (
//
// * Start the application.
func Example() {
var log = ctrl.Log.WithName("builder-examples")
log := ctrl.Log.WithName("builder-examples")

manager, err := ctrl.NewManager(ctrl.GetConfigOrDie(), ctrl.Options{})
if err != nil {
Expand All @@ -62,6 +69,94 @@ func Example() {
}
}

type ExampleCRDWithConfigMapRef struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
ConfigMapRef corev1.LocalObjectReference `json:"configMapRef"`
}

func deepCopyObject(arg any) runtime.Object {
// DO NOT use this code in production code, this is only for presentation purposes.
// in real code you should generate DeepCopy methods by using controller-gen CLI tool.
argBytes, err := json.Marshal(arg)
if err != nil {
panic(err)
}
out := &ExampleCRDWithConfigMapRefList{}
if err := json.Unmarshal(argBytes, out); err != nil {
panic(err)
}
return out
}

// DeepCopyObject implements client.Object.
func (in *ExampleCRDWithConfigMapRef) DeepCopyObject() runtime.Object {
return deepCopyObject(in)
}

type ExampleCRDWithConfigMapRefList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []ExampleCRDWithConfigMapRef `json:"items"`
}

// DeepCopyObject implements client.ObjectList.
func (in *ExampleCRDWithConfigMapRefList) DeepCopyObject() runtime.Object {
return deepCopyObject(in)
}

// This example creates a simple application Controller that is configured for ExampleCRDWithConfigMapRef CRD.
// Any change in the configMap referenced in this Custom Resource will cause the re-reconcile of the parent ExampleCRDWithConfigMapRef
// due to the implementation of the .Watches method of "sigs.k8s.io/controller-runtime/pkg/builder".Builder.
func Example_customHandler() {
log := ctrl.Log.WithName("builder-examples")

manager, err := ctrl.NewManager(ctrl.GetConfigOrDie(), ctrl.Options{})
if err != nil {
log.Error(err, "could not create manager")
os.Exit(1)
}

err = ctrl.
NewControllerManagedBy(manager).
For(&ExampleCRDWithConfigMapRef{}).
Watches(&corev1.ConfigMap{}, handler.EnqueueRequestsFromMapFunc(func(ctx context.Context, cm client.Object) []ctrl.Request {
// map a change from referenced configMap to ExampleCRDWithConfigMapRef, which causes its re-reconcile
crList := &ExampleCRDWithConfigMapRefList{}
if err := manager.GetClient().List(ctx, crList); err != nil {
manager.GetLogger().Error(err, "while listing ExampleCRDWithConfigMapRefs")
return nil
}

reqs := make([]ctrl.Request, 0, len(crList.Items))
for _, item := range crList.Items {
if item.ConfigMapRef.Name == cm.GetName() {
reqs = append(reqs, ctrl.Request{
NamespacedName: types.NamespacedName{
Namespace: item.GetNamespace(),
Name: item.GetName(),
},
})
}
}

return reqs
})).
Complete(reconcile.Func(func(ctx context.Context, r reconcile.Request) (reconcile.Result, error) {
// Your business logic to implement the API by creating, updating, deleting objects goes here.
return reconcile.Result{}, nil
}))
if err != nil {
log.Error(err, "could not create controller")
os.Exit(1)
}

if err := manager.Start(ctrl.SetupSignalHandler()); err != nil {
log.Error(err, "could not start manager")
os.Exit(1)
}
}

// This example creates a simple application Controller that is configured for ReplicaSets and Pods.
// This application controller will be running leader election with the provided configuration in the manager options.
// If leader election configuration is not provided, controller runs leader election with default values.
Expand All @@ -75,7 +170,7 @@ func Example() {
//
// * Start the application.
func Example_updateLeaderElectionDurations() {
var log = ctrl.Log.WithName("builder-examples")
log := ctrl.Log.WithName("builder-examples")
leaseDuration := 100 * time.Second
renewDeadline := 80 * time.Second
retryPeriod := 20 * time.Second
Expand Down
61 changes: 0 additions & 61 deletions examples/crd/pkg/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,8 @@ limitations under the License.
package pkg

import (
"fmt"
"time"

corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"sigs.k8s.io/controller-runtime/pkg/webhook"
"sigs.k8s.io/controller-runtime/pkg/webhook/admission"
)

// ChaosPodSpec defines the desired state of ChaosPod
Expand Down Expand Up @@ -62,61 +56,6 @@ type ChaosPodList struct {
Items []ChaosPod `json:"items"`
}

// +kubebuilder:webhook:path=/validate-chaosapps-metamagical-io-v1-chaospod,mutating=false,failurePolicy=fail,groups=chaosapps.metamagical.io,resources=chaospods,verbs=create;update,versions=v1,name=vchaospod.kb.io

var _ webhook.Validator = &ChaosPod{}

// ValidateCreate implements webhookutil.validator so a webhook will be registered for the type
func (c *ChaosPod) ValidateCreate() (admission.Warnings, error) {
log.Info("validate create", "name", c.Name)

if c.Spec.NextStop.Before(&metav1.Time{Time: time.Now()}) {
return nil, fmt.Errorf(".spec.nextStop must be later than current time")
}
return nil, nil
}

// ValidateUpdate implements webhookutil.validator so a webhook will be registered for the type
func (c *ChaosPod) ValidateUpdate(old runtime.Object) (admission.Warnings, error) {
log.Info("validate update", "name", c.Name)

if c.Spec.NextStop.Before(&metav1.Time{Time: time.Now()}) {
return nil, fmt.Errorf(".spec.nextStop must be later than current time")
}

oldC, ok := old.(*ChaosPod)
if !ok {
return nil, fmt.Errorf("expect old object to be a %T instead of %T", oldC, old)
}
if c.Spec.NextStop.After(oldC.Spec.NextStop.Add(time.Hour)) {
return nil, fmt.Errorf("it is not allowed to delay.spec.nextStop for more than 1 hour")
}
return nil, nil
}

// ValidateDelete implements webhookutil.validator so a webhook will be registered for the type
func (c *ChaosPod) ValidateDelete() (admission.Warnings, error) {
log.Info("validate delete", "name", c.Name)

if c.Spec.NextStop.Before(&metav1.Time{Time: time.Now()}) {
return nil, fmt.Errorf(".spec.nextStop must be later than current time")
}
return nil, nil
}

// +kubebuilder:webhook:path=/mutate-chaosapps-metamagical-io-v1-chaospod,mutating=true,failurePolicy=fail,groups=chaosapps.metamagical.io,resources=chaospods,verbs=create;update,versions=v1,name=mchaospod.kb.io

var _ webhook.Defaulter = &ChaosPod{}

// Default implements webhookutil.defaulter so a webhook will be registered for the type
func (c *ChaosPod) Default() {
log.Info("default", "name", c.Name)

if c.Spec.NextStop.Before(&metav1.Time{Time: time.Now()}) {
c.Spec.NextStop = metav1.Time{Time: time.Now().Add(time.Minute)}
}
}

func init() {
SchemeBuilder.Register(&ChaosPod{}, &ChaosPodList{})
}
67 changes: 65 additions & 2 deletions examples/scratch-env/go.mod
Original file line number Diff line number Diff line change
@@ -1,11 +1,74 @@
module sigs.k8s.io/controller-runtime/examples/scratch-env

go 1.15
go 1.21

toolchain go1.21.0

require (
github.com/spf13/pflag v1.0.5
go.uber.org/zap v1.25.0
go.uber.org/zap v1.26.0
sigs.k8s.io/controller-runtime v0.0.0-00010101000000-000000000000
)

require (
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/emicklei/go-restful/v3 v3.11.0 // indirect
github.com/evanphx/json-patch/v5 v5.8.0 // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/go-logr/logr v1.4.1 // indirect
github.com/go-logr/zapr v1.3.0 // indirect
github.com/go-openapi/jsonpointer v0.19.6 // indirect
github.com/go-openapi/jsonreference v0.20.2 // indirect
github.com/go-openapi/swag v0.22.3 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/gnostic-models v0.6.8 // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/imdario/mergo v0.3.6 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/kcp-dev/apimachinery/v2 v2.0.0-alpha.0.0.20230926071920-57d168bcbe34 // indirect
github.com/kcp-dev/logicalcluster/v3 v3.0.4 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/prometheus/client_golang v1.18.0 // indirect
github.com/prometheus/client_model v0.5.0 // indirect
github.com/prometheus/common v0.45.0 // indirect
github.com/prometheus/procfs v0.12.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/exp v0.0.0-20220827204233-334a2380cb91 // indirect
golang.org/x/net v0.19.0 // indirect
golang.org/x/oauth2 v0.12.0 // indirect
golang.org/x/sys v0.16.0 // indirect
golang.org/x/term v0.15.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/time v0.3.0 // indirect
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/protobuf v1.31.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/api v0.29.0 // indirect
k8s.io/apiextensions-apiserver v0.29.0 // indirect
k8s.io/apimachinery v0.29.0 // indirect
k8s.io/client-go v0.29.0 // indirect
k8s.io/component-base v0.29.0 // indirect
k8s.io/klog/v2 v2.110.1 // indirect
k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 // indirect
k8s.io/utils v0.0.0-20240102154912-e7106e64919e // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
sigs.k8s.io/yaml v1.4.0 // indirect
)

replace sigs.k8s.io/controller-runtime => ../..
Loading