Skip to content

Commit

Permalink
Revert "feat: add support for running commands in liveness/readiness/…
Browse files Browse the repository at this point in the history
…startup"

This reverts commit c5805f0.
  • Loading branch information
Muni10 committed Dec 13, 2024
1 parent c384250 commit b6b740f
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 74 deletions.
21 changes: 6 additions & 15 deletions charts/templates/nais.io_applications.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -880,11 +880,6 @@ spec:
and remedy such situations. Read more about this over at the
[Kubernetes probes documentation](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/).
properties:
commands:
description: Command(s) to run to verify liveness/readiness
items:
type: string
type: array
failureThreshold:
description: |-
When a Pod starts, and the probe fails, Kubernetes will try _failureThreshold_ times before giving up.
Expand All @@ -907,6 +902,8 @@ spec:
timeout:
description: Number of seconds after which the probe times out.
type: integer
required:
- path
type: object
logformat:
description: |-
Expand Down Expand Up @@ -1235,11 +1232,6 @@ spec:
reporting that they are not ready does not receive traffic through Kubernetes Services.
Read more about this over at the [Kubernetes readiness documentation](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/).
properties:
commands:
description: Command(s) to run to verify liveness/readiness
items:
type: string
type: array
failureThreshold:
description: |-
When a Pod starts, and the probe fails, Kubernetes will try _failureThreshold_ times before giving up.
Expand All @@ -1262,6 +1254,8 @@ spec:
timeout:
description: Number of seconds after which the probe times out.
type: integer
required:
- path
type: object
redirects:
description: List of ingress redirects
Expand Down Expand Up @@ -1421,11 +1415,6 @@ spec:
application startup. This can be used to adopt liveness checks on slow starting containers, avoiding them getting
killed by Kubernetes before they are up and running.
properties:
commands:
description: Command(s) to run to verify liveness/readiness
items:
type: string
type: array
failureThreshold:
description: |-
When a Pod starts, and the probe fails, Kubernetes will try _failureThreshold_ times before giving up.
Expand All @@ -1448,6 +1437,8 @@ spec:
timeout:
description: Number of seconds after which the probe times out.
type: integer
required:
- path
type: object
strategy:
description: Specifies the strategy used to replace old Pods by new
Expand Down
21 changes: 6 additions & 15 deletions charts/templates/nais.io_naisjobs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -748,11 +748,6 @@ spec:
and remedy such situations. Read more about this over at the
[Kubernetes probes documentation](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/).
properties:
commands:
description: Command(s) to run to verify liveness/readiness
items:
type: string
type: array
failureThreshold:
description: |-
When a Pod starts, and the probe fails, Kubernetes will try _failureThreshold_ times before giving up.
Expand All @@ -775,6 +770,8 @@ spec:
timeout:
description: Number of seconds after which the probe times out.
type: integer
required:
- path
type: object
logformat:
description: |-
Expand Down Expand Up @@ -1058,11 +1055,6 @@ spec:
reporting that they are not ready does not receive traffic through Kubernetes Services.
Read more about this over at the [Kubernetes readiness documentation](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/).
properties:
commands:
description: Command(s) to run to verify liveness/readiness
items:
type: string
type: array
failureThreshold:
description: |-
When a Pod starts, and the probe fails, Kubernetes will try _failureThreshold_ times before giving up.
Expand All @@ -1085,6 +1077,8 @@ spec:
timeout:
description: Number of seconds after which the probe times out.
type: integer
required:
- path
type: object
redis:
description: |-
Expand Down Expand Up @@ -1171,11 +1165,6 @@ spec:
application startup. This can be used to adopt liveness checks on slow starting containers, avoiding them getting
killed by Kubernetes before they are up and running.
properties:
commands:
description: Command(s) to run to verify liveness/readiness
items:
type: string
type: array
failureThreshold:
description: |-
When a Pod starts, and the probe fails, Kubernetes will try _failureThreshold_ times before giving up.
Expand All @@ -1198,6 +1187,8 @@ spec:
timeout:
description: Number of seconds after which the probe times out.
type: integer
required:
- path
type: object
successfulJobsHistoryLimit:
description: Specify how many completed Jobs should be kept.
Expand Down
21 changes: 6 additions & 15 deletions config/crd/bases/nais.io_applications.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -880,11 +880,6 @@ spec:
and remedy such situations. Read more about this over at the
[Kubernetes probes documentation](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/).
properties:
commands:
description: Command(s) to run to verify liveness/readiness
items:
type: string
type: array
failureThreshold:
description: |-
When a Pod starts, and the probe fails, Kubernetes will try _failureThreshold_ times before giving up.
Expand All @@ -907,6 +902,8 @@ spec:
timeout:
description: Number of seconds after which the probe times out.
type: integer
required:
- path
type: object
logformat:
description: |-
Expand Down Expand Up @@ -1235,11 +1232,6 @@ spec:
reporting that they are not ready does not receive traffic through Kubernetes Services.
Read more about this over at the [Kubernetes readiness documentation](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/).
properties:
commands:
description: Command(s) to run to verify liveness/readiness
items:
type: string
type: array
failureThreshold:
description: |-
When a Pod starts, and the probe fails, Kubernetes will try _failureThreshold_ times before giving up.
Expand All @@ -1262,6 +1254,8 @@ spec:
timeout:
description: Number of seconds after which the probe times out.
type: integer
required:
- path
type: object
redirects:
description: List of ingress redirects
Expand Down Expand Up @@ -1421,11 +1415,6 @@ spec:
application startup. This can be used to adopt liveness checks on slow starting containers, avoiding them getting
killed by Kubernetes before they are up and running.
properties:
commands:
description: Command(s) to run to verify liveness/readiness
items:
type: string
type: array
failureThreshold:
description: |-
When a Pod starts, and the probe fails, Kubernetes will try _failureThreshold_ times before giving up.
Expand All @@ -1448,6 +1437,8 @@ spec:
timeout:
description: Number of seconds after which the probe times out.
type: integer
required:
- path
type: object
strategy:
description: Specifies the strategy used to replace old Pods by new
Expand Down
21 changes: 6 additions & 15 deletions config/crd/bases/nais.io_naisjobs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -748,11 +748,6 @@ spec:
and remedy such situations. Read more about this over at the
[Kubernetes probes documentation](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/).
properties:
commands:
description: Command(s) to run to verify liveness/readiness
items:
type: string
type: array
failureThreshold:
description: |-
When a Pod starts, and the probe fails, Kubernetes will try _failureThreshold_ times before giving up.
Expand All @@ -775,6 +770,8 @@ spec:
timeout:
description: Number of seconds after which the probe times out.
type: integer
required:
- path
type: object
logformat:
description: |-
Expand Down Expand Up @@ -1058,11 +1055,6 @@ spec:
reporting that they are not ready does not receive traffic through Kubernetes Services.
Read more about this over at the [Kubernetes readiness documentation](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/).
properties:
commands:
description: Command(s) to run to verify liveness/readiness
items:
type: string
type: array
failureThreshold:
description: |-
When a Pod starts, and the probe fails, Kubernetes will try _failureThreshold_ times before giving up.
Expand All @@ -1085,6 +1077,8 @@ spec:
timeout:
description: Number of seconds after which the probe times out.
type: integer
required:
- path
type: object
redis:
description: |-
Expand Down Expand Up @@ -1171,11 +1165,6 @@ spec:
application startup. This can be used to adopt liveness checks on slow starting containers, avoiding them getting
killed by Kubernetes before they are up and running.
properties:
commands:
description: Command(s) to run to verify liveness/readiness
items:
type: string
type: array
failureThreshold:
description: |-
When a Pod starts, and the probe fails, Kubernetes will try _failureThreshold_ times before giving up.
Expand All @@ -1198,6 +1187,8 @@ spec:
timeout:
description: Number of seconds after which the probe times out.
type: integer
required:
- path
type: object
successfulJobsHistoryLimit:
description: Specify how many completed Jobs should be kept.
Expand Down
4 changes: 1 addition & 3 deletions pkg/apis/nais.io/v1/naiserator_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ type PreStopHook struct {
// Liveness probe and readiness probe definitions.
type Probe struct {
// HTTP endpoint path that signals 200 OK if the application has started successfully.
Path string `json:"path,omitempty"`
Path string `json:"path"`
// Port for the startup probe.
Port int `json:"port,omitempty"`
// Number of seconds after the container has started before startup probes are initiated.
Expand All @@ -262,8 +262,6 @@ type Probe struct {
FailureThreshold int `json:"failureThreshold,omitempty"`
// Number of seconds after which the probe times out.
Timeout int `json:"timeout,omitempty"`
// Command(s) to run to verify liveness/readiness
Commands []string `json:"commands,omitempty"`
}

type SecretPath struct {
Expand Down
11 changes: 3 additions & 8 deletions pkg/apis/nais.io/v1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions pkg/apis/nais.io/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit b6b740f

Please sign in to comment.