apiVersion: helm.cattle.io/v1
kind: HelmChartConfig
metadata:
name: traefik
namespace: kube-system
spec:
valuesContent: |-
additionalArguments:
- --entrypoints.web.http.redirections.entryPoint.to=:443
- --entrypoints.web.http.redirections.entryPoint.scheme=https
- --providers.file.directory=/file
- --certificatesresolvers.le.acme.email=mail@mail.com
- --certificatesresolvers.le.acme.tlschallenge=true
- --certificatesresolvers.le.acme.storage=/le/acme.json
- --certificatesresolvers.le.acme.caserver=https://acme-v02.api.letsencrypt.org/directory
volumes:
- name: config-file
mountPath: file/
type: configMap
persistence:
enabled: true
name: le
accessMode: ReadWriteOnce
size: 128Mi
path: /le
securityContext:
readOnlyRootFilesystem: false
runAsGroup: 0
runAsUser: 0
runAsNonRoot: false
apiVersion: v1
kind: ConfigMap
metadata:
name: config-file
namespace: kube-system
data:
www.yaml: |-
http:
routers:
www-router:
entryPoints:
- websecure
service: www-service
tls:
certResolver: le
rule: Host(`www.www.com`) && PathPrefix(`/`)
services:
www-service:
loadBalancer:
servers:
- url: http://192.168.0.2.loc
passHostHeader: false
there is a problem in creating /le/acme.json
is such a configuration that the problem is solved. but the fact is that this is not an official decision and what it threatens or is incorrect is that root rights are used here
here is an example https://github.com/traefik/traefik-helm-chart/blob/master/traefik/values.yaml of how traefik responds to solve the problem
but it doesn 't work for me , and my requests to the git are removed by a bot that I configure incorrectly
apiVersion: helm.cattle.io/v1
kind: HelmChartConfig
metadata:
name: traefik
namespace: kube-system
spec:
valuesContent: |-
additionalArguments:
- --log.level=ERROR
- --accesslog=false
- --global.checknewversion
- --global.sendAnonymousUsage=false
- --entrypoints.web.http.redirections.entryPoint.to=:443
- --entrypoints.web.http.redirections.entryPoint.scheme=https
- --providers.file.directory=/file
- --certificatesresolvers.le.acme.email=mail@mail.com
- --certificatesresolvers.le.acme.storage=/data/acme.json
- --certificatesresolvers.le.acme.tlschallenge=true
- --certificatesresolvers.le.acme.httpchallenge=true
- --certificatesresolvers.le.acme.httpchallenge.entrypoint=web
- --certificatesresolvers.le.acme.caserver=https://acme-staging-v02.api.letsencrypt.org/directory
persistence:
enabled: true
accessMode: ReadWriteOnce
size: 128Mi
path: /data
podSecurityContext:
fsGroup: 65532
deployment:
initContainers:
- name: volume-permissions
image: busybox:latest
command: ["sh", "-c", "touch /data/acme.json; chmod -v 600 /data/acme.json"]
securityContext
runAsNonRoot: true
runAsGroup: 65532
runAsUser: 65532
volumeMounts:
- name: data