Skip to content

Commit 5cf60eb

Browse files
authored
Merge pull request #197 from marquiz/devel/plugin-images-kustomize
deployment: add minimal kustomize overlays for deploying plugins
2 parents b382750 + be0d68d commit 5cf60eb

38 files changed

+550
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
apiVersion: kustomize.config.k8s.io/v1alpha1
2+
kind: Component
3+
images:
4+
- name: '*'
5+
newTag: v0.10.0
6+
patches:
7+
- target:
8+
kind: DaemonSet
9+
patch: |
10+
- op: replace
11+
path: /spec/template/spec/containers/0/imagePullPolicy
12+
value: IfNotPresent
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
apiVersion: kustomize.config.k8s.io/v1alpha1
2+
kind: Component
3+
images:
4+
- name: '*'
5+
newTag: unstable
6+
patches:
7+
- target:
8+
kind: DaemonSet
9+
patch: |
10+
- op: replace
11+
path: /spec/template/spec/containers/0/imagePullPolicy
12+
value: Always
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
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+
args:
13+
- "-idx"
14+
- "10"
15+
resources:
16+
requests:
17+
cpu: "2m"
18+
memory: "5Mi"
19+
securityContext:
20+
allowPrivilegeEscalation: false
21+
capabilities:
22+
drop:
23+
- ALL
24+
volumeMounts:
25+
- name: nri-socket
26+
mountPath: /var/run/nri/nri.sock
27+
volumes:
28+
- name: nri-socket
29+
hostPath:
30+
path: /var/run/nri/nri.sock
31+
type: Socket
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
apiVersion: kustomize.config.k8s.io/v1beta1
2+
kind: Kustomization
3+
namespace: kube-system
4+
resources:
5+
- daemonset.yaml
6+
images:
7+
- name: plugin
8+
newName: ghcr.io/containerd/nri/plugins/device-injector
9+
labels:
10+
- includeSelectors: true
11+
pairs:
12+
app.kubernetes.io/name: nri-plugin-device-injector
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
apiVersion: kustomize.config.k8s.io/v1beta1
2+
kind: Kustomization
3+
resources:
4+
- base/
5+
components:
6+
- ../components/image-stable
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
apiVersion: kustomize.config.k8s.io/v1beta1
2+
kind: Kustomization
3+
resources:
4+
- ../base/
5+
components:
6+
- ../../components/image-unstable
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
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+
args: []
12+
resources:
13+
requests:
14+
cpu: "2m"
15+
memory: "5Mi"
16+
securityContext:
17+
allowPrivilegeEscalation: false
18+
capabilities:
19+
drop:
20+
- ALL
21+
volumeMounts:
22+
- name: nri-socket
23+
mountPath: /var/run/nri/nri.sock
24+
volumes:
25+
- name: nri-socket
26+
hostPath:
27+
path: /var/run/nri/nri.sock
28+
type: Socket
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
apiVersion: kustomize.config.k8s.io/v1beta1
2+
kind: Kustomization
3+
namespace: kube-system
4+
resources:
5+
- daemonset.yaml
6+
images:
7+
- name: plugin
8+
newName: ghcr.io/containerd/nri/plugins/differ
9+
labels:
10+
- includeSelectors: true
11+
pairs:
12+
app.kubernetes.io/name: nri-plugin-device-injector
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
apiVersion: kustomize.config.k8s.io/v1beta1
2+
kind: Kustomization
3+
resources:
4+
- base/
5+
components:
6+
- ../components/image-stable
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
apiVersion: kustomize.config.k8s.io/v1beta1
2+
kind: Kustomization
3+
resources:
4+
- ../base/
5+
components:
6+
- ../../components/image-unstable

0 commit comments

Comments
 (0)