diff --git a/build.gradle b/build.gradle index b3047bf..0d0faeb 100644 --- a/build.gradle +++ b/build.gradle @@ -33,6 +33,7 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testImplementation 'org.springframework.boot:spring-boot-starter-test' testRuntimeOnly 'org.junit.platform:junit-platform-launcher' + implementation 'org.springframework.boot:spring-boot-starter-actuator' } tasks.named('test') { diff --git a/k8s/deployment.yaml.template b/k8s/deployment.yaml.template index ff8e447..9086130 100644 --- a/k8s/deployment.yaml.template +++ b/k8s/deployment.yaml.template @@ -20,6 +20,27 @@ spec: imagePullPolicy: Always ports: - containerPort: 8080 + resources: + requests: + memory: "512Mi" + cpu: "500m" + limits: + memory: "1Gi" + cpu: "1" + readinessProbe: + httpGet: + path: /actuator/health + port: 8080 + initialDelaySeconds: 5 + periodSeconds: 10 + failureThreshold: 3 + livenessProbe: + httpGet: + path: /actuator/health + port: 8080 + initialDelaySeconds: 15 + periodSeconds: 20 + failureThreshold: 3 strategy: type: RollingUpdate rollingUpdate: diff --git a/src/main/java/com/knu/algo_hive/common/controller/testController.java b/src/main/java/com/knu/algo_hive/common/controller/testController.java index fd53cbe..49b34f3 100644 --- a/src/main/java/com/knu/algo_hive/common/controller/testController.java +++ b/src/main/java/com/knu/algo_hive/common/controller/testController.java @@ -9,11 +9,11 @@ public class testController { @GetMapping("/api") public ResponseEntity mainPage() { - return ResponseEntity.ok().body("test2"); + return ResponseEntity.ok().body("test3"); } @GetMapping("/api/oh") public ResponseEntity sidePage() { - return ResponseEntity.ok().body("new test3"); + return ResponseEntity.ok().body("new test4"); } }