Skip to content

Commit 731fd06

Browse files
committed
Reserved words for OAS project components creation
1 parent f14cf53 commit 731fd06

3 files changed

Lines changed: 22 additions & 3 deletions

File tree

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)