-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
crio, deploy: provide manifests to deploy controller for this runtime
This PR changes the manifest templating to also provide a manifest for CRIO based installations. This manifest features a different runtime configuration, which will cause the controller to use a different container runtime to access the pod's sandbox ID, and namespace. The golang code is also updated to use this new runtime, when configured. Signed-off-by: Miguel Duarte Barroso <[email protected]>
- Loading branch information
Showing
6 changed files
with
163 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,138 @@ | ||
--- | ||
kind: ClusterRole | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
metadata: | ||
name: dynamic-networks-controller | ||
rules: | ||
- apiGroups: ["k8s.cni.cncf.io"] | ||
resources: | ||
- network-attachment-definitions | ||
verbs: | ||
- get | ||
- list | ||
- watch | ||
- apiGroups: | ||
- "" | ||
resources: | ||
- pods | ||
- pods/status | ||
verbs: | ||
- get | ||
- list | ||
- update | ||
- watch | ||
- apiGroups: | ||
- "" | ||
- events.k8s.io | ||
resources: | ||
- events | ||
verbs: | ||
- create | ||
- patch | ||
- update | ||
--- | ||
kind: ClusterRoleBinding | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
metadata: | ||
name: dynamic-networks-controller | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: ClusterRole | ||
name: dynamic-networks-controller | ||
subjects: | ||
- kind: ServiceAccount | ||
name: dynamic-networks-controller | ||
namespace: kube-system | ||
--- | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: dynamic-networks-controller | ||
namespace: kube-system | ||
--- | ||
kind: ConfigMap | ||
apiVersion: v1 | ||
metadata: | ||
name: dynamic-networks-controller-config | ||
namespace: kube-system | ||
labels: | ||
tier: node | ||
app: multus-dynamic-networks-controller | ||
data: | ||
dynamic-networks-config.json: | | ||
{ | ||
"criType": "crio", | ||
"criSocketPath": "/host/run/crio/crio.sock", | ||
"multusSocketPath": "/host/run/multus/multus.sock" | ||
} | ||
--- | ||
apiVersion: apps/v1 | ||
kind: DaemonSet | ||
metadata: | ||
name: dynamic-networks-controller-ds | ||
namespace: kube-system | ||
labels: | ||
tier: node | ||
app: dynamic-networks-controller | ||
name: dynamic-networks-controller | ||
spec: | ||
selector: | ||
matchLabels: | ||
name: dynamic-networks-controller | ||
updateStrategy: | ||
type: RollingUpdate | ||
template: | ||
metadata: | ||
labels: | ||
tier: node | ||
app: dynamic-networks-controller | ||
name: dynamic-networks-controller | ||
spec: | ||
tolerations: | ||
- operator: Exists | ||
effect: NoSchedule | ||
- operator: Exists | ||
effect: NoExecute | ||
serviceAccountName: dynamic-networks-controller | ||
containers: | ||
- name: dynamic-networks-controller | ||
env: | ||
- name: NODE_NAME | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: spec.nodeName | ||
image: ghcr.io/maiqueb/multus-dynamic-networks-controller:latest-amd64 | ||
command: [ "/dynamic-networks-controller" ] | ||
args: | ||
- "-config=/etc/dynamic-networks-controller/dynamic-networks-config.json" | ||
- "-v=5" | ||
resources: | ||
requests: | ||
cpu: "100m" | ||
memory: "50Mi" | ||
securityContext: | ||
privileged: true | ||
volumeMounts: | ||
- name: dynamic-networks-controller-config-dir | ||
mountPath: /etc/dynamic-networks-controller/ | ||
readOnly: true | ||
- name: multus-server-socket | ||
mountPath: /host/run/multus/multus.sock | ||
- name: cri-socket | ||
mountPath: /host/run/crio/crio.sock | ||
terminationGracePeriodSeconds: 10 | ||
volumes: | ||
- name: dynamic-networks-controller-config-dir | ||
configMap: | ||
name: dynamic-networks-controller-config | ||
items: | ||
- key: dynamic-networks-config.json | ||
path: dynamic-networks-config.json | ||
- name: multus-server-socket | ||
hostPath: | ||
path: /run/multus/multus.sock | ||
type: Socket | ||
- name: cri-socket | ||
hostPath: | ||
path: /run/crio/crio.sock | ||
type: Socket |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters