[GLBC] Support backside re-encryption (#519)
Support backside re-encryption
This commit is contained in:
parent
7f3763590a
commit
642cb74cc7
21 changed files with 1046 additions and 433 deletions
|
|
@ -20,6 +20,7 @@ import (
|
|||
"fmt"
|
||||
|
||||
compute "google.golang.org/api/compute/v1"
|
||||
api_v1 "k8s.io/client-go/pkg/api/v1"
|
||||
"k8s.io/client-go/tools/cache"
|
||||
|
||||
"k8s.io/ingress/controllers/gce/utils"
|
||||
|
|
@ -118,3 +119,21 @@ func (f *FakeBackendServices) GetHealth(name, instanceGroupLink string) (*comput
|
|||
return &compute.BackendServiceGroupHealth{
|
||||
HealthStatus: states}, nil
|
||||
}
|
||||
|
||||
// FakeProbeProvider implements the probeProvider interface for tests.
|
||||
type FakeProbeProvider struct {
|
||||
probes map[ServicePort]*api_v1.Probe
|
||||
}
|
||||
|
||||
// NewFakeProbeProvider returns a struct which satifies probeProvider interface
|
||||
func NewFakeProbeProvider(probes map[ServicePort]*api_v1.Probe) *FakeProbeProvider {
|
||||
return &FakeProbeProvider{probes}
|
||||
}
|
||||
|
||||
// GetProbe returns the probe for a given nodePort
|
||||
func (pp *FakeProbeProvider) GetProbe(port ServicePort) (*api_v1.Probe, error) {
|
||||
if probe, exists := pp.probes[port]; exists && probe.HTTPGet != nil {
|
||||
return probe, nil
|
||||
}
|
||||
return nil, nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue