Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing loadBalancerScheme issue in ingress annotation #952

Merged
merged 1 commit into from
Feb 25, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions aws/istio-ingress/base/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ metadata:
name: istio-ingress
spec:
rules:
- http:
paths:
- backend:
serviceName: istio-ingressgateway
servicePort: 80
path: /*
- http:
paths:
- backend:
serviceName: istio-ingressgateway
servicePort: 80
path: /*
4 changes: 3 additions & 1 deletion aws/istio-ingress/base/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,6 @@ vars:
name: istio-ingress-parameters
apiVersion: v1
fieldref:
fieldpath: data.loadBalancerScheme
fieldpath: data.loadBalancerScheme
configurations:
- params.yaml
3 changes: 3 additions & 0 deletions aws/istio-ingress/base/params.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
varReference:
- path: metadata/annotations
kind: Ingress
25 changes: 17 additions & 8 deletions tests/aws-istio-ingress-base_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,21 @@ metadata:
name: istio-ingress
spec:
rules:
- http:
paths:
- backend:
serviceName: istio-ingressgateway
servicePort: 80
path: /*
- http:
paths:
- backend:
serviceName: istio-ingressgateway
servicePort: 80
path: /*
`)
th.writeF("/manifests/aws/istio-ingress/base/params.yaml", `
varReference:
- path: metadata/annotations
kind: Ingress
`)
th.writeF("/manifests/aws/istio-ingress/base/params.env", `
loadBalancerScheme=internet-facing`)
loadBalancerScheme=internet-facing
`)
th.writeK("/manifests/aws/istio-ingress/base", `
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
Expand All @@ -53,7 +59,10 @@ vars:
name: istio-ingress-parameters
apiVersion: v1
fieldref:
fieldpath: data.loadBalancerScheme`)
fieldpath: data.loadBalancerScheme
configurations:
- params.yaml
`)
}

func TestIstioIngressBase(t *testing.T) {
Expand Down
25 changes: 17 additions & 8 deletions tests/aws-istio-ingress-overlays-cognito_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,15 +88,21 @@ metadata:
name: istio-ingress
spec:
rules:
- http:
paths:
- backend:
serviceName: istio-ingressgateway
servicePort: 80
path: /*
- http:
paths:
- backend:
serviceName: istio-ingressgateway
servicePort: 80
path: /*
`)
th.writeF("/manifests/aws/istio-ingress/base/params.yaml", `
varReference:
- path: metadata/annotations
kind: Ingress
`)
th.writeF("/manifests/aws/istio-ingress/base/params.env", `
loadBalancerScheme=internet-facing`)
loadBalancerScheme=internet-facing
`)
th.writeK("/manifests/aws/istio-ingress/base", `
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
Expand All @@ -116,7 +122,10 @@ vars:
name: istio-ingress-parameters
apiVersion: v1
fieldref:
fieldpath: data.loadBalancerScheme`)
fieldpath: data.loadBalancerScheme
configurations:
- params.yaml
`)
}

func TestIstioIngressOverlaysCognito(t *testing.T) {
Expand Down
28 changes: 19 additions & 9 deletions tests/aws-istio-ingress-overlays-oidc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ metadata:
th.writeF("/manifests/aws/istio-ingress/overlays/oidc/params.yaml", `
varReference:
- path: metadata/annotations
kind: Ingress`)
kind: Ingress
`)
th.writeF("/manifests/aws/istio-ingress/overlays/oidc/params.env", `
oidcIssuer=
oidcAuthorizationEndpoint=
Expand Down Expand Up @@ -111,15 +112,21 @@ metadata:
name: istio-ingress
spec:
rules:
- http:
paths:
- backend:
serviceName: istio-ingressgateway
servicePort: 80
path: /*
- http:
paths:
- backend:
serviceName: istio-ingressgateway
servicePort: 80
path: /*
`)
th.writeF("/manifests/aws/istio-ingress/base/params.yaml", `
varReference:
- path: metadata/annotations
kind: Ingress
`)
th.writeF("/manifests/aws/istio-ingress/base/params.env", `
loadBalancerScheme=internet-facing`)
loadBalancerScheme=internet-facing
`)
th.writeK("/manifests/aws/istio-ingress/base", `
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
Expand All @@ -139,7 +146,10 @@ vars:
name: istio-ingress-parameters
apiVersion: v1
fieldref:
fieldpath: data.loadBalancerScheme`)
fieldpath: data.loadBalancerScheme
configurations:
- params.yaml
`)
}

func TestIstioIngressOverlaysOidc(t *testing.T) {
Expand Down
19 changes: 13 additions & 6 deletions tests/aws-istio-ingress-overlays-secure_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,17 @@ metadata:
name: istio-ingress
spec:
rules:
- http:
paths:
- backend:
serviceName: istio-ingressgateway
servicePort: 80
path: /*
- http:
paths:
- backend:
serviceName: istio-ingressgateway
servicePort: 80
path: /*
`)
th.writeF("/manifests/aws/istio-ingress/base/params.yaml", `
varReference:
- path: metadata/annotations
kind: Ingress
`)
th.writeF("/manifests/aws/istio-ingress/base/params.env", `
loadBalancerScheme=internet-facing
Expand All @@ -113,6 +118,8 @@ vars:
apiVersion: v1
fieldref:
fieldpath: data.loadBalancerScheme
configurations:
- params.yaml
`)
}

Expand Down