-
Notifications
You must be signed in to change notification settings - Fork 1.8k
⚠️ Upgrade kubebuilder scaffold from v4.2.0 to v4.5.2 #6928
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
base: master
Are you sure you want to change the base?
⚠️ Upgrade kubebuilder scaffold from v4.2.0 to v4.5.2 #6928
Conversation
@@ -134,7 +134,6 @@ func (mh *Memcached) Run() { | |||
"--group", mh.ctx.Group, | |||
"--version", mh.ctx.Version, | |||
"--kind", mh.ctx.Kind, | |||
"--defaulting", | |||
"--defaulting") |
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.
@acornett21, it was duplicated. If we want it in the sample, default + validating, then we need to add it here.
But would not be call twice defaulting
I keep only defaulting here. We can add the validating as well in a follow up if we need to
err := kbutil.ReplaceInFile(webhookPath, | ||
"// TODO(user): fill in your defaulting logic.", | ||
"if memcached.Spec.Size == 0 {\n\t\tmemcached.Spec.Size = 3\n\t}") | ||
pkg.CheckError("injecting defaulting logic", err) |
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.
@acornett21 just added the code to implement the defaulting logic, but in the right place, ancleaned up all the other staff.
return errors.New("Cluster size must be an odd number") | ||
} | ||
return nil | ||
} |
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.
@acornett21 if we want the validating webhook here then we need to add the option to scaffold this type and then just replace TODO:(user) implement your logic for the logic that we want instead.
# delimiter: '.' | ||
# index: 1 | ||
# create: true | ||
# - source: # Uncomment the following block to enable certificates for metrics |
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.
@acornett21 the changes here mainly happened due bug fixes and enhancements.
New feature
-
Added configurations for securing Metrics Server and Prometheus integration using TLS and certificates managed by CertManager, enabling users to align their solutions with best practices, enhance security, and achieve production readiness
-
Added webhook CertWatcher and flags for custom certificate configuration ✨ feat: add webhook CertWatcher and flags for custom certificate configuration kubernetes-sigs/kubebuilder#4429)
Bug Fixes
-
Fixed CA injection for conversion webhooks. Previously, the CA injection patch was not accurate; The injection should occur only for CRDs, which are conversion types and not for all CRDs when a webhook with --conversion option is scaffolded. The issue goes back to release 3.5.0 (where to replace vars for replacements was done and the kustomize/v2-alpha plugin was introduced). It was not previously found, likely because conversion webhook features were incomplete, which is addressed in this release. Now, users can use the tool to generate the conversion webhooks properly
-
Corrected the generation of manifests under config/crd/patches to ensure the /convert service patch is only created for webhooks configured with --conversion.
@@ -48,11 +48,9 @@ endif | |||
|
|||
# Set the Operator SDK version to use. By default, what is installed on the system is used. | |||
# This is useful for CI or a project to utilize a specific version of the operator-sdk toolkit. | |||
OPERATOR_SDK_VERSION ?= v1.39.1 | |||
OPERATOR_SDK_VERSION ?= v1.39.2 |
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.
@acornett21 I do not know why it changed for 2
But was done automatically.
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.
I raised a PR for this, you can rebase and get this change. It seems patch releases need post release steps, this is coming from that.
00dea8a
to
feb87d4
Compare
feb87d4
to
b359248
Compare
b359248
to
49418a2
Compare
4c20f94
to
981abeb
Compare
981abeb
to
211c424
Compare
@$(KIND) get clusters | grep -q 'kind' || { \ | ||
echo "No Kind cluster is running. Please start a Kind cluster before running the e2e tests."; \ | ||
exit 1; \ | ||
} |
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.
@acornett21 just for you be aware of.
It should not be added to the scaffold.
We changed already on master, so it is fixed. I am cleaning up.
211c424
to
97bd91e
Compare
Signed-off-by: Camila Macedo <7708031+camilamacedo86@users.noreply.github.com>
97bd91e
to
3f35383
Compare
WIP to help towards: #6927