fix(controller): secure metrics ServiceMonitor TLS#2747
Open
rootp1 wants to merge 1 commit into
Open
Conversation
Signed-off-by: rootp1 <arnav.iitr@gmail.com>
Author
|
@Aryan-sharma11 @AryanBakliwal @achrefbensaad |
Author
|
GitHub Actions did not start on this PR. The workflow runs are ending in |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose of PR?:
Fixes #2746
Does this PR introduce a breaking change?
No.
If the changes in this PR are manually verified, list down the scenarios covered::
ServiceMonitorand confirmed it no longer usesinsecureSkipVerify: true.ServiceMonitorusesinsecureSkipVerify: falseserverNametracks the rendered metrics service namemetrics-server-certat the controller-runtime metrics cert pathAdditional information for reviewer? :
This keeps the change scoped to controller manifests and secure-metrics wiring. It does not enable Prometheus or cert-manager by default in
config/default; it documents and scaffolds the secure path that should be enabled alongside Prometheus scraping.Checklist:
<type>(<scope>): <subject>Summary
ServiceMonitordefault from insecure TLS skip-verify to cert-manager-backed certificate verificationLinked Issue
Fixes #2746
What Changed
pkg/KubeArmorController/config/prometheus/monitor.yamlto verify TLS withmetrics-server-certpkg/KubeArmorController/config/certmanager/*resources for webhook and metrics certificatespkg/KubeArmorController/config/default/cert_metrics_manager_patch.yamlpkg/KubeArmorController/config/default/kustomization.yamlguidance for secure Prometheus + cert-manager wiringVerification
make build(inpkg/KubeArmorController) — passedGOWORK=off go run sigs.k8s.io/kustomize/kustomize/v5@v5.5.0 build /tmp/kubearmor-controller-prometheus— passedGOWORK=off go run sigs.k8s.io/kustomize/kustomize/v5@v5.5.0 build --load-restrictor LoadRestrictionsNone /tmp/kubearmor-controller-config-build/secure— passedmake test(inpkg/KubeArmorController) — failed: the target stopped during envtest tool bootstrap withtar: Error opening archive: Unrecognized archive formatbefore project tests executedmake docker-build TAG=latest(inpkg/KubeArmorController) — failed:dockeris not installed in this environmentmake docker-build(inpkg/KubeArmorOperator) — failed:dockeris not installed in this environment./KubeArmor/build/build_kubearmor.sh— failed:dockeris not installed in this environmentScope