Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions pkg/config/cos.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
17 changes: 0 additions & 17 deletions pkg/config/templates/rancherd-10-harvester.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,6 @@ resources:
release: rancher-monitoring
name: rancher-monitoring-operator
namespace: cattle-monitoring-system
- apiVersion: helm.cattle.io/v1

@w13915984028 w13915984028 May 8, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need a similar helmchartconfig to enable the log of traefik

apiVersion: helm.cattle.io/v1
kind: HelmChartConfig
metadata:
  name: rke2-traefik
  namespace: kube-system
spec:
  valuesContent: |-
    logs:
      access:
        enabled: true
        format: json
    # Optional: Additional global logs
    log:
      level: INFO

it logs like

{"ClientAddr":"192.168.122.1:47986","ClientHost":"192.168.122.1","ClientPort":"47986","ClientUsername":"-","DownstreamContentSize":189,"DownstreamStatus":200,"Duration":2511685,"OriginContentSize":189,"OriginDuration":2435420,"OriginStatus":200,"Overhead":76265,"RequestAddr":"192.168.122.131","RequestContentSize":0,"RequestCount":66,"RequestHost":"192.168.122.131","RequestMethod":"GET","RequestPath":"/v1/harvester/kubevirt.io.virtualmachineinstancemigrations?pagesize=100000\u0026exclude=metadata.managedFields","RequestPort":"-","RequestProtocol":"HTTP/2.0","RequestScheme":"https","RetryAttempts":0,"RouterName":"websecure-cattle-system-rancher-expose@kubernetes","ServiceAddr":"10.52.0.12:80","ServiceName":"cattle-system-rancher-80@kubernetes","ServiceURL":"http://10.52.0.12:80","StartLocal":"2026-05-08T09:33:17.129831151Z","StartUTC":"2026-05-08T09:33:17.129831151Z","TLSCipher":"TLS_AES_128_GCM_SHA256","TLSVersion":"1.3","entryPointName":"websecure","level":"info","msg":"","time":"2026-05-08T09:33:17Z"}

this is available on nginx by default

traefik doesn't log them without this helmchartconfig

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i can include it in another PR and also add it in the upgrade path too

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:
Expand Down
1 change: 1 addition & 0 deletions pkg/config/templates/rke2-99-traefik.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ingress-controller: traefik
Loading