Traefik-feat: go templating for add acme optional volume for persistence
This commit is contained in:
parent
02a16d1c0f
commit
09fc381f59
@ -24,6 +24,8 @@
|
||||
- insecure_skip = false # Enable InsecureSkipVerify param.
|
||||
- refresh_interval = 10s # Interval to refresh traefik rules.toml from rancher-metadata.
|
||||
|
||||
NOTE: If you enable acme support, additional sidekick will be created for acme persistance.
|
||||
|
||||
### Service configuration labels:
|
||||
|
||||
Traefik labels has to be added in your services, in order to get included in traefik dynamic config.
|
||||
|
@ -9,6 +9,9 @@ traefik:
|
||||
io.rancher.scheduler.affinity:host_label: ${host_label}
|
||||
io.rancher.scheduler.affinity:container_label_ne: io.rancher.stack_service.name=$${stack_name}/$${service_name}
|
||||
io.rancher.sidekicks: traefik-conf
|
||||
{{- if eq .Values.acme_enable "true" -}}
|
||||
,traefik-acme
|
||||
{{- end}}
|
||||
io.rancher.container.hostname_override: container_name
|
||||
tty: true
|
||||
log_opt: {}
|
||||
@ -18,13 +21,18 @@ traefik:
|
||||
- TRAEFIK_HTTP_PORT=${http_port}
|
||||
- TRAEFIK_HTTPS_PORT=${https_port}
|
||||
- TRAEFIK_HTTPS_ENABLE=${https_enable}
|
||||
{{- if eq .Values.acme_enable "true"}}
|
||||
- TRAEFIK_ACME_ENABLE=${acme_enable}
|
||||
- TRAEFIK_ACME_EMAIL=${acme_email}
|
||||
- TRAEFIK_ACME_ONDEMAND=${acme_ondemand}
|
||||
- TRAEFIK_ACME_ONHOSTRULE=${acme_onhostrule}
|
||||
{{- end}}
|
||||
- TRAEFIK_INSECURE_SKIP=${insecure_skip}
|
||||
volumes_from:
|
||||
- traefik-conf
|
||||
{{- if eq .Values.acme_enable "true"}}
|
||||
- traefik-acme
|
||||
{{- end}}
|
||||
traefik-conf:
|
||||
log_driver: ''
|
||||
labels:
|
||||
@ -38,3 +46,19 @@ traefik-conf:
|
||||
net: none
|
||||
volumes:
|
||||
- /opt/tools
|
||||
{{- if eq .Values.acme_enable "true"}}
|
||||
traefik-acme:
|
||||
net: none
|
||||
labels:
|
||||
io.rancher.scheduler.affinity:container_label_soft_ne: io.rancher.stack_service.name=$${stack_name}/$${service_name}
|
||||
io.rancher.container.hostname_override: container_name
|
||||
io.rancher.container.start_once: true
|
||||
environment:
|
||||
- SERVICE_UID=10001
|
||||
- SERVICE_GID=10001
|
||||
- SERVICE_VOLUME=/opt/traefik/acme
|
||||
volumes:
|
||||
- /opt/traefik/acme
|
||||
volume_driver: ${VOLUME_DRIVER}
|
||||
image: rawmind/alpine-volume:0.0.2-1
|
||||
{{- end}}
|
Loading…
x
Reference in New Issue
Block a user