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

remove host toolchaincluster SA creation #105

Closed
Prev Previous commit
revert creation of the SA only
mfrancisc committed Apr 14, 2024
commit 72cd651f5fcc41af29ff6bc8d597a7501b48d61b
13 changes: 7 additions & 6 deletions scripts/add-cluster.sh
Original file line number Diff line number Diff line change
@@ -30,6 +30,13 @@ if [[ -n `oc get rolebinding ${SA_NAME} 2>/dev/null` ]]; then
oc delete rolebinding ${SA_NAME} -n ${OPERATOR_NS} ${OC_ADDITIONAL_PARAMS}
fi

cat <<EOF | oc apply ${OC_ADDITIONAL_PARAMS} -f -
apiVersion: v1
kind: ServiceAccount
metadata:
name: ${SA_NAME}
namespace: ${OPERATOR_NS}
EOF

if [[ ${JOINING_CLUSTER_TYPE} != "host" ]]; then
CLUSTER_ROLE_NAME=${SA_NAME}-${OPERATOR_NS}-toolchaincluster
@@ -39,12 +46,6 @@ if [[ ${JOINING_CLUSTER_TYPE} != "host" ]]; then
fi
# Additional permissions within user namespace are specified as part of namespace templates. eg. https://github.com/codeready-toolchain/host-operator/blob/0e292ef3fedea2a839e6800bfee635c4db41f088/deploy/templates/nstemplatetiers/appstudio/ns_appstudio.yaml#L19-L53
cat <<EOF | oc apply ${OC_ADDITIONAL_PARAMS} -f -
apiVersion: v1
kind: ServiceAccount
metadata:
name: ${SA_NAME}
namespace: ${OPERATOR_NS}
---
kind: Role
apiVersion: rbac.authorization.k8s.io/v1
metadata: