-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Helm linkerd-controler-plane Allow Custom labels on Pod Monitor #11222
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.
Thanks @jseiser 👍
Can you please run bin/helm-docs
to upgrade the chart's README.md file? I don't understand why the helm-docs-diff
CI job didn't complain...
Need to be able to set labels on Pod Monitors add a labels section to podMonitor Helm Lint/Helm Template Fixes #[11175] Signed-off-by: Justin S <[email protected]>
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.
LGTM 👍
Anything else we need to do on this one? |
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.
@jseiser thanks for the change! We generally need 2 reviewers and I took my time with it. I think it'd be great to also include a labels field for pod monitor in code, otherwise things might be lost during deserialization when using the CLI.
I think adding a map here should do the trick
linkerd2/pkg/charts/linkerd2/values.go
Lines 157 to 164 in 33dd17f
PodMonitor struct { | |
Enabled bool `json:"enabled"` | |
ScrapeInterval string `json:"scrapeInterval"` | |
ScrapeTimeout string `json:"scrapeTimeout"` | |
Controller *PodMonitorController `json:"controller"` | |
ServiceMirror *PodMonitorComponent `json:"serviceMirror"` | |
Proxy *PodMonitorComponent `json:"proxy"` | |
} |
cc: @alpeb
It seems that for free-form fields like this one the marshaling is forgiving enough: $ bin/linkerd install --set podMonitor.enabled=true --set podMonitor.labels.foo=bar | grep -B 6 foo
kind: PodMonitor
metadata:
name: "linkerd-controller"
namespace: linkerd
labels:
linkerd.io/control-plane-ns: linkerd
foo: bar
--
kind: PodMonitor
metadata:
name: "linkerd-service-mirror"
namespace: linkerd
labels:
linkerd.io/control-plane-ns: linkerd
foo: bar
--
kind: PodMonitor
metadata:
name: "linkerd-proxy"
namespace: linkerd
labels:
linkerd.io/control-plane-ns: linkerd
foo: bar
--
matchNames:
- {{ .Release.Namespace }}
- linkerd-viz
- linkerd-jaeger
enabled: true
labels:
foo: bar But I think it's still good to add that entry into the |
I do not know Go to even attempt to add that. |
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.
@alpeb's right, I did a bit of testing on a separate PR and it doesn't seem like it requires us to populate the Go values struct (unless we turn it into an actual CLI flag which I doubt is in the books).
We can forgo consistency here since OP isn't comfortable in Go and since we likely have more similar fields that do not have a corresponding field in the internal model.
Thanks for the PR!
…erd#11222) Need to be able to set labels on Pod Monitors add a labels section to podMonitor Helm Lint/Helm Template Fixes #[11175] Signed-off-by: Justin S <[email protected]>
…erd#11222) Need to be able to set labels on Pod Monitors add a labels section to podMonitor Helm Lint/Helm Template Fixes #[11175] Signed-off-by: Justin S <[email protected]> Signed-off-by: Adam Shaw <[email protected]>
This edge release updates the proxy's dependency on the `rustls` library to patch security vulnerability [RUSTSEC-2023-0052] (GHSA-8qv2-5vq6-g2g7), a potential CPU usage denial-of-service attack when acceting a TLS handshake from an untrusted peer with a maliciously-crafted certificate. Furthermore, this edge release contains a few improvements to the control plane and jaeger extension Helm charts. * Addressed security vulnerability [RUSTSEC-2023-0052] in the proxy by updating its dependency on the `rustls` library * Added a `prometheusUrl` field for the heartbeat job in the control plane Helm chart (thanks @david972!) ([#11343]; fixes [#11342]) * Introduced support for arbitrary labels in the `podMonitors` field in the control plane Helm chart (thanks @jseiser!) ([#11222]; fixes [#11175]) * Added support for config merge and Deployment environment to `opentelemetry-collector` in the jaeger extension (thanks @iAnomaly!) ([#11283]) [#11283]: #11283 [#11222]: #11222 [#11175]: #11175 [#11343]: #11343 [#11342]: #11342 Signed-off-by: Matei David <[email protected]>
* edge-29.9.3 This edge release updates the proxy's dependency on the `rustls` library to patch security vulnerability [RUSTSEC-2023-0052] (GHSA-8qv2-5vq6-g2g7), a potential CPU usage denial-of-service attack when acceting a TLS handshake from an untrusted peer with a maliciously-crafted certificate. Furthermore, this edge release contains a few improvements to the control plane and jaeger extension Helm charts. * Addressed security vulnerability [RUSTSEC-2023-0052] in the proxy by updating its dependency on the `rustls` library * Added a `prometheusUrl` field for the heartbeat job in the control plane Helm chart (thanks @david972!) ([#11343]; fixes [#11342]) * Introduced support for arbitrary labels in the `podMonitors` field in the control plane Helm chart (thanks @jseiser!) ([#11222]; fixes [#11175]) * Added support for config merge and Deployment environment to `opentelemetry-collector` in the jaeger extension (thanks @iAnomaly!) ([#11283]) [#11283]: #11283 [#11222]: #11222 [#11175]: #11175 [#11343]: #11343 [#11342]: #11342 Signed-off-by: Matei David <[email protected]>
Need to be able to set labels on Pod Monitors add a labels section to podMonitor Helm Lint/Helm Template Fixes #[11175] Signed-off-by: Justin S <[email protected]>
This stable release back-ports bugfixes and improvements from recent edge releases. * Introduced support for arbitrary labels in the `podMonitors` field in the control plane Helm chart (thanks @jseiser!) ([#11222]; fixes [#11175]) * Added a `prometheusUrl` field for the heartbeat job in the control plane Helm chart (thanks @david972!) ([#11343]; fixes [#11342]) * Updated the Destination controller to return `INVALID_ARGUMENT` status codes properly when a `ServiceProfile` is requested for a service that does not exist. ([#11980]) * Reduced the load on the Destination controller by only processing Server updates on workloads affected by the Server ([#12017]) * Changed how updates to a `Server` selector are handled in the destination service. When a `Server` that marks a port as opaque no longer selects a resource, the resource's opaqueness will reverted to default settings ([#12031]; fixes [#11995]) * Fixed a race condition in the destination service that could cause panics under very specific conditions ([#12022]; fixes [#12010]) * Fixed an issue where inbound policy could be incorrect after certain policy resources are deleted ([#12088]) [#11222]: #11222 [#11175]: #11175 [#11343]: #11343 [#11342]: #11342 [#11980]: #11980 [#12017]: #12017 [#11995]: #11995 [#12031]: #12031 [#12010]: #12010 [#12022]: #12022 [#12088]: #12088 Signed-off-by: Alex Leong <[email protected]> Signed-off-by: David ALEXANDRE <[email protected]> Signed-off-by: Justin S <[email protected]> Co-authored-by: Oliver Gould <[email protected]> Co-authored-by: Alejandro Pedraza <[email protected]> Co-authored-by: David ALEXANDRE <[email protected]> Co-authored-by: Justin Seiser <[email protected]>
Need to be able to set labels on Pod Monitors
add a labels section to podMonitor
Helm Lint/Helm Template
Fixes #11175
Signed-off-by: Justin S [email protected]