From 7a4b1c96bc836be03ee5b9824dde5e153d2b4024 Mon Sep 17 00:00:00 2001 From: Marcus Noble Date: Sat, 6 Jun 2020 22:04:20 +0100 Subject: [PATCH] Enabled Traefik access logs --- manifests/harbor_chart.yaml | 4 --- manifests/traefik-lb.yaml | 59 +++++++++++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+), 4 deletions(-) diff --git a/manifests/harbor_chart.yaml b/manifests/harbor_chart.yaml index fefa0c6..4b5eefd 100644 --- a/manifests/harbor_chart.yaml +++ b/manifests/harbor_chart.yaml @@ -37,23 +37,19 @@ spec: resources: requests: memory: 64Mi - core: resources: requests: memory: 64Mi - jobservice: resources: requests: memory: 64Mi - registry: registry: resources: requests: memory: 64Mi - controller: resources: requests: diff --git a/manifests/traefik-lb.yaml b/manifests/traefik-lb.yaml index 2feb363..b70e265 100644 --- a/manifests/traefik-lb.yaml +++ b/manifests/traefik-lb.yaml @@ -14,3 +14,62 @@ spec: port: 443 name: https type: LoadBalancer + +--- + +apiVersion: apps/v1 +kind: DaemonSet +metadata: + labels: + k8s-app: traefik-ingress-lb + k8s.scw.cloud/ingress: traefik + k8s.scw.cloud/object: DaemonSet + k8s.scw.cloud/system: ingress + name: ingress-traefik + namespace: kube-system +spec: + revisionHistoryLimit: 10 + selector: + matchLabels: + k8s-app: traefik-ingress-lb + template: + metadata: + labels: + k8s-app: traefik-ingress-lb + name: ingress-traefik + spec: + containers: + - args: + - --api + - --kubernetes + - --logLevel=INFO + - --defaultentrypoints=http,https + - --entrypoints=Name:https Address::443 TLS + - --entrypoints=Name:http Address::80 + - --accesslog + - --accesslog.format=json + image: docker.io/traefik:1.7 + imagePullPolicy: IfNotPresent + name: ingress-traefik + ports: + - containerPort: 80 + hostPort: 80 + name: http + protocol: TCP + - containerPort: 443 + hostPort: 443 + name: https + protocol: TCP + - containerPort: 8080 + name: admin + protocol: TCP + securityContext: + capabilities: + add: + - NET_BIND_SERVICE + drop: + - ALL + dnsPolicy: ClusterFirst + restartPolicy: Always + serviceAccount: ingress-traefik + serviceAccountName: ingress-traefik