Skip to content

Commit

Permalink
ipam-node: add deployment
Browse files Browse the repository at this point in the history
Signed-off-by: Moshe Levi <moshele@nvidia.com>
  • Loading branch information
moshe010 committed May 2, 2023
1 parent 1d6ab78 commit 39cf876
Showing 1 changed file with 101 additions and 0 deletions.
101 changes: 101 additions & 0 deletions nv-ipam.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: nv-ipam
rules:
- apiGroups:
- ""
resources:
- nodes
verbs:
- get
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: nv-ipam
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: nv-ipam
subjects:
- kind: ServiceAccount
name: nv-ipam
namespace: kube-system
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: nv-ipam
namespace: kube-system
---
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: kube-nv-ipam-ds
namespace: kube-system
labels:
tier: node
app: nv-ipam
name: nv-ipam
spec:
selector:
matchLabels:
name: nv-ipam
updateStrategy:
type: RollingUpdate
template:
metadata:
labels:
tier: node
app: nv-ipam
name: nv-ipam
spec:
hostNetwork: true
tolerations:
- operator: Exists
effect: NoSchedule
- operator: Exists
effect: NoExecute
serviceAccountName: nv-ipam
containers:
- name: kube-nv-ipam
image: ghcr.io/mellanox/nvidia-k8s-ipam:v0.1.0
imagePullPolicy: IfNotPresent
env:
- name: NODE_NAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
command: ["/ipam-node"]
args:
- "--cni-conf-dir=/host/etc/cni/net.d"
resources:
requests:
cpu: "100m"
memory: "50Mi"
limits:
cpu: "100m"
memory: "50Mi"
securityContext:
privileged: true
volumeMounts:
- name: cni
mountPath: /host/etc/cni/net.d
- name: hostlocalcnibin
mountPath: /host/var/lib/cni/nv-ipam/bin
- name: hostlocalcnistate
mountPath: /host/var/lib/cni/nv-ipam/state/host-local
terminationGracePeriodSeconds: 10
volumes:
- name: cni
hostPath:
path: /etc/cni/net.d
- name: hostlocalcnibin
hostPath:
path: /var/lib/cni/nv-ipam/bin
- name: hostlocalcnistate
hostPath:
path: /var/lib/cni/nv-ipam/state/host-local

0 comments on commit 39cf876

Please sign in to comment.