Skip to content

Commit

Permalink
Add hostpath-provisioner namespaced resources
Browse files Browse the repository at this point in the history
  • Loading branch information
larsks committed Dec 13, 2022
1 parent 9dc00af commit b3dbc77
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 0 deletions.
37 changes: 37 additions & 0 deletions hostpath-provisioner/base/daemonset.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: kubevirt-hostpath-provisioner
labels:
k8s-app: kubevirt-hostpath-provisioner
namespace: kubevirt-hostpath-provisioner
spec:
selector:
matchLabels:
k8s-app: kubevirt-hostpath-provisioner
template:
metadata:
labels:
k8s-app: kubevirt-hostpath-provisioner
spec:
serviceAccountName: kubevirt-hostpath-provisioner-admin
containers:
- name: kubevirt-hostpath-provisioner
image: quay.io/kubevirt/hostpath-provisioner
imagePullPolicy: Always
env:
- name: USE_NAMING_PREFIX
value: "false" # change to true, to have the name of the pvc be part of the directory
- name: NODE_NAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
- name: PV_DIR
value: /var/hpvolumes
volumeMounts:
- name: pv-volume # root dir where your bind mounts will be on the node
mountPath: /var/hpvolumes
volumes:
- name: pv-volume
hostPath:
path: /var/hpvolumes
7 changes: 7 additions & 0 deletions hostpath-provisioner/base/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
commonLabels:
app: hostpath-provisioner
resources:
- daemonset.yaml
- serviceaccount.yaml
5 changes: 5 additions & 0 deletions hostpath-provisioner/base/serviceaccount.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: kubevirt-hostpath-provisioner-admin
namespace: kubevirt-hostpath-provisioner
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
commonLabels:
nerc.mghpcc.org/kustomized: "true"
resources:
- ../../base

0 comments on commit b3dbc77

Please sign in to comment.