Compare commits
No commits in common. "073568296901914e621344fb046d2e8e897e7bc1" and "6e8729077404219ad6142b0d511a632465cbb7db" have entirely different histories.
0735682969
...
6e87290774
8 changed files with 19 additions and 64 deletions
|
|
@ -1,5 +1,5 @@
|
||||||
my_context: kubernetes
|
my_context: kubernetes
|
||||||
traefik_version: "2.5.6"
|
traefik_version: "2.4.1"
|
||||||
traefik_domain: "local"
|
traefik_domain: "local"
|
||||||
traefik_namespace: "traefik"
|
traefik_namespace: "traefik"
|
||||||
#ingress_whitelist:
|
#ingress_whitelist:
|
||||||
|
|
@ -10,12 +10,10 @@ traefik_namespace: "traefik"
|
||||||
# - localhost
|
# - localhost
|
||||||
traefik_cpu_limit: 500m
|
traefik_cpu_limit: 500m
|
||||||
traefik_memory_limit: 300Mi
|
traefik_memory_limit: 300Mi
|
||||||
traefik_entrypoints: []
|
traefik_entrypoints:
|
||||||
# - { name: "http", port: 8000, proto: "TCP", hostport: 80 }
|
- { name: "http", port: 8000, proto: "TCP", hostport: 80 }
|
||||||
# - { name: "https", port: 4443, proto: "TCP", hostport: 443, tls: true }
|
- { name: "https", port: 4443, proto: "TCP", hostport: 443, tls: true }
|
||||||
# - { name: "traefik", port: 8080, proto: "TCP" }
|
- { name: "traefik", port: 8080, proto: "TCP" }
|
||||||
#traefik_external_ips: []
|
|
||||||
# - 1.2.3.4
|
|
||||||
|
|
||||||
basic_auth: false
|
basic_auth: false
|
||||||
#traefik_dashboard_certificate: wildcard-cluster
|
#traefik_dashboard_certificate: wildcard-cluster
|
||||||
|
|
@ -6,7 +6,7 @@ galaxy_info:
|
||||||
galaxy_tags: []
|
galaxy_tags: []
|
||||||
license: GPL2
|
license: GPL2
|
||||||
collections:
|
collections:
|
||||||
- kubernetes.core
|
- community.kubernetes
|
||||||
platforms:
|
platforms:
|
||||||
- name: kubernetes
|
- name: kubernetes
|
||||||
version:
|
version:
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
api_version: v1
|
api_version: v1
|
||||||
kind: Namespace
|
kind: Namespace
|
||||||
metadata:
|
metadata:
|
||||||
name: '{{ traefik_namespace }}'
|
name: traefik
|
||||||
labels:
|
labels:
|
||||||
namespace: '{{ traefik_namespace }}'
|
namespace: '{{ traefik_namespace }}'
|
||||||
|
|
||||||
|
|
@ -17,12 +17,12 @@
|
||||||
k8s:
|
k8s:
|
||||||
state: present
|
state: present
|
||||||
context: "{{ my_context }}"
|
context: "{{ my_context }}"
|
||||||
namespace: '{{ traefik_namespace }}'
|
|
||||||
definition:
|
definition:
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Secret
|
kind: Secret
|
||||||
metadata:
|
metadata:
|
||||||
name: basic-auth
|
name: basic-auth
|
||||||
|
namespace: '{{ traefik_namespace }}'
|
||||||
type: Opaque
|
type: Opaque
|
||||||
data:
|
data:
|
||||||
basic_auth: "{{ basic_auth_data | b64encode }}"
|
basic_auth: "{{ basic_auth_data | b64encode }}"
|
||||||
|
|
@ -74,12 +74,12 @@
|
||||||
# - traefik_actual_version.stdout is version(traefik_version, '>')
|
# - traefik_actual_version.stdout is version(traefik_version, '>')
|
||||||
|
|
||||||
- name: Defined traefik repository
|
- name: Defined traefik repository
|
||||||
kubernetes.core.helm_repository:
|
community.kubernetes.helm_repository:
|
||||||
name: traefik
|
name: traefik
|
||||||
repo_url: "https://helm.traefik.io/traefik"
|
repo_url: "https://helm.traefik.io/traefik"
|
||||||
tags: traefik
|
tags: traefik
|
||||||
- name: Deploy latest version of Traefik
|
- name: Deploy latest version of Traefik
|
||||||
kubernetes.core.helm:
|
community.kubernetes.helm:
|
||||||
context: "{{ my_context }}"
|
context: "{{ my_context }}"
|
||||||
name: traefik
|
name: traefik
|
||||||
chart_ref: traefik/traefik
|
chart_ref: traefik/traefik
|
||||||
|
|
@ -99,15 +99,12 @@
|
||||||
ingressClass:
|
ingressClass:
|
||||||
enabled: true
|
enabled: true
|
||||||
isDefaultClass: true
|
isDefaultClass: true
|
||||||
# ports:
|
ports:
|
||||||
# web:
|
web:
|
||||||
# redirectTo: websecure
|
redirectTo: websecure
|
||||||
# hostPort: 80
|
hostPort: 80
|
||||||
# websecure:
|
websecure:
|
||||||
# hostPort: 443
|
hostPort: 443
|
||||||
# tls:
|
|
||||||
# enabled: true
|
|
||||||
# options: default
|
|
||||||
volumes:
|
volumes:
|
||||||
- mountPath: /etc/traefik
|
- mountPath: /etc/traefik
|
||||||
name: traefik-conf
|
name: traefik-conf
|
||||||
|
|
@ -118,11 +115,6 @@
|
||||||
- mountPath: /etc/traefik/basic-auth
|
- mountPath: /etc/traefik/basic-auth
|
||||||
name: basic-auth
|
name: basic-auth
|
||||||
type: secret
|
type: secret
|
||||||
deployment:
|
|
||||||
replicas: 1
|
|
||||||
podAnnotations:
|
|
||||||
prometheus.io/port: '9000'
|
|
||||||
prometheus.io/scrape: 'true'
|
|
||||||
|
|
||||||
- name: Install traefik configuration
|
- name: Install traefik configuration
|
||||||
k8s:
|
k8s:
|
||||||
|
|
@ -134,7 +126,6 @@
|
||||||
resource_definition: "{{ lookup('template', item) | from_yaml }}"
|
resource_definition: "{{ lookup('template', item) | from_yaml }}"
|
||||||
with_items:
|
with_items:
|
||||||
# - "{{ lookup('vars', 'traefik_' + traefik_version | regex_replace('[.]','_') + '_list') }}"
|
# - "{{ lookup('vars', 'traefik_' + traefik_version | regex_replace('[.]','_') + '_list') }}"
|
||||||
- traefik-certificate.yml.j2
|
|
||||||
- traefik-cm.yml.j2
|
- traefik-cm.yml.j2
|
||||||
- traefik-files.yml.j2
|
- traefik-files.yml.j2
|
||||||
# - traefik-sa.yml.j2
|
# - traefik-sa.yml.j2
|
||||||
|
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
---
|
|
||||||
apiVersion: cert-manager.io/v1alpha2
|
|
||||||
kind: Certificate
|
|
||||||
metadata:
|
|
||||||
name: traefik.{{ traefik_domain }}
|
|
||||||
spec:
|
|
||||||
dnsNames:
|
|
||||||
- traefik.{{ traefik_domain }}
|
|
||||||
issuerRef:
|
|
||||||
name: letsencrypt-prod
|
|
||||||
kind: ClusterIssuer
|
|
||||||
secretName: traefik.{{ traefik_domain }}
|
|
||||||
|
|
@ -15,9 +15,6 @@ data:
|
||||||
web:
|
web:
|
||||||
address: ":8000/tcp"
|
address: ":8000/tcp"
|
||||||
http:
|
http:
|
||||||
# middlewares:
|
|
||||||
# - auth@file
|
|
||||||
# - secure_headers@file
|
|
||||||
redirections:
|
redirections:
|
||||||
entryPoint:
|
entryPoint:
|
||||||
to: websecure
|
to: websecure
|
||||||
|
|
|
||||||
|
|
@ -70,16 +70,3 @@ data:
|
||||||
- TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
|
- TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
|
||||||
- TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
|
- TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
|
||||||
- TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305
|
- TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305
|
||||||
{% if false %}
|
|
||||||
stores:
|
|
||||||
default:
|
|
||||||
defaultCertificate:
|
|
||||||
certFile: path/to/wildcardcert.crt
|
|
||||||
keyFile: path/to/wildcardcert.key
|
|
||||||
|
|
||||||
certificates:
|
|
||||||
- certFile: /path/to/domain.cert
|
|
||||||
keyFile: /path/to/domain.key
|
|
||||||
- certFile: /path/to/other-domain.cert
|
|
||||||
keyFile: /path/to/other-domain.key
|
|
||||||
{% endif %}
|
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ metadata:
|
||||||
|
|
||||||
spec:
|
spec:
|
||||||
entryPoints:
|
entryPoints:
|
||||||
- websecure
|
- https
|
||||||
routes:
|
routes:
|
||||||
# Match is the rule corresponding to an underlying router.
|
# Match is the rule corresponding to an underlying router.
|
||||||
# Later on, match could be the simple form of a path prefix, e.g. just "/bar",
|
# Later on, match could be the simple form of a path prefix, e.g. just "/bar",
|
||||||
|
|
@ -45,6 +45,4 @@ spec:
|
||||||
tls:
|
tls:
|
||||||
{% if traefik_dashboard_certificate is defined %}
|
{% if traefik_dashboard_certificate is defined %}
|
||||||
secretName: {{ traefik_dashboard_certificate }}
|
secretName: {{ traefik_dashboard_certificate }}
|
||||||
{% else %}
|
|
||||||
secretName: traefik.{{ traefik_domain }}
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
||||||
|
|
@ -9,19 +9,15 @@ metadata:
|
||||||
spec:
|
spec:
|
||||||
ports:
|
ports:
|
||||||
- name: web
|
- name: web
|
||||||
|
hostPort: 80
|
||||||
port: 80
|
port: 80
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
targetPort: web
|
targetPort: web
|
||||||
- name: websecure
|
- name: websecure
|
||||||
|
hostPort: 443
|
||||||
port: 443
|
port: 443
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
targetPort: websecure
|
targetPort: websecure
|
||||||
{% if traefik_external_ips is defined %}
|
|
||||||
externalIPs:
|
|
||||||
{% for traefik_external_ip in traefik_external_ips %}
|
|
||||||
- {{ traefik_external_ip }}
|
|
||||||
{% endfor %}
|
|
||||||
{% endif %}
|
|
||||||
selector:
|
selector:
|
||||||
app.kubernetes.io/instance: traefik
|
app.kubernetes.io/instance: traefik
|
||||||
app.kubernetes.io/name: traefik
|
app.kubernetes.io/name: traefik
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue