observek8sattributesprocessor

package module
v0.0.0-...-855cf02 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 23, 2025 License: Apache-2.0 Imports: 23 Imported by: 1

README

Observe K8s Attributes Processor

This processor operates on K8s resource logs from the k8sobjectsreceiver and adds additional attributes.

Purpose

This is a specialized processor component that enriches Kubernetes resource logs with additional attributes. The processor essentially takes raw Kubernetes events and adds computed, normalized attributes that make the data more useful for observability purposes.

The processor is designed to be part of a larger observability pipeline, enhancing Kubernetes resource logs with additional context and derived attributes that make the logs more useful for monitoring and debugging purposes.

This processor plays a crucial role in enriching Kubernetes observability data by adding computed attributes and status information that might not be directly available from the raw Kubernetes API responses.

Technical Rationale

This processor shares much of its logic with kubectl, the official Kubernetes command-line tool. When you run kubectl describe <resource>, kubectl transforms raw Kubernetes API data into human-readable information. Our processor uses the same transformation logic to generate its facets. This means most of the attributes you see in Observe's explorer are computed using the same battle-tested code that powers kubectl, ensuring consistency and reliability in how Kubernetes resource states are interpreted and displayed.

Another key reason to create a dedicated processor is to compute attributes that cannot be computed with OTTL (the transformation language used by the Opentelemetry’s transform processor). One of the main limitations of that language is that it cannot iterate over lists/maps. With the custom processor we can access those elements in Go as structured objects, and leverage the power of the programming language to be able to access and manipulate data contained in such objects.

Beyond adding facets, the processor performs another critical function: automatic secret redaction. While preserving the raw event structure and secret names, the processor replaces any secret values with "REDACTED" before ingestion. This security feature protects customers from accidentally exposing sensitive information, even if their Kubernetes clusters inadvertently leak secrets in their events. By performing redaction at the processor level, we ensure that secret values never reach our storage system.

Caveats

[!CAUTION] This processor currently expects the kind field to be set at the base level of the event. In the case of watch events from the k8sobjectsreceiver, this field is instead present inside of the object field. This processor currently expects this field to be lifted from inside the object field to the base level by a transform processor earlier in the pipeline. If that isn't set up, this processor will only calculate status for pull events from the k8sobjectsreceiver.

Description

  1. Main Purpose:
    • Processes logs from the k8sobjectsreceiver (a Kubernetes objects receiver)
    • Adds additional attributes and metadata to various Kubernetes resource types
    • Calculates and derives status information for different Kubernetes objects
  2. Supported Kubernetes Resources: The processor handles multiple Kubernetes resource types including:
    • Core Resources: Pods, Nodes, Services, ServiceAccounts, Endpoints, ConfigMaps, Secrets
    • Apps: StatefulSets, DaemonSets, Deployments
    • Workloads: Jobs, CronJobs
    • Storage: PersistentVolumes, PersistentVolumeClaims
    • Network: Ingress
  3. Key Features:
    • Calculates derived status information for various resources
    • Adds metadata and attributes based on resource type
    • Processes both "watch" and "pull" events from the Kubernetes API
    • Handles resource body transformations and attribute enrichment
  4. Specific Actions Per Resource: Each resource type has its own set of actions that add specific attributes:
    • Pods: Status, container counts, readiness state, and conditions
    • Nodes: Status, roles, and node pool information
    • Services: Load balancer ingress, selectors, ports, and external IPs
    • Jobs: Status and duration calculations
    • And many more resource-specific attributes
  5. Important Note: There's a caveat that the processor expects the kind field to be at the base level of the event. For watch events, this field needs to be lifted from the object field to the base level by a transform processor earlier in the pipeline.

Example

Input Example (Kubernetes Pod Event):

{
   "apiVersion": "v1",
   "kind": "Pod",
   "metadata": {      "name": "purge-old-datasets-28688813-sspnn",
      "namespace": "eng",
      "labels": {
         "observeinc.com/app": "apiserver",
         "observeinc.com/environment": "eng"
      }
   },
   "status": {
      "containerStatuses": [
         {
            "ready": true,
            "restartCount": 2,
            "state": {"running": {...}}
         },
         {
            "ready": true,
            "restartCount": 3,
            "state": {"running": {...}}
         },
         {
            "ready": false,
            "restartCount": 0,
            "state": {"waiting": {...}}
         }
      ],
      "conditions": [
         // Various pod conditions...
      ]
   }
}

Output (Added OTEL Attributes):

{
   // Original event data remains unchanged, but new attributes are added:
   "attributes": {
      "observe_transform": {
         "facets": {
            // Derived status based on pod conditions and state
            "status": "Terminating",

            // Container statistics
            "total_containers": 4,
            "ready_containers": 3,
            "restarts": 5,

            // Pod conditions as a map
            "conditions": {
               "PodScheduled": true,
               "Initialized": true,
               "Ready": false,
               "ContainersReady": false,
               "PodHasNetwork": true
            },

            // If pod has readiness gates
            "readinessGatesReady": 1,
            "readinessGatesTotal": 2
         }
      }
   }
}

Implementation Details

The processor enriches the original Kubernetes event by:

  1. Computing Status: It analyzes the pod's conditions, container states, and metadata to determine a high-level status (e.g., "Terminating")
  2. Container Statistics: It calculates:
    • Total number of containers of a Pod
    • Number of ready containers of a Pod
    • Total restart count across all containers of a Pod
  3. Condition Analysis: It transforms the pod's conditions into an easily queryable map
  4. Readiness Information: If the pod has readiness gates, it computes how many are ready vs total

Similar transformations happen for other Kubernetes resources. For example:

  • For Services: It adds load balancer status, external IPs, and port information
  • For Nodes: It adds derived roles, pool information, and overall status
  • For Jobs: It adds duration and completion status
  • For Ingress: It adds routing and backend service information

These enriched attributes make it much easier to:

  1. Query and filter Kubernetes resources based on their state
  2. Create meaningful visualizations and dashboards
  3. Set up monitoring and alerting based on derived states
  4. Analyze the health and status of your Kubernetes resources

Added Attributes

The processor adds a list of attributes under the observe_transform.facets namespace. The processor computes these attributes based on the raw Kubernetes resource state and adds them to make querying and monitoring easier. Note that some attributes might be conditionally present based on the resource state. For example, load balancer information will only be present for Services of type LoadBalancer, and certain status attributes will only appear when specific conditions are met.

Pod Attributes
  • observe_transform.facets.status - Overall pod status
  • observe_transform.facets.total_containers - Total number of containers
  • observe_transform.facets.ready_containers - Number of ready containers
  • observe_transform.facets.restarts - Total restart count
  • observe_transform.facets.readinessGatesReady - Number of ready readiness gates
  • observe_transform.facets.readinessGatesTotal - Total number of readiness gates
  • observe_transform.facets.conditions - Map of pod conditions
  • observe_transform.facets.cronjob_name - Name of parent CronJob if applicable
  • observe_transform.facets.statefulset_name - Name of parent StatefulSet if applicable
  • observe_transform.facets.daemonset_name - Name of parent DaemonSet if applicable
Node Attributes
  • observe_transform.facets.status - Node status
  • observe_transform.facets.roles - Node roles (e.g., master, worker)
  • observe_transform.facets.pool - Node pool information (for managed K8s services)
Service Attributes
  • observe_transform.facets.loadBalancerIngress - Load balancer ingress information
  • observe_transform.facets.selector - Service selector labels
  • observe_transform.facets.ports - Service ports configuration
  • observe_transform.facets.externalIPs - External IPs assigned to the service
Job Attributes
  • observe_transform.facets.status - Job status
  • observe_transform.facets.duration - Job duration
ServiceAccount Attributes
  • observe_transform.facets.secrets - Associated secrets
  • observe_transform.facets.secretsNames - Names of associated secrets
  • observe_transform.facets.imagePullSecrets - Image pull secrets
Endpoints Attributes
  • observe_transform.facets.endpoints - List of endpoints
ConfigMap Attributes
  • observe_transform.facets.data - ConfigMap data
StatefulSet Attributes
  • observe_transform.facets.selector - StatefulSet selector labels
Deployment Attributes
  • observe_transform.facets.selector - Deployment selector labels
Ingress Attributes
  • observe_transform.facets.loadBalancer - Load balancer information
PersistentVolume and PersistentVolumeClaim Attributes
  • Various storage-related attributes (specific attributes depend on the storage provider)

Documentation

Overview

package observek8sattributesprocessor implements a processor which calculates and attaches additional k8s attributes

Index

Constants

View Source
const (
	IngressRulesAttributeKey        = "rules"
	IngressLoadBalancerAttributeKey = "loadBalancer"
)
View Source
const (
	JobStatusAttributeKey   = "status"
	JobDurationAttributeKey = "duration"
)
View Source
const (
	NodeStatusAttributeKey = "status"

	NodePoolAttributeKey = "nodePool"

	NodeRolesAttributeKey = "roles"
)
View Source
const (
	PodStatusAttributeKey = "status"

	PodContainerRestartsAttributeKey = "restarts"
	PodTotalContainersAttributeKey   = "total_containers"
	PodReadyContainersAttributeKey   = "ready_containers"

	PodReadinessGatesReadyAttributeKey = "readinessGatesReady"
	PodReadinessGatesTotalAttributeKey = "readinessGatesTotal"

	PodConditionsAttributeKey = "conditions"

	PodCronJobNameAttributeKey = "cronJobName"
	OwnerKindCronJob           = "CronJob"

	PodJobNameAttributeKey = "jobName"
	OwnerKindJob           = "Job"

	PodDaemonSetNameAttributeKey = "daemonSetName"
	OwnerKindDaemonSet           = "DaemonSet"

	PodStatefulSetNameAttributeKey = "statefulSetName"
	OwnerKindStatefulSet           = "StatefulSet"
)
View Source
const (
	// CORE
	EventKindPod            = "Pod"
	EventKindNode           = "Node"
	EventKindService        = "Service"
	EventKindServiceAccount = "ServiceAccount"
	EventKindEndpoints      = "Endpoints"
	EventKindConfigMap      = "ConfigMap"
	EventKindSecret         = "Secret"
	// APPS
	EventKindStatefulSet = "StatefulSet"
	EventKindDaemonSet   = "DaemonSet"
	EventKindDeployment  = "Deployment"
	// WORKLOAD
	EventKindJob     = "Job"
	EventKindCronJob = "CronJob"
	// STORAGE
	EventKindPersistentVolume      = "PersistentVolume"
	EventKindPersistentVolumeClaim = "PersistentVolumeClaim"
	// NETWORK
	EventKindIngress = "Ingress"
)
View Source
const (
	ServiceAccountSecretsNamesAttributeKey     = "secretsNames"
	ServiceAccountSecretsAttributeKey          = "secrets"
	ServiceAccountImagePullSecretsAttributeKey = "imagePullSecrets"
)
View Source
const (
	ServiceLBIngressAttributeKey   = "loadBalancerIngress"
	ServiceExternalIPsAttributeKey = "externalIPs"
	ServicePortsAttributeKey       = "ports"
)
View Source
const (
	ConfigMapDataAttributeKey = "data"
)
View Source
const (
	CronJobActiveKey = "activeJobs"
)
View Source
const (
	DaemonSetSelectorAttributeKey = "selector"
)
View Source
const (
	DeploymentSelectorAttributeKey = "selector"
)
View Source
const (
	EnpdointsAttributeKey = "endpoints"
)
View Source
const (
	PersistentVolumeClaimSelectorAttributeKey = "selector"
)
View Source
const (
	PersistentVolumeTypeAttributeKey = "volumeType"
)
View Source
const (
	RedactedSecretValue = "REDACTED"
)
View Source
const (
	StatefulsetSelectorAttributeKey = "selector"
)

Variables

This section is empty.

Functions

func FormatLabels

func FormatLabels(labelMap map[string]string) string

FormatLabels converts label map into plain string

func NewFactory

func NewFactory() processor.Factory

Types

type Config

type Config struct {
}

func (*Config) Validate

func (cfg *Config) Validate() error

type ConfigMapDataAction

type ConfigMapDataAction struct{}

func NewConfigMapDataAction

func NewConfigMapDataAction() ConfigMapDataAction

func (ConfigMapDataAction) ComputeAttributes

func (ConfigMapDataAction) ComputeAttributes(configMap corev1.ConfigMap) (attributes, error)

Generates the ConfigMap "data" facet, calculated as the total number of entries in data and binaryData

type CronJobActiveAction

type CronJobActiveAction struct{}

func NewCronJobActiveAction

func NewCronJobActiveAction() CronJobActiveAction

func (CronJobActiveAction) ComputeAttributes

func (CronJobActiveAction) ComputeAttributes(cronJob batch.CronJob) (attributes, error)

Generates the CronJob "active" facet. This is essentially just the length of a slice. However, since the slice's inner type is not of the accepted ValueTypes for OTTL's Len() function, computing this requires a custom processor

type DaemonSetSelectorAction

type DaemonSetSelectorAction struct{}

func NewDaemonSetSelectorAction

func NewDaemonSetSelectorAction() DaemonSetSelectorAction

func (DaemonSetSelectorAction) ComputeAttributes

func (DaemonSetSelectorAction) ComputeAttributes(daemonset appsv1.DaemonSet) (attributes, error)

Generates the DaemonSet "selector" facet.

type DeploymentSelectorAction

type DeploymentSelectorAction struct{}

func NewDeploymentSelectorAction

func NewDeploymentSelectorAction() DeploymentSelectorAction

func (DeploymentSelectorAction) ComputeAttributes

func (DeploymentSelectorAction) ComputeAttributes(deployment appsv1.Deployment) (attributes, error)

Generates the Deployment "selector" facet.

type EndpointsStatusAction

type EndpointsStatusAction struct{}

func NewEndpointsStatusAction

func NewEndpointsStatusAction() EndpointsStatusAction

func (EndpointsStatusAction) ComputeAttributes

func (EndpointsStatusAction) ComputeAttributes(endpoints corev1.Endpoints) (attributes, error)

Generates the Endpoints "endpoints" facet, which is a list of all individual endpoints, encoded as strings

type IngressLoadBalancerAction

type IngressLoadBalancerAction struct{}

func NewIngressLoadBalancerAction

func NewIngressLoadBalancerAction() IngressLoadBalancerAction

func (IngressLoadBalancerAction) ComputeAttributes

func (IngressLoadBalancerAction) ComputeAttributes(ingress netv1.Ingress) (attributes, error)

Generates the Ingress "loadBalancer" facet.

type IngressRulesAction

type IngressRulesAction struct{}

func NewIngressRulesAction

func NewIngressRulesAction() IngressRulesAction

func (IngressRulesAction) ComputeAttributes

func (IngressRulesAction) ComputeAttributes(ingress netv1.Ingress) (attributes, error)

Generates the Ingress "rules" facet.

type JobDurationAction

type JobDurationAction struct{}

func NewJobDurationAction

func NewJobDurationAction() JobDurationAction

func (JobDurationAction) ComputeAttributes

func (JobDurationAction) ComputeAttributes(job batch.Job) (attributes, error)

Generates the Job "duration" facet. Same logic as kubectl printer

type JobStatusAction

type JobStatusAction struct{}

func NewJobStatusAction

func NewJobStatusAction() JobStatusAction

func (JobStatusAction) ComputeAttributes

func (JobStatusAction) ComputeAttributes(job batch.Job) (attributes, error)

Generates the Job "status" facet. Same logic as kubectl printer https://github.com/kubernetes/kubernetes/blob/0d3b859af81e6a5f869a7766c8d45afd1c600b04/pkg/printers/internalversion/printers.go#L1204

type K8sEvent

type K8sEvent struct {
	Kind       string `json:"kind,omitempty"`
	ApiVersion string `json:"apiVersion,omitempty"`
}

type K8sEventProcessorAction

type K8sEventProcessorAction interface {
	// Computes attributes for a k8s entity.  Since entities like Pod, Node,
	// etc. don't have a common interface, the argument of ComputeAttributes is
	// of type any types that implement this method should check that the arg is
	// of the right type before proceeding.
	// Check the utility functions below for more info
	ComputeAttributes(any) (attributes, error)
}

Action that processes a K8S object and computes custom attributes for it

type K8sEventsProcessor

type K8sEventsProcessor struct {
	// contains filtered or unexported fields
}

func (*K8sEventsProcessor) RunActions

func (proc *K8sEventsProcessor) RunActions(obj metav1.Object) (attributes, error)

Runs actions that generate new attributes for an (unmarshalled) object.

func (*K8sEventsProcessor) RunBodyActions

func (proc *K8sEventsProcessor) RunBodyActions(obj metav1.Object) (bool, error)

Runs actions that modify parts of the body of this event IN PLACE. Since we want these actions to modify body attributes, these actions intentionally DO NOT DeepCopy() the object and must run BEFORE the actions that generate new attributes. This is useful, for instance, when we want to redact secrets' values, to prevent generating attributes that contain secret's values before redacting them. Returns true if the object was modified by any action, false otherwise

func (*K8sEventsProcessor) Shutdown

func (kep *K8sEventsProcessor) Shutdown(_ context.Context) error

func (*K8sEventsProcessor) Start

type NodePoolAction

type NodePoolAction struct{}

func NewNodePoolAction

func NewNodePoolAction() NodePoolAction

func (NodePoolAction) ComputeAttributes

func (NodePoolAction) ComputeAttributes(node v1.Node) (attributes, error)

Discover the Node "pool" facet. This facet is not provided natively by Kubernetes, so it will be present only when using a managed deployment/service provided by either of the vendors listed above.

type NodeRolesAction

type NodeRolesAction struct{}

func NewNodeRolesAction

func NewNodeRolesAction() NodeRolesAction

func (NodeRolesAction) ComputeAttributes

func (NodeRolesAction) ComputeAttributes(node v1.Node) (attributes, error)

Generates the Node "roles" facet.

type NodeStatusAction

type NodeStatusAction struct{}

func NewNodeStatusAction

func NewNodeStatusAction() NodeStatusAction

func (NodeStatusAction) ComputeAttributes

func (NodeStatusAction) ComputeAttributes(node v1.Node) (attributes, error)

Generates the Node "status" facet. Assumes that objLog is a log from a Node event.

type PersistentVolumeClaimSelectorAction

type PersistentVolumeClaimSelectorAction struct{}

func NewPersistentVolumeClaimSelectorAction

func NewPersistentVolumeClaimSelectorAction() PersistentVolumeClaimSelectorAction

func (PersistentVolumeClaimSelectorAction) ComputeAttributes

func (PersistentVolumeClaimSelectorAction) ComputeAttributes(pvc corev1.PersistentVolumeClaim) (attributes, error)

Generates the PersistentVolumeClaim "selector" facet.

type PersistentVolumeTypeAction

type PersistentVolumeTypeAction struct{}

func NewPersistentVolumeTypeAction

func NewPersistentVolumeTypeAction() PersistentVolumeTypeAction

func (PersistentVolumeTypeAction) ComputeAttributes

func (PersistentVolumeTypeAction) ComputeAttributes(pvc corev1.PersistentVolume) (attributes, error)

Generates the PersistentVolume "type" facet.

type PodConditionsAction

type PodConditionsAction struct{}

Gather all Pod conditions into a single facet named "conditions"

func NewPodConditionsAction

func NewPodConditionsAction() PodConditionsAction

func (PodConditionsAction) ComputeAttributes

func (PodConditionsAction) ComputeAttributes(pod v1.Pod) (attributes, error)

type PodContainersCountsAction

type PodContainersCountsAction struct{}

This action computes various facets for Pod by aggregating "status" values across all containers of a Pod.

We compute more facets into a single action to avoid iterating over the same slice multiple times in different actions.

func NewPodContainersCountsAction

func NewPodContainersCountsAction() PodContainersCountsAction

func (PodContainersCountsAction) ComputeAttributes

func (PodContainersCountsAction) ComputeAttributes(pod v1.Pod) (attributes, error)

type PodCronJobNameAction

type PodCronJobNameAction struct{}

func NewPodCronJobNameAction

func NewPodCronJobNameAction() PodCronJobNameAction

func (PodCronJobNameAction) ComputeAttributes

func (PodCronJobNameAction) ComputeAttributes(pod v1.Pod) (attributes, error)

Name of the cronJob this Pod belongs to (only present if the owner is a CronJob resource)

type PodDaemonSetNameAction

type PodDaemonSetNameAction struct{}

func NewPodDaemonSetNameAction

func NewPodDaemonSetNameAction() PodDaemonSetNameAction

func (PodDaemonSetNameAction) ComputeAttributes

func (PodDaemonSetNameAction) ComputeAttributes(pod v1.Pod) (attributes, error)

Name of the cronJob this Pod belongs to (only present if the owner is a DaemonSet resource)

type PodJobNameAction

type PodJobNameAction struct{}

func NewPodJobAction

func NewPodJobAction() PodJobNameAction

func (PodJobNameAction) ComputeAttributes

func (PodJobNameAction) ComputeAttributes(pod v1.Pod) (attributes, error)

Name of the job this Pod belongs to (only present if the owner is a Job resource)

type PodReadinessAction

type PodReadinessAction struct{}

func NewPodReadinessAction

func NewPodReadinessAction() PodReadinessAction

func (PodReadinessAction) ComputeAttributes

func (PodReadinessAction) ComputeAttributes(pod v1.Pod) (attributes, error)

type PodStatefulSetNameAction

type PodStatefulSetNameAction struct{}

func NewPodStatefulSetNameAction

func NewPodStatefulSetNameAction() PodStatefulSetNameAction

func (PodStatefulSetNameAction) ComputeAttributes

func (PodStatefulSetNameAction) ComputeAttributes(pod v1.Pod) (attributes, error)

Name of the cronJob this Pod belongs to (only present if the owner is a StatefulSet resource)

type PodStatusAction

type PodStatusAction struct{}

func NewPodStatusAction

func NewPodStatusAction() PodStatusAction

func (PodStatusAction) ComputeAttributes

func (PodStatusAction) ComputeAttributes(pod v1.Pod) (attributes, error)

Generates the Pod "status" facet.

type SecretRedactorBodyAction

type SecretRedactorBodyAction struct{}

func NewSecretRedactorBodyAction

func NewSecretRedactorBodyAction() SecretRedactorBodyAction

func (SecretRedactorBodyAction) Modify

func (SecretRedactorBodyAction) Modify(secret *corev1.Secret) error

Redacts secrets' values

type ServiceAccountImagePullSecretsAction

type ServiceAccountImagePullSecretsAction struct{}

func NewServiceAccountImagePullSecretsAction

func NewServiceAccountImagePullSecretsAction() ServiceAccountImagePullSecretsAction

func (ServiceAccountImagePullSecretsAction) ComputeAttributes

func (ServiceAccountImagePullSecretsAction) ComputeAttributes(serviceAccount corev1.ServiceAccount) (attributes, error)

Generates the ServiceAccount "ImagePullSecrets" facet.

type ServiceAccountSecretsAction

type ServiceAccountSecretsAction struct{}

func NewServiceAccountSecretsAction

func NewServiceAccountSecretsAction() ServiceAccountSecretsAction

func (ServiceAccountSecretsAction) ComputeAttributes

func (ServiceAccountSecretsAction) ComputeAttributes(serviceAccount corev1.ServiceAccount) (attributes, error)

Generates the ServiceAccount "secrets" facet.

type ServiceAccountSecretsNamesAction

type ServiceAccountSecretsNamesAction struct{}

func NewServiceAccountSecretsNamesAction

func NewServiceAccountSecretsNamesAction() ServiceAccountSecretsNamesAction

func (ServiceAccountSecretsNamesAction) ComputeAttributes

func (ServiceAccountSecretsNamesAction) ComputeAttributes(serviceAccount corev1.ServiceAccount) (attributes, error)

Generates the ServiceAccount "secretsNames" facet.

type ServiceExternalIPsAction

type ServiceExternalIPsAction struct{}

func NewServiceExternalIPsAction

func NewServiceExternalIPsAction() ServiceExternalIPsAction

func (ServiceExternalIPsAction) ComputeAttributes

func (ServiceExternalIPsAction) ComputeAttributes(service corev1.Service) (attributes, error)

Generates the Service "loadBalancerIngress" facet. We return an array of IPs (even if there's only a single IP) if there is at least one. We set the facet to a string (no array in this case) as follows:

- "None" --> service != LoadBalancer and there are no external IPs - "Pending" --> service is a LoadBalancer and there are no external IPs - "Unknown" --> service is of an unknown type

type ServiceLBIngressAction

type ServiceLBIngressAction struct{}

func NewServiceLBIngressAction

func NewServiceLBIngressAction() ServiceLBIngressAction

func (ServiceLBIngressAction) ComputeAttributes

func (ServiceLBIngressAction) ComputeAttributes(service corev1.Service) (attributes, error)

Generates the Service "loadBalancerIngress" facet.

type ServicePortsAction

type ServicePortsAction struct{}

func NewServicePortsAction

func NewServicePortsAction() ServicePortsAction

func (ServicePortsAction) ComputeAttributes

func (ServicePortsAction) ComputeAttributes(service corev1.Service) (attributes, error)

Generates the Service "ports" facet.

type ServiceSelectorAction

type ServiceSelectorAction struct{}

func NewServiceSelectorAction

func NewServiceSelectorAction() ServiceSelectorAction

func (ServiceSelectorAction) ComputeAttributes

func (ServiceSelectorAction) ComputeAttributes(service corev1.Service) (attributes, error)

Generates the Service "selector" facet.

type Set

type Set map[string]string

func (Set) String

func (ls Set) String() string

String returns all labels listed as a human readable string. Conveniently, exactly the format that ParseSelector takes.

type StatefulSetSelectorAction

type StatefulSetSelectorAction struct{}

func NewStatefulsetSelectorAction

func NewStatefulsetSelectorAction() StatefulSetSelectorAction

func (StatefulSetSelectorAction) ComputeAttributes

func (StatefulSetSelectorAction) ComputeAttributes(statefulSet appsv1.StatefulSet) (attributes, error)

Generates the Statefulset "selector" facet.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL