-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path12-klodd.yaml
121 lines (115 loc) · 2.41 KB
/
12-klodd.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
apiVersion: v1
kind: Namespace
metadata:
name: klodd
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: klodd
namespace: klodd
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: klodd
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: klodd
subjects:
- kind: ServiceAccount
name: klodd
namespace: klodd
---
kind: ConfigMap
apiVersion: v1
metadata:
name: klodd-conf
namespace: klodd
data:
# Klodd uses secret here, but I really can't be bothered to base64 encode it each time, it also doesn't provide much security in our single challenge cluster
config.yaml: |
challengeDomain: instancer.idek.team
kubeConfig: cluster
publicUrl: https://instancer.idek.team
rctfUrl: https://ctf.idek.team
traefik:
httpEntrypoint: websecure
tcpEntrypoint: tcp
tcpPort: 1337
ingress:
namespaceSelector:
matchLabels:
kubernetes.io/metadata.name: default
podSelector:
matchLabels:
app: traefik
secretKey: "HAHA"
recaptcha:
siteKey: 6LetTCcqAAAAACDQtu2uJfPzqiWp0dAKuZGPVSOs
secretKey: 6LetTCcqAAAAAJPmWGToJSiqF6U-e9s809E2dCjj
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: klodd
namespace: klodd
spec:
replicas: 1
selector:
matchLabels:
app.kubernetes.io/name: klodd
template:
metadata:
labels:
app.kubernetes.io/name: klodd
spec:
serviceAccountName: klodd
volumes:
- name: config
configMap:
name: klodd-conf
containers:
- name: klodd
image: ghcr.io/tjcsec/klodd:master
volumeMounts:
- name: config
mountPath: /app/config/
readOnly: true
ports:
- name: public
containerPort: 5000
---
apiVersion: v1
kind: Service
metadata:
name: klodd
namespace: klodd
spec:
type: ClusterIP
selector:
app.kubernetes.io/name: klodd
ports:
- name: public
port: 5000
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: klodd
namespace: klodd
annotations:
kubernetes.io/ingress.class: traefik
spec:
rules:
- host: instancer.idek.team
http:
paths:
- backend:
service:
name: klodd
port:
number: 5000
path: /
pathType: ImplementationSpecific