-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* e2e testing for Minikube * Ingress certificate test edit
- Loading branch information
Showing
20 changed files
with
481 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,22 @@ | ||
apiVersion: v1 | ||
kind: Pod | ||
spec: | ||
containers: | ||
- readinessProbe: | ||
initialDelaySeconds: 3 | ||
livenessProbe: | ||
initialDelaySeconds: 6 | ||
startupProbe: | ||
failureThreshold: 20 | ||
periodSeconds: 10 | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
labels: | ||
app.kubernetes.io/instance: probes-rc | ||
name: probes-rc | ||
spec: | ||
selector: | ||
matchLabels: | ||
app.kubernetes.io/instance: probes-rc | ||
template: | ||
spec: | ||
containers: | ||
- readinessProbe: | ||
initialDelaySeconds: 3 | ||
livenessProbe: | ||
initialDelaySeconds: 6 | ||
startupProbe: | ||
failureThreshold: 20 | ||
periodSeconds: 10 | ||
status: | ||
replicas: 1 | ||
readyReplicas: 1 | ||
updatedReplicas: 1 |
10 changes: 10 additions & 0 deletions
10
bundle/tests/scorecard/minikube-kuttl/ingress-certificate/00-assert.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
apiVersion: v1 | ||
kind: Secret | ||
type: kubernetes.io/tls | ||
metadata: | ||
name: ingress-tls-secret | ||
data: | ||
ca.crt: Y2FjcnQK | ||
destCA.crt: ZGVzdENBY3J0Cg== | ||
tls.crt: dGxzY3J0Cg== | ||
tls.key: dGxza2V5Cg== |
14 changes: 14 additions & 0 deletions
14
bundle/tests/scorecard/minikube-kuttl/ingress-certificate/00-secret.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: ingress-tls-secret | ||
type: kubernetes.io/tls | ||
data: | ||
# 'tlscrt' | ||
tls.crt: dGxzY3J0Cg== | ||
# 'tlskey' | ||
tls.key: dGxza2V5Cg== | ||
# 'cacrt' | ||
ca.crt: Y2FjcnQK | ||
# 'destCAcrt' | ||
destCA.crt: ZGVzdENBY3J0Cg== |
24 changes: 24 additions & 0 deletions
24
bundle/tests/scorecard/minikube-kuttl/ingress-certificate/01-assert.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: ingress-with-cert-rc | ||
status: | ||
replicas: 1 | ||
readyReplicas: 1 | ||
updatedReplicas: 1 | ||
--- | ||
kind: Ingress | ||
apiVersion: extensions/v1beta1 | ||
metadata: | ||
name: ingress-with-cert-rc | ||
spec: | ||
tls: | ||
- hosts: | ||
- myapp.mycompany.com | ||
secretName: ingress-tls-secret | ||
rules: | ||
- host: myapp.mycompany.com | ||
http: | ||
paths: | ||
- path: / | ||
pathType: Prefix |
16 changes: 16 additions & 0 deletions
16
bundle/tests/scorecard/minikube-kuttl/ingress-certificate/01-rc-with-cert.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
apiVersion: rc.app.stacks/v1beta2 | ||
kind: RuntimeComponent | ||
metadata: | ||
name: ingress-with-cert-rc | ||
spec: | ||
# Add fields here | ||
applicationImage: 'k8s.gcr.io/pause:2.0' | ||
replicas: 1 | ||
expose: true | ||
route: | ||
host: myapp.mycompany.com | ||
path: "/" | ||
pathType: Prefix | ||
certificateSecretRef: ingress-tls-secret | ||
termination: reencrypt | ||
|
8 changes: 8 additions & 0 deletions
8
bundle/tests/scorecard/minikube-kuttl/ingress-certificate/02-assert.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: ingress-with-cert-rc | ||
status: | ||
replicas: 1 | ||
readyReplicas: 1 | ||
updatedReplicas: 1 |
10 changes: 10 additions & 0 deletions
10
bundle/tests/scorecard/minikube-kuttl/ingress-certificate/02-delete-route.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
apiVersion: rc.app.stacks/v1beta2 | ||
kind: RuntimeComponent | ||
metadata: | ||
name: ingress-with-cert-rc | ||
spec: | ||
# Add fields here | ||
applicationImage: 'k8s.gcr.io/pause:2.0' | ||
replicas: 1 | ||
expose: false | ||
|
4 changes: 4 additions & 0 deletions
4
bundle/tests/scorecard/minikube-kuttl/ingress-certificate/02-errors.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
kind: Ingress | ||
apiVersion: extensions/v1beta1 | ||
metadata: | ||
name: ingress-with-cert-rc |
9 changes: 9 additions & 0 deletions
9
bundle/tests/scorecard/minikube-kuttl/ingress-certificate/03-delete-secret.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
apiVersion: kuttl.dev/v1beta1 | ||
kind: TestStep | ||
delete: | ||
- apiVersion: rc.app.stacks/v1beta2 | ||
kind: RuntimeComponent | ||
- apiVersion: v1 | ||
kind: Secret | ||
name: ingress-tls-secret | ||
|
21 changes: 21 additions & 0 deletions
21
bundle/tests/scorecard/minikube-kuttl/ingress/00-assert.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: ingress | ||
status: | ||
replicas: 1 | ||
readyReplicas: 1 | ||
updatedReplicas: 1 | ||
--- | ||
apiVersion: extensions/v1beta1 | ||
kind: Ingress | ||
metadata: | ||
name: ingress | ||
spec: | ||
rules: | ||
- host: myapp.mycompany.com | ||
http: | ||
paths: | ||
- path: / | ||
pathType: Prefix | ||
|
13 changes: 13 additions & 0 deletions
13
bundle/tests/scorecard/minikube-kuttl/ingress/00-ingress.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
apiVersion: rc.app.stacks/v1beta2 | ||
kind: RuntimeComponent | ||
metadata: | ||
name: ingress | ||
spec: | ||
# Add fields here | ||
applicationImage: 'k8s.gcr.io/pause:2.0' | ||
replicas: 1 | ||
expose: true | ||
route: | ||
host: myapp.mycompany.com | ||
path: "/" | ||
pathType: Prefix |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: ingress | ||
status: | ||
replicas: 1 | ||
readyReplicas: 1 | ||
updatedReplicas: 1 |
10 changes: 10 additions & 0 deletions
10
bundle/tests/scorecard/minikube-kuttl/ingress/01-delete-ingress.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
apiVersion: rc.app.stacks/v1beta2 | ||
kind: RuntimeComponent | ||
metadata: | ||
name: ingress | ||
spec: | ||
# Add fields here | ||
applicationImage: 'k8s.gcr.io/pause:2.0' | ||
replicas: 1 | ||
expose: false | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
apiVersion: extensions/v1beta1 | ||
kind: Ingress | ||
metadata: | ||
name: ingress |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: scorecard-kuttl | ||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: RoleBinding | ||
metadata: | ||
name: scorecard-kuttl | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: Role | ||
name: scorecard-kuttl | ||
subjects: | ||
- kind: ServiceAccount | ||
name: scorecard-kuttl | ||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: Role | ||
metadata: | ||
name: scorecard-kuttl | ||
rules: | ||
- apiGroups: | ||
- "" | ||
resources: | ||
- secrets | ||
verbs: | ||
- get | ||
- list | ||
- create | ||
- delete | ||
- apiGroups: | ||
- "" | ||
resources: | ||
- namespaces | ||
- pods | ||
- services | ||
- routes | ||
verbs: | ||
- get | ||
- list | ||
- apiGroups: | ||
- apps | ||
resources: | ||
- deployments | ||
- statefulsets | ||
verbs: | ||
- get | ||
- apiGroups: | ||
- autoscaling | ||
resources: | ||
- horizontalpodautoscalers | ||
verbs: | ||
- get | ||
- apiGroups: | ||
- monitoring.coreos.com | ||
resources: | ||
- servicemonitors | ||
verbs: | ||
- get | ||
- apiGroups: | ||
- image.openshift.io | ||
resources: | ||
- imagestreams | ||
verbs: | ||
- get | ||
- list | ||
- create | ||
- patch | ||
- delete | ||
- apiGroups: | ||
- events.k8s.io | ||
resources: | ||
- events | ||
verbs: | ||
- get | ||
- list | ||
- apiGroups: | ||
- serving.knative.dev | ||
resources: | ||
- services | ||
verbs: | ||
- get | ||
- apiGroups: | ||
- rc.app.stacks | ||
resources: | ||
- runtimecomponents | ||
- runtimeoperations | ||
verbs: | ||
- get | ||
- list | ||
- create | ||
- patch | ||
- delete | ||
- apiGroups: | ||
- route.openshift.io | ||
resources: | ||
- routes | ||
verbs: | ||
- get | ||
- list | ||
- delete | ||
- apiGroups: | ||
- extensions | ||
resources: | ||
- ingresses | ||
verbs: | ||
- get | ||
- list | ||
- delete |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.