che-operator/deploy.sh

30 lines
1.0 KiB
Bash
Executable File

#!/bin/bash
#
# Copyright (c) 2012-2018 Red Hat, Inc.
# This program and the accompanying materials are made
# available under the terms of the Eclipse Public License 2.0
# which is available at https://www.eclipse.org/legal/epl-2.0/
#
# SPDX-License-Identifier: EPL-2.0
#
# Contributors:
# Red Hat, Inc. - initial API and implementation
#set -e
BASE_DIR=$(cd "$(dirname "$0")"; pwd)
oc apply -f ${BASE_DIR}/service_account.yaml
oc apply -f ${BASE_DIR}/role.yaml
oc apply -f ${BASE_DIR}/role_binding.yaml
oc apply -f ${BASE_DIR}/crds/org_v1_che_crd.yaml
# sometimes the operator cannot get CRD right away
sleep 2
# uncomment if you need Login with OpenShift and/or use self signed certificates and tls
#oc new-app -f ${BASE_DIR}deploy/role_binding_oauth.yaml -p NAMESPACE=$1 -n=$1
#oc apply -f ${BASE_DIR}deploy/cluster_role.yaml -n=$1
#oc new-app -f ${BASE_DIR}deploy/role_binding_crt.yaml -p NAMESPACE=$1
#oc apply -f ${BASE_DIR}deploy/role_get_tls.yaml
oc apply -f ${BASE_DIR}/deploy/operator.yaml
oc apply -f ${BASE_DIR}/deploy/crds/org_v1_che_cr.yaml