rancher / windows

Rancher Windows Team project repository.
Apache License 2.0
11 stars 6 forks source link

Developer Terraform Does Not Support Large Charts via Fleet #233

Open HarrisonWAffel opened 6 months ago

HarrisonWAffel commented 6 months ago

The development Terraform within this repo supports defining fleet bundles to be installed alongside RKE2 clusters. Unfortunately, fleet bundles have limitations on the size of the charts that can be used. For instance, the Rancher monitoring or Rancher logging charts cannot be set up in the current Terraform, the following error is seen after running terraform apply

│ Error: API response status: Failure
│
│   with module.apps["monitoring"].kubernetes_manifest.bundle,
│   on ../internal/rancher/fleet/bundle/main.tf line 66, in resource "kubernetes_manifest" "bundle":
│   66: resource "kubernetes_manifest" "bundle" {
│
│ rpc error: code = ResourceExhausted desc = trying to send message larger than max (2374120 vs. 2097152)

We need to find a way to support larger charts within the Terraform before we can provide any sample configurations for automatically deploying a windows cluster with monitoring or logging installed.

HarrisonWAffel commented 6 months ago

Looked into this a bit more with @aiyengar2 and found that the above error can be resolved by using the encoding type of base64+gz on the fleet bundle and base64gzip'ing the content when templating the bundle. Additionally, I added a dummy variable to the app within the example tfvars file I am using.

Unfortunately, after applying these changes a new issue is seen in the Rancher fleet UI. The monitoring bundle errors out with the following message:

ErrApplied(1) [Cluster fleet-default/haffel-gz-test: parse error at (haffel-gz-test-monitoring/templates/haffel-gz-test-monitoring.yaml:290): undefined variable "$labels"]

This may be related to bundle.yaml placing the contents of the chart in the templates/ directory