Skip to content

[pull] master from kubernetes-sigs:master #143

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

Open
wants to merge 462 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
462 commits
Select commit Hold shift + click to select a range
cb0391a
nit fix in client package documentation
Jun 23, 2022
397a125
✨ Bump k8s.io packages to v1.24.2 (#1935)
friedrichwilken Jun 23, 2022
a550f29
✨ Bump dependencies (#1937)
friedrichwilken Jun 23, 2022
ffd9ec8
Merge pull request #1939 from rpriyanshu9/minor-nit
k8s-ci-robot Jun 23, 2022
f7d95bb
Do not mutate the global warning handler
ash2k Jun 28, 2022
845dcf3
remove no-op clientgo reflector metrics
zqzten May 14, 2022
17893a8
Merge pull request #1946 from zqzten/remove_reflector_metrics
k8s-ci-robot Jun 28, 2022
365ae09
Merge pull request #1944 from ash2k/no-global-warning-mutation
k8s-ci-robot Jun 29, 2022
3eaf673
Provide access to admission.Request in custom validator/defaulter
sbueringer Jul 6, 2022
15154aa
Merge pull request #1950 from sbueringer/pr-webhook-adm-request
k8s-ci-robot Jul 6, 2022
b93b5f9
⚠️ Fix broken kind logging (#1954)
tatsuhiro-t Jul 15, 2022
037bde6
webhook: add an option to recover from panics in handler
isitinschi May 13, 2022
88234a8
Merge pull request #1900 from isitinschi/webhooks-recover-panics
k8s-ci-robot Jul 15, 2022
f035121
:book: fix docs: typo in OpenAPI (#1957)
davidxia Jul 22, 2022
3f0eec7
Bump k8s v0.25.0-alpha.3
jmrodri Aug 2, 2022
bcde6f0
Merge pull request #1967 from jmrodri/bump-k8s-125
k8s-ci-robot Aug 8, 2022
43b0e4b
Rearange `EventBroadcaster` log statement.
danaradg Aug 10, 2022
682754a
Update golangci-lint to 1.47.3
alvaroaleman Aug 11, 2022
f27ed4a
Merge pull request #1976 from alvaroaleman/update
k8s-ci-robot Aug 11, 2022
797c6b5
Fix log depth for DelegatingLogSink
alculquicondor Aug 10, 2022
5a88c51
Merge pull request #1975 from alculquicondor/fix-log-depth
k8s-ci-robot Aug 12, 2022
b792a7d
Merge pull request #1974 from danaradg/event-broadcaster-log-fix
k8s-ci-robot Aug 12, 2022
c2c26e3
Implement IgnoreAlreadyExists
rstefan1 Aug 2, 2022
2d210d0
Merge pull request #1965 from rstefan1/implement-ignore-already-exists
k8s-ci-robot Aug 17, 2022
3ba8cf0
docs: update doc for reconcile example
nakamasato Aug 19, 2022
7a5d60d
Merge pull request #1983 from nakamasato/fix-reconciler-comment
k8s-ci-robot Aug 23, 2022
0873d15
Bump k8s libs to v1.25
Fedosin Aug 25, 2022
02dc464
Merge pull request #1985 from Fedosin/k8s_v125
k8s-ci-robot Aug 25, 2022
4b208ab
Bump golangci lint to v1.49.0
sbueringer Aug 25, 2022
d242fe2
Merge pull request #1988 from sbueringer/pr-bump-golangci-lint
k8s-ci-robot Aug 25, 2022
2c3a6fa
⚠ Migrate to ginkgo v2 (#1977)
schrej Aug 26, 2022
c5c4a41
Bump golang version to 1.19
laxmikantbpandhare Aug 25, 2022
d9593cf
Merge pull request #1986 from laxmikantbpandhare/update-go-1.19
k8s-ci-robot Aug 26, 2022
b38c4a5
fix: cache.BuilderWithOptions inherit options from caller
joelanford Aug 9, 2022
15b6689
Merge pull request #1980 from joelanford/fix-cache-inheritance
k8s-ci-robot Aug 31, 2022
101a413
add comments for configuration
Icarus9913 Sep 2, 2022
c83076e
Merge pull request #1992 from Icarus9913/config-comments
k8s-ci-robot Sep 7, 2022
1d8e1b3
grammar: removed doubles of the word "the"
oscr Sep 19, 2022
07ba0bc
Fix panic in conversion webhook
Tomy2e Aug 8, 2022
78b203b
Merge pull request #1970 from Tomy2e/panic-conversion-webhook
k8s-ci-robot Sep 26, 2022
09e83d3
Merge pull request #1795 from hyschumi/refactor_same_code_style
k8s-ci-robot Sep 26, 2022
0702a66
Merge pull request #2006 from oscr/the-the
k8s-ci-robot Sep 27, 2022
6892cb8
Bump kubebuilder-release-tools to v0.2.0
sbueringer Sep 27, 2022
823aedb
Merge pull request #2012 from sbueringer/pr-bump-release-tools
k8s-ci-robot Sep 27, 2022
5e9bad4
Add sbueringer as reviewer
sbueringer Sep 27, 2022
7399a3a
Merge pull request #2013 from sbueringer/pr-add-sbueringer-as-reviewer
k8s-ci-robot Sep 27, 2022
371f601
Advertise struct pointer requirement for Create
matteoolivi Oct 4, 2022
8ad090e
Merge pull request #2017 from matteoolivi/add_comment_on_struct_point…
k8s-ci-robot Oct 7, 2022
689e72f
Add tls options to manager.Options
sbueringer Oct 17, 2022
b31c39c
Allow to provide a custom lock interface to manager
johscheuer Oct 19, 2022
15d69a2
Merge pull request #2023 from sbueringer/pr-add-tls-options
k8s-ci-robot Oct 21, 2022
9f9e840
Merge pull request #2027 from johscheuer/allow-custom-lock-interface
k8s-ci-robot Oct 21, 2022
60e524b
⚠ Zap log: Default to RFC3339 time encoding
alvaroaleman Oct 21, 2022
090611b
Merge pull request #2029 from alvaroaleman/rfc339
k8s-ci-robot Oct 22, 2022
3fb6876
Fix documentation typo
larsks Oct 23, 2022
02c1fae
feat: add Not predicate
erikgb Oct 24, 2022
7d16aec
Merge pull request #2030 from larsks/patch-1
k8s-ci-robot Oct 25, 2022
a0e1772
:seedling: Register kubeconfig flag variable via RegisterFlags func (…
johannesfrey Oct 26, 2022
4c9c956
✨ Add indexes to fake client to mimic field selectors (#2025)
matteoolivi Oct 26, 2022
f4a5ec5
docs: update channel
Eileen-Yu Nov 1, 2022
c2f04bb
Merge pull request #2034 from Eileen-Yu/docs/update-channel
k8s-ci-robot Nov 1, 2022
ff622bd
Merge pull request #2031 from erikgb/feat/not-predicate
k8s-ci-robot Nov 6, 2022
06a9617
fix: improve semantics of combining cache selectorsByObject
joelanford Nov 8, 2022
5378660
Merge pull request #2039 from joelanford/fix-selectors-by-object-scheme
k8s-ci-robot Nov 9, 2022
869888c
:seedling: Deprecate Webhook Server TLSMinVersion
alvaroaleman Nov 9, 2022
8da9760
Merge pull request #2041 from alvaroaleman/deprecate
k8s-ci-robot Nov 9, 2022
4dafb9e
Bump K8s v0.26.0-alpha.3
FillZpp Nov 11, 2022
50077a4
Merge pull request #2043 from FillZpp/bump-k8s-126
k8s-ci-robot Nov 15, 2022
6d2d247
Support registration and removal for event handler
FillZpp Nov 15, 2022
af8d903
Merge pull request #2046 from FillZpp/add-return-registration-into-ev…
k8s-ci-robot Nov 16, 2022
f18a0c1
🐛 Skip custom mutation handler when delete a CR
iiiceoo Nov 18, 2022
accd262
Merge pull request #2049 from iiiceoo/fix-del
k8s-ci-robot Nov 18, 2022
4889c14
Add Dependabot
kannon92 Nov 21, 2022
0070bb2
:sparkles: Add function to get reconcileID from context
zbindenren Nov 23, 2022
2da459c
Tidy up startup logging of kindWithCache source
Miciah Nov 23, 2022
e7b2d45
Merge pull request #2050 from kannon92/dependabot
k8s-ci-robot Nov 23, 2022
3e68cf6
:seedling: Bump golangci/golangci-lint-action from 2 to 3
dependabot[bot] Nov 23, 2022
863e376
:seedling: Bump actions/checkout from 2 to 3
dependabot[bot] Nov 23, 2022
b604650
Bump go.uber.org/zap from 1.21.0 to 1.23.0
dependabot[bot] Nov 23, 2022
92611cb
Merge pull request #2056 from zbindenren/request-id-from-context
k8s-ci-robot Nov 24, 2022
5975720
Merge pull request #2058 from kubernetes-sigs/dependabot/github_actio…
k8s-ci-robot Nov 24, 2022
346df52
Merge pull request #2059 from kubernetes-sigs/dependabot/github_actio…
k8s-ci-robot Nov 24, 2022
e57ce78
Merge pull request #2060 from kubernetes-sigs/dependabot/go_modules/g…
k8s-ci-robot Nov 24, 2022
1ff65b5
Bump github.com/onsi/gomega from 1.23.0 to 1.24.1
dependabot[bot] Nov 24, 2022
4dae0f2
Merge pull request #2062 from kubernetes-sigs/dependabot/go_modules/g…
k8s-ci-robot Nov 24, 2022
00f2425
Merge pull request #2057 from Miciah/tidy-up-startup-logging-of-kindW…
k8s-ci-robot Nov 24, 2022
dc2b31e
seedling to dependabot
kannon92 Nov 25, 2022
5a38689
Merge pull request #2065 from kannon92/seedling-dependabot
k8s-ci-robot Nov 25, 2022
6d12b09
:seedling: Bump github.com/onsi/ginkgo/v2 from 2.5.0 to 2.5.1
dependabot[bot] Nov 25, 2022
c5db9d3
Merge pull request #2066 from kubernetes-sigs/dependabot/go_modules/g…
k8s-ci-robot Nov 25, 2022
197a558
:seedling: Bump github.com/prometheus/client_golang
dependabot[bot] Nov 25, 2022
784a331
Merge pull request #2070 from kubernetes-sigs/dependabot/go_modules/g…
k8s-ci-robot Nov 25, 2022
77c08f8
Ignore Kubernetes API Versions
kannon92 Nov 25, 2022
ea26ea4
Merge pull request #2071 from kannon92/seedling-dependabot
k8s-ci-robot Nov 25, 2022
cdbd4b7
:sparkles: Add cluster.NewClientFunc with options
erikgb Nov 21, 2022
007d240
Merge pull request #2054 from erikgb/feat/cache-unstructured-client
k8s-ci-robot Nov 26, 2022
ebda1ad
fix: Missing error log for in-cluster config
maciej-karas-form3 Nov 21, 2022
9489eb5
Merge pull request #2051 from maciej-karas-form3/patch-1
k8s-ci-robot Nov 28, 2022
d7724aa
:warning: Add client.SubResourceWriter
alvaroaleman Nov 28, 2022
262268f
Merge pull request #2072 from alvaroaleman/support-subresource-modifi…
k8s-ci-robot Nov 30, 2022
d991225
✨ Enable metrics of clientgo leader election (#1901)
zqzten Dec 1, 2022
fa851a5
:seedling: Bump golang.org/x/sys from 0.2.0 to 0.3.0
dependabot[bot] Dec 5, 2022
6a760d6
Merge pull request #2078 from kubernetes-sigs/dependabot/go_modules/g…
k8s-ci-robot Dec 6, 2022
c18d43f
:seedling: Bump go.uber.org/zap from 1.23.0 to 1.24.0
dependabot[bot] Dec 6, 2022
f40b846
Merge pull request #2077 from kubernetes-sigs/dependabot/go_modules/g…
k8s-ci-robot Dec 6, 2022
59682cb
feat: supprot disable deepcopy on list funcion
qiankunli Dec 5, 2022
636fd1f
Merge pull request #2076 from qiankunli/feature/support_disabledeepco…
k8s-ci-robot Dec 6, 2022
9fa0f07
:seedling: Update golangci-lint to v1.50.1
vincepri Dec 6, 2022
f8202bb
Default ENVTEST version to a working one (1.24.2)
vincepri Dec 6, 2022
d29b330
Merge pull request #2080 from vincepri/update-golangcilint-1502
k8s-ci-robot Dec 6, 2022
3da2de0
Merge pull request #2081 from kubernetes-sigs/fixup-default-envtest
k8s-ci-robot Dec 6, 2022
344e96e
Update OWNERS: remove inactive members, promote fillzpp sbueringer
vincepri Dec 9, 2022
c774453
Bump k8s.io deps to v0.26.0
lucacome Dec 9, 2022
1e77334
Merge pull request #2088 from vincepri/promote-active-folks
k8s-ci-robot Dec 9, 2022
fb5e346
Merge pull request #2087 from lucacome/bump-k8s-deps
k8s-ci-robot Dec 9, 2022
7165850
Bump golang.org/x/time
lucacome Dec 9, 2022
a8c8ff5
Merge pull request #2089 from lucacome/bump-time
k8s-ci-robot Dec 9, 2022
fa88a73
:bug: Prevent manager from getting started a second time
alvaroaleman Dec 10, 2022
222fb66
Merge pull request #2090 from alvaroaleman/started
k8s-ci-robot Dec 11, 2022
ca7cda4
✨Builder: Do not require For
alvaroaleman Dec 11, 2022
c54fcd5
:running: Clean up OWNERS who haven't been active in the last year
alvaroaleman Dec 11, 2022
7eb8134
:sparkles: Add Get functionality to SubResourceClient
alvaroaleman Dec 11, 2022
c773bef
Merge pull request #2092 from alvaroaleman/cleanup-2
k8s-ci-robot Dec 12, 2022
da7dd5d
:warning: Allow configuring RecoverPanic for controllers globally
alvaroaleman Dec 11, 2022
a387bf4
Merge pull request #2093 from alvaroaleman/recover-panic-globally
k8s-ci-robot Dec 12, 2022
d4f1e82
Generate files and update modules
lucacome Dec 12, 2022
7333aed
:seedling: Bump github.com/onsi/ginkgo/v2 from 2.5.1 to 2.6.0
dependabot[bot] Dec 12, 2022
5673341
Merge pull request #2097 from kubernetes-sigs/dependabot/go_modules/g…
k8s-ci-robot Dec 13, 2022
ca4b4de
Merge pull request #2096 from lucacome/generate
k8s-ci-robot Dec 13, 2022
8738e91
Merge pull request #2091 from alvaroaleman/no-for
k8s-ci-robot Dec 14, 2022
69f0938
Merge pull request #2094 from alvaroaleman/subresoruce-get
k8s-ci-robot Dec 14, 2022
eead47f
:seedling: Bump github.com/onsi/gomega from 1.24.1 to 1.24.2
dependabot[bot] Dec 19, 2022
55271ca
Merge pull request #2106 from kubernetes-sigs/dependabot/go_modules/g…
k8s-ci-robot Dec 19, 2022
92234b3
🐛 controllers without For() fail to start (#2105)
tsuzu Dec 19, 2022
67c79f0
:seedling: Cleanup internal cache/informers map impl
vincepri Dec 16, 2022
384ffbc
Remove delegating map impl, and simplify InformersMap
vincepri Dec 17, 2022
0d60029
Remove reviewers which are also approvers
sbueringer Dec 21, 2022
0a38bbf
Merge pull request #2109 from sbueringer/pr-remove-reviewers-which-ar…
k8s-ci-robot Dec 21, 2022
10a0272
client/cache/client_cache.go should be called resources
vincepri Dec 21, 2022
3f48978
Merge pull request #2111 from vincepri/rename-client-cache
k8s-ci-robot Dec 21, 2022
3c4deba
Merge pull request #2103 from vincepri/cleanup-informer-map
k8s-ci-robot Dec 22, 2022
056869c
Merge pull request #1539 from bhcleek/message-human-readable
k8s-ci-robot Jan 3, 2023
b756161
:sparkles: Add controller option for setting leader election (#2117)
jonstacks Jan 5, 2023
e466b38
use correct context to cancel list and watch & wait for all informers…
inteon Jan 8, 2023
d3120b6
✨ Add additional SubResource* functions for FieldOwner (#2115)
DavidS-ovm Jan 9, 2023
45e7aa7
improve code based on feedback from review
inteon Jan 9, 2023
12e946a
:seedling: Bump github.com/onsi/ginkgo/v2 from 2.6.1 to 2.7.0
dependabot[bot] Jan 9, 2023
ba1c8a3
:seedling: Bump golang.org/x/sys from 0.3.0 to 0.4.0
dependabot[bot] Jan 9, 2023
5b88111
Merge pull request #2123 from kubernetes-sigs/dependabot/go_modules/g…
k8s-ci-robot Jan 10, 2023
9fd5774
Merge pull request #2124 from kubernetes-sigs/dependabot/go_modules/g…
k8s-ci-robot Jan 10, 2023
6776495
🌱 Bump kubebuilder-release-tools to v0.3.0
vincepri Jan 11, 2023
8499b67
Merge pull request #2126 from vincepri/tools-030
k8s-ci-robot Jan 11, 2023
5028a59
Merge pull request #2121 from inteon/informer_map_context
k8s-ci-robot Jan 16, 2023
bd096f9
Simplify cache.objectTypeForListObject
vincepri Jan 17, 2023
319c422
Merge pull request #2131 from vincepri/informer-cache-simplify
k8s-ci-robot Jan 17, 2023
0f07001
:seedling: Further cleanup internal/informers
vincepri Jan 16, 2023
e1fd8e7
Merge pull request #2130 from vincepri/cleanup-internal-informers
k8s-ci-robot Jan 17, 2023
2ce3c74
Remove pkg/patterns
vincepri Jan 17, 2023
d16fa68
Enable more linters
vincepri Jan 17, 2023
ce9f5c0
Merge pull request #2132 from vincepri/remove-pkg-patterns
k8s-ci-robot Jan 18, 2023
16f7965
Merge pull request #2133 from vincepri/add-more-linters2
k8s-ci-robot Jan 18, 2023
d6a053f
Refactor source/handler/predicate packages to remove dep injection
vincepri Jan 6, 2023
c6fbc02
Remove inject.Cache
vincepri Jan 11, 2023
ad96c14
Remove inject.APIReader
vincepri Jan 11, 2023
1c3b223
Remove inject.Config
vincepri Jan 11, 2023
36ef9e1
Remove inject.Client
vincepri Jan 11, 2023
b324b0b
Remove inject.Mapper
vincepri Jan 11, 2023
ea1fcf3
Remove SetFields from Manager and Controller
vincepri Jan 11, 2023
9241bce
Merge pull request #2120 from vincepri/rework-source-predicate-handlers
k8s-ci-robot Jan 18, 2023
c783d25
Add client.{GroupVersionKindFor, IsObjectNamespaced}
vincepri Jan 19, 2023
27270bf
Merge pull request #2136 from vincepri/enhance-client-interface
k8s-ci-robot Jan 20, 2023
dc62ed5
:sparkles: Improve builder's capabilities and general UX
vincepri Jan 19, 2023
2a505b1
Merge pull request #2135 from vincepri/add-more-niceties
k8s-ci-robot Jan 20, 2023
d4a1690
✨ Pass webhook logger to handler via context (#1972)
timebertt Jan 20, 2023
927c09e
⚠️ Remove pkg/inject
vincepri Jan 20, 2023
35b47fc
Merge pull request #2134 from vincepri/remove-webhook-config-depinject
k8s-ci-robot Jan 20, 2023
c1ada43
:seedling: Bump github.com/onsi/gomega from 1.24.2 to 1.25.0
dependabot[bot] Jan 23, 2023
2b983b4
:seedling: Bump k8s.io/klog/v2 from 2.80.1 to 2.90.0
dependabot[bot] Jan 23, 2023
cb29997
Merge pull request #2137 from kubernetes-sigs/dependabot/go_modules/g…
k8s-ci-robot Jan 23, 2023
613648e
Merge pull request #2138 from kubernetes-sigs/dependabot/go_modules/k…
k8s-ci-robot Jan 23, 2023
2464a9d
Add context to EventHandler(s)
vincepri Jan 23, 2023
66eae81
fix default value for cfg.Burst
Jan 26, 2023
9e4e844
:warning: Add constructor for conversion webhooks, rm admission.GetDe…
vincepri Jan 26, 2023
505566d
Merge pull request #2139 from vincepri/event-handler-context
k8s-ci-robot Jan 26, 2023
4a53874
Merge pull request #2144 from vincepri/fix-conversion-remove-admissio…
k8s-ci-robot Jan 26, 2023
374497a
Bump to k8s.io v0.26.1
sbueringer Jan 26, 2023
80c1894
Merge pull request #2145 from sbueringer/pr-bump-to-v0.26.1
k8s-ci-robot Jan 26, 2023
690e280
improve unstructured serialisation
inteon Jan 27, 2023
dd6bafd
Merge pull request #2142 from yanggangtony/fix-config
k8s-ci-robot Jan 27, 2023
fa6aa54
test watch gvk
inteon Jan 27, 2023
595f569
Merge pull request #2147 from inteon/watch
k8s-ci-robot Jan 27, 2023
cb5fcac
:warning: Deprecate pkg/config/v1alpha1 types
vincepri Jan 27, 2023
92b892f
Update golanci-lint script
vincepri Jan 28, 2023
f3f16a2
Merge pull request #2151 from vincepri/fix-golanci-ensure
k8s-ci-robot Jan 28, 2023
375a05e
Merge pull request #2149 from vincepri/deprecate-config-v1alpha1
k8s-ci-robot Jan 30, 2023
d2c3550
Remove DelegatedClient, move Options in client.New
vincepri Jan 27, 2023
bfb6ff5
:seedling: Bump github.com/onsi/gomega from 1.25.0 to 1.26.0
dependabot[bot] Jan 30, 2023
8945e87
Merge pull request #2156 from kubernetes-sigs/dependabot/go_modules/g…
k8s-ci-robot Jan 30, 2023
ff3dfe1
:seedling: Bump github.com/onsi/ginkgo/v2 from 2.7.0 to 2.8.0
dependabot[bot] Jan 30, 2023
69aa3cb
Merge pull request #2150 from vincepri/remove-split
k8s-ci-robot Jan 31, 2023
f5014c0
Merge pull request #2155 from kubernetes-sigs/dependabot/go_modules/g…
k8s-ci-robot Jan 31, 2023
4fd4f6e
make *http.Client configurable
inteon Jan 27, 2023
99069ac
don't share error concurrently
inteon Jan 31, 2023
81199b9
Merge pull request #2158 from inteon/test_bugfix
k8s-ci-robot Jan 31, 2023
fbaf768
Merge pull request #2122 from inteon/configurable_http_client
k8s-ci-robot Jan 31, 2023
ab55747
pkg/certwatcher: Start should retry for 10s when adding files
vincepri Jan 31, 2023
e3143ac
return an error that wraps the original error
inteon Jan 31, 2023
915b85d
Refactor cache.Options, deprecate MultiNamespacedCacheBuilder
vincepri Jan 30, 2023
a9f69ee
added myself to the reviewers list
inteon Jan 31, 2023
4d784d2
Merge pull request #2160 from vincepri/fix-certwatcher-flake
k8s-ci-robot Jan 31, 2023
e2dbb0e
Merge pull request #2157 from vincepri/refactor-cache-opts
k8s-ci-robot Jan 31, 2023
5db1738
Merge pull request #2161 from inteon/include_error
k8s-ci-robot Jan 31, 2023
fb9d089
pass HTTPClient to API Reader too
inteon Feb 1, 2023
9361b25
Merge pull request #2163 from inteon/pass_http_client_to_apireader
k8s-ci-robot Feb 1, 2023
cbe07b6
return an error in case httpClient is nil instead of panicking
inteon Feb 1, 2023
fc423fc
Merge pull request #2164 from inteon/error_instead_of_panic
k8s-ci-robot Feb 1, 2023
7e2dbaf
Cache's ByObject is now a map Object -> options
vincepri Feb 1, 2023
6adc01f
Merge pull request #2166 from vincepri/rework-cache-sanity
k8s-ci-robot Feb 2, 2023
4357393
Use runtime.Unstructured interface instead of Unstructured struct
vincepri Feb 2, 2023
4272b5a
Allow to set GracefulShutdownTimeout to -1, disabling timeouts
vincepri Feb 2, 2023
d09169b
Fix typo
mjlshen Feb 3, 2023
50edfaa
Merge pull request #2170 from mjlshen/typo
k8s-ci-robot Feb 3, 2023
304c53c
Merge pull request #2168 from vincepri/use-runtime-unstructured
k8s-ci-robot Feb 3, 2023
b9429e7
Merge pull request #2162 from inteon/add_myself_to_reviewers
k8s-ci-robot Feb 3, 2023
a3d87b5
return error instead of panic
inteon Feb 3, 2023
5c0aa32
Merge pull request #2178 from inteon/error_instead_of_panic
k8s-ci-robot Feb 3, 2023
636b1eb
Provide a truly lazy restmapper
Fedosin Jan 3, 2023
d2fc349
Use DynamicRESTMapperOption to enable Lazy Restmapper
Fedosin Feb 6, 2023
f127c11
Merge pull request #2116 from Fedosin/lazy_loading
k8s-ci-robot Feb 6, 2023
ed9c5ef
Expose Cache/Client options on Cluster
vincepri Feb 3, 2023
65f861d
code clean for evntest.server
Feb 6, 2023
f9d8abc
Merge pull request #2177 from vincepri/rework-cluster-options
k8s-ci-robot Feb 7, 2023
2271827
Merge pull request #2180 from yanggangtony/clean-envtest-server
k8s-ci-robot Feb 8, 2023
850a431
verify.sh: verify generate & modules (in CI)
sbueringer Feb 12, 2023
7f163d6
Bump controller-tools and apidiff
sbueringer Feb 12, 2023
18270cf
Bump golangci-lint to v1.51.1
sbueringer Feb 12, 2023
5239d32
Merge pull request #2188 from sbueringer/pr-bump-golangci-lint
k8s-ci-robot Feb 12, 2023
3de05c0
Merge pull request #2186 from sbueringer/pr-verify-gen-modules
k8s-ci-robot Feb 12, 2023
9f4e5ed
Merge pull request #2187 from sbueringer/pr-bump-ct-apidiff
k8s-ci-robot Feb 12, 2023
c0a72ba
:seedling: Re-add tests for component config
vincepri Feb 13, 2023
c98b7fd
Merge pull request #2191 from vincepri/component-config-readd
k8s-ci-robot Feb 13, 2023
3598292
:seedling: Bump github.com/onsi/ginkgo/v2 from 2.8.0 to 2.8.1
dependabot[bot] Feb 13, 2023
08dce9f
Merge pull request #2194 from kubernetes-sigs/dependabot/go_modules/g…
k8s-ci-robot Feb 14, 2023
862d2aa
:seedling: Bump go.uber.org/goleak from 1.2.0 to 1.2.1
dependabot[bot] Feb 14, 2023
2183c1e
Merge pull request #2195 from kubernetes-sigs/dependabot/go_modules/g…
k8s-ci-robot Feb 14, 2023
ea10051
GVKForObject should handle multiple GVKs in Scheme gracefully
vincepri Feb 13, 2023
2ebab48
Merge pull request #2169 from vincepri/graceful-shutdown-1
k8s-ci-robot Feb 14, 2023
bea4448
Fix a typo in a godoc comment
lhaendler Feb 16, 2023
c98506d
Merge pull request #2201 from lhaendler/patch-1
k8s-ci-robot Feb 16, 2023
25d6edd
Merge pull request #2192 from vincepri/gvk-for-object-multiple-hits
k8s-ci-robot Feb 16, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
36 changes: 36 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:

# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
# Workflow files stored in the
# default location of `.github/workflows`
directory: "/"
schedule:
interval: "weekly"
commit-message:
prefix: ":seedling:"
labels:
- "ok-to-test"

# Maintain dependencies for go
- package-ecosystem: "gomod"
directory: "/"
schedule:
interval: "weekly"
commit-message:
prefix: ":seedling:"
# Ignore K8 packages as these are done manually
ignore:
- dependency-name: "k8s.io/api"
- dependency-name: "k8s.io/apiextensions-apiserver"
- dependency-name: "k8s.io/apimachinery"
- dependency-name: "k8s.io/client-go"
- dependency-name: "k8s.io/component-base"
labels:
- "ok-to-test"
2 changes: 1 addition & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- please add an icon to the title of this PR (see VERSIONING.md), and delete this line and similar ones -->
<!-- the icon will be either ⚠ (:warning:, major), ✨ (:sparkles, minor), 🐛 (:bug:, patch), 📖 (:book:, docs), or 🌱 (:seedling:, other) -->
<!-- the icon will be either ⚠ (:warning:, major), ✨ (:sparkles:, minor), 🐛 (:bug:, patch), 📖 (:book:, docs), or 🌱 (:seedling:, other) -->

<!-- What does this do, and why do we need it? -->
6 changes: 3 additions & 3 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ jobs:
- ""
- tools/setup-envtest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: golangci-lint
uses: golangci/golangci-lint-action@v2
uses: golangci/golangci-lint-action@v3
with:
version: v1.40.1
version: v1.51.1
working-directory: ${{matrix.working-directory}}
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.1
uses: kubernetes-sigs/kubebuilder-release-tools@v0.3.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,6 @@

# Tools binaries.
hack/tools/bin

junit-report.xml
/artifacts
200 changes: 109 additions & 91 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,46 +1,46 @@
linters:
disable-all: true
enable:
- asciicheck
- bodyclose
- deadcode
- depguard
- dogsled
- errcheck
- exportloopref
- goconst
- gocritic
- gocyclo
- godot
- gofmt
- goimports
- goprintffuncname
- gosec
- gosimple
- govet
- ifshort
- importas
- ineffassign
- misspell
- nakedret
- nilerr
- nolintlint
- prealloc
- revive
- rowserrcheck
- staticcheck
- structcheck
- stylecheck
- typecheck
- unconvert
- unparam
- varcheck
- whitespace
- asasalint
- asciicheck
- bidichk
- bodyclose
- depguard
- dogsled
- dupl
- errcheck
- errchkjson
- errorlint
- exhaustive
- exportloopref
- goconst
- gocritic
- gocyclo
- gofmt
- goimports
- goprintffuncname
- gosec
- gosimple
- govet
- importas
- ineffassign
- makezero
- misspell
- nakedret
- nilerr
- nolintlint
- prealloc
- revive
- staticcheck
- stylecheck
- tagliatelle
- typecheck
- unconvert
- unparam
- unused
- whitespace

linters-settings:
ifshort:
# Maximum length of variable declaration measured in number of characters, after which linter won't suggest using short syntax.
max-decl-chars: 50
importas:
no-unaliased: true
alias:
Expand All @@ -59,9 +59,13 @@ linters-settings:
- pkg: sigs.k8s.io/controller-runtime
alias: ctrl
staticcheck:
go: "1.16"
go: "1.19"
stylecheck:
go: "1.16"
go: "1.19"
depguard:
include-go-root: true
packages:
- io/ioutil # https://go.dev/doc/go1.16#ioutil

issues:
max-same-issues: 0
Expand All @@ -71,60 +75,74 @@ issues:
exclude-use-default: false
# List of regexps of issue texts to exclude, empty list by default.
exclude:
# The following are being worked on to remove their exclusion. This list should be reduced or go away all together over time.
# If it is decided they will not be addressed they should be moved above this comment.
- Subprocess launch(ed with variable|ing should be audited)
- (G204|G104|G307)
- "ST1000: at least one file in a package should have a package comment"
# The following are being worked on to remove their exclusion. This list should be reduced or go away all together over time.
# If it is decided they will not be addressed they should be moved above this comment.
- Subprocess launch(ed with variable|ing should be audited)
- (G204|G104|G307)
- "ST1000: at least one file in a package should have a package comment"
exclude-rules:
- linters:
- gosec
text: "G108: Profiling endpoint is automatically exposed on /debug/pprof"
- linters:
- revive
text: "exported: exported method .*\\.(Reconcile|SetupWithManager|SetupWebhookWithManager) should have comment or be unexported"
- linters:
- errcheck
text: Error return value of .((os\.)?std(out|err)\..*|.*Close|.*Flush|os\.Remove(All)?|.*print(f|ln)?|os\.(Un)?Setenv). is not checked
# With Go 1.16, the new embed directive can be used with an un-named import,
# revive (previously, golint) only allows these to be imported in a main.go, which wouldn't work for us.
# This directive allows the embed package to be imported with an underscore everywhere.
- linters:
- revive
source: _ "embed"
# Exclude some packages or code to require comments, for example test code, or fake clients.
- linters:
- revive
text: exported (method|function|type|const) (.+) should have comment or be unexported
source: (func|type).*Fake.*
- linters:
- revive
text: exported (method|function|type|const) (.+) should have comment or be unexported
path: fake_\.go
# Disable unparam "always receives" which might not be really
# useful when building libraries.
- linters:
- unparam
text: always receives
# Dot imports for gomega or ginkgo are allowed
# within test files.
- path: _test\.go
text: should not use dot imports
- path: _test\.go
text: cyclomatic complexity
- path: _test\.go
text: "G107: Potential HTTP request made with variable url"
# Append should be able to assign to a different var/slice.
- linters:
- gocritic
text: "appendAssign: append result not assigned to the same slice"
- linters:
- gocritic
text: "singleCaseSwitch: should rewrite switch statement to if statement"
- linters:
- gosec
text: "G108: Profiling endpoint is automatically exposed on /debug/pprof"
- linters:
- revive
text: "exported: exported method .*\\.(Reconcile|SetupWithManager|SetupWebhookWithManager) should have comment or be unexported"
- linters:
- errcheck
text: Error return value of .((os\.)?std(out|err)\..*|.*Close|.*Flush|os\.Remove(All)?|.*print(f|ln)?|os\.(Un)?Setenv). is not checked
- linters:
- staticcheck
text: "SA1019: .* The component config package has been deprecated and will be removed in a future release."
# With Go 1.16, the new embed directive can be used with an un-named import,
# revive (previously, golint) only allows these to be imported in a main.go, which wouldn't work for us.
# This directive allows the embed package to be imported with an underscore everywhere.
- linters:
- revive
source: _ "embed"
# Exclude some packages or code to require comments, for example test code, or fake clients.
- linters:
- revive
text: exported (method|function|type|const) (.+) should have comment or be unexported
source: (func|type).*Fake.*
- linters:
- revive
text: exported (method|function|type|const) (.+) should have comment or be unexported
path: fake_\.go
# Disable unparam "always receives" which might not be really
# useful when building libraries.
- linters:
- unparam
text: always receives
# Dot imports for gomega and ginkgo are allowed
# within test files.
- path: _test\.go
text: should not use dot imports
- path: _test\.go
text: cyclomatic complexity
- path: _test\.go
text: "G107: Potential HTTP request made with variable url"
# Append should be able to assign to a different var/slice.
- linters:
- gocritic
text: "appendAssign: append result not assigned to the same slice"
- linters:
- gocritic
text: "singleCaseSwitch: should rewrite switch statement to if statement"
# It considers all file access to a filename that comes from a variable problematic,
# which is naiv at best.
- linters:
- gosec
text: "G304: Potential file inclusion via variable"
- linters:
- revive
text: "package-comments: should have a package comment"
- linters:
- dupl
path: _test\.go

run:
timeout: 10m
skip-files:
- "zz_generated.*\\.go$"
- ".*conversion.*\\.go$"
- "zz_generated.*\\.go$"
- ".*conversion.*\\.go$"
allow-parallel-runners: true
14 changes: 7 additions & 7 deletions FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@ on your situation.
take this approach: the StatefulSet controller appends a specific number
to each pod that it creates, while the Deployment controller hashes the
pod template spec and appends that.

- In the few cases when you cannot take advantage of deterministic names
(e.g. when using generateName), it may be useful in to track which
actions you took, and assume that they need to be repeated if they don't
occur after a given time (e.g. using a requeue result). This is what
the ReplicaSet controller does.

In general, write your controller with the assumption that information
will eventually be correct, but may be slightly out of date. Make sure
that your reconcile function enforces the entire state of the world each
Expand All @@ -48,17 +48,17 @@ generally cover most circumstances.
### Q: Where's the fake client? How do I use it?

**A**: The fake client
[exists](https://godoc.org/sigs.k8s.io/controller-runtime/pkg/client/fake),
[exists](https://pkg.go.dev/sigs.k8s.io/controller-runtime/pkg/client/fake),
but we generally recommend using
[envtest.Environment](https://godoc.org/sigs.k8s.io/controller-runtime/pkg/envtest#Environment)
[envtest.Environment](https://pkg.go.dev/sigs.k8s.io/controller-runtime/pkg/envtest#Environment)
to test against a real API server. In our experience, tests using fake
clients gradually re-implement poorly-written impressions of a real API
server, which leads to hard-to-maintain, complex test code.

### Q: How should I write tests? Any suggestions for getting started?
### Q: How should I write tests? Any suggestions for getting started?

- Use the aforementioned
[envtest.Environment](https://godoc.org/sigs.k8s.io/controller-runtime/pkg/envtest#Environment)
[envtest.Environment](https://pkg.go.dev/sigs.k8s.io/controller-runtime/pkg/envtest#Environment)
to spin up a real API server instead of trying to mock one out.

- Structure your tests to check that the state of the world is as you
Expand All @@ -77,5 +77,5 @@ mapping between Go types and group-version-kinds in Kubernetes. In
general, your application should have its own Scheme containing the types
from the API groups that it needs (be they Kubernetes types or your own).
See the [scheme builder
docs](https://godoc.org/sigs.k8s.io/controller-runtime/pkg/scheme) for
docs](https://pkg.go.dev/sigs.k8s.io/controller-runtime/pkg/scheme) for
more information.
14 changes: 12 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ TOOLS_BIN_DIR := $(TOOLS_DIR)/bin
GOLANGCI_LINT := $(abspath $(TOOLS_BIN_DIR)/golangci-lint)
GO_APIDIFF := $(TOOLS_BIN_DIR)/go-apidiff
CONTROLLER_GEN := $(TOOLS_BIN_DIR)/controller-gen
ENVTEST_DIR := $(abspath tools/setup-envtest)

# The help will print out all targets with their descriptions organized bellow their categories. The categories are represented by `##@` and the target descriptions by `##`.
# The awk commands is responsible to read the entire set of makefiles included in this invocation, looking for lines of the file as xyz: ## something, and then pretty-format the target and help. Then, if there's a line with ##@ something, that gets pretty-printed as a category.
Expand Down Expand Up @@ -97,6 +98,7 @@ lint-fix: $(GOLANGCI_LINT) ## Lint the codebase and run auto-fixers if supported
modules: ## Runs go mod to ensure modules are up to date.
go mod tidy
cd $(TOOLS_DIR); go mod tidy
cd $(ENVTEST_DIR); go mod tidy

.PHONY: generate
generate: $(CONTROLLER_GEN) ## Runs controller-gen for internal types for config file
Expand All @@ -115,7 +117,15 @@ clean-bin: ## Remove all generated binaries.
rm -rf hack/tools/bin

.PHONY: verify-modules
verify-modules: modules
@if !(git diff --quiet HEAD -- go.sum go.mod); then \
verify-modules: modules ## Verify go modules are up to date
@if !(git diff --quiet HEAD -- go.sum go.mod $(TOOLS_DIR)/go.mod $(TOOLS_DIR)/go.sum $(ENVTEST_DIR)/go.mod $(ENVTEST_DIR)/go.sum); then \
git diff; \
echo "go module files are out of date, please run 'make modules'"; exit 1; \
fi

.PHONY: verify-generate
verify-generate: generate ## Verify generated files are up to date
@if !(git diff --quiet HEAD); then \
git diff; \
echo "generated files are out of date, run make generate"; exit 1; \
fi
Loading