Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix development container #4875

Merged
merged 1 commit into from
Feb 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion aio/develop/gosu-command.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,10 @@ GOSU="exec /usr/sbin/gosu user"
# Run command if K8S_DASHBOARD_CMD is set,
# otherwise run `npm ${K8S_DASHBOARD_NPM_CMD}`.
if [[ -n "${K8S_DASHBOARD_CMD}" ]] ; then
# Run npm command
# Run specified command
echo "Run '${K8S_DASHBOARD_CMD}'"
${GOSU} ${K8S_DASHBOARD_CMD}
else
# Run npm command
${GOSU} aio/develop/npm-command.sh
fi
9 changes: 5 additions & 4 deletions aio/develop/npm-command.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# Install dependencies
echo "Install dependencies"
npm ci

# Run npm command if K8S_DASHBOARD_NPM_CMD is set,
# otherwise install and start dashboard.
# otherwise start dashboard.
if [[ -n "${K8S_DASHBOARD_NPM_CMD}" ]] ; then
# Run npm command
echo "Run npm '${K8S_DASHBOARD_NPM_CMD}'"
Expand All @@ -23,9 +27,6 @@ if [[ -n "${K8S_DASHBOARD_NPM_CMD}" ]] ; then
--kubernetes-dashboard:sidecar_host=${K8S_DASHBOARD_SIDECAR_HOST} \
--kubernetes-dashboard:port=${K8S_DASHBOARD_PORT}
else
# Install dashboard.
echo "Install dashboard"
npm ci
if [[ "${K8S_OWN_CLUSTER}" != true ]] ; then
# Stop cluster.
echo "Stop cluster"
Expand Down
2 changes: 1 addition & 1 deletion aio/develop/run-npm-on-container.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ LOCAL_GID=$(id -g)
# command with K8S_DASHBOAD_NPM_CMD.
# But if K8S_DASHBOARD_CMD is set, the command in K8S_DASHBOARD_CMD will be
# executed instead of `npm ${K8S_DASHBOARD_NPM_CMD}`.
K8S_DASHBOARD_NPM_CMD=$*
K8S_DASHBOARD_NPM_CMD=${K8S_DASHBOARD_NPM_CMD:-*}

# kubeconfig for dashboard.
# This will be mounted and certain npm command can modify it,
Expand Down