Challenges¶
Refer to the examples and CRD schema for more information.
apiVersion: "klodd.tjcsec.club/v1"
kind: Challenge
metadata:
name: test # (1)
spec:
name: Test Challenge # (2)
timeout: 10000 # (3)
pods:
- name: app # (4)
ports: # (5)
- port: 80
spec: # (6)
containers:
- name: main
image: traefik/whoami:latest
resources:
requests:
memory: 100Mi
cpu: 75m
limits:
memory: 250Mi
cpu: 100m
automountServiceAccountToken: false
expose:
kind: http # (7)
pod: app # (8)
port: 80
middlewares: # (9)
- contentType:
autoDetect: false
- rateLimit:
average: 5
burst: 10
- The name of the resource is also used in the challenge URL. For example, the page for this challenge is accessible at
/challenge/test
. - This is the name displayed on the frontend. It does not have to be related to
metadata.name
in any way. - Each instance will be stopped after this many milliseconds. This challenge will run for 10 seconds.
- The name is used for Deployments and Services corresponding to this Pod.
- The ports listed here are used to create Services. Each Pod must have at least one port.
- This is a normal PodSpec.
- This must be either
http
ortcp
. - This is the name of the Service that will be exposed, and it must match the name given in
spec.pods
. - Each object in this array will be turned into a Middleware or MiddlewareTCP if
expose.kind
ishttp
ortcp
, respectively. Refer to the Traefik documentation for instructions on configuring these.