Skip to content
Open
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
6 changes: 4 additions & 2 deletions bindata/etcd/quorum-restore-pod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,10 @@ ${COMPUTED_ENV_VARS}
memory: 600Mi
cpu: 300m
readinessProbe:
tcpSocket:
port: 2380
httpGet:
port: 9980
path: readyz
scheme: HTTPS
Comment on lines +67 to +70
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Verify HTTP probe path format: "readyz" should be "/readyz".

Kubernetes HTTPGet probes expect paths to begin with a forward slash. The path should be specified as "/readyz" rather than "readyz" to comply with the Probe API specification and ensure reliable probe execution.

Proposed fix:

      httpGet:
        port: 9980
-       path: readyz
+       path: /readyz
        scheme: HTTPS

🌐 Web query:

Kubernetes HTTPGet probe path format requirements

💡 Result:

Short answer

  • httpGet.path is a string URL path (defaults to "/"). The kubelet will send an HTTP GET to podIP:port. Use an absolute path (beginning with "/") as a best practice. [1][2]

Details / sources

  • Kubernetes docs: httpGet has fields path (Path to access on the HTTP server) and default is "/". The probe is sent to the pod IP and specified port. [1]
  • API reference / HTTPGetAction: path is a string (Path to access on the HTTP server). Treat it as a normal URL path. [2]

If you want, I can show examples and edge cases (query strings, virtual-hosting via Host header, or HTTPS scheme).

Sources:
[1] Kubernetes docs — Configure Liveness/Readiness/Startup probes.
[2] Kubernetes HTTPGetAction API reference.


</shell_scripts>


🏁 Script executed:

#!/bin/bash
# Check the current state of the file and related probe configurations
echo "=== Checking quorum-restore-pod.yaml ===" 
fd -t f "quorum-restore-pod.yaml" --exec cat {}

echo -e "\n=== Searching for other HTTPGet probes in YAML files ==="
rg -n "httpGet:" --type yaml -A 3 -B 1 bindata/

Length of output: 6185


Fix HTTPGet probe paths to use absolute paths across all affected files.

Kubernetes best practice requires httpGet probe paths to begin with "/" (absolute path). The default value is "/" and the probe is sent to podIP:port. Update the following files:

  • bindata/etcd/quorum-restore-pod.yaml line 69: path: readyzpath: /readyz
  • bindata/etcd/pod.gotpl.yaml line 233: path: readyzpath: /readyz
  • bindata/etcd/pod.gotpl.yaml line 242: path: healthzpath: /healthz
  • bindata/etcd/pod.gotpl.yaml line 253: path: readyzpath: /readyz
  • bindata/etcd/restore-pod.yaml line 125: path: readyzpath: /readyz
🤖 Prompt for AI Agents
In bindata/etcd/quorum-restore-pod.yaml around lines 67-70 (line 69),
bindata/etcd/pod.gotpl.yaml around lines 233, 242, and 253, and
bindata/etcd/restore-pod.yaml around line 125, the httpGet probe path values are
relative (e.g., "readyz", "healthz"); update each to use absolute paths by
prefixing with a slash (e.g., "readyz" -> "/readyz", "healthz" -> "/healthz") so
probes become path: /readyz or path: /healthz respectively. Ensure you update
all listed files and lines to use the absolute path format for Kubernetes
httpGet probes.

failureThreshold: 3
initialDelaySeconds: 3
periodSeconds: 5
Expand Down
6 changes: 4 additions & 2 deletions bindata/etcd/restore-pod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,10 @@ ${COMPUTED_ENV_VARS}
memory: 600Mi
cpu: 300m
readinessProbe:
tcpSocket:
port: 2380
httpGet:
port: 9980
path: readyz
scheme: HTTPS
Comment on lines +123 to +126
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

❓ Verification inconclusive

Verify HTTP probe path format: "readyz" should be "/readyz".

Same issue as in the companion file: Kubernetes HTTPGet probes expect paths to begin with a forward slash. Correct the path to "/readyz" for compliance with the Probe API specification.

Proposed fix:

      httpGet:
        port: 9980
-       path: readyz
+       path: /readyz
        scheme: HTTPS

Verify HTTP probe path format: "readyz" should be "/readyz".

Kubernetes HTTPGet probes access a path on the HTTP server, with "/" as the default. The kubelet sends an HTTP request to the specified port and path to perform the check. All official Kubernetes examples use leading slashes in paths, such as /healthz. The current path readyz lacks the required leading slash and should be corrected to /readyz to comply with HTTP URI conventions and Kubernetes best practices.

Proposed fix:

      httpGet:
        port: 9980
-       path: readyz
+       path: /readyz
        scheme: HTTPS
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
httpGet:
port: 9980
path: readyz
scheme: HTTPS
httpGet:
port: 9980
path: /readyz
scheme: HTTPS
🤖 Prompt for AI Agents
In bindata/etcd/restore-pod.yaml around lines 123 to 126, the HTTP probe path is
set to "readyz" without a leading slash; change the path value to "/readyz" so
the HTTPGet probe uses a proper URI path (add the leading "/" to the path
string).

failureThreshold: 3
initialDelaySeconds: 3
periodSeconds: 5
Expand Down