Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] Regenerate the root CA cert when renewing auto-generated certs #660

Merged
merged 1 commit into from
Jul 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# SAS Viya Monitoring for Kubernetes

## Unreleased
* **Overall**
* [FIX] Modified renew-tls-certs.sh script to regenerate the root CA cert when renewing auto-generated certs

* **Metrics**
* [CHANGE] Grafana dashboards for RabbitMQ upgraded to newer versions
* [CHANGE] All Grafana dashboards (maintained as part of this project) migrated to Grafana 11
Expand Down
4 changes: 2 additions & 2 deletions bin/renew-tls-certs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ function renew-certs {
log_info "Generating new certs for [Alertmanager, Prometheus, Grafana]"
log_info "Deleting existing secrets for [Alertmanager, Prometheus, Grafana]"

for secretName in prometheus-tls-secret alertmanager-tls-secret grafana-tls-secret; do
for secretName in prometheus-tls-secret alertmanager-tls-secret grafana-tls-secret v4m-root-ca-tls-secret; do
if [ -n "$(kubectl get secret -n $MON_NS $secretName -o name 2>/dev/null)" ]; then
if (tls_cert_managed_by_v4m "$MON_NS" "$secretName") then
kubectl delete secret -n "$MON_NS" $secretName
Expand All @@ -126,7 +126,7 @@ function renew-certs {
log_info "Generating new certs for [OpenSearch, OpenSearch Dashboards]"
log_info "Deleting existing secrets for [OpenSearch, OpenSearch Dashboards]"

for secretName in kibana-tls-secret es-transport-tls-secret es-rest-tls-secret es-admin-tls-secret; do
for secretName in kibana-tls-secret es-transport-tls-secret es-rest-tls-secret es-admin-tls-secret v4m-root-ca-tls-secret; do
if [ -n "$(kubectl get secret -n $LOG_NS $secretName -o name 2>/dev/null)" ]; then
if (tls_cert_managed_by_v4m "$LOG_NS" "$secretName") then
kubectl delete secret -n "$LOG_NS" $secretName
Expand Down
Loading