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

Feat: 헬스 체크 활성화 #55

Merged
merged 1 commit into from
Nov 6, 2023
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ dependencies {
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-websocket'
implementation 'org.springframework.boot:spring-boot-starter-actuator'
implementation 'org.thymeleaf.extras:thymeleaf-extras-springsecurity5'
compileOnly 'org.projectlombok:lombok'
runtimeOnly 'com.mysql:mysql-connector-j'
Expand Down
7 changes: 7 additions & 0 deletions k8s/manifest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@ spec:
cpu: 0.3
ports:
- containerPort: 8080
readinessProbe:
httpGet:
path: /actuator/health
port: 8080
initialDelaySeconds: 30
periodSeconds: 5
failureThreshold: 24
---
apiVersion: v1
kind: Service
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public class WebSecurityConfig {
private final JwtTokenProvider jwtTokenProvider;

private static final String[] AUTH_LIST = { // swagger 관련 URl
"/v2/api-docs", "/swagger-resources/**", "/swagger-ui.html", "/swagger-ui/**"
"/v2/api-docs", "/swagger-resources/**", "/swagger-ui.html", "/swagger-ui/**", "/actuator/health"
};

@Bean
Expand Down
7 changes: 7 additions & 0 deletions src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,10 @@ spring.mvc.pathmatch.matching-strategy=ant_path_matcher
spring.redis.serializer=org.springframework.data.redis.serializer.Jackson2JsonRedisSerializer
spring.cache.type=redis
spring.cache.redis.cache-null-values=true

#actuator
management.endpoints.enabled-by-default=false
management.endpoint.health.enabled=true
management.endpoints.jmx.exposure.exclude = *
management.endpoints.web.exposure.include = health