forked from juice-shop/multi-juicer
-
-
Notifications
You must be signed in to change notification settings - Fork 15
Add CTFd via helm chart #107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
489d222
Bump axios from 0.27.2 to 1.1.3 in /wrongsecrets-balancer/ui
dependabot[bot] 66fa778
initial try for ctfd
bendehaan 6dd3454
Merge remote-tracking branch 'origin/dependabot/npm_and_yarn/wrongsec…
bendehaan 1fa6373
add ctfd ingress and service
bendehaan 8dd1484
fix
bendehaan 86473e4
Update image versions
commjoen 2357aed
Fixed weird layouting so that bright version works a bit as well
commjoen 2159980
Fix typo
commjoen 0c45ed5
Fix in deployment for wrongsecrets-balancer, fix for aws build script…
commjoen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
apiVersion: networking.k8s.io/v1 | ||
kind: Ingress | ||
metadata: | ||
namespace: ctfd | ||
name: ctfd | ||
annotations: | ||
alb.ingress.kubernetes.io/scheme: internet-facing | ||
alb.ingress.kubernetes.io/target-type: instance | ||
acme.cert-manager.io/http01-edit-in-place: "true" | ||
# cert-manager.io/issue-temporary-certificate: "true" | ||
#uncomment and configure below if you want to use tls, don't forget to override the cookie to a secure value! | ||
# alb.ingress.kubernetes.io/certificate-arn: arn:aws:acm:<region>:<account>:certificate/xxxxxx | ||
# alb.ingress.kubernetes.io/listen-ports: '[{"HTTP": 80}, {"HTTPS":443}]' | ||
# alb.ingress.kubernetes.io/actions.ssl-redirect: '443' | ||
spec: | ||
ingressClassName: alb | ||
rules: | ||
- http: | ||
paths: | ||
- path: / | ||
pathType: Prefix | ||
backend: | ||
service: | ||
name: ctfd | ||
port: | ||
number: 80 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
namespace: ctfd | ||
name: ctfd | ||
labels: | ||
app: ctfd | ||
spec: | ||
type: NodePort | ||
ports: | ||
- port: 80 | ||
name: http | ||
targetPort: 8000 | ||
protocol: TCP | ||
selector: | ||
app.kubernetes.io/name: ctfd |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,163 @@ | ||
# Default values for ctfd. | ||
# This is a YAML-formatted file. | ||
# Declare variables to be passed into your templates. | ||
|
||
replicaCount: 1 | ||
|
||
image: | ||
repository: ctfd/ctfd | ||
tag: 3.5.0 | ||
pullPolicy: IfNotPresent | ||
|
||
# Set K8s securityContext for the CTFd deployment: | ||
security: | ||
fsGroup: 1001 | ||
runAsNonRoot: true | ||
runAsUser: 1001 | ||
|
||
# Bitnami helm redis deployment | ||
# See bitnami redis values.yaml for more details | ||
redis: | ||
# Enable Redis server provided by helm: | ||
enabled: True | ||
auth: | ||
enabled: true | ||
password: "ChangeMe!123" | ||
# Redis® architecture. Allowed values: standalone or replication | ||
architecture: standalone | ||
|
||
mariadb: | ||
# Enable mariadb server provided by helm: | ||
enabled: True | ||
# Login credentials: | ||
auth: | ||
rootPassword: "ChangeMe!123" | ||
database: ctfd | ||
username: "ctfd" | ||
password: "ChangeMe!123" | ||
|
||
replicationUser: "replicate" | ||
replicationPassword: "ChangeMe!123" | ||
|
||
persistence: | ||
enabled: true | ||
storageClass: "" | ||
accessModes: | ||
- ReadWriteOnce | ||
size: 15Gi | ||
|
||
externalDB: | ||
# (required if mariadb-galera is disabled) External SQL Database URI. Example: mysql+pymysql://root:ctfd@db/ctfd | ||
DATABASE_URL: "" | ||
# (required if redis is disabled) External Redis URI. Example: redis://cache:6379 | ||
REDIS_URL: "" | ||
|
||
env: | ||
open: | ||
# Required if more than 1 worker (randomly generate) | ||
SECRET_KEY: "ChangeMe!123" | ||
# Amount of CTFd workers | ||
WORKERS: 5 | ||
# If behing ingress proxy or nginx: | ||
REVERSE_PROXY: True | ||
secret: | ||
existingSecret: | ||
# Stores Environment Variable to secret key name mappings | ||
existingSecretMappings: | ||
DATABASE_URL: | ||
REDIS_URL: | ||
|
||
# For uploads to the CTFd server (images and other content) | ||
# Not for DB | ||
persistence: | ||
uploads: | ||
enabled: true | ||
#ReadWriteMany may be desired here if using multiple CTFd pods | ||
accessMode: ReadWriteOnce | ||
size: 10Gi | ||
labels: {} | ||
# name: value | ||
# existingClaim: | ||
# storageClass: "-" | ||
|
||
service: | ||
type: ClusterIP | ||
port: 80 | ||
targetPort: 8000 | ||
#if service.type = loadbalancer | ||
# loadBalancerSourceRanges: [] | ||
# loadBalancerIP: "" | ||
|
||
probes: | ||
liveness: | ||
initialDelaySeconds: 25 | ||
periodSeconds: 5 | ||
timeoutSeconds: 2 | ||
successThreshold: 1 | ||
failureThreshold: 5 | ||
readiness: | ||
initialDelaySeconds: 20 | ||
periodSeconds: 5 | ||
timeoutSeconds: 2 | ||
successThreshold: 1 | ||
failureThreshold: 5 | ||
|
||
# CTFd ingress: | ||
ingress: | ||
enabled: false | ||
annotations: | ||
{} | ||
# kubernetes.io/ingress.class: nginx | ||
# kubernetes.io/tls-acme: "true" | ||
hosts: | ||
- host: ctf.your.domain.com | ||
path: "/" | ||
|
||
tls: [] | ||
# - secretName: chart-example-tls | ||
# hosts: | ||
# - chart-example.local | ||
|
||
resources: | ||
{} | ||
# limits: | ||
# cpu: 100m | ||
# memory: 128Mi | ||
# requests: | ||
# cpu: 100m | ||
# memory: 128Mi | ||
|
||
nodeSelector: {} | ||
|
||
tolerations: [] | ||
|
||
affinity: {} | ||
|
||
nameOverride: "" | ||
fullnameOverride: "" | ||
|
||
metrics: | ||
enabled: false | ||
image: | ||
registry: docker.io | ||
repository: bitnami/mysqld-exporter | ||
tag: 0.12.1-debian-10-r27 | ||
pullPolicy: IfNotPresent | ||
resources: {} | ||
annotations: | ||
prometheus.io/scrape: "true" | ||
prometheus.io/port: "9104" | ||
|
||
# Enable this if you're using https://github.com/coreos/prometheus-operator | ||
serviceMonitor: | ||
enabled: false | ||
## Specify a namespace if needed | ||
# namespace: monitoring | ||
# fallback to the prometheus default unless specified | ||
# interval: 10s | ||
# scrapeTimeout: 10s | ||
## Defaults to what's used if you follow CoreOS [Prometheus Install Instructions](https://github.com/helm/charts/tree/master/stable/prometheus-operator#tldr) | ||
## [Prometheus Selector Label](https://github.com/helm/charts/tree/master/stable/prometheus-operator#prometheus-operator-1) | ||
## [Kube Prometheus Selector Label](https://github.com/helm/charts/tree/master/stable/prometheus-operator#exporters) | ||
selector: | ||
prometheus: kube-prometheus |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,7 +35,7 @@ balancer: | |
# -- Set this to a fixed random alpa-numeric string (recommended length 24 chars). If not set this get randomly generated with every helm upgrade, each rotation invalidates all active cookies / sessions requirering users to login again. | ||
cookieParserSecret: null | ||
repository: jeroenwillemsen/wrongsecrets-balancer | ||
tag: 1.0aws | ||
tag: 1.2aws | ||
# -- Number of replicas of the wrongsecrets-balancer deployment | ||
replicas: 1 | ||
service: | ||
|
@@ -97,7 +97,7 @@ wrongsecrets: | |
maxInstances: 500 | ||
# -- Juice Shop Image to use | ||
image: jeroenwillemsens/wrongsecrets | ||
tag: 1.5.9-no-vault | ||
tag: 1.5.10-no-vault | ||
# -- Change the key when hosting a CTF event. This key gets used to generate the challenge flags. See: https://github.com/OWASP/wrongsecrets#ctf | ||
ctfKey: "[email protected]!9uR_K!NfkkTr" | ||
# -- Specify a custom Juice Shop config.yaml. See the JuiceShop Config Docs for more detail: https://pwning.owasp-juice.shop/part1/customization.html#yaml-configuration-file | ||
|
@@ -184,7 +184,7 @@ virtualdesktop: | |
maxInstances: 500 | ||
# -- Juice Shop Image to use | ||
image: jeroenwillemsen/wrongsecrets-desktop-k8s | ||
tag: 1.5.9 | ||
tag: 1.5.10 | ||
repository: commjoenie/wrongSecrets | ||
resources: | ||
request: | ||
|
@@ -203,10 +203,10 @@ virtualdesktop: | |
envFrom: [ ] | ||
tolerations: [ ] | ||
|
||
# Deletes unused JuiceShop instances after a configurable period of inactivity | ||
# Deletes unused Wrongsecrets namespaces after a configurable period of inactivity | ||
wrongsecretsCleanup: | ||
repository: jeroenwillemsen/wrongsecrets-ctf-cleaner | ||
tag: null | ||
tag: 0.3 | ||
enabled: true | ||
# -- Specifies when Juice Shop instances will be deleted when unused for that period. | ||
gracePeriod: 2d | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.