From 9e3c93abcc041ab0e076c04fc77ffdf3ad554e47 Mon Sep 17 00:00:00 2001 From: Johannes Faltermeier Date: Mon, 15 May 2023 15:47:07 +0200 Subject: [PATCH] Introduce concept of init actions to Theia Cloud #69 * add list of InitOperations to Session * introduce binding of multiple InitOperationHandler * implement GitInitOperationHandler * add init container with required environment variables for HTTP(S) Git checkout * checks that the secret is allowed to be used by this user and by this InitOperationHandler --- .../.settings/org.eclipse.jdt.ui.prefs | 2 +- .../cloud/common/k8s/resource/Session.java | 4 +- .../common/k8s/resource/SessionSpec.java | 192 ++++++++++++---- .../.settings/org.eclipse.jdt.ui.prefs | 2 +- .../di/AbstractTheiaCloudOperatorModule.java | 7 + .../handler/InitOperationHandler.java | 35 +++ .../handler/impl/AddedHandlerUtil.java | 70 ++++++ .../handler/impl/GitInitOperationHandler.java | 211 ++++++++++++++++++ .../handler/impl/LazySessionHandler.java | 51 +---- .../.settings/org.eclipse.jdt.ui.prefs | 2 +- python/git-init/README.md | 43 +++- terraform/configurations/.gitignore | 1 + 12 files changed, 528 insertions(+), 92 deletions(-) create mode 100644 java/operator/org.eclipse.theia.cloud.operator/src/main/java/org/eclipse/theia/cloud/operator/handler/InitOperationHandler.java create mode 100644 java/operator/org.eclipse.theia.cloud.operator/src/main/java/org/eclipse/theia/cloud/operator/handler/impl/GitInitOperationHandler.java create mode 100644 terraform/configurations/.gitignore diff --git a/java/common/org.eclipse.theia.cloud.common/.settings/org.eclipse.jdt.ui.prefs b/java/common/org.eclipse.theia.cloud.common/.settings/org.eclipse.jdt.ui.prefs index 606155f8..766a660b 100644 --- a/java/common/org.eclipse.theia.cloud.common/.settings/org.eclipse.jdt.ui.prefs +++ b/java/common/org.eclipse.theia.cloud.common/.settings/org.eclipse.jdt.ui.prefs @@ -3,7 +3,7 @@ editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true formatter_profile=org.eclipse.jdt.ui.default.sun_profile formatter_settings_version=21 org.eclipse.jdt.ui.javadoc=false -org.eclipse.jdt.ui.text.custom_code_templates=