feat: Enable build capabilities by default (#1636)

* feat: Enable build capabilities by defau

Signed-off-by: Anatolii Bazko <abazko@redhat.com>
pull/1641/head
Anatolii Bazko 2023-03-13 15:16:23 +02:00 committed by GitHub
parent 52c673bc0c
commit 2182f45ae9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 47 additions and 33 deletions

View File

@ -662,15 +662,17 @@ create-operatorgroup: ## Creates operator group
[[ -z "$(NAME)" ]] && { echo [ERROR] NAME not defined; exit 1; }
[[ -z "$(NAMESPACE)" ]] && { echo [ERROR] NAMESPACE not defined; exit 1; }
echo '{
"apiVersion": "operators.coreos.com/v1",
"kind": "OperatorGroup",
"metadata": {
"name": "$(NAME)",
"namespace": "$(NAMESPACE)"
},
"spec": {}
}' | $(K8S_CLI) apply -f -
if [[ $$($(K8S_CLI) get operatorgroup -n "$(NAMESPACE)" --no-headers | wc -l) == 0 ]]; then
echo '{
"apiVersion": "operators.coreos.com/v1",
"kind": "OperatorGroup",
"metadata": {
"name": "$(NAME)",
"namespace": "$(NAMESPACE)"
},
"spec": {}
}' | $(K8S_CLI) apply -f -
fi
create-subscription: SHELL := /bin/bash
create-subscription: ## Creates subscription
@ -737,6 +739,7 @@ install-certmgr: ## Install Cert Manager v1.7.1
install-devworkspace: SHELL := /bin/bash
install-devworkspace: ## Install Dev Workspace operator, available channels: next, fast
[[ -z "$(CHANNEL)" ]] && { echo [ERROR] CHANNEL not defined; exit 1; }
[[ -z "$(OPERATOR_NAMESPACE)" ]] && DEFINED_OPERATOR_NAMESPACE="openshift-operators" || DEFINED_OPERATOR_NAMESPACE=$(OPERATOR_NAMESPACE)
if [[ $(PLATFORM) == "kubernetes" ]]; then
$(MAKE) create-namespace NAMESPACE="devworkspace-controller"
@ -762,13 +765,13 @@ install-devworkspace: ## Install Dev Workspace operator, available channels: nex
$(MAKE) create-catalogsource IMAGE="$${IMAGE}" NAME="devworkspace-operator" NAMESPACE="openshift-marketplace"
$(MAKE) create-subscription \
NAME="devworkspace-operator" \
NAMESPACE="openshift-operators" \
NAMESPACE=$${DEFINED_OPERATOR_NAMESPACE} \
PACKAGE_NAME="devworkspace-operator" \
CHANNEL=$(CHANNEL) \
SOURCE="devworkspace-operator" \
SOURCE_NAMESPACE="openshift-marketplace" \
INSTALL_PLAN_APPROVAL="Auto"
$(MAKE) wait-devworkspace-running NAMESPACE="openshift-operators"
$(MAKE) wait-devworkspace-running NAMESPACE=$${DEFINED_OPERATOR_NAMESPACE}
fi
wait-devworkspace-running: SHELL := /bin/bash

View File

@ -109,7 +109,7 @@ type CheClusterDevEnvironments struct {
SecondsOfRunBeforeIdling *int32 `json:"secondsOfRunBeforeIdling,omitempty"`
// Disables the container build capabilities.
// +optional
// +kubebuilder:default:=true
// +kubebuilder:default:=false
DisableContainerBuildCapabilities *bool `json:"disableContainerBuildCapabilities,omitempty"`
// Container build configuration.
// +optional

View File

@ -52,9 +52,16 @@ deleteDevWorkspaceStableVersionOperator() {
}
runTests() {
. ${OPERATOR_REPO}/build/scripts/olm/test-catalog.sh -i quay.io/eclipse/eclipse-che-olm-catalog:stable -c stable --verbose
. ${OPERATOR_REPO}/build/scripts/olm/test-catalog.sh \
--che-namespace eclipse-che \
--operator-namespace eclipse-che \
--catalog-image quay.io/eclipse/eclipse-che-olm-catalog:stable \
--channel stable \
--verbose
deleteEclipseCheStableVersionOperator
deleteDevWorkspaceStableVersionOperator
. ${OPERATOR_REPO}/build/scripts/olm/test-catalog-from-sources.sh --verbose
}

View File

@ -144,16 +144,14 @@ createEclipseCheCatalogFromSources() {
run() {
make create-namespace NAMESPACE="${NAMESPACE}" VERBOSE=${VERBOSE}
make create-operatorgroup NAME="eclipse-che" NAMESPACE="${NAMESPACE}" VERBOSE=${VERBOSE}
# Install Dev Workspace operator (next version as well)
make install-devworkspace CHANNEL="next"
# Install Dev Workspace operator next version
make install-devworkspace CHANNEL="next" VERBOSE=${VERBOSE} OPERATOR_NAMESPACE="${NAMESPACE}"
exposeOpenShiftRegistry
createEclipseCheCatalogFromSources
if [[ $(oc get operatorgroup -n "${NAMESPACE}" --no-headers | wc -l) == 0 ]]; then
make create-operatorgroup NAME=eclipse-che NAMESPACE="${NAMESPACE}" VERBOSE=${VERBOSE}
fi
make create-subscription \
NAME=eclipse-che \
NAMESPACE="${NAMESPACE}" \

View File

@ -18,6 +18,7 @@ source "${OPERATOR_REPO}/build/scripts/oc-tests/oc-common.sh"
init() {
unset NAMESPACE
unset OPERATOR_NAMESPACE
unset VERBOSE
unset CATALOG_IMAGE
unset CHANNEL
@ -25,7 +26,8 @@ init() {
while [[ "$#" -gt 0 ]]; do
case $1 in
'--channel'|'-c') CHANNEL="$2"; shift 1;;
'--namespace'|'-n') NAMESPACE="$2"; shift 1;;
'--che-namespace'|'-n') NAMESPACE="$2"; shift 1;;
'--operator-namespace'|'-o') OPERATOR_NAMESPACE="$2"; shift 1;;
'--catalog-image'|'-i') CATALOG_IMAGE="$2"; shift 1;;
'--verbose'|'-v') VERBOSE=1;;
'--help'|'-h') usage; exit;;
@ -34,6 +36,7 @@ init() {
done
[[ ! ${NAMESPACE} ]] && NAMESPACE="eclipse-che"
[[ ! ${OPERATOR_NAMESPACE} ]] && NAMESPACE="openshift-operators"
if [[ ! ${CHANNEL} ]] || [[ ! ${CATALOG_IMAGE} ]]; then usage; exit 1; fi
}
@ -46,7 +49,8 @@ usage () {
echo "OPTIONS:"
echo -e "\t-i,--catalog-image Catalog image"
echo -e "\t-c,--channel=next|stable Olm channel to deploy Eclipse Che from"
echo -e "\t-n,--namespace [default: eclipse-che] Kubernetes namespace to deploy Eclipse Che into"
echo -e "\t-n,--che-namespace [default: eclipse-che] Kubernetes namespace to deploy Eclipse Che operands into"
echo -e "\t-o,--operator-namespace [default: openshift-operators] Kubernetes namespace to deploy Eclipse Che operator into"
echo -e "\t-v,--verbose Verbose mode"
echo
echo "Example:"
@ -56,6 +60,8 @@ usage () {
run() {
make create-namespace NAMESPACE="${NAMESPACE}" VERBOSE=${VERBOSE}
make create-namespace NAMESPACE="${OPERATOR_NAMESPACE}" VERBOSE=${VERBOSE}
make create-operatorgroup NAME="eclipse-che" NAMESPACE="${OPERATOR_NAMESPACE}" VERBOSE=${VERBOSE}
make create-catalogsource NAME="${ECLIPSE_CHE_CATALOG_SOURCE_NAME}" IMAGE="${CATALOG_IMAGE}" VERBOSE=${VERBOSE} NAMESPACE="openshift-marketplace"
discoverEclipseCheBundles "${CHANNEL}"
@ -66,21 +72,21 @@ run() {
fi
if [[ ${CHANNEL} == "next" ]]; then
make install-devworkspace CHANNEL=next VERBOSE=${VERBOSE}
make install-devworkspace CHANNEL=next OPERATOR_NAMESPACE="${OPERATOR_NAMESPACE}" VERBOSE=${VERBOSE}
else
make install-devworkspace CHANNEL=fast VERBOSE=${VERBOSE}
make install-devworkspace CHANNEL=fast OPERATOR_NAMESPACE="${OPERATOR_NAMESPACE}" VERBOSE=${VERBOSE}
fi
make create-subscription \
NAME="${ECLIPSE_CHE_SUBSCRIPTION_NAME}" \
NAMESPACE="openshift-operators" \
NAMESPACE="${OPERATOR_NAMESPACE}" \
PACKAGE_NAME="${ECLIPSE_CHE_PACKAGE_NAME}" \
CHANNEL="${CHANNEL}" \
SOURCE="${ECLIPSE_CHE_CATALOG_SOURCE_NAME}" \
SOURCE_NAMESPACE="openshift-marketplace" \
INSTALL_PLAN_APPROVAL="Auto" \
VERBOSE=${VERBOSE}
make wait-pod-running NAMESPACE="openshift-operators" SELECTOR="app.kubernetes.io/component=che-operator"
make wait-pod-running NAMESPACE="${OPERATOR_NAMESPACE}" SELECTOR="app.kubernetes.io/component=che-operator"
getCheClusterCRFromInstalledCSV | oc apply -n "${NAMESPACE}" -f -
make wait-eclipseche-version VERSION="$(getCheVersionFromInstalledCSV)" NAMESPACE=${NAMESPACE} VERBOSE=${VERBOSE}
}

View File

@ -77,7 +77,7 @@ metadata:
operators.operatorframework.io/project_layout: go.kubebuilder.io/v3
repository: https://github.com/eclipse-che/che-operator
support: Eclipse Foundation
name: eclipse-che.v7.62.0-765.next
name: eclipse-che.v7.62.0-766.next
namespace: placeholder
spec:
apiservicedefinitions: {}
@ -1233,7 +1233,7 @@ spec:
minKubeVersion: 1.19.0
provider:
name: Eclipse Foundation
version: 7.62.0-765.next
version: 7.62.0-766.next
webhookdefinitions:
- admissionReviewVersions:
- v1

View File

@ -6945,7 +6945,7 @@ spec:
type: object
type: array
disableContainerBuildCapabilities:
default: true
default: false
description: Disables the container build capabilities.
type: boolean
maxNumberOfRunningWorkspacesPerUser:

View File

@ -6755,7 +6755,7 @@ spec:
type: object
type: array
disableContainerBuildCapabilities:
default: true
default: false
description: Disables the container build capabilities.
type: boolean
maxNumberOfRunningWorkspacesPerUser:

View File

@ -6774,7 +6774,7 @@ spec:
type: object
type: array
disableContainerBuildCapabilities:
default: true
default: false
description: Disables the container build capabilities.
type: boolean
maxNumberOfRunningWorkspacesPerUser:

View File

@ -6769,7 +6769,7 @@ spec:
type: object
type: array
disableContainerBuildCapabilities:
default: true
default: false
description: Disables the container build capabilities.
type: boolean
maxNumberOfRunningWorkspacesPerUser:

View File

@ -6774,7 +6774,7 @@ spec:
type: object
type: array
disableContainerBuildCapabilities:
default: true
default: false
description: Disables the container build capabilities.
type: boolean
maxNumberOfRunningWorkspacesPerUser:

View File

@ -6769,7 +6769,7 @@ spec:
type: object
type: array
disableContainerBuildCapabilities:
default: true
default: false
description: Disables the container build capabilities.
type: boolean
maxNumberOfRunningWorkspacesPerUser:

View File

@ -6769,7 +6769,7 @@ spec:
type: object
type: array
disableContainerBuildCapabilities:
default: true
default: false
description: Disables the container build capabilities.
type: boolean
maxNumberOfRunningWorkspacesPerUser: