According to this document it is possible to override some settings for traefik deployment.
I have created :/var/lib/rancher/k3s/server/manifests/traefik-override.yaml
apiVersion: helm.cattle.io/v1
kind: HelmChartConfig
metadata:
name: traefik
namespace: kube-system
spec:
valuesContent: |-
additionalArguments:
- "--providers.file.filename=/config/traefik-config.toml"
- "--entrypoints.mongodb=true"
ports:
mongodb:
port: 27017
protocol: TCP
persistence:
enabled: true
name: data
accessMode: ReadWriteOnce
size: 128Mi
storageClass: managed-nfs-storage
path: /data
Restarted k3s.service
“persistence” causes deployment problems
pod/traefik-554bcf98d6-nz64b 0/1 ContainerCreating 0 9m1s
pvc and pv were created but the deployment gets stuck
kubectl logs pod/helm-install-traefik--1-vrkwn -n kube-system
+ helm_v3 upgrade --set-string global.systemDefaultRegistry= traefik https://10.43.0.1:443/static/charts/traefik-10.3.001.tgz --values /config/values-01_HelmChart.yaml --values /config/values-10_HelmChartConfig.yaml
Error: failed to parse /config/values-10_HelmChartConfig.yaml: error converting YAML to JSON: yaml: line 14: could not find expected ':'
Without ‘persistence’ it works (entrypoints and ports).
And I want to use a dynamic treafik configuration with ConfigMap and it looks like it doesn’t work as well.
Are there any limitations for k3s/traefik installation?
UPDATE:
It is definitely a bug.
Uninstalled k3s/traefik, installed traefik helm chart with override-values and it works with no issues.