-
Notifications
You must be signed in to change notification settings - Fork 25
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
Drop deprecated module and fix tests #3114
Conversation
WalkthroughThe overarching change across multiple files involves updating the import path and function calls from an older package Changes
TipsChat with CodeRabbit Bot (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files selected for processing (27)
- cmd/aperturectl/cmd/tui/radio-button.go (2 hunks)
- operator/controllers/agent/config_test.tpl (1 hunks)
- operator/controllers/agent/configmaps_test.go (2 hunks)
- operator/controllers/agent/daemonset.go (2 hunks)
- operator/controllers/agent/daemonset_test.go (9 hunks)
- operator/controllers/agent/deployment.go (3 hunks)
- operator/controllers/agent/deployment_test.go (9 hunks)
- operator/controllers/agent/mutating_webhook_configuration.go (3 hunks)
- operator/controllers/agent/mutating_webhook_configuration_test.go (3 hunks)
- operator/controllers/agent/secrets_test.go (3 hunks)
- operator/controllers/agent/serviceaccount_test.go (3 hunks)
- operator/controllers/agent/services_test.go (3 hunks)
- operator/controllers/controller/configmaps_test.go (2 hunks)
- operator/controllers/controller/deployment.go (2 hunks)
- operator/controllers/controller/deployment_test.go (10 hunks)
- operator/controllers/controller/secrets_test.go (3 hunks)
- operator/controllers/controller/serviceaccount_test.go (3 hunks)
- operator/controllers/controller/services_test.go (3 hunks)
- operator/controllers/controller/validating_webhook_configuration.go (3 hunks)
- operator/controllers/controller/validating_webhook_configuration_test.go (6 hunks)
- operator/controllers/mutate_func_test.go (4 hunks)
- operator/controllers/mutatingwebhook/agent_pod_test.go (6 hunks)
- operator/controllers/mutatingwebhook/mutating_webhook_configuration.go (5 hunks)
- operator/controllers/mutatingwebhook/mutating_webhook_configuration_test.go (5 hunks)
- operator/controllers/mutatingwebhook/reconciler_test.go (3 hunks)
- operator/controllers/utils.go (9 hunks)
- operator/controllers/utils_test.go (11 hunks)
Files skipped from review due to trivial changes (9)
- operator/controllers/agent/config_test.tpl
- operator/controllers/agent/mutating_webhook_configuration.go
- operator/controllers/agent/mutating_webhook_configuration_test.go
- operator/controllers/controller/configmaps_test.go
- operator/controllers/controller/validating_webhook_configuration.go
- operator/controllers/mutatingwebhook/agent_pod_test.go
- operator/controllers/mutatingwebhook/mutating_webhook_configuration.go
- operator/controllers/mutatingwebhook/mutating_webhook_configuration_test.go
- operator/controllers/mutatingwebhook/reconciler_test.go
Additional comments: 90
cmd/aperturectl/cmd/tui/radio-button.go (2)
7-7: The update of the import path from "k8s.io/utils/pointer" to "k8s.io/utils/ptr" is correct and aligns with the PR objectives.
23-23: The change from
pointer.Int(0)
toptr.To(0)
in theInitialRadioButtonModel
function is correct and aligns with the PR objectives.operator/controllers/agent/secrets_test.go (3)
28-28: The update of the import path from "k8s.io/utils/pointer" to "k8s.io/utils/ptr" is correct and aligns with the PR objectives.
69-70: The changes from
pointer.Bool(true)
toptr.To(true)
for theController
andBlockOwnerDeletion
fields in the test case are correct and align with the PR objectives.125-126: The changes from
pointer.Bool(true)
toptr.To(true)
for theController
andBlockOwnerDeletion
fields in the test case are correct and align with the PR objectives.operator/controllers/agent/serviceaccount_test.go (5)
26-26: The update of the import path from "k8s.io/utils/pointer" to "k8s.io/utils/ptr" is correct and aligns with the PR objectives.
66-67: The changes from
pointer.Bool(true)
toptr.To(true)
for theController
andBlockOwnerDeletion
fields in the test case are correct and align with the PR objectives.71-71: The change from
pointer.Bool(true)
toptr.To(true)
for theAutomountServiceAccountToken
field in the test case is correct and aligns with the PR objectives.121-122: The changes from
pointer.Bool(true)
toptr.To(true)
for theController
andBlockOwnerDeletion
fields in the test case are correct and align with the PR objectives.126-126: The change from
pointer.Bool(false)
toptr.To(false)
for theAutomountServiceAccountToken
field in the test case is correct and aligns with the PR objectives.operator/controllers/controller/serviceaccount_test.go (5)
26-26: The update of the import path from "k8s.io/utils/pointer" to "k8s.io/utils/ptr" is correct and aligns with the PR objectives.
65-66: The changes from
pointer.Bool(true)
toptr.To(true)
for theController
andBlockOwnerDeletion
fields in the test case are correct and align with the PR objectives.70-70: The change from
pointer.Bool(true)
toptr.To(true)
for theAutomountServiceAccountToken
field in the test case is correct and aligns with the PR objectives.120-121: The changes from
pointer.Bool(true)
toptr.To(true)
for theController
andBlockOwnerDeletion
fields in the test case are correct and align with the PR objectives.125-125: The change from
pointer.Bool(true)
toptr.To(false)
for theAutomountServiceAccountToken
field in the test case is correct and aligns with the PR objectives.operator/controllers/agent/configmaps_test.go (2)
32-32: The update of the import path from "k8s.io/utils/pointer" to "k8s.io/utils/ptr" is correct and aligns with the PR objectives.
146-147: The changes from
pointer.Bool(true)
toptr.To(true)
for theController
andBlockOwnerDeletion
fields in the test case are correct and align with the PR objectives.operator/controllers/controller/services_test.go (3)
29-29: The update of the import path from "k8s.io/utils/pointer" to "k8s.io/utils/ptr" is correct and aligns with the PR objectives.
74-75: The changes from
pointer.Bool(true)
toptr.To(true)
for theController
andBlockOwnerDeletion
fields in the test case are correct and align with the PR objectives.152-153: The changes from
pointer.Bool(true)
toptr.To(true)
for theController
andBlockOwnerDeletion
fields in the test case are correct and align with the PR objectives.operator/controllers/controller/secrets_test.go (3)
29-29: The import statement has been correctly updated from
k8s.io/utils/pointer
tok8s.io/utils/ptr
. This change aligns with the PR objectives to replace the deprecated module.70-71: The usage of
ptr.To(true)
for theController
andBlockOwnerDeletion
fields in theOwnerReferences
is correct and follows the newptr
package API.126-127: The usage of
ptr.To(true)
for theController
andBlockOwnerDeletion
fields in theOwnerReferences
is correct and follows the newptr
package API.operator/controllers/mutate_func_test.go (4)
28-28: The import statement has been correctly updated from
k8s.io/utils/pointer
tok8s.io/utils/ptr
. This change aligns with the PR objectives to replace the deprecated module.107-107: The usage of
ptr.To[int32](10)
for theTimeoutSeconds
field in theMutatingWebhookConfiguration
is correct and follows the newptr
package API.147-147: The usage of
ptr.To(true)
for theAutomountServiceAccountToken
field in theServiceAccount
is correct and follows the newptr
package API.204-204: The usage of
ptr.To[int32](10)
for theTimeoutSeconds
field in theValidatingWebhookConfiguration
is correct and follows the newptr
package API.operator/controllers/agent/services_test.go (3)
27-27: The import statement has been correctly updated from
k8s.io/utils/pointer
tok8s.io/utils/ptr
. This change aligns with the PR objectives to replace the deprecated module.79-80: The usage of
ptr.To(true)
for theController
andBlockOwnerDeletion
fields in theOwnerReferences
is correct and follows the newptr
package API.174-175: The usage of
ptr.To(true)
for theController
andBlockOwnerDeletion
fields in theOwnerReferences
is correct and follows the newptr
package API.operator/controllers/agent/daemonset.go (2)
31-31: The import statement has been correctly updated from
k8s.io/utils/pointer
tok8s.io/utils/ptr
. This change aligns with the PR objectives to replace the deprecated module.95-95: The usage of
ptr.To[int64](spec.TerminationGracePeriodSeconds)
for theTerminationGracePeriodSeconds
field in thePodSpec
is correct and follows the newptr
package API.operator/controllers/controller/deployment.go (2)
31-31: The import statement has been correctly updated to use the new
ptr
package.95-95: The usage of
ptr.To[int64]
correctly follows the newptr
package's API for creating a pointer to anint64
value.operator/controllers/agent/deployment.go (3)
31-31: The import statement has been correctly updated to use the new
ptr
package.79-79: The usage of
ptr.To[int32]
correctly follows the newptr
package's API for creating a pointer to anint32
value.98-98: The usage of
ptr.To[int64]
correctly follows the newptr
package's API for creating a pointer to anint64
value.operator/controllers/controller/validating_webhook_configuration_test.go (6)
27-27: The import statement has been correctly updated to use the new
ptr
package.80-81: The usage of
ptr.To
for thePath
field andptr.To[int32]
for thePort
field correctly follows the newptr
package's API.104-104: The usage of
ptr.To[int32]
for theTimeoutSeconds
field correctly follows the newptr
package's API.166-167: The usage of
ptr.To
for thePath
field andptr.To[int32]
for thePort
field correctly follows the newptr
package's API.190-190: The usage of
ptr.To[int32]
for theTimeoutSeconds
field correctly follows the newptr
package's API.224-224: The usage of
ptr.To[int32]
for theTimeoutSeconds
field correctly follows the newptr
package's API.operator/controllers/agent/daemonset_test.go (7)
29-29: The import statement has been correctly updated to use the new
ptr
package.151-152: The usage of
ptr.To(true)
for theController
andBlockOwnerDeletion
fields is correct and follows the newptr
package API.177-177: The usage of
ptr.To[int64](0)
for theTerminationGracePeriodSeconds
field is correct and follows the newptr
package API.268-268: The usage of
ptr.To[int32](420)
for theDefaultMode
field is correct and follows the newptr
package API.449-449: The usage of
ptr.To[int64](1001)
for theFSGroup
field is correct and follows the newptr
package API.463-466: The usage of
ptr.To
for theRunAsUser
,RunAsGroup
,RunAsNonRoot
, andReadOnlyRootFilesystem
fields is correct and follows the newptr
package API.649-649: The usage of
ptr.To[int64](1001)
for theFSGroup
field within theMutate
function is correct and follows the newptr
package API.operator/controllers/agent/deployment_test.go (10)
29-29: The import statement has been correctly updated to use the new
ptr
package.155-156: The replacement of
pointer.Bool(true)
withptr.To(true)
is correct and follows the newptr
package API for creating boolean pointers.162-162: The replacement of
pointer.Int32(1)
withptr.To[int32](1)
is correct and follows the newptr
package API for creating integer pointers.184-184: The replacement of
pointer.Int64(0)
withptr.To[int64](0)
is correct and follows the newptr
package API for creating integer pointers.271-271: The replacement of
pointer.Int32(420)
withptr.To[int32](420)
is correct and follows the newptr
package API for creating integer pointers.460-460: The replacement of
pointer.Int64(1001)
withptr.To[int64](1001)
is correct and follows the newptr
package API for creating integer pointers.462-462: The replacement of
pointer.Int64(10)
withptr.To[int64](10)
is correct and follows the newptr
package API for creating integer pointers.474-477: The replacement of
pointer
functions withptr.To
for theSecurityContext
fields is correct and follows the newptr
package API for creating pointers of various types.616-616: The replacement of
pointer.Int32(420)
withptr.To[int32](420)
is consistent with the previous hunk and is correct.661-661: The replacement of
pointer.Int64(1001)
withptr.To[int64](1001)
is consistent with the previous hunk and is correct.operator/controllers/controller/deployment_test.go (11)
31-31: The import statement has been correctly updated to use the new
ptr
package instead of the deprecatedpointer
package.154-155: The use of
ptr.To(true)
is correct and follows the newptr
package API for creating pointers to literals.263-263: The update from
pointer.Int32(420)
toptr.To[int32](420)
is correct and follows the newptr
package API for creating pointers to integer literals.274-274: The update from
pointer.Int32(420)
toptr.To[int32](420)
is correct and follows the newptr
package API for creating pointers to integer literals.416-417: The use of
ptr.To(true)
is consistent with the changes in Hunk 2 and is correct according to the newptr
package API.455-455: The update from
pointer.Int64(1001)
toptr.To[int64](1001)
is correct and follows the newptr
package API for creating pointers to integer literals.457-457: The update from
pointer.Int64(10)
toptr.To[int64](10)
is correct and follows the newptr
package API for creating pointers to integer literals.469-472: The updates to
RunAsUser
,RunAsGroup
,RunAsNonRoot
, andReadOnlyRootFilesystem
fields are correct and follow the newptr
package API for creating pointers to the respective types.601-601: The update from
pointer.Int32(420)
toptr.To[int32](420)
is correct and follows the newptr
package API for creating pointers to integer literals.612-612: The update from
pointer.Int32(420)
toptr.To[int32](420)
is correct and follows the newptr
package API for creating pointers to integer literals.653-653: The update from
pointer.Int64(1001)
toptr.To[int64](1001)
is correct and follows the newptr
package API for creating pointers to integer literals.operator/controllers/utils.go (8)
45-45: The import statement has been correctly updated to use the new
ptr
package.60-63: The pointer conversion functions have been correctly updated to use the new
ptr
package syntax.77-77: The pointer conversion for
FSGroup
has been correctly updated to use the newptr
package syntax.257-257: The pointer conversion for the
Optional
field incorev1.EnvVar
has been correctly updated to use the newptr
package syntax.294-294: The pointer conversion for
DefaultMode
incorev1.ConfigMapVolumeSource
has been correctly updated to use the newptr
package syntax.349-349: The pointer conversion for the
Optional
field incorev1.EnvVar
has been correctly updated to use the newptr
package syntax.382-382: The pointer conversion for
DefaultMode
incorev1.ConfigMapVolumeSource
has been correctly updated to use the newptr
package syntax.393-393: The pointer conversion for
DefaultMode
incorev1.SecretVolumeSource
has been correctly updated to use the newptr
package syntax.operator/controllers/utils_test.go (11)
30-30: The import path for the pointer utility has been updated to use the new
ptr
package.80-83: The usage of
ptr.To
from thek8s.io/utils/ptr
package is correct and replaces the deprecatedpointer
package functions.132-132: The usage of
ptr.To
forFSGroup
incorev1.PodSecurityContext
is correct and follows the same pattern as the previous hunk.644-644: The
Optional
field incorev1.SecretKeySelector
is correctly set usingptr.To
. This ensures that theOptional
field is explicitly set, which is a good practice for clarity.784-784: The
DefaultMode
forcorev1.ConfigMapVolumeSource
is correctly set usingptr.To
. This change is consistent with the newptr
package usage.830-830: The
DefaultMode
for anothercorev1.ConfigMapVolumeSource
is set usingptr.To
, which is consistent with the changes made throughout the file.890-890: The
Optional
field incorev1.SecretKeySelector
is set usingptr.To
, similar to the change in Hunk 4, which is correct.1031-1031: The
DefaultMode
forcorev1.ConfigMapVolumeSource
is set usingptr.To
, which is consistent with the changes made in theAgentVolumes
function.1042-1042: The
DefaultMode
forcorev1.SecretVolumeSource
is set usingptr.To
, which is consistent with the changes made in theAgentVolumes
function for config maps.1086-1086: The
DefaultMode
for anothercorev1.ConfigMapVolumeSource
is set usingptr.To
, which is consistent with the changes made throughout the file.1097-1097: The
DefaultMode
for anothercorev1.SecretVolumeSource
is set usingptr.To
, which is consistent with the changes made throughout the file.
Summary by CodeRabbit
New Features
retry_policy
configuration for improved object storage reliability with customizable timeout and backoff settings.Refactor
Bug Fixes