Skip to content

Commit ccacafd

Browse files
author
Martin Linkhorst
committed
update admission-controller and merge Service Type LoadBalancer tests
1 parent 8d360d2 commit ccacafd

File tree

3 files changed

+2
-60
lines changed

3 files changed

+2
-60
lines changed

cluster/manifests/02-admission-control/deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ spec:
3333
priorityClassName: system-cluster-critical
3434
containers:
3535
- name: admission-controller
36-
image: 926694233939.dkr.ecr.eu-central-1.amazonaws.com/staging_namespace/teapot/admission-controller:pr-293-1
36+
image: 926694233939.dkr.ecr.eu-central-1.amazonaws.com/production_namespace/teapot/admission-controller:master-253
3737
lifecycle:
3838
preStop:
3939
exec:

test/e2e/external_dns.go

Lines changed: 1 addition & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -53,63 +53,7 @@ var _ = describe("External DNS creation", func() {
5353
jigi = ingress.NewIngressTestJig(f.ClientSet)
5454
})
5555

56-
f.It("Should create DNS entry via Service and AWS Cloud Provider [Zalando]", f.WithSlow(), func(ctx context.Context) {
57-
nameprefix := serviceName + "-"
58-
ns := f.Namespace.Name
59-
labels := map[string]string{
60-
"foo": "bar",
61-
"baz": "blah",
62-
}
63-
port := 80
64-
65-
By("Creating service " + serviceName + " in namespace " + ns)
66-
defer func() {
67-
err := cs.CoreV1().Services(ns).Delete(ctx, serviceName, metav1.DeleteOptions{})
68-
framework.ExpectNoError(err, "failed to delete service: %s in namespace: %s", serviceName, ns)
69-
}()
70-
71-
hostName := fmt.Sprintf("%s-%d.%s", serviceName, time.Now().UTC().Unix(), E2EHostedZone())
72-
_, err := jigs.CreateLoadBalancerService(ctx, timeout, func(svc *v1.Service) {
73-
svc.ObjectMeta = metav1.ObjectMeta{
74-
Name: serviceName,
75-
Annotations: map[string]string{
76-
externalDNSAnnotation: hostName,
77-
},
78-
}
79-
svc.Spec.Type = v1.ServiceTypeLoadBalancer
80-
svc.Spec.Selector = labels
81-
svc.Spec.Ports = []v1.ServicePort{
82-
{
83-
Port: int32(port),
84-
TargetPort: intstr.FromInt(port),
85-
},
86-
}
87-
})
88-
framework.ExpectNoError(err, "failed to create service: %s in namespace: %s", serviceName, ns)
89-
90-
By("Submitting the pod to kubernetes")
91-
route := fmt.Sprintf(`* -> inlineContent("%s") -> <shunt>`, "OK")
92-
pod := createSkipperPod(nameprefix, ns, route, labels, port)
93-
defer func() {
94-
By("deleting the pod")
95-
defer GinkgoRecover()
96-
err2 := cs.CoreV1().Pods(ns).Delete(ctx, pod.Name, metav1.DeleteOptions{})
97-
framework.ExpectNoError(err2, "failed to delete pod: %s in namespace: %s", pod.Name, ns)
98-
}()
99-
100-
_, err = cs.CoreV1().Pods(ns).Create(ctx, pod, metav1.CreateOptions{})
101-
framework.ExpectNoError(err, "failed to create pod: %s in namespace: %s", pod.Name, ns)
102-
103-
framework.ExpectNoError(e2epod.WaitForPodNameRunningInNamespace(ctx, f.ClientSet, pod.Name, pod.Namespace),
104-
"failed to wait for pod: %s in namespace: %s", pod.Name, ns)
105-
106-
// wait for DNS and for pod to be reachable.
107-
By("Waiting up to " + timeout.String() + " for " + hostName + " to be reachable")
108-
err = waitForSuccessfulResponse(hostName, timeout)
109-
framework.ExpectNoError(err, "failed to wait for %s to be reachable", hostName)
110-
})
111-
112-
f.It("Should create DNS entry via Service and AWS Load Balancer Controller [Zalando]", f.WithSlow(), func(ctx context.Context) {
56+
f.It("Should create DNS entry via Service [Zalando]", f.WithSlow(), func(ctx context.Context) {
11357
nameprefix := serviceName + "-"
11458
ns := f.Namespace.Name
11559
labels := map[string]string{

test/e2e/run_e2e.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,6 @@ if [ "$e2e" = true ]; then
205205
# some tests are skipped for zalando-aws because they only apply to zalando-eks
206206
SKIPPED_TESTS+=(
207207
"Authorization via admission-controller \[RBAC\] \[Zalando\]"
208-
"Should create DNS entry via Service and AWS Load Balancer Controller \[Zalando\]" # Depends on availability of AWS Load Balancer Controller in the cluster.
209208
)
210209
fi
211210

@@ -216,7 +215,6 @@ if [ "$e2e" = true ]; then
216215
"Should audit API calls to create, update, patch, delete pods. \[Audit\] \[Zalando\]"
217216
"should validate permissions for \[Authorization\] \[RBAC\] \[Zalando\]" # TODO: Remains skipped until we remove the older RBAC setup
218217
"should creating a working mysql cluster" # upstream test which does not work with IPv6
219-
"Should create DNS entry via Service and AWS Cloud Provider \[Zalando\]" # Legacy Service Type LoadBalancer controller doesn't support IPv6.
220218
)
221219
fi
222220

0 commit comments

Comments
 (0)