Skip to content

Commit 08476c4

Browse files
authored
Reserved words for OAS project components creation (#1383)
1 parent f14cf53 commit 08476c4

4 files changed

Lines changed: 23 additions & 4 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
- Jenkins master and agent maintenance. Add Rhel9 variant and make it default ([#1361](https://github.com/opendevstack/ods-core/pull/1361))
99
- Update tailor to 1.4.0 ([#1373](https://github.com/opendevstack/ods-core/pull/1373))
1010
- Update Jenkins java version to jdk 21 ([#1374](https://github.com/opendevstack/ods-core/pull/1374))
11-
- Add new configuration for the ODS API Service ([1375](https://github.com/opendevstack/ods-core/pull/1375)) ([1377](https://github.com/opendevstack/ods-core/pull/1377))([1378](https://github.com/opendevstack/ods-core/pull/1378))([1379](https://github.com/opendevstack/ods-core/pull/1379))([1380](https://github.com/opendevstack/ods-core/pull/1380))([1382](https://github.com/opendevstack/ods-core/pull/1382))
11+
- Add new configuration for the ODS API Service ([1375](https://github.com/opendevstack/ods-core/pull/1375)) ([1377](https://github.com/opendevstack/ods-core/pull/1377))([1378](https://github.com/opendevstack/ods-core/pull/1378))([1379](https://github.com/opendevstack/ods-core/pull/1379))([1380](https://github.com/opendevstack/ods-core/pull/1380))([1382](https://github.com/opendevstack/ods-core/pull/1382))([1383](https://github.com/opendevstack/ods-core/pull/1383))
1212
- Change the way the certificates are installed in the container of ods-api-service to update the cacert ([1381](https://github.com/opendevstack/ods-core/pull/1381))
1313

1414
### Fixed

ods-api-service/chart/templates/tpl/_application_yaml.tpl

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ spring:
1919
jwk-set-uri: ${OAUTH2_JWK_SET_URI:}
2020
issuer-uri: ${OAUTH2_ISSUER:}
2121
audiences:
22-
- ${OAUTH2_AUDIENCE:}
22+
- ${OAUTH2_AUDIENCE:}
2323
datasource:
2424
url: ${ODS_API_SERVICE_DB_DATASOURCE_URL}
2525
username: ${ODS_API_SERVICE_DB_USER:opendevstack}
@@ -98,7 +98,10 @@ apis:
9898
enabled: {{ .Values.apis.projects.enabled | default false }}
9999
ansible-workflow-name: ${API_PROJECTS_MINIEDP_PROVISION_WORKFLOW_NAME:}
100100
locations: ${API_PROJECTS_LOCATIONS:}
101-
101+
project-components:
102+
enabled: {{ .Values.apis.projectComponents.enabled | default false }}
103+
create:
104+
reserved-params: ${API_PROJECT_COMPONENTS_RESERVED_PARAMS:}
102105

103106
# External Service Configuration
104107
externalservices:

ods-api-service/chart/templates/tpl/_env_services.tpl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,13 @@ API_PROJECT_USERS_TOKEN_EXPIRATION_HOURS: {{ .Values.apis.projectUsers.token.exp
99
API_PROJECTS_MINIEDP_PROVISION_WORKFLOW_NAME: {{ .Values.apis.projects.workflowName | quote }}
1010
API_PROJECTS_LOCATIONS: {{ .Values.apis.projects.locations | quote }}
1111
{{ end }}
12+
{{ if .Values.apis.projectComponents.enabled }}
13+
API_PROJECT_COMPONENTS_RESERVED_PARAMS: {{ .Values.apis.projectComponents.create.reservedParams | quote }}
14+
{{ end }}
1215
{{- end }}
1316

1417
{{- define "chart.servicesSecretData" }}
1518
{{ if .Values.apis.projectUsers.enabled }}
1619
API_PROJECT_USERS_TOKEN_SECRET: {{ .Values.apis.projectUsers.token.secret | b64enc | quote }}
1720
{{ end }}
18-
{{- end }}
21+
{{- end }}

ods-api-service/chart/templates/tpl/_validations.tpl

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,19 @@ Validate Projects Info Service configuration when enabled
6464
{{- end }}
6565
{{- end -}}
6666

67+
{{/*
68+
Validate Project Components Service configuration when enabled
69+
*/}}
70+
{{- define "chart.validate.projectComponents" -}}
71+
{{- if .Values.externalServices.projectComponents.enabled }}
72+
{{- if not .Values.externalServices.projectComponents.create.reservedParams }}
73+
{{- fail "externalServices.projectComponents.create.reservedParams is required when projectComponents is enabled" }}
74+
{{- end }}
75+
{{- end }}
76+
{{- end -}}
77+
78+
79+
6780
{{/*
6881
Validate OpenShift instances configuration
6982
*/}}

0 commit comments

Comments
 (0)