Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#81: Implement ToolCommandlet for Kubernetes #702

Merged
merged 37 commits into from
Nov 25, 2024
Merged
Show file tree
Hide file tree
Changes from 23 commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
7af9fc5
#765: Fix typos in DoD asciidoc
Oct 2, 2024
aeae1dd
Merge branch 'main' of https://github.com/KianRolf/IDEasy
KianRolf Oct 17, 2024
c1e29fa
egal
KianRolf Oct 17, 2024
c5f01e6
Merge branch 'implement/81-kubectl-toolcommandlet' into implement/81-…
KianRolf Oct 17, 2024
d34a028
#81: created kubectl commandlet
KianRolf Oct 18, 2024
46d6445
#81: revert weird unwanted changes
KianRolf Oct 18, 2024
aee647b
#81: remove unfinished Test
KianRolf Oct 18, 2024
6518595
Merge branch 'devonfw:main' into implement/81-kubectl-comandlet
KianRolf Oct 21, 2024
7b4d6e7
Update cli/src/main/java/com/devonfw/tools/ide/tool/kubectl/KubeCtl.java
KianRolf Oct 23, 2024
2c8a4c7
Update cli/src/main/resources/nls/Help_de.properties
KianRolf Oct 23, 2024
5a59b83
Update cli/src/main/resources/nls/Help_de.properties
KianRolf Oct 23, 2024
8aa75a4
Update cli/src/main/resources/nls/Help.properties
KianRolf Oct 23, 2024
1de727b
Merge branch 'main' into implement/81-kubectl-comandlet
KianRolf Oct 25, 2024
42da84f
#81: Correction
KianRolf Oct 25, 2024
e520d16
Merge branch 'main' of https://github.com/KianRolf/IDEasy
KianRolf Oct 25, 2024
29403d3
Merge branch 'main' of https://github.com/KianRolf/IDEasy
KianRolf Oct 25, 2024
5bff5eb
Merge branch 'main' of https://github.com/KianRolf/IDEasy
KianRolf Oct 28, 2024
f56b1f4
Merge branch 'main' into implement/81-kubectl-comandlet
jan-vcapgemini Oct 29, 2024
890c107
Merge branch 'main' of https://github.com/KianRolf/IDEasy
KianRolf Oct 29, 2024
ceb4d55
Merge branch 'main' into implement/81-kubectl-comandlet
KianRolf Oct 29, 2024
a5356a6
#81: Delegating commandlet
KianRolf Oct 31, 2024
5d28bf6
Merge branch 'main' into implement/81-kubectl-comandlet
KianRolf Oct 31, 2024
e496fbb
Merge branch 'implement/81-kubectl-comandlet' of https://github.com/K…
KianRolf Oct 31, 2024
1677bb5
Merge branch 'main' into implement/81-kubectl-comandlet
KianRolf Nov 4, 2024
52c3e77
devonfw#81: Delegating commandlet
KianRolf Nov 4, 2024
057e6dd
Merge branch 'main' into implement/81-kubectl-comandlet
KianRolf Nov 5, 2024
f8da022
#81: Remove Test
KianRolf Nov 6, 2024
2561644
Merge branch 'implement/81-kubectl-comandlet' of https://github.com/K…
KianRolf Nov 6, 2024
a485a73
#81: Changelog
KianRolf Nov 6, 2024
5594cc6
Update cli/src/main/java/com/devonfw/tools/ide/tool/DelegatingToolCom…
KianRolf Nov 12, 2024
9137adb
Update CHANGELOG.adoc
KianRolf Nov 12, 2024
2e81a87
Merge branch 'main' into implement/81-kubectl-comandlet
KianRolf Nov 12, 2024
5b12a15
Merge branch 'main' into implement/81-kubectl-comandlet
jan-vcapgemini Nov 18, 2024
1681a73
Merge branch 'main' into implement/81-kubectl-comandlet
KianRolf Nov 20, 2024
9af9dcd
#81: Override additions
KianRolf Nov 20, 2024
607c749
Merge branch 'main' into implement/81-kubectl-comandlet
KianRolf Nov 25, 2024
091b21d
Update CHANGELOG.adoc: moved to correct release
hohwille Nov 25, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import com.devonfw.tools.ide.tool.jmc.Jmc;
import com.devonfw.tools.ide.tool.kotlinc.Kotlinc;
import com.devonfw.tools.ide.tool.kotlinc.KotlincNative;
import com.devonfw.tools.ide.tool.kubectl.KubeCtl;
import com.devonfw.tools.ide.tool.lazydocker.LazyDocker;
import com.devonfw.tools.ide.tool.mvn.Mvn;
import com.devonfw.tools.ide.tool.node.Node;
Expand Down Expand Up @@ -96,6 +97,7 @@ public CommandletManagerImpl(IdeContext context) {
add(new Quarkus(context));
add(new Kotlinc(context));
add(new KotlincNative(context));
add(new KubeCtl(context));
add(new Tomcat(context));
add(new Vscode(context));
add(new Azure(context));
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package com.devonfw.tools.ide.tool;

import java.util.Set;

import com.devonfw.tools.ide.common.Tag;
import com.devonfw.tools.ide.context.IdeContext;
import com.devonfw.tools.ide.process.EnvironmentContext;

public abstract class DelegatingToolCommandlet extends ToolCommandlet {
jan-vcapgemini marked this conversation as resolved.
Show resolved Hide resolved

public DelegatingToolCommandlet(IdeContext context, String tool, Set<Tag> tags) {
hohwille marked this conversation as resolved.
Show resolved Hide resolved
jan-vcapgemini marked this conversation as resolved.
Show resolved Hide resolved

super(context, tool, tags);
}

@Override
public final boolean install(boolean silent, EnvironmentContext environmentContext) {
return delegate(silent, environmentContext);
}

protected boolean delegate(boolean silent, EnvironmentContext environmentContext) {
jan-vcapgemini marked this conversation as resolved.
Show resolved Hide resolved
return false;
}

}
46 changes: 46 additions & 0 deletions cli/src/main/java/com/devonfw/tools/ide/tool/kubectl/KubeCtl.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
package com.devonfw.tools.ide.tool.kubectl;

import java.util.Set;

import com.devonfw.tools.ide.common.Tag;
import com.devonfw.tools.ide.context.IdeContext;
import com.devonfw.tools.ide.process.EnvironmentContext;
import com.devonfw.tools.ide.tool.DelegatingToolCommandlet;
import com.devonfw.tools.ide.tool.docker.Docker;
import com.devonfw.tools.ide.version.VersionIdentifier;

public class KubeCtl extends DelegatingToolCommandlet {
jan-vcapgemini marked this conversation as resolved.
Show resolved Hide resolved

/**
* The constructor.
*
* @param context the {@link IdeContext}.
*/
public KubeCtl(IdeContext context) {

super(context, "kubectl", Set.of(Tag.KUBERNETES));
}

@Override
protected boolean delegate(boolean silent, EnvironmentContext environmentContext) {
// TODO create kubectl/kubectl/dependencies.json file in ide-urls and delete this method
return getCommandlet(Docker.class).install(silent, environmentContext);
}

@Override
public VersionIdentifier getInstalledVersion() {

return null;
}

@Override
public String getInstalledEdition() {

return null;
}

@Override
public void uninstall() {

}
hohwille marked this conversation as resolved.
Show resolved Hide resolved
}
2 changes: 2 additions & 0 deletions cli/src/main/resources/nls/Help.properties
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ cmd.kotlinc=Tool commandlet for Kotlin (compiler for JRE language).
cmd.kotlinc.detail=Kotlin Compiler (kotlinc) is the command-line tool for compiling Kotlin code. Detailed documentation can be found at https://kotlinlang.org/docs/home.html
cmd.kotlincnative=Tool commandlet for Kotlin-Native (compiler for JRE language).
cmd.kotlincnative.detail=Kotlin/Native Compiler (kotlincnative) compiles Kotlin code to native executables. Detailed documentation can be found at https://kotlinlang.org/docs/reference/native-overview.html
cmd.kubectl=Tool commandlet for kubernetes. Detailed documentation can be found at https://kubernetes.io/docs/home/
cmd.kubectl.detail=The kubectl commandlet allows to install and use kubernetes. On Windows WSL 2 (Windows Subsystem for Linux) has to be installed properly as a prerequisite.
cmd.lazydocker=Tool commandlet for LazyDocker.
cmd.lazydocker.detail=Lazydocker is a simple terminal UI for both docker and docker-compose. Detailed documentation can be found at https://github.com/jesseduffield/lazydocker
cmd.list-editions=List the available editions of the selected tool.
Expand Down
2 changes: 2 additions & 0 deletions cli/src/main/resources/nls/Help_de.properties
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ cmd.kotlinc=Werkzeug Kommando für Kotlin (Compiler für JRE Sprache).
cmd.kotlinc.detail=Der Kotlin-Compiler (kotlinc) ist das Befehlszeilentool zum Kompilieren von Kotlin-Code. Detaillierte Dokumentation ist zu finden unter https://kotlinlang.org/docs/home.html
cmd.kotlincnative=Werkzeug Kommando für Kotlin-Native (Compiler für JRE Sprache).
cmd.kotlincnative.detail=Der Kotlin/Native-Compiler (kotlincnative) kompiliert Kotlin-Code in native ausführbare Dateien. Detaillierte Dokumentation ist zu finden unter https://kotlinlang.org/docs/reference/native-overview.html
cmd.kubectl=Werkzeug Kommando für Kubernetes. Detaillierte Dokumentation ist zu finden unter https://kubernetes.io/docs/home/
cmd.kubectl.detail=Der Befehl kubectl ermöglicht die Installation und Nutzung von Kubernetes. Unter Windows muss WSL 2 (Windows Subsystem for Linux) ordnungsgemäß installiert sein.
cmd.lazydocker=Werkzeug Kommando für LazyDocker.
cmd.lazydocker.detail=Lazydocker ist ein einfaches Kommandozeilen-Benutzer-Interface für Docker und Docker-compose. Detaillierte Dokumentation ist zu finden unter https://github.com/jesseduffield/lazydocker
cmd.list-editions=Listet die verfügbaren Editionen des selektierten Werkzeugs auf.
Expand Down
Loading