From 69b7ad113fc927b146c2116bdcafe0c63f714eb9 Mon Sep 17 00:00:00 2001 From: RomilShah Date: Mon, 4 Sep 2023 16:51:22 +0530 Subject: [PATCH] fix(explain): corrects livenessProbe examples in packages --- .../manifests/package-nonros-device.yaml | 2 +- .../package-ros-device-no-rosbag.yaml | 4 +-- .../manifests/package-ros-device-rosbag.yaml | 2 +- riocli/apply/manifests/package.yaml | 25 ++++++++++++++++--- 4 files changed, 25 insertions(+), 8 deletions(-) diff --git a/riocli/apply/manifests/package-nonros-device.yaml b/riocli/apply/manifests/package-nonros-device.yaml index 0cea43f0..e7b057ed 100644 --- a/riocli/apply/manifests/package-nonros-device.yaml +++ b/riocli/apply/manifests/package-nonros-device.yaml @@ -41,7 +41,7 @@ spec: cpu: 0.025 # Unit: Core (Optional) memory: 128 # Unit: MB (Optional) livenessProbe: - http: + httpGet: path: "/" port: 90 initialDelaySeconds: 5 # Number of seconds after the container has started before liveness probes are initiated. diff --git a/riocli/apply/manifests/package-ros-device-no-rosbag.yaml b/riocli/apply/manifests/package-ros-device-no-rosbag.yaml index 743e1d4d..87348d7e 100644 --- a/riocli/apply/manifests/package-ros-device-no-rosbag.yaml +++ b/riocli/apply/manifests/package-ros-device-no-rosbag.yaml @@ -22,7 +22,7 @@ spec: cpu: 0.025 # Unit: Core (Optional) memory: 128 # Unit: MB (Optional) livenessProbe: # Optional - tcp: + tcpSocket: port: 999 initialDelaySeconds: 5 # Number of seconds after the container has started before liveness probes are initiated. periodSeconds: 10 # How often (in seconds) to perform the probe. @@ -41,7 +41,7 @@ spec: cpu: 0.025 # Unit: Core (Optional) memory: 128 # Unit: MB (Optional) livenessProbe: # Optional - http: + httpGet: path: "/" port: 90 initialDelaySeconds: 5 # Number of seconds after the container has started before liveness probes are initiated. diff --git a/riocli/apply/manifests/package-ros-device-rosbag.yaml b/riocli/apply/manifests/package-ros-device-rosbag.yaml index 61dc48f2..17f21afe 100644 --- a/riocli/apply/manifests/package-ros-device-rosbag.yaml +++ b/riocli/apply/manifests/package-ros-device-rosbag.yaml @@ -22,7 +22,7 @@ spec: cpu: 0.025 # Unit: Core (Optional) memory: 128 # Unit: MB (Optional) livenessProbe: # Optional - http: + httpGet: path: "/" port: 90 initialDelaySeconds: 5 # Number of seconds after the container has started before liveness probes are initiated. diff --git a/riocli/apply/manifests/package.yaml b/riocli/apply/manifests/package.yaml index f8c3635b..b030c5f2 100644 --- a/riocli/apply/manifests/package.yaml +++ b/riocli/apply/manifests/package.yaml @@ -407,7 +407,7 @@ spec: depends: kind: build nameOrGUID: "build" - - name: "exec-docker" + - name: "exec-docker-01" type: docker # Options: [docker (default), build, preInstalled] command: "roslaunch talker talker.launch" runAsBash: True @@ -415,9 +415,8 @@ spec: cpu: 0.025 # Unit: Core (Optional) memory: 128 # Unit: MB (Optional) livenessProbe: # Optional - exec: - command: - - "shell-cmd" + tcpSocket: + port: 8080 initialDelaySeconds: 5 # Number of seconds after the container has started before liveness probes are initiated. periodSeconds: 10 # How often (in seconds) to perform the probe. failureThreshold: 1 # Minimum consecutive failures for the probe to be considered failed after having succeeded. @@ -430,6 +429,24 @@ spec: depends: kind: secret nameOrGUID: "secret-docker" + - name: "exec-docker-02" + type: docker # Options: [docker (default), build, preInstalled] + runAsBash: True + limits: # Optional + cpu: 0.025 # Unit: Core (Optional) + memory: 128 # Unit: MB (Optional) + livenessProbe: # Optional + httpGet: + path: "/" + port: 80 + initialDelaySeconds: 5 # Number of seconds after the container has started before liveness probes are initiated. + periodSeconds: 10 # How often (in seconds) to perform the probe. + failureThreshold: 1 # Minimum consecutive failures for the probe to be considered failed after having succeeded. + successThreshold: 3 # Minimum consecutive successes for the probe to be considered successful after having failed. + timeoutSeconds: 1 # Number of seconds after which the probe times out. + docker: + image: "nginx:latest" + imagePullPolicy: "Always" # Always, Never, IfNotPresent(default) - name: "exec-preInstalled" type: preInstalled # Options: [docker (default), build, preInstalled] command: "roslaunch talker talker.launch"