manage setup-tethered-ns

Tether a project (namespace) to the project where the IBM Software Hub control plane is installed.

Prerequisites

Complete the following tasks for the projects that you plan to tether to the IBM® Software Hub control plane:

  1. Apply the required permissions to the projects (namespaces for an instance of IBM Software Hub.
    • If you run the authorize-instance-topology command, specify the project that you want to tether in the --additional_ns option.
    • If you run the show-minimum-rbac command, apply the role and role binding to the project that you want to tether.

    This task ensures that the project where the operators are installed can watch the tethered projects.

  2. Creating image pull secrets for an instance of IBM Software Hub.

    Ensure that you create the pull secret in the project that you want to tether. This task ensures that any software that is deployed in the project can pull the required images.

  3. Installing the required components for an instance of IBM Software Hub.

    When you run the install-components command, specify the project that you want to tether in the --tethered_instance_ns option.

    This task ensures that the tethered projects are added to the NamespaceScope operator ConfigMap, which tells the operators to manage the operands in the tethered projects.

Extended description

A tethered project (namespace) is a project that is associated or linked with the project where the IBM Software Hub control plane is installed. You can deploy a service instance or workload to a tethered project.

Important: You must run the setup-tethered-ns command before you can create a service instance or deploy a workload in a tethered project.
When you tether a project to the operands project, the cpd-cli manage setup-tethered-ns command:
  • Updates the IBM NamespaceScope Operator in the operators project to enable the operators to watch the tethered project.
  • Updates the ZenService custom resource in the operands project to add the tethered project to the tetheredNamespaces entry.

    This enables the IBM Software Hub control plane to monitor and manage the workloads in the tethered project.

The software or workload in the tethered project is managed by IBM Software Hub control plane but is otherwise isolated from the control plane and the other services and workloads that are running in the main IBM Software Hub project. For more information, see Supported project (namespace) configurations.

Restriction: Not all services support running workloads or service instances in tethered projects. For details, see Multitenancy support.

Syntax

cpd-cli manage setup-tethered-ns \
--cpd_instance_ns=<project-name> \
--tethered_instance_ns=<project-name> \
[--remove=true|false]
[--preview=true|false] \
[-v][-vv][-vvv]

Arguments

The setup-tethered-ns command has no arguments.

Options

Table 1: Command options
Option Description
--cpd_instance_ns The project (namespace) where IBM Software Hub is installed.
Status
Required.
Syntax
--cpd_instance_ns=<project-name>
Default value
No default. User-defined.
Valid values
The project (namespace) where IBM Software Hub is installed.
--preview Preview the commands that run when you issue this CLI command.

The command issues a series of oc commands. You can see the list of oc commands that are associated with the command.

The oc commands are saved to the preview.sh file in the work directory.

Status
Optional.
Syntax
--preview=true|false
Default value
false

If you omit this option, the default value is used.

Valid values
false
Run the commands to apply the changes to your cluster.
true
Preview the commands without running them.

You can copy the oc commands from the output and run them yourself. However, this method is not recommended. When you run the commands manually, you do not have access to the additional helper scripts that are included in the underlying Ansible® playbook.

--remove Specify whether to tether or untether the project from the project where the IBM Software Hub control plane is installed.
Status
Optional.
Syntax
--remove=true|false
Default value
false

If you omit this option, the default value is used.

Valid values
false
Tether the project to the project where the IBM Software Hub control plane is installed.
true
Untether the project from the project where the IBM Software Hub control plane is installed.
Important: If you untether a project, the control plane cannot manage any services that are deployed in the project.
--tethered_instance_ns This option can be used to specify either:
  • A project (namespace) that is tethered to the project where IBM Software Hub is installed.
  • A project (namespace) that you want to tether to the project where IBM Software Hub is installed.
Status
Required.
Syntax
--tethered_instance_ns=<project-name>
Default value
No default. User-defined.
Valid values
  • A project (namespace) that is tethered to the project where IBM Software Hub is installed.
  • A project (namespace) that you want to tether to the project where IBM Software Hub is installed.

    If you have the appropriate permissions to create projects on the cluster, the command will automatically create the project if it does not exist.

    If you don't have sufficient permissions to create projects, you must specify an existing project.

-v
-vv
-vvv
Display verbose output.

Options are listed from least verbose to the most verbose.

Status
Optional.
Syntax
Verbose output
-v
Very verbose output
-vv
Most verbose output
-vvv
Default value
Not applicable.
Valid values
Not applicable.

Examples

Note: The following example uses the recommended installation environment variables.

It is strongly recommended that you use a script to create environment variables with the correct values for your environment. For details, see Setting up installation environment variables.

Tether a project to the specified project
cpd-cli manage setup-tethered-ns \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
--tethered_instance_ns=${PROJECT_CPD_INSTANCE_TETHERED}
Preview the oc commands to tether a project to the specified project
cpd-cli manage setup-tethered-ns \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
--tethered_instance_ns=${PROJECT_CPD_INSTANCE_TETHERED} \
--preview=true
Untether a project from the specified project
cpd-cli manage setup-tethered-ns \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
--tethered_instance_ns=${PROJECT_CPD_INSTANCE_TETHERED} \
--remove=true