Repository navigation
oneks_monitor_observations
See OneKS Monitor Overview for an introduction to the component.
Resource observations allow selected Kubernetes fields to be displayed in OneKS. The monitor also reports Pending Pods automatically; no configuration is required for those observations.
Custom observations are defined in the monitor.yaml entry of the
oneks-resource-monitor ConfigMap. By default, the ConfigMap is located in the
kube-system namespace.
apiVersion: v1
kind: ConfigMap
metadata:
name: oneks-resource-monitor
namespace: kube-system
data:
monitor.yaml: |
- apiVersion: apps/v1
resource: deployments
namespace: capone-system
name: capone-controller-manager
path: status.readyReplicasApply the document with kubectl:
kubectl apply -f oneks-resource-monitor.yamlThe monitor reloads the configuration automatically during its next resource poll.
Each entry supports the following fields:
| Field | Required | Description |
|---|---|---|
apiVersion |
Yes | Kubernetes API version, for example apps/v1. |
resource |
Yes | Plural API resource name, for example deployments. |
namespace |
No | Resource namespace. Leave empty for a cluster-scoped resource. |
name |
Yes | Name of the Kubernetes resource. |
path |
Yes | Dot-separated path to the field to observe. |
The selected value must be one of these scalar types:
- String.
- Integer or floating-point number.
- Boolean.
-
null.
Objects and arrays cannot be reported as observation values.
If the configured Kubernetes object or field does not exist, the monitor
reports a null value. The creation timestamp is also reported when the object
exists.
- apiVersion: apps/v1
resource: deployments
namespace: capone-system
name: capone-controller-manager
path: status.readyReplicasThe namespace is empty because Nodes are cluster-scoped:
- apiVersion: v1
resource: nodes
namespace: ""
name: worker-0
path: spec.unschedulableUse the resource's API version and plural API name, not its kind:
- apiVersion: example.com/v1
resource: services
namespace: default
name: example-service
path: status.readyapiVersion: v1
kind: ConfigMap
metadata:
name: oneks-resource-monitor
namespace: kube-system
data:
monitor.yaml: |
- apiVersion: apps/v1
resource: deployments
namespace: capone-system
name: capone-controller-manager
path: status.readyReplicas
- apiVersion: v1
resource: nodes
namespace: ""
name: worker-0
path: spec.unschedulableInspect the active ConfigMap:
kubectl -n kube-system get configmap oneks-resource-monitor -o yamlReview the monitor logs after changing it:
kubectl -n kube-system logs deployment/oneks-monitorIf a new document is invalid, the monitor logs the error and keeps using the last valid configuration. It does not publish a partial snapshot when one of the configured resources cannot be read.
The monitor has read-only Kubernetes permissions. The requested resource must
be readable by the oneks-monitor ServiceAccount.
If an observation for a custom resource fails with a permission error, grant
only the required get, list, and watch permissions. Do not grant write
permissions or access to Secrets merely to create an observation.
- CAPONE Overview
- Installation and Requirements
- Cluster Management
- LoadBalancer Services
- Troubleshooting and Logs
- Developer Information
- References