Platform and IAM Releases
The RSH chart is installed twice, as two separate releases, each with its own values file. Environment layout describes the two layouts. In layout A both releases share <NAMESPACE>. In layout B the internal release runs in <INTERNAL_NAMESPACE> and the external release in <EXTERNAL_NAMESPACE>.
- The internal release runs NATS and the IAM instance of the internal boundary, which the users of the supervision centre sign in to. Its hosts are reached only from the internal network.
- The external release runs the IAM instance of the external boundary, which the portal users sign in to. Its hosts are published to the portal users, for example on the internet. It has no NATS of its own and connects to the one of the internal release.
The chart bundles IAM as its iam subchart, so the IAM values of both releases sit under iam:. The installation of the chart itself, including its prerequisites, is on Installation. The RSH values are on Helm Chart Configuration and the IAM values on IAM Helm Chart Configuration. This page lists the values that make the two releases work together. Environment Parameters defines each placeholder.
Differences between the two releases
These settings make one release the supervision-centre IAM, with NATS, and the other the portal IAM, which connects to that NATS.
| Setting | Internal release | External release |
|---|---|---|
| Release | <INTERNAL_RELEASE> | <EXTERNAL_RELEASE> |
Namespace (helm -n) | <INTERNAL_NAMESPACE> in layout B; <NAMESPACE> in layout A | <EXTERNAL_NAMESPACE> in layout B; <NAMESPACE> in layout A |
nats. | true (chart default) | false |
iam. | internal (chart default) | external |
iam. | Chart default, nats:// | <NATS_URL> |
The realm, the host prefixes and the first administrator also differ; they are in the values below. The IAM chart names its Platform API instance iam-module-<namespace> by default, and the name also identifies the durable NATS consumer of the instance. Two instances with the same name on one NATS would consume each other’s messages. In layout B the namespaces differ, so the chart defaults are enough. In layout A the namespaces are the same, so the external release sets a distinct name. The service of a Platform API instance is called <name>-platform-api.
Values that differ between the layouts
In layout A, one namespace, the external release needs a Platform API name of its own and a backend URL that points at it. Layout B, two namespaces, keeps the chart defaults.
| Setting | Layout A, one namespace | Layout B, two namespaces |
|---|---|---|
iam. of the external release | iam-module-{{ . | Chart default, iam-module-<namespace> |
iam. of the external release | http:// | Chart default |
The external release and the modules use <NATS_URL> in both layouts.
Kubernetes Secrets belong to a namespace, so every Secret that the values of a release name exists in the namespace of that release. <IMAGE_PULL_SECRET> is therefore created in both namespaces, and without cert-manager each release has a TLS Secret of its own, for its own hosts.
Internal release
Install the internal release first, into <INTERNAL_NAMESPACE>. It creates the NATS and the IAM instance that the supervision centre and Datacollection connect to.
The file has these blocks:
iam.global.keycloak.realmandiam.global.domainset the realm and the hosts of IAM and Keycloak.iam.keycloakandiam.backenddefine the first administrator.
<INTERNAL_RELEASE>-values.yaml:
iam:
global:
keycloak:
realm: <INTERNAL_REALM>
domain:
base: <BASE_DOMAIN>
prefix:
iam: "<INTERNAL_IAM_PREFIX>"
keycloak: "<INTERNAL_KEYCLOAK_PREFIX>"
keycloak:
adminUsername: <INTERNAL_ADMIN_USERNAME>
adminEmail: <INTERNAL_ADMIN_EMAIL>
backend:
superAdminUsername: <INTERNAL_ADMIN_USERNAME>Also set these values in the same file:
global.imageRegistryis<IMAGE_REGISTRY>andglobal.imagePullSecretslists<IMAGE_PULL_SECRET>. Whenglobal.imageRegistryUsernameandglobal.imageRegistryPasswordare set instead of an existing pull Secret, the chart creates<INTERNAL_RELEASE>-dockerconfig, andglobal.imagePullSecretsmust list that Secret.iam.global.smtpServeris required. The first administrator sets a password by e-mail. The keys are under SMTP Configuration for Email Notifications. The password can come from a Secret Manager; see IAM: External Secrets.iam.global.authGateway.ingressprovides TLS for the IAM and Keycloak hosts. Without cert-manager,existingTlsSecret: <TLS_SECRET>names a certificate that covers both hosts. The other edge options are under Auth gateway.- The first administrator is defined by
iam.keycloak.adminUsername,iam.keycloak.adminEmailandiam.backend.superAdminUsername. See Admin Users and First administrator. iam.global.productionistruein production andfalsein a non-production environment.
Install the internal release:
helm upgrade -i <INTERNAL_RELEASE> <PLATFORM_CHART> \
--version <PLATFORM_VERSION> \
-n <INTERNAL_NAMESPACE> --create-namespace \
-f <INTERNAL_RELEASE>-values.yaml \
--set-file global.caCert=<CA_BUNDLE_FILE> \
--wait --timeout 10m--set-file global.caCert is needed only when the ingress certificates are signed by a CA that is not publicly trusted. The release trusts the certificates in that file.
The internal release creates NATS with JetStream, IAM on https://<INTERNAL_IAM_HOST> with Keycloak on https://<INTERNAL_KEYCLOAK_HOST> and the realm <INTERNAL_REALM>, and the Secrets <INTERNAL_RELEASE>-keycloak-admin-secret and <INTERNAL_RELEASE>-appsettings-secret; see Secrets. The streams that nats.init.streams defines are listed under Names that stay as they are. Datacollection and Licensing rely on them, so keep them as they are.
These settings size NATS and add its web interface:
nats.jetstream.pvcSize(default10Gi) sizes the volume.nats.jetstream.maxFileStore(default10gb) caps the stored messages.nats.nui.enabled: trueadds a web interface for the streams.
The message limits are described under Messages and Messaging.
External release
Install the external release after the internal one, into <EXTERNAL_NAMESPACE>. It creates the IAM instance that portal users sign in to, and it connects to the NATS of the internal release.
The file has these blocks:
nats.enabled: falseleaves out NATS, because the release uses the NATS of the internal release.iam.global.boundary: externalmakes this IAM the one for the portal.iam.global.keycloak.realm,iam.global.domain,iam.keycloakandiam.backendset the realm, the hosts and the first administrator, as on the internal release.iam.platform-api.api.messaging.urlpoints the Platform API of this IAM at the NATS of the internal release.
<EXTERNAL_RELEASE>-values.yaml:
nats:
enabled: false
iam:
global:
boundary: external
keycloak:
realm: <EXTERNAL_REALM>
domain:
base: <BASE_DOMAIN>
prefix:
iam: "<EXTERNAL_IAM_PREFIX>"
keycloak: "<EXTERNAL_KEYCLOAK_PREFIX>"
keycloak:
adminUsername: <EXTERNAL_ADMIN_USERNAME>
adminEmail: <EXTERNAL_ADMIN_EMAIL>
backend:
superAdminUsername: <EXTERNAL_ADMIN_USERNAME>
platform-api:
api:
messaging:
url: <NATS_URL><NATS_URL> is the full name of the NATS service, which resolves from <EXTERNAL_NAMESPACE>. The two releases share no values, so also set global.imageRegistry, global.imagePullSecrets, iam.global.smtpServer, iam.global.production and the TLS settings of iam.global.authGateway in the same file, as on the internal release.
Install the external release:
helm upgrade -i <EXTERNAL_RELEASE> <PLATFORM_CHART> \
--version <PLATFORM_VERSION> \
-n <EXTERNAL_NAMESPACE> --create-namespace \
-f <EXTERNAL_RELEASE>-values.yaml \
--set-file global.caCert=<CA_BUNDLE_FILE> \
--wait --timeout 10mIt creates IAM on https://<EXTERNAL_IAM_HOST>, with Keycloak on https://<EXTERNAL_KEYCLOAK_HOST> and the realm <EXTERNAL_REALM>, and its own <EXTERNAL_RELEASE>-keycloak-admin-secret and <EXTERNAL_RELEASE>-appsettings-secret.
Hosts and certificates
The IAM chart builds each host from a prefix and <BASE_DOMAIN>, so a prefix that ends with a dot adds a subdomain: <INTERNAL_KEYCLOAK_PREFIX> set to iam-supervisioncenter.keycloak. gives iam-supervisioncenter.keycloak.<BASE_DOMAIN>. The certificate of each release covers its IAM host and its Keycloak host. On OpenShift, use hosts with a single label in front of the router domain instead; see OpenShift Differences.
Publish the hosts of the internal release on the internal network only, and those of the external release to the portal users, for example through an ingress class or a gateway that faces the internet. A namespace does not by itself decide who reaches a release: the ingress or gateway that publishes its hosts does, and network policies limit the traffic between the namespaces.
Datacollection and Licensing register with IAM through NATS. Users sign in through the issuers <INTERNAL_ISSUER> and <EXTERNAL_ISSUER>. The other IAM addresses each module needs are listed on Datacollection Module and Licensing Module.
Traffic between the two namespaces
This table applies to layout B. In layout A the same calls stay inside <NAMESPACE>.
A network policy that separates the namespaces of layout B keeps these connections open:
| From | To | Port | Used for |
|---|---|---|---|
The Platform API instance of the external IAM, in <EXTERNAL_NAMESPACE> | <INTERNAL_RELEASE>-nats in <INTERNAL_NAMESPACE>, through <NATS_URL> | 4222 | The registrations of Datacollection and Licensing on the external boundary, and the other messages of the external IAM |
The external IAM, in <EXTERNAL_NAMESPACE> | The portal hosts of the modules, https:// and https://, through the ingress | 443 | The endpoints that the modules register on the external boundary |
The external IAM, in <EXTERNAL_NAMESPACE> | licensing-supervision-vas in <INTERNAL_NAMESPACE> | 8080 | The external roles of Licensing; see Licensing Module |
Datacollection and Licensing, in <INTERNAL_NAMESPACE> | https://, through the ingress | 443 | Validation of the tokens that <EXTERNAL_ISSUER> issues to portal users |
The pods in <INTERNAL_NAMESPACE> reach <EXTERNAL_NAMESPACE> only through its published hosts.