Skip to content

Instantly share code, notes, and snippets.

@rossf7
Created June 7, 2018 13:17
Show Gist options
  • Save rossf7/925dd2c05f4908b5ba4fdceac1cc8594 to your computer and use it in GitHub Desktop.
Save rossf7/925dd2c05f4908b5ba4fdceac1cc8594 to your computer and use it in GitHub Desktop.
Test case for mounting configmaps with a subpath
apiVersion: v1
kind: ConfigMap
metadata:
name: resolv-conf-configmap
labels:
app: configmap-test
data:
resolv.conf: |
nameserver 8.8.8.8
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: configmap-test
spec:
replicas: 1
selector:
matchLabels:
app: configmap-test
template:
metadata:
labels:
app: configmap-test
spec:
containers:
- name: helloworld
image: giantswarm/helloworld:latest
ports:
- containerPort: 8080
volumeMounts:
- name: resolv-conf
mountPath: /etc/resolv.conf
subPath: resolv.conf
volumes:
- name: resolv-conf
configMap:
name: resolv-conf-configmap
optional: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment