From 9df5282fb54029b77b7e63faa1b096b2137177d6 Mon Sep 17 00:00:00 2001 From: BoboTheBarbar <72159062+BoboTheBarbar@users.noreply.github.com> Date: Fri, 10 Mar 2023 18:22:47 +0100 Subject: [PATCH 1/2] refactor: simplify explanation for exposed ports for httpGet in probes I think there is no reason to illustrate an exposed containerport 80, since it would obfuscate that there is no reason for this port to be exposed. --- e.observability.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/e.observability.md b/e.observability.md index 01c3e64f..22a63148 100644 --- a/e.observability.md +++ b/e.observability.md @@ -114,12 +114,10 @@ spec: imagePullPolicy: IfNotPresent name: nginx resources: {} - ports: - - containerPort: 80 # Note: Readiness probes runs on the container during its whole lifecycle. Since nginx exposes 80, containerPort: 80 is not required for readiness to work. readinessProbe: # declare the readiness probe httpGet: # add this line path: / # - port: 80 # + port: 80 # Since nginx exposes 80, exposing containerPort: 80 is not required for readiness to work. dnsPolicy: ClusterFirst restartPolicy: Never status: {} From f559c5b2e4cbbd8875017b9f314bb132f1a43d16 Mon Sep 17 00:00:00 2001 From: BorisP Date: Sat, 8 Apr 2023 18:24:09 +0200 Subject: [PATCH 2/2] docs: clarifies documentation on port usage --- e.observability.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/e.observability.md b/e.observability.md index 22a63148..1b9f60ae 100644 --- a/e.observability.md +++ b/e.observability.md @@ -114,10 +114,11 @@ spec: imagePullPolicy: IfNotPresent name: nginx resources: {} + # Note: Readiness probes runs on the container during its whole lifecycle. Since nginx will serve on port 80 and the readiness probe tests that port from within the container, it is not required to expose containerPort 80. readinessProbe: # declare the readiness probe httpGet: # add this line path: / # - port: 80 # Since nginx exposes 80, exposing containerPort: 80 is not required for readiness to work. + port: 80 # test usage of containerport 80 dnsPolicy: ClusterFirst restartPolicy: Never status: {}