Ansible Bootstrap Configurations¶
This section describes Ansible bootstrap configuration options.
Some Ansible bootstrap parameters can not be changed or are very difficult to change after installation is complete.
Review the set of install-time-only parameters before installation and confirm that your values for these parameters are correct for the desired installation.
If you notice an incorrect install-time-only parameter value before you unlock controller-0 for the first time, you can re-run the Ansible bootstrap playbook with updated override values and the updated values will take effect.
Docker Registry Overrides
If you are using IPv6, provide IPv6 configuration overrides for the Ansible bootstrap playbook. Note that all addressing, except pxeboot_subnet, should be updated to IPv6 addressing.
Example IPv6 override values are shown below:
dns_servers: ‐ 2001:4860:4860::8888 ‐ 2001:4860:4860::8844 pxeboot_subnet: 169.254.202.0/24 management_subnet: 2001:db8:2::/64 cluster_host_subnet: 2001:db8:3::/64 cluster_pod_subnet: 2001:db8:4::/64 cluster_service_subnet: 2001:db8:4::/112 external_oam_subnet: 2001:db8:1::/64 external_oam_gateway_address: 2001:db8::1 external_oam_floating_address: 2001:db8::2 external_oam_node_0_address: 2001:db8::3 external_oam_node_1_address: 2001:db8::4 management_multicast_subnet: ff08::1:1:0/124
The external_oam_node_0_address, and external_oam_node_1_address parameters are not required for the AIO‐SX installation.
To bootstrap StarlingX you must pull container images for multiple system services. By default these container images are pulled from public registries: k8s.gcr.io, gcr.io, quay.io, and docker.io.
It may be required (or desired) to copy the container images to a private registry and pull the images from the private registry (instead of the public registries) as part of the StarlingX bootstrap. For example, a private registry would be required if a StarlingX system was deployed in an air-gapped network environment.
Use the docker_registries structure in the bootstrap overrides file to specify alternate registry(s) for the public registries from which container images are pulled. These alternate registries are used during the bootstrapping of controller-0, and on system application-apply of application packages.
The docker_registries structure is a map of public registries and the alternate registry values for each public registry. For each public registry the key is a fully scoped registry name of a public registry (for example “k8s.gcr.io”) and the alternate registry URL and username/password (if authenticated).
The fully scoped registry name (and optionally namespace/) for the alternate registry location where the images associated with this public registry should now be pulled from.
Valid formats for the url value are:
Domain. For example:
Domain with port. For example:
IPv4 address. For example:
IPv4 address with port. For example:
IPv6 address. For example:
IPv6 address with port. For example:
The username for logging into the alternate registry, if authenticated.
The password for logging into the alternate registry, if authenticated.
Additional configuration options in the docker_registries structure are:
A special public registry key which defines common values to be applied to all overrideable public registries. If only the defaults registry is defined, it will apply url, username, and password for all registries.
If values under specific registries are defined, they will override the values defined in the defaults registry.
The defaults key was formerly called unified. It was renamed in StarlingX R3.0 and updated semantics were applied.
This change affects anyone with a StarlingX installation prior to R3.0 that specifies alternate Docker registries using the unified key.
Specifies whether the registry(s) supports HTTPS (secure) or HTTP (not secure). Applies to all alternate registries. A boolean value. The default value is True (secure, HTTPS).
secure parameter was formerly called
is_secure_registry. It was
renamed in StarlingX R3.0.
If an alternate registry is specified to be secure (using HTTPS), the certificate used by the registry may not be signed by a well-known Certificate Authority (CA). This results in the docker pull of images from this registry to fail. Use the ssl_ca_cert override to specify the public certificate of the CA that signed the alternate registry’s certificate. This will add the CA as a trusted CA to the StarlingX system.
The ssl_ca_cert value is the absolute path of the certificate file. The certificate must be in PEM format and the file may contain a single CA certificate or multiple CA certificates in a bundle.
The following example will apply url, username, and password to all registries.
docker_registries: defaults: url: my.registry.io username: myreguser password: myregP@ssw0rd
The next example applies username and password from the defaults registry to all public registries. url is different for each public registry. It additionally specifies an alternate CA certificate.
docker_registries: k8s.gcr.io: url: my.k8sregistry.io gcr.io: url: my.gcrregistry.io ghcr.io: url: my.ghrcregistry.io docker.elastic.co url: my.dockerregistry.io quay.io: url: my.quayregistry.io docker.io: url: my.dockerregistry.io defaults: url: my.registry.io username: myreguser password: myregP@ssw0rd ssl_ca_cert: /path/to/ssl_ca_cert_file
If the StarlingX OAM interface or network is behind a http/https proxy, relative to the Docker registries used by StarlingX or applications running on StarlingX, then Docker within StarlingX must be configured to use these http/https proxies.
Use the following configuration overrides to configure your Docker proxy settings.
Specify the HTTP proxy URL to use. For example:
Specify the HTTPS proxy URL to use. For example:
A no-proxy address list can be provided for registries not on the other side of the proxies. This list will be added to the default no-proxy list derived from localhost, loopback, management, and OAM floating addresses at run time. Each address in the no-proxy list must neither contain a wildcard nor have subnet format. For example:
docker_no_proxy: - 188.8.131.52 - 184.108.40.206
By default the Kubernetes Root CA Certificate and Key are auto-generated and result in the use of self-signed certificates for the Kubernetes API server. In the case where self-signed certificates are not acceptable, use the bootstrap override values k8s_root_ca_cert and k8s_root_ca_key to specify the certificate and key for the Kubernetes root CA.
Specifies the certificate for the Kubernetes root CA. The k8s_root_ca_cert value is the absolute path of the certificate file. The certificate must be in PEM format and the value must be provided as part of a pair with k8s_root_ca_key. The playbook will not proceed if only one value is provided.
Specifies the key for the Kubernetes root CA. The k8s_root_ca_key value is the absolute path of the certificate file. The certificate must be in PEM format and the value must be provided as part of a pair with k8s_root_ca_cert. The playbook will not proceed if only one value is provided.
The default length for the generated Kubernetes root CA certificate is 10 years. Replacing the root CA certificate is an involved process so the custom certificate expiry should be as long as possible. We recommend ensuring root CA certificate has an expiry of at least 5-10 years.
The administrator can also provide values to add to the Kubernetes API server certificate Subject Alternative Name list using the apiserver_cert_sans override parameter.
Specifies a list of Subject Alternative Name entries that will be added to the Kubernetes API server certificate. Each entry in the list must be an IP address or domain name. For example:
apiserver_cert_sans: - hostname.domain - 198.51.100.75
StarlingX automatically updates this parameter to include IP records for the OAM floating IP and both OAM unit IP addresses.
The Kubernetes cluster can be configured to use an external OpenID Connect IDP, such as Azure Active Directory, Salesforce, or Google, for Kubernetes API authentication.
By default, OpenID Connect authentication is disabled. To enable OpenID Connect, use the following configuration values in the Ansible bootstrap overrides file to specify the IDP for OpenID Connect:
apiserver_oidc: client_id: issuer_url: username_claim:
When the three required fields of the apiserver_oidc parameter are defined, OpenID Connect is considered active. The values will be used to configure the Kubernetes cluster to use the specified external OpenID Connect IDP for Kubernetes API authentication.
In addition, you will need to configure the external OpenID Connect IDP and any required OpenID client application according to the specific IDP’s documentation.
If not configuring OpenID Connect, all values should be absent from the configuration file.
Default authentication via service account tokens is always supported, even when OpenID Connect authentication is configured.