Skip to content

fix(kruise): point CRD conversion webhooks at the chart webhook service - #230

Open
lbarrosby wants to merge 1 commit into
openkruise:masterfrom
lbarrosby:fix/kruise-crd-conversion-service
Open

lbarrosby wants to merge 1 commit into
openkruise:masterfrom
lbarrosby:fix/kruise-crd-conversion-service

Conversation

@lbarrosby

Copy link
Copy Markdown

Fixes #192

The daemonsets and sidecarsets CRDs in versions/kruise/next still had the controller-gen placeholders in spec.conversion.webhook.clientConfig.service (webhook-service / system), and statefulsets hardcoded kruise-system. kruise-manager patches the live CRDs at startup so conversion itself works, but with a self-healing GitOps setup the tool keeps putting the placeholders back and the two CRDs stay OutOfSync.

All three now render kruise-webhook-service in {{ .Values.installation.namespace }}, the same values the webhook configurations and the Service in manager.yaml use. Only next is touched, per the contributing guide.

Checked with helm lint and helm template (default values and --set installation.namespace=openkruise): every clientConfig.service in the output now points at kruise-webhook-service in the installation namespace, where before the two CRDs rendered webhook-service/system.

Note on DCO:

If the DCO action in the integration test fails, one or more of your commits are not signed off. Please click on the Details link next to the DCO action for instructions on how to resolve this.

Checklist:

  • I have bumped the chart version according to versioning
  • I have updated the chart changelog with all the changes that come with this pull request according to changelog.
  • Any new values are backwards compatible and/or have sensible default.
  • I have signed off all my commits as required by DCO.

Changes are automatically published when merged to master. They are not published on branches.

The daemonsets and sidecarsets CRDs in the next chart still carried the
controller-gen placeholders (webhook-service/system) in their conversion
webhook clientConfig, and statefulsets hardcoded kruise-system.

kruise-manager rewrites the live CRDs at startup, so conversion works, but
GitOps tools that self-heal keep restoring the placeholders and the
CRDs never settle. Render kruise-webhook-service in
.Values.installation.namespace for all three, matching the webhook
configurations.

Fixes openkruise#192

Signed-off-by: Lucas Barros <lucasbarros.kam@gmail.com>
@kruise-bot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign chrisliu1995 for approval by writing /assign @chrisliu1995 in a comment. For more information see:The Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kruise-bot

Copy link
Copy Markdown

Welcome @lbarrosby! It looks like this is your first PR to openkruise/charts 🎉

@lbarrosby

Copy link
Copy Markdown
Author

Friendly ping. If this isn't something you want in the project, feel free to say so and I'll close it.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

kruise 1.9.x: conversion webhook clientConfig of daemonsets/sidecarsets CRDs still uses placeholders (webhook-service/system)

2 participants