Skip to content

Commit

Permalink
f
Browse files Browse the repository at this point in the history
  • Loading branch information
deads2k committed Mar 1, 2018
1 parent de25876 commit 5861580
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
5 changes: 4 additions & 1 deletion pkg/oc/bootstrap/clusterup/componentinstall/apply_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,12 @@ type List struct {

const listBashScript = `#!/bin/sh
set -e
set -x
ls -alh /
ns=""
if [ -f /namespace-file ]; then
if [ -s /namespace-file ]; then
ns="--namespace=$(cat /namespace-file) "
fi
Expand Down
9 changes: 6 additions & 3 deletions pkg/oc/bootstrap/clusterup/componentinstall/apply_template.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,20 @@ type Template struct {

const templateBashScript = `#!/bin/sh
set -e
set -x
ls -alh /
while read p; do
oc adm policy add-scc-to-user --config=/kubeconfig.kubeconfig privileged ${p} --loglevel=8
done </privileged-sa-list.txt
ns=""
if [ -f /namespace-file ]; then
if [ -s /namespace-file ]; then
ns="--namespace=$(cat /namespace-file) "
fi
if [ -f /rbac.yaml ]; then
if [ -s /rbac.yaml ]; then
oc process --local -o yaml --ignore-unknown-parameters --param-file=/param-file.txt -f /rbac.yaml | oc auth reconcile --config=/kubeconfig.kubeconfig -f -
fi
Expand Down Expand Up @@ -68,7 +71,7 @@ func (opt Template) Install(dockerClient dockerhelper.Interface, imageRunHelper
HostNetwork().
HostPid().
Entrypoint("sh").
Command("-c", "chmod 755 /install.sh; /install.sh").Run()
Command("-c", "echo '"+opt.Name+"'; chmod 755 /install.sh; /install.sh").Run()
if err != nil {
lastErr = errors.NewError("failed to install %q: %v", opt.Name, err).WithCause(err)
return false, nil
Expand Down

0 comments on commit 5861580

Please sign in to comment.