about summary refs log tree commit diff
path: root/nginx/generate-dhparam
diff options
context:
space:
mode:
Diffstat (limited to 'nginx/generate-dhparam')
-rwxr-xr-xnginx/generate-dhparam14
1 files changed, 14 insertions, 0 deletions
diff --git a/nginx/generate-dhparam b/nginx/generate-dhparam
new file mode 100755
index 000000000000..ef923cc7f6da
--- /dev/null
+++ b/nginx/generate-dhparam
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+readonly dhparam=$(openssl dhparam 2048 | base64 -w0)
+
+echo "Inserting new DH parameter ..."
+kubectl replace --force -f - <<EOF
+apiVersion: v1
+kind: Secret
+metadata:
+  name: nginx-dhparam
+data:
+  tls.dhparam: ${dhparam}
+EOF
+