Skip to content

Commit cbb700a

Browse files
committed
updated w/ debug base image and also removed trace from readiness checks
1 parent 97bfe14 commit cbb700a

File tree

9 files changed

+34
-4
lines changed

9 files changed

+34
-4
lines changed

examples-bootiful-gcp/helloworld-ui/src/main/java/com/example/guestbook/HelloworldUiController.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ public HelloworldUiController(HelloworldService helloworldService, GuestbookServ
4141

4242
@GetMapping("/")
4343
public String index(HttpSession session, Model model) {
44-
log.info("starting index");
4544
if (model.containsAttribute("name")) {
4645
String name = (String) model.asMap().get("name");
4746
Map<String, String> greeting = helloworldService.greeting(name);

examples-bootiful-gcp/kubernetes/guestbook-deployment.yaml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,18 @@ spec:
4242
containers:
4343
- name: guestbook-service
4444
image: gcr.io/wise-coyote-827/bootiful-guestbook-service:latest
45-
readinessProbe:
45+
livenessProbe:
46+
initialDelaySeconds: 30
4647
httpGet:
4748
path: /actuator/health
4849
port: 8080
50+
readinessProbe:
51+
httpGet:
52+
path: /api
53+
port: 8080
54+
httpHeaders:
55+
- name: x-b3-sampled
56+
value: "0"
4957
resources:
5058
requests:
5159
cpu: 0.5

examples-bootiful-gcp/kubernetes/guestbook-service.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ spec:
2525
ports:
2626
- port: 8080
2727
targetPort: 8080
28+
name: http
2829
selector:
2930
app: guestbook-service
3031
serving: "true"

examples-bootiful-gcp/kubernetes/helloworld-deployment.yaml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,18 @@ spec:
4141
containers:
4242
- name: helloworld-service
4343
image: gcr.io/wise-coyote-827/bootiful-helloworld-service:latest
44-
readinessProbe:
44+
livenessProbe:
45+
initialDelaySeconds: 30
4546
httpGet:
4647
path: /actuator/health
4748
port: 8080
49+
readinessProbe:
50+
httpGet:
51+
path: /hello/test
52+
port: 8080
53+
httpHeaders:
54+
- name: x-b3-sampled
55+
value: "0"
4856
resources:
4957
requests:
5058
cpu: 0.5

examples-bootiful-gcp/kubernetes/helloworld-service.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ spec:
2525
ports:
2626
- port: 8080
2727
targetPort: 8080
28+
name: http
2829
selector:
2930
app: helloworld-service
3031
serving: "true"

examples-bootiful-gcp/kubernetes/mysql-service.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ spec:
99
ports:
1010
# the port that this service should serve on
1111
- port: 3306
12+
name: mysql
1213
# label keys and values that must match in order to receive traffic for this service
1314
selector:
1415
app: mysql

examples-bootiful-gcp/kubernetes/redis-service.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,6 @@ spec:
2525
ports:
2626
- port: 6379
2727
targetPort: 6379
28+
name: redis
2829
selector:
2930
app: redis

examples-bootiful-gcp/kubernetes/ui-deployment.yaml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,18 @@ spec:
4949
value: http://guestbook-service:8080
5050
- name: SPRING_REDIS_HOST
5151
value: redis
52-
readinessProbe:
52+
livenessProbe:
53+
initialDelaySeconds: 30
5354
httpGet:
5455
path: /actuator/health
5556
port: 8080
57+
readinessProbe:
58+
httpGet:
59+
path: /
60+
port: 8080
61+
httpHeaders:
62+
- name: x-b3-sampled
63+
value: "0"
5664
resources:
5765
requests:
5866
cpu: 0.5

examples-bootiful-gcp/pom.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@
4444
<artifactId>jib-maven-plugin</artifactId>
4545
<version>0.10.1</version>
4646
<configuration>
47+
<from>
48+
<image>gcr.io/distroless/java:debug</image>
49+
</from>
4750
<to>
4851
<image>${docker.image.prefix}/bootiful-${project.artifactId}</image>
4952
</to>

0 commit comments

Comments
 (0)