generic-cluster-config
by tjungbauer
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:
| Repository | Name | Version |
|---|---|---|
| https://charts.stderr.at/ | tpl | ~1.0.31 |
None
Maintainers
| Name | Url | |
|---|---|---|
| tjungbauer | [email protected] | https://blog.stderr.at/ |
Sources
Source:
- https://github.com/tjungbauer/helm-charts
- https://charts.stderr.at/
- https://github.com/tjungbauer/openshift-clusterconfig-gitops
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
| Key | Type | Default | Description |
|---|---|---|---|
| apiserver.audit.profile | string | Default | Set to Default, WriteRequestBodies, AllRequestBodies, or None. The default profile is Default |
| apiserver.custom_cert.cert_names | list | N/A | List of names the certificate is valid |
| apiserver.custom_cert.enabled | bool | false | custom certificate enabled? |
| apiserver.custom_cert.secretname | string | api-certificate | Name of the secret that holds the certificate |
| apiserver.enabled | bool | false | Enable APIServer configuration in general |
| apiserver.etcd_encryption.enabled | bool | false | Enable ETCD encryption in OpenShift |
| apiserver.etcd_encryption.encryption_type | string | aesgcm | Type 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.namespace | string | "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.serviceAccount | object | {"create":true,"name":"etcd-encryption-checker"} | The service account that is used to verify the status of the encryption |
| apiserver.etcd_encryption.ttlSecondsAfterFinished | int | 600 | Seconds to retain the finished etcd-encryption check Job before Kubernetes deletes it |
| clusterproxy.additionalAnnotations | object | {} | Additional labels to add as key: value pairs. |
| clusterproxy.additionalLabels | object | {} | Additional labels to add to as key: value pairs. |
| clusterproxy.enabled | bool | false | Enable Cluster Proxy configuration |
| clusterproxy.http_proxy | string | '' | set clusterwide HTTP Proxy Must start with http:// or https:// For example: http://myproxy:3128 DO NOT ADD USERNAME AND PASSWORD HERE |
| clusterproxy.https_proxy | string | '' | 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_cabundle | bool | false | Inject trusted CA bundle into the cluster proxy adds the label: config.openshift.io/inject-trusted-cabundle: "true" |
| clusterproxy.no_proxy | list | [] | A comma-separated list of destination domain names, domains, IP addresses or other network CIDRs to exclude proxying. |
| clusterproxy.trustedCA | string | '' | set clusterwide Trusted CA ConfigMap name. Name of the ConfigMap that contains additional CA certificates required for proxying HTTPS connections. |
| clusterproxy.trustedCACerts | object | {} | Trusted CA certificates to include in the ConfigMap Only PEM formatted certificates are supported. Multiple certificates can be concatenated. |
| config_allowed_registries.allowedRegistriesForImport | list | empty | limits 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].insecure | bool | false | Validate the vertificate of not |
| config_allowed_registries.enabled | bool | false | Enable configuration to limit the registries |
| config_allowed_registries.registry_sources.allowed_registries | list | empty | When pulling or pushing images, the container runtime searches the registries listed here |
| config_allowed_registries.sampleOperatorRegistry | string | registry.redhat.io | When Registry are limited the Samples Operator requires an additional configuration in order to know from where it can fetch its images |
| console.console_banners | object | '' | Configure banners for the WebUI. This can either be: topbanner or bottombanner |
| console.console_banners.bottombanner | object | '' | Configure BOTTOM-banner |
| console.console_banners.bottombanner.backgroundcolor | string | '' | Define the background colour for the banner |
| console.console_banners.bottombanner.color | string | '' | Select the font colour in the banner |
| console.console_banners.bottombanner.enabled | bool | false | Enable bannler configuration |
| console.console_banners.bottombanner.link | object | '' | Add a link to the banner with href and a text |
| console.console_banners.bottombanner.location | string | '' | Define the location for the banner. Either BannerTop or BannerBottom |
| console.console_banners.bottombanner.text | string | '' | Set a text that shall be displayed. |
| console.console_banners.topbanner | object | '' | Configure TOP-banner |
| console.console_banners.topbanner.backgroundcolor | string | '' | Define the background colour for the banner |
| console.console_banners.topbanner.color | string | '' | Select the font colour in the banner |
| console.console_banners.topbanner.enabled | bool | false | Enable bannler configuration |
| console.console_banners.topbanner.link | object | '' | Add a link to the banner with href and a text |
| console.console_banners.topbanner.location | string | '' | Define the location for the banner. Either BannerTop or BannerBottom |
| console.console_banners.topbanner.text | string | '' | Set a text that shall be displayed. |
| console.console_links.userlink.applicationMenu | object | {"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.enabled | bool | false | Enable ConsoleLink ? |
| console.console_links.userlink.href | string | '' | Target of the link |
| console.console_links.userlink.location | string | '' | 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.namespaces | list | ["namespace1","namespace2"] | In case of NamespaceDashboard it is possible to define a list of specific namespace. |
| console.console_links.userlink.text | string | '' | Text that should be shown as the link. |
| console.yamlsamples.secret-yaml-sample | object | '' | Key for the ConsoleYAMLSample. Multiple keys can be defined. |
| console.yamlsamples.secret-yaml-sample.descr | string | '' | Description for the ConsoleYAMLSample |
| console.yamlsamples.secret-yaml-sample.enabled | bool | false | Enable this ConsoleYAMLSample |
| console.yamlsamples.secret-yaml-sample.targetresource | object | {"apiversion":"v1","kind":"secret"} | Define the target resource and the api version. |
| console.yamlsamples.secret-yaml-sample.title | string | '' | Title for the ConsoleYAMLSample |
| console.yamlsamples.secret-yaml-sample.yamlDef | string | '' | 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.customloginpage | object | '' | Besides IDP configuration, custom Login pages can be defined here as well. This requires secrets with the actual HTML. |
| idp.customloginpage.enabled | bool | false | Enable custom Login pages? |
| idp.customloginpage.secretname | string | '' | Name of the secret for the custom Login page. |
| idp.customloginpage.secretname_providerpage | string | '' | Name of the secret for the custom provider page (The page where you select the oauth providers) |
| idp.enabled | bool | false | Enable IDP configuration |
| idp.providers.enabled | bool | false | Enable IDP configuration. You can still disable them individually. |
| idp.providers.google | list | '' | Use GOOGLE provider. |
| idp.providers.google[0] | object | sso | Provide a name for that provider. This will be visible on the login page. |
| idp.providers.google[0].clientID | string | '' | Client ID for the Google OAuth2.0 |
| idp.providers.google[0].enabled | bool | false | Enable htpasswd? |
| idp.providers.google[0].hostedDomain | string | my.com | hosted domain that specifies the Google Apps domain that users must belong to in order to log in |
| idp.providers.google[0].mappingMethod | string | claim | Mapping method for the Google provider. |
| idp.providers.google[0].secretname | string | google-secret | The name of the secret that holds the encrypted google information |
| idp.providers.htpasswd | list | '' | Use HTPASSWD provider. |
| idp.providers.htpasswd[0] | object | htpasswd | Provide a name for that provider. This will be visible on the login page. |
| idp.providers.htpasswd[0].enabled | bool | false | Enable htpasswd? |
| idp.providers.htpasswd[0].secretname | string | htpasswd-secret | The name of the secret that holds the encrypted htpasswd information |
| idp.providers.ldap | list | '' | User LDAP provider. |
| idp.providers.ldap[0] | object | ldap | Provide a name for that provider. This will be visible on the login page. |
| idp.providers.ldap[0].attributes | object | {"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].binddn | string | "your-bindDN" | BindDN for the LDAP connection |
| idp.providers.ldap[0].cmname | string | ca-config-map | Name of the ConfigMap the stores the certificate |
| idp.providers.ldap[0].enabled | bool | false | Enable htpasswd? |
| idp.providers.ldap[0].insecure | bool | true | Is the connection to the LDAP server insecure or not? |
| idp.providers.ldap[0].preferredusername | list | '' | 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].secretname | string | "ldap-secret" | Name of the secret that stores the bindPassword @default: ldap-secret |
| idp.providers.ldap[0].url | string | '' | URL to the LDAP server |
| monitoring.alertmanagerMain.disable_local_alertmanager | bool | false | Disable cluster Alertmanager. |
| monitoring.alertmanagerMain.nodeSelector | object | empty | nodeSelector for Alertmanager Pods |
| monitoring.alertmanagerMain.resources | object | empty | Resources set for the Alertmanager. Set these with care. If nothing is set, then no limits or requests will be configured. |
| monitoring.alertmanagerMain.secrets | list | empty | Add a list of secrets that are mounted to Alertmanager. These can have credentials or certificates to authenticat against the alert receiver |
| monitoring.alertmanagerMain.storage.class | string | gp2-csi | StorageClass for persistent volume |
| monitoring.alertmanagerMain.storage.size | string | 40Gi | Size for the storage |
| monitoring.alertmanagerMain.tolerations | list | empty | Tolerations for Alertmanager Pods. The configuration is handed over as YAML to the template. |
| monitoring.enableUserWorkload | bool | false | Enable 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.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartgeneric-cluster-config is pinned at v1.0.68 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- 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