rh-build-keycloak

by tjungbauer

Helm chartv1.0.7Apache-2.0Verified publisher

Configure the operator Red Hat Build of Keycloak

About this chart

rh-build-keycloak

Description

Configure the operator Red Hat Build of Keycloak

This Helm Chart is configuring Red Hat build of Keycloak instance. It can be used be the built in database, or an example and hardcoded postgres instance, or with your very own configuration.

Be sure to create a secret containing the certificate for the keycloak instance and use them in the settings.

A self-signed certificate can be created with the following commands for example:

`openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout tls.key -out tls.crt -subj "/CN=test.keycloak.org/O=Test Keycloak./C=US`<br/>
`oc create secret tls example-tls-secret --cert=tls.crt --key=tls.key`

It is then used in the values file at:

http:
  tlsSecret:

Check out the latest documentation for additional settings, supported features and more at, for example: https://docs.redhat.com/en/documentation/red_hat_build_of_keycloak/26.0/html-single/server_configuration_guide/

Dependencies

This chart has the following dependencies:

RepositoryNameVersion
https://charts.stderr.at/tpl~1.0.27

It is best used with a full GitOps approach such as Argo CD does. For example, https://github.com/tjungbauer/openshift-clusterconfig-gitops (folder: clusters/management-cluster/setup-rh-build-of-keycloak)

Maintainers

NameEmailUrl
tjungbauer[email protected]https://blog.stderr.at/

Sources

Source:

Source code: https://github.com/tjungbauer/helm-charts/tree/main/charts/rh-build-keycloak

Parameters

Verify the subcharts for additional settings:

Values

keycloak

KeyTypeDefaultDescription
keycloakobject{"additionalAnnotations":{},"additionalLabels":{},"additionalOptions":{},"db":{"example_db_pass":"","exmple_db_user":"testuser","settings":{"custom_database":false,"database":"","host":"","passwordSecret":{"key":"","name":""},"poolInitialSize":"","poolMaxSize":"","poolMinSize":"","port":"","schema":"","url":"","usernameSecret":{"key":"","name":""},"vendor":""},"use_example_db_sta":false},"features":{"disabled":[],"enabled":[]},"hostname":{"admin":"","adminUrl":"","hostname":"myhostname","strict":false,"strictBackchannel":false},"http":{"httpEnabled":false,"httpPort":"","httpsPort":"","tlsSecret":""},"image":"","imagePullSecrets":[],"ingress":{"className":"","enabled":false},"instance":1,"name":"example-keycloak","namespace":"keycloak","resources":{},"transaction":{"xaEnabled":false}}Configuration of the Keycloak instance
keycloak.additionalAnnotationsobject{}Additional annotations to add to the Keycloak instance as key: value pairs.
keycloak.additionalLabelsobject{}Additional labels to add to the Keycloak instance as key: value pairs.
keycloak.additionalOptionsobject{}The additionalOptions field of the Keycloak CR enables Red Hat build of Keycloak to accept any available configuration in the form of key-value pairs. You can use this field to include any option that is omitted in the Keycloak CR. For details on configuring options, see All configurations
keycloak.featuresobject{"disabled":[],"enabled":[]}Red Hat build of Keycloak has packed some functionality in features, including some disabled features, such as Technology Preview and deprecated features. Other features are enabled by default, but you can disable them if they do not apply to your use of Red Hat build of Keycloak. See Features
keycloak.features.enabledlist[]Some supported features, and all preview features, are disabled by default. Here you can enable them.
keycloak.hostnameobject{"admin":"","adminUrl":"","hostname":"myhostname","strict":false,"strictBackchannel":false}In this section you can configure Keycloak hostname and related properties.
keycloak.hostname.adminstring""Address for accessing the administration console. Use this option if you are exposing the administration console using a reverse proxy on a different address than specified in the hostname option.
keycloak.hostname.adminUrlstring""Set the base URL for accessing the administration console, including scheme, host, port and path
keycloak.hostname.hostnamestring""Hostname at which is the server exposed.
keycloak.hostname.strictboolfalseDisables dynamically resolving the hostname from request headers.
keycloak.hostname.strictBackchannelboolfalseBy default backchannel URLs are dynamically resolved from request headers to allow internal and external applications.
keycloak.httpobject{"httpEnabled":false,"httpPort":"","httpsPort":"","tlsSecret":""}In this section you can configure Keycloak features related to HTTP and HTTPS
keycloak.http.httpEnabledboolfalseEnables the HTTP listener.
keycloak.http.httpPortstring""The used HTTP port.
keycloak.http.httpsPortstring""The used HTTPS port.
keycloak.http.tlsSecretstring""tlsSecret for Keycloak Can be a valid secret with tls.crt and tls.key To create a self-signed simply use the following commands: openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout tls.key -out tls.crt -subj "/CN=test.keycloak.org/O=Test Keycloak./C=US oc create secret tls example-tls-secret --cert=tls.crt --key=tls.key
keycloak.imagestring""Custom Keycloak image to be used. @@default -- ""
keycloak.imagePullSecretslist[]Secret(s) that might be used when pulling an image from a private container image registry or repository.
keycloak.ingressobject{"className":"","enabled":false}The deployment is, by default, exposed through a basic ingress.
keycloak.ingress.classNamestring""Define classname for Ingress
keycloak.ingress.enabledboolfalseEnable Ingress for Keycloak.
keycloak.instanceint1Number of Keycloak instances in HA mode. Default is 1.
keycloak.namestringexample-keycloakThe name of the Keycloak instance.
keycloak.namespacestringkeycloakThe namespace in which the Keycloak instance is deployed.
keycloak.transactionobject{"xaEnabled":false}In this section you can find all properties related to the settings of transaction behavior.
keycloak.transaction.xaEnabledboolfalseDetermine whether Keycloak should use a non-XA datasource in case the database does not support XA transactions.

db

KeyTypeDefaultDescription
keycloak.dbobject{"example_db_pass":"","exmple_db_user":"testuser","settings":{"custom_database":false,"database":"","host":"","passwordSecret":{"key":"","name":""},"poolInitialSize":"","poolMaxSize":"","poolMinSize":"","port":"","schema":"","url":"","usernameSecret":{"key":"","name":""},"vendor":""},"use_example_db_sta":false}Define database settings for Keycloak If omitted then keycloak will use an internal/ephemeral database It is possible to create an example postgres instance for testing purposes
keycloak.db.example_db_passstringthisisonly4testingNOT4prodThe database password to be used.
keycloak.db.exmple_db_userstringtestuserThe database user to be used.
keycloak.db.settingsobject{"custom_database":false,"database":"","host":"","passwordSecret":{"key":"","name":""},"poolInitialSize":"","poolMaxSize":"","poolMinSize":"","port":"","schema":"","url":"","usernameSecret":{"key":"","name":""},"vendor":""}In this section you can find all properties related to connect to a database.
keycloak.db.settings.custom_databaseboolfalseEnable custom db
keycloak.db.settings.databasestring''Sets the database name of the default JDBC URL of the chosen vendor. If the url option is set, this option is ignored.
keycloak.db.settings.hoststring""Sets the hostname of the default JDBC URL of the chosen vendor. If the url option is set, this option is ignored.
keycloak.db.settings.passwordSecretobject{"key":"","name":""}The reference to a secret holding the password of the database user. The secret must contain a key with the name of the password.
keycloak.db.settings.passwordSecret.keystring""The key of the secret holding the password of the database user.
keycloak.db.settings.passwordSecret.namestring""The name of the secret holding the password of the database user.
keycloak.db.settings.poolInitialSizestring''The initial size of the connection pool.
keycloak.db.settings.poolMaxSizestring''The maximum size of the connection pool.
keycloak.db.settings.poolMinSizestring''The minimal size of the connection pool.
keycloak.db.settings.portstring""Sets the port of the default JDBC URL of the chosen vendor. If the url option is set, this option is ignored.
keycloak.db.settings.schemastring""The database schema to be used.
keycloak.db.settings.urlstring""The full database JDBC URL. If not provided, a default URL is set based on the selected database vendor. For instance, if using 'postgres', the default JDBC URL would be 'jdbc:postgresql://localhost/keycloak'.
keycloak.db.settings.usernameSecretobject{"key":"","name":""}The reference to a secret holding the username of the database user. The secret must contain a key with the name of the username.
keycloak.db.settings.usernameSecret.keystring""The key of the secret holding the username of the database user.
keycloak.db.settings.usernameSecret.namestring""The name of the secret holding the username of the database user.
keycloak.db.settings.vendorstring""The database vendor, for example 'postgres'.
keycloak.db.use_example_db_staboolfalseCreates and example Statefulset This is a ready-to-go-testing service with hardcoded values and no need for further configuration. This is not intended for production use.

namespace

KeyTypeDefaultDescription
namespaceobject{"additionalAnnotations":{},"additionalLabels":{},"create":true,"descr":"","display":"","name":"keycloak"}The namespace that shall be created for the Operator and the instance.
namespace.additionalAnnotationsobject{}Additional labels to add to the Keycloak instance as key: value pairs.
namespace.additionalLabelsobject{}Additional labels to add to the Keycloak instance as key: value pairs.
namespace.createboolfalseCreate the namespace if it does not exist.
namespace.descrstring""Description of the namespace.
namespace.displaystring""Displayname of the namespace.
namespace.namestring"keycloak"The name of the namespace.

Other Values

KeyTypeDefaultDescription
enabledboolfalseEnable RH Build of Keycloak.
keycloak.resourcesobject{}specify resource requests and limits here

Example settings

---
enabled: true

namespace:
  name: <yournamespace>
  create: true

keycloak:
  name: example-keycloak
  namespace: <yournamespace>

  hostname:
    hostname: <yourhostname>>

  http:
    tlsSecret: "keycloak-certificate"

Installing the Chart

To install the chart with the release name my-release:

helm install my-release tjungbauer/<chart-name>>

The command deploys the chart on the Kubernetes cluster in the default configuration.

Uninstalling the Chart

To uninstall/delete the my-release deployment:

helm delete my-release

The command removes all the Kubernetes components associated with the chart and deletes the release.


Autogenerated from chart metadata using helm-docs v1.14.2

Deploy rh-build-keycloak with OpenTenant

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