blob: ce4a0ed0b51ee261a530f7b5d72b89ce7a2d12c4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
# Multisite Initialization Container
This container sets up the initial entry in a kubeconfig file that
Cloudify Manager (and potentially other components) can use to access
multiple Kubernetes clusters. The initial entry is for the central
site.
The container runs a short Python script to completion. It's meant to be
run as an init container or as a standalone Kubernetes Job. (In the R4 ["Dublin"] release, it's
run as an init container for the Cloudify Manager pod.) The script works by
using the Kubernetes API to get three pieces of information about the cluster where the script is running:
1. the address of the Kubernetes API server
2. the CA certificate for the server
3. an authorization token that can be presented with each API request.
The script combines this information with other values provided from command line arguments and/or defaults
to create a kubeconfig-style structure that it uses to update an existing Kubernetes ConfigMap. (It uses an
existing ConfigMap, rather than creating a new one, in order to work well with the OOM Helm deployment
strategy. The OOM Helm charts create an empty ConfigMap, so that Helm knows about the ConfigMap and can delete
it cleanly when uninstalling. If the script created a new ConfigMap,
Helm would not know about it and would not delete it during an uninstall
operation.)
The table below shows the command line arguments that can be passed to the script via the "args" array in the
Kubernetes spec for the container.
| Argument | Description | Required? | Default
|----------|-------|-----------|--------
|--namespace, -n | Namespace where CM will run | Yes | None
|--location, -l | Name of the central location | No | "central"
|--user, -u | User name for authorization | No | "user00"
|--configmap, -c | Name of the ConfigMap where the kubeconfig is stored | No | "multisite-kubeconfig-configmap"
|--key, -k | Key under which the kubeconfig is stored (when mounted on a container, this will be file name)| No | "kubeconfig"
|