-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Provide conversion webhook for CRDs (#283)
Webhook is called, whenever a CR is requested in a specific version. This allows for a better updating path, as old CRs are still useable. [conversion] Provide conversion java project: - A webhook that offers endpoints for the three CRD types - Is buildable as a runnable jar - Contains Mappers from all supported versions to a hub [common] Add Hub and previous version for all CRDs - The hub is a superset of all values of a CRD across all versions - Keep a copy of the old supported versions to transform back - This is useful, as this way the the old operator still works - Supported from these versions: - `AppDefintion.v1beta8` - `Session.v1beta6` - `Workspace.v1beta3` - To showcase the functionality update CRDs to new version: - Move status like fields to status: - `Session.v1beta7`: Move `url`, `lastActivity` and `error` fields from the spec to the status. - `Workspace.v1beta4`: Move the `error` field from the spec to the status. Also add the `error` field to `Workspace.v1beta3` as it was missing - Remove `timeout.strategy` from AppDefinition - `AppDefinition.v1beta9`: Removed `timeout.strategy` and `timeout.limit` is now just `timeout`. This was done, as there is only one Strategy left. [operator] Adjust operator so it works with the above changes. [service] Adjust service so it works with the above changes. [documentation] Add build command for `conversion-webhook` [.github] Add ci for `conversion-webhook` - Also fix publishing of new `next-version` (reusable typo) Contributed on behalf of STMicroelectronics --------- Co-authored-by: Johannes Faltermeier <[email protected]>
- Loading branch information
1 parent
5b0e390
commit 7c67236
Showing
98 changed files
with
3,552 additions
and
1,842 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: conversion-webhook CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- "java/common/**" | ||
- "java/conversion/**" | ||
- "dockerfiles/conversion-webhook/**" | ||
# Publish when a workflow has changed (this is needed to detect version updates) | ||
- ".github/workflows/ci-conversion-webhook.yml" | ||
- ".github/workflows/reusable-docker.yml" | ||
pull_request: | ||
branches: | ||
- main | ||
paths: | ||
- "java/common/**" | ||
- "java/conversion/**" | ||
- "dockerfiles/conversion-webhook/**" | ||
release: | ||
types: | ||
- published | ||
|
||
jobs: | ||
call-reusable-docker-workflow: | ||
uses: ./.github/workflows/reusable-docker.yml | ||
with: | ||
docker_org: theiacloud | ||
docker_image: theia-cloud-conversion-webhook | ||
docker_file: dockerfiles/conversion-webhook/Dockerfile | ||
secrets: | ||
dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
dockerhub_token: ${{ secrets.DOCKERHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<projectDescription> | ||
<name>conversion-docker</name> | ||
<comment></comment> | ||
<projects> | ||
</projects> | ||
<buildSpec> | ||
</buildSpec> | ||
<natures> | ||
</natures> | ||
</projectDescription> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
FROM eclipse-temurin:17-jdk AS builder | ||
RUN apt-get update && apt-get install -y maven | ||
WORKDIR /conversion | ||
COPY java/common ./common | ||
COPY java/conversion ./conversion | ||
RUN cd /conversion/common/maven-conf && \ | ||
mvn clean install --no-transfer-progress && \ | ||
cd /conversion/common/org.eclipse.theia.cloud.common && \ | ||
mvn clean install --no-transfer-progress&& \ | ||
cd /conversion/conversion/org.eclipse.theia.cloud.conversion && \ | ||
mvn clean package -Dmaven.test.skip=true -Dquarkus.package.type=uber-jar --no-transfer-progress | ||
|
||
FROM eclipse-temurin:17-jre-alpine | ||
WORKDIR /conversion | ||
COPY --from=builder /conversion/conversion/org.eclipse.theia.cloud.conversion/target/conversion-webhook-0.10.0-SNAPSHOT-runner.jar . | ||
|
||
ENTRYPOINT java -jar ./conversion-webhook-0.10.0-SNAPSHOT-runner.jar | ||
CMD [ "" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
activeProfiles= | ||
eclipse.preferences.version=1 | ||
resolveWorkspaceProjects=true | ||
version=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.