Kinds: monitoring
Implementation, history and tests of the entries on the reference page Kinds:
monitoring. Every test
named here is in pkg/oam/builtin/components/, in the file the note beside it
names.
alertmanager
- History:
- go-kure/launcher#790 (the kind-named projections) [The reference cited it after “alertmanager” in its introduction.]
- go-kure/launcher#922 (the object kind policy,
oam.ObjectKindPolicy) [The reference cited it after “build through the object kind policy” in its Validation section.] - go-kure/launcher#1300 (whether an app.yaml may set
alertmanagerConfigFileSystemMode: AllowAll) [The reference cited it after “app.yaml may set it is open” in its Properties section.] - go-kure/launcher#883 (the generated required lists, refusing an omitted CRD-required field the Go type writes empty) [The reference cited it after “The kind’s required list is generated” in its Properties section; and after “operator’s CRD vendored for the tests” in its Validation section.]
- go-kure/launcher#1022 (the refusal that names each field when several are
below their versions) [The reference cited it after “claimed for any, as on
prometheus” in its Validation section.] - go-kure/launcher#1211 (refusing an absolute or
..subPathinvolumeMounts) [The reference cited it after “breaks a rule of a mount” in its Validation section.] - go-kure/launcher#1227 (the typed
volumeMountrules) [The reference cited it after “breaks a rule of a mount” in its Validation section.] - go-kure/launcher#1050 (the mount-path spelling rule of the monitoring kinds) [The reference cited it after “CRI-O makes only one of them” in its Validation section.]
- go-kure/launcher#959 (the Service-name check and
RelaxedServiceNameValidation) [The reference cited it after “unless
spec.featureGatessets that gate on” in its Validation section.] - go-kure/launcher#1230 (version-gated values: tolerations, the Service name
rule and
trafficDistribution) [The reference cited it after “unlessspec.featureGatessets that gate on” in its Validation section.] - go-kure/launcher#963 (
portNameagainst thecontainerspatch) [The reference cited it in its Validation section.]
- Tests:
TestMonitoringWorkloadKinds_DefaultedZerosderives the list. It reads the type, the default markers of the operator’s source, the field comments of the Kubernetes types, and the API server’s defaulting code for their strings. It then shows each field refused on a document. [“The list” is the list of fields the type cannot carry, which the reference page gives, “It” is the test, and the test is inmonitoring_workload_internal_test.go.]TestMonitoringWorkloadKinds_HostNetworkHostPortshows thehostPortrefusal. [“ThehostPortrefusal” is the refusal of ahostPortwritten as0underhostNetwork: true, which the reference page gives, and the test is inmonitoring_workload_internal_test.go.]TestAlertmanagerVersionGates_MatchVendoredSourceparses every version comparison of the operator’s packagepkg/alertmanager(every Go file of it, its tests aside; at v0.95.1 the comparisons are instatefulset.go,amcfg.goandoperator.go) and holds each to this list, or to the reason it gates no field of this kind (the configuration of a receiver, a route or a configSecret Secret); the files, with the operator’spkg/operator/defaults.goandpkg/operator/validations.go, are vendored unmodified undertestdata/upstream/prometheus-operator, with the project’s LICENSE and NOTICE and a SOURCE file naming each file’s git blob id, andmise run vendor-prometheus-operator-gates <tag>re-fetches them for the taggo.modlinks. [“This list” is the list of fields the operator reads only from some Alertmanager version on, which the reference page gives, and the test is inalertmanager_version_gates_internal_test.go.]TestAlertmanagerFeatureFlags_MatchVendoredSourceholds the names, andNewFlagsstatement by statement, tofeaturecontrol.goof each minor’s latest release, vendored unmodified undertestdata/upstream/alertmanagerwith the project’s LICENSE, each release’s NOTICE and a SOURCE file naming each file’s git blob id;mise run vendor-alertmanager-features 0.27 0.34re-fetches them. [“The names” are the feature flag names the reference page lists, and the test is inalertmanager_features_internal_test.go.]TestMonitoringWorkloadKinds_CredentialsHeldOrListedderives the fields of the operator’s types whose name suggests a credential and holds each to a stated reason it holds none. [“One” is a credential, and the test is inmonitoring_workload_internal_test.go.]
thanosruler
- History:
- go-kure/launcher#790 (the kind-named projections) [The reference cited it after “thanosruler” in its introduction.]
- go-kure/launcher#883 (the generated required lists, refusing an omitted CRD-required field the Go type writes empty) [The reference cited it in its Properties section.]
- go-kure/launcher#959 (the Service-name check and
RelaxedServiceNameValidation) [The reference cited it after “unless
spec.featureGatessets RelaxedServiceNameValidation on " in its Validation section.] - go-kure/launcher#1230 (version-gated values: tolerations, the Service name
rule and
trafficDistribution) [The reference cited it after “unlessspec.featureGatessets RelaxedServiceNameValidation on " in its Validation section.] - go-kure/launcher#1211 (refusing an absolute or
..subPathinvolumeMounts) [The reference cited it after “breaks a rule of a mount” in its Validation section.] - go-kure/launcher#1227 (the typed
volumeMountrules) [The reference cited it after “breaks a rule of a mount” in its Validation section.] - go-kure/launcher#1050 (the mount-path spelling rule of the monitoring kinds) [The reference cited it after “CRI-O makes only one of them” in its Validation section.]
- go-kure/launcher#976 (refusing a field the operator drops below the
ThanosRuler version) [The reference cited it after “where
versionis below that version” in its Validation section.] - go-kure/launcher#1022 (the refusal that names each field when several are
below their versions) [The reference cited it after “claimed for any, as on
prometheus” in its Validation section.] - go-kure/launcher#1023 (refusing a remote write
azureAdwith no authentication method) [The reference cited it after “sdkandworkloadIdentity), as onprometheus” in its Validation section.] - go-kure/launcher#1020 (refusing the remote write fields the operator drops
at every Thanos version) [The reference cited it after “
azureAd.scope, orsigv4.externalIdwith aroleArn” in its Validation section; and after “passes to Thanos at no version” in its Validation section.]
- Tests:
TestCoreKindSchemas_CoverSpecrecords it as a mapping (externalLabelsforlabels), so a second renamed field fails there until it is listed. [“It” is the rename of the spec’slabelsto theexternalLabelsproperty, which the reference page gives, “there” is that test, and the test is incore_kinds_test.go.]TestThanosRulerVersionGates_MatchVendoredSourceparses every version comparison of the operator’s packagepkg/thanos(every Go file of it, its tests aside), vendored as foralertmanager, and holds each to this list. [“This list” is the list of fields the operator reads only from some Thanos version on, which the reference page gives, “as foralertmanager” refers to the vendoring of the test of thealertmanagerentry above, and the test is inthanosruler_version_gates_internal_test.go.]TestThanosRulerRemoteWriteTexts_MatchVendoredSourceholds the list to every fieldcreateOrUpdateRulerConfigSecretignores with minimum versionnone. [“The list” is the list of remote write fields the operator drops at every Thanos version, which the reference page gives, and the test is inthanosruler_version_gates_internal_test.go.]TestMonitoringExcludedGroup_MatchesMarkersholds the written value to the default and the enum of the linked module’s source. [“The written value” ismonitoring.coreos.com, written for the group of an excluded object, and the test is inmonitoring_excluded_groups_internal_test.go.]TestMonitoringWorkloadKinds_PodFieldsHeldOrListedholds every field of the spec that shapes the pods to a refusal shown on a document or a stated reason, as foralertmanager. [“As foralertmanager” refers to the description of the test of thealertmanagerentry, which stays on the reference page, and the test is inmonitoring_workload_internal_test.go.]TestMonitoringWorkloadKinds_CredentialsHeldOrListedderives the fields whose name suggests a credential and holds each to the policy or a stated reason. [The test is inmonitoring_workload_internal_test.go.]
prometheus
- History:
- go-kure/launcher#790 (the kind-named projections) [The reference cited it after “prometheus” in its introduction.]
- go-kure/launcher#959 (the Service-name check and
RelaxedServiceNameValidation) [The reference cited it after “unless
spec.featureGatessets that gate on” in its Properties section.] - go-kure/launcher#1230 (version-gated values: tolerations, the Service name
rule and
trafficDistribution) [The reference cited it after “unlessspec.featureGatessets that gate on” in its Properties section.] - go-kure/launcher#963 (
portNameagainst thecontainerspatch) [The reference cited it in its Properties section.] - go-kure/launcher#883 (the generated required lists, refusing an omitted CRD-required field the Go type writes empty) [The reference cited it in its Properties section.]
- go-kure/launcher#1211 (refusing an absolute or
..subPathinvolumeMounts) [The reference cited it after “breaks a rule of a mount” in its Validation section.] - go-kure/launcher#1227 (the typed
volumeMountrules) [The reference cited it after “breaks a rule of a mount” in its Validation section.] - go-kure/launcher#1050 (the mount-path spelling rule of the monitoring kinds) [The reference cited it after “CRI-O makes only one of them” in its Validation section.]
- go-kure/launcher#1055 (a log file on the read-only root filesystem) [The
reference cited it after “mounts its
log-filevolume, is refused” in its Validation section; and after “filesystem, whose content is not judged” in its Validation section.] - go-kure/launcher#1051 (a log file under a
readOnlymount whose content may link to a writable volume) [The reference cited it after “file for appending (util/logging/file.go:43at v3.7.0)” in its Validation section.] - go-kure/launcher#1023 (refusing a remote write
azureAdwith no authentication method) [The reference cited it after “ofmanagedIdentity,oauth,sdkandworkloadIdentity” in its Validation section.] - go-kure/launcher#1047 (a version-gate refusal that suggests a version which drops another authored field) [The reference cited it after “only leaving the fields refused unset” in its Validation section.]
- go-kure/launcher#1022 (the refusal that names each field when several are below their versions) [The reference cited it after “the versions it is read at” in its Validation section.]
- go-kure/launcher#1018 (an Alertmanager endpoint relabeling
targetLabeloutside the label-name scheme of the Prometheus version) [The reference cited it after “it refuses the object at reconcile” in its Validation section.] - go-kure/launcher#1038 (a
labelmapreplacement outside the label-name scheme below Prometheus 3.0.0) [The reference cited it after “the object at reconcile below it” in its Validation section.] - go-kure/launcher#1019 (topology sharding below the
attach_metadataversions) [The reference cited it in its Validation section.]
- Tests:
TestMonitoringExcludedGroup_MatchesMarkersholds the written value to the module’s default and enum. [“The module” is the linked module, and the test is inmonitoring_excluded_groups_internal_test.go.]TestThanosDroppedMountFieldsholds the list to every field of the type. [“The list” is the list of fields of athanos.volumeMountsentry that the operator drops, which the reference page gives, and the test is inprometheus_internal_test.go.]TestPrometheusRelabelTargetLabels_MatchVendoredSourceholds the threshold, the actions and the lists to the operator’s source. [“The threshold” is Prometheus 3.0.0, “the actions” and “the lists” are the relabeling actions and the four lists the reference page names, and the test is inprometheus_relabel_target_label_internal_test.go.]TestPrometheusRelabelLabelmapReplacement_MatchVendoredSourceholds the pattern and the action to the operator’s source. [“The pattern” and “the action” are thelabelmapreplacement pattern and thelabelmapaction the reference page names, and the test is inprometheus_relabel_target_label_internal_test.go.]TestPrometheusVersionGates_MatchVendoredSourceparses every version comparison of the operator’s packagespkg/prometheus,pkg/prometheus/serverandpkg/prometheus/validation(every Go file, its tests aside) and holds each to these lists, or to the reason it gates no field of this kind (a field of a ServiceMonitor, PodMonitor, Probe or ScrapeConfig object, the configuration of a PrometheusAgent, a choice of how the operator spells a flag), and the two defaults to the operator’spkg/operator/defaults.go; the files are vendored as foralertmanager. [“These lists” are the lists of fields the operator reads only from some Prometheus or Thanos version on, which the reference page gives, “as foralertmanager” refers to the vendoring of the test of thealertmanagerentry above, and the test is inprometheus_version_gates_internal_test.go.]TestPrometheusTopologyNodeZone_MatchVendoredSourceholds both versions to the vendoredpromcfg.go. [“Both versions” are Prometheus 2.35.0 for a PodMonitor and 2.37.0 for a ServiceMonitor, which the reference page names, and the test is inprometheus_topology_internal_test.go.]TestMonitoringWorkloadKinds_PodFieldsHeldOrListedholds every top-level field of the spec that shapes the pods to a refusal shown on a document or a stated reason;shardsand the sidecar’s fields are not top-level pod fields of the derivation, andshards,thanos.imageandthanos.resourcesare held byTestPrometheus_ReplicasTimesShardsandTestPrometheus_PolicyRefusalsinstead. [“The derivation” is the derivation of the fields by the test of thealertmanagerentry, which the reference page describes,TestMonitoringWorkloadKinds_PodFieldsHeldOrListedis inmonitoring_workload_internal_test.go, andTestPrometheus_ReplicasTimesShardsandTestPrometheus_PolicyRefusalsare inprometheus_test.go.]TestMonitoringWorkloadKinds_CredentialsHeldOrListedderives the fields whose name suggests a credential and holds each to the policy or a stated reason. [The test is inmonitoring_workload_internal_test.go.]
servicemonitor, podmonitor, prometheus-probe, prometheusrule
- History:
- go-kure/launcher#790 (the kind-named projections) [The reference cited it after “servicemonitor, podmonitor, prometheus-probe, prometheusrule” in its introduction.]
- go-kure/launcher#922 (the object kind policy,
oam.ObjectKindPolicy) [The reference cited it after “build through the object kind policy” in its Validation section.] - go-kure/launcher#883 (the generated required lists, refusing an omitted CRD-required field the Go type writes empty) [The reference cited it after “These lists are generated” in its Properties section.]
- Tests:
TestMonitoringKinds_DefaultedZerosholds each kind’s list of such fields to the numbers, booleans and strings that are omitted when zero and defaulted to something else, from the default markers of the linked module’s source. [“Such fields” are the fields the type omits when zero and the API defaults to something else, which the reference page names, and the test is inmonitoring_kinds_internal_test.go.]TestKindComponents_OmittedRequiredAndWrittenDefaultsderives these fields for every kind in its table, from the CRD the linked module ships or, where it ships none, from the markers of its source. It holds each to a refusal, shown on a document, or to a stated reason. The same test derives the fields the API defaults and the type writes unauthored, where the default would never apply, and holds each to one of three answers: refused, filled by the kind with the API’s default, or harmless with the reason. [“These fields” are the required fields the type leaves out when empty, which the reference page names, “its table” is the table of kind components in that test, and the test is inkind_api_sets_internal_test.go.]- The table holds the kind components that decode their properties into an
upstream type, but for two groups. The
httproutekind is not in it: the experimental-channel CRD requires theprotocolof anexternalAuthfilter, of a rule and of a backend reference, the type leaves an empty one out, and the kind does not refuse it. The Flux kinds (helmrelease,fluxcd-kustomization,helmrepository,ocirepository,gitrepository,bucket,helmchart) are not in it either: no row is written for them. [“The table” is the table of kind components in the test of the previous entry.] TestKindComponents_GeneratedRequiredBothWaysholds each field both ways on the kind, and runs a path of every type that holds one through the operator’s CRD, vendored from its repository at the linked release (the module ships none). [“Each field” is a field the generated lists in the reference name, and the test is inkind_required_internal_test.go.]