istio.io/istio@v0.0.0-20240520182934-d79c90f27776/manifests/charts/istio-control/istio-discovery/files/grpc-simple.yaml (about) 1 metadata: 2 annotations: 3 sidecar.istio.io/rewriteAppHTTPProbers: "false" 4 spec: 5 initContainers: 6 - name: grpc-bootstrap-init 7 image: busybox:1.28 8 volumeMounts: 9 - mountPath: /var/lib/grpc/data/ 10 name: grpc-io-proxyless-bootstrap 11 env: 12 - name: INSTANCE_IP 13 valueFrom: 14 fieldRef: 15 fieldPath: status.podIP 16 - name: POD_NAME 17 valueFrom: 18 fieldRef: 19 fieldPath: metadata.name 20 - name: POD_NAMESPACE 21 valueFrom: 22 fieldRef: 23 fieldPath: metadata.namespace 24 - name: ISTIO_NAMESPACE 25 value: | 26 {{ .Values.global.istioNamespace }} 27 command: 28 - sh 29 - "-c" 30 - |- 31 NODE_ID="sidecar~${INSTANCE_IP}~${POD_NAME}.${POD_NAMESPACE}~cluster.local" 32 SERVER_URI="dns:///istiod.${ISTIO_NAMESPACE}.svc:15010" 33 echo ' 34 { 35 "xds_servers": [ 36 { 37 "server_uri": "'${SERVER_URI}'", 38 "channel_creds": [{"type": "insecure"}], 39 "server_features" : ["xds_v3"] 40 } 41 ], 42 "node": { 43 "id": "'${NODE_ID}'", 44 "metadata": { 45 "GENERATOR": "grpc" 46 } 47 } 48 }' > /var/lib/grpc/data/bootstrap.json 49 containers: 50 {{- range $index, $container := .Spec.Containers }} 51 - name: {{ $container.Name }} 52 env: 53 - name: GRPC_XDS_BOOTSTRAP 54 value: /var/lib/grpc/data/bootstrap.json 55 - name: GRPC_GO_LOG_VERBOSITY_LEVEL 56 value: "99" 57 - name: GRPC_GO_LOG_SEVERITY_LEVEL 58 value: info 59 volumeMounts: 60 - mountPath: /var/lib/grpc/data/ 61 name: grpc-io-proxyless-bootstrap 62 {{- end }} 63 volumes: 64 - name: grpc-io-proxyless-bootstrap 65 emptyDir: {}