Skip to content

Instantly share code, notes, and snippets.

@kyrtapz
Last active December 29, 2023 07:01
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save kyrtapz/0f6cf7bbe93bd4e33ff69e43c43ce10b to your computer and use it in GitHub Desktop.
Save kyrtapz/0f6cf7bbe93bd4e33ff69e43c43ce10b to your computer and use it in GitHub Desktop.
apiVersion: v1
kind: Pod
metadata:
name: ovsdb-mon
spec:
containers:
- name: ovsdb-mon
image: quay.io/pdiak/fedora-ovn:latest
resources:
requests:
memory: "64Mi"
limits:
memory: "256Mi"
imagePullPolicy: IfNotPresent
env:
- name: OVS_RUNDIR
value: "/run/ovn"
command:
- /bin/bash
- -c
- "set -xe\n
\ git clone https://github.com/amorenoz/ovsdb-mon\n
\ pushd ovsdb-mon\n
\ #The following trick makes it work on upstream ovn-kubernetes as it uses different paths, it does nothing on openshift\"\n
\ ln -s /run/openvswitch/ovnnb_db.sock ${OVS_RUNDIR}/ovnnb_db.sock 2> /dev/null || true\n
\ ovsdb-client get-schema \"unix:${OVS_RUNDIR}/ovnnb_db.sock\" OVN_Northbound > ovn.schema\n
\ SCHEMA=ovn.schema make && cp ./bin/ovsdb-mon /usr/local/bin/\n
\ popd\n
\ trap : TERM INT; sleep infinity & wait"
volumeMounts:
- mountPath: /run/ovn/
name: run-ovn
- mountPath: /run/openvswitch/
name: run-ovs
readinessProbe:
exec:
command:
- file
- /usr/local/bin/ovsdb-mon
initialDelaySeconds: 5
volumes:
- hostPath:
path: /run/ovn
type: ""
name: run-ovn
- hostPath:
path: /run/openvswitch
type: ""
name: run-ovs
tolerations:
- key: node-role.kubernetes.io/master
operator: Exists
hostNetwork: true
nodeSelector:
node-role.kubernetes.io/master: ""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment