iaas-controller

by Thalassa Cloud

Helm chartv0.3.0App v0.3.0

Helm chart for deploying the Thalassa Cloud IaaS controller

About this chart

iaas-controller

Helm chart for deploying the Thalassa Cloud IaaS Controller.

Source Code

Thalassa authentication

Set thalassa.enabled: true and configure one of the following (authMethod):

authMethodDescription
tokenExchangeFederated workload identity: exchanges the pod’s Kubernetes service account JWT for a Thalassa API token via POST to {url}/oidc/token. Requires thalassa.tokenExchange.serviceAccountId (Thalassa service account ID). By default the chart mounts a projected service account token (tokenExchange.projectedToken) and passes --thalassa-subject-token-file to that path; set projectedToken.enabled: false and optionally subjectTokenFile to use the legacy automounted token path instead.
patPersonal access token: the chart mounts your Kubernetes Secret (thalassa.pat.existingSecret) at thalassa.pat.mountPath and passes --thalassa-token-file to the mounted key file (see secretKey / secretFilename).
oidcClientCredentialsOAuth2 client credentials: thalassa.oidcClientCredentials.clientId and client secret mounted from existingSecret at oidcClientCredentials.mountPath (--thalassa-client-secret-file).

If thalassa.enabled is false, supply the same flags via extraArgs (and any secrets via additional volumes), or use a wrapper that sets flags.

Examples

OIDC token exchange (in-cluster)

thalassa:
  enabled: true
  url: "https://api.thalassa.cloud/"
  organisation: "<org-id-or-slug>"
  authMethod: tokenExchange
  tokenExchange:
    serviceAccountId: "<thalassa-service-account-id>"
    # Default: projected SA token volume + --thalassa-subject-token-file. Optional:
    # projectedToken:
    #   audience: "https://api.thalassa.cloud/"  # set if your federated identity requires it
    # subjectTokenFile: "/var/run/secrets/..."   # overrides projected volume

When using token exchange, you need a federated identity. Bootstrap this for example through tcloud:

tcloud iam workload-identity-federation bootstrap kubernetes \
  --cluster <cluster-identity> \
  --namespace thalassa-iaas-controller \
  --service-account iaas-controller \
  --role iaas:FullAdminAccess

The above bootstraps a federated identity for a newly created service account with the thalassa IAM rolebinding iaas:FullAdminAccess, for the Kubernetes serviceaccount thalassa-iaas-controller/iaas-controller. Make sure that the namespace and serviceaccount match with the Iaas Controller deployment's.

Personal access token

thalassa:
  enabled: true
  organisation: "<org-id-or-slug>"
  authMethod: pat
  pat:
    existingSecret: thalassa-api-token
    secretKey: token

Create the secret first: kubectl create secret generic thalassa-api-token --from-literal=token=...

OIDC client credentials

thalassa:
  enabled: true
  organisation: "<org-id-or-slug>"
  authMethod: oidcClientCredentials
  oidcClientCredentials:
    clientId: "<client-id>"
    existingSecret: thalassa-oauth
    clientSecretKey: client-secret

Values

KeyTypeDefaultDescription
affinityobject{}
enableServiceMonitorbooltrue
envFromlist[]
extraArgslist[]
fullnameOverridestring""
hpa.cpu.averageUtilizationint90
hpa.cpu.targetTypestring"Utilization"
hpa.enabledboolfalse
hpa.maxReplicasint4
hpa.minReplicasint2
image.pullPolicystring"IfNotPresent"
image.repositorystring"registry.thalassacloud.nl/thalassa-cloud/iaas-controller"
image.tagstringnil
imagePullSecretsobject{}
minAvailableint1
nameOverridestring""
nodeSelectorobject{}
podAnnotationsobject{}
podSecurityContext.fsGroupint65532
podSecurityContext.runAsGroupint65532
podSecurityContext.runAsNonRootbooltrue
podSecurityContext.runAsUserint65532
podSecurityContext.seccompProfile.typestring"RuntimeDefault"
replicaCountint1
resourcesobject{}
securityContext.allowPrivilegeEscalationboolfalse
securityContext.capabilities.drop[0]string"ALL"
securityContext.readOnlyRootFilesystembooltrue
securityContext.runAsUserint65532
service.typestring"ClusterIP"
serviceAccount.annotationsobject{}
serviceAccount.createbooltrue
serviceAccount.namestring""
tolerationslist[]
thalassaobjectsee values.yamlThalassa API URL, organisation, and authentication

Autogenerated from chart metadata using helm-docs v1.14.2

Deploy iaas-controller with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has iaas-controller on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartiaas-controller is pinned at v0.3.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply