Documentation ¶
Overview ¶
Copyright 2018 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
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 EnsureAffinity(sp utils.ServicePort, be *composite.BackendService) bool
- func EnsureCDN(sp utils.ServicePort, be *composite.BackendService) bool
- func EnsureCustomRequestHeaders(sp utils.ServicePort, be *composite.BackendService) bool
- func EnsureDraining(sp utils.ServicePort, be *composite.BackendService) bool
- func EnsureIAP(sp utils.ServicePort, be *composite.BackendService) bool
- func EnsureLogging(sp utils.ServicePort, be *composite.BackendService) bool
- func EnsureSecurityPolicy(cloud *gce.Cloud, sp utils.ServicePort, be *composite.BackendService, ...) error
- func EnsureTimeout(sp utils.ServicePort, be *composite.BackendService) bool
- func IsLowerVersion(v1, v2 meta.Version) bool
- func ScopeFromFeatures(features []string) meta.KeyType
- func ScopeFromServicePort(sp *utils.ServicePort) meta.KeyType
- 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" // FeatureL7ILB defines the feature name of L7 Internal Load Balancer // L7-ILB Resources are currently alpha and regional FeatureL7ILB = "L7ILB" //FeatureVMIPNEG defines the feature name of GCE_VM_IP NEGs which are used for L4 ILB. FeatureVMIPNEG = "VMIPNEG" )
Variables ¶
This section is empty.
Functions ¶
func EnsureAffinity ¶ added in v1.4.0
func EnsureAffinity(sp utils.ServicePort, be *composite.BackendService) bool
EnsureAffinity reads the sessionAffinity and AffinityCookieTtlSec 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 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 EnsureCustomRequestHeaders ¶ added in v1.7.0
func EnsureCustomRequestHeaders(sp utils.ServicePort, be *composite.BackendService) bool
EnsureCustomRequestHeaders reads the CustomRequestHeaders 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 EnsureDraining ¶ added in v1.4.0
func EnsureDraining(sp utils.ServicePort, be *composite.BackendService) bool
EnsureDraining reads the ConnectionDraining 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 EnsureLogging ¶ added in v1.9.1
func EnsureLogging(sp utils.ServicePort, be *composite.BackendService) bool
EnsureLogging reads the log configurations 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 EnsureSecurityPolicy ¶
func EnsureSecurityPolicy(cloud *gce.Cloud, 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 EnsureTimeout ¶ added in v1.4.0
func EnsureTimeout(sp utils.ServicePort, be *composite.BackendService) bool
EnsureTimeout reads the TimeoutSec 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 IsLowerVersion ¶
IsLowerVersion returns if v1 is a lower version than v2.
func ScopeFromFeatures ¶ added in v1.7.0
ScopeFromFeatures returns the meta.KeyType required for the given list of features (e.g.) if a regional feature is added, the backend will be regional TODO: (shance) refactor all scope to be above the serviceport level
func ScopeFromServicePort ¶ added in v1.7.0
func ScopeFromServicePort(sp *utils.ServicePort) meta.KeyType
ScopeFromServicePort returns the meta.KeyType for the backend that this ServicePort is associated with TODO: (shance) refactor all scope to be above the serviceport level
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.