-
Notifications
You must be signed in to change notification settings - Fork 1
config files redesign
Zane edited this page Apr 8, 2024
·
29 revisions
flag_regex: dam{[a-zA-Z...]}
registry: registry.example.com/damctf
# used e.g. $REGISTRY/chal-name:{prod,staging}
defaults:
resources: { cpu: , mem: }
deploy:
# control challenge deployment status explicitly per environment/profile
$PROFILE:
misc/foo: true
rev/bar: false
$PROFILE2:
misc/foo: false
rev/bar: false
points:
- difficulty: 1
min: 0
max: 1337
environments:
# configure per-environment credentials etc
$PROFILE:
frontend_url: x
frontend_token: y
challenges_domain: fqdn
kubeconfig: path/to/kubeconfig
kubecontext: damctf-cluster
$PROFILE2:
...
Having a single e.g. database container for multiple "frontend" containers is not easy in a single pod, so maybe allow for splitting across single pods?
- Automatically create services for all pods? We do anyways for TCP traffic
TODO: JSON schema!
name: string
author: person
description: also string
# used for point values in rcds.yaml
# 0 for survey/rules chal?
difficulty: 1
# alternatively, flag: dam{wtf}
flag:
# only one of these should be used at a time (?)
file: ./flag
text: dam{d33z_nu75}
regex: /dam{[ab]+}/
verifier: # program to verify flag validity (not shell scripts cause security, Haskell/OCaml? :P)
provide:
- file1
# each individual pod is gonna allow only 1 container for now
pods:
- name: string
build: # in the style of docker-compose
env: # docker compose style
replicas: num
ports:
# 1 port per entry
- internal: number
expose:
tcp: port
http: subdomain:port # or fqdn