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
57ba1972
Commit
57ba1972
authored
Aug 26, 2020
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add helm deployments and a Makefile for the "multi Varnish in ns" test.
parent
5cb33e84
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
189 additions
and
0 deletions
+189
-0
Makefile
examples/architectures/multi-varnish-ns/Makefile
+154
-0
values-coffee.yaml
examples/architectures/multi-varnish-ns/values-coffee.yaml
+13
-0
values-tea.yaml
examples/architectures/multi-varnish-ns/values-tea.yaml
+13
-0
values-varnish.yaml
examples/architectures/multi-varnish-ns/values-varnish.yaml
+9
-0
No files found.
examples/architectures/multi-varnish-ns/Makefile
0 → 100644
View file @
57ba1972
# Copyright (c) 2020 UPLEX Nils Goroll Systemoptimierung
# All rights reserved
#
# Author: Geoffrey Simmons <geoffrey.simmons@uplex.de>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
# GNU make is required.
mkpath
:=
$
(
abspath
$
(
lastword
$(MAKEFILE_LIST)
))
mkdir
:=
$
(
dir
$(mkpath)
)
CHARTDIR
=
$(mkdir)
/../../../charts
# For the klarlack image: make VARNISH=klarlack ...
ifndef
VARNISH
VARNISH
=
varnish
endif
CI_REPO_PFX
=
registry.gitlab.com/uplex/varnish/k8s-ingress/varnish-ingress
# For tests using the local docker registry: make TEST=local ...
# For tests using images from the CI pipeline: make TEST=ci ...
ifeq
($(TEST),local)
VARNISH_IMAGE
=
varnish-ingress/
$(VARNISH)
VARNISH_TAG
=
latest
HAPROXY_IMAGE
=
varnish-ingress/haproxy
HAPROXY_TAG
=
latest
else
ifeq
($(TEST),ci)
VARNISH_IMAGE
=
$(CI_REPO_PFX)
/
$(VARNISH)
VARNISH_TAG
=
master
HAPROXY_IMAGE
=
$(CI_REPO_PFX)
/haproxy
HAPROXY_TAG
=
master
endif
# If not specified, pull the latest "official" images from dockerhub.
LATEST
=
0.0.2
ifndef
VARNISH_IMAGE
VARNISH_IMAGE
=
uplex/viking-
$(VARNISH)
endif
ifndef
VARNISH_TAG
VARNISH_TAG
=
$(LATEST)
endif
ifndef
HAPROXY_IMAGE
HAPROXY_IMAGE
=
uplex/viking-haproxy
endif
ifndef
HAPROXY_TAG
HAPROXY_TAG
=
$(LATEST)
endif
all
:
deploy
deploy-helm
:
@
kubectl apply
-f
namespace.yaml
@
helm
install
viking-service-tea
$(CHARTDIR)
/viking-service
\
--values
values-varnish.yaml
--namespace
cafe
\
--set
nameOverride
=
varnish-tea
\
--set
fullnameOverride
=
varnish-tea
\
--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-service-coffee
$(CHARTDIR)
/viking-service
\
--values
values-varnish.yaml
--namespace
cafe
\
--set
nameOverride
=
varnish-coffee
\
--set
fullnameOverride
=
varnish-coffee
\
--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
coffee-ingress
$(CHARTDIR)
/viking-test-app
\
--values
values-coffee.yaml
--namespace
cafe
@
helm
install
tea-ingress
$(CHARTDIR)
/viking-test-app
\
--values
values-tea.yaml
--namespace
cafe
deploy-kubectl
:
@
kubectl apply
-f
namespace.yaml
@
kubectl apply
-f
rbac.yaml
@
kubectl apply
-f
coffee.yaml
@
kubectl apply
-f
tea.yaml
@
kubectl apply
-f
adm-secret-tea.yaml
@
kubectl apply
-f
admin-svc-tea.yaml
@
kubectl apply
-f
nodeport-tea.yaml
@
kubectl apply
-f
varnish-tea.yaml
@
kubectl apply
-f
adm-secret-coffee.yaml
@
kubectl apply
-f
admin-svc-coffee.yaml
@
kubectl apply
-f
nodeport-coffee.yaml
@
kubectl apply
-f
varnish-coffee.yaml
@
kubectl apply
-f
coffee-ingress.yaml
@
kubectl apply
-f
tea-ingress.yaml
deploy
:
ifeq
($(DEPLOY),kubectl)
deploy
:
deploy-kubectl
else
deploy
:
deploy-helm
endif
# TESTOPTS are passed to varnishtest, e.g.: make TESTOPTS=-v verify
verify
:
$(mkdir)
/verify.sh
undeploy-helm
:
@
helm uninstall tea-ingress
--namespace
cafe
@
helm uninstall coffee-ingress
--namespace
cafe
@
helm uninstall viking-service-coffee
--namespace
cafe
@
helm uninstall viking-service-tea
--namespace
cafe
@
kubectl delete
-f
namespace.yaml
undeploy-kubectl
:
@
kubectl delete
-f
tea-ingress.yaml
@
kubectl delete
-f
coffee-ingress.yaml
@
kubectl delete
-f
varnish-coffee.yaml
@
kubectl delete
-f
nodeport-coffee.yaml
@
kubectl delete
-f
admin-svc-coffee.yaml
@
kubectl delete
-f
adm-secret-coffee.yaml
@
kubectl delete
-f
varnish-tea.yaml
@
kubectl delete
-f
nodeport-tea.yaml
@
kubectl delete
-f
admin-svc-tea.yaml
@
kubectl delete
-f
adm-secret-tea.yaml
@
kubectl delete
-f
tea.yaml
@
kubectl delete
-f
coffee.yaml
@
kubectl delete
-f
rbac.yaml
@
kubectl delete
-f
namespace.yaml
undeploy
:
ifeq
($(DEPLOY),kubectl)
undeploy
:
undeploy-kubectl
else
undeploy
:
undeploy-helm
endif
.PHONY
:
all $(MAKECMDGOALS)
examples/architectures/multi-varnish-ns/values-coffee.yaml
0 → 100644
View file @
57ba1972
apps
:
coffee
:
image
:
nginxdemos/hello:plain-text
replicas
:
2
ingress
:
name
:
coffee-ingress
rules
:
-
host
:
coffee.example.com
paths
:
-
app
:
coffee
vikingAdmSvc
:
varnish-coffee-admin
examples/architectures/multi-varnish-ns/values-tea.yaml
0 → 100644
View file @
57ba1972
apps
:
tea
:
image
:
nginxdemos/hello:plain-text
replicas
:
3
ingress
:
name
:
tea-ingress
rules
:
-
host
:
tea.example.com
paths
:
-
app
:
tea
vikingAdmSvc
:
varnish-tea-admin
examples/architectures/multi-varnish-ns/values-varnish.yaml
0 → 100644
View file @
57ba1972
vikingService
:
## Name of the ingress class to route through this controller
##
ingressClass
:
varnish
# labels to add to the pod container metadata
podLabels
:
app
:
varnish-ingress
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