Skip to content

Commit

Permalink
Added deployment Yaml (#24)
Browse files Browse the repository at this point in the history
Resolves : #16
  • Loading branch information
vishnoianil authored Jun 8, 2022
1 parent 0a280ea commit 4f920e2
Show file tree
Hide file tree
Showing 2 changed files with 118 additions and 0 deletions.
1 change: 1 addition & 0 deletions .licenserc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,4 @@ header:
- 'go.sum'
- 'go.mod'
- 'Dockerfile'
- '**/*.yaml'
117 changes: 117 additions & 0 deletions deploy/patu.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: patu
namespace: kube-system
labels:
app: patu
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: patu
labels:
app: patu
rules:
- apiGroups: [""]
resources: ["pods"]
verbs: ["get", "watch", "list"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: patu
labels:
app: patu
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: patu
subjects:
- kind: ServiceAccount
name: patu
namespace: kube-system
---
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: patu
namespace: kube-system
labels:
app: patu
spec:
revisionHistoryLimit: 1
selector:
matchLabels:
app: patu
template:
metadata:
labels:
app: patu
spec:
hostNetwork: true
containers:
- image: "ghcr.io/redhat-et/patu:latest"
imagePullPolicy: Always
name: patu
args:
- /cni/patu
- -d
lifecycle:
preStop:
exec:
command:
- make
- -C bpf
- -k
- clean
resources:
requests:
cpu: 100m
memory: 100Mi
limits:
cpu: 200m
memory: 200Mi
securityContext:
privileged: true
volumeMounts:
- mountPath: /sys/fs/cgroup
name: sys-fs-cgroup
- mountPath: /opt/cni/bin
name: host-opt-cni-bin
- mountPath: /etc/cni/net.d
name: host-etc-cni-net
- mountPath: /proc
name: host-proc
- mountPath: /var/run
name: host-var-run
mountPropagation: Bidirectional

dnsPolicy: ClusterFirst
nodeSelector:
kubernetes.io/os: linux
priorityClassName: system-node-critical
restartPolicy: Always
serviceAccount: patu
serviceAccountName: patu
tolerations:
- key: CriticalAddonsOnly
operator: Exists
- operator: Exists
volumes:
- hostPath:
path: /sys/fs/cgroup
name: sys-fs-cgroup
- hostPath:
path: /proc
name: host-proc
- hostPath:
path: /opt/cni/bin
name: host-opt-cni-bin
- hostPath:
path: /etc/cni/net.d
name: hist-etc-cni-net
- hostPath:
path: /var/run
name: host-var-run

0 comments on commit 4f920e2

Please sign in to comment.