fix: CRW-2818 switch to new flavour... (#1344)
* fix: CRW-2818 switch to new flavour devspaces (no more codeready flavour) Change-Id: I5fd0ef785d55ca2cc0653c7afb696798c2f7935b Signed-off-by: nickboldt <nboldt@redhat.com> * run 'make update-resources -s' Change-Id: Ibe0bab0d3c803564feb161896f28a23bf378b444 Signed-off-by: nickboldt <nboldt@redhat.com> * fixup Signed-off-by: Anatolii Bazko <abazko@redhat.com> Co-authored-by: Anatolii Bazko <abazko@redhat.com>pull/1349/head
parent
f39e24dfd6
commit
21da2fc695
|
|
@ -17,7 +17,7 @@ che-operator Development Guide: https://github.com/eclipse-che/che-operator/#dev
|
|||
|
||||
### How to test this PR?
|
||||
<!-- Please explain for example :
|
||||
- The test platform (openshift, kubernetes, minikube, CodeReady Container, docker-desktop, etc)
|
||||
- The test platform (openshift, kubernetes, minikube, docker-desktop, etc)
|
||||
- steps to reproduce
|
||||
-->
|
||||
|
||||
|
|
|
|||
|
|
@ -66,4 +66,4 @@ USER 65532:65532
|
|||
|
||||
ENTRYPOINT ["/manager"]
|
||||
|
||||
# append Brew metadata here - see https://github.com/redhat-developer/codeready-workspaces-images/blob/crw-2-rhel-8/crw-jenkins/jobs/CRW_CI/crw-operator_2.x.jenkinsfile
|
||||
# append Brew metadata here
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
# Che/CodeReady Workspaces Operator
|
||||
# Che/Red Hat OpenShift Dev Spaces Operator
|
||||
|
||||
[](https://codecov.io/gh/eclipse-che/che-operator)
|
||||
|
||||
Che/CodeReady workspaces operator uses [Operator SDK](https://github.com/operator-framework/operator-sdk) and [Go Kube client](https://github.com/kubernetes/client-go) to deploy, update and manage K8S/OpenShift resources that constitute a single or multi-user Eclipse Che/CodeReady Workspaces cluster.
|
||||
Che/Red Hat OpenShift Dev Spaces operator uses [Operator SDK](https://github.com/operator-framework/operator-sdk) and [Go Kube client](https://github.com/kubernetes/client-go) to deploy, update and manage K8S/OpenShift resources that constitute a single or multi-user Eclipse Che/Red Hat OpenShift Dev Spaces cluster.
|
||||
|
||||
The operator watches for a Custom Resource of Kind `CheCluster`, and operator controller executes its business logic when a new Che object is created, namely:
|
||||
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ type CheClusterSpecServer struct {
|
|||
// +optional
|
||||
CheImagePullPolicy corev1.PullPolicy `json:"cheImagePullPolicy,omitempty"`
|
||||
// Deprecated. The value of this flag is ignored.
|
||||
// Specifies a variation of the installation. The options are `che` for upstream Che installations, or `codeready` for link:https://developers.redhat.com/products/codeready-workspaces/overview[CodeReady Workspaces] installation.
|
||||
// Specifies a variation of the installation. The options are `che` for upstream Che installations, or `devspaces` for link:https://developers.redhat.com/products/codeready-workspaces/overview[Red Hat OpenShift Dev Spaces] installation.
|
||||
// Override the default value only on necessary occasions.
|
||||
// +optional
|
||||
CheFlavor string `json:"cheFlavor,omitempty"`
|
||||
|
|
|
|||
|
|
@ -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.45.0-436.next
|
||||
name: eclipse-che-preview-openshift.v7.45.0-438.next
|
||||
namespace: placeholder
|
||||
spec:
|
||||
apiservicedefinitions: {}
|
||||
|
|
@ -1284,4 +1284,4 @@ spec:
|
|||
maturity: stable
|
||||
provider:
|
||||
name: Eclipse Foundation
|
||||
version: 7.45.0-436.next
|
||||
version: 7.45.0-438.next
|
||||
|
|
|
|||
|
|
@ -568,9 +568,9 @@ spec:
|
|||
cheFlavor:
|
||||
description: Deprecated. The value of this flag is ignored.
|
||||
Specifies a variation of the installation. The options are
|
||||
`che` for upstream Che installations, or `codeready` for link:https://developers.redhat.com/products/codeready-workspaces/overview[CodeReady
|
||||
Workspaces] installation. Override the default value only
|
||||
on necessary occasions.
|
||||
`che` for upstream Che installations, or `devspaces` for link:https://developers.redhat.com/products/codeready-workspaces/overview[Red
|
||||
Hat OpenShift Dev Spaces] installation. Override the default
|
||||
value only on necessary occasions.
|
||||
type: string
|
||||
cheHost:
|
||||
description: Public host name of the installed Che server. When
|
||||
|
|
|
|||
|
|
@ -564,9 +564,9 @@ spec:
|
|||
cheFlavor:
|
||||
description: Deprecated. The value of this flag is ignored.
|
||||
Specifies a variation of the installation. The options are
|
||||
`che` for upstream Che installations, or `codeready` for link:https://developers.redhat.com/products/codeready-workspaces/overview[CodeReady
|
||||
Workspaces] installation. Override the default value only
|
||||
on necessary occasions.
|
||||
`che` for upstream Che installations, or `devspaces` for link:https://developers.redhat.com/products/codeready-workspaces/overview[Red
|
||||
Hat OpenShift Dev Spaces] installation. Override the default
|
||||
value only on necessary occasions.
|
||||
type: string
|
||||
cheHost:
|
||||
description: Public host name of the installed Che server. When
|
||||
|
|
|
|||
|
|
@ -564,9 +564,9 @@ spec:
|
|||
cheFlavor:
|
||||
description: Deprecated. The value of this flag is ignored.
|
||||
Specifies a variation of the installation. The options are
|
||||
`che` for upstream Che installations, or `codeready` for link:https://developers.redhat.com/products/codeready-workspaces/overview[CodeReady
|
||||
Workspaces] installation. Override the default value only
|
||||
on necessary occasions.
|
||||
`che` for upstream Che installations, or `devspaces` for link:https://developers.redhat.com/products/codeready-workspaces/overview[Red
|
||||
Hat OpenShift Dev Spaces] installation. Override the default
|
||||
value only on necessary occasions.
|
||||
type: string
|
||||
cheHost:
|
||||
description: Public host name of the installed Che server. When
|
||||
|
|
|
|||
|
|
@ -15,9 +15,9 @@ set -e +x
|
|||
|
||||
if [[ ! $1 ]]; then
|
||||
echo "Usage: $0 CONTAINER [tar-extraction-flags]"
|
||||
echo "Usage: $0 quay.io/crw/operator-metadata:latest"
|
||||
echo "Usage: $0 quay.io/crw/devfileregistry-rhel8:latest var/www/html/*/external_images.txt"
|
||||
echo "Usage: $0 quay.io/crw/pluginregistry-rhel8:latest var/www/html/*/external_images.txt"
|
||||
echo "Usage: $0 quay.io/devspaces/devspaces-operator-bundle:latest"
|
||||
echo "Usage: $0 quay.io/devspaces/devfileregistry-rhel8:latest var/www/html/*/external_images.txt"
|
||||
echo "Usage: $0 quay.io/devspaces/pluginregistry-rhel8:latest var/www/html/*/external_images.txt"
|
||||
exit
|
||||
fi
|
||||
|
||||
|
|
|
|||
|
|
@ -111,13 +111,13 @@ func TestCorrectAirGapPatchedImage(t *testing.T) {
|
|||
}
|
||||
|
||||
var (
|
||||
airGapRegistryHostname = "myregistry.org"
|
||||
airGapRegistryOrganization = "myorg"
|
||||
expectedAirGapPostgresUpstreamImage = makeAirGapImagePath(airGapRegistryHostname, airGapRegistryOrganization, getImageNameFromFullImage(defaultPostgresImage))
|
||||
expectedAirGapPostgresUpstreamImageOnlyOrgChanged = makeAirGapImagePath(getHostnameFromImage(defaultPostgresImage), airGapRegistryOrganization, getImageNameFromFullImage(defaultPostgresImage))
|
||||
expectedAirGapCRWPluginRegistryOnlyOrgChanged = makeAirGapImagePath(getHostnameFromImage(defaultPluginRegistryImage), airGapRegistryOrganization, getImageNameFromFullImage(defaultPluginRegistryImage))
|
||||
expectedAirGapCRWPostgresImage = makeAirGapImagePath(airGapRegistryHostname, airGapRegistryOrganization, getImageNameFromFullImage(defaultPostgresImage))
|
||||
expectedAirGapCRWDevfileRegistryImageOnlyHostnameChanged = makeAirGapImagePath(airGapRegistryHostname, getOrganizationFromImage(defaultDevfileRegistryImage), getImageNameFromFullImage(defaultDevfileRegistryImage))
|
||||
airGapRegistryHostname = "myregistry.org"
|
||||
airGapRegistryOrganization = "myorg"
|
||||
expectedAirGapPostgresUpstreamImage = makeAirGapImagePath(airGapRegistryHostname, airGapRegistryOrganization, getImageNameFromFullImage(defaultPostgresImage))
|
||||
expectedAirGapPostgresUpstreamImageOnlyOrgChanged = makeAirGapImagePath(getHostnameFromImage(defaultPostgresImage), airGapRegistryOrganization, getImageNameFromFullImage(defaultPostgresImage))
|
||||
expectedAirGapDevspacesPluginRegistryOnlyOrgChanged = makeAirGapImagePath(getHostnameFromImage(defaultPluginRegistryImage), airGapRegistryOrganization, getImageNameFromFullImage(defaultPluginRegistryImage))
|
||||
expectedAirGapDevspacesPostgresImage = makeAirGapImagePath(airGapRegistryHostname, airGapRegistryOrganization, getImageNameFromFullImage(defaultPostgresImage))
|
||||
expectedAirGapDevspacesDevfileRegistryImageOnlyHostnameChanged = makeAirGapImagePath(airGapRegistryHostname, getOrganizationFromImage(defaultDevfileRegistryImage), getImageNameFromFullImage(defaultDevfileRegistryImage))
|
||||
)
|
||||
|
||||
upstream := &orgv1.CheCluster{
|
||||
|
|
@ -125,10 +125,10 @@ func TestCorrectAirGapPatchedImage(t *testing.T) {
|
|||
Server: orgv1.CheClusterSpecServer{},
|
||||
},
|
||||
}
|
||||
crw := &orgv1.CheCluster{
|
||||
devspaces := &orgv1.CheCluster{
|
||||
Spec: orgv1.CheClusterSpec{
|
||||
Server: orgv1.CheClusterSpecServer{
|
||||
CheFlavor: "codeready",
|
||||
CheFlavor: "devspaces",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
@ -140,12 +140,12 @@ func TestCorrectAirGapPatchedImage(t *testing.T) {
|
|||
},
|
||||
},
|
||||
}
|
||||
airGapCRW := &orgv1.CheCluster{
|
||||
airGapDevspaces := &orgv1.CheCluster{
|
||||
Spec: orgv1.CheClusterSpec{
|
||||
Server: orgv1.CheClusterSpecServer{
|
||||
AirGapContainerRegistryHostname: airGapRegistryHostname,
|
||||
AirGapContainerRegistryOrganization: airGapRegistryOrganization,
|
||||
CheFlavor: "codeready",
|
||||
CheFlavor: "devspaces",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
@ -156,19 +156,19 @@ func TestCorrectAirGapPatchedImage(t *testing.T) {
|
|||
},
|
||||
},
|
||||
}
|
||||
crwOnlyOrg := &orgv1.CheCluster{
|
||||
devspacesOnlyOrg := &orgv1.CheCluster{
|
||||
Spec: orgv1.CheClusterSpec{
|
||||
Server: orgv1.CheClusterSpecServer{
|
||||
AirGapContainerRegistryOrganization: airGapRegistryOrganization,
|
||||
CheFlavor: "codeready",
|
||||
CheFlavor: "devspaces",
|
||||
},
|
||||
},
|
||||
}
|
||||
crwOnlyHostname := &orgv1.CheCluster{
|
||||
devspacesOnlyHostname := &orgv1.CheCluster{
|
||||
Spec: orgv1.CheClusterSpec{
|
||||
Server: orgv1.CheClusterSpecServer{
|
||||
AirGapContainerRegistryHostname: airGapRegistryHostname,
|
||||
CheFlavor: "codeready",
|
||||
CheFlavor: "devspaces",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
@ -177,10 +177,10 @@ func TestCorrectAirGapPatchedImage(t *testing.T) {
|
|||
"default postgres": {image: defaultPostgresImage, expected: defaultPostgresImage, cr: upstream},
|
||||
"airgap postgres": {image: defaultPostgresImage, expected: expectedAirGapPostgresUpstreamImage, cr: airGapUpstream},
|
||||
"with only the org changed": {image: defaultPostgresImage, expected: expectedAirGapPostgresUpstreamImageOnlyOrgChanged, cr: upstreamOnlyOrg},
|
||||
"codeready plugin registry with only the org changed": {image: defaultPluginRegistryImage, expected: expectedAirGapCRWPluginRegistryOnlyOrgChanged, cr: crwOnlyOrg},
|
||||
"CRW postgres": {image: defaultPostgresImage, expected: defaultPostgresImage, cr: crw},
|
||||
"CRW airgap postgres": {image: defaultPostgresImage, expected: expectedAirGapCRWPostgresImage, cr: airGapCRW},
|
||||
"crw airgap with only hostname defined": {image: defaultDevfileRegistryImage, expected: expectedAirGapCRWDevfileRegistryImageOnlyHostnameChanged, cr: crwOnlyHostname},
|
||||
"devspaces plugin registry with only the org changed": {image: defaultPluginRegistryImage, expected: expectedAirGapDevspacesPluginRegistryOnlyOrgChanged, cr: devspacesOnlyOrg},
|
||||
"devspaces postgres": {image: defaultPostgresImage, expected: defaultPostgresImage, cr: devspaces},
|
||||
"devspaces airgap postgres": {image: defaultPostgresImage, expected: expectedAirGapDevspacesPostgresImage, cr: airGapDevspaces},
|
||||
"devspaces airgap with only hostname defined": {image: defaultDevfileRegistryImage, expected: expectedAirGapDevspacesDevfileRegistryImageOnlyHostnameChanged, cr: devspacesOnlyHostname},
|
||||
}
|
||||
for name, tc := range testCases {
|
||||
t.Run(name, func(*testing.T) {
|
||||
|
|
|
|||
|
|
@ -152,8 +152,8 @@ func (s *CheServerReconciler) updateAvailabilityStatus(ctx *deploy.DeployContext
|
|||
if ctx.CheCluster.Status.CheClusterRunning != AvailableStatus {
|
||||
cheFlavor := deploy.DefaultCheFlavor(ctx.CheCluster)
|
||||
name := "Eclipse Che"
|
||||
if cheFlavor == "codeready" {
|
||||
name = "CodeReady Workspaces"
|
||||
if cheFlavor == "devspaces" {
|
||||
name = "Red Hat OpenShift Dev Spaces"
|
||||
}
|
||||
|
||||
logrus.Infof(name+" is now available at: %s", ctx.CheCluster.Status.CheURL)
|
||||
|
|
|
|||
Loading…
Reference in New Issue