Skip to content

Instantly share code, notes, and snippets.

@owainlewis owainlewis/driver.yaml
Last active Nov 5, 2018

Embed
What would you like to do?
---
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: oci-flexvolume-driver-master
namespace: kube-system
spec:
selector:
matchLabels:
component: oci-flexvolume-driver
tier: control-plane
updateStrategy:
type: RollingUpdate
template:
metadata:
labels:
component: oci-flexvolume-driver
tier: control-plane
spec:
serviceAccountName: oci-flexvolume-driver
nodeSelector:
node-role.kubernetes.io/master: ""
tolerations:
- key: node.cloudprovider.kubernetes.io/uninitialized
value: "true"
effect: NoSchedule
- key: node-role.kubernetes.io/master
operator: Exists
effect: NoSchedule
volumes:
- name: flexvolume-mount
hostPath:
path: /usr/libexec/kubernetes/kubelet-plugins/volume/exec/
type: DirectoryOrCreate
- name: config
secret:
secretName: oci-flexvolume-driver
- name: kubeconfig
secret:
secretName: oci-flexvolume-driver-kubeconfig
containers:
- name: oci-flexvolume-driver
image: iad.ocir.io/oracle/cloud-provider-oci:latest
command: ["/bin/bash", "/usr/local/bin/install.sh"]
securityContext:
privileged: true
volumeMounts:
- mountPath: /flexmnt
name: flexvolume-mount
- mountPath: /tmp
name: config
readOnly: true
- mountPath: /tmp2
name: kubeconfig
readOnly: true
---
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: oci-flexvolume-driver-worker
namespace: kube-system
spec:
selector:
matchLabels:
component: oci-flexvolume-driver
tier: node
updateStrategy:
type: RollingUpdate
template:
metadata:
labels:
component: oci-flexvolume-driver
tier: node
spec:
volumes:
- name: flexvolume-mount
hostPath:
path: /usr/libexec/kubernetes/kubelet-plugins/volume/exec
type: DirectoryOrCreate
containers:
- name: oci-flexvolume-driver
image: iad.ocir.io/oracle/cloud-provider-oci:latest
command: ["/bin/bash", "/usr/local/bin/install.sh"]
securityContext:
privileged: true
volumeMounts:
- mountPath: /flexmnt
name: flexvolume-mount
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: oci-flexvolume-driver
namespace: kube-system
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRole
metadata:
name: oci-flexvolume-driver
rules:
- apiGroups: [""]
resources: ["nodes"]
verbs: ["get"]
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
name: oci-flexvolume-driver
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: oci-flexvolume-driver
subjects:
- kind: ServiceAccount
name: oci-flexvolume-driver
namespace: kube-system
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.