Skip to content

Commit 3018938

Browse files
committed
remove openshift cli and friends
1 parent 1f270ca commit 3018938

File tree

24 files changed

+38
-121
lines changed

24 files changed

+38
-121
lines changed

contrib/vagrant/provision-util.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ os::provision::install-cmds() {
5757
local deployed_root=$1
5858

5959
local output_path="$(os::build::get-bin-output-path "${deployed_root}")"
60-
cp ${output_path}/{openshift,oc,osadm} /usr/bin
60+
cp ${output_path}/{openshift,oc} /usr/bin
6161
}
6262

6363
os::provision::add-to-hosts-file() {
@@ -102,7 +102,7 @@ os::provision::init-certs() {
102102
pushd "${config_root}" > /dev/null
103103

104104
# Master certs
105-
/usr/bin/openshift admin ca create-master-certs \
105+
/usr/bin/oc adm ca create-master-certs \
106106
--overwrite=false \
107107
--cert-dir="${cert_dir}" \
108108
--master="https://${master_ip}:8443" \
@@ -112,7 +112,7 @@ os::provision::init-certs() {
112112
for (( i=0; i < ${#node_names[@]}; i++ )); do
113113
local name=${node_names[$i]}
114114
local ip=${node_ips[$i]}
115-
/usr/bin/openshift admin create-node-config \
115+
/usr/bin/oc adm create-node-config \
116116
--node-dir="${server_config_dir}/node-${name}" \
117117
--node="${name}" \
118118
--hostnames="${name},${ip}" \
@@ -386,7 +386,7 @@ os::provision::disable-node() {
386386
os::provision::wait-for-condition "${msg}" "${condition}"
387387

388388
echo "Disabling scheduling for node ${node_name}"
389-
"$(OS_ROOT="${origin_root}" os::util::find::built_binary osadm)" --config="${config}" \
389+
"$(OS_ROOT="${origin_root}" os::util::find::built_binary oc)" adm --config="${config}" \
390390
manage-node "${node_name}" --schedulable=false > /dev/null
391391
}
392392

examples/data-population/limits.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ LIMIT=$(dirname "${BASH_SOURCE}")/limit.yaml
1414

1515
for ((i=1; i <=$NUM_PROJECTS; i++))
1616
do
17-
openshift cli create -f $LIMIT --namespace=${PROJECT_NAME_PREFIX}${i}
17+
oc create -f $LIMIT --namespace=${PROJECT_NAME_PREFIX}${i}
1818
done
1919

2020
echo "Done"

examples/data-population/quotas.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ QUOTA=$(dirname "${BASH_SOURCE}")/quota.yaml
1414

1515
for ((i=1; i <=$NUM_PROJECTS; i++))
1616
do
17-
openshift cli create -f $QUOTA --namespace=${PROJECT_NAME_PREFIX}${i}
17+
oc create -f $QUOTA --namespace=${PROJECT_NAME_PREFIX}${i}
1818
done
1919

2020
echo "Done"

examples/data-population/services.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ SERVICE=$(dirname "${BASH_SOURCE}")/service.yaml
1515

1616
for ((i=1; i <=$NUM_PROJECTS; i++))
1717
do
18-
openshift cli create -f $SERVICE --namespace=${PROJECT_NAME_PREFIX}${i}
18+
oc create -f $SERVICE --namespace=${PROJECT_NAME_PREFIX}${i}
1919
done
2020

2121
echo "Done"

examples/data-population/users.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ for ((i=1; i <=$NUM_USERS; i++))
1111
do
1212
USERNAME=${USER_NAME_PREFIX}${i}
1313
USERCONFIG=/tmp/${USERNAME}.config
14-
openshift cli config view --minify --raw -o yaml > ${USERCONFIG}
14+
oc config view --minify --raw -o yaml > ${USERCONFIG}
1515
KUBECONFIG=${USERCONFIG} oc login --username=$USERNAME --password=whocares
1616
done
1717

hack/lib/build/binaries.sh

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -347,12 +347,6 @@ function os::build::place_bins() {
347347
if [[ $platform == "windows/amd64" ]]; then
348348
suffix=".exe"
349349
fi
350-
for linkname in "${OPENSHIFT_BINARY_COPY[@]}"; do
351-
local src="${release_binpath}/openshift${suffix}"
352-
if [[ -f "${src}" ]]; then
353-
ln "${release_binpath}/openshift${suffix}" "${release_binpath}/${linkname}${suffix}"
354-
fi
355-
done
356350
for linkname in "${OC_BINARY_COPY[@]}"; do
357351
local src="${release_binpath}/oc${suffix}"
358352
if [[ -f "${src}" ]]; then

hack/lib/constants.sh

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,6 @@ readonly OPENSHIFT_BINARY_SYMLINKS=(
7272
openshift-manage-dockerfile
7373
openshift-extract-image-content
7474
origin
75-
osc
76-
oadm
77-
osadm
78-
)
79-
readonly OPENSHIFT_BINARY_COPY=(
80-
oadm
8175
)
8276
readonly OC_BINARY_COPY=(
8377
kubectl

hack/lib/start.sh

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,9 @@ readonly -f os::start::configure_server
6161
function os::start::internal::create_master_certs() {
6262
local version="${1:-}"
6363
local openshift_volumes=( "${MASTER_CONFIG_DIR}" )
64-
local openshift_executable
65-
openshift_executable="$(os::start::internal::openshift_executable "${version}")"
6664

6765
os::log::debug "Creating certificates for the OpenShift server"
68-
${openshift_executable} admin ca create-master-certs \
66+
oc adm ca create-master-certs \
6967
--overwrite=false \
7068
--master="${MASTER_ADDR}" \
7169
--cert-dir="${MASTER_CONFIG_DIR}" \
@@ -89,11 +87,9 @@ readonly -f os::start::internal::create_master_certs
8987
function os::start::internal::configure_node() {
9088
local version="${1:-}"
9189
local openshift_volumes=( "${MASTER_CONFIG_DIR}" "${NODE_CONFIG_DIR}" )
92-
local openshift_executable
93-
openshift_executable="$(os::start::internal::openshift_executable "${version}")"
9490

9591
os::log::debug "Creating node configuration for the OpenShift server"
96-
${openshift_executable} admin create-node-config \
92+
oc adm create-node-config \
9793
--node-dir="${NODE_CONFIG_DIR}" \
9894
--node="${KUBELET_HOST}" \
9995
--hostnames="${KUBELET_HOST}" \
@@ -602,9 +598,9 @@ function os::start::router() {
602598
cat "${MASTER_CONFIG_DIR}/router.crt" \
603599
"${MASTER_CONFIG_DIR}/router.key" \
604600
"${MASTER_CONFIG_DIR}/ca.crt" > "${MASTER_CONFIG_DIR}/router.pem"
605-
openshift admin router --config="${ADMIN_KUBECONFIG}" --images="${USE_IMAGES}" --service-account=router --default-cert="${MASTER_CONFIG_DIR}/router.pem"
601+
oc adm router --config="${ADMIN_KUBECONFIG}" --images="${USE_IMAGES}" --service-account=router --default-cert="${MASTER_CONFIG_DIR}/router.pem"
606602
else
607-
openshift admin router --config="${ADMIN_KUBECONFIG}" --images="${USE_IMAGES}" --service-account=router
603+
oc adm router --config="${ADMIN_KUBECONFIG}" --images="${USE_IMAGES}" --service-account=router
608604
fi
609605

610606
# Set the SYN eater to make router reloads more robust
@@ -631,7 +627,7 @@ function os::start::registry() {
631627
os::log::debug "Installing the registry"
632628
# For testing purposes, ensure the quota objects are always up to date in the registry by
633629
# disabling project cache.
634-
openshift admin registry --config="${ADMIN_KUBECONFIG}" --images="${USE_IMAGES}" --enforce-quota -o json | \
630+
oc adm registry --config="${ADMIN_KUBECONFIG}" --images="${USE_IMAGES}" --enforce-quota -o json | \
635631
oc env --config="${ADMIN_KUBECONFIG}" -f - --output json "REGISTRY_MIDDLEWARE_REPOSITORY_OPENSHIFT_PROJECTCACHETTL=0" | \
636632
oc create --config="${ADMIN_KUBECONFIG}" -f -
637633
}

hack/lib/util/docs.sh

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,15 +102,13 @@ function os::util::gen-docs() {
102102
generate_documentation "${OUTPUT_DIR}"
103103
generate_manual_pages "${MAN_OUTPUT_DIR}" "oc"
104104
generate_manual_pages "${MAN_OUTPUT_DIR}" "openshift"
105-
generate_manual_pages "${MAN_OUTPUT_DIR}" "oadm"
106105
}
107106
readonly -f os::util::gen-docs
108107

109108
# os::util::set-man-placeholder puts a placeholder for every generated manpage.
110109
function os::util::set-man-placeholder() {
111110
MAN_OUTPUT_DIR="$1"
112-
declare -a generated_files=( "${1}/.files_generated_oadm=${1}/.files_generated_oadm"
113-
"${1}/.files_generated_oc=${1}/.files_generated_oc"
111+
declare -a generated_files=( "${1}/.files_generated_oc=${1}/.files_generated_oc"
114112
"${1}/.files_generated_openshift=${1}/.files_generated_openshift" )
115113

116114
# remove all of the old manpages; we don't want to check them in.

hack/update-generated-completions.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ function os::build::gen-completions() {
1616
# generate the new files
1717
${OS_OUTPUT_BINPATH}/${platform}/oc completion ${shell} > $tmpdir/oc
1818
${OS_OUTPUT_BINPATH}/${platform}/openshift completion ${shell} > $tmpdir/openshift
19-
${OS_OUTPUT_BINPATH}/${platform}/oadm completion ${shell} > $tmpdir/oadm
2019
# create the list of generated files
2120
ls "${tmpdir}" | LC_ALL=C sort > "${tmpdir}/.files_generated"
2221

0 commit comments

Comments
 (0)