Skip to content
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 docs/guides/help/help.md
Original file line number Diff line number Diff line change
Expand Up @@ -1559,8 +1559,11 @@ To upgrade Runtime Radar from version 0.2.0 to version 0.3.0:

```
helm upgrade --install runtime-radar -n runtime-radar --create-namespace oci://ghcr.io/runtime-radar/runtime-radar:v0.3.0 \
--set global.tls.force=true \
```

***Note.** The `global.tls.force` parameter re-issues the internal TLS certificate so that it covers the components added in version 0.3.0, and restarts the Runtime Radar components. If you use your own certificate (`global.tls.existingSecret` or `tls.cert`), add `kube-manager` to its subject alternative names before upgrading.*

If you use Runtime Radar to protect multiple clusters, do the following:
1. Update Runtime Radar in the central cluster according to the instructions above.
1. [Connect the child clusters](#9839873547) in the Runtime Radar web interface.
Expand Down
3 changes: 3 additions & 0 deletions install/helm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,8 @@ To upgrade an existing installation:
helm upgrade runtime-radar -n runtime-radar ./install/helm -f custom-values.yaml
```

The chart-generated `cs-crt` certificate is re-issued on every upgrade and all RR components are restarted to pick it up, so the certificate always lists the components of the installed release in its subject alternative names. Set `global.tls.force=false` to keep the existing certificate. A certificate you provide yourself (`global.tls.existingSecret` or inline `tls.cert`/`tls.certKey`/`tls.certCA`) is never re-issued: add new component names, e.g. `kube-manager` in 0.3.0, to its subject alternative names before upgrading, otherwise the reverse proxy gets `502 Bad Gateway` from them.

### Breaking changes

The following breaking changes apply when upgrading from earlier versions:
Expand Down Expand Up @@ -514,6 +516,7 @@ clickhouse:
| `global.logLevel` | Logging level for components | `INFO` |
| `global.tls.enabled` | Enable TLS for RR components | `true` |
| `global.tls.existingSecret` | Name of the existing secret with TLS certificates | `""` |
| `global.tls.force` | Re-issue the generated TLS certificate and restart RR components on every upgrade | `true` |
| `global.auth.enabled` | Enable authentication for RR components | `true` |
| `global.keys.existingSecret` | Existing secret name with keys `encryption`, `token`, and `publicAccessTokenSalt` | `""` |
| `global.keys.encryption` | Encryption key for secrets stored in database. Must be a 64-character hexadecimal string (32 bytes) | `""` |
Expand Down
4 changes: 3 additions & 1 deletion install/helm/charts/common/templates/_tls.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Params:
- caDaysValid - String - Optional - Days validity for the certificate.
- services - List - Optional - List of services to add as alt name.
- altNames - List - Optional - Alt names for CA cert.
- force - Boolean - Optional - Ignore the existing certificate and generate a new one.
- prefix - String - Optional - Prefix of tls section for sane alert.
*/}}
{{- define "common.tls.generate" -}}
Expand All @@ -22,7 +23,7 @@ Params:
{{- $crt := "" }}
{{- $key := "" }}
{{- $ca := "" }}
{{- if (pluck "lookup" ($values.tls) ($global.tls) (((.context.Values).global).tls) (dict "lookup" true) | first) }}
{{- if and (not .force) (pluck "lookup" ($values.tls) ($global.tls) (((.context.Values).global).tls) (dict "lookup" true) | first) }}
{{- $crt = include "common.secrets.lookup" (dict "secret" $secret "key" "tls.crt" "context" .context) }}
{{- $key = include "common.secrets.lookup" (dict "secret" $secret "key" "tls.key" "context" .context) }}
{{- $ca = include "common.secrets.lookup" (dict "secret" $secret "key" "ca.crt" "context" .context) }}
Expand Down Expand Up @@ -73,6 +74,7 @@ Params:
- caDaysValid - String - Optional - Days validity for the certificate.
- services - List - Optional - List of services to add as alt name.
- altNames - List - Optional - Alt names for CA cert.
- force - Boolean - Optional - Ignore the existing certificate and generate a new one.
- prefix - String - Optional - Prefix of tls section for sane alert.
*/}}
{{- define "common.tls.generateSecret" -}}
Expand Down
6 changes: 5 additions & 1 deletion install/helm/charts/common/templates/cs/_deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,18 @@ spec:
metadata:
{{- $podAnnotations := include "common.podAnnotations" . }}
{{- $authEnabled := eq (include "common.cs.auth.enabled" .) "true" }}
{{- if or $podAnnotations $authEnabled }}
{{- $force := and (eq (include "common.cs.tls.enabled" .) "true") ((.Values.global).tls).force }}
{{- if or $podAnnotations $authEnabled $force }}
annotations:
{{- with $podAnnotations }}
{{- . | nindent 8 }}
{{- end }}
{{- if $authEnabled }}
checksum/keys: {{ default (randAlphaNum 32) ((.Values.global).keys).token | sha256sum | quote }}
{{- end }}
{{- if $force }}
tls-revision: {{ .Release.Revision | quote }}
{{- end }}
{{- end }}
labels:
{{- include "common.podLabels" . | nindent 8 }}
Expand Down
2 changes: 1 addition & 1 deletion install/helm/templates/tls-secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ data:
{{- $altNames = append $altNames (printf "%s.%s.svc.%s" $dep.Name $releaseNamespace $clusterDomain) }}
{{- end }}
{{- end }}
{{- include "common.tls.generateSecret" (dict "context" . "secret" $secretName "altNames" $altNames) | indent 2 }}
{{- include "common.tls.generateSecret" (dict "context" . "secret" $secretName "altNames" $altNames "force" (and .Values.global.tls.force (not .Values.global.tls.existingSecret))) | indent 2 }}
{{- end }}

{{- if and .Values.global.postgresql.tls.enabled .Values.global.postgresql.tls.verify .Values.postgresql.externalHost (not .Values.global.postgresql.tls.existingSecret) }}
Expand Down
5 changes: 5 additions & 0 deletions install/helm/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@
"type": "string",
"description": "Name of the existing secret with TLS certificates",
"default": ""
},
"force": {
"type": "boolean",
"description": "Re-issue the generated TLS certificate and restart RR components on every upgrade",
"default": true
}
}
},
Expand Down
2 changes: 2 additions & 0 deletions install/helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ global:
enabled: true
# -- Name of the existing secret with TLS certificates
existingSecret: ""
# -- Re-issue the generated TLS certificate and restart RR components on every upgrade
force: true

auth:
# -- Enable authentication for RR components
Expand Down
3 changes: 3 additions & 0 deletions runtime-monitor/.helm/templates/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ spec:
metadata:
annotations:
checksum/configmap: {{ toJson .Values.tetragon | sha256sum }}
{{- if and (eq (include "common.cs.tls.enabled" .) "true") ((.Values.global).tls).force }}
tls-revision: {{ .Release.Revision | quote }}
{{- end }}
{{- include "common.podAnnotations" . | indent 8 }}
labels:
{{- include "common.podLabels" . | nindent 8 }}
Expand Down
Loading