Use helm template values file
This commit is contained in:
parent
b3df6499f3
commit
a722a1d783
2 changed files with 64 additions and 40 deletions
|
|
@ -84,45 +84,7 @@
|
||||||
name: traefik
|
name: traefik
|
||||||
chart_ref: traefik/traefik
|
chart_ref: traefik/traefik
|
||||||
release_namespace: "{{ traefik_namespace }}"
|
release_namespace: "{{ traefik_namespace }}"
|
||||||
values:
|
values: "{{ lookup('template', 'traefik-helm-value.yaml.j2') | from_yaml }}"
|
||||||
image:
|
|
||||||
tag: "{{ traefik_version }}"
|
|
||||||
additionalArguments:
|
|
||||||
- --configFile=/etc/traefik/traefik.yaml
|
|
||||||
# podSecurityPolicy:
|
|
||||||
# enabled: true
|
|
||||||
service:
|
|
||||||
enabled: false
|
|
||||||
ingressRoute:
|
|
||||||
dashboard:
|
|
||||||
enabled: false
|
|
||||||
ingressClass:
|
|
||||||
enabled: true
|
|
||||||
isDefaultClass: true
|
|
||||||
# ports:
|
|
||||||
# web:
|
|
||||||
# redirectTo: websecure
|
|
||||||
# hostPort: 80
|
|
||||||
# websecure:
|
|
||||||
# hostPort: 443
|
|
||||||
# tls:
|
|
||||||
# enabled: true
|
|
||||||
# options: default
|
|
||||||
volumes:
|
|
||||||
- mountPath: /etc/traefik
|
|
||||||
name: traefik-conf
|
|
||||||
type: configMap
|
|
||||||
- mountPath: /etc/traefik/file
|
|
||||||
name: traefik-files
|
|
||||||
type: configMap
|
|
||||||
- mountPath: /etc/traefik/basic-auth
|
|
||||||
name: basic-auth
|
|
||||||
type: secret
|
|
||||||
deployment:
|
|
||||||
replicas: 1
|
|
||||||
podAnnotations:
|
|
||||||
prometheus.io/port: '9000'
|
|
||||||
prometheus.io/scrape: 'true'
|
|
||||||
|
|
||||||
- name: Install traefik configuration
|
- name: Install traefik configuration
|
||||||
k8s:
|
k8s:
|
||||||
|
|
@ -139,6 +101,6 @@
|
||||||
- traefik-files.yml.j2
|
- traefik-files.yml.j2
|
||||||
# - traefik-sa.yml.j2
|
# - traefik-sa.yml.j2
|
||||||
- traefik-ingressroute.yml.j2
|
- traefik-ingressroute.yml.j2
|
||||||
- traefik-svc.yml.j2
|
# - traefik-svc.yml.j2
|
||||||
|
|
||||||
tags: traefik
|
tags: traefik
|
||||||
|
|
|
||||||
62
templates/traefik-helm-value.yaml.j2
Normal file
62
templates/traefik-helm-value.yaml.j2
Normal file
|
|
@ -0,0 +1,62 @@
|
||||||
|
image:
|
||||||
|
tag: "{{ traefik_version }}"
|
||||||
|
additionalArguments:
|
||||||
|
- --configFile=/etc/traefik/traefik.yaml
|
||||||
|
#podSecurityPolicy:
|
||||||
|
# enabled: true
|
||||||
|
service:
|
||||||
|
{% if traefik_external_ips is defined %}
|
||||||
|
type: ClusterIP
|
||||||
|
externalIPs:
|
||||||
|
{% for external_ip in traefik_external_ips %}
|
||||||
|
- {{ external_ip }}
|
||||||
|
{% endfor %}
|
||||||
|
{% elseif %}
|
||||||
|
type: LoadBalancer
|
||||||
|
{% endif %}
|
||||||
|
ingressRoute:
|
||||||
|
dashboard:
|
||||||
|
enabled: false
|
||||||
|
podDisruptionBudget:
|
||||||
|
enabled: true
|
||||||
|
minAvailable: 1
|
||||||
|
ingressClass:
|
||||||
|
enabled: true
|
||||||
|
isDefaultClass: true
|
||||||
|
autoscaling:
|
||||||
|
enabled: true
|
||||||
|
minReplicas: 1
|
||||||
|
maxReplicas: 10
|
||||||
|
metrics:
|
||||||
|
- type: Resource
|
||||||
|
resource:
|
||||||
|
name: cpu
|
||||||
|
targetAverageUtilization: 60
|
||||||
|
- type: Resource
|
||||||
|
resource:
|
||||||
|
name: memory
|
||||||
|
targetAverageUtilization: 60
|
||||||
|
#ports:
|
||||||
|
# web:
|
||||||
|
# redirectTo: websecure
|
||||||
|
# hostPort: 80
|
||||||
|
# websecure:
|
||||||
|
# hostPort: 443
|
||||||
|
# tls:
|
||||||
|
# enabled: true
|
||||||
|
# options: default
|
||||||
|
volumes:
|
||||||
|
- mountPath: /etc/traefik
|
||||||
|
name: traefik-conf
|
||||||
|
type: configMap
|
||||||
|
- mountPath: /etc/traefik/file
|
||||||
|
name: traefik-files
|
||||||
|
type: configMap
|
||||||
|
- mountPath: /etc/traefik/basic-auth
|
||||||
|
name: basic-auth
|
||||||
|
type: secret
|
||||||
|
deployment:
|
||||||
|
replicas: 1
|
||||||
|
podAnnotations:
|
||||||
|
prometheus.io/port: '9000'
|
||||||
|
prometheus.io/scrape: 'true'
|
||||||
Loading…
Add table
Add a link
Reference in a new issue