mirror of https://github.com/k3s-io/k3s
Adding a readiness probe to kubectl e2e tests.
parent
3bbf55d38b
commit
3f58a0b15b
|
@ -0,0 +1,19 @@
|
|||
# Copy of pod.yaml without file extension for test
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: nginx
|
||||
labels:
|
||||
name: nginx
|
||||
spec:
|
||||
containers:
|
||||
- name: nginx
|
||||
image: nginx
|
||||
ports:
|
||||
- containerPort: 80
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: 80
|
||||
initialDelaySeconds: 5
|
||||
timeoutSeconds: 5
|
|
@ -170,8 +170,8 @@ var _ = Describe("Kubectl client", func() {
|
|||
var podPath string
|
||||
|
||||
BeforeEach(func() {
|
||||
podPath = filepath.Join(testContext.RepoRoot, "docs/user-guide/pod.yaml")
|
||||
By("creating the pod")
|
||||
podPath = filepath.Join(testContext.RepoRoot, "examples/readiness-probe-pod")
|
||||
By(fmt.Sprintf("creating the pod from %v", podPath))
|
||||
runKubectlOrDie("create", "-f", podPath, fmt.Sprintf("--namespace=%v", ns))
|
||||
checkPodsRunningReady(c, ns, []string{simplePodName}, podStartTimeout)
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue