1
0
Fork 0

Initial commit.

This commit is contained in:
Sergio Talens-Oliag 2025-04-27 14:14:58 +02:00
commit 38c0b98fa8
Signed by: sto
GPG key ID: 821AEE0FD167FBDF
8 changed files with 199 additions and 0 deletions

31
bin/traefik-cert.sh Executable file
View file

@ -0,0 +1,31 @@
#!/bin/sh
# Script to update the
secret="localhost-mixinet-net-ingress-cert"
cert="${1:-localhost.mixinet.net.crt}"
key="${2:-localhost.mixinet.net.key}"
if [ -f "$cert" ] && [ -f "$key" ]; then
kubectl -n kube-system create secret tls $secret \
--key=$key \
--cert=$cert \
--dry-run=client --save-config -o yaml | kubectl apply -f -
kubectl apply -f - << EOF
apiVersion: traefik.containo.us/v1alpha1
kind: TLSStore
metadata:
name: default
namespace: kube-system
spec:
defaultCertificate:
secretName: $secret
EOF
else
cat <<EOF
To add or update the traefik TLS certificate the following files are needed:
- cert: '$cert'
- key: '$key'
Note: you can pass the paths as arguments to this script.
EOF
fi