This commit is contained in:
25
debug-pod.yaml
Normal file
25
debug-pod.yaml
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: alpine-debug
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: alpine-debug
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: alpine-debug
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: alpine-debug
|
||||||
|
image: alpine:latest
|
||||||
|
command: ["sleep", "3600"]
|
||||||
|
volumeMounts:
|
||||||
|
- name: knot-config
|
||||||
|
mountPath: /mnt
|
||||||
|
volumes:
|
||||||
|
- name: knot-config
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: knot-dns-config
|
||||||
27
start.sh
Normal file
27
start.sh
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
echo "Starting Knot DNS initialization..."
|
||||||
|
|
||||||
|
# Create necessary directories
|
||||||
|
mkdir -p /etc/knot /var/lib/knot/keys
|
||||||
|
|
||||||
|
# Copy template files to working directories if they don't exist
|
||||||
|
if [ ! -f /etc/knot/knot.conf ]; then
|
||||||
|
echo "Copying knot.conf from template..."
|
||||||
|
cp /etc/knot-dist/knot.conf /etc/knot/
|
||||||
|
|
||||||
|
echo "Copying zone file from template..."
|
||||||
|
cp /var/lib/knot-dist/my-dnssec-test-domain.de.zone /var/lib/knot/
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Ensure proper ownership
|
||||||
|
echo "Setting file ownership..."
|
||||||
|
chown -R knot:knot /etc/knot /var/lib/knot
|
||||||
|
|
||||||
|
# Check configuration
|
||||||
|
echo "Validating configuration..."
|
||||||
|
/usr/sbin/knotc conf-check
|
||||||
|
|
||||||
|
echo "Starting Knot DNS server..."
|
||||||
|
exec /usr/sbin/knotd -d
|
||||||
Reference in New Issue
Block a user