Commit Graph

64 Commits (bda65a4e4068b8176b822868afae75b07c3b3c88)

Author SHA1 Message Date
Lukas Krejci bda65a4e40
Manage the Traefik gateway for implementing single host on OpenShift (#378)
Co-authored-by: Michal Vala <michal.vala@gmail.com>
2020-09-16 15:21:57 +02:00
Flavius Lacatusu dad5e5fa84
Merge pull request #420 from flacatus/refactor_func
Create a general deployContext to pass to all functions instead of pass numerous arguments
2020-08-28 14:31:52 +02:00
Flavius Lacatusu ed6594528c
Create a general deployContext to pass to all functions
Signed-off-by: Flavius Lacatusu <flacatus@redhat.com>
2020-08-27 11:30:20 +02:00
Anatolii Bazko 53ada568c7
Update link to point to latest doc (#416)
Signed-off-by: Anatolii Bazko <abazko@redhat.com>
2020-08-26 13:26:58 +03:00
Anatolii Bazko bcf77d451b
Allow to customize cheHost (#380)
* Allow to customize cheHost

Signed-off-by: Anatolii Bazko <abazko@redhat.com>
2020-08-12 11:21:01 +03:00
Anatolii Bazko c64d61faf4
Allow to use external PostgreSQL (#371)
* Allow to use exteranl PostgreSQL

Signed-off-by: Anatolii Bazko <abazko@redhat.com>
2020-07-30 09:06:27 +03:00
Anatolii Bazko b193773469
Fix deployment Eclipse Che with single-host strategy (#341)
* Fix deployment Eclipse Che with single-host strategy

Signed-off-by: Anatoliy Bazko <abazko@redhat.com>
2020-07-15 16:20:44 +03:00
Anatolii Bazko 110149a5c7
Respect openshift cluster wide proxy (#272)
* Respect OpenShift cluster wide proxy

Signed-off-by: Anatoliy Bazko <abazko@redhat.com>
2020-07-08 16:08:20 +03:00
Mykola Morhun 912fd52fc4
Implement autodetetion for self-signed certificate flag (#301)
Implement autodecetion for self-signed certificate flag

Signed-off-by: Mykola Morhun <mmorhun@redhat.com>
2020-06-15 11:01:46 +03:00
Anatoliy Bazko 4ce1c473cb Update ssl_requires to NONE
Signed-off-by: Anatoliy Bazko <abazko@redhat.com>
2020-05-29 15:11:12 +03:00
Anatoliy Bazko d6dcc1864e Revert "Merge pull request #273 from eclipse/sslrequired"
This reverts commit 1a274ab172, reversing
changes made to a0f108dcac.
2020-05-27 15:22:23 +03:00
Anatoliy Bazko eb57944cc1 Update keycloak db to turn sslRequird to none
Signed-off-by: Anatoliy Bazko <abazko@redhat.com>
2020-05-22 12:36:20 +03:00
Oleksandr Andriienko 03978b3724
fix: Check identity providers for oauth instead of check amount users. (#248)
* Back off openshift oauth, when oauth can't be used

Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com>

* Use freezed go modules.

Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com>

* Add newer olm bundle.

Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com>
2020-05-15 11:43:58 +03:00
Anatoliy Bazko b9942aacff Move defaults to env var
Signed-off-by: Anatoliy Bazko <abazko@redhat.com>
2020-05-13 08:19:17 +03:00
Mykola Morhun bc47b7b1af
Automate TLS secrets generation for Kubernetes family infrastructures (#220)
* Automate TLS secrets generation for Kubernetes family infrastructures

Signed-off-by: Mykola Morhun <mmorhun@redhat.com>
2020-04-28 16:48:58 +03:00
Mykola Morhun 56c6806b20
Add Che CR validator (#221)
* Add Che CR validator

Signed-off-by: Mykola Morhun <mmorhun@redhat.com>
2020-04-16 15:03:10 +03:00
Anatolii Bazko a8c155409d
Make che-operator non blocking (#212)
* Make che-operator non-blocking

Signed-off-by: Anatoliy Bazko <abazko@redhat.com>
2020-04-10 17:19:14 +03:00
Oleksandr Andriienko bceab0fa42
Add error status if operator hasn't got permission to count users. (#208)
* Add error status if operator hasn't got permission to count users.

Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com>

* Add proposed changes.

Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com>
2020-03-25 17:01:37 +02:00
Anatolii Bazko fdaeb5e060
Store credentials into secrets instead of plain text of CheCluster CR fields (#198)
* Use secrets instead of plain text

Signed-off-by: Anatoliy Bazko <abazko@redhat.com>
2020-03-25 09:57:36 +02:00
Anatolii Bazko 0952fa99a3
Port changes from 7.9.x to master (#201)
* Always add the devfile registry public URL env var (#192)

This fixes the [CRW-710](https://issues.redhat.com/browse/CRW-710) blocker JIRA  bug (blocking CRW 2.1 release)

Signed-off-by: David Festal <dfestal@redhat.com>

* Correctly propagate proxy settings in the operator and Keycloak  (CRW-709) (#200)

* Correctly propagate proxy settings in the operator and Keycloak .This fixes issue https://issues.redhat.com/browse/CRW-709

* Use the same Go release in PR checks as in the main Docker file to avoid a syntax arror in the PR check jobs

Signed-off-by: David Festal <dfestal@redhat.com>

* Refactoring

Co-authored-by: David Festal <dfestal@redhat.com>
2020-03-19 11:12:39 +02:00
Anatolii Bazko 016e7f11cd
Support single-user mode (#185)
* Support single-user mode

Signed-off-by: Anatoliy Bazko <abazko@redhat.com>
2020-03-17 09:29:53 +02:00
Igor Vinokur f288238f37
Propagate custom public certificates to volume mount (#171) 2020-03-04 10:53:33 +02:00
Anatolii Bazko 46c98c20e8
Enable to debug operator locally (#182)
* Enable to debug operator locally

Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com>
Co-authored-by: Oleksandr Andriienko <oandriie@redhat.com>
2020-03-02 14:10:05 +02:00
Oleksandr Andriienko e9c5d3f312
feat: Remove image refs in `defaults.go` and replace by env vars (#172)
* Move image related default variables to the operator env.

Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com>

* Fix tests.

Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com>

* Use the same env name for CRW and Upstream Che

Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com>

* Clean up.

Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com>

* Improve most che-operator env names

Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com>

* Use cheImage instead of repo only in the envs. Rename cheImageTag to cheVersion.

Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com>

* Add forgotten che-image tag to IMAGE_default_che_server

Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com>

* Add some logic for back compatibilty with Che 7.8.0

Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com>

* Handle one of the realese scripts.

Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com>

* Fix GetFullCheServerImageLink

Signed-off-by: Anatoliy Bazko <abazko@redhat.com>

* Remove extra_images.go

Signed-off-by: Anatoliy Bazko <abazko@redhat.com>

* Fix tests

Signed-off-by: Anatoliy Bazko <abazko@redhat.com>

* Improve release scripts.

Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com>

* Add docker images env to operator-local.yaml

Signed-off-by: flacatus <flacatus@redhat.com>

* Che 15874 - fix wrong docker images and update olm files (#174)

* Fix wrong docker images values

The docker images set in this GH repo should be the upstream ones,
not the CRW ones

Signed-off-by: David Festal <dfestal@redhat.com>

Co-authored-by: Anatolii Bazko <abazko@redhat.com>
Co-authored-by: Flavius Lacatusu <59865209+flacatus@users.noreply.github.com>
Co-authored-by: David Festal <dfestal@redhat.com>
2020-02-18 10:17:21 +02:00
Igor Vinokur c6737105d6
Support git self-signed SSL certs (#142)
Add new boolean property gitSelfSignedCertthat applies environment variables that contain SSL certificate and git host written from che-git-self-signed-cert config map.
The same logic is applied for the helm deployment: eclipse/che#15218

fixes eclipse/che#15285

Docs PR: eclipse/che-docs#1001

Signed-off-by: Igor Vinokur <ivinokur@redhat.com>
2019-12-26 10:23:11 +02:00
Michal Vala f94a7a46f5
add missing license headers (#135)
Signed-off-by: Michal Vala <mvala@redhat.com>
2019-11-29 10:28:36 +01:00
Michal Vala a85031793a
Option to enable che-server metrics endpoint (#117)
Signed-off-by: Michal Vala <mvala@redhat.com>
2019-11-28 23:05:28 +01:00
David Festal 5a5ea30137 Provide easier migration from 1.2 to 2.0 (#119)
* put back `che` as default for consistency with doc
* Fix https://issues.jboss.org/browse/CRW-455
* Complete the cleaning correctly.

Signed-off-by: David Festal <dfestal@redhat.com>

Conflicts:
	pkg/deploy/defaults.go
2019-11-15 11:40:40 +01:00
David Festal 76d0a54416 Fix a failing test due to hard coded `che`
Signed-off-by: David Festal <dfestal@redhat.com>
2019-11-15 11:40:40 +01:00
Tom George 0e99d74385 Set CHE_DEVFILE_REGISTRY_URL to allow airgap operation (#102)
* Set CHE_DEVFILE_HTTPS_ENDPOINT and react to changes on it
* Change HTTPS_ENDPOINT to REGISTRY_URL
* Only set the devfile registry URL to the autogenerated one when we are not using an external devfile registry

Signed-off-by: Tom George <tg82490@gmail.com>
2019-10-28 10:07:55 +01:00
Ilya Buziuk 4b0b485ec6 che #14809 Enable CodeReady branding on the ConsoleLink elements created by the che operator with 'codeready' flavor
Signed-off-by: Ilya Buziuk <ibuziuk@redhat.com>
2019-10-25 12:49:45 +02:00
Radim Hopp b4eb34d70d Append `/v3` to pluginRegistryURL in all cases.
In history it was not appended, when flavor was codeready (backwards compatibility). I think this is not needed anymore.

Signed-off-by: Radim Hopp <rhopp@redhat.com>
2019-10-21 16:26:22 +02:00
Tom George 663d42264c Configure the operator to deploy airgapped versions of the devfile and plugin registries (#93)
* Add a script to generate extra_images.go, only add the extra images data to che configmap if we are in airgap mode
* Initial implementation of adding configmaps to registries
* Add owner reference to the configmap
* Update plugin and devfile registries when a change to either airgap property occurs

Signed-off-by: Tom George <tg82490@gmail.com>
2019-10-14 14:47:08 +02:00
Tom George 431809f950 Update custom resource doc, and make it available in OpenApi spec (#94)
* Add openapi gen flags
* Get code to compile with new OpenApi field names

Signed-off-by: Tom George <tg82490@gmail.com>

* Complete the doc & fix optional management
* Rename the CRD to the initial name.
* Correctly update the CRD file
* remove unused and error-prone CRD file
* Update OLM packages with new OpenApi defs

Signed-off-by: David Festal <dfestal@redhat.com>
2019-10-14 14:28:51 +02:00
Tom George 202b3e25b2 Add airgap mode (#91)
* Determine if we are in airgap mode and patch the images appropriately
* Do the rest of the images in the che deployment
* Add map of extra images for airgap
* Add a script to generate extra_images.go, only add the extra images data to che configmap if we are in airgap mode
* Download the release version of che.properties
* Remove unnecessary properties
* Remove airGapMode boolean, make it so that setting either the airGapHostname/Organization will start the deployment in airgap mode

Signed-off-by: Tom George <tg82490@gmail.com>
2019-10-11 18:19:38 +02:00
Tom George 9a4b8f2618 Add CustomCheProperties field (#87)
* Fix a linter error
* Fix a couple of tests that assume openshift v3 APIs
* Add overrideCheProperties to allow custom properties in the che config map
  - If the custom configmap exists for some reason, merge it with the che configmap, and then delete it
  - Rename GetCustomConfigMapData to GetPredefinedConfigMapData since we are not using the custom config map anymore
* Merge custom configmap into overrideCheProperties and delete it if it exists
* change OverrideCheProperties to CustomCheProperties, make it a type of map[string]string
* Correct error handling of custom config map and move it up higher in the reconciliation function
* Add serviceaccountname to Che configmap, remove GetPredefinedConfigMapData()
* Update CR then delete configmap
* Add license back
* Format license block

Signed-off-by: Tom George <tg82490@gmail.com>
2019-10-07 13:53:37 +02:00
David Festal 3360525412
Enable token exchange (#84)
* Enable the `token-exchange` preview KC feature
* Add what should be done on the Che side
* Automatic token-exchange permissions config
* fix oauth provision script
* Fail-safe removal of the `openshift` id provider
* Fix possible inconsistencies in OS OAuth status
* Update README.md according to suggestion
Co-Authored-By: Robert Krátký <rkratky@redhat.com>

Signed-off-by: David Festal <dfestal@redhat.com>
2019-09-24 10:17:28 +02:00
Michal Vala 66a817619c create consolelink after che instance is available
Signed-off-by: Michal Vala <mvala@redhat.com>
2019-09-09 15:00:13 +02:00
Sergii Leshchenko 5552439b71 Make Che Operator create consolelink if it's supported
Signed-off-by: Sergii Leshchenko <sleshche@redhat.com>
2019-09-09 13:27:23 +03:00
David Festal 9238446014 Reorder the steps to be consistent with chectl (#77)
Signed-off-by: David Festal <dfestal@redhat.com>
2019-09-04 14:31:43 -04:00
David Festal c0019f24c2
Add automatic redirect to the `openshift` provider (#75)
Signed-off-by: David Festal <dfestal@redhat.com>
2019-09-03 15:56:25 +02:00
David Festal 9682f3448f
Don't allow installing Che with Openshift Oauth when no OAuth user exist (#74)
* First round of impl in the Go code
* Correct management of the status
* Add `users` permisions in cluster role
* Upgrade `operator-sdk` CLI pre-req to `v0.10.0`
* Produce a CSV diff to help reviews
* fix trailing spaces that break `gen-csv` desc mgt
* Update nightly CSVs
* Add the new OLM descriptors in the new nightly CSVs

Signed-off-by: David Festal <dfestal@redhat.com>
2019-09-02 18:47:30 +02:00
David Festal 09a90beea6
Update identityProvider and postgres container images to latest defaults on Operator update (Fix #13714) (#72)
* Refactor defaults mgt for flavor-related props
* Don't update the CR with effective docker images
* Also redeploy Postgres when image changes
* Now correctly manage upgrade from 7.0.0 GA
* Wait for rolling update of secondary deployments

Signed-off-by: David Festal <dfestal@redhat.com>
2019-08-26 11:49:46 +02:00
David Festal ff0e032fb4
Fix Custom Resource update bugs and external registry URLs not taken in account (#63)
* Add both `https` and `http` redirect URLs in the `OAuthClient`
* Take registry URL settings into account
* Only update registry URLs in Status when necessary
* Update registry routes or ingresses when switching to TLS
* Restart pod on deployment-driving CR field change

Signed-off-by: David Festal <dfestal@redhat.com>
2019-08-12 16:25:07 +02:00
David Festal d887a5093c
Allow configuring pull policy (with `Always` by default for nightlies) (#57)
* Add pull policies
* Add configurable pull policies for deployments in Che, Keycloak and Postgres deployments
* `Always` policy by default for `nightly`/`latest` images

Signed-off-by: David Festal <dfestal@redhat.com>
2019-07-26 13:33:08 +02:00
David Festal 3ccdf36c40
Fix registry labels and probes (#54)
Signed-off-by: David Festal <dfestal@redhat.com>
2019-07-23 11:15:59 +02:00
David Festal 8837474a0f
Include registries in Che deployment (#51)
* Update API
* Update defaults
* update controller
* Separate memory limits and requests as in PR https://github.com/eclipse/che/pull/13890/files#diff-a488b4bdede7547798a17f6830874b05R59
* update release script to also change default image tag of registry containers
* Also remove overridden `nightly` registry images
* Add registry nightly images in nightly OLM packages

Signed-off-by: David Festal <dfestal@redhat.com>
2019-07-19 17:27:57 +02:00
David Festal 6e56d28841
Gracefully ignore the error when trying to delete an unexisting OAuthClient (#48)
Signed-off-by: David Festal <dfestal@redhat.com>
2019-07-16 12:01:46 +02:00
David Festal 2f639261d8 Update to the `7.0.0-RC-2.0` release after some last fixes (#39)
* Make the OS 4 API url retrieval more robust

Signed-off-by: David Festal <dfestal@redhat.com>

* Fix a bug when removing openshift v4 provider

On Openshift arbitrary user mode.

Signed-off-by: David Festal <dfestal@redhat.com>

* Roll-update Keycloak when certificates changed

Signed-off-by: David Festal <dfestal@redhat.com>

* Don't loose the controller ref on Keycloak update

Signed-off-by: David Festal <dfestal@redhat.com>

* Remove the finalizer when disabling OS OAuth

Signed-off-by: David Festal <dfestal@redhat.com>

* Upgrade defaults to `7.0.0-RC-2.0`

Signed-off-by: David Festal <dfestal@redhat.com>

* fix wrong whitespaces

Signed-off-by: David Festal <dfestal@redhat.com>
2019-06-20 10:57:12 -04:00
David Festal 6665f3f468
Fix unnecessary cluster perm requirement (#37)
* Only create the OS API cert with OS OAuth
* Make some impl methods private

Signed-off-by: David Festal <dfestal@redhat.com>
2019-06-19 15:51:32 +02:00