Created
May 1, 2024 17:37
-
-
Save ormergi/4bdbb69dbd356d809042a1808fa3c5e6 to your computer and use it in GitHub Desktop.
Deploy Passt binding CNI plugin on Openshift
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
--- | |
apiVersion: v1 | |
kind: ServiceAccount | |
metadata: | |
name: passt-binding-cni | |
namespace: kube-system | |
--- | |
apiVersion: security.openshift.io/v1 | |
kind: SecurityContextConstraints | |
metadata: | |
name: passt-binding-cni | |
allowPrivilegedContainer: true | |
allowHostDirVolumePlugin: true | |
allowHostIPC: false | |
allowHostNetwork: false | |
allowHostPID: false | |
allowHostPorts: false | |
readOnlyRootFilesystem: false | |
runAsUser: | |
type: RunAsAny | |
seLinuxContext: | |
type: RunAsAny | |
users: | |
- system:serviceaccount:kube-system:passt-binding-cni | |
volumes: | |
- "*" | |
allowedCapabilities: [] | |
defaultAddCapabilities: [] | |
priority: [] | |
requiredDropCapabilities: [] | |
--- | |
apiVersion: apps/v1 | |
kind: DaemonSet | |
metadata: | |
name: passt-binding-cni | |
namespace: kube-system | |
labels: | |
app: passt-binding-cni | |
spec: | |
selector: | |
matchLabels: | |
name: passt-binding-cni | |
template: | |
metadata: | |
labels: | |
name: passt-binding-cni | |
app: passt-binding-cni | |
spec: | |
serviceAccountName: passt-binding-cni | |
nodeSelector: | |
kubernetes.io/os: linux | |
containers: | |
- name: installer | |
resources: | |
requests: | |
cpu: "100m" | |
memory: "50Mi" | |
limits: | |
cpu: "100m" | |
memory: "50Mi" | |
securityContext: | |
privileged: true | |
image: | |
command: [ "/bin/sh", "-cex" ] | |
args: | |
- | | |
ls -la "/cni/network-passt-binding" | |
ls -la "/var/lib/cni/bin" | |
cp -f "/cni/network-passt-binding" "/var/lib/cni/bin" | |
echo "passt binding CNI plugin installation complete" | |
sleep infinity | |
volumeMounts: | |
- name: cnibin | |
mountPath: /var/lib/cni/bin | |
volumes: | |
- name: cnibin | |
hostPath: | |
path: /var/lib/cni/bin |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment