istio.io/istio@v0.0.0-20240520182934-d79c90f27776/samples/grpc-echo/grpc-echo.yaml (about) 1 apiVersion: v1 2 kind: Service 3 metadata: 4 labels: 5 app: echo 6 name: echo 7 namespace: echo-grpc 8 spec: 9 selector: 10 app: echo 11 type: ClusterIP 12 ports: 13 - name: http 14 port: 80 15 targetPort: 18080 16 - name: grpc 17 port: 7070 18 targetPort: 17070 19 - name: tcp 20 port: 9090 21 targetPort: 19090 22 --- 23 apiVersion: apps/v1 24 kind: Deployment 25 metadata: 26 name: echo-v1 27 namespace: echo-grpc 28 spec: 29 replicas: 1 30 selector: 31 matchLabels: 32 app: echo 33 version: v1 34 template: 35 metadata: 36 annotations: 37 inject.istio.io/templates: grpc-agent 38 proxy.istio.io/config: '{"holdApplicationUntilProxyStarts": true}' 39 labels: 40 app: echo 41 version: v1 42 spec: 43 containers: 44 - args: 45 - --metrics=15014 46 - --port 47 - "18080" 48 - --tcp 49 - "19090" 50 - --xds-grpc-server=17070 51 - --grpc 52 - "17070" 53 - --grpc 54 - "17171" 55 - --port 56 - "3333" 57 - --port 58 - "8080" 59 - --version 60 - v1 61 - --crt=/cert.crt 62 - --key=/cert.key 63 env: 64 - name: INSTANCE_IP 65 valueFrom: 66 fieldRef: 67 apiVersion: v1 68 fieldPath: status.podIP 69 image: gcr.io/istio-testing/app:latest 70 imagePullPolicy: Always 71 livenessProbe: 72 failureThreshold: 10 73 initialDelaySeconds: 10 74 periodSeconds: 10 75 successThreshold: 1 76 tcpSocket: 77 port: tcp-health-port 78 timeoutSeconds: 1 79 name: app 80 ports: 81 - containerPort: 17070 82 protocol: TCP 83 - containerPort: 17171 84 protocol: TCP 85 - containerPort: 8080 86 protocol: TCP 87 - containerPort: 3333 88 name: tcp-health-port 89 protocol: TCP 90 readinessProbe: 91 failureThreshold: 10 92 httpGet: 93 path: / 94 port: 8080 95 scheme: HTTP 96 initialDelaySeconds: 1 97 periodSeconds: 2 98 successThreshold: 1 99 timeoutSeconds: 1 100 startupProbe: 101 failureThreshold: 10 102 periodSeconds: 10 103 successThreshold: 1 104 tcpSocket: 105 port: tcp-health-port 106 timeoutSeconds: 1 107 --- 108 apiVersion: apps/v1 109 kind: Deployment 110 metadata: 111 name: echo-v2 112 namespace: echo-grpc 113 spec: 114 replicas: 1 115 selector: 116 matchLabels: 117 app: echo 118 version: v2 119 template: 120 metadata: 121 annotations: 122 inject.istio.io/templates: grpc-agent 123 proxy.istio.io/config: '{"holdApplicationUntilProxyStarts": true}' 124 labels: 125 app: echo 126 version: v2 127 spec: 128 containers: 129 - args: 130 - --metrics=15014 131 - --xds-grpc-server=17070 132 - --port 133 - "18080" 134 - --tcp 135 - "19090" 136 - --grpc 137 - "17070" 138 - --grpc 139 - "17171" 140 - --port 141 - "3333" 142 - --port 143 - "8080" 144 - --version 145 - v2 146 - --crt=/cert.crt 147 - --key=/cert.key 148 env: 149 - name: INSTANCE_IP 150 valueFrom: 151 fieldRef: 152 apiVersion: v1 153 fieldPath: status.podIP 154 image: gcr.io/istio-testing/app:latest 155 imagePullPolicy: Always 156 livenessProbe: 157 failureThreshold: 10 158 initialDelaySeconds: 10 159 periodSeconds: 10 160 successThreshold: 1 161 tcpSocket: 162 port: tcp-health-port 163 timeoutSeconds: 1 164 name: app 165 ports: 166 - containerPort: 17070 167 protocol: TCP 168 - containerPort: 17171 169 protocol: TCP 170 - containerPort: 8080 171 protocol: TCP 172 - containerPort: 3333 173 name: tcp-health-port 174 protocol: TCP 175 readinessProbe: 176 failureThreshold: 10 177 httpGet: 178 path: / 179 port: 8080 180 scheme: HTTP 181 initialDelaySeconds: 1 182 periodSeconds: 2 183 successThreshold: 1 184 timeoutSeconds: 1 185 startupProbe: 186 failureThreshold: 10 187 periodSeconds: 10 188 successThreshold: 1 189 tcpSocket: 190 port: tcp-health-port 191 timeoutSeconds: 1