Files
x509-certificate-exporter/chart/values.schema.json
T
Thibault VINCENTandThibault VINCENT d73f3c0c76 feat(chart): per-alert expr and for overrides + render ratchet
Two new value maps under `prometheusRules`:

- `alertExprOverrides` — alertName -> custom Prometheus expression
  that replaces the default `expr:`. Closes #253: multi-cluster setups
  can inject `max by (cluster, …)` aggregations or label filters
  without having to disableBuiltinAlertGroup and reconstruct everything.
- `alertForOverrides` — alertName -> `for:` duration that replaces
  the default. Schema-validated against Prometheus's duration syntax.

Both maps key on bare alert names (no `rulePrefix`). Overrides are
taken whole — no merge with the default. Single-line and multi-line
strings both render correctly: the template now emits each `expr:`
via `| quote` which wraps in a YAML double-quoted scalar (newlines
serialise to \n; Prometheus parses the resulting string identically
to the multi-line form).

Test ratchets added alongside:

- test/schema/valid/prometheusrules-alert-overrides.yaml — valid case
  covering both maps, with a multi-line expr to exercise the quoting
  path.
- test/schema/invalid/prometheusrules-alertforoverrides-bad-duration
  — paired with .expect.txt, ensures the duration regex rejects
  natural-language inputs ("30 minutes").
- test/render/prometheusrules-default-alerts.{yaml,expect-pass.txt} —
  new ratchet under the existing TestHelmRender machinery (extended
  to support "positive substring" checks via .expect-pass.txt). Locks
  in the exact 13 alert names the chart ships by default: any rename
  or accidental removal breaks the test at PR time.

Docs:

- chart/README.md.gotmpl alert table refreshed — was still on the v3
  layout (X509ExporterReadErrors + 3 cert alerts). Now lists all 13.
- values.yaml gets the two new map keys with descriptions and
  commented examples.
2026-05-25 19:18:58 +02:00

1503 lines
34 KiB
JSON

{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"cabundlesExporter": {
"additionalProperties": false,
"properties": {
"enabled": {
"default": false,
"type": "boolean"
},
"excludeLabels": {
"items": {
"type": "string"
},
"required": [],
"type": [
"array",
"null"
]
},
"excludeNames": {
"items": {
"type": "string"
},
"required": [],
"type": [
"array",
"null"
]
},
"exposeLabels": {
"items": {
"type": "string"
},
"required": [],
"type": [
"array",
"null"
]
},
"includeLabels": {
"items": {
"type": "string"
},
"required": [],
"type": [
"array",
"null"
]
},
"includeNames": {
"items": {
"type": "string"
},
"required": [],
"type": [
"array",
"null"
]
},
"resources": {
"additionalProperties": false,
"properties": {
"apiservice": {
"default": false,
"type": "boolean"
},
"crdConversion": {
"default": false,
"type": "boolean"
},
"mutating": {
"default": true,
"type": "boolean"
},
"validating": {
"default": true,
"type": "boolean"
}
},
"required": [
"mutating",
"validating",
"apiservice",
"crdConversion"
]
}
},
"required": [
"enabled"
],
"type": "object"
},
"exposeDiagnosticMetrics": {
"default": false,
"type": "boolean"
},
"exposeExpiredMetric": {
"default": true,
"type": "boolean"
},
"exposeNotBeforeMetric": {
"default": false,
"type": "boolean"
},
"exposePerCertificateErrorMetrics": {
"default": false,
"type": "boolean"
},
"exposeRelativeMetrics": {
"default": false,
"type": "boolean"
},
"extraDeploy": {
"items": {
"required": []
},
"type": "array"
},
"extraDeployVerbatim": {
"items": {
"required": []
},
"type": "array"
},
"extraLabels": {
"additionalProperties": true,
"required": []
},
"extraVolumeMounts": {
"items": {
"required": []
},
"type": "array"
},
"extraVolumes": {
"items": {
"required": []
},
"type": "array"
},
"fullnameOverride": {
"default": "",
"type": "string"
},
"global": {
"required": [],
"type": "object"
},
"grafana": {
"additionalProperties": false,
"properties": {
"annotations": {
"additionalProperties": true,
"required": []
},
"createDashboard": {
"default": false,
"type": "boolean"
},
"extraLabels": {
"additionalProperties": true,
"required": []
},
"sidecarLabel": {
"default": "grafana_dashboard",
"type": "string"
},
"sidecarLabelValue": {
"default": "1",
"type": "string"
}
},
"required": [
"createDashboard",
"sidecarLabel",
"sidecarLabelValue"
],
"type": "object"
},
"hostNetwork": {
"default": false,
"type": "boolean"
},
"hostPathsExporter": {
"additionalProperties": false,
"properties": {
"affinity": {
"additionalProperties": true,
"required": []
},
"annotations": {
"additionalProperties": true,
"required": []
},
"daemonSets": {
"additionalProperties": true,
"required": []
},
"debugMode": {
"default": false,
"type": "boolean"
},
"env": {
"items": {
"required": []
},
"type": "array"
},
"extraVolumeMounts": {
"items": {
"required": []
},
"type": "array"
},
"extraVolumes": {
"items": {
"required": []
},
"type": "array"
},
"hostPathVolumeType": {
"default": "Directory",
"enum": [
"",
"Directory",
"DirectoryOrCreate",
null
],
"required": [],
"type": [
"string",
"null"
]
},
"livenessProbe": {
"additionalProperties": true,
"required": []
},
"nodeSelector": {
"additionalProperties": true,
"required": []
},
"podAnnotations": {
"additionalProperties": true,
"required": []
},
"podExtraLabels": {
"additionalProperties": true,
"required": []
},
"podSecurityContext": {
"additionalProperties": true,
"required": []
},
"priorityClassName": {
"default": "",
"type": "string"
},
"readinessProbe": {
"additionalProperties": true,
"required": []
},
"refreshInterval": {
"default": "300s",
"type": "string"
},
"resources": {
"additionalProperties": true,
"required": []
},
"restartPolicy": {
"default": "Always",
"enum": [
"Always"
],
"required": []
},
"revisionHistoryLimit": {
"default": "",
"required": [],
"type": [
"integer",
"null"
]
},
"securityContext": {
"additionalProperties": true,
"required": []
},
"skipSymlinks": {
"default": false,
"type": "boolean"
},
"tolerations": {
"items": {
"required": []
},
"type": "array"
},
"updateStrategy": {
"additionalProperties": true,
"required": []
},
"watchDirectories": {
"items": {
"required": []
},
"type": "array"
},
"watchFiles": {
"items": {
"required": []
},
"type": "array"
},
"watchKubeconfFiles": {
"items": {
"required": []
},
"type": "array"
},
"watchSpecificExtensionDirectories": {
"items": {
"required": []
},
"type": "array"
}
},
"required": [
"debugMode",
"skipSymlinks",
"refreshInterval",
"tolerations",
"priorityClassName",
"extraVolumes",
"extraVolumeMounts",
"watchDirectories",
"watchSpecificExtensionDirectories",
"watchFiles",
"watchKubeconfFiles",
"env"
],
"type": "object"
},
"image": {
"additionalProperties": false,
"properties": {
"digest": {
"default": "",
"type": "string"
},
"pullPolicy": {
"default": "IfNotPresent",
"enum": [
"Always",
"IfNotPresent",
"Never"
],
"required": []
},
"registry": {
"default": "quay.io",
"type": "string"
},
"repository": {
"default": "enix/x509-certificate-exporter",
"minLength": 1,
"type": "string"
},
"tag": {
"default": "",
"type": "string"
},
"tagSuffix": {
"default": "",
"type": "string"
}
},
"required": [
"registry",
"tag",
"tagSuffix",
"digest"
],
"type": "object"
},
"imagePullSecrets": {
"items": {
"required": []
},
"type": "array"
},
"metricLabelsFilterList": {
"default": "null",
"items": {
"type": "string"
},
"required": [],
"type": [
"array",
"null"
]
},
"migration": {
"additionalProperties": false,
"properties": {
"annotations": {
"additionalProperties": true,
"required": []
},
"extraLabels": {
"additionalProperties": true,
"required": []
},
"image": {
"additionalProperties": false,
"properties": {
"digest": {
"default": "",
"type": "string"
},
"pullPolicy": {
"default": "IfNotPresent",
"enum": [
"Always",
"IfNotPresent",
"Never"
],
"required": []
},
"registry": {
"default": "registry.k8s.io",
"type": "string"
},
"repository": {
"default": "kubectl",
"type": "string"
},
"tag": {
"default": "",
"type": "string"
}
},
"required": [
"registry",
"repository",
"tag",
"digest"
],
"type": "object"
},
"podSecurityContext": {
"additionalProperties": true,
"required": []
},
"resources": {
"additionalProperties": true,
"required": []
},
"securityContext": {
"additionalProperties": true,
"required": []
}
},
"required": [
"image"
],
"type": "object"
},
"nameOverride": {
"default": "",
"type": "string"
},
"namespaceOverride": {
"default": "",
"type": "string"
},
"podAnnotations": {
"additionalProperties": true,
"required": []
},
"podExtraLabels": {
"additionalProperties": true,
"required": []
},
"podListenPort": {
"default": "9793",
"maximum": 65535,
"minimum": 1,
"required": []
},
"priorityClassName": {
"default": "",
"type": "string"
},
"probeListenPort": {
"default": "0",
"maximum": 65535,
"minimum": 0,
"required": []
},
"prometheusPodMonitor": {
"additionalProperties": true,
"properties": {
"create": {
"default": false,
"type": "boolean"
},
"extraLabels": {
"additionalProperties": true,
"required": []
},
"metricRelabelings": {
"items": {
"required": []
},
"type": "array"
},
"relabelings": {
"items": {
"required": []
},
"type": "array"
},
"scheme": {
"default": "http",
"enum": [
"http",
"https"
],
"required": []
},
"scrapeInterval": {
"default": "60s",
"type": "string"
},
"scrapeTimeout": {
"default": "30s",
"type": "string"
},
"tlsConfig": {
"additionalProperties": true,
"required": []
}
},
"required": [
"create",
"scrapeInterval",
"scrapeTimeout",
"metricRelabelings",
"relabelings"
]
},
"prometheusRules": {
"additionalProperties": false,
"properties": {
"alertExprOverrides": {
"additionalProperties": {
"type": "string"
},
"required": [],
"type": "object"
},
"alertExtraAnnotations": {
"additionalProperties": true,
"required": []
},
"alertExtraLabels": {
"additionalProperties": true,
"required": []
},
"alertForOverrides": {
"additionalProperties": {
"pattern": "^([0-9]+\\.[0-9]+(ms|s|m|h|d|w|y)|([0-9]+(ms|s|m|h|d|w|y))+)$",
"type": "string"
},
"required": [],
"type": "object"
},
"alertOnCertificateCollision": {
"default": true,
"type": "boolean"
},
"alertOnCertificateError": {
"default": true,
"type": "boolean"
},
"alertOnCertificateNotYetValid": {
"default": true,
"type": "boolean"
},
"alertOnKeystorePassphraseFailures": {
"default": true,
"type": "boolean"
},
"alertOnKubeTransportErrors": {
"default": true,
"type": "boolean"
},
"alertOnSourceDown": {
"default": true,
"type": "boolean"
},
"alertOnSourceErrors": {
"default": true,
"type": "boolean"
},
"certificateCollisionSeverity": {
"default": "warning",
"enum": [
"info",
"warning",
"critical"
],
"required": []
},
"certificateErrorSeverity": {
"default": "warning",
"enum": [
"info",
"warning",
"critical"
],
"required": []
},
"certificateExpirationsSeverity": {
"default": "critical",
"enum": [
"info",
"warning",
"critical"
],
"required": []
},
"certificateNotYetValidSeverity": {
"default": "warning",
"enum": [
"info",
"warning",
"critical"
],
"required": []
},
"certificateRenewalsSeverity": {
"default": "warning",
"enum": [
"info",
"warning",
"critical"
],
"required": []
},
"create": {
"default": true,
"type": "boolean"
},
"criticalDaysLeft": {
"default": "14",
"minimum": 0,
"required": []
},
"crlNeedsRefreshSeverity": {
"default": "warning",
"enum": [
"info",
"warning",
"critical"
],
"required": []
},
"crlStaleSeverity": {
"default": "critical",
"enum": [
"info",
"warning",
"critical"
],
"required": []
},
"crlWarningDaysLeft": {
"default": "7",
"minimum": 0,
"required": []
},
"disableBuiltinAlertGroup": {
"default": false,
"type": "boolean"
},
"extraAlertGroups": {
"items": {
"required": []
},
"type": "array"
},
"extraLabels": {
"additionalProperties": true,
"required": []
},
"keystorePassphraseFailuresSeverity": {
"default": "warning",
"enum": [
"info",
"warning",
"critical"
],
"required": []
},
"kubeTransportErrorsSeverity": {
"default": "warning",
"enum": [
"info",
"warning",
"critical"
],
"required": []
},
"kubeTransportErrorsSustainedSeverity": {
"default": "critical",
"enum": [
"info",
"warning",
"critical"
],
"required": []
},
"rulePrefix": {
"default": "",
"type": "string"
},
"sourceDownSeverity": {
"default": "critical",
"enum": [
"info",
"warning",
"critical"
],
"required": []
},
"sourceErrorsSeverity": {
"default": "warning",
"enum": [
"info",
"warning",
"critical"
],
"required": []
},
"sourceErrorsSustainedSeverity": {
"default": "critical",
"enum": [
"info",
"warning",
"critical"
],
"required": []
},
"warningDaysLeft": {
"default": "28",
"minimum": 0,
"required": []
}
},
"required": [
"create",
"rulePrefix",
"alertOnSourceErrors",
"alertOnSourceDown",
"alertOnKubeTransportErrors",
"alertOnKeystorePassphraseFailures",
"alertOnCertificateError",
"alertOnCertificateNotYetValid",
"alertOnCertificateCollision",
"disableBuiltinAlertGroup",
"extraAlertGroups"
],
"type": "object"
},
"prometheusServiceMonitor": {
"additionalProperties": true,
"properties": {
"create": {
"default": true,
"type": "boolean"
},
"extraAnnotations": {
"additionalProperties": true,
"required": []
},
"extraLabels": {
"additionalProperties": true,
"required": []
},
"metricRelabelings": {
"items": {
"required": []
},
"type": "array"
},
"relabelings": {
"items": {
"required": []
},
"type": "array"
},
"scheme": {
"default": "http",
"enum": [
"http",
"https"
],
"required": []
},
"scrapeInterval": {
"default": "60s",
"type": "string"
},
"scrapeTimeout": {
"default": "30s",
"type": "string"
},
"tlsConfig": {
"additionalProperties": true,
"required": []
}
},
"required": [
"create",
"scrapeInterval",
"scrapeTimeout",
"metricRelabelings",
"relabelings"
]
},
"psp": {
"additionalProperties": false,
"properties": {
"create": {
"default": false,
"type": "boolean"
}
},
"required": [
"create"
],
"type": "object"
},
"rbac": {
"additionalProperties": false,
"properties": {
"create": {
"default": true,
"type": "boolean"
},
"hostPathsExporter": {
"additionalProperties": false,
"properties": {
"clusterRoleAnnotations": {
"additionalProperties": true,
"required": []
},
"clusterRoleBindingAnnotations": {
"additionalProperties": true,
"required": []
},
"serviceAccountAnnotations": {
"additionalProperties": true,
"required": []
},
"serviceAccountName": {
"default": "",
"required": [],
"type": [
"string",
"null"
]
}
},
"required": [],
"type": "object"
},
"secretsExporter": {
"additionalProperties": false,
"properties": {
"clusterRoleAnnotations": {
"additionalProperties": true,
"required": []
},
"clusterRoleBindingAnnotations": {
"additionalProperties": true,
"required": []
},
"serviceAccountAnnotations": {
"additionalProperties": true,
"required": []
},
"serviceAccountName": {
"default": "",
"required": [],
"type": [
"string",
"null"
]
}
},
"required": [],
"type": "object"
}
},
"required": [
"create",
"secretsExporter",
"hostPathsExporter"
],
"type": "object"
},
"rbacProxy": {
"additionalProperties": false,
"properties": {
"enabled": {
"default": false,
"type": "boolean"
},
"image": {
"additionalProperties": false,
"properties": {
"digest": {
"default": "",
"type": "string"
},
"pullPolicy": {
"default": "IfNotPresent",
"enum": [
"Always",
"IfNotPresent",
"Never"
],
"required": []
},
"registry": {
"default": "quay.io",
"type": "string"
},
"repository": {
"default": "brancz/kube-rbac-proxy",
"minLength": 1,
"type": "string"
},
"tag": {
"default": "v0.22.0",
"type": "string"
}
},
"required": [
"registry",
"tag",
"digest"
],
"type": "object"
},
"resources": {
"additionalProperties": true,
"required": []
},
"securityContext": {
"additionalProperties": true,
"required": []
},
"tls": {
"additionalProperties": false,
"properties": {
"existingSecretName": {
"default": "",
"type": "string"
}
},
"required": [
"existingSecretName"
],
"type": "object"
},
"upstreamListenPort": {
"default": "9091",
"maximum": 65535,
"minimum": 1,
"required": []
}
},
"required": [
"enabled",
"tls",
"image"
],
"type": "object"
},
"secretsExporter": {
"additionalProperties": false,
"properties": {
"affinity": {
"additionalProperties": true,
"required": []
},
"annotations": {
"additionalProperties": true,
"required": []
},
"cache": {
"additionalProperties": false,
"properties": {
"enabled": {
"default": true,
"type": "boolean"
},
"maxDuration": {
"default": "300",
"minimum": 1,
"required": []
}
},
"required": [
"enabled"
],
"type": "object"
},
"configMapKeys": {
"items": {
"required": []
},
"type": "array"
},
"debugMode": {
"default": false,
"type": "boolean"
},
"enabled": {
"default": true,
"type": "boolean"
},
"env": {
"items": {
"required": []
},
"type": "array"
},
"excludeConfigMaps": {
"items": {
"type": "string"
},
"required": [],
"type": [
"array",
"null"
]
},
"excludeLabels": {
"items": {
"type": "string"
},
"required": [],
"type": [
"array",
"null"
]
},
"excludeNamespaceLabels": {
"items": {
"type": "string"
},
"required": [],
"type": [
"array",
"null"
]
},
"excludeNamespaces": {
"items": {
"type": "string"
},
"required": [],
"type": [
"array",
"null"
]
},
"excludeSecrets": {
"items": {
"type": "string"
},
"required": [],
"type": [
"array",
"null"
]
},
"exposeConfigMapLabels": {
"items": {
"type": "string"
},
"required": [],
"type": [
"array",
"null"
]
},
"exposeSecretLabels": {
"items": {
"type": "string"
},
"required": [],
"type": [
"array",
"null"
]
},
"extraArgs": {
"items": {
"required": []
},
"type": "array"
},
"extraVolumeMounts": {
"items": {
"required": []
},
"type": "array"
},
"extraVolumes": {
"items": {
"required": []
},
"type": "array"
},
"includeConfigMaps": {
"items": {
"type": "string"
},
"required": [],
"type": [
"array",
"null"
]
},
"includeLabels": {
"items": {
"type": "string"
},
"required": [],
"type": [
"array",
"null"
]
},
"includeNamespaceLabels": {
"items": {
"type": "string"
},
"required": [],
"type": [
"array",
"null"
]
},
"includeNamespaces": {
"items": {
"type": "string"
},
"required": [],
"type": [
"array",
"null"
]
},
"includeSecrets": {
"items": {
"type": "string"
},
"required": [],
"type": [
"array",
"null"
]
},
"kubeApiRateLimits": {
"additionalProperties": false,
"properties": {
"burstQueries": {
"default": "10",
"minimum": 1,
"required": []
},
"enabled": {
"default": false,
"type": "boolean"
},
"queriesPerSecond": {
"default": "5",
"minimum": 0,
"required": []
}
},
"required": [
"enabled"
],
"type": "object"
},
"listPageSize": {
"default": "0",
"minimum": 0,
"required": []
},
"livenessProbe": {
"additionalProperties": true,
"required": []
},
"nodeSelector": {
"additionalProperties": true,
"required": []
},
"podAnnotations": {
"additionalProperties": true,
"required": []
},
"podExtraLabels": {
"additionalProperties": true,
"required": []
},
"podSecurityContext": {
"additionalProperties": true,
"required": []
},
"priorityClassName": {
"default": "",
"type": "string"
},
"readinessProbe": {
"additionalProperties": true,
"required": []
},
"replicas": {
"default": "1",
"minimum": 1,
"required": []
},
"resources": {
"additionalProperties": true,
"required": []
},
"restartPolicy": {
"default": "Always",
"enum": [
"Always"
],
"required": []
},
"revisionHistoryLimit": {
"default": "",
"required": [],
"type": [
"integer",
"null"
]
},
"secretTypes": {
"items": {
"additionalProperties": false,
"oneOf": [
{
"required": [
"key"
]
},
{
"required": [
"keyPatterns"
]
}
],
"properties": {
"format": {
"enum": [
"pem",
"pkcs12",
"der",
"jks"
],
"required": []
},
"jks": {
"additionalProperties": false,
"properties": {
"passphrase": {
"type": "string"
},
"passphraseFile": {
"type": "string"
},
"passphraseKey": {
"type": "string"
},
"passphraseSecretRef": {
"additionalProperties": false,
"properties": {
"key": {
"type": "string"
},
"name": {
"type": "string"
},
"namespace": {
"type": "string"
}
},
"required": [
"name",
"key"
],
"type": "object"
},
"tryEmptyPassphrase": {
"type": "boolean"
}
},
"required": [],
"type": "object"
},
"key": {
"type": "string"
},
"keyPatterns": {
"items": {
"type": "string"
},
"type": "array"
},
"pkcs12": {
"additionalProperties": false,
"properties": {
"passphrase": {
"type": "string"
},
"passphraseFile": {
"type": "string"
},
"passphraseKey": {
"type": "string"
},
"passphraseSecretRef": {
"additionalProperties": false,
"properties": {
"key": {
"type": "string"
},
"name": {
"type": "string"
},
"namespace": {
"type": "string"
}
},
"required": [
"name",
"key"
],
"type": "object"
},
"tryEmptyPassphrase": {
"type": "boolean"
}
},
"required": [],
"type": "object"
},
"type": {
"minLength": 1,
"type": "string"
}
},
"required": [
"type"
],
"type": "object"
},
"required": []
},
"securityContext": {
"additionalProperties": true,
"required": []
},
"strategy": {
"additionalProperties": true,
"required": []
},
"tolerations": {
"items": {
"required": []
},
"type": "array"
}
},
"required": [
"enabled",
"debugMode",
"tolerations",
"priorityClassName",
"extraVolumes",
"extraVolumeMounts",
"configMapKeys",
"extraArgs",
"cache",
"kubeApiRateLimits",
"env"
],
"type": "object"
},
"service": {
"additionalProperties": false,
"properties": {
"annotations": {
"additionalProperties": true,
"required": []
},
"create": {
"default": true,
"type": "boolean"
},
"extraLabels": {
"additionalProperties": true,
"required": []
},
"headless": {
"default": true,
"type": "boolean"
},
"port": {
"default": "9793",
"maximum": 65535,
"minimum": 1,
"required": []
}
},
"required": [
"create",
"headless"
],
"type": "object"
},
"web": {
"additionalProperties": false,
"properties": {
"enableStats": {
"default": true,
"type": "boolean"
}
},
"required": [
"enableStats"
],
"type": "object"
},
"webConfiguration": {
"default": "",
"type": "string"
},
"webConfigurationExistingSecret": {
"default": "",
"type": "string"
}
},
"required": [
"nameOverride",
"fullnameOverride",
"namespaceOverride",
"extraDeploy",
"extraDeployVerbatim",
"imagePullSecrets",
"image",
"migration",
"exposePerCertificateErrorMetrics",
"exposeRelativeMetrics",
"exposeNotBeforeMetric",
"exposeExpiredMetric",
"exposeDiagnosticMetrics",
"grafana",
"secretsExporter",
"cabundlesExporter",
"hostPathsExporter",
"hostNetwork",
"web",
"webConfiguration",
"webConfigurationExistingSecret",
"service",
"prometheusRules",
"priorityClassName",
"extraVolumes",
"extraVolumeMounts",
"psp",
"rbac",
"rbacProxy"
],
"type": "object"
}