istio.io/istio@v0.0.0-20240520182934-d79c90f27776/samples/httpbin/httpbin.yaml (about) 1 # Copyright Istio Authors 2 # 3 # Licensed under the Apache License, Version 2.0 (the "License"); 4 # you may not use this file except in compliance with the License. 5 # You may obtain a copy of the License at 6 # 7 # http://www.apache.org/licenses/LICENSE-2.0 8 # 9 # Unless required by applicable law or agreed to in writing, software 10 # distributed under the License is distributed on an "AS IS" BASIS, 11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 # See the License for the specific language governing permissions and 13 # limitations under the License. 14 15 ################################################################################################## 16 # httpbin service 17 ################################################################################################## 18 apiVersion: v1 19 kind: ServiceAccount 20 metadata: 21 name: httpbin 22 --- 23 apiVersion: v1 24 kind: Service 25 metadata: 26 name: httpbin 27 labels: 28 app: httpbin 29 service: httpbin 30 spec: 31 ports: 32 - name: http 33 port: 8000 34 targetPort: 8080 35 selector: 36 app: httpbin 37 --- 38 apiVersion: apps/v1 39 kind: Deployment 40 metadata: 41 name: httpbin 42 spec: 43 replicas: 1 44 selector: 45 matchLabels: 46 app: httpbin 47 version: v1 48 template: 49 metadata: 50 labels: 51 app: httpbin 52 version: v1 53 spec: 54 serviceAccountName: httpbin 55 containers: 56 - image: docker.io/kong/httpbin 57 imagePullPolicy: IfNotPresent 58 name: httpbin 59 # Same as found in Dockerfile's CMD but using an unprivileged port 60 command: 61 - gunicorn 62 - -b 63 - 0.0.0.0:8080 64 - httpbin:app 65 - -k 66 - gevent 67 env: 68 # Tells pipenv to use a writable directory instead of $HOME 69 - name: WORKON_HOME 70 value: /tmp 71 ports: 72 - containerPort: 8080