github.com/telepresenceio/telepresence/v2@v2.20.0-pro.6.0.20240517030216-236ea954e789/integration_test/testdata/k8s/hello-w-volumes.goyaml (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 {{- with .Annotations }} 96 annotations: 97 {{- toYaml . | nindent 8 }} 98 {{- end}} 99 spec: 100 serviceAccountName: mount-test-account 101 volumes: 102 - name: hello-data-volume-1 103 configMap: 104 name: hello-data-1 105 - name: hello-data-volume-2 106 configMap: 107 name: hello-data-2 108 - name: hello-secret-volume-1 109 secret: 110 secretName: hello-secret-1 111 - name: hello-secret-volume-2 112 secret: 113 secretName: hello-secret-2 114 - name: nginx-config 115 configMap: 116 name: nginx 117 containers: 118 - name: hello-container-1 119 image: nginx 120 env: 121 - name: NGINX_HOST 122 value: "hello-1.com" 123 - name: NGINX_PORT 124 value: "80" 125 ports: 126 - containerPort: 80 127 name: http 128 volumeMounts: 129 - mountPath: "/usr/share/nginx/html" 130 name: hello-data-volume-1 131 - mountPath: "/var/run/secrets/datawire.io/auth" 132 name: hello-secret-volume-1 133 - mountPath: /etc/nginx/templates/ 134 name: nginx-config 135 livenessProbe: 136 httpGet: 137 path: / 138 port: http 139 initialDelaySeconds: 3 140 periodSeconds: 3 141 - name: hello-container-2 142 image: nginx 143 env: 144 - name: NGINX_HOST 145 value: "hello-2.com" 146 - name: NGINX_PORT 147 value: "81" 148 ports: 149 - containerPort: 81 150 name: http2 151 volumeMounts: 152 - mountPath: "/usr/share/nginx/html" 153 name: hello-data-volume-2 154 - mountPath: "/var/run/secrets/datawire.io/auth" 155 name: hello-secret-volume-2 156 - mountPath: /etc/nginx/templates/ 157 name: nginx-config