Commit Graph
69 Commits
Author SHA1 Message Date
Prem Sichanugrist 257031ec49 Fix problems when enabling eks platform patch 2022-03-10 13:44:08 +09:00
Wulf Thimm a5c5adba68 added allowedCapabilities to node-exporter psp 2022-02-14 14:38:13 +00:00
Arunprasad Rajkumar 0eabbb5d0c Sanitize all regex denylist in ksm-lite addon
This is a follow up fix of https://github.com/prometheus-operator/kube-prometheus/pull/1613. @simonpasquier recommended to sanitize all denylist metrics.

Signed-off-by: Arunprasad Rajkumar <arajkuma@redhat.com>
2022-02-03 19:52:44 +05:30
Arunprasad RajkumarandFlorian Gleizes f16277e8e0 Sanitize regex denylist in ksm-lite addon
The following metrics are missing from kube-state-metrics:
- kube_pod_container_status_terminated_reason
- kube_pod_init_container_status_terminated_reason
- kube_pod_status_scheduled_time

Previously, some metrics were removed from kube-state-metrics by adding the following --metric-denylist argument to the kube-state-metrics container

```
--metric-denylist=
kube_.+_created,
kube_.+_metadata_resource_version,
kube_replicaset_metadata_generation,
kube_replicaset_status_observed_generation,
kube_pod_restart_policy,
kube_pod_init_container_status_terminated,
kube_pod_init_container_status_running,
kube_pod_container_status_terminated,
kube_pod_container_status_running,
kube_pod_completion_time,
kube_pod_status_scheduled
```

--metric-denylist: Comma-separated list of metrics not to be enabled. This list comprises of exact metric names and/or regex patterns. The allowlist and denylist are mutually exclusive.

However, all the list of metrics is managed as RegEx, thus "kube_pod_container_status_terminated" denies .*kube_pod_container_status_terminated.*, that's why kube_pod_init_container_status_terminated_reason is missing

Co-authored-by: Florian Gleizes <fgleizes@redhat.com>
Signed-off-by: Arunprasad Rajkumar <arajkuma@redhat.com>
2022-02-03 17:50:22 +05:30
ArthurSens f4a5ff3e3b addon/podsecuritypolicies: Add projected volumes permission
Signed-off-by: ArthurSens <arthursens2005@gmail.com>
2022-01-04 12:24:05 +00:00
Philip Gough 1263e1cba3 jsonnet: Drop deprecated apiserver_longrunning_gauge and apiserver_registered_watchers metrics
Drop deprecated metric to fix failing test.

Dropped via https://github.com/kubernetes/kubernetes/pull/103793
2021-12-16 17:08:01 +00:00
Paweł Krupa 0f6faaacde Merge pull request #1501 from ArthurSens/as/strip-limits-refactor 2021-11-24 13:15:07 +01:00
Maxime Brunet 80d04a1d53 addons: Always use proper values scope for namespace 2021-11-22 17:10:17 -08:00
ArthurSens 42e7df4d70 jsonnet/addons/strip-limits: Simplify logic
Since `release-0.8` resources has become a first-class object to all components of kube-prometheus. Therefore, we're simplifying this addon to reflect those changes.

Signed-off-by: ArthurSens <arthursens2005@gmail.com>
2021-11-15 14:38:15 +00:00
paulfantom 5c1b660d16 jsonnet: do not hide prometheus object 2021-10-22 14:04:10 +02:00
Paweł Krupa aef85157d7 Merge pull request #1347 from stpabhi/fix-sync-to-internal-registry
fix sync-to-internal-registry.jsonnet
2021-10-21 16:20:36 +02:00
Haoyu Sun e7d2135cea replace deprecated "app" label selector by "app.kubernetes.io/name" in
documents and examples
2021-10-08 14:00:52 +02:00
Abhilash Pallerlamudi 9e8926511f fix sync-to-internal-registry.jsonnet 2021-08-23 12:45:51 -07:00
Damien Grisonnet b5ec93208b jsonnet: drop deprecated etcd metric
Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>
2021-08-18 17:27:50 +02:00
paulfantom f6d6b30aed jsonnet: use full dependency path 2021-08-06 14:15:23 +02:00
Maxime Brunet d3ccfb8220 Turn AWS VPC CNI into a control plane add-on 2021-08-02 11:26:33 -07:00
Matthias Loibl 4ea366eef7 Fix name for blackbox-exporter PodSecurityPolicy 2021-06-16 12:55:51 +02:00
paulfantom feee269fdb jsonnet: improve all-namespaces addon
Signed-off-by: paulfantom <pawel@krupa.net.pl>
2021-06-01 09:05:07 +02:00
paulportela f7baf1599d Fix adding private repository
`imageRepos` field was removed and the project no longer tries to compose image strings. Now the libraries use `$.values.common.images` to override default images.
2021-05-28 17:22:27 -07:00
paulfantom 039d4a1e48 jsonnet: sort list of dropped metrics 2021-05-27 10:49:36 +02:00
paulfantom 2873857dc7 jsonnet: convert string of deprecated metrics into array 2021-05-27 10:46:58 +02:00
paulfantom 2fee85eb43 jsonnet: drop storage_operation_errors_total and storage_operation_status_count as those are deprecated in k8s 1.21 2021-05-26 12:49:44 +02:00
Simon Pasquier e58cadfe96 jsonnet/kube-prometheus/addons: fix KSM regex patterns
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2021-05-17 12:42:43 +02:00
Paweł Krupa 3b1f268d51 Merge pull request #1140 from paulfantom/config-reloader
jsonnet: use common to populate options for additional objects
2021-05-07 10:00:29 +02:00
paulfantom f340a76e21 jsonnet/addons: fix config-reloader limits 2021-05-07 09:37:03 +02:00
Paweł Krupa 982360b65e addons: hide inline antiaffinity function 2021-05-03 16:01:26 +02:00
Paweł Krupa 5b2740d517 Merge pull request #1114 from dgrisonnet/export-anti-affinity
Export anti-affinity addon
2021-04-30 17:20:01 +02:00
Damien Grisonnet fa05e2cde8 jsonnet: export anti-affinity addon
Export the antiaffinity function of the anti-affinity addon to make it
possible to extend the addon to component that are not present in the
kube-prometheus stack.

Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>
2021-04-27 15:30:06 +02:00
Luis Vidal Ernst 8c712eaa36 Fixed labels in windows addon 2021-04-27 12:47:23 +02:00
Michel Tomas e9d5221fb7 fix(addons): anti-affinity field does not exist: config 2021-04-23 01:19:05 +02:00
Damien Grisonnet 4c6a06cf7e jsonnet: make prometheus-adapter highly-available
Prometheus-adapter is a component of the monitoring stack that in most
cases require to be highly available. For instance, we most likely
always want the autoscaling pipeline to be available and we also want to
avoid having no available backends serving the metrics API apiservices
has it would result in both the AggregatedAPIDown alert firing and the
kubectl top command not working anymore.

In order to make the adapter highly-avaible, we need to increase its
replica count to 2 and come up with a rolling update strategy and a
pod anti-affinity rule based on the kubernetes hostname to prevent the
adapters to be scheduled on the same node. The default rolling update
strategy for deployments isn't enough as the default maxUnavaible value
is 25% and is rounded down to 0. This means that during rolling-updates
scheduling will fail if there isn't more nodes than the number of
replicas. As for the maxSurge, the default should be fine as it is
rounded up to 1, but for clarity it might be better to just set it to 1.
For the pod anti-affinity constraints, it would be best if it was hard,
but having it soft should be good enough and fit most use-cases.

Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>
2021-04-22 09:57:14 +02:00
paulfantom 3135cdd70d jsonnet: fix windows addon 2021-04-16 15:12:41 +02:00
Paweł Krupa 07136d1d6e Merge pull request #1039 from paulfantom/unify-config
jsonnet: unify internal configuration field name
2021-04-16 15:05:26 +02:00
Paweł Krupa 8b62749642 Merge pull request #1076 from paulfantom/ksm-lite
reduce KSM cardinality by denylisting unused metrics
2021-04-16 12:36:31 +02:00
Paweł Krupa 7a3879ba49 Merge pull request #1070 from ArthurSens/as/psp-respect-common-ns
Psp should be deployed at the same namespace as kube-prometheus stack
2021-04-12 10:31:51 +02:00
paulfantom f81412d05d jsonnet/kube-prometheus/addons: reduce KSM cardinality by denylisting unused metrics
Signed-off-by: paulfantom <pawel@krupa.net.pl>
2021-04-07 14:23:43 +02:00
Paweł Krupa 2ba8d8aca2 Merge pull request #1058 from mansikulkarni96/windows_exporter 2021-04-07 10:07:33 +02:00
mansikulkarni96 1c63b6d021 Add relabel_config to replace endpoint address
This commit adds a relabeling config to the scrape config of
windows-exporter using the 'replace' action field to replace
the node endpoint address with node name. The windows_exporter
returns endpoint target as node IP but we need it to be node name
to use the prometheus adapter queries and collect resource metrics
information.
2021-03-31 13:29:16 -04:00
ArthurSens 069f95148f Psp should be deployed at the same namespace as kube-prometheus stack
Signed-off-by: ArthurSens <arthursens2005@gmail.com>
2021-03-30 19:00:12 +00:00
Frederic Branczyk f5f72e1b50 Merge pull request #1060 from ArthurSens/as/psp-addon-fixes
PodSecurityPolicy uses role instead of clusterRole where posible
2021-03-30 13:33:48 +02:00
Frederic Branczyk 003daae495 Merge pull request #1052 from paulfantom/simplify-managed-cluster-addon
jsonnet/addons: simplify managed-cluster addon
2021-03-26 19:35:22 +01:00
ArthurSens c9b52c97f5 PodSecurityPolicy uses role instead of clusterRole where posible
Signed-off-by: ArthurSens <arthursens2005@gmail.com>
2021-03-25 20:59:49 +00:00
Paweł Krupa ab554c6ecb Merge pull request #911 from jsturtevant/windows
Windows addon
2021-03-23 09:48:25 +01:00
paulfantom 5d2156ffbf jsonnet/addons: simplify managed-cluster addon
Signed-off-by: paulfantom <pawel@krupa.net.pl>
2021-03-23 09:36:08 +01:00
paulfantom 0bf34a24f8 jsonnet: unify internal configuration field name
Signed-off-by: paulfantom <pawel@krupa.net.pl>
2021-03-22 12:48:55 +01:00
ArthurSens b7d7ba0271 Use node-exporter defaults.port on psp
Signed-off-by: ArthurSens <arthursens2005@gmail.com>
2021-03-18 20:57:48 +00:00
ArthurSens 478a18a6a7 Turn alertmanager's and grafana's roles into clusterRoles
Signed-off-by: ArthurSens <arthursens2005@gmail.com>
2021-03-18 20:57:48 +00:00
ArthurSens e8abcd3dc9 Allow node-exporter to use hostPath volumes
Signed-off-by: ArthurSens <arthursens2005@gmail.com>
2021-03-18 20:57:48 +00:00
ArthurSens 98559a0f42 Allow kube-state-metrics to run as any user
Signed-off-by: ArthurSens <arthursens2005@gmail.com>
2021-03-18 20:57:48 +00:00
ArthurSens 1237843e62 Adds an addon for podSecurityPolicies
Signed-off-by: ArthurSens <arthursens2005@gmail.com>
2021-03-18 20:57:48 +00:00