diff --git a/deploy/operator-local.yaml b/deploy/operator-local.yaml deleted file mode 100644 index a8162d218..000000000 --- a/deploy/operator-local.yaml +++ /dev/null @@ -1,107 +0,0 @@ -# -# Copyright (c) 2012-2019 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 -apiVersion: apps/v1 -kind: Deployment -metadata: - name: che-operator -spec: - replicas: 1 - selector: - matchLabels: - name: che-operator - template: - metadata: - labels: - name: che-operator - spec: - serviceAccountName: che-operator - containers: - - name: che-operator - image: quay.io/eclipse/che-operator:nightly - ports: - - containerPort: 60000 - name: metrics - command: - - che-operator - imagePullPolicy: IfNotPresent - env: - - name: WATCH_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - - name: POD_NAME - valueFrom: - fieldRef: - fieldPath: metadata.name - - name: OPERATOR_NAME - value: che-operator - - name: CHE_VERSION - value: nightly - - name: RELATED_IMAGE_che_server - value: quay.io/eclipse/che-server:nightly - - name: RELATED_IMAGE_plugin_registry - value: quay.io/eclipse/che-plugin-registry:nightly - - name: RELATED_IMAGE_devfile_registry - value: quay.io/eclipse/che-devfile-registry:nightly - - name: RELATED_IMAGE_che_tls_secrets_creation_job - value: quay.io/eclipse/che-tls-secret-creator:alpine-d1ed4ad - - name: RELATED_IMAGE_pvc_jobs - value: registry.access.redhat.com/ubi8-minimal:8.3-230 - - name: RELATED_IMAGE_postgres - value: quay.io/eclipse/che--centos--postgresql-96-centos7:9.6-b681d78125361519180a6ac05242c296f8906c11eab7e207b5ca9a89b6344392 - - name: RELATED_IMAGE_keycloak - value: quay.io/eclipse/che-keycloak:nightly - - name: RELATED_IMAGE_che_workspace_plugin_broker_metadata - value: quay.io/eclipse/che-plugin-metadata-broker:v3.4.0 - - name: RELATED_IMAGE_che_workspace_plugin_broker_artifacts - value: quay.io/eclipse/che-plugin-artifacts-broker:v3.4.0 - - name: RELATED_IMAGE_che_server_secure_exposer_jwt_proxy_image - value: quay.io/eclipse/che-jwtproxy:0.10.0 - - name: RELATED_IMAGE_single_host_gateway - value: docker.io/traefik:v2.2.8 - - name: RELATED_IMAGE_single_host_gateway_config_sidecar - value: quay.io/che-incubator/configbump:0.1.4 - - name: CHE_FLAVOR - value: che - - name: CONSOLE_LINK_NAME - value: che - - name: CONSOLE_LINK_DISPLAY_NAME - value: Eclipse Che - - name: CONSOLE_LINK_SECTION - value: Red Hat Applications - - name: CONSOLE_LINK_IMAGE - value: /dashboard/assets/branding/loader.svg - - name: CHE_IDENTITY_SECRET - value: che-identity-secret - - name: CHE_IDENTITY_POSTGRES_SECRET - value: che-identity-postgres-secret - - name: CHE_POSTGRES_SECRET - value: che-postgres-secret - - name: CHE_SERVER_TRUST_STORE_CONFIGMAP_NAME - value: ca-certs - livenessProbe: - httpGet: - path: /readyz - port: 6789 - initialDelaySeconds: 15 - periodSeconds: 10 - failureThreshold: 10 - successThreshold: 1 - timeoutSeconds: 5 - readinessProbe: - httpGet: - path: /healthz - port: 6789 - initialDelaySeconds: 5 - periodSeconds: 10 - failureThreshold: 10 - successThreshold: 1 - timeoutSeconds: 5 diff --git a/e2e/deserialize.go b/e2e/deserialize.go index 91ba65830..e5590976f 100644 --- a/e2e/deserialize.go +++ b/e2e/deserialize.go @@ -22,7 +22,7 @@ import ( ) func deserializeOperatorDeployment() (operatorDeployment *appsv1.Deployment, err error) { - fileLocation, err := filepath.Abs("deploy/operator-local.yaml") + fileLocation, err := filepath.Abs("deploy/operator.yaml") if err != nil { logrus.Fatalf("Failed to locate operator deployment yaml, %s", err) } diff --git a/make-release.sh b/make-release.sh index a69f0a7b2..24ad92ee4 100755 --- a/make-release.sh +++ b/make-release.sh @@ -151,10 +151,6 @@ releaseOperatorCode() { echo "[INFO] releaseOperatorCode :: Validate changes for $operatoryaml" checkImageReferences $operatoryaml - local operatorlocalyaml=$RELEASE_DIR/deploy/operator-local.yaml - echo "[INFO] releaseOperatorCode :: Validate changes for $operatorlocalyaml" - checkImageReferences $operatorlocalyaml - echo "[INFO] releaseOperatorCode :: Commit changes" if git status --porcelain; then git add -A || true # add new generated CSV files in olm/ folder @@ -226,7 +222,7 @@ pushGitChanges() { fi fi git tag -a $RELEASE -m $RELEASE - git push --tags origin + git push --tags origin } createPRToXBranch() { @@ -241,7 +237,7 @@ createPRToMasterBranch() { resetChanges master local tmpBranch="copy-csv-to-master" git checkout -B $tmpBranch - git diff refs/heads/${BRANCH}...refs/heads/${RELEASE_BRANCH} ':(exclude)deploy/operator-local.yaml' ':(exclude)deploy/operator.yaml' | git apply -3 + git diff refs/heads/${BRANCH}...refs/heads/${RELEASE_BRANCH} ':(exclude)deploy/operator.yaml' | git apply -3 . ${RELEASE_DIR}/replace-images-tags.sh nightly master if git status --porcelain; then git add -A || true # add new generated CSV files in olm/ folder diff --git a/olm/update-nightly-bundle.sh b/olm/update-nightly-bundle.sh index 36970116b..d512ff7a9 100755 --- a/olm/update-nightly-bundle.sh +++ b/olm/update-nightly-bundle.sh @@ -38,13 +38,10 @@ case $OPERATOR_SDK_VERSION in esac OPERATOR_YAML="${BASE_DIR}"/../deploy/operator.yaml -OPERATOR_LOCAL_YAML="${BASE_DIR}"/../deploy/operator-local.yaml NEW_OPERATOR_YAML="${OPERATOR_YAML}.new" -NEW_OPERATOR_LOCAL_YAML="${OPERATOR_LOCAL_YAML}.new" # copy licence header eval head -10 "${OPERATOR_YAML}" > ${NEW_OPERATOR_YAML} -eval head -10 "${OPERATOR_LOCAL_YAML}" > ${NEW_OPERATOR_LOCAL_YAML} ROOT_PROJECT_DIR=$(dirname "${BASE_DIR}") TAG=$1 @@ -67,14 +64,6 @@ yq -ryY "( .spec.template.spec.containers[] | select(.name == \"che-operator\"). >> "${NEW_OPERATOR_YAML}" mv "${NEW_OPERATOR_YAML}" "${OPERATOR_YAML}" -cat "${OPERATOR_LOCAL_YAML}" | \ -yq -ryY "( .spec.template.spec.containers[] | select(.name == \"che-operator\").env[] | select(.name == \"RELATED_IMAGE_pvc_jobs\") | .value ) = \"${UBI8_MINIMAL_IMAGE}\"" | \ -yq -ryY "( .spec.template.spec.containers[] | select(.name == \"che-operator\").env[] | select(.name == \"RELATED_IMAGE_che_workspace_plugin_broker_metadata\") | .value ) = \"${PLUGIN_BROKER_METADATA_IMAGE_RELEASE}\"" | \ -yq -ryY "( .spec.template.spec.containers[] | select(.name == \"che-operator\").env[] | select(.name == \"RELATED_IMAGE_che_workspace_plugin_broker_artifacts\") | .value ) = \"${PLUGIN_BROKER_ARTIFACTS_IMAGE_RELEASE}\"" | \ -yq -ryY "( .spec.template.spec.containers[] | select(.name == \"che-operator\").env[] | select(.name == \"RELATED_IMAGE_che_server_secure_exposer_jwt_proxy_image\") | .value ) = \"${JWT_PROXY_IMAGE_RELEASE}\"" \ ->> "${NEW_OPERATOR_LOCAL_YAML}" -mv "${NEW_OPERATOR_LOCAL_YAML}" "${OPERATOR_LOCAL_YAML}" - DOCKERFILE=${BASE_DIR}/../Dockerfile sed -i 's|registry.access.redhat.com/ubi8-minimal:.*|'${UBI8_MINIMAL_IMAGE}'|g' $DOCKERFILE diff --git a/replace-images-tags.sh b/replace-images-tags.sh index acaaae3d7..8ce75e211 100755 --- a/replace-images-tags.sh +++ b/replace-images-tags.sh @@ -12,7 +12,6 @@ # # Updates images into: # - deploy/operator.yaml -# - deploy/operator-local.yaml # Usage: # ./release-operator-code.sh @@ -30,7 +29,6 @@ function replaceImageTag() { replaceImagesTags() { OPERATOR_YAML="${BASE_DIR}"/deploy/operator.yaml - OPERATOR_LOCAL_YAML="${BASE_DIR}"/deploy/operator-local.yaml lastDefaultCheServerImage=$(yq -r ".spec.template.spec.containers[] | select(.name == \"che-operator\") | .env[] | select(.name == \"RELATED_IMAGE_che_server\") | .value" "${OPERATOR_YAML}") lastDefaultKeycloakImage=$(yq -r ".spec.template.spec.containers[] | select(.name == \"che-operator\") | .env[] | select(.name == \"RELATED_IMAGE_keycloak\") | .value" "${OPERATOR_YAML}") @@ -43,10 +41,8 @@ replaceImagesTags() { DEVFILE_REGISTRY_IMAGE_RELEASE=$(replaceImageTag "${lastDefaultDevfileRegistryImage}" "${RELEASE_TAG}") NEW_OPERATOR_YAML="${OPERATOR_YAML}.new" - NEW_OPERATOR_LOCAL_YAML="${OPERATOR_LOCAL_YAML}.new" # copy licence header eval head -10 "${OPERATOR_YAML}" > ${NEW_OPERATOR_YAML} - eval head -10 "${OPERATOR_LOCAL_YAML}" > ${NEW_OPERATOR_LOCAL_YAML} cat "${OPERATOR_YAML}" | \ yq -ryY "( .spec.template.spec.containers[] | select(.name == \"che-operator\") | .image ) = \"quay.io/eclipse/che-operator:${RELEASE_TAG}\"" | \ @@ -57,16 +53,6 @@ replaceImagesTags() { yq -ryY "( .spec.template.spec.containers[] | select(.name == \"che-operator\").env[] | select(.name == \"RELATED_IMAGE_devfile_registry\") | .value ) = \"${DEVFILE_REGISTRY_IMAGE_RELEASE}\"" \ >> "${NEW_OPERATOR_YAML}" mv "${NEW_OPERATOR_YAML}" "${OPERATOR_YAML}" - - cat "${OPERATOR_LOCAL_YAML}" | \ - yq -ryY "( .spec.template.spec.containers[] | select(.name == \"che-operator\") | .image ) = \"quay.io/eclipse/che-operator:${RELEASE_TAG}\"" | \ - yq -ryY "( .spec.template.spec.containers[] | select(.name == \"che-operator\").env[] | select(.name == \"CHE_VERSION\") | .value ) = \"${RELEASE_TAG}\"" | \ - yq -ryY "( .spec.template.spec.containers[] | select(.name == \"che-operator\").env[] | select(.name == \"RELATED_IMAGE_che_server\") | .value ) = \"${CHE_SERVER_IMAGE_REALEASE}\"" | \ - yq -ryY "( .spec.template.spec.containers[] | select(.name == \"che-operator\").env[] | select(.name == \"RELATED_IMAGE_keycloak\") | .value ) = \"${KEYCLOAK_IMAGE_RELEASE}\"" | \ - yq -ryY "( .spec.template.spec.containers[] | select(.name == \"che-operator\").env[] | select(.name == \"RELATED_IMAGE_plugin_registry\") | .value ) = \"${PLUGIN_REGISTRY_IMAGE_RELEASE}\"" | \ - yq -ryY "( .spec.template.spec.containers[] | select(.name == \"che-operator\").env[] | select(.name == \"RELATED_IMAGE_devfile_registry\") | .value ) = \"${DEVFILE_REGISTRY_IMAGE_RELEASE}\"" \ - >> "${NEW_OPERATOR_LOCAL_YAML}" - mv "${NEW_OPERATOR_LOCAL_YAML}" "${OPERATOR_LOCAL_YAML}" } init "$@"