Skip to content

Commit

Permalink
Enable health, liveness and readiness probes (#221)
Browse files Browse the repository at this point in the history
  • Loading branch information
alfespa17 committed Jun 17, 2022
1 parent 7b70c5e commit 91afbf9
Show file tree
Hide file tree
Showing 8 changed files with 49 additions and 2 deletions.
4 changes: 4 additions & 0 deletions api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>com.yahoo.elide</groupId>
<artifactId>elide-spring-boot-starter</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ protected void configure(HttpSecurity http) throws Exception {
//http.authorizeRequests(requests -> requests.anyRequest().authenticated());
http.cors().and().authorizeRequests()
.antMatchers(HttpMethod.OPTIONS,"/**").permitAll()
.antMatchers("/actuator/**").permitAll()
.antMatchers("/callback/v1/**").permitAll()
.antMatchers("/doc").permitAll()
.and()
Expand Down
15 changes: 14 additions & 1 deletion api/src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -98,21 +98,34 @@ org.azbuilder.executor.url=${AzBuilderExecutorUrl}
#Storage Service#
#################
org.terrakube.storage.type=${StorageType}

#################
# Azure Storage #
#################
org.terrakube.storage.azure.accountName=${AzureAccountName}
org.terrakube.storage.azure.accountKey=${AzureAccountKey}

###############
# AWS Storage #
###############
org.terrakube.storage.aws.accessKey=${AwsStorageAccessKey}
org.terrakube.storage.aws.secretKey=${AwsStorageSecretKey}
org.terrakube.storage.aws.bucketName=${AwsStorageBucketName}
org.terrakube.storage.aws.region=${AwsStorageRegion}

###############
# GCP Storage #
###############
org.terrakube.storage.gcp.credentials=${GcpStorageCredentialsBase64}
org.terrakube.storage.gcp.bucketName=${GcpStorageBucketName}
org.terrakube.storage.gcp.projectId=${GcpStorageProjectId}
org.terrakube.storage.gcp.projectId=${GcpStorageProjectId}

##########
# HEALTH #
##########
management.endpoints.web.exposure.include=health
management.endpoint.health.enabled=true
management.endpoints.enabled-by-default=false
management.endpoint.health.probes.enabled=true
management.health.livenessstate.enabled=true
management.health.readinessstate.enabled=true
4 changes: 4 additions & 0 deletions executor/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>org.terrakube.terraform</groupId>
<artifactId>terraform-spring-boot-starter</artifactId>
Expand Down
12 changes: 11 additions & 1 deletion executor/src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,14 @@ org.terrakube.tools.branch=${TerrakubeToolsBranch}
#Terrakube Domains/URL#
#######################
org.terrakube.registry.domain=${TerrakubeRegistryDomain}
org.terrakube.api.url=${TerrakubeApiUrl}
org.terrakube.api.url=${TerrakubeApiUrl}

##########
# HEALTH #
##########
management.endpoints.web.exposure.include=health
management.endpoint.health.enabled=true
management.endpoints.enabled-by-default=false
management.endpoint.health.probes.enabled=true
management.health.livenessstate.enabled=true
management.health.readinessstate.enabled=true
4 changes: 4 additions & 0 deletions registry/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ protected void configure(HttpSecurity http) throws Exception {
super.configure(http);
http.cors().and().authorizeRequests()
.antMatchers("/.well-known/**").permitAll()
.antMatchers("/actuator/**").permitAll()
.antMatchers("/terraform/modules/v1/download/**").permitAll()
.antMatchers(HttpMethod.OPTIONS,"/**").permitAll()
.and()
Expand Down
10 changes: 10 additions & 0 deletions registry/src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,13 @@ org.terrakube.registry.plugin.storage.gcp.projectId=${GcpStorageProjectId}
########
org.terrakube.ui.fqdn=${TerrakubeUiURL}

##########
# HEALTH #
##########
management.endpoints.web.exposure.include=health
management.endpoint.health.enabled=true
management.endpoints.enabled-by-default=false
management.endpoint.health.probes.enabled=true
management.health.livenessstate.enabled=true
management.health.readinessstate.enabled=true

0 comments on commit 91afbf9

Please sign in to comment.