Skip to content

Commit 0b2d12c

Browse files
Move deployer images into oc
1 parent 01d1b40 commit 0b2d12c

File tree

6 files changed

+30
-26
lines changed

6 files changed

+30
-26
lines changed

hack/lib/build/binaries.sh

+3
Original file line numberDiff line numberDiff line change
@@ -412,6 +412,9 @@ function os::build::make_openshift_binary_symlinks() {
412412
done
413413
fi
414414
if [[ -f "${OS_OUTPUT_BINPATH}/${platform}/oc" ]]; then
415+
for linkname in "${OC_BINARY_SYMLINKS[@]}"; do
416+
ln -sf oc "${OS_OUTPUT_BINPATH}/${platform}/${linkname}"
417+
done
415418
for linkname in "${OC_BINARY_COPY[@]}"; do
416419
ln -sf oc "${OS_OUTPUT_BINPATH}/${platform}/${linkname}"
417420
done

hack/lib/constants.sh

+11-10
Original file line numberDiff line numberDiff line change
@@ -66,14 +66,15 @@ readonly OS_GOVET_BLACKLIST=(
6666
#If you update this list, be sure to get the images/origin/Dockerfile
6767
readonly OPENSHIFT_BINARY_SYMLINKS=(
6868
openshift-router
69-
openshift-deploy
7069
openshift-recycle
70+
)
71+
readonly OC_BINARY_SYMLINKS=(
72+
openshift-deploy
7173
openshift-sti-build
7274
openshift-docker-build
7375
openshift-git-clone
7476
openshift-manage-dockerfile
7577
openshift-extract-image-content
76-
origin
7778
)
7879
readonly OC_BINARY_COPY=(
7980
kubectl
@@ -381,18 +382,18 @@ function os::build::images() {
381382
for i in `jobs -p`; do wait $i; done
382383

383384
# images that depend on "${tag_prefix}-cli"
384-
( os::build::image "${tag_prefix}-tests" images/tests ) &
385-
( os::build::image "${tag_prefix}-control-plane" images/origin ) &
385+
( os::build::image "${tag_prefix}-tests" images/tests ) &
386+
( os::build::image "${tag_prefix}-control-plane" images/origin ) &
387+
( os::build::image "${tag_prefix}-deployer" images/deployer ) &
388+
( os::build::image "${tag_prefix}-docker-builder" images/builder/docker/docker-builder ) &
386389

387390
for i in `jobs -p`; do wait $i; done
388391

389392
# images that depend on "${tag_prefix}-control-plane"
390-
( os::build::image "${tag_prefix}-haproxy-router" images/router/haproxy ) &
391-
( os::build::image "${tag_prefix}-deployer" images/deployer ) &
392-
( os::build::image "${tag_prefix}-recycler" images/recycler ) &
393-
( os::build::image "${tag_prefix}-docker-builder" images/builder/docker/docker-builder ) &
394-
( os::build::image "${tag_prefix}-f5-router" images/router/f5 ) &
395-
( os::build::image "${tag_prefix}-node" images/node ) &
393+
( os::build::image "${tag_prefix}-haproxy-router" images/router/haproxy ) &
394+
( os::build::image "${tag_prefix}-recycler" images/recycler ) &
395+
( os::build::image "${tag_prefix}-f5-router" images/router/f5 ) &
396+
( os::build::image "${tag_prefix}-node" images/node ) &
396397

397398
for i in `jobs -p`; do wait $i; done
398399
}

images/builder/docker/docker-builder/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#
1111
# The standard name for this image is openshift/origin-docker-builder
1212
#
13-
FROM openshift/origin-control-plane
13+
FROM openshift/origin-cli
1414

1515
RUN INSTALL_PKGS=" \
1616
which tar wget hostname sysvinit-tools util-linux \

images/deployer/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#
1111
# The standard name for this image is openshift/origin-deployer
1212
#
13-
FROM openshift/origin-control-plane
13+
FROM openshift/origin-cli
1414

1515
LABEL io.k8s.display-name="OpenShift Origin Deployer" \
1616
io.k8s.description="This is a component of OpenShift Origin and executes the user deployment process to roll out new containers. It may be used as a base image for building your own custom deployer image." \

pkg/cmd/openshift/openshift.go

-14
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ import (
1616
kcmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util"
1717

1818
"github.com/openshift/origin/pkg/cmd/flagtypes"
19-
"github.com/openshift/origin/pkg/cmd/infra/builder"
20-
"github.com/openshift/origin/pkg/cmd/infra/deployer"
2119
irouter "github.com/openshift/origin/pkg/cmd/infra/router"
2220
"github.com/openshift/origin/pkg/cmd/recycle"
2321
"github.com/openshift/origin/pkg/cmd/server/start"
@@ -55,20 +53,8 @@ func CommandFor(basename string, stopCh <-chan struct{}) *cobra.Command {
5553
cmd = irouter.NewCommandTemplateRouter(basename)
5654
case "openshift-f5-router":
5755
cmd = irouter.NewCommandF5Router(basename)
58-
case "openshift-deploy":
59-
cmd = deployer.NewCommandDeployer(basename)
6056
case "openshift-recycle":
6157
cmd = recycle.NewCommandRecycle(basename, out)
62-
case "openshift-sti-build":
63-
cmd = builder.NewCommandS2IBuilder(basename)
64-
case "openshift-docker-build":
65-
cmd = builder.NewCommandDockerBuilder(basename)
66-
case "openshift-git-clone":
67-
cmd = builder.NewCommandGitClone(basename)
68-
case "openshift-manage-dockerfile":
69-
cmd = builder.NewCommandManageDockerfile(basename)
70-
case "openshift-extract-image-content":
71-
cmd = builder.NewCommandExtractImageContent(basename)
7258
case "origin":
7359
cmd = NewCommandOpenShift(basename, stopCh)
7460
default:

pkg/oc/cli/cli.go

+14
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ import (
1616
"k8s.io/kubernetes/pkg/kubectl/resource"
1717

1818
"github.com/openshift/origin/pkg/cmd/flagtypes"
19+
"github.com/openshift/origin/pkg/cmd/infra/builder"
20+
"github.com/openshift/origin/pkg/cmd/infra/deployer"
1921
"github.com/openshift/origin/pkg/cmd/templates"
2022
"github.com/openshift/origin/pkg/cmd/util/term"
2123
"github.com/openshift/origin/pkg/oc/admin"
@@ -316,6 +318,18 @@ func CommandFor(basename string) *cobra.Command {
316318
switch basename {
317319
case "kubectl":
318320
cmd = kubecmd.NewKubectlCommand(kcmdutil.NewFactory(nil), in, out, errout)
321+
case "openshift-deploy":
322+
cmd = deployer.NewCommandDeployer(basename)
323+
case "openshift-sti-build":
324+
cmd = builder.NewCommandS2IBuilder(basename)
325+
case "openshift-docker-build":
326+
cmd = builder.NewCommandDockerBuilder(basename)
327+
case "openshift-git-clone":
328+
cmd = builder.NewCommandGitClone(basename)
329+
case "openshift-manage-dockerfile":
330+
cmd = builder.NewCommandManageDockerfile(basename)
331+
case "openshift-extract-image-content":
332+
cmd = builder.NewCommandExtractImageContent(basename)
319333
default:
320334
// we only need this change for `oc`. `kubectl` should behave as close to `kubectl` as we can
321335
resource.OAPIToGroupified = legacygroupification.OAPIToGroupified

0 commit comments

Comments
 (0)