Skip to content

Commit

Permalink
fix: reserve DATAPATHS__0 to base seeding and fix invalid spec and fo…
Browse files Browse the repository at this point in the history
…rmat
  • Loading branch information
evegufy committed Sep 27, 2024
1 parent 8f7b2b6 commit 0da7b6d
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ data:
[
{
"id": "1aacde78-35ec-4df3-ba1e-f988cddcbbd9",
"name": "None",
"shortname": "None"
"name": "None",
"shortname": "None"
}
]
verified_credential_external_type_detail_versions.defaulttest.json: |-
Expand Down
50 changes: 26 additions & 24 deletions charts/ssi-credential-issuer/templates/job-issuer-migrations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,22 +67,24 @@ spec:
- name: "CONNECTIONSTRINGS__ISSUERDB"
value: "Server={{ .Values.externalDatabase.host }};Database={{ .Values.externalDatabase.database }};Port={{ .Values.externalDatabase.port }};User Id={{ .Values.externalDatabase.username }};Password=$(ISSUER_PASSWORD);Ssl Mode={{ .Values.dbConnection.sslMode }};"
{{- end }}
{{- if (.Values.migrations.seeding.seedTestData.useDefault) }}
- name: "SEEDING__DATAPATHS__0"
value: "Seeder/Data"
{{- if (.Values.migrations.seeding.seedTestData.useDefault) }}
- name: "SEEDING__DATAPATHS__1"
value: "Seeder/Data/import/default-test-data"
- name: "SEEDING__TESTDATAENVIRONMENTS__0"
- name: "SEEDING__TESTDATAENVIRONMENTS__1"
value: "defaulttest"
{{- end }}
{{- if and (.Values.migrations.seeding.seedTestData.useOwnConfigMap.configMap) (.Values.migrations.seeding.seedTestData.useOwnConfigMap.filename) }}
{{- if (.Values.migrations.seeding.seedTestData.useDefault) }}
- name: "SEEDING__DATAPATHS__1"
- name: "SEEDING__DATAPATHS__2"
value: "Seeder/Data/import/custom-test-data"
- name: "SEEDING__TESTDATAENVIRONMENTS__1"
- name: "SEEDING__TESTDATAENVIRONMENTS__2"
value: "{{ .Values.migrations.seeding.seedTestData.useOwnConfigMap.filename }}"
{{- else }}
- name: "SEEDING__DATAPATHS__0"
- name: "SEEDING__DATAPATHS__1"
value: "Seeder/Data/import/custom-test-data"
- name: "SEEDING__TESTDATAENVIRONMENTS__0"
- name: "SEEDING__TESTDATAENVIRONMENTS__1"
value: "{{ .Values.migrations.seeding.seedTestData.useOwnConfigMap.filename }}"
{{- end }}
{{- end }}
Expand All @@ -99,26 +101,26 @@ spec:
{{- if or (.Values.migrations.seeding.seedTestData.useDefault) (and (.Values.migrations.seeding.seedTestData.useOwnConfigMap.configMap) (.Values.migrations.seeding.seedTestData.useOwnConfigMap.filename)) }}
volumeMounts:
{{- if (.Values.migrations.seeding.seedTestData.useDefault) }}
- name: test-data-default
mountPath: /migrations/Seeder/Data/import/default-test-data
- name: test-data-default
mountPath: /migrations/Seeder/Data/import/default-test-data
{{- end }}
{{- if and (.Values.migrations.seeding.seedTestData.useOwnConfigMap.configMap) (.Values.migrations.seeding.seedTestData.useOwnConfigMap.filename) }}
- name: test-data-custom
mountPath: /migrations/Seeder/Data/import/custom-test-data
- name: test-data-custom
mountPath: /migrations/Seeder/Data/import/custom-test-data
{{- end }}
{{- end }}
{{- if or (.Values.migrations.seeding.seedTestData.useDefault) (and (.Values.migrations.seeding.seedTestData.useOwnConfigMap.configMap) (.Values.migrations.seeding.seedTestData.useOwnConfigMap.filename)) }}
volumes:
{{- if (.Values.migrations.seeding.seedTestData.useDefault) }}
- name: test-data-default
configMap:
name: "{{ include "issuer.fullname" . }}-default-testdata"
optional: true
{{- end }}
{{- if and (.Values.migrations.seeding.seedTestData.useOwnConfigMap.configMap) (.Values.migrations.seeding.seedTestData.useOwnConfigMap.filename) }}
- name: test-data-custom
configMap:
name: "{{ .Values.migrations.seeding.seedTestData.useOwnConfigMap.configMap }}"
optional: true
{{- end }}
{{- end }}
volumes:
{{- if (.Values.migrations.seeding.seedTestData.useDefault) }}
- name: test-data-default
configMap:
name: "{{ include "issuer.fullname" . }}-default-testdata"
optional: true
{{- end }}
{{- if and (.Values.migrations.seeding.seedTestData.useOwnConfigMap.configMap) (.Values.migrations.seeding.seedTestData.useOwnConfigMap.filename) }}
- name: test-data-custom
configMap:
name: "{{ .Values.migrations.seeding.seedTestData.useOwnConfigMap.configMap }}"
optional: true
{{- end }}
{{- end }}

0 comments on commit 0da7b6d

Please sign in to comment.