Skip to content

Commit

Permalink
feat(truststore): declarative configuration of TLS trusted certificat…
Browse files Browse the repository at this point in the history
…e Secrets
  • Loading branch information
andrewazores committed Nov 27, 2024
1 parent b91e9bd commit 404547d
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 0 deletions.
1 change: 1 addition & 0 deletions charts/cryostat/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ helm install cryostat ./charts/cryostat
| `core.discovery.kubernetes.portNames` | List of port names that the Cryostat application should look for in order to consider a target as JMX connectable | `[]` |
| `core.discovery.kubernetes.builtInPortNumbersDisabled` | When false and `portNumbers` is empty, the Cryostat application will use the default port number `9091` to look for JMX connectable targets. | `false` |
| `core.discovery.kubernetes.portNumbers` | List of port numbers that the Cryostat application should look for in order to consider a target as JMX connectable | `[]` |
| `core.config.tlsTruststore.secretNames` | List of Secret names. Each Secret is expected to contain one or more files, which are TLS certificates which target applications may use for their JMX servers, to be mounted to the Cryostat container for its TLS truststore. | `[]` |

### Report Generator Deployment

Expand Down
11 changes: 11 additions & 0 deletions charts/cryostat/templates/cryostat_deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,12 @@ spec:
failureThreshold: 18
resources:
{{- toYaml .Values.core.resources | nindent 12 }}
volumeMounts:
{{- range .Values.core.config.tlsTruststore.secretNames }}
- name: {{ . }}
mountPath: /truststore/{{ . }}
readOnly: true
{{- end }}
- name: {{ printf "%s-%s" .Chart.Name "grafana" }}
securityContext:
{{- toYaml .Values.grafana.securityContext | nindent 12 }}
Expand Down Expand Up @@ -216,3 +222,8 @@ spec:
secret:
secretName: {{ .Release.Name }}-proxy-tls
{{- end }}
{{- range .Values.core.config.tlsTruststore.secretNames }}
- name: {{ . }}
secret:
secretName: {{ . }}
{{- end }}
16 changes: 16 additions & 0 deletions charts/cryostat/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,22 @@
}
}
}
},
"config": {
"type": "object",
"properties": {
"tlsTruststore": {
"type": "object",
"properties": {
"secretNames": {
"type": "array",
"description": "List of Secret names. Each Secret is expected to contain one or more files, which are TLS certificates which target applications may use for their JMX servers, to be mounted to the Cryostat container for its TLS truststore.",
"default": [],
"items": {}
}
}
}
}
}
}
},
Expand Down
4 changes: 4 additions & 0 deletions charts/cryostat/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ core:
builtInPortNumbersDisabled: false
## @param core.discovery.kubernetes.portNumbers [array] List of port numbers that the Cryostat application should look for in order to consider a target as JMX connectable
portNumbers: []
config:
tlsTruststore:
## @param core.config.tlsTruststore.secretNames [array] List of Secret names. Each Secret is expected to contain one or more files, which are TLS certificates which target applications may use for their JMX servers, to be mounted to the Cryostat container for its TLS truststore.
secretNames: []

## @section Report Generator Deployment
## @extra reports Configuration for the Reports Generator deployment
Expand Down

0 comments on commit 404547d

Please sign in to comment.