API Reference

Complete API reference for gNMIc Operator CRDs

Cluster

API Version: operator.gnmic.dev/v1alpha1

ClusterSpec

FieldTypeRequiredDefaultDescription
replicasint32Yes-Number of gNMIc pods
imagestringYes-Container image
apiAPISpecYes-API configuration
grpcTunnelGRPCTunnelConfigNo-gRPC tunnel server configuration
resourcesResourceRequirementsNo-Pod resources
env[]EnvVarNo-Environment variables

APISpec

FieldTypeRequiredDefaultDescription
restPortint32Yes-REST API port
gnmiPortint32No-gNMI server port
tlsClusterTLSConfigNo-TLS configuration

ClusterTLSConfig

FieldTypeRequiredDefaultDescription
issuerRefstringNo-cert-manager Issuer name for certificates
useCSIDriverboolNofalseUse cert-manager CSI driver instead of projected volumes
bundleRefstringNo-Additional CA bundle for client certificate verification

GRPCTunnelConfig

FieldTypeRequiredDefaultDescription
portint32Yes-Port for the gRPC tunnel server
tlsClusterTLSConfigNo-TLS configuration for the tunnel
serviceServiceConfigNo-Kubernetes service configuration

ServiceConfig

FieldTypeRequiredDefaultDescription
typeServiceTypeNoLoadBalancerKubernetes service type (ClusterIP, NodePort, LoadBalancer)
annotationsmap[string]stringNo-Annotations to add to the service

ClusterStatus

FieldTypeDescription
readyReplicasint32Number of ready replicas
pipelinesCountint32Number of enabled pipelines referencing this cluster
targetsCountint32Total unique targets across all pipelines
subscriptionsCountint32Total unique subscriptions across all pipelines
inputsCountint32Total unique inputs across all pipelines
outputsCountint32Total unique outputs across all pipelines
conditions[]ConditionStandard Kubernetes conditions

Cluster Conditions

TypeDescription
ReadyAll replicas are ready and configured
CertificatesReadyTLS certificates are issued (when TLS enabled)
ConfigAppliedConfiguration successfully applied to pods

Pipeline

API Version: operator.gnmic.dev/v1alpha1

PipelineSpec

FieldTypeRequiredDefaultDescription
clusterRefstringYes-Reference to Cluster
enabledboolYes-Whether pipeline is active
targetRefs[]stringNo-Direct target references
targetSelectors[]LabelSelectorNo-Target label selectors
tunnelTargetPolicyRefs[]stringNo-Direct tunnel target policy references
tunnelTargetPolicySelectors[]LabelSelectorNo-Tunnel target policy label selectors
subscriptionRefs[]stringNo-Direct subscription references
subscriptionSelectors[]LabelSelectorNo-Subscription label selectors
outputsOutputSelectorNo-Output selection
inputsInputSelectorNo-Input selection

OutputSelector

FieldTypeRequiredDescription
outputRefs[]stringNoDirect output references
outputSelectors[]LabelSelectorNoOutput label selectors
processorRefs[]stringNoDirect processor references (order preserved)
processorSelectors[]LabelSelectorNoProcessor label selectors (sorted by name)

InputSelector

FieldTypeRequiredDescription
inputRefs[]stringNoDirect input references
inputSelectors[]LabelSelectorNoInput label selectors
processorRefs[]stringNoDirect processor references (order preserved)
processorSelectors[]LabelSelectorNoProcessor label selectors (sorted by name)

PipelineStatus

FieldTypeDescription
statusstringPipeline status (Active, Incomplete, Error)
targetsCountint32Number of resolved static targets
tunnelTargetPoliciesCountint32Number of resolved tunnel target policies
subscriptionsCountint32Number of resolved subscriptions
inputsCountint32Number of resolved inputs
outputsCountint32Number of resolved outputs
conditions[]ConditionStandard Kubernetes conditions

Pipeline Conditions

TypeDescription
ReadyPipeline has required resources (targets+subscriptions OR inputs) AND outputs
ResourcesResolvedAll referenced resources were successfully resolved

Target

API Version: operator.gnmic.dev/v1alpha1

TargetSpec

FieldTypeRequiredDefaultDescription
addressstringYes-Device address (host:port)
profilestringYes-Reference to TargetProfile

TargetSource

API Version: operator.gnmic.dev/v1alpha1

TargetSourceSpec

FieldTypeRequiredDefaultDescription
providerProviderSpecYes-Provider-specific discovery configuration
targetPortint32No-Default port used when the discovered target does not provide a port
targetProfilestringYes-Reference to TargetProfile applied to discovered targets
targetLabelsmap[string]stringNo-Labels added to all discovered targets

ProviderSpec

FieldTypeRequiredDescription
httpHTTPConfigNoHTTP provider configuration

HTTPConfig

FieldTypeRequiredDefaultDescription
urlstringNo-HTTP endpoint used to pull targets. Required unless push is enabled
methodstringNoGETHTTP request method
headersmap[string]stringNo-HTTP headers to include in requests
bodystringNo-Request body for POST requests
authorizationAuthorizationSpecNo-Authentication configuration for the HTTP endpoint
intervaldurationNo6hPolling interval used to refresh targets
timeoutdurationNo10sTimeout for HTTP requests
tlsClientTLSConfigNo-Client TLS configuration for HTTPS endpoints
paginationPaginationSpecNo-Pagination settings for parsing responses
mappingResponseMappingSpecNo-Response mapping configuration for JSON responses
pushPushSpecNo-Push-based update configuration

ClientTLSConfig

FieldTypeRequiredDefaultDescription
insecureSkipVerifyboolNofalseSkip verification of the server certificate
caBundleRefConfigMapKeySelectorNo-Reference to a ConfigMap containing a PEM CA bundle

AuthorizationSpec

FieldTypeRequiredDescription
basicBasicAuthSpecNoBasic authentication configuration
tokenTokenAuthSpecNoToken authentication configuration

BasicAuthSpec

FieldTypeRequiredDescription
credentialsSecretRefSecretKeySelectorYesReference to a Secret containing username/password keys

TokenAuthSpec

FieldTypeRequiredDescription
schemestringYesToken scheme, e.g. Bearer
tokenSecretRefSecretKeySelectorYesReference to a Secret containing the token

PaginationSpec

FieldTypeRequiredDescription
nextFieldstringNoJSON field containing the next page reference or pagination token

ResponseMappingSpec

FieldTypeRequiredDescription
targetsFieldstringNoCEL expression selecting the list of targets from the response
namestringNoCEL expression for the target name
addressstringNoCEL expression for the target address
portstringNoCEL expression for the target port
labelsstringNoCEL expression returning a map of labels
targetProfilestringNoCEL expression for the target profile

PushSpec

FieldTypeRequiredDescription
enabledboolNoEnable push updates
authPushAuthSpecNoPush authentication configuration

PushAuthSpec

FieldTypeRequiredDescription
bearerPushBearerAuthSpecNoBearer token authentication configuration
signaturePushSignatureAuthSpecNoSignature authentication configuration

PushBearerAuthSpec

FieldTypeRequiredDescription
tokenSecretRefSecretKeySelectorYesReference to a Secret containing the bearer token

PushSignatureAuthSpec

FieldTypeRequiredDescription
secretRefSecretKeySelectorYesReference to a Secret used to verify request signatures
headerstringYesHeader containing the signature
algorithmstringNoSignature algorithm

TargetSourceStatus

FieldTypeDescription
statusstringSync status (Synced, Error, Pending)
observedGenerationint64Observed generation of the spec
targetsCountint32Number of discovered targets
lastSyncTimeLast successful sync timestamp

TargetProfile

API Version: operator.gnmic.dev/v1alpha1

TargetProfileSpec

FieldTypeRequiredDefaultDescription
credentialsRefstringNo-Reference to credentials Secret
insecureboolNofalseSkip TLS
skipVerifyboolNofalseSkip certificate verification
timeoutdurationNo-Connection timeout
tlsCAstringNo-TLS CA certificate
tlsCertstringNo-TLS client certificate
tlsKeystringNo-TLS client key

Subscription

API Version: operator.gnmic.dev/v1alpha1

SubscriptionSpec

FieldTypeRequiredDefaultDescription
paths[]stringYes-YANG paths to subscribe
modestringNoSTREAM/SAMPLESubscription mode (combining mode and streamMode)
sampleIntervaldurationNo-Sample interval
encodingstringNo-Data encoding
prefixstringNo-Path prefix

Subscription Modes

ModeDescription
streamContinuous streaming
onceSingle request/response
pollClient-initiated polling

Stream Modes

ModeDescription
samplePeriodic sampling
on-changeValue change triggered
target-definedDevice determines

Output

API Version: operator.gnmic.dev/v1alpha1

OutputSpec

FieldTypeRequiredDefaultDescription
typestringYes-Output type
configJSONNo-Type-specific config
serviceOutputServiceSpecNo-K8s Service config (Prometheus only)
serviceRefServiceReferenceNo-Reference to a K8s Service for address resolution
serviceSelectorServiceSelectorNo-Label selector to discover K8s Services

OutputServiceSpec

FieldTypeRequiredDefaultDescription
typeServiceTypeNoClusterIPService type
annotationsmap[string]stringNo-Service annotations
labelsmap[string]stringNo-Service labels

ServiceReference

Used to reference a specific Kubernetes Service for address resolution.

FieldTypeRequiredDefaultDescription
namestringYes-Name of the Service
namespacestringNoOutput’s namespaceNamespace of the Service
portstringNoFirst portPort name or number
urlstringNo-Path suffix appended after the resolved scheme://host:port (optional leading slash). Used for HTTP(S) outputs such as prometheus_write or influxdb (for example api/v1/write).

ServiceSelector

Used to discover Kubernetes Services by labels.

FieldTypeRequiredDefaultDescription
matchLabelsmap[string]stringYes-Labels to match services
namespacestringNoOutput’s namespaceNamespace to search
portstringNoFirst portPort name or number
urlstringNo-Path suffix appended after each resolved address; same meaning as serviceRef.url.

Output Types

TypeDescriptionSupports serviceRef
prometheusPrometheus metrics endpointNo
prometheus_writePrometheus Remote WriteYes
kafkaApache KafkaYes
influxdbInfluxDBYes
natsNATS messagingYes
jetstreamNATS JetStreamYes
fileFile outputNo
tcpTCP socketNo
udpUDP socketNo

Input

API Version: operator.gnmic.dev/v1alpha1

InputSpec

FieldTypeRequiredDefaultDescription
typestringYes-Input type
configJSONYes-Type-specific config

Input Types

TypeDescription
kafkaApache Kafka consumer
natsNATS subscriber
stanNATS Streaming subscriber

Processor

API Version: operator.gnmic.dev/v1alpha1

Processors transform telemetry data as it flows through gNMIc. They are attached to outputs or inputs via the Pipeline resource.

ProcessorSpec

FieldTypeRequiredDefaultDescription
typestringYes-Processor type
configJSONYes-Type-specific config

Processor Types

TypeDescription
event-add-tagAdd static tags to events
event-dropDrop events matching conditions
event-stringsTransform string values
event-convertConvert value types
event-extract-tagsExtract tags from values
event-triggerExecute actions on events
event-writeWrite events to outputs
event-deleteDelete values from events
event-mergeMerge multiple events
event-to-tagConvert values to tags

Processor Ordering

When processors are attached to an output or input via a Pipeline:

  1. processorRefs: Applied first, in exact order specified (duplicates allowed)
  2. processorSelectors: Applied after refs, sorted by name, deduplicated

Example:

processorRefs: [proc-c, proc-a, proc-c]  # Order: c, a, c
processorSelectors:
  - matchLabels:
      auto: "true"  # Matches: proc-b, proc-d
                    # Sorted: b, d (a and c skipped if in refs)
# Final order: [proc-c, proc-a, proc-c, proc-b, proc-d]

TunnelTargetPolicy

API Version: operator.gnmic.dev/v1alpha1

Defines matching rules for devices connecting via gRPC tunnel and associates them with a TargetProfile.

TunnelTargetPolicySpec

FieldTypeRequiredDefaultDescription
matchTunnelTargetMatchNo-Match criteria (if not set, matches all targets)
profilestringYes-Reference to a TargetProfile

TunnelTargetMatch

FieldTypeRequiredDescription
typestringNoRegex pattern to match target type
idstringNoRegex pattern to match target ID

Example

apiVersion: operator.gnmic.dev/v1alpha1
kind: TunnelTargetPolicy
metadata:
  name: core-routers
  labels:
    tier: core
spec:
  match:
    type: "router"
    id: "^core-.*"
  profile: router-profile

Common Types

LabelSelector

Standard Kubernetes label selector:

matchLabels:
  key: value
matchExpressions:
  - key: tier
    operator: In
    values: [frontend, backend]

ResourceRequirements

Standard Kubernetes resource requirements:

requests:
  memory: "128Mi"
  cpu: "100m"
limits:
  memory: "256Mi"
  cpu: "500m"

EnvVar

Standard Kubernetes environment variable:

- name: VAR_NAME
  value: "value"
- name: SECRET_VAR
  valueFrom:
    secretKeyRef:
      name: secret-name
      key: secret-key