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

Enable health, liveness and readiness probes #221

Merged
merged 2 commits into from
Jun 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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