Skip to content

Commit

Permalink
Update Theia.Cloud to Theia Cloud
Browse files Browse the repository at this point in the history
* rename org.eclipse.theia.cloud.* packages to org.eclipse.theiacloud
* initialize session status last active time with current time

Contributed on behalf of STMicroelectronics
  • Loading branch information
jfaltermeier committed Jun 19, 2024
2 parents a3520da + 5a5538b commit 224f337
Show file tree
Hide file tree
Showing 160 changed files with 698 additions and 631 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
- Extend configuration options for the new landing page for texts and logo file type
- Removed terms and conditions
- Build the common package as ESM and CJS bundles for extended compatibility
- [common] Add `ingressHostnamePrefixes` list to `AppDefinition.v1beta10` [#298](https://github.com/eclipsesource/theia-cloud/pull/298) | [#57](https://github.com/eclipsesource/theia-cloud-helm/pull/57)

## [0.10.0] - 2024-04-02

Expand Down
11 changes: 11 additions & 0 deletions documentation/LocalCertificates.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Installing the self signed CA for local testing

When testing locally you usually have to accept the self signed certificate in your browser. When working with wildcard certificates however, as used by e.g. the default webview hostnames, you usually will get an error with no way to accept the certificate.

You may import the self-signed CA in your browser however. You may export the secret to an importable file like this:

```bash
kubectl get secret theia-cloud-ca-key-pair -n cert-manager -o jsonpath='{.data.tls\.crt}' | base64 --decode > ca.crt
```

Then, e.g. in Chrome, got to <chrome://settings/certificates> and Add Authority.
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
package org.eclipse.theia.cloud.common.k8s.client;
package org.eclipse.theiacloud.common.k8s.client;

import org.eclipse.theia.cloud.common.k8s.resource.appdefinition.AppDefinition;
import org.eclipse.theia.cloud.common.k8s.resource.appdefinition.AppDefinitionSpec;
import org.eclipse.theia.cloud.common.k8s.resource.appdefinition.AppDefinitionSpecResourceList;
import org.eclipse.theia.cloud.common.k8s.resource.appdefinition.AppDefinitionStatus;
import org.eclipse.theiacloud.common.k8s.resource.appdefinition.AppDefinition;
import org.eclipse.theiacloud.common.k8s.resource.appdefinition.AppDefinitionSpec;
import org.eclipse.theiacloud.common.k8s.resource.appdefinition.AppDefinitionSpecResourceList;
import org.eclipse.theiacloud.common.k8s.resource.appdefinition.AppDefinitionStatus;

public interface AppDefinitionResourceClient extends
CustomResourceClient<AppDefinitionSpec, AppDefinitionStatus, AppDefinition, AppDefinitionSpecResourceList> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
package org.eclipse.theia.cloud.common.k8s.client;
package org.eclipse.theiacloud.common.k8s.client;

import java.io.ByteArrayInputStream;
import java.io.IOException;
Expand All @@ -22,7 +22,7 @@

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.eclipse.theia.cloud.common.util.LogMessageUtil;
import org.eclipse.theiacloud.common.util.LogMessageUtil;

import io.fabric8.kubernetes.api.model.HasMetadata;
import io.fabric8.kubernetes.api.model.KubernetesResourceList;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
package org.eclipse.theia.cloud.common.k8s.client;
package org.eclipse.theiacloud.common.k8s.client;

import java.util.List;
import java.util.Objects;
import java.util.Optional;
import java.util.function.Consumer;
import java.util.stream.Collectors;

import org.eclipse.theia.cloud.common.k8s.resource.UserScopedSpec;
import org.eclipse.theiacloud.common.k8s.resource.UserScopedSpec;

import io.fabric8.kubernetes.api.model.KubernetesResourceList;
import io.fabric8.kubernetes.client.CustomResource;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
package org.eclipse.theia.cloud.common.k8s.client;
package org.eclipse.theiacloud.common.k8s.client;

import org.eclipse.theia.cloud.common.k8s.resource.appdefinition.AppDefinition;
import org.eclipse.theia.cloud.common.k8s.resource.appdefinition.AppDefinitionSpec;
import org.eclipse.theia.cloud.common.k8s.resource.appdefinition.AppDefinitionSpecResourceList;
import org.eclipse.theia.cloud.common.k8s.resource.appdefinition.AppDefinitionStatus;
import org.eclipse.theiacloud.common.k8s.resource.appdefinition.AppDefinition;
import org.eclipse.theiacloud.common.k8s.resource.appdefinition.AppDefinitionSpec;
import org.eclipse.theiacloud.common.k8s.resource.appdefinition.AppDefinitionSpecResourceList;
import org.eclipse.theiacloud.common.k8s.resource.appdefinition.AppDefinitionStatus;

import io.fabric8.kubernetes.api.model.ObjectMeta;
import io.fabric8.kubernetes.client.NamespacedKubernetesClient;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
package org.eclipse.theia.cloud.common.k8s.client;
package org.eclipse.theiacloud.common.k8s.client;

import java.time.Instant;
import java.util.UUID;
import java.util.concurrent.TimeUnit;

import org.eclipse.theia.cloud.common.k8s.resource.session.Session;
import org.eclipse.theia.cloud.common.k8s.resource.session.SessionSpec;
import org.eclipse.theia.cloud.common.k8s.resource.session.SessionSpecResourceList;
import org.eclipse.theia.cloud.common.k8s.resource.session.SessionStatus;
import org.eclipse.theia.cloud.common.util.TheiaCloudError;
import org.eclipse.theiacloud.common.k8s.resource.session.Session;
import org.eclipse.theiacloud.common.k8s.resource.session.SessionSpec;
import org.eclipse.theiacloud.common.k8s.resource.session.SessionSpecResourceList;
import org.eclipse.theiacloud.common.k8s.resource.session.SessionStatus;
import org.eclipse.theiacloud.common.util.TheiaCloudError;

import io.fabric8.kubernetes.api.model.ObjectMeta;
import io.fabric8.kubernetes.client.NamespacedKubernetesClient;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
package org.eclipse.theia.cloud.common.k8s.client;
package org.eclipse.theiacloud.common.k8s.client;

import io.fabric8.kubernetes.api.model.HasMetadata;
import io.fabric8.kubernetes.api.model.KubernetesResourceList;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
package org.eclipse.theia.cloud.common.k8s.client;
package org.eclipse.theiacloud.common.k8s.client;

import java.util.concurrent.TimeUnit;

import org.eclipse.theia.cloud.common.k8s.resource.workspace.Workspace;
import org.eclipse.theia.cloud.common.k8s.resource.workspace.WorkspaceSpec;
import org.eclipse.theia.cloud.common.k8s.resource.workspace.WorkspaceSpecResourceList;
import org.eclipse.theia.cloud.common.k8s.resource.workspace.WorkspaceStatus;
import org.eclipse.theia.cloud.common.util.TheiaCloudError;
import org.eclipse.theiacloud.common.k8s.resource.workspace.Workspace;
import org.eclipse.theiacloud.common.k8s.resource.workspace.WorkspaceSpec;
import org.eclipse.theiacloud.common.k8s.resource.workspace.WorkspaceSpecResourceList;
import org.eclipse.theiacloud.common.k8s.resource.workspace.WorkspaceStatus;
import org.eclipse.theiacloud.common.util.TheiaCloudError;

import io.fabric8.kubernetes.api.model.ObjectMeta;
import io.fabric8.kubernetes.client.NamespacedKubernetesClient;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
package org.eclipse.theia.cloud.common.k8s.client;
package org.eclipse.theiacloud.common.k8s.client;

import java.util.List;
import java.util.Optional;
Expand All @@ -22,8 +22,8 @@
import java.util.function.BiFunction;
import java.util.function.Consumer;

import org.eclipse.theia.cloud.common.util.JavaUtil;
import org.eclipse.theia.cloud.common.util.WatcherAdapter;
import org.eclipse.theiacloud.common.util.JavaUtil;
import org.eclipse.theiacloud.common.util.WatcherAdapter;

import io.fabric8.kubernetes.api.model.HasMetadata;
import io.fabric8.kubernetes.api.model.KubernetesResourceList;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
package org.eclipse.theia.cloud.common.k8s.client;
package org.eclipse.theiacloud.common.k8s.client;

import java.util.concurrent.TimeUnit;

import org.eclipse.theia.cloud.common.k8s.resource.session.Session;
import org.eclipse.theia.cloud.common.k8s.resource.session.SessionSpec;
import org.eclipse.theia.cloud.common.k8s.resource.session.SessionSpecResourceList;
import org.eclipse.theia.cloud.common.k8s.resource.session.SessionStatus;
import org.eclipse.theiacloud.common.k8s.resource.session.Session;
import org.eclipse.theiacloud.common.k8s.resource.session.SessionSpec;
import org.eclipse.theiacloud.common.k8s.resource.session.SessionSpecResourceList;
import org.eclipse.theiacloud.common.k8s.resource.session.SessionStatus;

public interface SessionResourceClient
extends CustomResourceClient<SessionSpec, SessionStatus, Session, SessionSpecResourceList> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
package org.eclipse.theia.cloud.common.k8s.client;
package org.eclipse.theiacloud.common.k8s.client;

import java.util.Optional;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
package org.eclipse.theia.cloud.common.k8s.client;
package org.eclipse.theiacloud.common.k8s.client;

import java.util.concurrent.TimeUnit;

import org.eclipse.theia.cloud.common.k8s.resource.workspace.Workspace;
import org.eclipse.theia.cloud.common.k8s.resource.workspace.WorkspaceSpec;
import org.eclipse.theia.cloud.common.k8s.resource.workspace.WorkspaceSpecResourceList;
import org.eclipse.theia.cloud.common.k8s.resource.workspace.WorkspaceStatus;
import org.eclipse.theiacloud.common.k8s.resource.workspace.Workspace;
import org.eclipse.theiacloud.common.k8s.resource.workspace.WorkspaceSpec;
import org.eclipse.theiacloud.common.k8s.resource.workspace.WorkspaceSpecResourceList;
import org.eclipse.theiacloud.common.k8s.resource.workspace.WorkspaceStatus;

public interface WorkspaceResourceClient
extends CustomResourceClient<WorkspaceSpec, WorkspaceStatus, Workspace, WorkspaceSpecResourceList> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
package org.eclipse.theia.cloud.common.k8s.resource;
package org.eclipse.theiacloud.common.k8s.resource;

/**
* Constant values to describe resource handling.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
package org.eclipse.theia.cloud.common.k8s.resource;
package org.eclipse.theiacloud.common.k8s.resource;

import static org.eclipse.theia.cloud.common.util.LogMessageUtil.formatLogMessage;
import static org.eclipse.theiacloud.common.util.LogMessageUtil.formatLogMessage;

import java.util.function.Consumer;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
package org.eclipse.theia.cloud.common.k8s.resource;
package org.eclipse.theiacloud.common.k8s.resource;

import com.fasterxml.jackson.annotation.JsonProperty;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
package org.eclipse.theia.cloud.common.k8s.resource;
package org.eclipse.theiacloud.common.k8s.resource;

import com.fasterxml.jackson.annotation.JsonProperty;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
package org.eclipse.theia.cloud.common.k8s.resource;
package org.eclipse.theiacloud.common.k8s.resource;

public interface UserScopedSpec {
String getUser();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
package org.eclipse.theia.cloud.common.k8s.resource.appdefinition;
package org.eclipse.theiacloud.common.k8s.resource.appdefinition;

import org.eclipse.theia.cloud.common.k8s.resource.appdefinition.hub.AppDefinitionHub;
import org.eclipse.theia.cloud.common.util.CustomResourceUtil;
import org.eclipse.theiacloud.common.k8s.resource.appdefinition.hub.AppDefinitionHub;
import org.eclipse.theiacloud.common.util.CustomResourceUtil;

import com.fasterxml.jackson.annotation.JsonIgnore;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
package org.eclipse.theia.cloud.common.k8s.resource.appdefinition;
package org.eclipse.theiacloud.common.k8s.resource.appdefinition;

import java.util.List;
import java.util.Map;

import org.eclipse.theia.cloud.common.k8s.resource.appdefinition.hub.AppDefinitionHub;
import org.eclipse.theiacloud.common.k8s.resource.appdefinition.hub.AppDefinitionHub;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
Expand Down Expand Up @@ -83,6 +84,9 @@ public class AppDefinitionSpec {
@JsonProperty("options")
private Map<String, String> options;

@JsonProperty("ingressHostnamePrefixes")
private List<String> ingressHostnamePrefixes;

/**
* Default constructor.
*/
Expand Down Expand Up @@ -110,6 +114,7 @@ public AppDefinitionSpec(AppDefinitionHub fromHub) {
this.timeout = fromHub.getTimeoutLimit().orElse(0);

this.options = fromHub.getOptions().orElse(null);
this.ingressHostnamePrefixes = fromHub.getIngressHostnamePrefixes().orElse(null);

int monitorPort = fromHub.getMonitorPort().orElse(0);
if (monitorPort > 0) {
Expand Down Expand Up @@ -201,6 +206,10 @@ public Map<String, String> getOptions() {
return options;
}

public List<String> getIngressHostnamePrefixes() {
return ingressHostnamePrefixes;
}

@Override
public String toString() {
return "AppDefinitionSpec [name=" + name + ", image=" + image + ", imagePullPolicy=" + imagePullPolicy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
package org.eclipse.theia.cloud.common.k8s.resource.appdefinition;
package org.eclipse.theiacloud.common.k8s.resource.appdefinition;

import io.fabric8.kubernetes.api.model.DefaultKubernetesResourceList;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
package org.eclipse.theia.cloud.common.k8s.resource.appdefinition;
package org.eclipse.theiacloud.common.k8s.resource.appdefinition;

import org.eclipse.theia.cloud.common.k8s.resource.ResourceStatus;
import org.eclipse.theia.cloud.common.k8s.resource.appdefinition.hub.AppDefinitionHub;
import org.eclipse.theiacloud.common.k8s.resource.ResourceStatus;
import org.eclipse.theiacloud.common.k8s.resource.appdefinition.hub.AppDefinitionHub;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;

Expand Down
Loading

0 comments on commit 224f337

Please sign in to comment.