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
7db3f020
Commit
7db3f020
authored
Oct 12, 2020
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Convert the primaryOnly field from VarnishConfig to VCL.
parent
7be8865c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
types.go
pkg/apis/varnishingress/v1alpha1/types.go
+3
-2
ingress.go
pkg/controller/ingress.go
+1
-0
No files found.
pkg/apis/varnishingress/v1alpha1/types.go
View file @
7db3f020
...
...
@@ -61,8 +61,9 @@ type VarnishConfigSpec struct {
// SelfShardSpec specifies self-sharding in a Varnish cluster.
// see: https://code.uplex.de/uplex-varnish/k8s-ingress/blob/master/docs/self-sharding.md
type
SelfShardSpec
struct
{
Max2ndTTL
string
`json:"max-secondary-ttl,omitempty"`
Probe
ProbeSpec
`json:"probe,omitempty"`
Max2ndTTL
string
`json:"max-secondary-ttl,omitempty"`
Probe
ProbeSpec
`json:"probe,omitempty"`
PrimaryOnly
bool
`json:"primaryOnly,omitempty"`
}
// ProbeSpec specifies health probes for self-sharding and BackendConfig.
...
...
pkg/controller/ingress.go
View file @
7db3f020
...
...
@@ -583,6 +583,7 @@ func (worker *NamespaceWorker) configSharding(spec *vcl.Spec,
cfgSpec
:=
vcfg
.
Spec
.
SelfSharding
probe
:=
getVCLProbe
(
&
cfgSpec
.
Probe
)
spec
.
ShardCluster
.
Probe
=
*
probe
spec
.
ShardCluster
.
PrimaryOnly
=
cfgSpec
.
PrimaryOnly
if
cfgSpec
.
Max2ndTTL
!=
""
{
spec
.
ShardCluster
.
MaxSecondaryTTL
=
cfgSpec
.
Max2ndTTL
}
else
{
...
...
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