Skip to content

Fix problems when enabling eks platform patch #1675

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

Merged
merged 1 commit into from
Apr 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions jsonnet/kube-prometheus/addons/aws-vpc-cni.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,13 @@
apiVersion: 'monitoring.coreos.com/v1',
kind: 'PrometheusRule',
metadata: {
labels: $.prometheus._config.commonLabels + $.prometheus._config.mixin.ruleLabels,
labels: {
'app.kubernetes.io/name': 'prometheus-vpc-cni-rules',
'app.kubernetes.io/component': 'prometheus',
'app.kubernetes.io/part-of': 'kube-prometheus',
},
Comment on lines +80 to +84
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For this part, I couldn't find a good replacement for this as we no longer have access to $.prometheus in this scope. Please let me know if you have any suggestions on how this can be improved so we don't have to hard-coded these values here.

name: 'aws-vpc-cni-rules',
namespace: $.prometheus._config.namespace,
namespace: $.values.prometheus.namespace,
},
spec: {
groups: [
Expand Down
1 change: 1 addition & 0 deletions jsonnet/kube-prometheus/platforms/platforms.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ local platformPatch(p) = if p != null && std.objectHas(platforms, p) then platfo
{
// initialize the object to prevent "Indexed object has no field" lint errors
local p = {
values+:: $.values,
alertmanager: {},
blackboxExporter: {},
grafana: {},
Expand Down