-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Advanced authorization (#1789)
* feat: Advanced authorization Signed-off-by: Anatolii Bazko <[email protected]>
- Loading branch information
Showing
21 changed files
with
492 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
64 changes: 64 additions & 0 deletions
64
build/scripts/minikube-tests/test-operator-from-sources.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
#!/usr/bin/env bash | ||
# | ||
# Copyright (c) 2019-2023 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 | ||
|
||
OPERATOR_REPO=$(dirname "$(dirname "$(dirname "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")")")") | ||
source "${OPERATOR_REPO}/build/scripts/minikube-tests/common.sh" | ||
|
||
init() { | ||
unset CR_PATCH_YAML | ||
|
||
while [[ "$#" -gt 0 ]]; do | ||
case $1 in | ||
'--help'|'-h') usage; exit;; | ||
'--cr-patch-yaml') CR_PATCH_YAML=$2; shift 1;; | ||
esac | ||
shift 1 | ||
done | ||
} | ||
|
||
usage () { | ||
echo "Deploy Eclipse Che from sources" | ||
echo | ||
echo "Usage:" | ||
echo -e "\t$0 [--cr-patch-yaml <path_to_cr_patch>]" | ||
echo | ||
echo "OPTIONS:" | ||
echo -e "\t--cr-patch-yaml CheCluster CR patch yaml file" | ||
echo | ||
echo "Example:" | ||
echo -e "\t$0" | ||
} | ||
|
||
runTest() { | ||
buildAndCopyCheOperatorImageToMinikube | ||
yq -riSY '.spec.template.spec.containers[0].image = "'${OPERATOR_IMAGE}'"' "${CURRENT_OPERATOR_VERSION_TEMPLATE_PATH}/che-operator/kubernetes/operator.yaml" | ||
yq -riSY '.spec.template.spec.containers[0].imagePullPolicy = "IfNotPresent"' "${CURRENT_OPERATOR_VERSION_TEMPLATE_PATH}/che-operator/kubernetes/operator.yaml" | ||
|
||
if [[ -n "${CR_PATCH_YAML}" ]]; then | ||
chectl server:deploy --batch --platform minikube \ | ||
--templates "${CURRENT_OPERATOR_VERSION_TEMPLATE_PATH}" \ | ||
--che-operator-cr-patch-yaml "${CR_PATCH_YAML}" | ||
else | ||
chectl server:deploy --batch --platform minikube \ | ||
--templates "${CURRENT_OPERATOR_VERSION_TEMPLATE_PATH}" | ||
fi | ||
} | ||
|
||
pushd ${OPERATOR_REPO} >/dev/null | ||
initDefaults | ||
init "$@" | ||
initTemplates | ||
runTest | ||
popd >/dev/null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.