Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add deploy configurations for API Gateway #1578

Merged
merged 30 commits into from
May 23, 2023
Merged

Conversation

yoomlam
Copy link
Contributor

@yoomlam yoomlam commented May 18, 2023

Follow up to #1572

What was the problem?

API Gateway is not deployable to LHDI

Associated tickets or Slack threads:

How does this fix it?

Add deploy configurations for API Gateway

Updated port numbers at https://github.com/department-of-veterans-affairs/abd-vro/wiki/Software-Conventions#port-numbers

How to test this PR

  • Run locally:
COMPOSE_PROFILES=all ./gradlew :app:dockerComposeUp

@yoomlam yoomlam force-pushed the yoom/deploy-apigateway branch from fb213e3 to 3aba7fc Compare May 19, 2023 02:25
Base automatically changed from yoom/api-gateway to develop May 22, 2023 15:01
@github-actions
Copy link
Contributor

github-actions bot commented May 22, 2023

Test Results

91 tests  ±0   91 ✔️ ±0   41s ⏱️ ±0s
34 suites ±0     0 💤 ±0 
34 files   ±0     0 ±0 

Results for commit 29eaebd. ± Comparison against base commit a7a1336.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Contributor

github-actions bot commented May 22, 2023

JaCoCo Test Coverage

File Coverage [93.66%] 🍏
OpenApiConfiguration.java 97.79% 🍏
ApiGatewayRestController.java 0%
Total Project Coverage 74.62%

@yoomlam yoomlam force-pushed the yoom/deploy-apigateway branch from af6ee6d to d5e0154 Compare May 22, 2023 22:26
@yoomlam yoomlam marked this pull request as ready for review May 23, 2023 14:39
# Set the context-path. WebFlux calls it base-path
# https://stackoverflow.com/questions/49196368/context-path-with-webflux
# Kubernetes rewrites the url to use `/`
spring.webflux.base-path: /
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the default value, but I want to make this setting explicit since Spring WebFlux uses a different configuration setting than Spring MVC.

Comment on lines -142 to +162
- "8080:8080"
- "8081:8081"
- "8110:8110"
- "8111:8111"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use new ports for our new app (which doesn't have RRD).

environment:
<<: *common-vars
VRO_APP_HOSTNAME: app
# VRO_CC_HOSTNAME: cc-app
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Placeholder for Classification Contention's docker container.

@@ -1,7 +1,7 @@
#!/bin/sh
# prepare the full URL based on the hostname from AWS

exec java -jar \
eval exec java -jar \
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use eval to expand $JAVA_OPTS for compatibility with bash

@@ -12,7 +12,7 @@ if [ -e /app/entrypoint.sh ]; then
exec /app/entrypoint.sh "$@"
elif [ -e "fat.jar" ]; then
echo "Running ${JAR_FILENAME}; health check port: ${HEALTHCHECK_PORT}"
exec java -jar fat.jar "$@"
eval exec java -jar $JAVA_OPTS fat.jar "$@"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use eval to expand $JAVA_OPTS for compatibility with bash

@@ -25,7 +25,7 @@ which python3
Install dependencies and run webserver
```
pip3 install -r requirements.txt
uvicorn api:app --port 18000 --reload
uvicorn api:app --port 8120 --reload
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on lines -7 to -11
annotations:
app.kubernetes.io/owner: {{ .Values.owner }}
app.kubernetes.io/name: {{ .Values.name }}
app.kubernetes.io/version: {{ .Values.global.version | quote }}
app.kubernetes.io/env: {{ .Values.global.environment }}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved to api-gateway's deployment.yaml

Comment on lines -88 to +79
value: /{{ .Values.global.serviceUriPrefix }}
value: {{ .Values.serviceUriPrefix }}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replaced .Values.global.serviceUriPrefix with chart-specific .Values.serviceUriPrefix

@yoomlam yoomlam merged commit 4c7d466 into develop May 23, 2023
@yoomlam yoomlam deleted the yoom/deploy-apigateway branch May 23, 2023 19:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants