Skip to content

Commit

Permalink
feat: multiple enhancements (#75)
Browse files Browse the repository at this point in the history
probes
access logs
health
  • Loading branch information
mishraomp authored May 26, 2024
1 parent 3a4984b commit 6fb2a99
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 4 deletions.
19 changes: 17 additions & 2 deletions charts/nr-oracle-service/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,27 @@ spec:
protocol: TCP
livenessProbe:
httpGet:
path: /
path: /health
port: http
timeoutSeconds: 5
periodSeconds: 30
initialDelaySeconds: 20
failureThreshold: 6
readinessProbe:
httpGet:
path: /
path: /health
port: http
timeoutSeconds: 5
periodSeconds: 10
initialDelaySeconds: 5
startupProbe:
httpGet:
path: /health
port: http
timeoutSeconds: 5
periodSeconds: 10
failureThreshold: 6

resources:
{{- toYaml .Values.resources | nindent 12 }}
env:
Expand Down
1 change: 1 addition & 0 deletions src/main/java/ca/bc/gov/nrs/api/Application.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public Application(QueryExecutorService queryExecutorService) {
}

@GET
@Path("health")
public Response healthCheck() {
var result = queryExecutorService.healthCheck();
if (result == 0) {
Expand Down
7 changes: 5 additions & 2 deletions src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,13 @@ quarkus.http.port=${HTTP_PORT:3000}
%dev.quarkus.datasource.jdbc.url=jdbc:oracle:thin:@${DB_HOST}:1521/${DB_NAME}
api.key=${API_KEY}
quarkus.http.access-log.enabled=${ACCESS_LOG_ENABLED:false}
quarkus.http.access-log.pattern=%h %l %u %t "%R" %s %b "%{i,Referer}" "%{i,User-Agent}"
quarkus.http.access-log.exclude-pattern=/health
quarkus.native.additional-build-args=-march=compatibility
quarkus.swagger-ui.enable=true
quarkus.swagger-ui.always-include=true
quarkus.native.add-all-charsets=true
# Trigger build.

#Logging
quarkus.log.level=${LOGGING_LEVEL:INFO}
quarkus.console.color=true

0 comments on commit 6fb2a99

Please sign in to comment.