Documentation ¶
Overview ¶
This package contains the implementations of backend service features. For features that requrie non-GA compute API, please make sure to update `versionToFeatures` and `featuresFromServicePort()` in features.go (upon both feature addition and promotion). It will make sure the controller interacts with compute service using the proper API version.
Index ¶
- Constants
- func EnsureCDN(sp utils.ServicePort, be *composite.BackendService) bool
- func EnsureIAP(sp utils.ServicePort, be *composite.BackendService) bool
- func EnsureSecurityPolicy(cloud *gce.GCECloud, sp utils.ServicePort, be *composite.BackendService, ...) error
- func IsLowerVersion(v1, v2 meta.Version) bool
- func SetDescription(desc *utils.Description, sp *utils.ServicePort)
- func VersionFromDescription(desc string) meta.Version
- func VersionFromFeatures(features []string) meta.Version
- func VersionFromServicePort(sp *utils.ServicePort) meta.Version
Constants ¶
const ( // FeatureHTTP2 defines the feature name of HTTP2. FeatureHTTP2 = "HTTP2" // FeatureSecurityPolicy defines the feature name of SecurityPolicy. FeatureSecurityPolicy = "SecurityPolicy" // FeatureNEG defines the feature name of NEG. FeatureNEG = "NEG" )
Variables ¶
This section is empty.
Functions ¶
func EnsureCDN ¶
func EnsureCDN(sp utils.ServicePort, be *composite.BackendService) bool
EnsureCDN reads the CDN configuration specified in the ServicePort.BackendConfig and applies it to the BackendService. It returns true if there were existing settings on the BackendService that were overwritten.
func EnsureIAP ¶
func EnsureIAP(sp utils.ServicePort, be *composite.BackendService) bool
EnsureIAP reads the IAP configuration specified in the BackendConfig and applies it to the BackendService if it is stale. It returns true if there were existing settings on the BackendService that were overwritten.
func EnsureSecurityPolicy ¶
func EnsureSecurityPolicy(cloud *gce.GCECloud, sp utils.ServicePort, be *composite.BackendService, beName string) error
EnsureSecurityPolicy ensures the security policy link on backend service. TODO(mrhohn): Emit event when attach/detach security policy to backend service.
func IsLowerVersion ¶
IsLowerVersion returns if v1 is a lower version than v2.
func SetDescription ¶
func SetDescription(desc *utils.Description, sp *utils.ServicePort)
SetDescription sets the XFeatures field for the given Description.
func VersionFromDescription ¶
VersionFromDescription returns the meta.Version required for the given description.
func VersionFromFeatures ¶
VersionFromFeatures returns the meta.Version required for the given list of features.
func VersionFromServicePort ¶
func VersionFromServicePort(sp *utils.ServicePort) meta.Version
VersionFromServicePort returns the meta.Version for the backend that this ServicePort is associated with.
Types ¶
This section is empty.