fusionauth

by FusionAuth

Helm chartv1.71.1App 1.71.1Verified publisher

Helm chart for FusionAuth

About this chart

FusionAuth Helm Chart

FusionAuth is a modern platform for Customer Identity and Access Management (CIAM). FusionAuth provides APIs and a responsive web user interface to support login, registration, localized email, multi-factor authentication, reporting, and much more.

Important Changes

1.68.0

⚠️ This release contains several breaking changes, as well as recommended changes. Review your values file carefully against these notes!

Breaking Changes

  • The minimum supported Kubernetes version is now 1.23.0. This removes support for long-deprecated beta APIs for HorizontalPodAutoscaler, Ingress, and PodDisruptionBudget.

  • service.spec has been removed from the chart to eliminate the risk of overwriting valid service configurations. If you used service.spec in a way that is not supported by the standard chart values, please open an issue describing your use case.

  • service.type no longer supports ExternalName. ExternalName support should not be required in this chart. If you used ExternalName, please open an issue describing your use case.

  • environment can no longer override variables managed by chart values. If you have set any of the following variables in the environment section, you must remove them and use the corresponding chart values instead.

    Env VarChart Value
    DATABASE_USERNAMEdatabase.dbUser.username
    DATABASE_PASSWORDdatabase.dbUser.password
    DATABASE_ROOT_USERNAMEdatabase.rootUser.username
    DATABASE_ROOT_PASSWORDdatabase.rootUser.password
    DATABASE_URLdatabase.url
    FUSIONAUTH_APP_MEMORYfusionauth.app.memory
    FUSIONAUTH_APP_RUNTIME_MODEfusionauth.app.runtimeMode
    FUSIONAUTH_APP_SILENT_MODEfusionauth.app.silentMode
    FUSIONAUTH_APP_KICKSTART_FILEkickstart.file
    SEARCH_TYPEsearch.engine
    SEARCH_SERVERSsearch.hostsearch.protocolsearch.port
    SEARCH_USERNAMEsearch.basicAuth.username
    SEARCH_PASSWORDsearch.basicAuth.password
  • Chart-managed database secrets have changed.

    • If you are using existingSecret to store passwords, this does not affect you.
    • If you are not using existingSecret, we recommend that you do, as storing passwords in clear text in the values file is not secure. If you continue to store passwords in the values file, you will be impacted by these changes.
      • The previous secret <release-name>-credentials is no longer created or used by the chart. Instead, the chart creates two new secrets:
        • <release-name>-db-credentials contains the password from database.dbUser.password.
        • <release-name>-db-root-credentials contains the password from database.rootUser.password.

Recommended Migrations

There are additional changes to the values, but these changes include compatibility shims to give you time to migrate. It's recommended to migrate to the new values as soon as possible, as the compatibility shims will be removed in a future chart release.

  • Values for database credentials have been updated.

    If you are using existingSecret to store the database passwords (recommended):

    # Old values
    database:
      user: fusionauth # name of the database user
      existingSecret: fusionauth-db-creds # name of the k8s Secret
      root:
        user: postgres # name of the root user
    
    # New values
    database:
      dbUser:
        username: fusionauth # name of the database user
        existingSecret:
          enabled: true
          name: fusionauth-db-creds # name of the k8s Secret
          passwordKey: password # name of the key that stores the password
      rootUser:
        username: postgres # name of the root user
        existingSecret:
          enabled: true
          name: fusionauth-root-creds # name of the k8s Secret
          passwordKey: password # name of the key that stores the root password
    

    If you are storing the database passwords in clear text (NOT recommended):

    # Old values
    database:
      user: fusionauth
      password: password
      root:
        user: postgres
        password: password
    
    # New values
    database:
      dbUser:
        username: fusionauth
        password: password
      rootUser:
        username: postgres
        password: password
    

    📝 Whether you use the new shape or not, if you are not using existingSecret, the chart will now create separate Secrets for the database user and the root user, instead of putting both passwords into a single secret.

  • initContainers.waitForEs renamed to initContainers.waitForSearch

  • Values for search credentials have changed.

    • A basicAuth key was added to prepare for support of other credential types in the future.
    • search.basicAuth now supports existingSecret.
    # Old values
    search:
      user: username # name of the search user
      password: password # password for the search user
    
    # New values
    search:
      basicAuth:
        enabled: true
        username: username
        password: password
    
    # New values with existingSecret
    search:
      basicAuth:
        existingSecret:
          enabled: true
          name: fusionauth-search-creds
          userKey: username
          passwordKey: password
    

1.57.1

  • The chart version now matches the FusionAuth app version.

    ⚠️ You can (and probably should) override the image.tag field in values.yaml to pin the desired version of the FusionAuth application. This ensures that upgrading the helm chart doesn't unexpectedly upgrade the FusionAuth version.

1.0.0

  • The FusionAuth app version will now default to the latest available at the time of the chart's release. Release notes will indicate the FusionAuth version included in the chart.

    ⚠️ You can (and probably should) override the image.tag field in values.yaml to pin the desired version of the FusionAuth application. This ensures that upgrading the helm chart doesn't unexpectedly upgrade the FusionAuth version.

0.8.0

  • The environment value is now an array instead of an object. Make sure to reformat your values when you update.

0.4.0

  • The external postgresql and elasticsearch charts were dropped. You will need to maintain those dependencies on your own.

Installing the Chart

You can read the official instructions, including install steps for AWS, GCP, and Azure, in the FusionAuth Kubernetes installation guide.

Prerequisites

  • PostgreSQL or MySQL database
  • ElasticSearch or OpenSearch instance (optional)

⚠️ Though an ElasticSearch or OpenSearch instance is optional, it is strongly recommended for most use cases.

Installation

To install the chart with the release name fusionauth:

helm repo add fusionauth https://fusionauth.github.io/charts
helm install fusionauth fusionauth/fusionauth \
  --set database.host=[database host] \
  --set database.dbUser.username=[database username] \
  --set database.dbUser.password=[database password] \
  --set search.host=[elasticsearch host]

Setting Up a Test Deployment

This will install FusionAuth and its prerequisites in a single kubernetes namespace, with a configuration suitable for evaluation and testing. This configuration is not suitable for production.

Create and switch to the test namespace.

kubectl create namespace fusionauth-test
kubectl config set-context --current --namespace=fusionauth-test

Install PostgreSQL

helm install postgres oci://registry-1.docker.io/bitnamicharts/postgresql

Install Opensearch

Opensearch is optional, but highly recommended. See the note below.

helm repo add opensearch https://opensearch-project.github.io/helm-charts/
helm install opensearch opensearch/opensearch \
--set singleNode=true \
--set-json 'extraEnvs=[{"name":"DISABLE_SECURITY_PLUGIN","value":"true"}]'

Install FusionAuth

Wait for the Postgres and Opensearch pods to be ready, then install FusionAuth.

export FA_PSQL_PASS=$(kubectl get secret postgres-postgresql -o jsonpath="{.data.postgres-password}" | base64 -d)
helm repo add fusionauth https://fusionauth.github.io/charts
helm install fusionauth fusionauth/fusionauth \
--set database.host=postgres-postgresql \
--set database.dbUser.username=fusionauth \
--set database.dbUser.password=$FA_PSQL_PASS \
--set search.host=opensearch-cluster-master

📝 For test deployments, you can remove --set search.host and add --set search.engine=database to configure FusionAuth to use the database for search instead of a dedicated search host. This is not recommended for real-world use, as search performance will be greatly reduced.

Connect to FusionAuth

Create a port forward to connect to the FusionAuth app.

kubectl port-forward svc/fusionauth 9011:9011

You should now be able to connect to the FusionAuth application at http://localhost:9011 to start the initial setup.

📝 You may wish to set up an ingress instead of using a port forward. See the table below for how to configure the FusionAuth chart values to add an ingress.

Chart Values

KeyTypeDefaultDescription
affinityobject{}Define affinity for kubernetes to use when scheduling fusionauth pods.
annotationsobject{}Define annotations for fusionauth deployment.
appobject{"memory":"256M","runtimeMode":"development","silentMode":false}Configures general settings for the fusionauth application
app.memorystring"256M"Configures the amount of memory Java can use
app.runtimeModestring"development"Configures runtime mode for fusionauth. Should be 'development' or 'production' learn more about the difference here: https://fusionauth.io/docs/v1/tech/reference/configuration
app.silentModeboolfalseConfigures silent mode for fusionauth. Should be 'true' or 'false' learn more about silent mode here: https://fusionauth.io/docs/get-started/download-and-install/silent-mode silent-mode minimizes downtime during upgrades: https://fusionauth.io/docs/operate/deploy/upgrade#downtime-and-database-migrations
autoscalingobject{"enabled":false,"maxReplicas":5,"minReplicas":2,"targetCPU":50}Configures Horizontal Pod Autoscaling. If you enable autoscaling, you will need to also set resource requests for the corresponding targets.
autoscaling.enabledboolfalseEnable Horizontal Pod Autoscaling.
autoscaling.maxReplicasint5Maximum number of running instances when HPA is enabled.
autoscaling.minReplicasint2Minimum number of running instances when HPA is enabled.
autoscaling.targetCPUint50CPU use % threshold to trigger a HPA scale up.
databaseobject{"dbUser":{"existingSecret":{"enabled":false,"name":"","passwordKey":"password"},"password":"","username":""},"host":"","name":"fusionauth","port":5432,"protocol":"postgresql","rootUser":{"existingSecret":{"enabled":false,"name":"","passwordKey":"password"},"password":"","username":""},"tls":false,"tlsMode":"require","url":""}Configures the database connection for fusionauth
database.dbUserobject{"existingSecret":{"enabled":false,"name":"","passwordKey":"password"},"password":"","username":""}Database credentials for fusionauth to use in normal operation
database.dbUser.existingSecretobject{"enabled":false,"name":"","passwordKey":"password"}Configures an existing secret that contains the normal database user password.
database.dbUser.existingSecret.enabledboolfalseUse an existing secret for the normal database user password.
database.dbUser.existingSecret.namestring""The name of an existing secret that contains the normal database user password.
database.dbUser.existingSecret.passwordKeystring"password"The key in the existing secret that contains the database password.
database.dbUser.passwordstring""Database password for fusionauth to use in normal operation. It is not recommended to set the password in clear text here. Use an existing secret instead.
database.dbUser.usernamestring""Database username for fusionauth to use in normal operation.
database.hoststring""Hostname or ip of the database instance. Required by the wait-for-db init container even when database.url is set.
database.namestring"fusionauth"Name of the fusionauth database
database.portint5432Port of the database instance. Required by the wait-for-db init container even when database.url is set.
database.protocolstring"postgresql"Protocol for jdbc connection to database [`postgresql
database.rootUserobject{"existingSecret":{"enabled":false,"name":"","passwordKey":"password"},"password":"","username":""}Database credentials for fusionauth to use during initial bootstrap
database.rootUser.existingSecretobject{"enabled":false,"name":"","passwordKey":"password"}Configures an existing secret that contains the root database user password.
database.rootUser.existingSecret.enabledboolfalseUse an existing secret for the root database user password.
database.rootUser.existingSecret.namestring""The name of an existing secret that contains the root database user password.
database.rootUser.existingSecret.passwordKeystring"password"The key in the existing secret that contains the root database password.
database.rootUser.passwordstring""Database password for fusionauth to use during initial bootstrap It is not recommended to set the

Deploy fusionauth with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has fusionauth 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 chartfusionauth is pinned at v1.71.1 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