Skip to content

Commit 2a17cfb

Browse files
authored
Merge pull request kubernetes#85960 from johnbelamaric/podspec-behaviors
Initial behavior examples for conformance
2 parents 7a01cdc + becdd79 commit 2a17cfb

File tree

3 files changed

+80
-0
lines changed

3 files changed

+80
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
suite: service/spec
2+
description: Base suite for services
3+
behaviors:
4+
- id: service/basic-create/selector
5+
description: When a Service resource is created with type "ClusterIP", "NodePort", or "LoadBalancer",
6+
and a selector is specified, an Endpoints object is generated based with the IPs of pods with
7+
label keys and values matching the selector.
8+
- id: service/basic-create/no-selector
9+
description: When a Service resource is created and a no selector is specified, no changes are made
10+
to any corresponding Endpoints object.
11+
- id: service/type/ClusterIP/empty
12+
description: When the Service type is specified as "ClusterIP" and the clusterIP
13+
field is empty, a cluster-internal IP address for load-balancing to endpoints is
14+
allocated.
15+
- id: service/type/ClusterIP/static
16+
description: When the Service type is specified as "ClusterIP" and the clusterIP
17+
field is specified as an IP address in the cluster service range, and that IP is
18+
not already assigned to another service, that IP is be allocated as a cluster-internal
19+
IP address for load-balancing to endpoints.
20+
- id: service/type/ClusterIP/None
21+
description: When the Service type is specified as "ClusterIP" and the clusterIP
22+
field is "None", no virtual IP is allocated and the endpoints are published as a
23+
set of endpoints rather than a stable IP.
24+
- id: service/type/NodePort
25+
description: When the Service type is specified as "NodePort" , a cluster-internal
26+
IP address for load-balancing to endpoints is allocated as for type "ClusterIP".
27+
Additionally, a cluster-wide port is allocated on every node, routing to the clusterIP.
28+
- id: service/type/ExternalName
29+
description: When the Service type is specified as "ExternalName", the cluster DNS provider
30+
publishes a CNAME pointing from the service to the specified external name.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
suite: pod/readinessGates
2+
description: Suite for pod readiness gates
3+
behaviors:
4+
- id: pod/readinessGates/single
5+
description: If a readinessGate is specified and the corresponding condition is not "True", then the Pod Ready condition MUST be "False", even if all containers are Ready.
6+
- id: pod/readinessGates/multiple
7+
description: If multiple readinessGates are specified and the corresponding condition is not "True" for one or more of these, then the Pod Ready condition MUST be "False", even if all containers are Ready.
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
suite: pod/spec
2+
description: Base suite for pods
3+
behaviors:
4+
- id: pod/basic-create
5+
description: When a Pod resource is created with a single container and sufficient resources, a Pod MUST be created on a node with the specified container image.
6+
- id: pod/basic-delete
7+
description: When a Pod resource is delete, the Pod containers must receive a TERM signal and the Pod MUST be deleted.
8+
- id: pod/hostname
9+
description: When the hostname field is set, a container running in the Pod MUST report the hostname as the specified value.
10+
- id: pod/subdomain
11+
description: If specified, the fully qualified Pod hostname will be "<hostname>.<subdomain>.<pod
12+
namespace>.svc.<cluster domain>". If not specified, the pod will not have a
13+
domainname at all.
14+
- id: pod/terminationGracePeriodSeconds/in-spec
15+
description: When the terminationGracePeriodSeconds is specified in the spec,
16+
processes running in the Pod MUST NOT receive a hard termination signal for at
17+
least that number of seconds after a delete request.
18+
- id: pod/terminationGracePeriodSeconds/in-delete
19+
description: When the terminationGracePeriodSeconds is specified in a delete request,
20+
processes running in the Pod MUST NOT receive a hard termination signal for at
21+
least that number of seconds after the delete request.
22+
- id: pod/activeDeadlineSeconds
23+
description: Optional duration in seconds the pod may be active on the node relative
24+
to StartTime before the system will actively try to mark it failed and kill
25+
associated containers. Value must be a positive integer.
26+
- id: pod/hostNetwork/true
27+
description: When hostNetwork is set to true, the Pod MUST use the host's network
28+
namespace.
29+
- id: pod/hostNetwork/false
30+
description: When hostNetwork is set to false, the Pod MUST NOT use the host's network
31+
namespace.
32+
- id: pod/hostPID/true
33+
description: When hostPID is set to true, the Pod MUST use the host's process
34+
namespace.
35+
- id: pod/hostPID/false
36+
description: When hostPID is set to false, the Pod MUST NOT use the host's process
37+
namespace.
38+
- id: pod/hostIPC/true
39+
description: When hostIPC is set to true, the Pod MUST use the host's inter-process
40+
communication namespace.
41+
- id: pod/hostIPC/false
42+
description: When hostIPC is set to false, the Pod MUST NOT use the host's inter-process
43+
communication namespace.

0 commit comments

Comments
 (0)