- Add YAML-based configuration loaded from config.yaml (CONFIG_LOCATION env var) - Add PyYAML dependency and install requirements in Dockerfile - Replace Config.from_env() with get_config() singleton pattern - Remove server_header from config (now randomized from wordlists only) - Update docker-compose.yaml to mount config.yaml read-only - Update Helm chart: restructure values.yaml, generate config.yaml in ConfigMap - Update Kubernetes manifests: ConfigMap now contains config.yaml, deployments mount it - Remove Helm secret.yaml (dashboard path now auto-generated in config.yaml)
35 lines
1.4 KiB
YAML
35 lines
1.4 KiB
YAML
apiVersion: v1
|
|
kind: ConfigMap
|
|
metadata:
|
|
name: {{ include "krawl.fullname" . }}-config
|
|
labels:
|
|
{{- include "krawl.labels" . | nindent 4 }}
|
|
data:
|
|
config.yaml: |
|
|
# Krawl Honeypot Configuration
|
|
server:
|
|
port: {{ .Values.config.server.port }}
|
|
delay: {{ .Values.config.server.delay }}
|
|
timezone: {{ .Values.config.server.timezone | toYaml }}
|
|
links:
|
|
min_length: {{ .Values.config.links.min_length }}
|
|
max_length: {{ .Values.config.links.max_length }}
|
|
min_per_page: {{ .Values.config.links.min_per_page }}
|
|
max_per_page: {{ .Values.config.links.max_per_page }}
|
|
char_space: {{ .Values.config.links.char_space | quote }}
|
|
max_counter: {{ .Values.config.links.max_counter }}
|
|
canary:
|
|
token_url: {{ .Values.config.canary.token_url | toYaml }}
|
|
token_tries: {{ .Values.config.canary.token_tries }}
|
|
dashboard:
|
|
secret_path: {{ .Values.config.dashboard.secret_path | toYaml }}
|
|
api:
|
|
server_url: {{ .Values.config.api.server_url | toYaml }}
|
|
server_port: {{ .Values.config.api.server_port }}
|
|
server_path: {{ .Values.config.api.server_path | quote }}
|
|
database:
|
|
path: {{ .Values.config.database.path | quote }}
|
|
retention_days: {{ .Values.config.database.retention_days }}
|
|
behavior:
|
|
probability_error_codes: {{ .Values.config.behavior.probability_error_codes }}
|