Skip to content

Commit 8c7d572

Browse files
author
Martin Jackson
committed
Add makefile target and be concerned about subject length
1 parent 86b863e commit 8c7d572

File tree

3 files changed

+5
-22
lines changed

3 files changed

+5
-22
lines changed

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,14 @@ install upgrade deploy: operator-deploy post-install ## Install or upgrade the p
1313
echo "Installed/Upgraded"
1414

1515
post-install: ## Post-install tasks - load-secrets
16+
make snakeoil-certs
1617
make load-secrets
1718
echo "Post-deploy complete"
1819

1920
deploy-kubevirt-worker: ## Deploy the metal node worker (from workstation). This is normally done in-cluster
2021
./scripts/deploy_kubevirt_worker.sh
2122

23+
snakeoil-certs: ## Create self-signed certificates if they do not already exist
24+
ansible-playbook $(EXTRA_PLAYBOOK_OPTS) ./ansible/make_snakeoil_certpair.yml -e '{ "certificate_names": [ "otel-collector-edge-observability-stack" ] }'
25+
2226
.phony: install test

ansible/make_snakeoil_certpair.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
echo "Snakeoil certpair $certname already exists, not re-creating"
5252
else
5353
openssl req -x509 -newkey rsa:4096 -sha256 -days 365 \
54-
-nodes -keyout "$key_path" -out "$cert_path" -subj "/CN=$certname" \
54+
-nodes -keyout "$key_path" -out "$cert_path" -subj "/CN=${certname:0:63}" \
5555
-addext "subjectAltName=DNS:$name.$domain"
5656
fi
5757

scripts/make_snakeoil_certpair.sh

Lines changed: 0 additions & 21 deletions
This file was deleted.

0 commit comments

Comments
 (0)