Skip to content

Instantly share code, notes, and snippets.

@otaviof
Last active August 11, 2020 07:01
Show Gist options
  • Save otaviof/785b5c4fc43046268bac8fb7beed0b56 to your computer and use it in GitHub Desktop.
Save otaviof/785b5c4fc43046268bac8fb7beed0b56 to your computer and use it in GitHub Desktop.
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: buildah-shared-ex
spec:
replicas: 1
selector:
matchLabels:
app: buildah-shared-ex
template:
metadata:
labels:
app: buildah-shared-ex
spec:
serviceAccountName: buildah-sa
volumes:
- name: node-storage-root
hostPath:
path: /var/lib/containers/storage
type: DirectoryOrCreate
- name: container-storage-root
emptyDir: {}
containers:
- name: buildah
image: quay.io/buildah/upstream:latest
imagePullPolicy: IfNotPresent
args:
- sleep
- "3600"
volumeMounts:
- name: node-storage-root
mountPath: /var/lib/shared
readOnly: true
- name: container-storage-root
mountPath: /var/lib/containers/storage
oc create serviceaccount buildah-sa
oc adm policy add-scc-to-user privileged --serviceaccount=buildah-sa
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment