Kubernetes

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

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

OutputTemplate

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

FieldTypeDescriptionRequired
sourcePodUidstringRefers to the source.uid for a pod. This is for TCP use cases where the attribute is not present.attribute_bindings can refer to this field using $out.source_pod_uidNo
sourcePodIpIPAddressRefers to source pod ip address. attribute_bindings can refer to this field using $out.source_pod_ipNo
sourcePodNamestringRefers to source pod name. attribute_bindings can refer to this field using $out.source_pod_nameNo
sourceLabelsmap<string, string>Refers to source pod labels. attribute_bindings can refer to this field using $out.source_labelsNo
sourceNamespacestringRefers to source pod namespace. attribute_bindings can refer to this field using $out.source_namespaceNo
sourceServiceAccountNamestringRefers to source pod service account name. attribute_bindings can refer to this field using $out.source_service_account_nameNo
sourceHostIpIPAddressRefers to source pod host ip address. attribute_bindings can refer to this field using $out.source_host_ipNo
sourceWorkloadUidstringRefers to the Istio workload identifier for the source pod. Attribute_bindings can refer to this field using $out.source_workload_uidNo
sourceWorkloadNamestringRefers to the Istio workload name for the source pod. Attribute_bindings can refer to this field using $out.source_workload_nameNo
sourceWorkloadNamespacestringRefers to the Istio workload namespace for the source pod. Attribute_bindings can refer to this field using $out.source_workload_namespaceNo
sourceOwnerstringRefers to the (controlling) owner of the source pod. Attribute_bindings can refer to this field using $out.source_ownerNo
destinationPodUidstringRefers to the destination.uid for a pod. This is for TCP use cases where the attribute is not present.attribute_bindings can refer to this field using $out.destination_pod_uidNo
destinationPodIpIPAddressRefers to destination pod ip address. attribute_bindings can refer to this field using $out.destination_pod_ipNo
destinationPodNamestringRefers to destination pod name. attribute_bindings can refer to this field using $out.destination_pod_nameNo
destinationContainerNamestringRefers to destination container name. attribute_bindings can refer to this field using $out.destination_container_nameNo
destinationLabelsmap<string, string>Refers to destination pod labels. attribute_bindings can refer to this field using $out.destination_labelsNo
destinationNamespacestringRefers to destination pod namespace. attribute_bindings can refer to this field using $out.destination_namespaceNo
destinationServiceAccountNamestringRefers to destination pod service account name. attribute_bindings can refer to this field using $out.destination_service_account_nameNo
destinationHostIpIPAddressRefers to destination pod host ip address. attribute_bindings can refer to this field using $out.destination_host_ipNo
destinationOwnerstringRefers to the (controlling) owner of the destination pod. Attribute_bindings can refer to this field using $out.destination_ownerNo
destinationWorkloadUidstringRefers to the Istio workload identifier for the destination pod. Attribute_bindings can refer to this field using $out.destination_workload_uidNo
destinationWorkloadNamestringRefers to the Istio workload name for the destination pod. Attribute_bindings can refer to this field using $out.destination_workload_nameNo
destinationWorkloadNamespacestringRefers to the Istio workload name for the destination pod. Attribute_bindings can refer to this field using $out.destination_workload_namespaceNo

Template

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

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

FieldTypeDescriptionRequired
sourceUidstringSource pod’s uid. Must be of the form: “kubernetes://pod.namespace”No
sourceIpIPAddressSource pod’s ip.No
destinationUidstringDestination pod’s uid. Must be of the form: “kubernetes://pod.namespace”No
destinationIpIPAddressDestination pod’s ip.No
destinationPortint64Destination container’s port number.No