Parameters
The parent key for all of the following parameters is prometheus.
A shared instance of the following kube-prometheus component can be configured:
-
prometheus_operator
Multiple instances of the following components can be configured:
-
prometheus
-
alertmanager
-
grafana
-
nodeExporter
-
blackboxExporter
-
kubernetesControlPlane
-
prometheusAdapter
-
kubeStateMetrics
kubernetes_version
| type |
string |
| default |
|
| example |
|
The Kubernetes version of the cluster is used to consume the corresponding kube-prometheus version.
registries
| type |
dictionary |
| default | |
| example |
|
A dictionary of registries to use for the Prometheus components. Allows to map upstream images to a custom registry. Useful for air gapped clusters.
images
| type |
dictionary |
| default |
A dictionary of images used by this component.
Doesn’t include the kube-prometheus upstream images.
namespaces
| type |
dict |
| default |
|
| example |
|
The namespaces parameter can be used to create a list of namespaces for the Prometheus stacks to be deployed.
The key is used as the name of the namespace and the value is used as the namespace metadata.
Namespaces can be removed from the hierarchy by setting the value to null.
| The prometheus-operator deployed by this component will only reconcile resources in these namespaces. |
secrets
| type |
dict |
| default |
|
| example |
secrets:
my-secret:
stringData:
foo: bar
long: |
A long
multiline secret
object-storage:
metadata:
namespace: foo-ns
stringData:
thanos:
type: S3
config:
bucket: thanos
endpoint: s3.example.com
access_key: '?{vaultkv:${cluster:tenant}/${cluster:name}/s3_access_key}'
secret_key: '?{vaultkv:${cluster:tenant}/${cluster:name}/s3_secret_key}'
The secrets parameter can be used to create a list of arbitrary secrets.
The key is used as the name of the secret and the value is transformed into Secret resources.
When specifying an object as value for a key in stringData, the component will render the object as JSON and add it as a string.
This can be very helpful if you need so specify JSON or YAML configuration through a secret, for example for Thanos object-storage configuration.
|
addons
| type |
array |
| default |
|
| example |
|
A list of addons to configure the Prometheus stack.
Upstream addons can be found in the addons folder of the kube-prometheus project.
Addons provided by this component can be found in the component/addons folder.
addon_configs
| type |
dict |
A list of configuration options for various addons. For supported configuration options, see the documentation of the respective addon.
The key is set to the addon name (replace hyphens with underscore - eg. for addon disable-alerts the key is disable_alerts)
addon_configs.alert_routing_discovery
| type |
dict |
| default |
|
This parameter configures the alert-routing-discovery addon which enables users to easily implement dynamic alert routing based on each Commodore component’s Project Syn team.
When the addon is enabled (referenced in component parameter addons), it injects a partial Alertmanager config into the Alertmanager of each monitoring stack managed by this component.
The addon expects that the user defines a receiver for each team that could potentially receive alerts with a name matching the format string defined in field team_receiver_format.
The addon expects that this format string contains exactly one %s which will be replaced with the team identifier.
If field debug_config_map is set to true, the addon emits a configmap which contains debug information that can be helpful to investigate incorrect alert routing rules.
Field additional_alert_matchers enables users to provide additional matchers which are added to each of the dynamically defined routing rules.
This can be used to further restrict which alerts are routed to teams.
Fields prepend_routes and append_routes enable users to add additional alert routing rules before and after the dynamic rules generated by the addon.
If field fallback_team is not null, it’s used as the default/fallback Project Syn team name for clusters which don’t set syn.owner and all alerts not assigned to a specific team are sent to that team’s receiver.
ingressNetworkPolicySource
| type |
dict |
| default |
|
A dict containing the namespaceSelector and podSelector to match the ingress controller pods.
Required when configuring ingress for Grafana.
base
| type |
dict |
| default |
|
The base configuration shared by all instances. Can be overridden by the instance-specific configuration.
General rules and alerts are grouped in the kubePrometheus component.
alerts
| type |
object |
This parameter holds configurations that are used by component library prometheus-alert-patching.libsonnet.
The configurations are also used by component addons additional-rules and disable-alerts.
ignoreNames
| type |
list |
| default |
A list of alert names to remove when rendering Prometheus rule groups.
customAnnotations
| type |
object |
| default |
|
This parameter allows users to apply custom annotations on individual alerts.
The object keys are expected to be strings and used as alert names.
The object values are expected to be objects with string keys and values and are added to the target alert’s annotations.
defaultInstance
| type |
string |
| default |
null |
| example |
|
The key of the default instance in the instances dict.
The specified instance is used for library functions when no instance is provided.
instances
| type |
dict |
| default |
{} |
| example |
|
Instances contains the configuration for each instance of the stack that should be deployed.
base is used as the default values for the instance.
Every deployable component can be configured in its corresponding key.
Users can set fields in instances to null to disable stacks defined higher up in the hierarchy.
base.COMPONENT, instances.*.COMPONENT
| type |
dict |
| default |
|
| example |
|
Every component can be configured with the following keys:
-
enabled: Whether the component should be deployed. -
config: The configuration for how the component should be rendered. Warning: Configuring one component can have side effects on other components. -
overrides: The configuration overrides for the component. Warning: The overrides are applied after the manifests are rendered. This means configuration side effects don’t apply and the configuration can contain invalid values.
config parameters can be found in the corresponding kube-prometheus library here.
The easiest way to find the allowed parameters is to look at the local defaults variable.
See the kube state metrics defaults as an example: kube-prometheus/components/kube-state-metrics.libsonnet
instances.*.(prometheus|alertmanager|grafana).networkPolicy.additionalIngressRules
| type |
list |
| default |
null |
| example |
prometheus:
networkPolicy:
additionalIngressRules:
- from:
- namespaceSelector:
matchLabels:
kubernetes.io/metadata.name: kube-system
podSelector:
matchLabels:
app: konnectivity-agent
Can be used to supply additional ingress rules to the NetworkPolicies for Prometheus, Grafana or Alertmanager. Configured rules will be appended to the existing NetworkPolicy and must adhere to the Kubernetes NetworkPolicy spec.
base.common, instances.common
| type |
dict |
| default |
|
| example |
|
Common parameters to be passed down to all components.
The supported fields can be found here under the values.common key.
At the time of writing this dict supported the following fields:
common.namespace
| type |
string |
| default |
|
| example |
|
The default namespace for all components.
common.platform
| type |
string |
| default |
|
| example |
|
Using a predefined mixin for a given platform. A list of supported platforms can be found here: github.com/prometheus-operator/kube-prometheus/blob/main/docs/customizations/platform-specific.md
common.ruleLabels
| type |
dict |
| default |
|
Default alert rule labels for all components.
common.versions
| type |
dict |
| default |
See github.com/prometheus-operator/kube-prometheus/blob/main/jsonnet/kube-prometheus/versions.json |
| example |
|
The default version to be used for the various components.
common.images
| type |
dict |
| default |
See github.com/prometheus-operator/kube-prometheus/blob/main/jsonnet/kube-prometheus/main.libsonnet |
| example |
|
The default image to be used for the various components.