Skip to content

Commit

Permalink
Merge branch 'main' of github.com:eclipse-che/che-operator into dontS…
Browse files Browse the repository at this point in the history
…etPublicUrlValueToInternalUrlSettings
  • Loading branch information
AndrienkoAleksandr committed Aug 2, 2021
2 parents 83baaf9 + cd0de9b commit a8ec192
Show file tree
Hide file tree
Showing 9 changed files with 78 additions and 21 deletions.
2 changes: 2 additions & 0 deletions .ci/openshift-ci/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ SHELL ["/bin/bash", "-c"]
RUN yum install --assumeyes -d1 python3-pip httpd-tools && \
pip3 install --upgrade setuptools && \
pip3 install yq && \
pip3 install operator-courier==2.1.7 && \
pip3 install pysemver && \
curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl && \
chmod +x ./kubectl && \
mv ./kubectl /usr/local/bin && \
Expand Down
9 changes: 4 additions & 5 deletions .github/bin/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,11 @@ initStableTemplates() {
mkdir -p "${LAST_OPERATOR_TEMPLATE}/che-operator"
mkdir -p "${PREVIOUS_OPERATOR_TEMPLATE}/che-operator"

# todo: set up final version before merge pr...
compareResult=$(pysemver compare "${LAST_PACKAGE_VERSION}" "7.34.0")
if [ "${compareResult}" == "1" ]; then
prepareTemplates "${lastOperatorPath}" "${LAST_OPERATOR_TEMPLATE}/che-operator"
else
cp -rf ${lastOperatorPath}/deploy/* "${LAST_OPERATOR_TEMPLATE}/che-operator"
if [ "${compareResult}" == "-1" ]; then
cp -rf ${lastOperatorPath}/deploy/* "${LAST_OPERATOR_TEMPLATE}/che-operator"
else
prepareTemplates "${lastOperatorPath}" "${LAST_OPERATOR_TEMPLATE}/che-operator"
fi
}

Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/minikube-stable-olm-update.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,14 @@ jobs:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v1
- name: Install yq
run: sudo pip install yq
- name: Install yq and pysemver
run: |
pip install operator-courier==2.1.7
sudo pip install yq pysemver;
echo "[INFO] pysemver version:"
pysemver --version;
echo "[INFO] yq version:"
yq --version;
- name: Provision Minikube cluster
run: |
curl -LO https://storage.googleapis.com/minikube/releases/v1.21.0/minikube-linux-amd64
Expand Down
11 changes: 9 additions & 2 deletions .github/workflows/minishift-stable-operator-update.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,15 @@ jobs:
minishift start --memory=5500 --vm-driver=virtualbox --registry-mirror=https://quay.io
- name: Install chectl
run: bash <(curl -sL https://www.eclipse.org/che/chectl/) --channel=next
- name: Install jq
run: sudo pip install yq
- name: Install yq and pysemver
run: |
pip3 install operator-courier==2.1.7
sudo pip install pysemver;
sudo pip install yq
echo "[INFO] pysemver version:"
pysemver --version;
echo "[INFO] yq version:"
yq --version;
- name: Replace Minishift default certificates
run: /bin/bash .github/bin/minishift/certs.sh
- name: Update minishift deprecated certificates and run e2e
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,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-preview-kubernetes.v7.34.0-270.nightly
name: eclipse-che-preview-kubernetes.v7.34.0-271.nightly
namespace: placeholder
spec:
apiservicedefinitions: {}
Expand Down Expand Up @@ -1050,7 +1050,13 @@ spec:
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 5
resources: {}
resources:
limits:
cpu: 500m
memory: 256Mi
requests:
cpu: 100m
memory: 64Mi
securityContext:
capabilities:
drop:
Expand Down Expand Up @@ -1300,4 +1306,4 @@ spec:
maturity: stable
provider:
name: Eclipse Foundation
version: 7.34.0-270.nightly
version: 7.34.0-271.nightly
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,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-preview-openshift.v7.34.0-270.nightly
name: eclipse-che-preview-openshift.v7.34.0-271.nightly
namespace: placeholder
spec:
apiservicedefinitions: {}
Expand Down Expand Up @@ -1104,7 +1104,13 @@ spec:
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 5
resources: {}
resources:
limits:
cpu: 500m
memory: 256Mi
requests:
cpu: 100m
memory: 64Mi
securityContext:
allowPrivilegeEscalation: false
capabilities:
Expand Down Expand Up @@ -1365,4 +1371,4 @@ spec:
maturity: stable
provider:
name: Eclipse Foundation
version: 7.34.0-270.nightly
version: 7.34.0-271.nightly
8 changes: 7 additions & 1 deletion config/manager/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,13 @@ spec:
capabilities:
drop:
- ALL
resources: null
resources:
limits:
cpu: 500m
memory: 256Mi
requests:
cpu: 100m
memory: 64Mi
- args:
- --enable-leader-election
- --metrics-addr
Expand Down
2 changes: 2 additions & 0 deletions olm/buildAndPushBundleImages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ usage () {

if [[ $# -lt 1 ]]; then usage; exit; fi

unset channel platform forceBuildAndPush fromIndexImage

while [[ "$#" -gt 0 ]]; do
case $1 in
'-c') channel="$2"; shift 1;;
Expand Down
33 changes: 28 additions & 5 deletions olm/olm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -181,11 +181,34 @@ buildCatalogImage() {

pushd "${ROOT_DIR}" || exit

make catalog-build catalog-push \
CATALOG_IMG="${CATALOG_IMAGENAME}" \
BUNDLE_IMG="${CATALOG_BUNDLE_IMAGE_NAME_LOCAL}" \
IMAGE_TOOL="${imageTool}" \
FROM_INDEX_OPT="${BUILD_INDEX_IMAGE_ARG}"
INDEX_ADD_CMD="make catalog-build \
CATALOG_IMG=\"${CATALOG_IMAGENAME}\" \
BUNDLE_IMG=\"${CATALOG_BUNDLE_IMAGE_NAME_LOCAL}\" \
IMAGE_TOOL=\"${imageTool}\" \
FROM_INDEX_OPT=\"${BUILD_INDEX_IMAGE_ARG}\""

exitCode=0
# Execute command and store an error output to the variable for following handling.
{
output="$(eval "${INDEX_ADD_CMD}" 2>&1 1>&3 3>&-)"; } 3>&1 || \
{
exitCode="$?";
echo "[INFO] ${exitCode}";
true;
}
echo "${output}"
if [[ "${output}" == *"already exists, Bundle already added that provides package and csv"* ]] && [[ "${forceBuildAndPush}" == "true" ]]; then
echo "[INFO] Ignore error 'Bundle already added'"
# Catalog bundle image contains bundle reference, continue without unnecessary push operation
return
else
echo "[INFO] ${exitCode}"
if [ "${exitCode}" != 0 ]; then
exit "${exitCode}"
fi
fi

make catalog-push CATALOG_IMG="${CATALOG_IMAGENAME}"

popd || exit
}
Expand Down

0 comments on commit a8ec192

Please sign in to comment.