Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added deployment Yaml #24

Merged
merged 2 commits into from
Jun 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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