chore: Get validating webhook failurePolicy for Secretstore dynamically#5605
Conversation
583b741 to
e2f9571
Compare
|
hi @LochanRn . #956 was not caused by this issue. It was a problem on the port related to If you want to ignore the webhook because you expect it to fail everytime, I'd suggest you to instead just disable it. You'll earn a lot when it comes to APIServer responses due to avoiding the whole timeout checks. |
|
(Though, I could see this contribution by itself could be useful for tricky upgrades within the user base). |
Signed-off-by: LochanRn <rn.lochan@gmail.com>
e2f9571 to
621cd38
Compare
|
makes sense, but i think this PR might still helpfull. |
|
Can you please fix the sonar issue for formatting. Then please add a test for this under the helm tests to see that nothing is being messed up. Thanks. |
WalkthroughAdds a Changes
🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
deploy/charts/external-secrets/templates/validatingwebhook.yaml (1)
36-50: Missing failurePolicy for ClusterSecretStore webhook.According to the PR description, both SecretStore and ClusterSecretStore should have failurePolicy configured dynamically. However, the ClusterSecretStore webhook is missing this field. This creates an inconsistency where only SecretStore respects the failurePolicy setting, while ClusterSecretStore operations could still fail due to webhook timeouts in environments with connectivity issues (like the EKS scenario described in issue #956).
🔧 Proposed fix to add failurePolicy
admissionReviewVersions: ["v1", "v1beta1"] sideEffects: None timeoutSeconds: 5 + failurePolicy: {{ .Values.webhook.failurePolicy }} ---
🤖 Fix all issues with AI agents
In @deploy/charts/external-secrets/templates/validatingwebhook.yaml:
- Line 34: The Helm template for the validating webhook sets failurePolicy using
the expression {{ .Values.webhook.failurePolicy}} which lacks a space before the
closing braces; update the template expression to include a space before the
closing braces (e.g., use {{ .Values.webhook.failurePolicy }}) and make the same
spacing correction for the matching occurrence on line 84 to resolve the
formatting inconsistency.
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
deploy/charts/external-secrets/templates/validatingwebhook.yaml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
- GitHub Check: publish-artifacts (Dockerfile.ubi, CGO_ENABLED=0 GOEXPERIMENT=boringcrypto, amd64 ppc64le, linux/... / Build and Publish
- GitHub Check: publish-artifacts (Dockerfile.ubi, CGO_ENABLED=0, amd64 arm64 ppc64le, linux/amd64,linux/arm64,li... / Build and Publish
- GitHub Check: publish-artifacts (Dockerfile, CGO_ENABLED=0, amd64 arm64 s390x ppc64le, linux/amd64,linux/arm64,... / Build and Publish
- GitHub Check: unit-tests
- GitHub Check: check-diff
- GitHub Check: Analyze project (actions, none)
- GitHub Check: Analyze project (go, autobuild)
- GitHub Check: lint-and-test
🔇 Additional comments (1)
deploy/charts/external-secrets/templates/validatingwebhook.yaml (1)
34-34: No action needed — the webhook.failurePolicy value is already defined in values.yaml, and helm tests for webhook functionality already exist.The template reference to
.Values.webhook.failurePolicyis properly supported by the values.yaml file (line 402, set toFailby default). Additionally, helm tests are already present in the repository atdeploy/charts/external-secrets/tests/webhook_test.yamland related test files, so the maintainer's requirement for test coverage is already satisfied.Likely an incorrect or invalid review comment.
deploy/charts/external-secrets/templates/validatingwebhook.yaml
Outdated
Show resolved
Hide resolved
|
@LochanRn if you take care of the formatting and run |
Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com> On-behalf-of: Gergely Brautigam <gergely.brautigam@sap.com>
|
/ok-to-test sha=34e20e15c990e90cf6b52edf459faa50e5037f87 |
|
…2 (#3782) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [external-secrets/external-secrets](https://github.com/external-secrets/external-secrets) | major | `v1.3.2` → `v2.0.0` | --- ### Release Notes <details> <summary>external-secrets/external-secrets (external-secrets/external-secrets)</summary> ### [`v2.0.0`](https://github.com/external-secrets/external-secrets/releases/tag/v2.0.0) [Compare Source](external-secrets/external-secrets@v1.3.2...v2.0.0) ### BREAKING CHANGE Please note that this release removed two of the unsupported and unmaintained providers Alibaba and Device42. Image: `ghcr.io/external-secrets/external-secrets:v2.0.0` Image: `ghcr.io/external-secrets/external-secrets:v2.0.0-ubi` Image: `ghcr.io/external-secrets/external-secrets:v2.0.0-ubi-boringssl` <!-- Release notes generated using configuration in .github/release.yml at main --> #### What's Changed ##### General - chore: bump charts to 1.3.2 by [@​gusfcarvalho](https://github.com/gusfcarvalho) in [#​5923](external-secrets/external-secrets#5923) - feat(charts): add hostAliases support by [@​janlauber](https://github.com/janlauber) in [#​5866](external-secrets/external-secrets#5866) - chore: remove unmaintained secret stores by [@​Skarlso](https://github.com/Skarlso) in [#​5918](external-secrets/external-secrets#5918) - docs(infisical): document al provider auth methods by [@​varonix0](https://github.com/varonix0) in [#​5929](external-secrets/external-secrets#5929) - chore: Get validating webhook failurePolicy for Secretstore dynamically by [@​LochanRn](https://github.com/LochanRn) in [#​5605](external-secrets/external-secrets#5605) #### New Contributors - [@​LochanRn](https://github.com/LochanRn) made their first contribution in [#​5605](external-secrets/external-secrets#5605) **Full Changelog**: <external-secrets/external-secrets@v1.3.2...v2.0.0> </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4zLjYiLCJ1cGRhdGVkSW5WZXIiOiI0My4zLjYiLCJ0YXJnZXRCcmFuY2giOiJtYWluIiwibGFiZWxzIjpbImltYWdlIl19--> Reviewed-on: https://gitea.alexlebens.dev/alexlebens/infrastructure/pulls/3782 Co-authored-by: Renovate Bot <renovate-bot@alexlebens.net> Co-committed-by: Renovate Bot <renovate-bot@alexlebens.net>
This PR contains the following updates: | Package | Update | Change | |---|---|---| | [external-secrets](https://github.com/external-secrets/external-secrets) | major | `1.3.2` → `2.0.0` | --- ### Release Notes <details> <summary>external-secrets/external-secrets (external-secrets)</summary> ### [`v2.0.0`](https://github.com/external-secrets/external-secrets/releases/tag/v2.0.0) [Compare Source](external-secrets/external-secrets@v1.3.2...v2.0.0) ### BREAKING CHANGE Please note that this release removed two of the unsupported and unmaintained providers Alibaba and Device42. Image: `ghcr.io/external-secrets/external-secrets:v2.0.0` Image: `ghcr.io/external-secrets/external-secrets:v2.0.0-ubi` Image: `ghcr.io/external-secrets/external-secrets:v2.0.0-ubi-boringssl` <!-- Release notes generated using configuration in .github/release.yml at main --> #### What's Changed ##### General - chore: bump charts to 1.3.2 by [@​gusfcarvalho](https://github.com/gusfcarvalho) in [#​5923](external-secrets/external-secrets#5923) - feat(charts): add hostAliases support by [@​janlauber](https://github.com/janlauber) in [#​5866](external-secrets/external-secrets#5866) - chore: remove unmaintained secret stores by [@​Skarlso](https://github.com/Skarlso) in [#​5918](external-secrets/external-secrets#5918) - docs(infisical): document al provider auth methods by [@​varonix0](https://github.com/varonix0) in [#​5929](external-secrets/external-secrets#5929) - chore: Get validating webhook failurePolicy for Secretstore dynamically by [@​LochanRn](https://github.com/LochanRn) in [#​5605](external-secrets/external-secrets#5605) #### New Contributors - [@​LochanRn](https://github.com/LochanRn) made their first contribution in [#​5605](external-secrets/external-secrets#5605) **Full Changelog**: <external-secrets/external-secrets@v1.3.2...v2.0.0> </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4zLjYiLCJ1cGRhdGVkSW5WZXIiOiI0My4zLjYiLCJ0YXJnZXRCcmFuY2giOiJtYWluIiwibGFiZWxzIjpbImNoYXJ0Il19--> Reviewed-on: https://gitea.alexlebens.dev/alexlebens/infrastructure/pulls/3788 Co-authored-by: Renovate Bot <renovate-bot@alexlebens.net> Co-committed-by: Renovate Bot <renovate-bot@alexlebens.net>
…ly (external-secrets#5605) * Get validating webhook failurePolicy for Secretstore dynamically Signed-off-by: LochanRn <rn.lochan@gmail.com> * fix the formatting Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com> On-behalf-of: Gergely Brautigam <gergely.brautigam@sap.com> --------- Signed-off-by: LochanRn <rn.lochan@gmail.com> Co-authored-by: Gergely Bräutigam <skarlso777@gmail.com> Co-authored-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com> Signed-off-by: Nattapong Ekudomsuk <nuttapong_mos@hotmail.com>
…ly (external-secrets#5605) * Get validating webhook failurePolicy for Secretstore dynamically Signed-off-by: LochanRn <rn.lochan@gmail.com> * fix the formatting Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com> On-behalf-of: Gergely Brautigam <gergely.brautigam@sap.com> --------- Signed-off-by: LochanRn <rn.lochan@gmail.com> Co-authored-by: Gergely Bräutigam <skarlso777@gmail.com> Co-authored-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com> Signed-off-by: Nattapong Ekudomsuk <nuttapong_mos@hotmail.com>
This PR contains the following updates: | Package | Update | Change | |---|---|---| | [external-secrets](https://github.com/external-secrets/external-secrets) | major | `1.3.2` → `2.0.0` | --- ### Release Notes <details> <summary>external-secrets/external-secrets (external-secrets)</summary> ### [`v2.0.0`](https://github.com/external-secrets/external-secrets/releases/tag/v2.0.0) [Compare Source](external-secrets/external-secrets@v1.3.2...v2.0.0) ### BREAKING CHANGE Please note that this release removed two of the unsupported and unmaintained providers Alibaba and Device42. Image: `ghcr.io/external-secrets/external-secrets:v2.0.0` Image: `ghcr.io/external-secrets/external-secrets:v2.0.0-ubi` Image: `ghcr.io/external-secrets/external-secrets:v2.0.0-ubi-boringssl` <!-- Release notes generated using configuration in .github/release.yml at main --> #### What's Changed ##### General - chore: bump charts to 1.3.2 by [@​gusfcarvalho](https://github.com/gusfcarvalho) in [#​5923](external-secrets/external-secrets#5923) - feat(charts): add hostAliases support by [@​janlauber](https://github.com/janlauber) in [#​5866](external-secrets/external-secrets#5866) - chore: remove unmaintained secret stores by [@​Skarlso](https://github.com/Skarlso) in [#​5918](external-secrets/external-secrets#5918) - docs(infisical): document al provider auth methods by [@​varonix0](https://github.com/varonix0) in [#​5929](external-secrets/external-secrets#5929) - chore: Get validating webhook failurePolicy for Secretstore dynamically by [@​LochanRn](https://github.com/LochanRn) in [#​5605](external-secrets/external-secrets#5605) #### New Contributors - [@​LochanRn](https://github.com/LochanRn) made their first contribution in [#​5605](external-secrets/external-secrets#5605) **Full Changelog**: <external-secrets/external-secrets@v1.3.2...v2.0.0> </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My40LjAiLCJ1cGRhdGVkSW5WZXIiOiI0My40LjAiLCJ0YXJnZXRCcmFuY2giOiJtYXN0ZXIiLCJsYWJlbHMiOltdfQ==--> Reviewed-on: https://kubara.git.onstackit.cloud/STACKIT/kubara/pulls/283
…ly (external-secrets#5605) * Get validating webhook failurePolicy for Secretstore dynamically Signed-off-by: LochanRn <rn.lochan@gmail.com> * fix the formatting Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com> On-behalf-of: Gergely Brautigam <gergely.brautigam@sap.com> --------- Signed-off-by: LochanRn <rn.lochan@gmail.com> Co-authored-by: Gergely Bräutigam <skarlso777@gmail.com> Co-authored-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com>



Problem Statement
What is the problem you're trying to solve?
Webhook Timeout Issue: The Kubernetes API server was unable to reach the External Secrets
Operator validation webhook, causing a timeout error:
Post "https://external-secrets-webhook.uipath.svc:443/validate-external-secrets-io-v1-secret
store?timeout=5s": context deadline exceeded
This is a known issue in EKS clusters where the API server (which runs on the control plane
outside the VPC) cannot resolve cluster DNS names for webhook services.
Related Issue
Fixes #956
Proposed Changes
I want to Ignore failurePolicy even for secretstore when i disable it for external secrets.
How do you like to solve the issue and why?
I have updated the templates in validating webhook.
Format
Please ensure that your PR follows the following format for the title:
Where
scopeis optionally one of:Checklist
git commit --signoffmake testmake reviewableThis PR makes the validating webhook failurePolicy configurable via Helm values for the SecretStore (namespaced) and ExternalSecret validating webhooks by adding failurePolicy: {{ .Values.webhook.failurePolicy }} to their webhook definitions in deploy/charts/external-secrets/templates/validatingwebhook.yaml. The ClusterSecretStore webhook was not modified.