Skip to content

Commit 2615dad

Browse files
committed
Initial commit
0 parents  commit 2615dad

6 files changed

Lines changed: 182 additions & 0 deletions

File tree

‎.gitignore‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
tls.crt
2+
tls.key

‎cluster-bootstrap/README.md‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
== Bootstrap items
2+
3+
These are required for the rest of the setup and should not be modified lightly
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# This thing is already applied by the helmchart, leaving here for troubleshooting
2+
3+
# apiVersion: traefik.containo.us/v1alpha1
4+
# kind: TLSStore
5+
# metadata:
6+
# name: default
7+
# namespace: kube-system
8+
# spec:
9+
# defaultCertificate:
10+
# secretName: cloudflare-tls
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
apiVersion: traefik.io/v1
2+
kind: IngressRoute
3+
metadata:
4+
name: dashboard
5+
namespace: kube-system
6+
spec:
7+
entryPoints:
8+
- websecure
9+
routes:
10+
- match: Host(`fun-traefik.faforever.com`) && (PathPrefix(`/dashboard`) || PathPrefix(`/api`))
11+
kind: Rule
12+
services:
13+
- name: api@internal
14+
kind: TraefikService
15+
middlewares:
16+
- name: basic-auth
17+
18+
---
19+
apiVersion: traefik.io/v1
20+
kind: Middleware
21+
metadata:
22+
name: basic-auth
23+
spec:
24+
basicAuth:
25+
secret: traefik-secret-user
26+
27+
---
28+
apiVersion: v1
29+
kind: Secret
30+
metadata:
31+
name: traefik-secret-user
32+
type: kubernetes.io/basic-auth
33+
data:
34+
username: dXNlcg== # username: user
35+
password: cGFzc3dvcmQ= # password: password
36+
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
apiVersion: helm.cattle.io/v1
2+
kind: HelmChart
3+
metadata:
4+
name: traefik
5+
namespace: kube-system
6+
spec:
7+
repo: https://traefik.github.io/charts
8+
chart: traefik
9+
targetNamespace: kube-system
10+
version: 23.0.1
11+
valuesContent: |-
12+
# yolo
13+
image:
14+
tag: "3.0"
15+
16+
# yolo harder
17+
experimental:
18+
v3:
19+
enabled: true
20+
21+
deployment:
22+
enabled: true
23+
kind: DaemonSet
24+
25+
updateStrategy:
26+
type: OnDelete
27+
28+
hostNetwork: true
29+
dnsPolicy: ClusterFirstWithHostNet
30+
affinity:
31+
podAntiAffinity:
32+
requiredDuringSchedulingIgnoredDuringExecution:
33+
- labelSelector:
34+
matchExpressions:
35+
- key: app.kubernetes.io/name
36+
operator: In
37+
values:
38+
- traefik
39+
topologyKey: kubernetes.io/hostname
40+
ports:
41+
metrics:
42+
# When using hostNetwork, use another port to avoid conflict with node exporter:
43+
# https://github.com/prometheus/prometheus/wiki/Default-port-allocations
44+
port: 9101
45+
web:
46+
port: 80
47+
redirectTo: websecure
48+
websecure:
49+
port: 443
50+
51+
# HostNetwork
52+
service:
53+
enabled: false
54+
55+
logs:
56+
general:
57+
# -- By default, the logs use a text format (common), but you can
58+
# also ask for the json format in the format option
59+
# format: json
60+
# By default, the level is set to ERROR.
61+
# -- Alternative logging levels are DEBUG, PANIC, FATAL, ERROR, WARN, and INFO.
62+
level: DEBUG
63+
64+
tlsStore:
65+
default:
66+
defaultCertificate:
67+
secretName: cloudflare-tls
68+
69+
securityContext:
70+
capabilities:
71+
drop: [ALL]
72+
add: [NET_BIND_SERVICE]
73+
readOnlyRootFilesystem: true
74+
runAsGroup: 0
75+
runAsNonRoot: false
76+
runAsUser: 0

‎testing/whoami.yaml‎

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: whoami
5+
spec:
6+
replicas: 3
7+
selector:
8+
matchLabels:
9+
app: whoami
10+
template:
11+
metadata:
12+
labels:
13+
app: whoami
14+
spec:
15+
containers:
16+
- image: containous/whoami
17+
name: whoamicontainer
18+
ports:
19+
- containerPort: 80
20+
protocol: TCP
21+
restartPolicy: Always
22+
23+
24+
---
25+
apiVersion: v1
26+
kind: Service
27+
metadata:
28+
name: whoamiservice
29+
labels:
30+
app: whoami
31+
spec:
32+
selector:
33+
app: whoami
34+
clusterIP: None
35+
ports:
36+
- port: 80
37+
targetPort: 80
38+
39+
---
40+
41+
apiVersion: traefik.containo.us/v1alpha1
42+
kind: IngressRoute
43+
metadata:
44+
name: whoamiingress
45+
spec:
46+
entryPoints:
47+
- websecure
48+
routes:
49+
- match: Host(`fun.faforever.com`)
50+
kind: Rule
51+
services:
52+
- name: whoamiservice
53+
port: 80
54+
tls:
55+
secretName: cloudflare-tls

0 commit comments

Comments
 (0)