diff options
author | Ritu Sood <ritu.sood@intel.com> | 2019-08-06 19:35:42 -0700 |
---|---|---|
committer | Ritu Sood <ritu.sood@intel.com> | 2019-08-15 10:03:47 -0700 |
commit | 8295a28f6d6e14f5adb62138271de393015061e9 (patch) | |
tree | d11b1e799de55e89d08bc810180d99ce65e6f21e /build/bin | |
parent | aa41b49246d84b605a76d169f0c861ba0691a4fb (diff) |
Use controller runtime and operator sdk
Changing the framework to use controller
runtime and operator sdk. This allows to
add CRD controllers for Network, Provider
Network etc in the same operator. Binary
renamed to nfn-operator (Network funtion
networking).
Change-Id: Ic25a3c3f5f1418fc0614f3aede48b41d9c1156cd
Signed-off-by: Ritu Sood <ritu.sood@intel.com>
Diffstat (limited to 'build/bin')
-rwxr-xr-x | build/bin/entrypoint | 27 | ||||
-rwxr-xr-x | build/bin/user_setup | 13 |
2 files changed, 40 insertions, 0 deletions
diff --git a/build/bin/entrypoint b/build/bin/entrypoint new file mode 100755 index 0000000..af0d88a --- /dev/null +++ b/build/bin/entrypoint @@ -0,0 +1,27 @@ +#!/bin/sh -e + + +cmd=${1:-""} + +case ${cmd} in + "cni") + CNI_BIN_DIR="/host/opt/cni/bin" + OVN4NFV_CONF_DIR="/host/etc/openvswitch" + OVN4NFV_BIN_FILE="/usr/local/bin/ovn4nfvk8s-cni" + OVN4NFV_CONF_FILE="/tmp/ovn4nfv-conf/ovn4nfv_k8s.conf" + cp -f $OVN4NFV_BIN_FILE $CNI_BIN_DIR + cp -f $OVN4NFV_CONF_FILE $OVN4NFV_CONF_DIR + # Sleep forever. + sleep infinity + ;; + + "operator") + shift + exec ${OPERATOR} $@ + ;; + + *) + echo "invalid command ${cmd}" + +esac + diff --git a/build/bin/user_setup b/build/bin/user_setup new file mode 100755 index 0000000..1e36064 --- /dev/null +++ b/build/bin/user_setup @@ -0,0 +1,13 @@ +#!/bin/sh +set -x + +# ensure $HOME exists and is accessible by group 0 (we don't know what the runtime UID will be) +mkdir -p ${HOME} +chown ${USER_UID}:0 ${HOME} +chmod ug+rwx ${HOME} + +# runtime user will need to be able to self-insert in /etc/passwd +chmod g+rw /etc/passwd + +# no need for this script to remain in the image after running +rm $0 |