diff --git a/pkg/config/cos.go b/pkg/config/cos.go index e46f77bf5..cd85b2238 100644 --- a/pkg/config/cos.go +++ b/pkg/config/cos.go @@ -465,6 +465,20 @@ func initRancherdStage(config *HarvesterConfig, stage *yipSchema.Stage) error { }, ) + ingressConfig, err := render("rke2-99-traefik.yaml", config) + if err != nil { + return err + } + + stage.Files = append(stage.Files, + yipSchema.File{ + Path: "/etc/rancher/rke2/config.yaml.d/99-traefik.yaml", + Content: ingressConfig, + Permissions: 0600, + Owner: 0, + Group: 0, + }, + ) return nil } diff --git a/pkg/config/templates/rancherd-10-harvester.yaml b/pkg/config/templates/rancherd-10-harvester.yaml index f31b0f2df..343e80ea7 100644 --- a/pkg/config/templates/rancherd-10-harvester.yaml +++ b/pkg/config/templates/rancherd-10-harvester.yaml @@ -24,23 +24,6 @@ resources: release: rancher-monitoring name: rancher-monitoring-operator namespace: cattle-monitoring-system -- apiVersion: helm.cattle.io/v1 - kind: HelmChartConfig - metadata: - name: rke2-ingress-nginx - namespace: kube-system - spec: - valuesContent: |- - controller: - config: - proxy-body-size: "0" - proxy-request-buffering: "off" - admissionWebhooks: - port: 8444 - publishService: - pathOverride: kube-system/ingress-expose - extraArgs: - default-ssl-certificate: cattle-system/tls-rancher-internal - apiVersion: v1 kind: Secret metadata: diff --git a/pkg/config/templates/rke2-99-traefik.yaml b/pkg/config/templates/rke2-99-traefik.yaml new file mode 100644 index 000000000..8eadfe3b4 --- /dev/null +++ b/pkg/config/templates/rke2-99-traefik.yaml @@ -0,0 +1 @@ +ingress-controller: traefik \ No newline at end of file