Skip to content

Commit

Permalink
configured config maps
Browse files Browse the repository at this point in the history
  • Loading branch information
mariocandela committed Sep 19, 2023
1 parent c18128c commit 8ed8c20
Show file tree
Hide file tree
Showing 4 changed files with 98 additions and 18 deletions.
6 changes: 6 additions & 0 deletions beelzebub-chart/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
██████ ███████ ███████ ██ ███████ ███████ ██████ ██ ██ ██████
██ ██ ██ ██ ██ ███ ██ ██ ██ ██ ██ ██ ██
██████ █████ █████ ██ ███ █████ ██████ ██ ██ ██████
██ ██ ██ ██ ██ ███ ██ ██ ██ ██ ██ ██ ██
██████ ███████ ███████ ███████ ███████ ███████ ██████ ██████ ██████
Honeypot Framework, happy hacking!
1. Get the application URL by running these commands:
{{- if .Values.ingress.enabled }}
{{- range $host := .Values.ingress.hosts }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: "beelzebub-configmap"
name: "beelzebub-configuration"
labels:
{{- include "beelzebub-chart.labels" . | nindent 4 }}
data:
beelzebub.yaml: |
core:
logging:
logging:
debug: false
debugReportCaller: false
logDisableTimestamp: true
logsPath: ./logs
tracings:
tracings:
rabbit-mq:
enabled: false
uri: ""
prometheus:
enabled: false
uri: ""
prometheus:
path: "/metrics"
port: ":2112"
67 changes: 67 additions & 0 deletions beelzebub-chart/templates/configmap_services.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: "beelzebub-services"
labels:
{{- include "beelzebub-chart.labels" . | nindent 4 }}
data:
http-80.yaml: |
apiVersion: "v1"
protocol: "http"
address: ":80"
description: "Wordpress 6.0"
commands:
- regex: "^(/index.php|/index.html|/)$"
handler:
<html>
<header>
<title>Wordpress 6 test page</title>
</header>
<body>
<h1>Hello from Wordpress</h1>
</body>
</html>
headers:
- "Content-Type: text/html"
- "Server: Apache/2.4.53 (Debian)"
- "X-Powered-By: PHP/7.4.29"
statusCode: 200
- regex: "^(/wp-login.php|/wp-admin)$"
handler:
<html>
<header>
<title>Wordpress 6 test page</title>
</header>
<body>
<form action="" method="post">
<label for="uname"><b>Username</b></label>
<input type="text" placeholder="Enter Username" name="uname" required>
<label for="psw"><b>Password</b></label>
<input type="password" placeholder="Enter Password" name="psw" required>
<button type="submit">Login</button>
</form>
</body>
</html>
headers:
- "Content-Type: text/html"
- "Server: Apache/2.4.53 (Debian)"
- "X-Powered-By: PHP/7.4.29"
statusCode: 200
- regex: "^.*$"
handler:
<html>
<header>
<title>404</title>
</header>
<body>
<h1>Not found!</h1>
</body>
</html>
headers:
- "Content-Type: text/html"
- "Server: Apache/2.4.53 (Debian)"
- "X-Powered-By: PHP/7.4.29"
statusCode: 404
30 changes: 19 additions & 11 deletions beelzebub-chart/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,28 +33,36 @@ spec:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
volumeMounts:
- name: config-volume
- name: config-core-volume
mountPath: /configurations/beelzebub.yaml
subPath: beelzebub.yaml
readOnly: true
- name: config-services-volume
mountPath: /configurations/services/http-80.yaml
subPath: http-80.yaml
readOnly: true
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- name: http
containerPort: {{ .Values.service.port }}
protocol: TCP
livenessProbe:
httpGet:
path: /
port: http
readinessProbe:
httpGet:
path: /
port: http
# livenessProbe:
# httpGet:
# path: /
# port: http
# readinessProbe:
# httpGet:
# path: /
# port: http
resources:
{{- toYaml .Values.resources | nindent 12 }}
volumes:
- name: config-volume
- name: config-core-volume
configMap:
name: beelzebub-configmap
name: beelzebub-configuration
- name: config-services-volume
configMap:
name: beelzebub-services
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
Expand Down

0 comments on commit 8ed8c20

Please sign in to comment.