generic-cluster-config

by tjungbauer

Helm chartv1.0.68Apache-2.0Verified publisher

This Chart is responsible for deploying generic cluster configuration, for example, etcd encryption, OAuth etc.

About this chart

generic-cluster-config

Description

This Chart is responsible for deploying generic cluster configuration, for example, etcd encryption, OAuth etc.

Configure your cluster with basic settings. Any generic and repeatable configuration goes in here. This helps me to quickly deploy Lab environments and demonstrate features.

It is best used with a GitOps approach such as Argo CD does. For example, https://github.com/tjungbauer/openshift-clusterconfig-gitops

Multiple Argo CD applications are using this Chart as a dependency to enable different aspects of the cluster (i.e., etcd encryption).

Currently, the following settings can be done:

  • Encrypt ETCD
  • Disable Self-Provisioner
  • Configure Identity Providers (LDAP or htpasswd)
  • Limit Allowed Registries
  • Configure Monitoring and User-Workload Monitoring
  • Add Console Banner (Top and Bottom)
  • Add Console Links
  • Add YAML Samples into the console

NOTE: About openshift-monitoring ConfigMaps: These must follow a strict order, otherwise Argo CD thinks the resource is out of sync. If you find anything that is not working, please open an issue and I will try to fix it.

Dependencies

This chart has the following dependencies:

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

None

Maintainers

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

Sources

Source:

Source code: https://github.com/tjungbauer/helm-charts/tree/main/charts/generic-cluster-config

Parameters

TIP: Verify the values.yaml to see possible additional settings.

Values

KeyTypeDefaultDescription
apiserver.audit.profilestringDefaultSet to Default, WriteRequestBodies, AllRequestBodies, or None. The default profile is Default
apiserver.custom_cert.cert_nameslistN/AList of names the certificate is valid
apiserver.custom_cert.enabledboolfalsecustom certificate enabled?
apiserver.custom_cert.secretnamestringapi-certificateName of the secret that holds the certificate
apiserver.enabledboolfalseEnable APIServer configuration in general
apiserver.etcd_encryption.enabledboolfalseEnable ETCD encryption in OpenShift
apiserver.etcd_encryption.encryption_typestringaesgcmType of encryption. This can either be: AES-CBC - Uses AES-CBC with PKCS#7 padding and a 32 byte key to perform the encryption. The encryption keys are rotated weekly. AES-GCM - Uses AES-GCM with a random nonce and a 32 byte key to perform the encryption. The encryption keys are rotated weekly.
apiserver.etcd_encryption.namespacestring"openshift-gitops"The Namespace where the Pod that verifies the status of the encryption will be started. If you encrypt the ETCD on a cluster without GitOps, this namespace must be changed. For example to "kube-system"
apiserver.etcd_encryption.serviceAccountobject{"create":true,"name":"etcd-encryption-checker"}The service account that is used to verify the status of the encryption
apiserver.etcd_encryption.ttlSecondsAfterFinishedint600Seconds to retain the finished etcd-encryption check Job before Kubernetes deletes it
clusterproxy.additionalAnnotationsobject{}Additional labels to add as key: value pairs.
clusterproxy.additionalLabelsobject{}Additional labels to add to as key: value pairs.
clusterproxy.enabledboolfalseEnable Cluster Proxy configuration
clusterproxy.http_proxystring''set clusterwide HTTP Proxy Must start with http:// or https:// For example: http://myproxy:3128 DO NOT ADD USERNAME AND PASSWORD HERE
clusterproxy.https_proxystring''set clusterwide HTTPS Proxy Must start with http:// or https:// For example: http://myproxy:3128 DO NOT ADD USERNAME AND PASSWORD HERE
clusterproxy.inject_trusted_cabundleboolfalseInject trusted CA bundle into the cluster proxy adds the label: config.openshift.io/inject-trusted-cabundle: "true"
clusterproxy.no_proxylist[]A comma-separated list of destination domain names, domains, IP addresses or other network CIDRs to exclude proxying.
clusterproxy.trustedCAstring''set clusterwide Trusted CA ConfigMap name. Name of the ConfigMap that contains additional CA certificates required for proxying HTTPS connections.
clusterproxy.trustedCACertsobject{}Trusted CA certificates to include in the ConfigMap Only PEM formatted certificates are supported. Multiple certificates can be concatenated.
config_allowed_registries.allowedRegistriesForImportlistemptylimits the container image registries that normal users may import images from.
config_allowed_registries.allowedRegistriesForImport[0]object{"domainName":"quay.io","insecure":false}Domainname of the registry
config_allowed_registries.allowedRegistriesForImport[0].insecureboolfalseValidate the vertificate of not
config_allowed_registries.enabledboolfalseEnable configuration to limit the registries
config_allowed_registries.registry_sources.allowed_registrieslistemptyWhen pulling or pushing images, the container runtime searches the registries listed here
config_allowed_registries.sampleOperatorRegistrystringregistry.redhat.ioWhen Registry are limited the Samples Operator requires an additional configuration in order to know from where it can fetch its images
console.console_bannersobject''Configure banners for the WebUI. This can either be: topbanner or bottombanner
console.console_banners.bottombannerobject''Configure BOTTOM-banner
console.console_banners.bottombanner.backgroundcolorstring''Define the background colour for the banner
console.console_banners.bottombanner.colorstring''Select the font colour in the banner
console.console_banners.bottombanner.enabledboolfalseEnable bannler configuration
console.console_banners.bottombanner.linkobject''Add a link to the banner with href and a text
console.console_banners.bottombanner.locationstring''Define the location for the banner. Either BannerTop or BannerBottom
console.console_banners.bottombanner.textstring''Set a text that shall be displayed.
console.console_banners.topbannerobject''Configure TOP-banner
console.console_banners.topbanner.backgroundcolorstring''Define the background colour for the banner
console.console_banners.topbanner.colorstring''Select the font colour in the banner
console.console_banners.topbanner.enabledboolfalseEnable bannler configuration
console.console_banners.topbanner.linkobject''Add a link to the banner with href and a text
console.console_banners.topbanner.locationstring''Define the location for the banner. Either BannerTop or BannerBottom
console.console_banners.topbanner.textstring''Set a text that shall be displayed.
console.console_links.userlink.applicationMenuobject{"imageURL":"https://raw.githubusercontent.com/tjungbauer/helm-charts/gh-pages/images/configuration.png","section":"My Subscriptions"}In case of ApplicationMenu a section and a URL for the icon can be provided.
console.console_links.userlink.enabledboolfalseEnable ConsoleLink ?
console.console_links.userlink.hrefstring''Target of the link
console.console_links.userlink.locationstring''Location of the ConsoleLink - Create a link for a user in the appropriate location. This is the menu when you click on your name. An additional link will be added there. UserMenu NamespaceDashboard ApplicationMenu HelpMenu
console.console_links.userlink.namespaceslist["namespace1","namespace2"]In case of NamespaceDashboard it is possible to define a list of specific namespace.
console.console_links.userlink.textstring''Text that should be shown as the link.
console.yamlsamples.secret-yaml-sampleobject''Key for the ConsoleYAMLSample. Multiple keys can be defined.
console.yamlsamples.secret-yaml-sample.descrstring''Description for the ConsoleYAMLSample
console.yamlsamples.secret-yaml-sample.enabledboolfalseEnable this ConsoleYAMLSample
console.yamlsamples.secret-yaml-sample.targetresourceobject{"apiversion":"v1","kind":"secret"}Define the target resource and the api version.
console.yamlsamples.secret-yaml-sample.titlestring''Title for the ConsoleYAMLSample
console.yamlsamples.secret-yaml-sample.yamlDefstring''The actual example as it will be shown in the UI. This is gives as a valid YAML and will be bypassed to the template.
idp.customloginpageobject''Besides IDP configuration, custom Login pages can be defined here as well. This requires secrets with the actual HTML.
idp.customloginpage.enabledboolfalseEnable custom Login pages?
idp.customloginpage.secretnamestring''Name of the secret for the custom Login page.
idp.customloginpage.secretname_providerpagestring''Name of the secret for the custom provider page (The page where you select the oauth providers)
idp.enabledboolfalseEnable IDP configuration
idp.providers.enabledboolfalseEnable IDP configuration. You can still disable them individually.
idp.providers.googlelist''Use GOOGLE provider.
idp.providers.google[0]objectssoProvide a name for that provider. This will be visible on the login page.
idp.providers.google[0].clientIDstring''Client ID for the Google OAuth2.0
idp.providers.google[0].enabledboolfalseEnable htpasswd?
idp.providers.google[0].hostedDomainstringmy.comhosted domain that specifies the Google Apps domain that users must belong to in order to log in
idp.providers.google[0].mappingMethodstringclaimMapping method for the Google provider.
idp.providers.google[0].secretnamestringgoogle-secretThe name of the secret that holds the encrypted google information
idp.providers.htpasswdlist''Use HTPASSWD provider.
idp.providers.htpasswd[0]objecthtpasswdProvide a name for that provider. This will be visible on the login page.
idp.providers.htpasswd[0].enabledboolfalseEnable htpasswd?
idp.providers.htpasswd[0].secretnamestringhtpasswd-secretThe name of the secret that holds the encrypted htpasswd information
idp.providers.ldaplist''User LDAP provider.
idp.providers.ldap[0]objectldapProvide a name for that provider. This will be visible on the login page.
idp.providers.ldap[0].attributesobject{"email":["mail"],"id":["dn"],"name":["cn"]}List of attributes to use as the identity. First non-empty attribute is used. At least one attribute is required. If none of the listed attribute have a value, authentication fails.
idp.providers.ldap[0].binddnstring"your-bindDN"BindDN for the LDAP connection
idp.providers.ldap[0].cmnamestringca-config-mapName of the ConfigMap the stores the certificate
idp.providers.ldap[0].enabledboolfalseEnable htpasswd?
idp.providers.ldap[0].insecurebooltrueIs the connection to the LDAP server insecure or not?
idp.providers.ldap[0].preferredusernamelist''List of attributes to use as the preferred user name when provisioning a user for this identity. First non-empty attribute is used
idp.providers.ldap[0].secretnamestring"ldap-secret"Name of the secret that stores the bindPassword @default: ldap-secret
idp.providers.ldap[0].urlstring''URL to the LDAP server
monitoring.alertmanagerMain.disable_local_alertmanagerboolfalseDisable cluster Alertmanager.
monitoring.alertmanagerMain.nodeSelectorobjectemptynodeSelector for Alertmanager Pods
monitoring.alertmanagerMain.resourcesobjectemptyResources set for the Alertmanager. Set these with care. If nothing is set, then no limits or requests will be configured.
monitoring.alertmanagerMain.secretslistemptyAdd a list of secrets that are mounted to Alertmanager. These can have credentials or certificates to authenticat against the alert receiver
monitoring.alertmanagerMain.storage.classstringgp2-csiStorageClass for persistent volume
monitoring.alertmanagerMain.storage.sizestring40GiSize for the storage
monitoring.alertmanagerMain.tolerationslistemptyTolerations for Alertmanager Pods. The configuration is handed over as YAML to the template.
monitoring.enableUserWorkloadboolfalseEnable user workload monitoring
monitoring.enabled

Deploy generic-cluster-config with OpenTenant

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