Update traefik deployment
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
a102ba09a7
commit
382cc69b2c
3 changed files with 31 additions and 1 deletions
|
|
@ -141,6 +141,19 @@
|
|||
when:
|
||||
- traefik_ondemand is defined
|
||||
|
||||
- name: ReInstall traefik-hub certificate if already know
|
||||
kubernetes.core.k8s:
|
||||
state: "present"
|
||||
context: "{{ my_context }}"
|
||||
namespace: '{{ traefik_namespace }}'
|
||||
# merge_type: merge
|
||||
# apply: true
|
||||
resource_definition: "{{ lookup('template', item) | from_yaml_all }}"
|
||||
with_items:
|
||||
- traefik-hub-certificate.yml.j2
|
||||
when:
|
||||
- traefik_hub_tlscrt is defined
|
||||
- traefik_hub_tlskey is defined
|
||||
- name: Defined traefik-hub repository
|
||||
kubernetes.core.helm_repository:
|
||||
name: traefik-hub
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ data:
|
|||
traefikhub-api:
|
||||
address: ":9900"
|
||||
traefikhub-tunl:
|
||||
address: ":9901"
|
||||
address: ":9901/tcp"
|
||||
{% endif%}
|
||||
{% for traefik_entrypoint in traefik_entrypoints %}
|
||||
{{ traefik_entrypoint.name }}:
|
||||
|
|
@ -71,6 +71,9 @@ data:
|
|||
allowEmptyServices: true
|
||||
kubernetesIngress:
|
||||
ingressClass: "traefik"
|
||||
{% if traefik_hub_token is defined %}
|
||||
allowExternalNameServices: true
|
||||
{% endif%}
|
||||
allowEmptyServices: true
|
||||
file:
|
||||
directory: /etc/traefik/file/
|
||||
|
|
|
|||
14
templates/traefik-hub-certificate.yml.j2
Normal file
14
templates/traefik-hub-certificate.yml.j2
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
apiVersion: v1
|
||||
kind: List
|
||||
items:
|
||||
- apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
annotations:
|
||||
app.kubernetes.io/managed-by: traefik-hub
|
||||
name: hub-certificate
|
||||
namespace: {{ traefik_namespace }}
|
||||
type: kubernetes.io/tls
|
||||
data:
|
||||
tls.crt: {{ traefik_hub_tlscrt | b64encode }}
|
||||
tls.key: {{ traefik_hub_tlskey | b64encode }}
|
||||
Loading…
Add table
Add a link
Reference in a new issue