Skip to content

Commit 958645e

Browse files
vramperezVíctor Rampérez Martíngithub-actions[bot]
authored
fix(did-helper): render STORE_PASS when generateKey is enabled if provided (#425)
* fix(did-helper): render STORE_PASS when generateKey is enabled if provided * Update helm documentation * fix(did-helper): refactor provideKeystore config renderization * Update helm documentation --------- Co-authored-by: Víctor Rampérez Martín <vramperez@MacBook-Air-de-Victor.local> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 091c5e5 commit 958645e

File tree

5 files changed

+27
-18
lines changed

5 files changed

+27
-18
lines changed

charts/did-helper/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ apiVersion: v2
22
name: did-helper
33
description: A Helm chart for DID helper (see https://github.com/wistefan/did-helper)
44
type: application
5-
version: 0.1.1
5+
version: 0.1.3
66
appVersion: "0.4.2"

charts/did-helper/templates/deployment.yaml

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,14 @@ spec:
6464
readOnly: true
6565
{{- end }}
6666
env:
67-
{{- range $key, $value := .Values.config.server }}
67+
{{- if and .Values.config.server.keystorePasswordSecretName .Values.config.server.keystorePasswordSecretKey }}
68+
- name: STORE_PASS
69+
valueFrom:
70+
secretKeyRef:
71+
name: {{ .Values.config.server.keystorePasswordSecretName }}
72+
key: {{ .Values.config.server.keystorePasswordSecretKey }}
73+
{{- end }}
74+
{{- range $key, $value := omit .Values.config.server "keystorePasswordSecretName" "keystorePasswordSecretKey"}}
6875
- name: {{ $key | snakecase | upper }}
6976
valueFrom:
7077
configMapKeyRef:
@@ -81,15 +88,13 @@ spec:
8188
{{- end }}
8289
{{- end }}
8390
{{- if .Values.config.provideKeystore.enabled }}
84-
- name: KEY_TYPE
85-
value: {{ .Values.config.provideKeystore.keyType }}
86-
- name: KEY_ALIAS
87-
value: {{ .Values.config.provideKeystore.keyAlias }}
88-
- name: STORE_PASS
91+
{{- range $key, $value := omit .Values.config.provideKeystore "enabled" "keystoreSecretName" "keystoreSecretKey" }}
92+
- name: {{ $key | snakecase | upper }}
8993
valueFrom:
90-
secretKeyRef:
91-
name: {{ .Values.config.provideKeystore.keystorePasswordSecretName }}
92-
key: {{ .Values.config.provideKeystore.keystorePasswordSecretKey }}
94+
configMapKeyRef:
95+
name: {{ include "did-helper.fullname" $ }}-cm
96+
key: {{ $key }}
97+
{{- end }}
9398
- name: KEYSTORE_PATH
9499
value: "/etc/keystore/keystore.pfx"
95100
{{- end }}

charts/did-helper/values.yaml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,14 @@ config:
125125
outputFormat: "json_jwk"
126126
# URL to retrieve the public certificate
127127
# certUrl: ""
128+
# Name of the secret containing the keystore password.
129+
# If provideKeystore is used, this needs to be set with the corresponding secret name containing the actual keystore password
130+
# If generateKey is used, this needs to be set with the secret name containing the password to be used for the created keystore
131+
keystorePasswordSecretName: ""
132+
# Key inside the secret containing the keystore password
133+
# If provideKeystore is used, this needs to be set with the corresponding secret key containing the actual keystore password
134+
# If generateKey is used, this needs to be set with the secret key containing the password to be used for the created keystore
135+
keystorePasswordSecretKey: ""
128136
generateKey:
129137
enabled: true
130138
# Type of the key to be generated. RSA is only supported for did:jwk
@@ -145,10 +153,6 @@ config:
145153
keystoreSecretName: ""
146154
# Key inside the secret containing the keystore
147155
keystoreSecretKey: ""
148-
# Name of the secret containing the keystore password
149-
keystorePasswordSecretName: ""
150-
# Key inside the secret containing the keystore password
151-
keystorePasswordSecretKey: ""
152156
# Alias for the key inside the keystore
153157
keyAlias: ""
154158
# Type of the key provided

charts/odrl-pap/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
apiVersion: v1
22
name: odrl-pap
3-
version: 2.3.1
3+
version: 2.3.2
44
appVersion: 1.1.2
55
description: A Helm chart for running the odrl-pap on kubernetes.
66
icon: https://fiware.github.io/catalogue/img/fiware.png

charts/odrl-pap/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# odrl-pap
22

3-
![Version: 2.3.0](https://img.shields.io/badge/Version-2.3.0-informational?style=flat-square) ![AppVersion: 1.1.0](https://img.shields.io/badge/AppVersion-1.1.0-informational?style=flat-square)
3+
![Version: 2.3.2](https://img.shields.io/badge/Version-2.3.2-informational?style=flat-square) ![AppVersion: 1.1.2](https://img.shields.io/badge/AppVersion-1.1.2-informational?style=flat-square)
44

55
A Helm chart for running the odrl-pap on kubernetes.
66

@@ -19,7 +19,7 @@ A Helm chart for running the odrl-pap on kubernetes.
1919
| Key | Type | Default | Description |
2020
|-----|------|---------|-------------|
2121
| additionalMapping.enabled | bool | `false` | should an additional mapping.json be loaded |
22-
| additionalMapping.json | string | `"{\n \"action\": {\n \"odrl\": {\n \"use\" : {\n \"regoPackage\": \"custom.action as custom_action\",\n \"regoMethod\": \"custom_action.is_use(helper.http_part)\"\n }\n }\n }\n}\n"` | mapping.json to merged with the defaults the example would overwrite the default odrl:use to be handled by a custom rego method provided with the additional rego |
22+
| additionalMapping.json | string | `"{\n \"action\": {\n \"odrl\": {\n \"use\" : {\n \"regoPackage\": \"custom.action as custom_action\",\n \"regoMethod\": \"custom_action.is_use(helper.http_part)\"\n }\n }\n }\n}\n"` | mapping.json to merged with the defaults the example would overwrite the default odrl:use to be handled by a custom rego method provided with the additional rego |
2323
| additionalRego.enabled | bool | `false` | should additional packages be loaded |
2424
| additionalRego.packages | string | `"action.rego: |\n package odrl.action\n\n import rego.v1\n\n ## odrl:use\n # checks if the given request is a usage - in constrast to the default, this example would only consider modifications a \"use\"\n is_use(request) if {\n methods := [\"POST\", \"PUT\", \"PATCH\"]\n request.method in methods\n }\n"` | |
2525
| additonalEnvVars | list | `[]` | a list of additional env vars to be set, check the til docu for all available options |
@@ -43,7 +43,7 @@ A Helm chart for running the odrl-pap on kubernetes.
4343
| deployment.command | list | `[]` | command to be used for starting the container |
4444
| deployment.image.pullPolicy | string | `"IfNotPresent"` | specification of the image pull policy |
4545
| deployment.image.repository | string | `"quay.io/fiware/odrl-pap"` | til image name ref: https://quay.io/repository/wistefan/odrl-pap |
46-
| deployment.image.tag | string | `"1.1.0"` | tag of the image to be used |
46+
| deployment.image.tag | string | `"1.1.2"` | tag of the image to be used |
4747
| deployment.imagePullSecrets | list | `[]` | secrets for pulling images from a private repository ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ |
4848
| deployment.livenessProbe.initialDelaySeconds | int | `30` | |
4949
| deployment.livenessProbe.periodSeconds | int | `10` | |

0 commit comments

Comments
 (0)