All Implemented Interfaces:
KubeCmdClient<Oc>

public class Oc extends BaseCmdKubeClient<Oc>
A KubeCmdClient implementation wrapping oc.
  • Constructor Details

    • Oc

      public Oc()
      Constructs a new Oc instance.
    • Oc

      public Oc(String config)
      Constructs a new Oc instance with the specified configuration.
      Parameters:
      config - The configuration to use.
  • Method Details

    • defaultOlmNamespace

      public String defaultOlmNamespace()
      Gets the default OLM (Operator Lifecycle Manager) namespace.
      Returns:
      The default OLM namespace.
    • inNamespace

      public Oc inNamespace(String namespace)
      Sets the namespace for the Oc instance.
      Parameters:
      namespace - The namespace to set.
      Returns:
      A new Oc instance with the specified namespace.
    • getCurrentNamespace

      public String getCurrentNamespace()
      Gets the current namespace of the Oc instance.
      Returns:
      The current namespace.
    • createNamespace

      public Oc createNamespace(String name)
      Creates a new namespace.
      Specified by:
      createNamespace in interface KubeCmdClient<Oc>
      Overrides:
      createNamespace in class BaseCmdKubeClient<Oc>
      Parameters:
      name - The name of the namespace to create.
      Returns:
      The Oc instance.
    • newApp

      public Oc newApp(String template, Map<String,String> params)
      Creates a new application.
      Parameters:
      template - The template file.
      params - The parameters for the template.
      Returns:
      The Oc instance.
    • cmd

      public String cmd()
      Gets the command name for oc.
      Specified by:
      cmd in interface KubeCmdClient<Oc>
      Specified by:
      cmd in class BaseCmdKubeClient<Oc>
      Returns:
      The command name.
    • getUsername

      public String getUsername()
      Gets the username.
      Returns:
      The username.