-
Notifications
You must be signed in to change notification settings - Fork 170
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
fix issue with service monitor #335
Conversation
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.
Hi @edwintye, thank you for working on this! Namespace fix is great and working 👍 There are a couple of change requests though: please see the comments.
@@ -17,5 +17,5 @@ spec: | |||
port: 8443 | |||
targetPort: https | |||
selector: | |||
control-plane: "controller-manager" | |||
{{- include "k6-operator.selectorLabels" . | nindent 4 }} |
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 suggest to fix the Chart so that control-plane: "controller-manager"
would work. Rationale: it'd be preferable to keep the labeling consistent with kustomize base, i.e. here:
https://github.com/grafana/k6-operator/blob/main/config/manager/manager.yaml
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.
Sure, whatever changes you guys want. I have moved the label inside the deployment template instead.
6e8ee6e
to
5c74b21
Compare
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.
Thank you for the updates @edwintye. LGTM 👍
@yorugac - What is the target date to release this change in the chart? |
@datsabk, this change is over here now: https://github.com/grafana/helm-charts/releases/tag/helm-k6-operator-3.2.0 |
Fixes #324 where helm install with flag
--set prometheus.enabled=true
fails unless thesystem
namespace exists. Set this to the same namespace as all the other resources installed via the chart. Additionally, restrict the namespace selector to be within the same namespace as well so there is chance of accidental cross namespace lookup and drag in another service by chance.Furthermore, fixes the selector label on the service itself as the current select
points to nothing. This can be easily verified without the need of a
ServiceMonitor
by port forwarding to the service and perform a simply curl against the endpoint. The change is to use theselectorLabels
that is used under.spec.template.metadata.labels
in theDeployment
.