Kubernetes

The kubernetes template holds data that controls the production of Kubernetes-specific attributes.

Example config:

  1. apiVersion: "config.istio.io/v1alpha2"
  2. kind: kubernetes
  3. metadata:
  4. name: attributes
  5. namespace: istio-system
  6. spec:
  7. # Pass the required attribute data to the adapter
  8. source_uid: source.uid | ""
  9. source_ip: source.ip | ip("0.0.0.0") # default to unspecified ip addr
  10. destination_uid: destination.uid | ""
  11. destination_ip: destination.ip | ip("0.0.0.0") # default to unspecified ip addr
  12. attribute_bindings:
  13. # Fill the new attributes from the adapter produced output.
  14. # $out refers to an instance of OutputTemplate message
  15. source.ip: $out.source_pod_ip
  16. source.labels: $out.source_labels
  17. source.namespace: $out.source_namespace
  18. source.service: $out.source_service
  19. source.serviceAccount: $out.source_service_account_name
  20. destination.ip: $out.destination_pod_ip
  21. destination.labels: $out.destination_labels
  22. destination.namespace: $out.destination_mamespace
  23. destination.service: $out.destination_service
  24. destination.serviceAccount: $out.destination_service_account_name

Template

The kubernetes template represents data used to generate kubernetes-derived attributes.

The values provided controls the manner in which the kubernetesenv adapter discovers and generates values related to pod information. Next ID: 8

FieldTypeDescriptionRequired
sourceUidstring

Source pod’s uid. Must be of the form: “kubernetes://pod.namespace”

No
sourceIpIPAddress

Source pod’s ip.

No
destinationUidstring

Destination pod’s uid. Must be of the form: “kubernetes://pod.namespace”

No
destinationIpIPAddress

Destination pod’s ip.

No
destinationPortint64

Destination container’s port number.

No

OutputTemplate

OutputTemplate refers to the output from the adapter. It is used inside the attribute_binding section of the config to assign values to the generated attributes using the $out.<field name of the OutputTemplate> syntax. Next ID: 33

FieldTypeDescriptionRequired
sourcePodUidstring

Refers to the source.uid for a pod. This is for TCP use cases where the attribute is not present. attributebindings can refer to this field using $out.sourcepod_uid

No
sourcePodIpIPAddress

Refers to source pod ip address. attributebindings can refer to this field using $out.sourcepod_ip

No
sourcePodNamestring

Refers to source pod name. attributebindings can refer to this field using $out.sourcepod_name

No
sourceLabelsmap<string, string>

Refers to source pod labels. attributebindings can refer to this field using $out.sourcelabels

No
sourceNamespacestring

Refers to source pod namespace. attributebindings can refer to this field using $out.sourcenamespace

No
sourceServiceAccountNamestring

Refers to source pod service account name. attributebindings can refer to this field using $out.sourceserviceaccountname

No
sourceHostIpIPAddress

Refers to source pod host ip address. attributebindings can refer to this field using $out.sourcehost_ip

No
sourceWorkloadUidstring

Refers to the Istio workload identifier for the source pod. Attributebindings can refer to this field using $out.sourceworkload_uid

No
sourceWorkloadNamestring

Refers to the Istio workload name for the source pod. Attributebindings can refer to this field using $out.sourceworkload_name

No
sourceWorkloadNamespacestring

Refers to the Istio workload namespace for the source pod. Attributebindings can refer to this field using $out.sourceworkload_namespace

No
sourceOwnerstring

Refers to the (controlling) owner of the source pod. Attributebindings can refer to this field using $out.sourceowner

No
destinationPodUidstring

Refers to the destination.uid for a pod. This is for TCP use cases where the attribute is not present. attributebindings can refer to this field using $out.destinationpod_uid

No
destinationPodIpIPAddress

Refers to destination pod ip address. attributebindings can refer to this field using $out.destinationpod_ip

No
destinationPodNamestring

Refers to destination pod name. attributebindings can refer to this field using $out.destinationpod_name

No
destinationContainerNamestring

Refers to destination container name. attributebindings can refer to this field using $out.destinationcontainer_name

No
destinationLabelsmap<string, string>

Refers to destination pod labels. attributebindings can refer to this field using $out.destinationlabels

No
destinationNamespacestring

Refers to destination pod namespace. attributebindings can refer to this field using $out.destinationnamespace

No
destinationServiceAccountNamestring

Refers to destination pod service account name. attributebindings can refer to this field using $out.destinationserviceaccountname

No
destinationHostIpIPAddress

Refers to destination pod host ip address. attributebindings can refer to this field using $out.destinationhost_ip

No
destinationOwnerstring

Refers to the (controlling) owner of the destination pod. Attributebindings can refer to this field using $out.destinationowner

No
destinationWorkloadUidstring

Refers to the Istio workload identifier for the destination pod. Attributebindings can refer to this field using $out.destinationworkload_uid

No
destinationWorkloadNamestring

Refers to the Istio workload name for the destination pod. Attributebindings can refer to this field using $out.destinationworkload_name

No
destinationWorkloadNamespacestring

Refers to the Istio workload name for the destination pod. Attributebindings can refer to this field using $out.destinationworkload_namespace

No