Deploy without hostport
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
288a4454da
commit
0735682969
4 changed files with 44 additions and 17 deletions
|
|
@ -9,7 +9,7 @@
|
|||
api_version: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: traefik
|
||||
name: '{{ traefik_namespace }}'
|
||||
labels:
|
||||
namespace: '{{ traefik_namespace }}'
|
||||
|
||||
|
|
@ -17,12 +17,12 @@
|
|||
k8s:
|
||||
state: present
|
||||
context: "{{ my_context }}"
|
||||
namespace: '{{ traefik_namespace }}'
|
||||
definition:
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: basic-auth
|
||||
namespace: '{{ traefik_namespace }}'
|
||||
type: Opaque
|
||||
data:
|
||||
basic_auth: "{{ basic_auth_data | b64encode }}"
|
||||
|
|
@ -74,12 +74,12 @@
|
|||
# - traefik_actual_version.stdout is version(traefik_version, '>')
|
||||
|
||||
- name: Defined traefik repository
|
||||
community.kubernetes.helm_repository:
|
||||
kubernetes.core.helm_repository:
|
||||
name: traefik
|
||||
repo_url: "https://helm.traefik.io/traefik"
|
||||
tags: traefik
|
||||
- name: Deploy latest version of Traefik
|
||||
community.kubernetes.helm:
|
||||
kubernetes.core.helm:
|
||||
context: "{{ my_context }}"
|
||||
name: traefik
|
||||
chart_ref: traefik/traefik
|
||||
|
|
@ -99,12 +99,15 @@
|
|||
ingressClass:
|
||||
enabled: true
|
||||
isDefaultClass: true
|
||||
ports:
|
||||
web:
|
||||
redirectTo: websecure
|
||||
hostPort: 80
|
||||
websecure:
|
||||
hostPort: 443
|
||||
# ports:
|
||||
# web:
|
||||
# redirectTo: websecure
|
||||
# hostPort: 80
|
||||
# websecure:
|
||||
# hostPort: 443
|
||||
# tls:
|
||||
# enabled: true
|
||||
# options: default
|
||||
volumes:
|
||||
- mountPath: /etc/traefik
|
||||
name: traefik-conf
|
||||
|
|
@ -115,6 +118,11 @@
|
|||
- 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
|
||||
k8s:
|
||||
|
|
@ -126,6 +134,7 @@
|
|||
resource_definition: "{{ lookup('template', item) | from_yaml }}"
|
||||
with_items:
|
||||
# - "{{ lookup('vars', 'traefik_' + traefik_version | regex_replace('[.]','_') + '_list') }}"
|
||||
- traefik-certificate.yml.j2
|
||||
- traefik-cm.yml.j2
|
||||
- traefik-files.yml.j2
|
||||
# - traefik-sa.yml.j2
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue