github.com/telepresenceio/telepresence/v2@v2.20.0-pro.6.0.20240517030216-236ea954e789/integration_test/testdata/k8s/hello-w-volumes.yaml (about) 1 apiVersion: v1 2 kind: ConfigMap 3 metadata: 4 name: nginx 5 data: 6 default.conf.template: | 7 server { 8 listen ${NGINX_PORT}; 9 server_name localhost; 10 11 location / { 12 root /usr/share/nginx/html; 13 index index.html index.htm; 14 } 15 16 error_page 500 502 503 504 /50x.html; 17 location = /50x.html { 18 root /usr/share/nginx/html; 19 } 20 } 21 --- 22 apiVersion: v1 23 kind: ConfigMap 24 metadata: 25 name: hello-data-1 26 data: 27 index.html: | 28 <html> 29 <body> 30 <p id="hello">Hello from volume 1!</p> 31 </body> 32 </html> 33 --- 34 apiVersion: v1 35 kind: ConfigMap 36 metadata: 37 name: hello-data-2 38 data: 39 index.html: | 40 <html> 41 <body> 42 <p id="hello">Hello from volume 2!</p> 43 </body> 44 </html> 45 --- 46 apiVersion: v1 47 kind: Secret 48 metadata: 49 name: hello-secret-1 50 type: kubernetes.io/basic-auth 51 stringData: 52 username: "hello-1" 53 password: "hello-1" 54 --- 55 apiVersion: v1 56 kind: Secret 57 metadata: 58 name: hello-secret-2 59 type: kubernetes.io/basic-auth 60 stringData: 61 username: "hello-2" 62 password: "hello-2" 63 --- 64 apiVersion: v1 65 kind: Service 66 metadata: 67 name: hello 68 spec: 69 type: ClusterIP 70 selector: 71 app: hello 72 ports: 73 - name: http 74 port: 80 75 targetPort: http 76 - name: http2 77 port: 81 78 targetPort: http2 79 --- 80 apiVersion: apps/v1 81 kind: Deployment 82 metadata: 83 name: hello 84 labels: 85 app: hello 86 spec: 87 replicas: 1 88 selector: 89 matchLabels: 90 app: hello 91 template: 92 metadata: 93 labels: 94 app: hello 95 spec: 96 serviceAccountName: mount-test-account 97 volumes: 98 - name: hello-data-volume-1 99 configMap: 100 name: hello-data-1 101 - name: hello-data-volume-2 102 configMap: 103 name: hello-data-2 104 - name: hello-secret-volume-1 105 secret: 106 secretName: hello-secret-1 107 - name: hello-secret-volume-2 108 secret: 109 secretName: hello-secret-2 110 - name: nginx-config 111 configMap: 112 name: nginx 113 containers: 114 - name: hello-container-1 115 image: nginx 116 env: 117 - name: NGINX_HOST 118 value: "hello-1.com" 119 - name: NGINX_PORT 120 value: "80" 121 ports: 122 - containerPort: 80 123 name: http 124 volumeMounts: 125 - mountPath: "/usr/share/nginx/html" 126 name: hello-data-volume-1 127 - mountPath: "/var/run/secrets/datawire.io/auth" 128 name: hello-secret-volume-1 129 - mountPath: /etc/nginx/templates/ 130 name: nginx-config 131 livenessProbe: 132 httpGet: 133 path: / 134 port: http 135 initialDelaySeconds: 3 136 periodSeconds: 3 137 - name: hello-container-2 138 image: nginx 139 env: 140 - name: NGINX_HOST 141 value: "hello-2.com" 142 - name: NGINX_PORT 143 value: "81" 144 ports: 145 - containerPort: 81 146 name: http2 147 volumeMounts: 148 - mountPath: "/usr/share/nginx/html" 149 name: hello-data-volume-2 150 - mountPath: "/var/run/secrets/datawire.io/auth" 151 name: hello-secret-volume-2 152 - mountPath: /etc/nginx/templates/ 153 name: nginx-config