chore: move httpbun to be part of framework (#9955)
Signed-off-by: Spazzy <brendankamp757@gmail.com>
This commit is contained in:
parent
90ed0ccdbe
commit
60bf6ba642
13 changed files with 265 additions and 204 deletions
|
|
@ -34,7 +34,7 @@ import (
|
|||
)
|
||||
|
||||
var _ = framework.IngressNginxDescribe("[Flag] enable-ssl-passthrough", func() {
|
||||
f := framework.NewDefaultFramework("ssl-passthrough")
|
||||
f := framework.NewDefaultFramework("ssl-passthrough", framework.WithHTTPBunEnabled())
|
||||
|
||||
ginkgo.BeforeEach(func() {
|
||||
err := f.UpdateIngressControllerDeployment(func(deployment *appsv1.Deployment) error {
|
||||
|
|
@ -86,7 +86,14 @@ var _ = framework.IngressNginxDescribe("[Flag] enable-ssl-passthrough", func() {
|
|||
"nginx.ingress.kubernetes.io/ssl-passthrough": "true",
|
||||
}
|
||||
|
||||
ingressDef := framework.NewSingleIngressWithTLS(host, "/", host, []string{host}, f.Namespace, echoName, 80, annotations)
|
||||
ingressDef := framework.NewSingleIngressWithTLS(host,
|
||||
"/",
|
||||
host,
|
||||
[]string{host},
|
||||
f.Namespace,
|
||||
echoName,
|
||||
80,
|
||||
annotations)
|
||||
tlsConfig, err := framework.CreateIngressTLSSecret(f.KubeClientSet,
|
||||
ingressDef.Spec.TLS[0].Hosts,
|
||||
ingressDef.Spec.TLS[0].SecretName,
|
||||
|
|
@ -119,7 +126,17 @@ var _ = framework.IngressNginxDescribe("[Flag] enable-ssl-passthrough", func() {
|
|||
Value: "/certs/tls.key",
|
||||
},
|
||||
}
|
||||
f.NewDeploymentWithOpts("echopass", "ghcr.io/sharat87/httpbun:latest", 80, 1, nil, nil, envs, volumeMount, volume, false)
|
||||
|
||||
f.NewDeploymentWithOpts("echopass",
|
||||
framework.HTTPBunImage,
|
||||
80,
|
||||
1,
|
||||
nil,
|
||||
nil,
|
||||
envs,
|
||||
volumeMount,
|
||||
volume,
|
||||
false)
|
||||
|
||||
f.EnsureIngress(ingressDef)
|
||||
|
||||
|
|
@ -133,7 +150,14 @@ var _ = framework.IngressNginxDescribe("[Flag] enable-ssl-passthrough", func() {
|
|||
|
||||
/* This one should not receive traffic as it does not contain passthrough annotation */
|
||||
hostBad := "noannotationnopassthrough.com"
|
||||
ingBad := f.EnsureIngress(framework.NewSingleIngressWithTLS(hostBad, "/", hostBad, []string{hostBad}, f.Namespace, echoName, 80, nil))
|
||||
ingBad := f.EnsureIngress(framework.NewSingleIngressWithTLS(hostBad,
|
||||
"/",
|
||||
hostBad,
|
||||
[]string{hostBad},
|
||||
f.Namespace,
|
||||
echoName,
|
||||
80,
|
||||
nil))
|
||||
tlsConfigBad, err := framework.CreateIngressTLSSecret(f.KubeClientSet,
|
||||
ingBad.Spec.TLS[0].Hosts,
|
||||
ingBad.Spec.TLS[0].SecretName,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue