Skip to content

Commit 41f1044

Browse files
committed
deployment: add minimal kustomize overlays for deploying plugins
Signed-off-by: Markus Lehtonen <markus.lehtonen@intel.com>
1 parent 8c53e55 commit 41f1044

File tree

18 files changed

+472
-0
lines changed

18 files changed

+472
-0
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
apiVersion: apps/v1
2+
kind: DaemonSet
3+
metadata:
4+
name: nri-plugin-device-injector
5+
spec:
6+
template:
7+
spec:
8+
priorityClassName: system-node-critical
9+
containers:
10+
- name: plugin
11+
image: plugin:latest
12+
imagePullPolicy: Always
13+
args:
14+
- "-idx"
15+
- "10"
16+
resources:
17+
requests:
18+
cpu: "2m"
19+
memory: "5Mi"
20+
securityContext:
21+
allowPrivilegeEscalation: false
22+
capabilities:
23+
drop:
24+
- ALL
25+
volumeMounts:
26+
- name: nri-socket
27+
mountPath: /var/run/nri/nri.sock
28+
volumes:
29+
- name: nri-socket
30+
hostPath:
31+
path: /var/run/nri/nri.sock
32+
type: Socket
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
apiVersion: kustomize.config.k8s.io/v1beta1
2+
kind: Kustomization
3+
4+
namespace: kube-system
5+
6+
resources:
7+
- daemonset.yaml
8+
9+
images:
10+
- name: plugin
11+
newName: ghcr.io/containerd/nri/plugins/device-injector
12+
newTag: unstable
13+
14+
labels:
15+
- includeSelectors: true
16+
pairs:
17+
app.kubernetes.io/name: nri-plugin-device-injector
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
apiVersion: apps/v1
2+
kind: DaemonSet
3+
metadata:
4+
name: nri-plugin-differ
5+
spec:
6+
template:
7+
spec:
8+
containers:
9+
- name: plugin
10+
image: plugin:latest
11+
imagePullPolicy: Always
12+
args: []
13+
resources:
14+
requests:
15+
cpu: "2m"
16+
memory: "5Mi"
17+
securityContext:
18+
allowPrivilegeEscalation: false
19+
capabilities:
20+
drop:
21+
- ALL
22+
volumeMounts:
23+
- name: nri-socket
24+
mountPath: /var/run/nri/nri.sock
25+
volumes:
26+
- name: nri-socket
27+
hostPath:
28+
path: /var/run/nri/nri.sock
29+
type: Socket
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
apiVersion: kustomize.config.k8s.io/v1beta1
2+
kind: Kustomization
3+
4+
namespace: kube-system
5+
6+
resources:
7+
- daemonset.yaml
8+
9+
images:
10+
- name: plugin
11+
newName: ghcr.io/containerd/nri/plugins/differ
12+
newTag: unstable
13+
14+
labels:
15+
- includeSelectors: true
16+
pairs:
17+
app.kubernetes.io/name: nri-plugin-differ
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
apiVersion: apps/v1
2+
kind: DaemonSet
3+
metadata:
4+
name: nri-plugin-hook-injector
5+
spec:
6+
template:
7+
spec:
8+
priorityClassName: system-node-critical
9+
containers:
10+
- name: plugin
11+
image: plugin:latest
12+
imagePullPolicy: Always
13+
args:
14+
- "-idx"
15+
- "10"
16+
resources:
17+
requests:
18+
cpu: "2m"
19+
memory: "5Mi"
20+
securityContext:
21+
allowPrivilegeEscalation: false
22+
capabilities:
23+
drop:
24+
- ALL
25+
volumeMounts:
26+
- name: nri-socket
27+
mountPath: /var/run/nri/nri.sock
28+
- name: etc-hooks-d
29+
mountPath: /etc/containers/oci/hooks.d
30+
readOnly: true
31+
- name: usr-share-hooks-d
32+
mountPath: /usr/share/containers/oci/hooks.d
33+
readOnly: true
34+
- name: libexec-hooks-d
35+
mountPath: /usr/libexec/oci/hooks.d
36+
readOnly: true
37+
volumes:
38+
- name: nri-socket
39+
hostPath:
40+
path: /var/run/nri/nri.sock
41+
type: Socket
42+
- name: etc-hooks-d
43+
hostPath:
44+
path: /etc/containers/oci/hooks.d
45+
type: DirectoryOrCreate
46+
- name: usr-share-hooks-d
47+
hostPath:
48+
path: /usr/share/containers/oci/hooks.d
49+
type: DirectoryOrCreate
50+
- name: libexec-hooks-d
51+
hostPath:
52+
path: /usr/libexec/oci/hooks.d
53+
type: DirectoryOrCreate
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
apiVersion: kustomize.config.k8s.io/v1beta1
2+
kind: Kustomization
3+
4+
namespace: kube-system
5+
6+
resources:
7+
- daemonset.yaml
8+
9+
images:
10+
- name: plugin
11+
newName: ghcr.io/containerd/nri/plugins/hook-injector
12+
newTag: unstable
13+
14+
labels:
15+
- includeSelectors: true
16+
pairs:
17+
app.kubernetes.io/name: nri-plugin-hook-injector
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
apiVersion: apps/v1
2+
kind: DaemonSet
3+
metadata:
4+
name: nri-plugin-logger
5+
spec:
6+
template:
7+
spec:
8+
containers:
9+
- name: plugin
10+
image: plugin:latest
11+
imagePullPolicy: Always
12+
args:
13+
- "-idx"
14+
- "10"
15+
- "-events"
16+
- "RunPodSandbox,StopPodSandbox,RemovePodSandbox,CreateContainer,PostCreateContainer,StartContainer,PostStartContainer,UpdateContainer,PostUpdateContainer,StopContainer,RemoveContainer"
17+
resources:
18+
requests:
19+
cpu: "2m"
20+
memory: "5Mi"
21+
securityContext:
22+
allowPrivilegeEscalation: false
23+
capabilities:
24+
drop:
25+
- ALL
26+
volumeMounts:
27+
- name: nri-socket
28+
mountPath: /var/run/nri/nri.sock
29+
volumes:
30+
- name: nri-socket
31+
hostPath:
32+
path: /var/run/nri/nri.sock
33+
type: Socket
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
apiVersion: kustomize.config.k8s.io/v1beta1
2+
kind: Kustomization
3+
4+
namespace: kube-system
5+
6+
resources:
7+
- daemonset.yaml
8+
9+
images:
10+
- name: plugin
11+
newName: ghcr.io/containerd/nri/plugins/logger
12+
newTag: unstable
13+
14+
labels:
15+
- includeSelectors: true
16+
pairs:
17+
app.kubernetes.io/name: nri-plugin-logger
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
apiVersion: apps/v1
2+
kind: DaemonSet
3+
metadata:
4+
name: nri-plugin-network-device-injector
5+
spec:
6+
template:
7+
spec:
8+
priorityClassName: system-node-critical
9+
containers:
10+
- name: plugin
11+
image: plugin:latest
12+
imagePullPolicy: Always
13+
args:
14+
- "-idx"
15+
- "10"
16+
resources:
17+
requests:
18+
cpu: "2m"
19+
memory: "5Mi"
20+
securityContext:
21+
allowPrivilegeEscalation: false
22+
capabilities:
23+
drop:
24+
- ALL
25+
volumeMounts:
26+
- name: nri-socket
27+
mountPath: /var/run/nri/nri.sock
28+
volumes:
29+
- name: nri-socket
30+
hostPath:
31+
path: /var/run/nri/nri.sock
32+
type: Socket
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
apiVersion: kustomize.config.k8s.io/v1beta1
2+
kind: Kustomization
3+
4+
namespace: kube-system
5+
6+
resources:
7+
- daemonset.yaml
8+
9+
images:
10+
- name: plugin
11+
newName: ghcr.io/containerd/nri/plugins/network-device-injector
12+
newTag: unstable
13+
14+
labels:
15+
- includeSelectors: true
16+
pairs:
17+
app.kubernetes.io/name: nri-plugin-network-device-injector

0 commit comments

Comments
 (0)