Skip to content

Commit

Permalink
build: add useOwnConfigMap
Browse files Browse the repository at this point in the history
Refs: #205
  • Loading branch information
Phil91 committed Sep 26, 2024
1 parent 50feaef commit fe0e52f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,17 +77,17 @@ spec:
- name: "SEEDING__TESTDATAENVIRONMENTS__1"
value: "defaulttest"
{{- end }}
{{- if and (.Values.migrations.seeding.testData.configMap) (.Values.migrations.seeding.testData.filename) }}
{{- if and (.Values.migrations.seeding.testData.useOwnConfigMap.configMap) (.Values.migrations.seeding.testData.useOwnConfigMap.filename) }}
{{- if (.Values.migrations.seeding.testData.useDefault) }}
- name: "SEEDING__DATAPATHS__2"
value: "Seeder/Data/import/custom-test-data"
- name: "SEEDING__TESTDATAENVIRONMENTS__2"
value: "{{ .Values.migrations.seeding.testData.filename }}"
value: "{{ .Values.migrations.seeding.testData.useOwnConfigMap.filename }}"
{{ else }}
- name: "SEEDING__DATAPATHS__1"
value: "Seeder/Data/import/custom-test-data"
- name: "SEEDING__TESTDATAENVIRONMENTS__1"
value: "{{ .Values.migrations.seeding.testData.filename }}"
value: "{{ .Values.migrations.seeding.testData.useOwnConfigMap.filename }}"
{{- end }}
{{- end }}
- name: "SERILOG__MINIMUMLEVEL__Default"
Expand All @@ -100,29 +100,29 @@ spec:
protocol: TCP
resources:
{{- toYaml .Values.migrations.resources | nindent 10 }}
{{- if or (.Values.migrations.seeding.testData.useDefault) (and (.Values.migrations.seeding.testData.configMap) (.Values.migrations.seeding.testData.filename)) }}
{{- if or (.Values.migrations.seeding.testData.useDefault) (and (.Values.migrations.seeding.testData.useOwnConfigMap.configMap) (.Values.migrations.seeding.testData.useOwnConfigMap.filename)) }}
volumeMounts:
{{- if (.Values.migrations.seeding.testData.useDefault) }}
- name: test-data-default
mountPath: /migrations/Seeder/Data/import/default-test-data
{{- end }}
{{- if and (.Values.migrations.seeding.testData.configMap) (.Values.migrations.seeding.testData.filename) }}
{{- if and (.Values.migrations.seeding.testData.useOwnConfigMap.configMap) (.Values.migrations.seeding.testData.useOwnConfigMap.filename) }}
- name: test-data-custom
mountPath: /migrations/Seeder/Data/import/custom-test-data
{{- end }}
{{- end }}
{{- if or (.Values.migrations.seeding.testData.useDefault) (and (.Values.migrations.seeding.testData.configMap) (.Values.migrations.seeding.testData.filename)) }}
{{- if or (.Values.migrations.seeding.testData.useDefault) (and (.Values.migrations.seeding.testData.useOwnConfigMap.configMap) (.Values.migrations.seeding.testData.useOwnConfigMap.filename)) }}
volumes:
{{- if (.Values.migrations.seeding.testData.useDefault) }}
- name: test-data-default
configMap:
name: "{{ include "issuer.fullname" . }}-default-testdata"
optional: true
{{- end }}
{{- if and (.Values.migrations.seeding.testData.configMap) (.Values.migrations.seeding.testData.filename) }}
{{- if and (.Values.migrations.seeding.testData.useOwnConfigMap.configMap) (.Values.migrations.seeding.testData.useOwnConfigMap.filename) }}
- name: test-data-custom
configMap:
name: "{{ .Values.migrations.seeding.testData.configMap }}"
name: "{{ .Values.migrations.seeding.testData.useOwnConfigMap.configMap }}"
optional: true
{{- end }}
{{- end }}
9 changes: 5 additions & 4 deletions charts/ssi-credential-issuer/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,11 @@ migrations:
testData:
# -- If set to true the data configured in the config map 'configmap-seeding-testdata.yaml' will be taken to insert the default test data
useDefault: false
# -- ConfigMap containing json files for the tables to seed, e.g. use_cases.json, verified_credential_external_type_detail_versions.test.json, etc.
configMap: ""
# -- Filename identifying the test data files e.g. for companies.test.json the value would be "test"
filename: ""
useOwnConfigMap:
# -- ConfigMap containing json files for the tables to seed, e.g. use_cases.json, verified_credential_external_type_detail_versions.test.json, etc.
configMap: ""
# -- Filename identifying the test data files e.g. for companies.test.json the value would be "test"
filename: ""
logging:
default: "Information"

Expand Down

0 comments on commit fe0e52f

Please sign in to comment.