Add traefik 2.1
This commit is contained in:
parent
28b8910ad4
commit
a804841f87
27 changed files with 709 additions and 11 deletions
88
templates/2.1/traefik-dp.yml.j2
Normal file
88
templates/2.1/traefik-dp.yml.j2
Normal file
|
|
@ -0,0 +1,88 @@
|
|||
kind: Deployment
|
||||
apiVersion: apps/v1
|
||||
metadata:
|
||||
namespace: {{ traefik_namespace }}
|
||||
name: traefik
|
||||
labels:
|
||||
app: traefik
|
||||
|
||||
spec:
|
||||
replicas: {% if traefik_node_selector is defined %}{{ traefik_node_selector|length }}{% else %}1{% endif %}
|
||||
strategy:
|
||||
type: Recreate
|
||||
selector:
|
||||
matchLabels:
|
||||
app: traefik
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: traefik
|
||||
spec:
|
||||
serviceAccountName: traefik-ingress-controller
|
||||
containers:
|
||||
- name: traefik
|
||||
image: traefik:{{ traefik_version }}
|
||||
args:
|
||||
- --configfile=/config/traefik.yaml
|
||||
# imagePullPolicy: IfNotPresent
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 80
|
||||
protocol: TCP
|
||||
hostPort: 80
|
||||
- name: https
|
||||
containerPort: 443
|
||||
protocol: TCP
|
||||
hostPort: 443
|
||||
- name: traefik
|
||||
containerPort: 8080
|
||||
protocol: TCP
|
||||
hostPort: 8080
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /ping
|
||||
port: traefik
|
||||
failureThreshold: 1
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 10
|
||||
successThreshold: 1
|
||||
timeoutSeconds: 2
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /ping
|
||||
port: traefik
|
||||
failureThreshold: 3
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 10
|
||||
successThreshold: 1
|
||||
timeoutSeconds: 2
|
||||
resources:
|
||||
limits:
|
||||
cpu: {{ traefik_cpu_limit }}
|
||||
memory: {{ traefik_memory_limit }}
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 20Mi
|
||||
volumeMounts:
|
||||
- mountPath: /config
|
||||
name: config
|
||||
{% if traefik_node_selector is defined %}
|
||||
nodeSelector:
|
||||
flaminem.com/entrypoint: traefik
|
||||
{% endif %}
|
||||
dnsPolicy: ClusterFirst
|
||||
{% if my_context == "flamykube" %}
|
||||
hostNetwork: true
|
||||
{% else %}
|
||||
hostNetwork: false
|
||||
{% endif %}
|
||||
restartPolicy: Always
|
||||
terminationGracePeriodSeconds: 1
|
||||
tolerations:
|
||||
- effect: NoSchedule
|
||||
operator: Exists
|
||||
volumes:
|
||||
- configMap:
|
||||
defaultMode: 420
|
||||
name: traefik
|
||||
name: config
|
||||
Loading…
Add table
Add a link
Reference in a new issue