Skip to content

Commit

Permalink
Merge pull request #130 from OSGP/feature/SMHE-2267-add-certificate-k…
Browse files Browse the repository at this point in the history
…eystore-secret

Feature/smhe 2267 add certificate keystore secret
  • Loading branch information
angelosleebos authored Aug 13, 2024
2 parents ed8c0ec + 0a345b4 commit 59b477d
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 4 deletions.
2 changes: 1 addition & 1 deletion charts/gxf/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
name: gxf
description: Generic GXF Helm chart
version: '1.8.0'
version: '1.8.1'
icon: https://artwork.lfenergy.org/projects/grid-exchange-fabric/abbrev/color/grid-exchange-fabric-abbrev-color.png
maintainers:
- name: OSGP
Expand Down
2 changes: 1 addition & 1 deletion charts/gxf/config/tomcat/server.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ SPDX-License-Identifier: Apache-2.0
prestartminSpareThreads="true"
secretRequired="false" />
{{- end }}
{{- if .Values.httpsConnector.enabled }}
{{- if and .Values.httpsConnector.enabled (not .Values.httpdSidecar.enabled) }}
<Connector port="8443" protocol="org.apache.coyote.http11.Http11AprProtocol"
maxThreads="{{ $maxThreads }}" SSLEnabled="true" >
<UpgradeProtocol className="org.apache.coyote.http2.Http2Protocol" />
Expand Down
12 changes: 12 additions & 0 deletions charts/gxf/templates/certificate-keystore-secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: v1
kind: Secret
metadata:
name: {{ .Release.Name }}-keystore-password
type: Opaque
data:
keystore-password: {{ $secret := lookup "v1" "Secret" .Release.Namespace (printf "%s-keystore-password" .Release.Name) }}
{{- if $secret -}}
{{- index $secret "data" "keystore-password" -}}
{{- else -}}
{{- randAlphaNum 32 | b64enc | quote -}}
{{- end -}}
4 changes: 2 additions & 2 deletions charts/gxf/templates/certificate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ spec:
pkcs12:
create: true
passwordSecretRef:
name: keystore-password
key: password
name: {{ $.Release.Name }}-keystore-password
key: keystore-password
---
{{- end }}

0 comments on commit 59b477d

Please sign in to comment.