Skip to content

Commit d3b8ed1

Browse files
committed
feat(lifecycle Sleep): Updated CRD example
1 parent 06c046a commit d3b8ed1

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

crd.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,13 @@ spec:
4141
preStop:
4242
description: This hook is called immediately before a container is terminated due to an API request or management event such as a liveness/startup probe failure, preemption, resource contention and others
4343
type: object
44+
oneOf:
45+
- required: ["exec"]
46+
not:
47+
required: ["sleep"]
48+
- required: ["sleep"]
49+
not:
50+
required: ["exec"]
4451
properties:
4552
exec:
4653
description: Executes a specific command, inside the cgroups and namespaces of the Container.
@@ -50,6 +57,12 @@ spec:
5057
type: array
5158
items:
5259
type: string
60+
sleep:
61+
description: Pauses the container for a specified duration..
62+
type: object
63+
properties:
64+
seconds:
65+
type: integer
5366
names:
5467
kind: DatabaseCredentialBinding
5568
plural: databasecredentialbindings

0 commit comments

Comments
 (0)