features

package
v1.29.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 11, 2024 License: Apache-2.0 Imports: 14 Imported by: 2

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.

Copyright 2022 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 require 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

View Source
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"
	// FeatureL7XLBRegional defines the feature name of L7 External Regional Load Balancer.
	FeatureL7XLBRegional = "L7XLBRegional"
	//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, logger klog.Logger) 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, logger klog.Logger) 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, logger klog.Logger) 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 EnsureCustomResponseHeaders added in v1.20.0

func EnsureCustomResponseHeaders(sp utils.ServicePort, be *composite.BackendService, logger klog.Logger) bool

func EnsureDraining added in v1.4.0

func EnsureDraining(sp utils.ServicePort, be *composite.BackendService, logger klog.Logger) 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, beLogger klog.Logger) (bool, error)

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, logger klog.Logger) 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, logger klog.Logger) 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, logger klog.Logger) 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

func IsLowerVersion(v1, v2 meta.Version) bool

IsLowerVersion returns if v1 is a lower version than v2.

func ScopeFromFeatures added in v1.7.0

func ScopeFromFeatures(features []string) meta.KeyType

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

func VersionFromDescription(desc string) meta.Version

VersionFromDescription returns the meta.Version required for the given description.

func VersionFromFeatures

func VersionFromFeatures(features []string) meta.Version

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL