You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's also possible to configure kube-state-metrics to run in a `custom-resource-mode` only. In addition to specifying one of `--custom-resource-state-config*` flags, you could set `--custom-resource-state-only` to `true`.
53
+
With this configuration only the known custom resources configured in `--custom-resource-state-config*` will be taken into account by kube-state-metrics.
54
+
55
+
```yaml
56
+
apiVersion: apps/v1
57
+
kind: Deployment
58
+
metadata:
59
+
name: kube-state-metrics
60
+
namespace: kube-system
61
+
spec:
62
+
template:
63
+
spec:
64
+
containers:
65
+
- name: kube-state-metrics
66
+
args:
67
+
- --custom-resource-state-config
68
+
# in YAML files, | allows a multi-line string to be passed as a flag value
69
+
# see https://yaml-multiline.info
70
+
- |
71
+
spec:
72
+
resources:
73
+
- groupVersionKind:
74
+
group: myteam.io
75
+
version: "v1"
76
+
kind: Foo
77
+
metrics:
78
+
- name: active_count
79
+
help: "Count of active Foo"
80
+
each:
81
+
type: Gauge
82
+
...
83
+
- --custom-resource-state-only=true
84
+
```
85
+
52
86
NOTE: The `customresource_group`, `customresource_version`, and `customresource_kind` common labels are reserved, and will be overwritten by the values from the `groupVersionKind` field.
0 commit comments