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
3d5f5a2a
Commit
3d5f5a2a
authored
Oct 13, 2020
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add kubectl/yaml examples/tests for self-sharding by key, url & digest.
parent
1a78ad39
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
118 additions
and
0 deletions
+118
-0
Makefile
examples/self-sharding/Makefile
+39
-0
shard-by-digest.yaml
examples/self-sharding/shard-by-digest.yaml
+24
-0
shard-by-key.yaml
examples/self-sharding/shard-by-key.yaml
+23
-0
shard-by-url.yaml
examples/self-sharding/shard-by-url.yaml
+23
-0
e2e.sh
test/e2e.sh
+9
-0
No files found.
examples/self-sharding/Makefile
View file @
3d5f5a2a
...
...
@@ -52,6 +52,15 @@ deploy-self-sharding-kubectl: deploy-cafe-kubectl
deploy-primary-only-kubectl
:
deploy-cafe-kubectl
@
kubectl apply
-f
primary-only.yaml
deploy-shard-by-digest-kubectl
:
deploy-cafe-kubectl
@
kubectl apply
-f
shard-by-digest.yaml
deploy-shard-by-url-kubectl
:
deploy-cafe-kubectl
@
kubectl apply
-f
shard-by-url.yaml
deploy-shard-by-key-kubectl
:
deploy-cafe-kubectl
@
kubectl apply
-f
shard-by-key.yaml
# TESTOPTS are passed to varnishtest, e.g.: make TESTOPTS=-v verify
verify
:
$(mkdir)
/verify.sh
...
...
@@ -82,11 +91,32 @@ undeploy-primary-only-kubectl:
$(MAKE)
undeploy-cafe-kubectl
$(MAKE)
wait
undeploy-shard-by-digest-kubectl
:
@
kubectl delete
-f
shard-by-digest.yaml
$(MAKE)
undeploy-cafe-kubectl
$(MAKE)
wait
undeploy-shard-by-url-kubectl
:
@
kubectl delete
-f
shard-by-url.yaml
$(MAKE)
undeploy-cafe-kubectl
$(MAKE)
wait
undeploy-shard-by-key-kubectl
:
@
kubectl delete
-f
shard-by-key.yaml
$(MAKE)
undeploy-cafe-kubectl
$(MAKE)
wait
ifeq
($(DEPLOY),kubectl)
deploy-self-sharding
:
deploy-self-sharding-kubectl
undeploy-self-sharding
:
undeploy-self-sharding-kubectl
deploy-primary-only
:
deploy-primary-only-kubectl
undeploy-primary-only
:
undeploy-primary-only-kubectl
deploy-shard-by-digest
:
deploy-shard-by-digest-kubectl
undeploy-shard-by-digest
:
undeploy-shard-by-digest-kubectl
deploy-shard-by-url
:
deploy-shard-by-url-kubectl
undeploy-shard-by-url
:
undeploy-shard-by-url-kubectl
deploy-shard-by-key
:
deploy-shard-by-key-kubectl
undeploy-shard-by-key
:
undeploy-shard-by-key-kubectl
else
deploy-self-sharding
:
deploy-self-sharding-helm
undeploy-self-sharding
:
undeploy-self-sharding-helm
...
...
@@ -100,6 +130,15 @@ undeploy: undeploy-self-sharding
else
ifeq
($(EXAMPLE),primary-only)
deploy
:
deploy-primary-only
undeploy
:
undeploy-primary-only
else
ifeq
($(EXAMPLE),shard-by-digest)
deploy
:
deploy-shard-by-digest
undeploy
:
undeploy-shard-by-digest
else
ifeq
($(EXAMPLE),shard-by-url)
deploy
:
deploy-shard-by-url
undeploy
:
undeploy-shard-by-url
else
ifeq
($(EXAMPLE),shard-by-key)
deploy
:
deploy-shard-by-key
undeploy
:
undeploy-shard-by-key
else
deploy undeploy
:
$
(
error EXAMPLE must be
set
to self-sharding or primary-only
)
...
...
examples/self-sharding/shard-by-digest.yaml
0 → 100644
View file @
3d5f5a2a
# Sample configuration for a self-sharding Varnish cluster
apiVersion
:
"
ingress.varnish-cache.org/v1alpha1"
kind
:
VarnishConfig
metadata
:
name
:
self-sharding-by-digest-cfg
spec
:
# The services array is required and must have at least one element.
# Lists the Service names of Varnish services in the same namespace
# to which this config is to be applied.
services
:
-
varnish-ingress-admin
# If the self-sharding object is present, then self-sharding will be
# implemented for the named service. All of its properties are
# optional, and defaults hold if they are left out. To just apply
# self-sharding with all default values, specify an empty object:
#
# self-sharding: {}
#
self-sharding
:
primaryOnly
:
true
key
:
req.http.Host
digest
:
SHA3_512
examples/self-sharding/shard-by-key.yaml
0 → 100644
View file @
3d5f5a2a
# Sample configuration for a self-sharding Varnish cluster
apiVersion
:
"
ingress.varnish-cache.org/v1alpha1"
kind
:
VarnishConfig
metadata
:
name
:
self-sharding-by-url-cfg
spec
:
# The services array is required and must have at least one element.
# Lists the Service names of Varnish services in the same namespace
# to which this config is to be applied.
services
:
-
varnish-ingress-admin
# If the self-sharding object is present, then self-sharding will be
# implemented for the named service. All of its properties are
# optional, and defaults hold if they are left out. To just apply
# self-sharding with all default values, specify an empty object:
#
# self-sharding: {}
#
self-sharding
:
primaryOnly
:
true
key
:
req.http.Host
examples/self-sharding/shard-by-url.yaml
0 → 100644
View file @
3d5f5a2a
# Sample configuration for a self-sharding Varnish cluster
apiVersion
:
"
ingress.varnish-cache.org/v1alpha1"
kind
:
VarnishConfig
metadata
:
name
:
self-sharding-by-digest-cfg
spec
:
# The services array is required and must have at least one element.
# Lists the Service names of Varnish services in the same namespace
# to which this config is to be applied.
services
:
-
varnish-ingress-admin
# If the self-sharding object is present, then self-sharding will be
# implemented for the named service. All of its properties are
# optional, and defaults hold if they are left out. To just apply
# self-sharding with all default values, specify an empty object:
#
# self-sharding: {}
#
self-sharding
:
primaryOnly
:
true
key
:
req.url
test/e2e.sh
View file @
3d5f5a2a
...
...
@@ -71,6 +71,15 @@ make EXAMPLE=self-sharding deploy verify undeploy
echo
Primary-only self-sharding cluster example
make
EXAMPLE
=
primary-only deploy verify undeploy
echo
Self-sharding by digest example
make
EXAMPLE
=
shard-by-digest deploy verify undeploy
echo
Self-sharding by URL example
make
EXAMPLE
=
shard-by-url deploy verify undeploy
echo
Self-sharding by key example
make
EXAMPLE
=
shard-by-key deploy verify undeploy
echo
Basic Authentication example
cd
${
MYPATH
}
/../examples/authentication/
make
EXAMPLE
=
basic-auth deploy verify undeploy
...
...
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