-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update deps, add example k8s config, etc
- Loading branch information
Showing
9 changed files
with
117 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: learnmake-ms | ||
spec: | ||
selector: | ||
matchLabels: | ||
app: learnmake-ms | ||
template: | ||
metadata: | ||
labels: | ||
app: learnmake-ms | ||
spec: | ||
containers: | ||
- name: learnmake-ms | ||
image: gcr.io/catpet-205415/learnmake-microservices:1.0.8 | ||
ports: | ||
- containerPort: 8080 | ||
#resources: | ||
# limits: | ||
# memory: "200Mi" | ||
# requests: | ||
# memory: "100Mi" | ||
livenessProbe: | ||
httpGet: | ||
port: 8080 | ||
path: /api/pulse | ||
initialDelaySeconds: 5 | ||
periodSeconds: 30 | ||
successThreshold: 1 | ||
failureThreshold: 2 | ||
|
||
--- | ||
apiVersion: extensions/v1beta1 | ||
kind: Ingress | ||
metadata: | ||
name: learnmake-ms-ingress | ||
spec: | ||
backend: | ||
serviceName: learnmake-ms | ||
servicePort: 8080 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 8 additions & 4 deletions
12
src/main/java/learnmake/microservices/app/ApiController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,26 @@ | ||
package learnmake.microservices.app; | ||
|
||
import lombok.extern.slf4j.Slf4j; | ||
import org.springframework.http.HttpStatus; | ||
import org.springframework.http.ResponseEntity; | ||
import org.springframework.stereotype.Controller; | ||
import org.springframework.web.bind.annotation.GetMapping; | ||
import org.springframework.web.bind.annotation.RequestMapping; | ||
import org.springframework.web.bind.annotation.ResponseBody; | ||
|
||
@Slf4j | ||
@Controller | ||
@RequestMapping("/api") | ||
public class ApiController extends BaseController { | ||
public class ApiController { | ||
|
||
|
||
// TODO: API endpoints goes here | ||
|
||
@GetMapping("/pulse") | ||
public @ResponseBody | ||
String pulseCheck() { | ||
ResponseEntity<String> pulseCheck() { | ||
|
||
logThis(ApiController.class.getSimpleName() + ".pulseCheck", "pulse"); | ||
return "OK";//new ResponseEntity<>("OK", HttpStatus.OK); | ||
log.info(".pulseCheck {}", "/pulse"); | ||
return new ResponseEntity<>("OK", HttpStatus.OK); | ||
} | ||
} |
24 changes: 0 additions & 24 deletions
24
src/main/java/learnmake/microservices/app/BaseController.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters