diff --git a/olm/eclipse-che-preview-kubernetes/deploy/olm-catalog/eclipse-che-preview-kubernetes/9.9.9-nightly.1563539196/eclipse-che-preview-kubernetes.crd.yaml b/olm/eclipse-che-preview-kubernetes/deploy/olm-catalog/eclipse-che-preview-kubernetes/9.9.9-nightly.1563539196/eclipse-che-preview-kubernetes.crd.yaml new file mode 100644 index 0000000000..ec7b9103f4 --- /dev/null +++ b/olm/eclipse-che-preview-kubernetes/deploy/olm-catalog/eclipse-che-preview-kubernetes/9.9.9-nightly.1563539196/eclipse-che-preview-kubernetes.crd.yaml @@ -0,0 +1,15 @@ +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + name: checlusters.org.eclipse.che +spec: + group: org.eclipse.che + names: + kind: CheCluster + listKind: CheClusterList + plural: checlusters + singular: checluster + scope: Namespaced + version: v1 + subresources: + status: {} diff --git a/olm/eclipse-che-preview-kubernetes/deploy/olm-catalog/eclipse-che-preview-kubernetes/9.9.9-nightly.1563539196/eclipse-che-preview-kubernetes.v9.9.9-nightly.1563539196.clusterserviceversion.yaml b/olm/eclipse-che-preview-kubernetes/deploy/olm-catalog/eclipse-che-preview-kubernetes/9.9.9-nightly.1563539196/eclipse-che-preview-kubernetes.v9.9.9-nightly.1563539196.clusterserviceversion.yaml new file mode 100644 index 0000000000..036b66a63f --- /dev/null +++ b/olm/eclipse-che-preview-kubernetes/deploy/olm-catalog/eclipse-che-preview-kubernetes/9.9.9-nightly.1563539196/eclipse-che-preview-kubernetes.v9.9.9-nightly.1563539196.clusterserviceversion.yaml @@ -0,0 +1,327 @@ +apiVersion: operators.coreos.com/v1alpha1 +kind: ClusterServiceVersion +metadata: + annotations: + alm-examples: |- + [ + { + "apiVersion": "org.eclipse.che/v1", + "kind": "CheCluster", + "metadata": { + "name": "eclipse-che" + }, + "spec": { + "k8s": { + "ingressDomain": "", + "tlsSecretName": "" + }, + "server": { + "cheImageTag": "nightly", + "devfileRegistryImage": "quay.io/eclipse/che-devfile-registry:nightly", + "pluginRegistryImage": "quay.io/eclipse/che-plugin-registry:nighlty", + "tlsSupport": false, + "selfSignedCert": false + }, + "database": { + "externalDb": false, + "chePostgresHostname": "", + "chePostgresPort": "", + "chePostgresUser": "", + "chePostgresPassword": "", + "chePostgresDb": "" + }, + "auth": { + "identityProviderImage": "eclipse/che-keycloak:nightly", + "externalIdentityProvider": false, + "identityProviderURL": "", + "identityProviderRealm": "", + "identityProviderClientId": "" + }, + "storage": { + "pvcStrategy": "per-workspace", + "pvcClaimSize": "1Gi", + "preCreateSubPaths": true + } + } + } + ] + capabilities: Seamless Upgrades + categories: Developer Tools + certified: "false" + containerImage: quay.io/eclipse/che-operator:nightly + createdAt: "2019-07-19T12:26:36Z" + description: A Kube-native development solution that delivers portable and collaborative + developer workspaces. + repository: https://github.com/eclipse/che-operator + support: Eclipse Foundation + name: eclipse-che-preview-kubernetes.v9.9.9-nightly.1563539196 + namespace: placeholder +spec: + apiservicedefinitions: {} + customresourcedefinitions: + owned: + - description: Eclipse Che cluster with DB and Auth Server + displayName: Eclipse Che Cluster + kind: CheCluster + name: checlusters.org.eclipse.che + specDescriptors: + - description: TLS routes + displayName: TLS Mode + path: server.tlsSupport + x-descriptors: + - urn:alm:descriptor:com.tectonic.ui:booleanSwitch + statusDescriptors: + - description: Ingress to access Eclipse Che + displayName: Eclipse Che URL + path: cheURL + x-descriptors: + - urn:alm:descriptor:org.w3:link + - description: Ingress to access Keycloak Admin Console + displayName: Keycloak Admin Console URL + path: keycloakURL + x-descriptors: + - urn:alm:descriptor:org.w3:link + - description: Eclipse Che server version + displayName: Eclipse Che version + path: cheVersion + x-descriptors: + - urn:alm:descriptor:com.tectonic.ui:label + - description: The current status of the application + displayName: Status + path: cheClusterRunning + x-descriptors: + - urn:alm:descriptor:io.kubernetes.phase + version: v1 + description: | + A collaborative Kubernetes-native development solution that delivers Kubernetes workspaces and in-browser IDE for rapid cloud application development. + This operator installs PostgreSQL, Keycloak, and the Eclipse Che server, as well as configures all three services. + + ## How to Install + + When the operator is installed (ie you have created a subscription and there us operaotr deployment), create a new CR of Kind CheCluster (click the **Create New** button). + The CR spec contains all defaults (see below). + + + **Important!** Make sure you provide **ingressDomain** which is a global ingress domain of your k8s cluster, for example, mycluster.com, 172.234.433.23.nip.io. + + You can start using Eclipse Che when the CR status is set to **Available**, and you see a URL to Eclipse Che. + + ## Defaults + + By default, the operator deploys Eclipse Che with: + + * Bundled PostgreSQL and Keycloak + + * Per-Workspace PVC strategy + + * Auto-generated passwords + + * HTTP mode (non-secure ingresses) + + ## Installation Options + + Eclipse Che operator installation options include: + + * Connection to external database and Keycloak + + * Configuration of default passwords and object names + + * TLS mode + + * PVC strategy (once shared PVC for all workspaces, PVC per workspace, or PVC per volume) + + * Authentication options + + ### External Database and Keycloak + + To instruct the operator to skip deploying PostgreSQL and Keycloak and connect to an existing DB and Keycloak instead: + + * set respective fields to `true` in a custom resource spec + + * provide the operator with connection and authentication details: + + + + ``` + externalDb: true + + chePostgresHostname: 'yourPostgresHost' + + chePostgresPort: '5432' + + chePostgresUser: 'myuser' + + chePostgresPassword: 'mypass' + + chePostgresDb: 'mydb' + + externalIdentityProvider: true + + identityProviderURL: 'https://my-keycloak.com' + + identityProviderRealm: 'myrealm' + + identityProviderClientId: 'myClient' + + ``` + + + ### TLS Mode + + To activate TLS mode, set the respective field in the CR spec to `true` (in the `server` block): + + + + ``` + + tlsSupport: true + + ``` + + You will also need to provide name of tls secret that will be used for Eclipse Che and workspaces ingresses: + + + + ``` + + tlsSecretName: 'my-ingress-tls-secret' + + ``` + displayName: Eclipse Che + icon: + - base64data: iVBORw0KGgoAAAANSUhEUgAAANMAAAD0CAYAAAABrhNXAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QA/wD/AP+gvaeTAAAaNklEQVR42u3de3QU9dkH8O/zm91EQK0U77dqVdTW++1V20KigUSQahLjsSSbtp4eeqqVLH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pqF4kYXKpZFs9iNAEk8qWPzTrbd3Hki4kTC535cSqC5Qy6gC+cEBvILzOTFMal85arbv2dCNh8oQBtHoQPifmW7Z/0HFXa2skrrvidCRh8pAerR7lADK7/jkO8P0dZmblyoenyWr0GkmYPKhw4ryTYBiL2EKQlTHFq6tG+E1CYRJCJEYeJxLCJhImIWwiYRLCJhImIWwiYRLCJv8P9sXhC7xE4kIAAAAldEVYdGRhdGU6Y3JlYXRlADIwMTktMDQtMTNUMDg6MTY6MDgrMDI6MDCcYZVaAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDE5LTA0LTEzVDA4OjE2OjA4KzAyOjAw7Twt5gAAAABJRU5ErkJggg== + mediatype: image/png + install: + spec: + deployments: + - name: che-operator + spec: + replicas: 1 + selector: + matchLabels: + app: che-operator + strategy: {} + template: + metadata: + labels: + app: che-operator + spec: + containers: + - command: + - /usr/local/bin/che-operator + env: + - name: WATCH_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.annotations['olm.targetNamespaces'] + - name: POD_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name + - name: OPERATOR_NAME + value: che-operator + image: quay.io/eclipse/che-operator:nightly + imagePullPolicy: Always + name: che-operator + ports: + - containerPort: 60000 + name: metrics + resources: {} + restartPolicy: Always + serviceAccountName: che-operator + terminationGracePeriodSeconds: 5 + permissions: + - rules: + - apiGroups: + - extensions + resources: + - ingresses + verbs: + - '*' + - apiGroups: + - rbac.authorization.k8s.io + resources: + - roles + - rolebindings + verbs: + - '*' + - apiGroups: + - rbac.authorization.k8s.io + resources: + - clusterroles + - clusterrolebindings + verbs: + - '*' + - apiGroups: + - "" + resources: + - pods + - services + - serviceaccounts + - endpoints + - persistentvolumeclaims + - events + - configmaps + - secrets + - pods/exec + - pods/log + verbs: + - '*' + - apiGroups: + - "" + resources: + - namespaces + verbs: + - get + - apiGroups: + - apps + resources: + - deployments + verbs: + - '*' + - apiGroups: + - monitoring.coreos.com + resources: + - servicemonitors + verbs: + - get + - create + - apiGroups: + - org.eclipse.che + resources: + - '*' + verbs: + - '*' + serviceAccountName: che-operator + strategy: deployment + installModes: + - supported: true + type: OwnNamespace + - supported: true + type: SingleNamespace + - supported: true + type: MultiNamespace + - supported: false + type: AllNamespaces + keywords: + - eclipse che + - workspaces + - devtools + - developer + - ide + - java + links: + - name: Product Page + url: http://www.eclipse.org/che + - name: Documentation + url: https://www.eclipse.org/che/docs + - name: Operator GitHub Repo + url: https://github.com/eclipse/che-operator + maintainers: + - email: dfestal@redhat.com + name: David Festal + maturity: stable + provider: + name: Eclipse Foundation + replaces: eclipse-che-preview-kubernetes.v9.9.9-nightly.1563282936 + version: 9.9.9-nightly.1563539196 diff --git a/olm/eclipse-che-preview-kubernetes/deploy/olm-catalog/eclipse-che-preview-kubernetes/eclipse-che-preview-kubernetes.package.yaml b/olm/eclipse-che-preview-kubernetes/deploy/olm-catalog/eclipse-che-preview-kubernetes/eclipse-che-preview-kubernetes.package.yaml index cf51825b43..b840385c97 100644 --- a/olm/eclipse-che-preview-kubernetes/deploy/olm-catalog/eclipse-che-preview-kubernetes/eclipse-che-preview-kubernetes.package.yaml +++ b/olm/eclipse-che-preview-kubernetes/deploy/olm-catalog/eclipse-che-preview-kubernetes/eclipse-che-preview-kubernetes.package.yaml @@ -3,5 +3,5 @@ channels: - name: stable currentCSV: eclipse-che-preview-kubernetes.v7.0.0-rc-2.0 - name: nightly - currentCSV: eclipse-che-preview-kubernetes.v9.9.9-nightly.1563282936 + currentCSV: eclipse-che-preview-kubernetes.v9.9.9-nightly.1563539196 defaultChannel: stable diff --git a/olm/eclipse-che-preview-openshift/deploy/olm-catalog/eclipse-che-preview-openshift/9.9.9-nightly.1563539196/eclipse-che-preview-openshift.crd.yaml b/olm/eclipse-che-preview-openshift/deploy/olm-catalog/eclipse-che-preview-openshift/9.9.9-nightly.1563539196/eclipse-che-preview-openshift.crd.yaml new file mode 100644 index 0000000000..ec7b9103f4 --- /dev/null +++ b/olm/eclipse-che-preview-openshift/deploy/olm-catalog/eclipse-che-preview-openshift/9.9.9-nightly.1563539196/eclipse-che-preview-openshift.crd.yaml @@ -0,0 +1,15 @@ +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + name: checlusters.org.eclipse.che +spec: + group: org.eclipse.che + names: + kind: CheCluster + listKind: CheClusterList + plural: checlusters + singular: checluster + scope: Namespaced + version: v1 + subresources: + status: {} diff --git a/olm/eclipse-che-preview-openshift/deploy/olm-catalog/eclipse-che-preview-openshift/9.9.9-nightly.1563539196/eclipse-che-preview-openshift.v9.9.9-nightly.1563539196.clusterserviceversion.yaml b/olm/eclipse-che-preview-openshift/deploy/olm-catalog/eclipse-che-preview-openshift/9.9.9-nightly.1563539196/eclipse-che-preview-openshift.v9.9.9-nightly.1563539196.clusterserviceversion.yaml new file mode 100644 index 0000000000..e9c18df911 --- /dev/null +++ b/olm/eclipse-che-preview-openshift/deploy/olm-catalog/eclipse-che-preview-openshift/9.9.9-nightly.1563539196/eclipse-che-preview-openshift.v9.9.9-nightly.1563539196.clusterserviceversion.yaml @@ -0,0 +1,365 @@ +apiVersion: operators.coreos.com/v1alpha1 +kind: ClusterServiceVersion +metadata: + annotations: + alm-examples: |- + [ + { + "apiVersion": "org.eclipse.che/v1", + "kind": "CheCluster", + "metadata": { + "name": "eclipse-che" + }, + "spec": { + "server": { + "cheImageTag": "nightly", + "tlsSupport": false, + "selfSignedCert": false + }, + "database": { + "externalDb": false, + "chePostgresHostname": "", + "chePostgresPort": "", + "chePostgresUser": "", + "chePostgresPassword": "", + "chePostgresDb": "" + }, + "auth": { + "openShiftoAuth": true, + "identityProviderImage": "eclipse/che-keycloak:nightly", + "externalIdentityProvider": false, + "identityProviderURL": "", + "identityProviderRealm": "", + "identityProviderClientId": "" + }, + "storage": { + "pvcStrategy": "per-workspace", + "pvcClaimSize": "1Gi", + "preCreateSubPaths": true + } + } + } + ] + capabilities: Seamless Upgrades + categories: Developer Tools, OpenShift Optional + certified: "false" + containerImage: quay.io/eclipse/che-operator:nightly + createdAt: "2019-07-19T12:26:36Z" + description: A Kube-native development solution that delivers portable and collaborative + developer workspaces in OpenShift. + repository: https://github.com/eclipse/che-operator + support: Eclipse Foundation + name: eclipse-che-preview-openshift.v9.9.9-nightly.1563539196 + namespace: placeholder +spec: + apiservicedefinitions: {} + customresourcedefinitions: + owned: + - description: Eclipse Che cluster with DB and Auth Server + displayName: Eclipse Che Cluster + kind: CheCluster + name: checlusters.org.eclipse.che + specDescriptors: + - description: Log in to Eclipse Che with OpenShift credentials + displayName: OpenShift oAuth + path: auth.openShiftoAuth + x-descriptors: + - urn:alm:descriptor:com.tectonic.ui:booleanSwitch + - description: TLS routes + displayName: TLS Mode + path: server.tlsSupport + x-descriptors: + - urn:alm:descriptor:com.tectonic.ui:booleanSwitch + statusDescriptors: + - description: Route to access Eclipse Che + displayName: Eclipse Che URL + path: cheURL + x-descriptors: + - urn:alm:descriptor:org.w3:link + - description: Route to access Keycloak Admin Console + displayName: Keycloak Admin Console URL + path: keycloakURL + x-descriptors: + - urn:alm:descriptor:org.w3:link + - description: Eclipse Che server version + displayName: Eclipse Che version + path: cheVersion + x-descriptors: + - urn:alm:descriptor:com.tectonic.ui:label + - description: The current status of the application + displayName: Status + path: cheClusterRunning + x-descriptors: + - urn:alm:descriptor:io.kubernetes.phase + version: v1 + description: | + A collaborative Kubernetes-native development solution that delivers OpenShift workspaces and in-browser IDE for rapid cloud application development. + This operator installs PostgreSQL, Keycloak, and the Eclipse Che server, as well as configures all three services. + + ## How to Install + + Press the **Install** button, choose the upgrade strategy, and wait for the **Installed** Operator status. + + When the operator is installed, create a new CR of Kind CheCluster (click the **Create New** button). + The CR spec contains all defaults (see below). + + You can start using Eclipse Che when the CR status is set to **Available**, and you see a URL to Eclipse Che. + + ## Defaults + + By default, the operator deploys Eclipse Che with: + + * Bundled PostgreSQL and Keycloak + + * Per-Workspace PVC strategy + + * Auto-generated passwords + + * HTTP mode (non-secure routes) + + * Regular login extended with OpenShift OAuth authentication + + ## Installation Options + + Eclipse Che operator installation options include: + + * Connection to external database and Keycloak + + * Configuration of default passwords and object names + + * TLS mode + + * PVC strategy (once shared PVC for all workspaces, PVC per workspace, or PVC per volume) + + * Authentication options + + ### External Database and Keycloak + + To instruct the operator to skip deploying PostgreSQL and Keycloak and connect to an existing DB and Keycloak instead: + + * set respective fields to `true` in a custom resource spec + + * provide the operator with connection and authentication details: + + + + `externalDb: true` + + + `chePostgresHostname: 'yourPostgresHost'` + + + `chePostgresPort: '5432'` + + + `chePostgresUser: 'myuser'` + + + `chePostgresPassword: 'mypass'` + + + `chePostgresDb: 'mydb'` + + + `externalIdentityProvider: true` + + + `identityProviderURL: 'https://my-keycloak.com'` + + + `identityProviderRealm: 'myrealm'` + + + `identityProviderClientId: 'myClient'` + + + ### TLS Mode + + To activate TLS mode, set the respective field in the CR spec to `true` (in the `server` block): + + + ``` + tlsSupport: true + ``` + + #### Self-signed Certificates + + To use Eclipse Che with TLS enabled, but the OpenShift router does not use certificates signed by a public authority, you can use self-signed certificates, which the operator can fetch for you: + + + ``` + selfSignedCert: true + ``` + + + You can also manually create a secret: + + + + ``` + oc create secret self-signed-certificate generic --from-file=/path/to/certificate/ca.crt -n=$codeReadyNamespace + ``` + displayName: Eclipse Che + icon: + - base64data: iVBORw0KGgoAAAANSUhEUgAAANMAAAD0CAYAAAABrhNXAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QA/wD/AP+gvaeTAAAaNklEQVR42u3de3QU9dkH8O/zm91EQK0U77dqVdTW++1V20KigUSQahLjsSSbtp4eeqqVLHILCcoiyQZEIbF61B6PVQJ6XiOkr6TlYiABr603wHotar1bBUWUYDY787x/JIGoSchmZ+c3M/t8/iS7M8+M5+vs7szz/IiZIYRIntJdgBB+IWESwiYSJiFsImESwiYSJiFsImESwiaBvv5ARLprEwB4ddaJTBQF8w/JsKbQmI0v665JAL3dUqK+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YeJxLCJhImIWwiYRLCJhImIWwiYRLCJv8P9sXhC7xE4kIAAAAldEVYdGRhdGU6Y3JlYXRlADIwMTktMDQtMTNUMDg6MTY6MDgrMDI6MDCcYZVaAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDE5LTA0LTEzVDA4OjE2OjA4KzAyOjAw7Twt5gAAAABJRU5ErkJggg== + mediatype: image/png + install: + spec: + clusterPermissions: + - rules: + - apiGroups: + - oauth.openshift.io + resources: + - oauthclients + verbs: + - create + - get + - delete + - list + - patch + - update + - watch + - apiGroups: + - config.openshift.io + resources: + - infrastructures + verbs: + - get + serviceAccountName: che-operator + deployments: + - name: che-operator + spec: + replicas: 1 + selector: + matchLabels: + app: che-operator + strategy: {} + template: + metadata: + labels: + app: che-operator + spec: + containers: + - command: + - /usr/local/bin/che-operator + env: + - name: WATCH_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.annotations['olm.targetNamespaces'] + - name: POD_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name + - name: OPERATOR_NAME + value: che-operator + image: quay.io/eclipse/che-operator:nightly + imagePullPolicy: Always + name: che-operator + ports: + - containerPort: 60000 + name: metrics + resources: {} + restartPolicy: Always + serviceAccountName: che-operator + terminationGracePeriodSeconds: 5 + permissions: + - rules: + - apiGroups: + - extensions + resources: + - ingresses + verbs: + - '*' + - apiGroups: + - route.openshift.io + resources: + - routes + verbs: + - '*' + - apiGroups: + - rbac.authorization.k8s.io + resources: + - roles + - rolebindings + verbs: + - '*' + - apiGroups: + - rbac.authorization.k8s.io + resources: + - clusterroles + - clusterrolebindings + verbs: + - '*' + - apiGroups: + - "" + resources: + - pods + - services + - serviceaccounts + - endpoints + - persistentvolumeclaims + - events + - configmaps + - secrets + - pods/exec + - pods/log + verbs: + - '*' + - apiGroups: + - "" + resources: + - namespaces + verbs: + - get + - apiGroups: + - apps + resources: + - deployments + verbs: + - '*' + - apiGroups: + - monitoring.coreos.com + resources: + - servicemonitors + verbs: + - get + - create + - apiGroups: + - org.eclipse.che + resources: + - '*' + verbs: + - '*' + serviceAccountName: che-operator + strategy: deployment + installModes: + - supported: true + type: OwnNamespace + - supported: true + type: SingleNamespace + - supported: true + type: MultiNamespace + - supported: false + type: AllNamespaces + keywords: + - workspaces + - devtools + - developer + - ide + - java + links: + - name: Product Page + url: http://www.eclipse.org/che + - name: Documentation + url: https://www.eclipse.org/che/docs + - name: Operator GitHub Repo + url: https://github.com/eclipse/che-operator + maintainers: + - email: dfestal@redhat.com + name: David Festal + maturity: stable + provider: + name: Eclipse Foundation + replaces: eclipse-che-preview-openshift.v9.9.9-nightly.1563282936 + version: 9.9.9-nightly.1563539196 diff --git a/olm/eclipse-che-preview-openshift/deploy/olm-catalog/eclipse-che-preview-openshift/eclipse-che-preview-openshift.package.yaml b/olm/eclipse-che-preview-openshift/deploy/olm-catalog/eclipse-che-preview-openshift/eclipse-che-preview-openshift.package.yaml index 2f47df6365..79d55009b7 100644 --- a/olm/eclipse-che-preview-openshift/deploy/olm-catalog/eclipse-che-preview-openshift/eclipse-che-preview-openshift.package.yaml +++ b/olm/eclipse-che-preview-openshift/deploy/olm-catalog/eclipse-che-preview-openshift/eclipse-che-preview-openshift.package.yaml @@ -3,5 +3,5 @@ channels: - name: stable currentCSV: eclipse-che-preview-openshift.v7.0.0-rc-2.0 - name: nightly - currentCSV: eclipse-che-preview-openshift.v9.9.9-nightly.1563282936 + currentCSV: eclipse-che-preview-openshift.v9.9.9-nightly.1563539196 defaultChannel: stable diff --git a/olm/release-olm-files.sh b/olm/release-olm-files.sh index c8389666db..6785825170 100755 --- a/olm/release-olm-files.sh +++ b/olm/release-olm-files.sh @@ -54,6 +54,8 @@ do -e 's/imagePullPolicy: *Always/imagePullPolicy: IfNotPresent/' \ -e 's/"cheImageTag": *"nightly"/"cheImageTag": ""/' \ -e 's|"identityProviderImage": *"eclipse/che-keycloak:nightly"|"identityProviderImage": ""|' \ + -e 's|"devfileRegistryImage": *"quay.io/eclipse/che-devfile-registry:nightly"|"devfileRegistryImage": ""|' \ + -e 's|"pluginRegistryImage": *"quay.io/eclipse/che-plugin-registry:nighlty"|"pluginRegistryImage": ""|' \ -e "/^ replaces: ${packageName}.v.*/d" \ -e "s/^ version: ${lastPackageNightlyVersion}/ version: ${RELEASE}/" \ -e "/^ version: ${RELEASE}/i\ \ replaces: ${packageName}.v${lastPackagePreReleaseVersion}" \ diff --git a/pkg/apis/org/v1/che_types.go b/pkg/apis/org/v1/che_types.go index 356a0fdafa..f4fb0d5b62 100644 --- a/pkg/apis/org/v1/che_types.go +++ b/pkg/apis/org/v1/che_types.go @@ -13,6 +13,7 @@ package v1 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + corev1 "k8s.io/api/core/v1" ) // EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN! @@ -52,8 +53,32 @@ type CheClusterSpecServer struct { TlsSupport bool `json:"tlsSupport"` // DevfileRegistryUrl is an endpoint serving sample ready-to-use devfiles. Defaults to https://che-devfile-registry.openshift.io DevfileRegistryUrl string `json:"devfileRegistryUrl"` + // DevfileRegistryImage is image:tag used in Devfile registry deployment + DevfileRegistryImage string `json:"devfileRegistryImage"` + // DevfileRegistryImagePullPolicy is the image pull policy used in Devfile registry deployment + DevfileRegistryImagePullPolicy corev1.PullPolicy `json:"devfileRegistryPullPolicy"` + // DevfileRegistryMemoryLimit is the memory limit used in Devfile registry deployment + DevfileRegistryMemoryLimit string `json:"devfileRegistryMemoryLimit"` + // DevfileRegistryMemoryRequest is the memory request used in Devfile registry deployment + DevfileRegistryMemoryRequest string `json:"devfileRegistryMemoryRequest"` + // ExternalDevfileRegistry instructs operator on whether or not to deploy a dedicated Devfile registry server + // By default a dedicated devfile registry server is started. + // But if ExternalDevfileRegistry is `true`, then no such dedicated server will be started by the operator + ExternalDevfileRegistry bool `json:"externalDevfileRegistry"` // PluginRegistryUrl is an endpoint serving plugin definitions. Defaults to https://che-plugin-registry.openshift.io PluginRegistryUrl string `json:"pluginRegistryUrl"` + // PluginRegistryImage is image:tag used in Plugin registry deployment + PluginRegistryImage string `json:"pluginRegistryImage"` + // PluginRegistryImagePullPolicy is the image pull policy used in Plugin registry deployment + PluginRegistryImagePullPolicy corev1.PullPolicy `json:"pluginRegistryPullPolicy"` + // PluginRegistryMemoryLimit is the memory limit used in Plugin registry deployment + PluginRegistryMemoryLimit string `json:"pluginRegistryMemoryLimit"` + // PluginRegistryMemoryRequest is the memory request used in Plugin registry deployment + PluginRegistryMemoryRequest string `json:"pluginRegistryMemoryRequest"` + // ExternalPluginRegistry instructs operator on whether or not to deploy a dedicated Plugin registry server + // By default a dedicated plugin registry server is started. + // But if ExternalPluginRegistry is `true`, then no such dedicated server will be started by the operator + ExternalPluginRegistry bool `json:"externalPluginRegistry"` // ProxyURL is protocol+hostname of a proxy server. Automatically added as JAVA_OPTS and https(s)_proxy // to Che server and workspaces containers ProxyURL string `json:"proxyURL"` @@ -170,6 +195,10 @@ type CheClusterStatus struct { CheURL string `json:"cheURL"` // KeycloakURL is Keycloak protocol+route/ingress KeycloakURL string `json:"keycloakURL"` + // DevfileRegistryURL is the Devfile registry protocol+route/ingress + DevfileRegistryURL string `json:"devfileRegistryURL"` + // PluginRegistryURL is the Plugin registry protocol+route/ingress + PluginRegistryURL string `json:"pluginRegistryURL"` } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object diff --git a/pkg/controller/che/che_controller.go b/pkg/controller/che/che_controller.go index 12b60b2db1..e1de098f01 100644 --- a/pkg/controller/che/che_controller.go +++ b/pkg/controller/che/che_controller.go @@ -367,6 +367,7 @@ func (r *ReconcileChe) Reconcile(request reconcile.Request) (reconcile.Result, e } } } + cheFlavor := util.GetValue(instance.Spec.Server.CheFlavor, deploy.DefaultCheFlavor) ingressStrategy := util.GetValue(instance.Spec.K8SOnly.IngressStrategy, deploy.DefaultIngressStrategy) ingressDomain := instance.Spec.K8SOnly.IngressDomain @@ -375,6 +376,150 @@ func (r *ReconcileChe) Reconcile(request reconcile.Request) (reconcile.Result, e if tlsSupport { protocol = "https" } + + addRegistryRoute := func (registryType string) (string, error) { + registryName := "che-" + registryType + "-registry" + host := "" + if !isOpenShift { + ingress := deploy.NewIngress(instance, registryName, registryName, 8080) + if err := r.CreateNewIngress(instance, ingress); err != nil { + return "", err + } + host = ingressDomain + if ingressStrategy == "multi-host" { + host = registryName + "-" + instance.Namespace + "." + ingressDomain + } + } else { + route := deploy.NewRoute(instance, registryName, registryName, 8080) + if tlsSupport { + route = deploy.NewTlsRoute(instance, registryName, registryName, 8080) + } + if err := r.CreateNewRoute(instance, route); err != nil { + return "", err + } + host = route.Spec.Host + if len(host) < 1 { + cheRoute := r.GetEffectiveRoute(instance, route.Name) + host = cheRoute.Spec.Host + } + } + return protocol + "://" + host, nil + } + + addRegistryDeployment := func ( + registryType string, + registryImage string, + registryImagePullPolicy corev1.PullPolicy, + registryMemoryLimit string, + registryMemoryRequest string, + ) (*reconcile.Result, error) { + registryName := "che-" + registryType + "-registry" + + // Create a new registry service + registryLabels := deploy.GetLabels(instance, registryName) + registryService := deploy.NewService(instance, registryName, []string{"http"}, []int32{8080}, registryLabels) + if err := r.CreateService(instance,registryService); err != nil { + return &reconcile.Result{}, err + } + // Create a new registry deployment + registryDeployment := deploy.NewRegistryDeployment( + instance, + registryType, + registryImage, + registryImagePullPolicy, + registryMemoryLimit, + registryMemoryRequest, + ) + if err := r.CreateNewDeployment(instance, registryDeployment); err != nil { + return &reconcile.Result{}, err + } + time.Sleep(time.Duration(1) * time.Second) + effectiveDeployment, err := r.GetEffectiveDeployment(instance, registryDeployment.Name) + if err != nil { + logrus.Errorf("Failed to get %s deployment: %s", registryDeployment.Name, err) + return &reconcile.Result{}, err + } + if !tests { + if effectiveDeployment.Status.AvailableReplicas != 1 { + scaled := k8sclient.GetDeploymentStatus(registryName, instance.Namespace) + if !scaled { + return &reconcile.Result{Requeue: true, RequeueAfter: time.Second * 5}, err + } + } + if effectiveDeployment.Spec.Template.Spec.Containers[0].Image != registryImage { + newDeployment := deploy.NewRegistryDeployment( + instance, + registryType, + registryImage, + registryImagePullPolicy, + registryMemoryLimit, + registryMemoryRequest, + ) + logrus.Infof("Updating %s registry deployment with an image %s", registryType, registryImage) + if err := controllerutil.SetControllerReference(instance, newDeployment, r.scheme); err != nil { + logrus.Errorf("An error occurred: %s", err) + } + if err := r.client.Update(context.TODO(), newDeployment); err != nil { + logrus.Errorf("Failed to update %s registry deployment: %s", registryType, err) + } + } + } + return nil, nil + } + + // Create Plugin registry resources unless an external registry is used + externalPluginRegistry := instance.Spec.Server.ExternalPluginRegistry + if !externalPluginRegistry { + pluginRegistryURL, err := addRegistryRoute("plugin") + if err != nil { + return reconcile.Result{}, err + } + if cheFlavor != "codeready" { + pluginRegistryURL += "/v3" + } + instance.Status.PluginRegistryURL = pluginRegistryURL + if err := r.UpdateCheCRStatus(instance, "status: Plugin Registry URL", pluginRegistryURL); err != nil { + instance, _ = r.GetCR(request) + return reconcile.Result{Requeue: true, RequeueAfter: time.Second * 1}, err + } + + result, err := addRegistryDeployment( + "plugin", + util.GetValue(instance.Spec.Server.PluginRegistryImage, deploy.DefaultPluginRegistryImage), + corev1.PullPolicy(util.GetValue(string(instance.Spec.Server.PluginRegistryImagePullPolicy), deploy.DefaultPluginRegistryPullPolicy)), + util.GetValue(string(instance.Spec.Server.PluginRegistryMemoryLimit), deploy.DefaultPluginRegistryMemoryLimit), + util.GetValue(string(instance.Spec.Server.PluginRegistryMemoryRequest), deploy.DefaultPluginRegistryMemoryRequest), + ) + if err != nil || result != nil { + return *result, err + } + } + + // Create devfile registry resources unless an external registry is used + externalDevfileRegistry := instance.Spec.Server.ExternalDevfileRegistry + if !externalDevfileRegistry { + devfileRegistryURL, err := addRegistryRoute("devfile") + if err != nil { + return reconcile.Result{}, err + } + instance.Status.DevfileRegistryURL = devfileRegistryURL + if err := r.UpdateCheCRStatus(instance, "status: Devfile Registry URL", devfileRegistryURL); err != nil { + instance, _ = r.GetCR(request) + return reconcile.Result{Requeue: true, RequeueAfter: time.Second * 1}, err + } + + result, err := addRegistryDeployment( + "devfile", + util.GetValue(instance.Spec.Server.DevfileRegistryImage, deploy.DefaultDevfileRegistryImage), + corev1.PullPolicy(util.GetValue(string(instance.Spec.Server.DevfileRegistryImagePullPolicy), deploy.DefaultDevfileRegistryPullPolicy)), + util.GetValue(string(instance.Spec.Server.DevfileRegistryMemoryLimit), deploy.DefaultDevfileRegistryMemoryLimit), + util.GetValue(string(instance.Spec.Server.DevfileRegistryMemoryRequest), deploy.DefaultDevfileRegistryMemoryRequest), + ) + if err != nil || result != nil { + return *result, err + } + } + // create Che service and route cheLabels := deploy.GetLabels(instance, util.GetValue(instance.Spec.Server.CheFlavor, deploy.DefaultCheFlavor)) diff --git a/pkg/controller/che/create.go b/pkg/controller/che/create.go index 6f25006b87..dcd059e1a7 100644 --- a/pkg/controller/che/create.go +++ b/pkg/controller/che/create.go @@ -470,17 +470,7 @@ func (r *ReconcileChe) GenerateAndSaveFields(instance *orgv1.CheCluster, request return err } } - pluginRegistryUrl := util.GetValue(instance.Spec.Server.PluginRegistryUrl, deploy.DefaultUpstreamPluginRegistryUrl) - if cheFlavor == "codeready" { - pluginRegistryUrl = deploy.DefaultPluginRegistryUrl - } - if len(instance.Spec.Server.PluginRegistryUrl) < 1 { - instance.Spec.Server.PluginRegistryUrl = pluginRegistryUrl - if err := r.UpdateCheCRSpec(instance, "plugin registry URL", pluginRegistryUrl); err != nil { - return err - } - } cheLogLevel := util.GetValue(instance.Spec.Server.CheLogLevel, deploy.DefaultCheLogLevel) if len(instance.Spec.Server.CheLogLevel) < 1 { instance.Spec.Server.CheLogLevel = cheLogLevel diff --git a/pkg/deploy/che_configmap.go b/pkg/deploy/che_configmap.go index a09cee0b32..bb1053ffa5 100644 --- a/pkg/deploy/che_configmap.go +++ b/pkg/deploy/che_configmap.go @@ -61,8 +61,8 @@ type CheConfigMap struct { WorkspaceHttpProxy string `json:"CHE_WORKSPACE_HTTP__PROXY"` WorkspaceHttpsProxy string `json:"CHE_WORKSPACE_HTTPS__PROXY"` WorkspaceNoProxy string `json:"CHE_WORKSPACE_NO__PROXY"` - PluginRegistryUrl string `json:"CHE_WORKSPACE_PLUGIN__REGISTRY__URL"` - DevfileRegistryUrl string `json:"CHE_WORKSPACE_DEVFILE__REGISTRY__URL"` + PluginRegistryUrl string `json:"CHE_WORKSPACE_PLUGIN__REGISTRY__URL,omitempty"` + DevfileRegistryUrl string `json:"CHE_WORKSPACE_DEVFILE__REGISTRY__URL,omitempty"` WebSocketEndpointMinor string `json:"CHE_WEBSOCKET_ENDPOINT__MINOR"` } @@ -156,8 +156,11 @@ func GetConfigMapData(cr *orgv1.CheCluster) (cheEnv map[string]string) { keycloakClientId := util.GetValue(cr.Spec.Auth.KeycloakClientId, cheFlavor+"-public") ingressStrategy := util.GetValue(cr.Spec.K8SOnly.IngressStrategy, DefaultIngressStrategy) ingressClass := util.GetValue(cr.Spec.K8SOnly.IngressClass, DefaultIngressClass) - devfileRegistryUrl := util.GetValue(cr.Spec.Server.DevfileRegistryUrl, DefaultDevfileRegistryUrl) - pluginRegistryUrl := util.GetValue(cr.Spec.Server.PluginRegistryUrl, DefaultPluginRegistryUrl) + devfileRegistryUrl := cr.Status.DevfileRegistryURL + pluginRegistryUrl := cr.Status.PluginRegistryURL + if pluginRegistryUrl == "" && cheFlavor == "codeready" { + pluginRegistryUrl = DefaultCodereadyPluginRegistryUrl + } cheLogLevel := util.GetValue(cr.Spec.Server.CheLogLevel, DefaultCheLogLevel) cheDebug := util.GetValue(cr.Spec.Server.CheDebug, DefaultCheDebug) diff --git a/pkg/deploy/defaults.go b/pkg/deploy/defaults.go index 519d5ff63e..54d445b802 100644 --- a/pkg/deploy/defaults.go +++ b/pkg/deploy/defaults.go @@ -13,32 +13,38 @@ package deploy const ( - DefaultCheServerImageRepo = "eclipse/che-server" - DefaultCodeReadyServerImageRepo = "registry.redhat.io/codeready-workspaces/server-rhel8" - DefaultCheServerImageTag = "7.0.0-RC-2.0" - DefaultCodeReadyServerImageTag = "1.2" - DefaultCheFlavor = "che" - DefaultChePostgresUser = "pgche" - DefaultChePostgresHostName = "postgres" - DefaultChePostgresPort = "5432" - DefaultChePostgresDb = "dbche" - DefaultPvcStrategy = "common" - DefaultPvcClaimSize = "1Gi" - DefaultIngressStrategy = "multi-host" - DefaultIngressClass = "nginx" - DefaultPluginRegistryUrl = "https://che-plugin-registry.openshift.io" - DefaultUpstreamPluginRegistryUrl = "https://che-plugin-registry.openshift.io/v3" - DefaultDevfileRegistryUrl = "https://che-devfile-registry.openshift.io" - DefaultKeycloakAdminUserName = "admin" - DefaultCheLogLevel = "INFO" - DefaultCheDebug = "false" - DefaultPvcJobsImage = "registry.redhat.io/ubi8-minimal:8.0-127" - DefaultPvcJobsUpstreamImage = "registry.access.redhat.com/ubi8-minimal:8.0-127" - DefaultPostgresImage = "registry.redhat.io/rhscl/postgresql-96-rhel7:1-40" - DefaultPostgresUpstreamImage = "centos/postgresql-96-centos7:9.6" - DefaultKeycloakImage = "registry.redhat.io/redhat-sso-7/sso73-openshift:1.0-11" - DefaultKeycloakUpstreamImage = "eclipse/che-keycloak:7.0.0-RC-2.0" - DefaultJavaOpts = "-XX:MaxRAMFraction=2 -XX:+UseParallelGC -XX:MinHeapFreeRatio=10 " + + DefaultCheServerImageRepo = "eclipse/che-server" + DefaultCodeReadyServerImageRepo = "registry.redhat.io/codeready-workspaces/server-rhel8" + DefaultCheServerImageTag = "7.0.0-RC-2.0" + DefaultCodeReadyServerImageTag = "1.2" + DefaultCheFlavor = "che" + DefaultChePostgresUser = "pgche" + DefaultChePostgresHostName = "postgres" + DefaultChePostgresPort = "5432" + DefaultChePostgresDb = "dbche" + DefaultPvcStrategy = "common" + DefaultPvcClaimSize = "1Gi" + DefaultIngressStrategy = "multi-host" + DefaultIngressClass = "nginx" + DefaultPluginRegistryImage = "quay.io/eclipse/che-plugin-registry:7.0.0-RC-2.0" + DefaultPluginRegistryPullPolicy = "Always" + DefaultPluginRegistryMemoryLimit = "32Mi" + DefaultPluginRegistryMemoryRequest = "16Mi" + DefaultCodereadyPluginRegistryUrl = "https://che-plugin-registry.openshift.io" + DefaultDevfileRegistryImage = "quay.io/eclipse/che-devfile-registry:7.0.0-RC-2.0" + DefaultDevfileRegistryPullPolicy = "Always" + DefaultDevfileRegistryMemoryLimit = "32Mi" + DefaultDevfileRegistryMemoryRequest = "16Mi" + DefaultKeycloakAdminUserName = "admin" + DefaultCheLogLevel = "INFO" + DefaultCheDebug = "false" + DefaultPvcJobsImage = "registry.redhat.io/ubi8-minimal:8.0-127" + DefaultPvcJobsUpstreamImage = "registry.access.redhat.com/ubi8-minimal:8.0-127" + DefaultPostgresImage = "registry.redhat.io/rhscl/postgresql-96-rhel7:1-40" + DefaultPostgresUpstreamImage = "centos/postgresql-96-centos7:9.6" + DefaultKeycloakImage = "registry.redhat.io/redhat-sso-7/sso73-openshift:1.0-11" + DefaultKeycloakUpstreamImage = "eclipse/che-keycloak:7.0.0-RC-2.0" + DefaultJavaOpts = "-XX:MaxRAMFraction=2 -XX:+UseParallelGC -XX:MinHeapFreeRatio=10 " + "-XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=4 " + "-XX:AdaptiveSizePolicyWeight=90 -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap " + "-Dsun.zip.disableMemoryMapping=true -Xms20m" @@ -46,8 +52,8 @@ const ( "-XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 " + "-Dsun.zip.disableMemoryMapping=true " + "-Xms20m -Djava.security.egd=file:/dev/./urandom" - DefaultServerMemoryRequest = "512Mi" - DefaultServerMemoryLimit = "1Gi" - DefaultSecurityContextFsGroup = "1724" - DefaultSecurityContextRunAsUser = "1724" + DefaultServerMemoryRequest = "512Mi" + DefaultServerMemoryLimit = "1Gi" + DefaultSecurityContextFsGroup = "1724" + DefaultSecurityContextRunAsUser = "1724" ) diff --git a/pkg/deploy/deployment_devfile_registry.go b/pkg/deploy/deployment_devfile_registry.go new file mode 100644 index 0000000000..8d4007a9fa --- /dev/null +++ b/pkg/deploy/deployment_devfile_registry.go @@ -0,0 +1,118 @@ +// +// 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 +// +package deploy + +import ( + orgv1 "github.com/eclipse/che-operator/pkg/apis/org/v1" + appsv1 "k8s.io/api/apps/v1" + corev1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/api/resource" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/util/intstr" +) + +func NewRegistryDeployment( + cr *orgv1.CheCluster, + registryType string, + registryImage string, + registryImagePullPolicy corev1.PullPolicy, + registryMemoryLimit string, + registryMemoryRequest string, + ) *appsv1.Deployment { + name := "che-" + registryType + "-registry" + labels := GetLabels(cr, name) + _25Percent := intstr.FromString("25%") + _1 := int32(1) + _2 := int32(2) + return &appsv1.Deployment{ + TypeMeta: metav1.TypeMeta{ + Kind: "Deployment", + APIVersion: "apps/v1", + }, + ObjectMeta: metav1.ObjectMeta{ + Name: name, + Namespace: cr.Namespace, + Labels: labels, + }, + Spec: appsv1.DeploymentSpec{ + Replicas: &_1, + RevisionHistoryLimit: &_2, + Selector: &metav1.LabelSelector{MatchLabels: labels}, + Strategy: appsv1.DeploymentStrategy{ + Type: appsv1.RollingUpdateDeploymentStrategyType, + RollingUpdate: &appsv1.RollingUpdateDeployment { + MaxSurge: &_25Percent, + MaxUnavailable: &_25Percent, + }, + }, + Template: corev1.PodTemplateSpec{ + ObjectMeta: metav1.ObjectMeta{ + Labels: labels, + }, + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + { + Name: name, + Image: registryImage, + ImagePullPolicy: registryImagePullPolicy, + Ports: []corev1.ContainerPort{ + { + Name: "http", + ContainerPort: 8080, + Protocol: "TCP", + }, + }, + Resources: corev1.ResourceRequirements{ + Requests: corev1.ResourceList{ + corev1.ResourceMemory: resource.MustParse(registryMemoryRequest), + }, + Limits: corev1.ResourceList{ + corev1.ResourceMemory: resource.MustParse(registryMemoryLimit), + }, + }, + ReadinessProbe: &corev1.Probe{ + Handler: corev1.Handler{ + HTTPGet: &corev1.HTTPGetAction{ + Path: "/" + registryType + "s/", + Port: intstr.IntOrString{ + Type: intstr.Int, + IntVal: int32(8080), + }, + Scheme: corev1.URISchemeHTTP, + }, + }, + InitialDelaySeconds: 3, + FailureThreshold: 10, + TimeoutSeconds: 3, + }, + LivenessProbe: &corev1.Probe{ + Handler: corev1.Handler{ + HTTPGet: &corev1.HTTPGetAction{ + Path: "/" + registryType + "s/", + Port: intstr.IntOrString{ + Type: intstr.Int, + IntVal: int32(8080), + }, + Scheme: corev1.URISchemeHTTP, + }, + }, + InitialDelaySeconds: 30, + FailureThreshold: 10, + TimeoutSeconds: 3, + }, + }, + }, + }, + }, + }, + } +} diff --git a/pkg/deploy/ingress.go b/pkg/deploy/ingress.go index d25fc93f3b..390ffcdce6 100644 --- a/pkg/deploy/ingress.go +++ b/pkg/deploy/ingress.go @@ -27,11 +27,8 @@ func NewIngress(cr *orgv1.CheCluster, name string, serviceName string, port int) } ingressDomain := cr.Spec.K8SOnly.IngressDomain ingressClass := util.GetValue(cr.Spec.K8SOnly.IngressClass, DefaultIngressClass) - labels := GetLabels(cr, util.GetValue(cr.Spec.Server.CheFlavor, DefaultCheFlavor)) + labels := GetLabels(cr, name) tlsSecretName := cr.Spec.K8SOnly.TlsSecretName - if name == "keycloak" { - labels = GetLabels(cr, name) - } tls := "false" if tlsSupport { tls = "true" diff --git a/release-operator-code.sh b/release-operator-code.sh index af2b5d89d2..d0643257b5 100755 --- a/release-operator-code.sh +++ b/release-operator-code.sh @@ -30,21 +30,27 @@ cd "${BASE_DIR}" echo echo "## Creating release '${RELEASE}' of the Che operator docker image" +DefaultPluginRegistryImage + lastDefaultCheVersion=$(grep 'DefaultCheServerImageTag' "pkg/deploy/defaults.go" | sed -e 's/.*DefaultCheServerImageTag *= *"\([^"]*\)"/\1/') lastDefaultKeycloakVersion=$(grep 'DefaultKeycloakUpstreamImage' "pkg/deploy/defaults.go" | sed -e 's/.*DefaultKeycloakUpstreamImage *= *"[^":]*:\([^"]*\)"/\1/') +lastDefaultPluginRegistryVersion=$(grep 'DefaultPluginRegistryImage' "pkg/deploy/defaults.go" | sed -e 's/.*DefaultPluginRegistryImage *= *"[^":]*:\([^"]*\)"/\1/') +lastDefaultDevfileRegistryVersion=$(grep 'DefaultDevfileRegistryImage' "pkg/deploy/defaults.go" | sed -e 's/.*DefaultDevfileRegistryImage *= *"[^":]*:\([^"]*\)"/\1/') if [ "${lastDefaultCheVersion}" != "${lastDefaultKeycloakVersion}" ] then echo "#### ERROR ####" echo "Current default Che version: ${lastDefaultCheVersion}" echo "Current default Keycloak version: ${lastDefaultKeycloakVersion}" - echo "Current default version for Che and keycloak are not the same in file 'pkg/deploy/defaults.go'." + echo "Current default Devfile Registry version: ${lastDefaultDevfileRegistryVersion}" + echo "Current default Plugin Registry version: ${lastDefaultPluginRegistryVersion}" + echo "Current default version for various Che containers are not the same in file 'pkg/deploy/defaults.go'." echo "Please fix that manually first !" exit 1 fi lastDefaultVersion="${lastDefaultCheVersion}" -echo " - Current default Che and Keycloak version: ${lastDefaultVersion}" -echo " - New version to apply as default Che and Keycloak version: ${RELEASE}" +echo " - Current default version of Che containers: ${lastDefaultVersion}" +echo " - New version to apply as default version for Che containers: ${RELEASE}" if [ "${lastDefaultVersion}" == "${RELEASE}" ] then echo "Release ${RELEASE} already exists as the default in the Operator Go code !" @@ -56,6 +62,8 @@ echo " => will update default Eclipse Che Keycloak docker image tags from '$ sed \ -e "s/\(.*DefaultCheServerImageTag *= *\"\)[^\"]*\"/\1${RELEASE}\"/" \ -e "s/\(.*DefaultKeycloakUpstreamImage *= *\"[^\":]*:\)[^\"]*\"/\1${RELEASE}\"/" \ +-e "s/\(.*DefaultPluginRegistryImage *= *\"[^\":]*:\)[^\"]*\"/\1${RELEASE}\"/" \ +-e "s/\(.*DefaultDevfileRegistryImage *= *\"[^\":]*:\)[^\"]*\"/\1${RELEASE}\"/" \ pkg/deploy/defaults.go \ > pkg/deploy/defaults.go.new mv pkg/deploy/defaults.go.new pkg/deploy/defaults.go