Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
k8s-ingress
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
3
Merge Requests
3
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
uplex-varnish
k8s-ingress
Commits
735aa9dc
Commit
735aa9dc
authored
Nov 26, 2020
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a helm version of the example/test for Service type LoadBalancer.
parent
7103cd44
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
19 deletions
+37
-19
Makefile
examples/svctypes/Makefile
+11
-2
values-lb.yaml
examples/svctypes/values-lb.yaml
+16
-0
verify.sh
examples/svctypes/verify.sh
+10
-17
No files found.
examples/svctypes/Makefile
View file @
735aa9dc
...
...
@@ -85,8 +85,16 @@ deploy-nodeport-helm:
--values
values.yaml
deploy-lb-helm
:
@
helm
install
viking-service-lb
$(CHARTDIR)
/viking-service
\
--values
values-lb.yaml
\
--set
vikingService.secrets.admin
=
$(
shell
$(GEN_SECRET))
\
--set
vikingService.secrets.dataplaneapi
=
$(
shell
$(GEN_SECRET))
\
--set
vikingService.varnish.image.repository
=
$(VARNISH_IMAGE)
\
--set
vikingService.varnish.image.tag
=
$(VARNISH_TAG)
\
--set
vikingService.haproxy.image.repository
=
$(HAPROXY_IMAGE)
\
--set
vikingService.haproxy.image.tag
=
$(HAPROXY_TAG)
@
helm
install
viking-ingress-lb
$(CHARTDIR)
/viking-test-app
\
--values
values
-lb
.yaml
--values
values.yaml
deploy-cafe-kubectl
:
@
kubectl apply
-f
$(mkdir)
/../hello/cafe.yaml
...
...
@@ -113,7 +121,8 @@ undeploy-nodeport-helm:
@
helm uninstall viking-service-nodeport
$(MAKE)
wait-delete
undeploy-loadbalancer-helm
:
undeploy-lb-helm
:
@
helm uninstall viking-service-lb
@
helm uninstall viking-ingress-lb
$(MAKE)
wait-delete
...
...
examples/svctypes/values-lb.yaml
0 → 100644
View file @
735aa9dc
nameOverride
:
svctypes-example
fullnameOverride
:
svctypes-example
vikingService
:
service
:
type
:
LoadBalancer
## Name of the ingress class to route through this controller
##
ingressClass
:
varnish
replicaCount
:
1
# labels to add to the pod container metadata
podLabels
:
app
:
varnish-ingress
example
:
svctypes
examples/svctypes/verify.sh
View file @
735aa9dc
...
...
@@ -6,22 +6,14 @@ source ${MYDIR}/../../test/utils.sh
IP
=
${
IP
:-
127
.0.0.1
}
LOCALPORT
=
${
LOCALPORT
:-
8888
}
# Wait for configuration by waiting for the loadBalancer IP in the
# Ingress to be set.
N
=
0
timeout
=
120
while
true
;
do
ip
=
$(
kubectl get ing cafe-ingress-varnish
-o
jsonpath
=
'{.status.loadBalancer.ingress[0].ip}'
)
if
[[
-n
${
ip
}
]]
;
then
break
fi
if
[
$N
-ge
${
timeout
}
]
;
then
echo
"Timed out waiting for Ingress to be configured"
exit
1
fi
sleep
1
N
=
$((
N
+
1
))
done
svctypes
=
$(
kubectl get pods
-l
app
=
varnish-ingress,example
=
svctypes
)
if
[[
-n
${
svctypes
}
]]
;
then
wait_until_ready
app
=
varnish-ingress,example
=
svctypes
wait_until_configured
app
=
varnish-ingress,example
=
svctypes
else
wait_until_ready
app
=
varnish-ingress
wait_until_configured
app
=
varnish-ingress
fi
NODEPORT
=
$(
kubectl get svc svctypes-example
-o
jsonpath
=
'{.spec.ports[0].nodePort}'
)
EXTERNALIP
=
$(
kubectl get svc svctypes-example
-o
jsonpath
=
'{.status.loadBalancer.ingress[0].ip}'
)
...
...
@@ -48,9 +40,10 @@ fi
set
+e
N
=
0
timeout
=
120
while
true
;
do
cat
< /dev/null
>
/dev/tcp/
${
IP
}
/
${
PORT
}
if
[
$?
-eq
0
]
;
then
if
[
[
$?
-eq
0
]
]
;
then
break
fi
if
[
$N
-ge
${
timeout
}
]
;
then
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment