rancher ok

This commit is contained in:
Karim Naufal 2022-05-04 21:39:58 +02:00
parent 725eb334a9
commit 75a817ea3b
No known key found for this signature in database
GPG Key ID: 9CB4A7C28C139CA5
4 changed files with 30 additions and 7 deletions

View File

@ -229,6 +229,29 @@ To use Kube-Hetzner on Terraform cloud, use as a Terraform module as mentioned a
</details>
<details>
<summary>Configure add-ons with HelmChartConfig</summary>
For instance, to customize the Rancher install, if you choose to enable it, you can create and apply the following `HelmChartConfig`:
```yaml
apiVersion: helm.cattle.io/v1
kind: HelmChartConfig
metadata:
name: rancher
namespace: kube-system
spec:
valuesContent: |-
**values.yaml content you want to customize**
```
The helm options for Rancher can be seen here <https://github.com/rancher/rancher/blob/release/v2.6/chart/values.yaml>.
Same goes for all add-ons, like Longhorn, Cert-manager, and Traefik.
</details>
## Debugging
First and foremost, it depends, but it's always good to have a quick look into Hetzner quickly without logging in to the UI. That is where the `hcloud` cli comes in.

View File

@ -170,7 +170,7 @@ resource "null_resource" "kustomization" {
destination = "/var/post_install/cert-manager.yaml"
}
# Upload the rancher config
# Upload the Rancher config
provisioner "file" {
content = templatefile(
"${path.module}/templates/rancher.yaml.tpl",

View File

@ -18,7 +18,7 @@ private_key = "/home/username/.ssh/id_ed25519"
network_region = "eu-central" # change to `us-east` if location is ash
# For the control planes, at least three nodes are the minimum for HA. Otherwise, you need to turn off the automatic upgrade (see ReadMe).
# As per rancher docs, it must always be an odd number, never even! See https://rancher.com/docs/k3s/latest/en/installation/ha-embedded/
# As per Rancher docs, it must always be an odd number, never even! See https://rancher.com/docs/k3s/latest/en/installation/ha-embedded/
# For instance, one is ok (non-HA), two is not ok, and three is ok (becomes HA). It does not matter if they are in the same nodepool or not! So they can be in different locations and of various types.
# Of course, you can choose any number of nodepools you want, with the location you want. The only constraint on the location is that you need to stay in the same network region, Europe, or the US.
@ -187,19 +187,19 @@ load_balancer_location = "fsn1"
# You can enable cert-manager (installed by Helm behind the scenes) with the following flag, the default is "false".
# enable_cert_manager = true
# You can enable rancher (installed by Helm behind the scenes) with the following flag, the default is "false".
# When rancher is enabled, it automatically installs cert-manager too, and it uses rancher's own certificates.
# You can enable Rancher (installed by Helm behind the scenes) with the following flag, the default is "false".
# When Rancher is enabled, it automatically installs cert-manager too, and it uses rancher's own certificates.
# As for the number of replicas, it is set to the numbe of control plane nodes.
# You can customized all of the above by creating and applying a HelmChartConfig to pass the helm chart values of your choice.
# See https://rancher.com/docs/k3s/latest/en/helm/
# and https://rancher.com/docs/rancher/v2.6/en/installation/install-rancher-on-k8s/chart-options/
# enable_rancher = true
# When rancher is deployed, by default is uses the "stable" channel. But this can be customized.
# When Rancher is deployed, by default is uses the "stable" channel. But this can be customized.
# The allowed values are "stable", "latest", and "alpha".
# rancher_install_channel = "latest"
# Set your rancher hostname, the default is "rancher.example.com".
# Set your Rancher hostname, the default is "rancher.example.com".
# It is a required value when using rancher, but up to you to point the DNS to it or not.
# You can also not point the DNS, and just port-forward locally via kubectl to get access to the dashboard.
# rancher_hostname = "rancher.xyz.dev"

View File

@ -195,7 +195,7 @@ variable "rancher_install_channel" {
validation {
condition = contains(["stable", "latest", "alpha"], var.rancher_install_channel)
error_message = "The allowed values for the rancher install channel are stable, latest, or alpha."
error_message = "The allowed values for the Rancher install channel are stable, latest, or alpha."
}
}