Namespaced guest install¶
Two additive overlays on chart defaults. Host and guest are the same monitoring-operator product.
| File | Release | What it changes |
|---|---|---|
| host-values.yaml | Host (privileged) | Host VM Operator and Grafana Operator watch an explicit namespace list. The list omits the guest and OpenShift platform-monitoring namespaces. |
| values.yaml | Guest | namespaceScope: true, unique etcd RBAC/SCC names, and nodeExporter.port: 9901 |
Guest controllers that manage custom resources stay in the release namespace. The host operators watch only the namespaces named in the host allow-list. Guest workloads may still discover host resources when those workloads keep the chart-default selectors.
Contract¶
| Side | Control | Effect |
|---|---|---|
| Guest Helm | global.namespaceScope: true |
Guest VM Operator and Grafana Operator WATCH_NAMESPACE is .Release.Namespace |
| Guest Helm | etcdCertsJob.rbac.*Name |
Unique ClusterRole, ClusterRoleBinding, and OpenShift SCC names |
| Core operator | Pod-derived WATCH_NAMESPACE |
Already namespaced |
| Host Helm | victoriametrics.vmOperator.extraEnvs WATCH_NAMESPACE |
Namespaces the host VM Operator watches. v0.73.1 selects VM inputs from every name on this list |
| Host Helm | grafana.operator.watchNamespaces |
The same list for the privileged host Grafana Operator |
| Host Helm | grafanaConverter.watchNamespaces |
The same list for the host Grafana converter |
| Guest Helm | global.namespaceScope: true |
Guest Grafana converter watches only .Release.Namespace |
| Guest Helm | --skip-crds |
Host owns shared CRDs |
Leader election stays at the default false. The example allow-list is
monitoring. Replace it with the namespaces that host release must manage.
The install below uses monitoring-test as the guest namespace. Omit the
guest namespace you create.
Host namespace allow-list¶
The host release stays privileged. Set one comma-separated list, with no spaces, in both of these values:
victoriametrics.vmOperator.extraEnvs, nameWATCH_NAMESPACEgrafana.operator.watchNamespacesgrafanaConverter.watchNamespaces
You own the list. Name each namespace the host operators watch. The chart
does not turn the list into every namespace except the guest. Omit the guest
namespace and every namespace labeled openshift.io/cluster-monitoring=true,
including openshift-monitoring. When a namespace is added or removed, edit
the list and upgrade the host release. The host VM and Grafana operators keep
their ClusterRoles and get no Role or RoleBinding in the listed namespaces. The
Grafana converter is the exception: it gets a Role and RoleBinding in each
listed namespace instead of a ClusterRole.
The example list is monitoring, the host namespace in the install commands
below.
VictoriaMetrics Operator v0.73.1 selects these objects from every namespace on
WATCH_NAMESPACE:
VMPodScrape,VMServiceScrape,VMProbe,VMNodeScrape, andVMStaticScrapefor VMAgentVMRulefor VMAlertVMAlertmanagerConfigfor VMAlertmanager
Workload namespace selectors do not narrow that list. The chart default
selectors that exclude openshift.io/cluster-monitoring=true apply when
WATCH_NAMESPACE is empty. The host example leaves those selectors in place.
Leave WATCH_NAMESPACE empty and the host VictoriaMetrics Operator watches
every namespace, including the guest. It then reconciles guest VMAgent,
VMAlert, VMAlertmanager, and other VM custom resources, and it selects
guest scrape, rule, and alert-routing inputs. Its service account can read
guest VM custom resources, Secrets, and ConfigMaps, and it cannot create or
update Deployments and StatefulSets in the guest namespace. Those writes
fail, and the denials stay in the host operator logs until the guest release
is uninstalled. Put the guest namespace outside the allow-list so the host
operator does not watch it.
Shared CRDs¶
CRDs are cluster-wide APIs owned by the host. The guest always uses
--skip-crds. Small host/guest content differences are acceptable. A
material CRD or compatibility conflict is handled manually when it arises.
Install¶
kubectl create namespace monitoring-test
helm upgrade --install monitoring-operator charts/qubership-monitoring-operator \
--namespace monitoring \
--skip-crds \
--values docs/examples/deploy-parameters/namespaced-guest/host-values.yaml
helm install monitoring-operator-guest charts/qubership-monitoring-operator \
--namespace monitoring-test \
--skip-crds \
--values docs/examples/deploy-parameters/namespaced-guest/values.yaml
| Setting | File | Why |
|---|---|---|
WATCH_NAMESPACE, grafana.operator.watchNamespaces, and grafanaConverter.watchNamespaces |
host | Host operators and the converter watch the deployment-owned namespace list and omit the guest and OpenShift platform-monitoring namespaces |
global.namespaceScope: true |
guest | Guest VM operator, Grafana operator, and Grafana converter watch only the release namespace |
etcdCertsJob.rbac.*Name |
guest | Avoid collisions with the host etcd certificate ClusterRole, ClusterRoleBinding, and OpenShift SCC |
nodeExporter.port: 9901 |
guest | Avoid hostPort 9900 collision with the host node-exporter |