From cda9d563ef843be5f80ce5755cb291c68dc6e3e8 Mon Sep 17 00:00:00 2001 From: Srivahni Date: Mon, 5 Aug 2019 15:39:34 -0700 Subject: Skeletal code for visualization-operator This visualization-operator(based on operator-sdk) when deployed, should be able to manage(add/update/delete) the datasources dynamically without restarting the grafana pods. Issue-ID: ONAPARC-393 Signed-off-by: Srivahni Change-Id: I2df3659aca5dd9ad59cf58adaf3c30999829fa2f --- .../visualization-operator/build/bin/entrypoint | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 vnfs/DAaaS/microservices/visualization-operator/build/bin/entrypoint (limited to 'vnfs/DAaaS/microservices/visualization-operator/build/bin/entrypoint') diff --git a/vnfs/DAaaS/microservices/visualization-operator/build/bin/entrypoint b/vnfs/DAaaS/microservices/visualization-operator/build/bin/entrypoint new file mode 100755 index 00000000..f862b484 --- /dev/null +++ b/vnfs/DAaaS/microservices/visualization-operator/build/bin/entrypoint @@ -0,0 +1,12 @@ +#!/bin/sh -e + +# This is documented here: +# https://docs.openshift.com/container-platform/3.11/creating_images/guidelines.html#openshift-specific-guidelines + +if ! whoami &>/dev/null; then + if [ -w /etc/passwd ]; then + echo "${USER_NAME:-visualization-operator}:x:$(id -u):$(id -g):${USER_NAME:-visualization-operator} user:${HOME}:/sbin/nologin" >> /etc/passwd + fi +fi + +exec ${OPERATOR} $@ -- cgit 1.2.3-korg