Kubernetes
The kubernetes
template holds data that controls the production of Kubernetes-specificattributes.
Example config:
apiVersion: "config.istio.io/v1alpha2"
kind: kubernetes
metadata:
name: attributes
namespace: istio-system
spec:
# Pass the required attribute data to the adapter
source_uid: source.uid | ""
source_ip: source.ip | ip("0.0.0.0") # default to unspecified ip addr
destination_uid: destination.uid | ""
destination_ip: destination.ip | ip("0.0.0.0") # default to unspecified ip addr
attribute_bindings:
# Fill the new attributes from the adapter produced output.
# $out refers to an instance of OutputTemplate message
source.ip: $out.source_pod_ip
source.labels: $out.source_labels
source.namespace: $out.source_namespace
source.service: $out.source_service
source.serviceAccount: $out.source_service_account_name
destination.ip: $out.destination_pod_ip
destination.labels: $out.destination_labels
destination.namespace: $out.destination_mamespace
destination.service: $out.destination_service
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
Field | Type | Description | Required |
---|---|---|---|
sourcePodUid | string | Refers 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_uid | No |
sourcePodIp | IPAddress | Refers to source pod ip address. attribute_bindings can refer to this field using $out.source_pod_ip | No |
sourcePodName | string | Refers to source pod name. attribute_bindings can refer to this field using $out.source_pod_name | No |
sourceLabels | map<string, string> | Refers to source pod labels. attribute_bindings can refer to this field using $out.source_labels | No |
sourceNamespace | string | Refers to source pod namespace. attribute_bindings can refer to this field using $out.source_namespace | No |
sourceServiceAccountName | string | Refers to source pod service account name. attribute_bindings can refer to this field using $out.source_service_account_name | No |
sourceHostIp | IPAddress | Refers to source pod host ip address. attribute_bindings can refer to this field using $out.source_host_ip | No |
sourceWorkloadUid | string | Refers to the Istio workload identifier for the source pod. Attribute_bindings can refer to this field using $out.source_workload_uid | No |
sourceWorkloadName | string | Refers to the Istio workload name for the source pod. Attribute_bindings can refer to this field using $out.source_workload_name | No |
sourceWorkloadNamespace | string | Refers to the Istio workload namespace for the source pod. Attribute_bindings can refer to this field using $out.source_workload_namespace | No |
sourceOwner | string | Refers to the (controlling) owner of the source pod. Attribute_bindings can refer to this field using $out.source_owner | No |
destinationPodUid | string | Refers 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_uid | No |
destinationPodIp | IPAddress | Refers to destination pod ip address. attribute_bindings can refer to this field using $out.destination_pod_ip | No |
destinationPodName | string | Refers to destination pod name. attribute_bindings can refer to this field using $out.destination_pod_name | No |
destinationContainerName | string | Refers to destination container name. attribute_bindings can refer to this field using $out.destination_container_name | No |
destinationLabels | map<string, string> | Refers to destination pod labels. attribute_bindings can refer to this field using $out.destination_labels | No |
destinationNamespace | string | Refers to destination pod namespace. attribute_bindings can refer to this field using $out.destination_namespace | No |
destinationServiceAccountName | string | Refers to destination pod service account name. attribute_bindings can refer to this field using $out.destination_service_account_name | No |
destinationHostIp | IPAddress | Refers to destination pod host ip address. attribute_bindings can refer to this field using $out.destination_host_ip | No |
destinationOwner | string | Refers to the (controlling) owner of the destination pod. Attribute_bindings can refer to this field using $out.destination_owner | No |
destinationWorkloadUid | string | Refers to the Istio workload identifier for the destination pod. Attribute_bindings can refer to this field using $out.destination_workload_uid | No |
destinationWorkloadName | string | Refers to the Istio workload name for the destination pod. Attribute_bindings can refer to this field using $out.destination_workload_name | No |
destinationWorkloadNamespace | string | Refers to the Istio workload name for the destination pod. Attribute_bindings can refer to this field using $out.destination_workload_namespace | No |
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
Field | Type | Description | Required |
---|---|---|---|
sourceUid | string | Source pod’s uid. Must be of the form: “kubernetes://pod.namespace” | No |
sourceIp | IPAddress | Source pod’s ip. | No |
destinationUid | string | Destination pod’s uid. Must be of the form: “kubernetes://pod.namespace” | No |
destinationIp | IPAddress | Destination pod’s ip. | No |
destinationPort | int64 | Destination container’s port number. | No |