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
b9ca74f1
Commit
b9ca74f1
authored
May 24, 2023
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gofmt changes (comments only)
parent
32431317
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
47 additions
and
48 deletions
+47
-48
doc.go
pkg/apis/varnishingress/v1alpha1/doc.go
+0
-1
register.go
pkg/client/clientset/versioned/fake/register.go
+7
-7
register.go
pkg/client/clientset/versioned/scheme/register.go
+7
-7
controller.go
pkg/controller/controller.go
+7
-7
worker.go
pkg/controller/worker.go
+6
-6
varnish.go
pkg/varnish/varnish.go
+20
-20
No files found.
pkg/apis/varnishingress/v1alpha1/doc.go
View file @
b9ca74f1
...
...
@@ -38,7 +38,6 @@
//
// Currently there is one CustomResource named VarnishConfig.
//
//
// Most of the code in the API is generated by k8s code generators
// (see: k8s.io/code-generator).
package
v1alpha1
pkg/client/clientset/versioned/fake/register.go
View file @
b9ca74f1
...
...
@@ -47,14 +47,14 @@ var localSchemeBuilder = runtime.SchemeBuilder{
// AddToScheme adds all types of this clientset into the given scheme. This allows composition
// of clientsets, like in:
//
//
import (
//
"k8s.io/client-go/kubernetes"
//
clientsetscheme "k8s.io/client-go/kubernetes/scheme"
//
aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme"
//
)
//
import (
//
"k8s.io/client-go/kubernetes"
//
clientsetscheme "k8s.io/client-go/kubernetes/scheme"
//
aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme"
//
)
//
//
kclientset, _ := kubernetes.NewForConfig(c)
//
_ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme)
//
kclientset, _ := kubernetes.NewForConfig(c)
//
_ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme)
//
// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types
// correctly.
...
...
pkg/client/clientset/versioned/scheme/register.go
View file @
b9ca74f1
...
...
@@ -47,14 +47,14 @@ var localSchemeBuilder = runtime.SchemeBuilder{
// AddToScheme adds all types of this clientset into the given scheme. This allows composition
// of clientsets, like in:
//
//
import (
//
"k8s.io/client-go/kubernetes"
//
clientsetscheme "k8s.io/client-go/kubernetes/scheme"
//
aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme"
//
)
//
import (
//
"k8s.io/client-go/kubernetes"
//
clientsetscheme "k8s.io/client-go/kubernetes/scheme"
//
aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme"
//
)
//
//
kclientset, _ := kubernetes.NewForConfig(c)
//
_ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme)
//
kclientset, _ := kubernetes.NewForConfig(c)
//
_ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme)
//
// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types
// correctly.
...
...
pkg/controller/controller.go
View file @
b9ca74f1
...
...
@@ -138,13 +138,13 @@ type IngressController struct {
// NewIngressController creates a controller.
//
//
log: logger initialized at startup
//
ingClass: value of the ingress.class Ingress annotation
//
kubeClient: k8s client initialized at startup
//
vc: Varnish controller
//
infFactory: SharedInformerFactory to create informers & listers for
//
the k8s standard client APIs
//
vcrInfFactory: SharedInformerFactory for the project's own client APIs
//
log: logger initialized at startup
//
ingClass: value of the ingress.class Ingress annotation
//
kubeClient: k8s client initialized at startup
//
vc: Varnish controller
//
infFactory: SharedInformerFactory to create informers & listers for
//
the k8s standard client APIs
//
vcrInfFactory: SharedInformerFactory for the project's own client APIs
func
NewIngressController
(
log
*
logrus
.
Logger
,
ingClass
string
,
...
...
pkg/controller/worker.go
View file @
b9ca74f1
...
...
@@ -325,12 +325,12 @@ type NamespaceQueues struct {
// NewNamespaceQueues creates a NamespaceQueues object.
//
//
log: logger initialized at startup
//
ingClass: value of the ingress.class Ingress annotation
//
vController: Varnish controller initialied at startup
//
listers: client-go/lister instance for each resource type
//
client: k8s API client initialized at startup
//
recorder: Event broadcaster initialized at startup
//
log: logger initialized at startup
//
ingClass: value of the ingress.class Ingress annotation
//
vController: Varnish controller initialied at startup
//
listers: client-go/lister instance for each resource type
//
client: k8s API client initialized at startup
//
recorder: Event broadcaster initialized at startup
func
NewNamespaceQueues
(
log
*
logrus
.
Logger
,
ingClass
string
,
...
...
pkg/varnish/varnish.go
View file @
b9ca74f1
...
...
@@ -155,9 +155,9 @@ func errStatus(err error) update.Status {
// Meta encapsulates meta-data for the resource types that enter into
// a Varnish configuration: Ingress, VarnishConfig and BackendConfig.
//
//
Key: namespace/name
//
UID: UID field from the resource meta-data
//
Ver: ResourceVersion field from the resource meta-data
//
Key: namespace/name
//
UID: UID field from the resource meta-data
//
Ver: ResourceVersion field from the resource meta-data
type
Meta
struct
{
Key
string
UID
string
...
...
@@ -213,7 +213,7 @@ type Controller struct {
// NewVarnishController returns an instance of Controller.
//
//
log: logger object initialized at startup
//
log: logger object initialized at startup
func
NewVarnishController
(
log
*
logrus
.
Logger
,
monIntvl
time
.
Duration
,
...
...
@@ -564,12 +564,12 @@ func (vc *Controller) updateVarnishSvcAddrs(key string, addrs []vcl.Address,
// AddOrUpdateVarnishSvc causes a sync for the Varnish Service
// identified by namespace/name key.
//
//
addrs: list of admin addresses for instances in the Service
//
(internal IPs and admin ports)
//
secrName: namespace/name of the admin secret to use for the
//
Service
//
loadVCL: true if the VCL config for the Service should be
//
reloaded
//
addrs: list of admin addresses for instances in the Service
//
(internal IPs and admin ports)
//
secrName: namespace/name of the admin secret to use for the
//
Service
//
loadVCL: true if the VCL config for the Service should be
//
reloaded
func
(
vc
*
Controller
)
AddOrUpdateVarnishSvc
(
key
string
,
addrs
[]
vcl
.
Address
,
...
...
@@ -664,11 +664,11 @@ func (vc *Controller) updateBeGauges() {
// Update a Varnish Service to implement an configuration.
//
//
svcKey: namespace/name key for the Service
//
spec: VCL spec corresponding to the configuration
//
ingsMeta: Ingress meta-data
//
vcfgMeta: VarnishConfig meta-data
//
bcfgMeta: BackendConfig meta-data
//
svcKey: namespace/name key for the Service
//
spec: VCL spec corresponding to the configuration
//
ingsMeta: Ingress meta-data
//
vcfgMeta: VarnishConfig meta-data
//
bcfgMeta: BackendConfig meta-data
func
(
vc
*
Controller
)
Update
(
svcKey
string
,
spec
vcl
.
Spec
,
...
...
@@ -770,11 +770,11 @@ func (vc *Controller) SetNotReady(svcKey string) error {
// HasConfig returns true iff a configuration is already loaded for a
// Varnish Service (so a new sync attempt is not necessary).
//
//
svcKey: namespace/name key for the Varnish Service
//
spec: VCL specification derived from the configuration
//
ingsMeta: Ingress meta-data
//
vcfgMeta: VarnishConfig meta-data
//
bcfgMeta: BackendConfig meta-data
//
svcKey: namespace/name key for the Varnish Service
//
spec: VCL specification derived from the configuration
//
ingsMeta: Ingress meta-data
//
vcfgMeta: VarnishConfig meta-data
//
bcfgMeta: BackendConfig meta-data
func
(
vc
*
Controller
)
HasConfig
(
svcKey
string
,
addrs
[]
vcl
.
Address
,
spec
vcl
.
Spec
,
ingsMeta
map
[
string
]
Meta
,
vcfgMeta
Meta
,
bcfgMeta
map
[
string
]
Meta
)
bool
{
...
...
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