v1alpha1

package
v2.11.26 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2024 License: Apache-2.0 Imports: 43 Imported by: 0

Documentation

Index

Examples

Constants

View Source
const (
	// DefaultHealthCheckProbeTimeout holds the default timeout to be applied to
	// healthchecks in seconds. This matches Cloud Foundry's default timeout.
	DefaultHealthCheckProbeTimeout = 60

	// DefaultHealthCheckProbeEndpoint is the default endpoint to use for HTTP
	// Get health checks.
	DefaultHealthCheckProbeEndpoint = "/"

	// DefaultHealthCheckPeriodSeconds holds the default period between health
	// check polls.
	DefaultHealthCheckPeriodSeconds = 10

	// DefaultHealthCheckFailureThreshold is the number of times the probe can
	// return a failure before the app is considered bad.
	DefaultHealthCheckFailureThreshold = 3
)
View Source
const (
	// NameLabel holds the standard label key for Kubernetes app names.
	NameLabel = "app.kubernetes.io/name"
	// ManagedByLabel holds the standard label key for Kubernetes app managers.
	ManagedByLabel = "app.kubernetes.io/managed-by"
	// ComponentLabel holds the standard label key for Kubernetes app component
	// types.
	ComponentLabel = "app.kubernetes.io/component"
	// VersionLabel holds the current version for a Kubernetes app.
	VersionLabel = "app.kubernetes.io/version"
	// FeatureFlagsAnnotation holds a map of each feature flag to a bool indicating whether the feature is enabled or not.
	FeatureFlagsAnnotation = "kf.dev/feature-flags"
	// WorkloadIdentityAnnotation is the annotation used to map Kubernetes
	// Service Accounts (KSA) to a Google Service Accounts (GSA).
	WorkloadIdentityAnnotation = "iam.gke.io/gcp-service-account"
	// DefaultUserContainerName contains the default name for the user container.
	DefaultUserContainerName = "user-container"
	// DefaultMaxTaskCount is the maximum number of tasks to keep in an App.
	DefaultMaxTaskCount = 500
	// AppServerComponent is the value used for the App component.
	AppServerComponent = "app-server"
)
View Source
const (

	// TaskRunParamSourceImage is the Tekton Param name for the container image
	// which contains the source code for a build.
	TaskRunParamSourceImage = "SOURCE_IMAGE"

	// TaskRunResourceURL is the Tekton param name for the desired destination image.
	TaskRunParamDestinationImage = "DESTINATION_IMAGE"
)
View Source
const (
	// BuildpackV3BuildTaskName is the name of the buildpack Tekton Task.
	BuildpackV3BuildTaskName = "buildpackv3"

	// DockerfileBuildTaskName is the name of the Dockerfile Tekton Task.
	DockerfileBuildTaskName = "kaniko"

	// BuildpackV2BuildTaskName is the name of the Cloud Foundry Buildpacks
	// Tekton Task.
	BuildpackV2BuildTaskName = "buildpackv2"

	// SourceImageParamName is the key for the source image param.
	SourceImageParamName = "SOURCE_IMAGE"

	// BuildNameParamName is the key for the Build name param.
	BuildNameParamName = "BUILD_NAME"

	// SourcePackageNameParamName is the key for the SourcePackage name param.
	SourcePackageNameParamName = "SOURCE_PACKAGE_NAME"

	// SourcePackageNamespaceParamName is the key for the SourcePackage namespace param.
	SourcePackageNamespaceParamName = "SOURCE_PACKAGE_NAMESPACE"

	// BuildpackV2ParamName is the key for the Buildpack list param on V2 Builds.
	BuildpackV2ParamName = "BUILDPACKS"

	// BuildpackV3ParamName is the key for the Buildpack list param on V3 Builds.
	BuildpackV3ParamName = "BUILDPACK"

	// RunImageParamName is the key for the run image param.
	RunImageParamName = "RUN_IMAGE"

	// StackV2EnvVarName is the key for the Stack on V2 Builds.
	StackV2EnvVarName = "CF_STACK"

	// BuiltinTaskKind indicates that a Task has an impelemtnation
	// defined by Kf.
	BuiltinTaskKind = "KfBuiltinTask"

	// BuiltinTaskAPIVersion is the version used with Builtin tasks.
	BuiltinTaskAPIVersion = "builtin.kf.dev/v1alpha1"

	// DefaultBuildTimeout is the default timeout value for build to complete.
	DefaultBuildTimeout time.Duration = time.Duration(1 * time.Hour)

	// DefaultBuildRetentionCount is the defualt retention count of number of builds for garbage collection.
	DefaultBuildRetentionCount = 5
)
View Source
const (
	// RouteHostname is the hostname of a route.
	RouteHostname = "route.kf.dev/hostname"
	// RouteDomain is the domain of a route.
	RouteDomain = "route.kf.dev/domain"
	// RoutePath is the URL path of a route.
	RoutePath = "route.kf.dev/path"
	// RouteAppName is the App's name that owns the Route.
	RouteAppName = "route.kf.dev/appname"

	// DefaultRouteDestinationPort holds the default port route traffic is sent to.
	DefaultRouteDestinationPort = 80
)
View Source
const (
	// ServiceInstanceParamsSecretKey contains the secret key that holds parameters.
	ServiceInstanceParamsSecretKey = "params"

	// UserProvidedServiceClassName is the class name for user-provided service
	// instances, unless overridden by a mock name.
	// The class name is also used as the label for the service in VCAP_SERVICES.
	UserProvidedServiceClassName = "user-provided"

	// UserProvidedServiceDescription indicates the service is a user provided service.
	UserProvidedServiceDescription = "user-provided"

	// BrokeredServiceDescription indicates the service is managed by a broker.
	BrokeredServiceDescription = "brokered"

	// VolumeServiceDescription indicates the service is managed by a volume broker.
	VolumeServiceDescription = "volume"

	// DefaultServiceInstanceProgressDeadlineSeconds contains the default progress
	// deadline for service instances.
	DefaultServiceInstanceProgressDeadlineSeconds int64 = 30 * 60
)
View Source
const (
	// ServiceInstanceBindingParamsSecretKey contains the secret key that holds parameters.
	ServiceInstanceBindingParamsSecretKey = "params"

	// DefaultServiceInstanceBindingProgressDeadlineSeconds contains the default
	// amount of time bindings can take before timing out.
	DefaultServiceInstanceBindingProgressDeadlineSeconds = DefaultServiceInstanceProgressDeadlineSeconds
)
View Source
const (
	// DefaultBuildServiceAccountName is the name of the service-account created
	// by spaces with the intent of being used to hold connection credentials to
	// the necessary back-end systems.
	DefaultBuildServiceAccountName = "kf-builder"

	// KfExternalIngressGateway holds the gateway for Kf's external HTTP ingress.
	KfExternalIngressGateway = "kf/external-gateway"
)
View Source
const (
	// NetworkPolicyLabel holds a label key for determining which default network
	// policy will be applied to a Pod.
	NetworkPolicyLabel = "kf.dev/networkpolicy"

	// NetworkPolicyApp holds the NetworkPolicyLabel value for app policies.
	NetworkPolicyApp = "app"

	// NetworkPolicyBuild holds the NetworkPolicyLabel value for build policies.
	NetworkPolicyBuild = "build"

	// PermitAllNetworkPolicy is the key used to indcate all traffic is allowed.
	PermitAllNetworkPolicy = "PermitAll"
	// DenyAllNetworkPolicy is the key used to indcate all traffic is denied.
	DenyAllNetworkPolicy = "DenyAll"
)
View Source
const (
	// Runs scheduled jobs regardless of status of previously run jobs.
	ConcurrencyPolicyAlways = "Always"
	// Skips scheduling new jobs while a previous execution is still running.
	ConcurrencyPolicyForbid = "Forbid"
	// Cancels any still running jobs from the same schedule when a new job is started.
	ConcurrencyPolicyReplace = "Replace"
)
View Source
const (
	// BackingResourceReady specifies the condition type for backing resource finishes reconciliation.
	BackingResourceReady = "BackingResourceReady"
	// Status for ChildNotOwned error.
	NotOwned = "NotOwned"
	// Status for ReconciliationError.
	ReconciliationError = "ReconciliationError"
	// Status for TemplateError.
	TemplateError = "TemplateError"
	// Status for CacheOutdated error.
	CacheOutdated = "CacheOutdated"
	// Status for Unknown error.
	Unknown = "Unknown"
)
View Source
const (

	// AppConditionReady is set when the CRD is configured and is usable.
	AppConditionReady = apis.ConditionReady

	// AppConditionBuildReady is set when the child
	// resource(s) Build is/are ready.
	AppConditionBuildReady apis.ConditionType = "BuildReady"

	// AppConditionServiceReady is set when the child
	// resource(s) Service is/are ready.
	AppConditionServiceReady apis.ConditionType = "ServiceReady"

	// AppConditionServiceAccountReady is set when the child
	// resource(s) ServiceAccount is/are ready.
	AppConditionServiceAccountReady apis.ConditionType = "ServiceAccountReady"

	// AppConditionDeploymentReady is set when the child
	// resource(s) Deployment is/are ready.
	AppConditionDeploymentReady apis.ConditionType = "DeploymentReady"

	// AppConditionSpaceReady is set when the child
	// resource(s) Space is/are ready.
	AppConditionSpaceReady apis.ConditionType = "SpaceReady"

	// AppConditionRouteReady is set when the child
	// resource(s) Route is/are ready.
	AppConditionRouteReady apis.ConditionType = "RouteReady"

	// AppConditionEnvVarSecretReady is set when the child
	// resource(s) EnvVarSecret is/are ready.
	AppConditionEnvVarSecretReady apis.ConditionType = "EnvVarSecretReady"

	// AppConditionServiceInstanceBindingsReady is set when the child
	// resource(s) ServiceInstanceBindings is/are ready.
	AppConditionServiceInstanceBindingsReady apis.ConditionType = "ServiceInstanceBindingsReady"

	// AppConditionHorizontalPodAutoscalerReady is set when the child
	// resource(s) HorizontalPodAutoscaler is/are ready.
	AppConditionHorizontalPodAutoscalerReady apis.ConditionType = "HorizontalPodAutoscalerReady"
)

ConditionType represents a Service condition value

View Source
const (

	// BuildConditionSucceeded is set when the CRD is completed.
	BuildConditionSucceeded = apis.ConditionSucceeded

	// BuildConditionSpaceReady is set when the child
	// resource(s) Space is/are ready.
	BuildConditionSpaceReady apis.ConditionType = "SpaceReady"

	// BuildConditionTaskRunReady is set when the child
	// resource(s) TaskRun is/are ready.
	BuildConditionTaskRunReady apis.ConditionType = "TaskRunReady"

	// BuildConditionSourcePackageReady is set when the child
	// resource(s) SourcePackage is/are ready.
	BuildConditionSourcePackageReady apis.ConditionType = "SourcePackageReady"
)

ConditionType represents a Service condition value

View Source
const (

	// CommonServiceBrokerConditionReady is set when the CRD is configured and is usable.
	CommonServiceBrokerConditionReady = apis.ConditionReady

	// CommonServiceBrokerConditionCredsSecretReady is set when the child
	// resource(s) CredsSecret is/are ready.
	CommonServiceBrokerConditionCredsSecretReady apis.ConditionType = "CredsSecretReady"

	// CommonServiceBrokerConditionCredsSecretPopulatedReady is set when the child
	// resource(s) CredsSecretPopulated is/are ready.
	CommonServiceBrokerConditionCredsSecretPopulatedReady apis.ConditionType = "CredsSecretPopulatedReady"

	// CommonServiceBrokerConditionCatalogReady is set when the child
	// resource(s) Catalog is/are ready.
	CommonServiceBrokerConditionCatalogReady apis.ConditionType = "CatalogReady"
)

ConditionType represents a Service condition value

View Source
const (

	// RouteConditionReady is set when the CRD is configured and is usable.
	RouteConditionReady = apis.ConditionReady

	// RouteConditionVirtualServiceReady is set when the child
	// resource(s) VirtualService is/are ready.
	RouteConditionVirtualServiceReady apis.ConditionType = "VirtualServiceReady"

	// RouteConditionSpaceDomainReady is set when the child
	// resource(s) SpaceDomain is/are ready.
	RouteConditionSpaceDomainReady apis.ConditionType = "SpaceDomainReady"

	// RouteConditionRouteServiceReady is set when the child
	// resource(s) RouteService is/are ready.
	RouteConditionRouteServiceReady apis.ConditionType = "RouteServiceReady"
)

ConditionType represents a Service condition value

View Source
const (

	// ServiceInstanceBindingConditionReady is set when the CRD is configured and is usable.
	ServiceInstanceBindingConditionReady = apis.ConditionReady

	// ServiceInstanceBindingConditionServiceInstanceReady is set when the child
	// resource(s) ServiceInstance is/are ready.
	ServiceInstanceBindingConditionServiceInstanceReady apis.ConditionType = "ServiceInstanceReady"

	// ServiceInstanceBindingConditionBackingResourceReady is set when the child
	// resource(s) BackingResource is/are ready.
	ServiceInstanceBindingConditionBackingResourceReady apis.ConditionType = "BackingResourceReady"

	// ServiceInstanceBindingConditionParamsSecretReady is set when the child
	// resource(s) ParamsSecret is/are ready.
	ServiceInstanceBindingConditionParamsSecretReady apis.ConditionType = "ParamsSecretReady"

	// ServiceInstanceBindingConditionParamsSecretPopulatedReady is set when the child
	// resource(s) ParamsSecretPopulated is/are ready.
	ServiceInstanceBindingConditionParamsSecretPopulatedReady apis.ConditionType = "ParamsSecretPopulatedReady"

	// ServiceInstanceBindingConditionCredentialsSecretReady is set when the child
	// resource(s) CredentialsSecret is/are ready.
	ServiceInstanceBindingConditionCredentialsSecretReady apis.ConditionType = "CredentialsSecretReady"

	// ServiceInstanceBindingConditionVolumeParamsPopulatedReady is set when the child
	// resource(s) VolumeParamsPopulated is/are ready.
	ServiceInstanceBindingConditionVolumeParamsPopulatedReady apis.ConditionType = "VolumeParamsPopulatedReady"
)

ConditionType represents a Service condition value

View Source
const (

	// ServiceInstanceConditionReady is set when the CRD is configured and is usable.
	ServiceInstanceConditionReady = apis.ConditionReady

	// ServiceInstanceConditionSpaceReady is set when the child
	// resource(s) Space is/are ready.
	ServiceInstanceConditionSpaceReady apis.ConditionType = "SpaceReady"

	// ServiceInstanceConditionBackingResourceReady is set when the child
	// resource(s) BackingResource is/are ready.
	ServiceInstanceConditionBackingResourceReady apis.ConditionType = "BackingResourceReady"

	// ServiceInstanceConditionParamsSecretReady is set when the child
	// resource(s) ParamsSecret is/are ready.
	ServiceInstanceConditionParamsSecretReady apis.ConditionType = "ParamsSecretReady"

	// ServiceInstanceConditionParamsSecretPopulatedReady is set when the child
	// resource(s) ParamsSecretPopulated is/are ready.
	ServiceInstanceConditionParamsSecretPopulatedReady apis.ConditionType = "ParamsSecretPopulatedReady"
)

ConditionType represents a Service condition value

View Source
const (

	// SourcePackageConditionSucceeded is set when the CRD is completed.
	SourcePackageConditionSucceeded = apis.ConditionSucceeded

	// SourcePackageConditionUploadReady is set when the child
	// resource(s) Upload is/are ready.
	SourcePackageConditionUploadReady apis.ConditionType = "UploadReady"
)

ConditionType represents a Service condition value

View Source
const (

	// SpaceConditionReady is set when the CRD is configured and is usable.
	SpaceConditionReady = apis.ConditionReady

	// SpaceConditionNamespaceReady is set when the child
	// resource(s) Namespace is/are ready.
	SpaceConditionNamespaceReady apis.ConditionType = "NamespaceReady"

	// SpaceConditionBuildServiceAccountReady is set when the child
	// resource(s) BuildServiceAccount is/are ready.
	SpaceConditionBuildServiceAccountReady apis.ConditionType = "BuildServiceAccountReady"

	// SpaceConditionBuildSecretReady is set when the child
	// resource(s) BuildSecret is/are ready.
	SpaceConditionBuildSecretReady apis.ConditionType = "BuildSecretReady"

	// SpaceConditionBuildRoleReady is set when the child
	// resource(s) BuildRole is/are ready.
	SpaceConditionBuildRoleReady apis.ConditionType = "BuildRoleReady"

	// SpaceConditionBuildRoleBindingReady is set when the child
	// resource(s) BuildRoleBinding is/are ready.
	SpaceConditionBuildRoleBindingReady apis.ConditionType = "BuildRoleBindingReady"

	// SpaceConditionIngressGatewayReady is set when the child
	// resource(s) IngressGateway is/are ready.
	SpaceConditionIngressGatewayReady apis.ConditionType = "IngressGatewayReady"

	// SpaceConditionRuntimeConfigReady is set when the child
	// resource(s) RuntimeConfig is/are ready.
	SpaceConditionRuntimeConfigReady apis.ConditionType = "RuntimeConfigReady"

	// SpaceConditionNetworkConfigReady is set when the child
	// resource(s) NetworkConfig is/are ready.
	SpaceConditionNetworkConfigReady apis.ConditionType = "NetworkConfigReady"

	// SpaceConditionBuildConfigReady is set when the child
	// resource(s) BuildConfig is/are ready.
	SpaceConditionBuildConfigReady apis.ConditionType = "BuildConfigReady"

	// SpaceConditionBuildNetworkPolicyReady is set when the child
	// resource(s) BuildNetworkPolicy is/are ready.
	SpaceConditionBuildNetworkPolicyReady apis.ConditionType = "BuildNetworkPolicyReady"

	// SpaceConditionAppNetworkPolicyReady is set when the child
	// resource(s) AppNetworkPolicy is/are ready.
	SpaceConditionAppNetworkPolicyReady apis.ConditionType = "AppNetworkPolicyReady"

	// SpaceConditionRoleBindingsReady is set when the child
	// resource(s) RoleBindings is/are ready.
	SpaceConditionRoleBindingsReady apis.ConditionType = "RoleBindingsReady"

	// SpaceConditionClusterRoleReady is set when the child
	// resource(s) ClusterRole is/are ready.
	SpaceConditionClusterRoleReady apis.ConditionType = "ClusterRoleReady"

	// SpaceConditionClusterRoleBindingsReady is set when the child
	// resource(s) ClusterRoleBindings is/are ready.
	SpaceConditionClusterRoleBindingsReady apis.ConditionType = "ClusterRoleBindingsReady"

	// SpaceConditionIAMPolicyReady is set when the child
	// resource(s) IAMPolicy is/are ready.
	SpaceConditionIAMPolicyReady apis.ConditionType = "IAMPolicyReady"
)

ConditionType represents a Service condition value

View Source
const (

	// TaskScheduleConditionReady is set when the CRD is configured and is usable.
	TaskScheduleConditionReady = apis.ConditionReady

	// TaskScheduleConditionSpaceReady is set when the child
	// resource(s) Space is/are ready.
	TaskScheduleConditionSpaceReady apis.ConditionType = "SpaceReady"
)

ConditionType represents a Service condition value

View Source
const (

	// TaskConditionSucceeded is set when the CRD is completed.
	TaskConditionSucceeded = apis.ConditionSucceeded

	// TaskConditionSpaceReady is set when the child
	// resource(s) Space is/are ready.
	TaskConditionSpaceReady apis.ConditionType = "SpaceReady"

	// TaskConditionPipelineRunReady is set when the child
	// resource(s) PipelineRun is/are ready.
	TaskConditionPipelineRunReady apis.ConditionType = "PipelineRunReady"

	// TaskConditionTaskRunReady is set when the child
	// resource(s) TaskRun is/are ready.
	TaskConditionTaskRunReady apis.ConditionType = "TaskRunReady"

	// TaskConditionAppReady is set when the child
	// resource(s) App is/are ready.
	TaskConditionAppReady apis.ConditionType = "AppReady"

	// TaskConditionConfigReady is set when the child
	// resource(s) Config is/are ready.
	TaskConditionConfigReady apis.ConditionType = "ConfigReady"
)

ConditionType represents a Service condition value

View Source
const (
	KfNamespace = "kf"
)
View Source
const (
	// PackageChecksumType is the name of the sha256 type.
	PackageChecksumSHA256Type = "sha256"
)
View Source
const (
	// TaskComponentName holds the component label anme for Task.
	TaskComponentName = "task"
)
View Source
const (
	TaskScheduleSuspendLabel = "taskschedules.kf.dev/suspend"
)
View Source
const (
	VolumeBrokerKind = "VolumeBroker"
)

Variables

View Source
var (
	AddToScheme = schemeBuilder.AddToScheme
)
View Source
var (
	DefaultMem = resource.MustParse("1Gi")
)
View Source
var SchemeGroupVersion = schema.GroupVersion{
	Group:   kf.GroupName,
	Version: "v1alpha1",
}

SchemeGroupVersion is group version used to register these objects

Functions

func AppComponentLabels

func AppComponentLabels(appName, component string) map[string]string

AppComponentLabels creates the labels matching the given component and app.

Example
labels := AppComponentLabels("my-app", "database")

fmt.Println("label count:", len(labels))
fmt.Println("name:", labels[NameLabel])
fmt.Println("managed-by:", labels[ManagedByLabel])
fmt.Println("component:", labels[ComponentLabel])
Output:

label count: 3
name: my-app
managed-by: kf
component: database

func BuildPathRegexp

func BuildPathRegexp(path string) (string, error)

BuildPathRegexp uses gorilla/mux to convert a path into regular expression that can be used to determine if a requests' path matches.

func CopyMap

func CopyMap(originalMap map[string]string) map[string]string

CopyMap copies the originalMap to a new map targetMap and returns it.

func ErrInvalidEnumValue

func ErrInvalidEnumValue(value interface{}, fieldPath string, acceptedValues []string) *apis.FieldError

ErrInvalidEnumValue constructs a FieldError for a field that has received an invalid string value.

Example
fmt.Println(ErrInvalidEnumValue("carrot", "some-path", []string{"banana", "grape", "cherry"}))
Output:

invalid value: carrot, should be one of: banana, cherry, grape: some-path

func GenerateName

func GenerateName(parts ...string) string

GenerateName generates a name given the parts. It is a DNS valid name.

func GenerateRouteName

func GenerateRouteName(hostname, domain, urlPath string) string

GenerateRouteName creates the deterministic name for a Route.

Example
name := GenerateRouteName("some-host", "myns.example.com", "/some/path")
fmt.Println(name)
Output:

some-host-myns-example-com--som8ced772f07d7bf61215b525c64ed18bf
Example (Wildcards)
name := GenerateRouteName("*", "myns.example.com", "/some/path")
fmt.Println(name)
Output:

myns-example-com--some-path4fb7bf8f09018c34a5d240e8398cb069

func GenerateTaskName

func GenerateTaskName(appname string) string

GenerateTaskName creates the deterministic name for a Task.

func GetTaskRunOutputResource

func GetTaskRunOutputResource(b *build.TaskRun, resourceName, paramName string) string

b/291822470 remove after kf v2.11.20

func GetTaskRunResults added in v2.11.20

func GetTaskRunResults(b *build.TaskRun, paramName string) string

func IsStatusFinal

func IsStatusFinal(duck duckv1beta1.Status) bool

IsStatusFinal returns true if the Ready or Succeeded conditions are True or False for a Status.

func Kind

func Kind(kind string) schema.GroupKind

Kind takes an unqualified kind and returns back a Group qualified GroupKind

func MakeRouteServiceBindingName

func MakeRouteServiceBindingName(hostname, domain, path, instanceName string) string

MakeRouteServiceBindingName returns a deterministic name for a Route service instance binding.

func MakeRouteServiceBindingParamsSecretName

func MakeRouteServiceBindingParamsSecretName(hostname, domain, path, instanceName string) string

MakeRouteServiceBindingParamsSecretName returns a deterministic name for a Route binding parameters secret.

func MakeServiceBindingName

func MakeServiceBindingName(appName, instanceName string) string

MakeServiceBindingName returns a deterministic name for a service instance binding.

func MakeServiceBindingParamsSecretName

func MakeServiceBindingParamsSecretName(appName, instanceName string) string

MakeServiceBindingParamsSecretName returns a deterministic name for the binding parameters secret.

func ManagedByKfRequirement

func ManagedByKfRequirement() labels.Requirement

ManagedByKfSelector selects resources which are managed by Kf.

Example
requirement := ManagedByKfRequirement()
selector := labels.NewSelector().Add(requirement).String()
fmt.Println(selector)
Output:

app.kubernetes.io/managed-by=kf

func MustRequirement

func MustRequirement(key string, op selection.Operator, val string) labels.Requirement

MustRequirement constructs a labels.Requirement, panicking on error. It should only be used to create requirements which cannot fail.

func PropagateCondition

func PropagateCondition(manager apis.ConditionManager, destination apis.ConditionType, source *apis.Condition) bool

PropagateCondition copies the condition of a sub-resource (source) to a destination on the given manager. It returns true if the condition is true, otherwise false.

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

func SetKfAppContainerDefaults

func SetKfAppContainerDefaults(_ context.Context, container *corev1.Container)

SetKfAppContainerDefaults sets the defaults for an application container. This function MAY be context sensitive in the future.

func SummarizeChildConditions

func SummarizeChildConditions(conditions []apis.Condition) (*apis.Condition, duckv1beta1.Conditions)

SummarizeChildConditions converts a list of conditions into a living set and returns the overall status as well as that set.

It is intended to be used with a list of top-level conditions for child resources. For example, if your CRD creates a set of Pods that need to be handled. Each desired child should get a status regardless of whether or not it currently exists.

If there are no conditions to summarize, the overall status is ready.

func UnionMaps

func UnionMaps(maps ...map[string]string) map[string]string

UnionMaps merges the keys of all the maps. Maps are merged in-order and the values from later params overwrite earlier params.

Example
x := map[string]string{"a": "1", "b": "x", "c": "x"}
y := map[string]string{"a": "1", "b": "2", "c": "3"}
z := map[string]string{"a": "1", "b": "2", "d": "4"}

result := UnionMaps(x, y, z)

for _, key := range []string{"a", "b", "c", "d"} {
	fmt.Printf("%s: %s\n", key, result[key])
}
Output:

a: 1
b: 2
c: 3
d: 4

func WithRouteDefaultDestinationPort

func WithRouteDefaultDestinationPort(ctx context.Context, port int32) context.Context

WithRouteDefaultDestinationPort sets the default destination port for the context

func WithRouteDefaultDomain

func WithRouteDefaultDomain(ctx context.Context, defaultDomain string) context.Context

WithRouteDefaultDomain sets the default domain for a route.

Types

type App

type App struct {
	metav1.TypeMeta `json:",inline"`

	// +optional
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// +optional
	Spec AppSpec `json:"spec,omitempty"`

	// +optional
	Status AppStatus `json:"status,omitempty"`
}

App is a 12-factor application deployed to Knative. It encompasses source code, configuration, and the current state of the application.

func (*App) ComponentLabels

func (app *App) ComponentLabels(component string) map[string]string

ComponentLabels returns Kubernetes recommended labels to tie together deployed applications and their pieces. The provided component name specifies the sub-resource of the app e.g. "database", "load-balancer", or "server".

Example
app := App{}
app.Name = "my-app"

labels := app.ComponentLabels("database")

fmt.Println("label count:", len(labels))
fmt.Println("name:", labels[NameLabel])
fmt.Println("managed-by:", labels[ManagedByLabel])
fmt.Println("component:", labels[ComponentLabel])
Output:

label count: 3
name: my-app
managed-by: kf
component: database

func (*App) DeepCopy

func (in *App) DeepCopy() *App

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new App.

func (*App) DeepCopyInto

func (in *App) DeepCopyInto(out *App)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*App) DeepCopyObject

func (in *App) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*App) GetGroupVersionKind

func (r *App) GetGroupVersionKind() schema.GroupVersionKind

GetGroupVersionKind returns the GroupVersionKind.

func (*App) LogSelector

func (app *App) LogSelector(children bool) string

LogSelector implements logs.Object.

func (*App) SetDefaults

func (k *App) SetDefaults(ctx context.Context)

SetDefaults implements apis.Defaultable

func (*App) Validate

func (app *App) Validate(ctx context.Context) (errs *apis.FieldError)

Validate checks for errors in the App's spec or status fields.

type AppAutoscalingRule

type AppAutoscalingRule struct {

	// RuleType is the name of the scaling rule (e.g., CPU).
	RuleType AutoscalingRuleType `json:"ruleType,omitempty"`

	// Target value for the metric.
	// Unit of target depends on the rule type.
	// For CPU, it will be a percentage represented by number in range (0, 100].
	Target *int32 `json:"target,omitempty"`
}

AppAutoscalingRule defines the autoscaling rules for an App.

func (*AppAutoscalingRule) DeepCopy

func (in *AppAutoscalingRule) DeepCopy() *AppAutoscalingRule

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AppAutoscalingRule.

func (*AppAutoscalingRule) DeepCopyInto

func (in *AppAutoscalingRule) DeepCopyInto(out *AppAutoscalingRule)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*AppAutoscalingRule) Validate

func (r *AppAutoscalingRule) Validate(ctx context.Context) (errs *apis.FieldError)

Validate checks that the fields the user has specified in AppAutoscalingRules can be used together.

type AppList

type AppList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`

	Items []App `json:"items"`
}

AppList is a list of App resources.

func (*AppList) DeepCopy

func (in *AppList) DeepCopy() *AppList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AppList.

func (*AppList) DeepCopyInto

func (in *AppList) DeepCopyInto(out *AppList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*AppList) DeepCopyObject

func (in *AppList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type AppRef

func (*AppRef) DeepCopy

func (in *AppRef) DeepCopy() *AppRef

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AppRef.

func (*AppRef) DeepCopyInto

func (in *AppRef) DeepCopyInto(out *AppRef)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*AppRef) Validate

func (app *AppRef) Validate(ctx context.Context) (errs *apis.FieldError)

Validate implements apis.Validatable.

type AppRouteStatus

type AppRouteStatus struct {
	QualifiedRouteBinding `json:",inline"`

	// VirtualService is the VirtualService that is created with the Route.
	VirtualService corev1.LocalObjectReference `json:"virtualservice,omitempty"`

	// URL is the URL for the route
	URL string `json:"url,omitempty"`

	// Status contains the status of this binding.
	Status RouteBindingStatus `json:"status,omitempty"`
}

AppRouteStatus contains the status information about a Route.

func (*AppRouteStatus) DeepCopy

func (in *AppRouteStatus) DeepCopy() *AppRouteStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AppRouteStatus.

func (*AppRouteStatus) DeepCopyInto

func (in *AppRouteStatus) DeepCopyInto(out *AppRouteStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type AppSpec

type AppSpec struct {

	// Build defines the App's build configuration.
	Build AppSpecBuild `json:"build"`

	// Template defines the App's runtime configuration.
	// +optional
	Template AppSpecTemplate `json:"template"`

	// Instances defines the scaling rules for the App.
	Instances AppSpecInstances `json:"instances,omitempty"`

	// Routes defines the routing rules for the App.
	// +optional
	// +patchStrategy=merge
	Routes []RouteWeightBinding `json:"routes,omitempty"`
}

AppSpec is the desired configuration for an App.

func (*AppSpec) DeepCopy

func (in *AppSpec) DeepCopy() *AppSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AppSpec.

func (*AppSpec) DeepCopyInto

func (in *AppSpec) DeepCopyInto(out *AppSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*AppSpec) NeedsUpdateRequestsIncrement

func (spec *AppSpec) NeedsUpdateRequestsIncrement(old AppSpec) bool

NeedsUpdateRequestsIncrement returns true if UpdateRequests needs to be incremented to force a redeploy. This function should be used as a part of defaulting and validating webhooks when AppSpecTemplate is embedded.

This can happen if a field in the spec changes without also updating the UpdateRequests.

func (*AppSpec) SetBuildDefaults

func (k *AppSpec) SetBuildDefaults(ctx context.Context)

SetBuildDefaults implements apis.Defaultable for the embedded BuildSpec.

func (*AppSpec) SetDefaults

func (k *AppSpec) SetDefaults(ctx context.Context)

SetDefaults implements apis.Defaultable

func (*AppSpec) SetRouteDefaults

func (k *AppSpec) SetRouteDefaults(ctx context.Context)

SetRouteDefaults sets the defaults for an AppSpec's Routes.

func (*AppSpec) Validate

func (spec *AppSpec) Validate(ctx context.Context) (errs *apis.FieldError)

Validate checks that the pod template the user has submitted is valid and that the scaling and lifecycle is valid.

func (*AppSpec) ValidateRoutes

func (spec *AppSpec) ValidateRoutes(ctx context.Context) (errs *apis.FieldError)

ValidateRoutes validates each Route for an App.

type AppSpecAutoscaling

type AppSpecAutoscaling struct {

	// Enabled determines if the App should have autoscaling enabled or not.
	Enabled bool `json:"enabled,omitempty"`

	// MinReplicas defines the minimum number of desired instances.
	MinReplicas *int32 `json:"minReplicas,omitempty"`

	// MaxReplicas defines the maximum number of desired instances.
	MaxReplicas *int32 `json:"maxReplicas,omitempty"`

	// Rules defines the autoscaling rules for the App.
	Rules []AppAutoscalingRule `json:"rules,omitempty"`
}

AppSpecAutoscaling defines the autoscaling specs for an App.

func (*AppSpecAutoscaling) DeepCopy

func (in *AppSpecAutoscaling) DeepCopy() *AppSpecAutoscaling

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AppSpecAutoscaling.

func (*AppSpecAutoscaling) DeepCopyInto

func (in *AppSpecAutoscaling) DeepCopyInto(out *AppSpecAutoscaling)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*AppSpecAutoscaling) RequiresHPA

func (autoscaling *AppSpecAutoscaling) RequiresHPA() bool

RequiresHPA determines if HPA needed to be created an app.

func (*AppSpecAutoscaling) SetAutoscalingDefaults

func (as *AppSpecAutoscaling) SetAutoscalingDefaults(_ context.Context)

SetAutoscalingDefaults set the defaults for AppSpecAutoscaling

func (*AppSpecAutoscaling) Validate

func (autoscaling *AppSpecAutoscaling) Validate(ctx context.Context) (errs *apis.FieldError)

Validate checks that the fields the user has specified in AppSpecAutoscaling can be used together.

type AppSpecBuild

type AppSpecBuild struct {

	// UpdateRequests is a unique identifier for a Build.
	// Updating sub-values will trigger a new value.
	// +optional
	UpdateRequests int `json:"updateRequests,omitempty"`

	// Spec contains the configuration of the Build to create for the App.
	// +optional
	Spec *BuildSpec `json:"spec,omitempty"`

	// Image is a ready-to-go container image to use instead of the Build.
	// +optional
	Image *string `json:"image,omitempty"`

	// BuildRef references an ADX Build (group:
	// builds.appdevexperience.dev) that should be used instead of a Build.
	// NOTE: This API is currently in preview.
	// +optional
	BuildRef *corev1.LocalObjectReference `json:"buildRef,omitempty"`
}

AppSpecBuild defines an app's build configuration.

func (*AppSpecBuild) DeepCopy

func (in *AppSpecBuild) DeepCopy() *AppSpecBuild

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AppSpecBuild.

func (*AppSpecBuild) DeepCopyInto

func (in *AppSpecBuild) DeepCopyInto(out *AppSpecBuild)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*AppSpecBuild) NeedsUpdateRequestsIncrement

func (spec *AppSpecBuild) NeedsUpdateRequestsIncrement(old AppSpecBuild) bool

NeedsUpdateRequestsIncrement returns true if UpdateRequests needs to be incremented to force a rebuild. This function should be used as a part of defaulting and validating webhooks when BuildSpec is embedded.

This can happen if a field in the build changes without also updating the UpdateRequests.

func (*AppSpecBuild) Validate

func (spec *AppSpecBuild) Validate(ctx context.Context) (errs *apis.FieldError)

ValidateBuildSpec validates the BuildSpec embedded in the AppSpec.

type AppSpecInstances

type AppSpecInstances struct {

	// Autoscaling defines an App's autoscaling configurations.
	Autoscaling AppSpecAutoscaling `json:"autoscaling,omitempty"`

	// Stopped determines if the App should be running or not.
	Stopped bool `json:"stopped,omitempty"`

	// Replicas defines a static number of desired instances.
	Replicas *int32 `json:"replicas,omitempty"`

	// DeprecatedExactly value is copied to Replicas.
	DeprecatedExactly *int32 `json:"exactly,omitempty"`
}

AppSpecInstances defines the scaling rules for an App.

func (*AppSpecInstances) DeepCopy

func (in *AppSpecInstances) DeepCopy() *AppSpecInstances

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AppSpecInstances.

func (*AppSpecInstances) DeepCopyInto

func (in *AppSpecInstances) DeepCopyInto(out *AppSpecInstances)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*AppSpecInstances) DeploymentReplicas

func (instances *AppSpecInstances) DeploymentReplicas() (int32, error)

DeploymentReplicas returns the value that deployment replicas should be set to.

func (*AppSpecInstances) SetDefaults

func (k *AppSpecInstances) SetDefaults(ctx context.Context)

SetDefaults implements apis.Defaultable.

func (*AppSpecInstances) Status

func (instances *AppSpecInstances) Status() InstanceStatus

Status returns an InstanceStatus representing this AppSpecInstancces indicating what the real scale factor was.

func (*AppSpecInstances) Validate

func (instances *AppSpecInstances) Validate(ctx context.Context) (errs *apis.FieldError)

Validate checks that the fields the user has specified in AppSpecInstances can be used together.

type AppSpecTemplate

type AppSpecTemplate struct {

	// UpdateRequests is a unique identifier for an AppSpecTemplate.
	// Updating sub-values will trigger a new value.
	UpdateRequests int `json:"updateRequests"`

	// Template is a PodSpec with additional restrictions.
	// The image name is ignored.
	// The Spec contains configuration for the App's Pod.
	// (Env, Vars, Quotas, etc)
	// +optional
	Spec corev1.PodSpec `json:"spec,omitempty"`
}

AppSpecTemplate defines an app's runtime configuration.

func (*AppSpecTemplate) DeepCopy

func (in *AppSpecTemplate) DeepCopy() *AppSpecTemplate

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AppSpecTemplate.

func (*AppSpecTemplate) DeepCopyInto

func (in *AppSpecTemplate) DeepCopyInto(out *AppSpecTemplate)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*AppSpecTemplate) SetDefaults

func (k *AppSpecTemplate) SetDefaults(ctx context.Context, spec *AppSpec)

SetDefaults implements apis.Defaultable.

type AppStatus

type AppStatus struct {
	// Pull in the fields from Knative's duckv1beta1 status field.
	duckv1beta1.Status `json:",inline"`

	// BuildStatusFields embeds the image and build name for the latest
	// passing build.
	BuildStatusFields `json:",inline"`

	// LatestReadyBuildName contains the name of the build that was most
	// recently built correctly.
	LatestReadyBuildName string `json:"latestReadyBuild,omitempty"`

	// LatestCreatedBuildName contains the name of the build that was most
	// recently created.
	LatestCreatedBuildName string `json:"latestBuild,omitempty"`

	// ServiceBindings are the bindings currently attached to the App.
	ServiceBindingNames []string `json:"serviceBindings,omitempty"`

	// ServiceBindingConditions are the conditions of the service bindings.
	ServiceBindingConditions duckv1beta1.Conditions `json:"serviceBindingConditions"`

	// Routes contains the statuses of the Routes attached to the instance.
	Routes []AppRouteStatus `json:"routes,omitempty"`

	// URLs is an aggregated list of URLs from Routes. This is a vanity field
	// that is necessary due to:
	// https://github.com/kubernetes/kubernetes/issues/67268
	//
	// The values found here are also found in .status.routes[*].url
	//
	// NOTE: All Route URLs will be included. This includes non-ready ones.
	URLs []string `json:"urls,omitempty"`

	// RouteConditions are the conditions of the routes.
	RouteConditions duckv1beta1.Conditions `json:"routeConditions,omitempty"`

	// Volumes are the conditions of the volumes.
	Volumes []AppVolumeStatus `json:"volumes,omitempty"`

	// Instances are actual status of the instance counts.
	Instances InstanceStatus `json:"instances,omitempty"`

	// ServiceAccountName is the service account used by the app.
	ServiceAccountName string `json:"serviceAccountName,omitempty"`

	// Tasks are status of Tasks run on the App.
	Tasks AppTaskStatus `json:"tasks,omitempty"`

	// StartCommands are the container and buildpack start commands.
	StartCommands StartCommandStatus `json:"startCommands,omitempty"`
}

AppStatus is the current configuration and running state for an App.

func (*AppStatus) BuildCondition

func (status *AppStatus) BuildCondition() SingleConditionManager

BuildCondition gets a manager for the state of the child resource.

func (*AppStatus) DeepCopy

func (in *AppStatus) DeepCopy() *AppStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AppStatus.

func (*AppStatus) DeepCopyInto

func (in *AppStatus) DeepCopyInto(out *AppStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*AppStatus) DeploymentCondition

func (status *AppStatus) DeploymentCondition() SingleConditionManager

DeploymentCondition gets a manager for the state of the child resource.

func (*AppStatus) EnvVarSecretCondition

func (status *AppStatus) EnvVarSecretCondition() SingleConditionManager

EnvVarSecretCondition gets a manager for the state of the child resource.

func (*AppStatus) GetCondition

func (status *AppStatus) GetCondition(t apis.ConditionType) *apis.Condition

GetCondition returns the condition by name.

func (*AppStatus) HorizontalPodAutoscalerCondition

func (status *AppStatus) HorizontalPodAutoscalerCondition() SingleConditionManager

HorizontalPodAutoscalerCondition gets a manager for the state of the child resource.

func (*AppStatus) InitializeConditions

func (status *AppStatus) InitializeConditions()

InitializeConditions sets the initial values to the conditions.

func (*AppStatus) IsReady

func (status *AppStatus) IsReady() bool

IsReady looks at the conditions to see if they are happy.

func (*AppStatus) MarkSpaceHealthy

func (status *AppStatus) MarkSpaceHealthy()

MarkSpaceHealthy notes that the space was able to be retrieved and defaults can be applied from it.

func (*AppStatus) MarkSpaceUnhealthy

func (status *AppStatus) MarkSpaceUnhealthy(reason, message string)

MarkSpaceUnhealthy notes that the space was could not be retrieved.

func (*AppStatus) PropagateADXBuildStatus

func (status *AppStatus) PropagateADXBuildStatus(u *unstructured.Unstructured) error

PropagateADXBuildStatus copies the AppDevExperience Build status to the App's.

func (*AppStatus) PropagateAutoscalerV1Status

func (status *AppStatus) PropagateAutoscalerV1Status(autoscaler *autoscalingv1.HorizontalPodAutoscaler)

PropagateAutoscalerV1Status updates the autoscaler status to reflect the underlying state of the autoscaler. HorizontalPodAutoscalerCondition is not available for V1.

func (*AppStatus) PropagateBuildStatus

func (status *AppStatus) PropagateBuildStatus(build *Build)

PropagateBuildStatus copies the Build status to the App's.

func (*AppStatus) PropagateDeploymentStatus

func (status *AppStatus) PropagateDeploymentStatus(deployment *appsv1.Deployment)

PropagateDeploymentStatus updates the deployment status to reflect the underlying state of the deployment.

func (*AppStatus) PropagateEnvVarSecretStatus

func (status *AppStatus) PropagateEnvVarSecretStatus(secret *v1.Secret)

PropagateEnvVarSecretStatus updates the env var secret readiness status.

func (*AppStatus) PropagateInstanceStatus

func (status *AppStatus) PropagateInstanceStatus(is InstanceStatus)

PropagateInstanceStatus updates the effective instance status from the app

func (*AppStatus) PropagateRouteStatus

func (status *AppStatus) PropagateRouteStatus(bindings []QualifiedRouteBinding, routes []Route, undeclaredBindings []QualifiedRouteBinding)

PropagateRouteStatus updates the route readiness status.

func (*AppStatus) PropagateServiceAccountStatus

func (status *AppStatus) PropagateServiceAccountStatus(serviceAccount *corev1.ServiceAccount)

PropagateServiceAccountStatus propagates the app's service account name.

func (*AppStatus) PropagateServiceInstanceBindingsStatus

func (status *AppStatus) PropagateServiceInstanceBindingsStatus(bindings []ServiceInstanceBinding)

PropagateServiceInstanceBindingsStatus updates the service binding readiness status.

func (*AppStatus) PropagateServiceStatus

func (status *AppStatus) PropagateServiceStatus(service *corev1.Service)

PropagateServiceStatus propagates the app's internal URL.

func (*AppStatus) PropagateStartCommandStatus added in v2.11.13

func (status *AppStatus) PropagateStartCommandStatus(sc StartCommandStatus)

PropagateStartCommandStatus updates the start command status from the app

func (*AppStatus) PropagateTerminatingStatus

func (status *AppStatus) PropagateTerminatingStatus()

PropagateTerminatingStatus updates the ready status of the resource to False if the resource received a delete request.

func (*AppStatus) PropagateVolumeBindingsStatus

func (status *AppStatus) PropagateVolumeBindingsStatus(volumeBindings []*ServiceInstanceBinding)

PropagateVolumeBindingsStatus updates the service binding readiness status.

func (*AppStatus) RouteCondition

func (status *AppStatus) RouteCondition() SingleConditionManager

RouteCondition gets a manager for the state of the child resource.

func (*AppStatus) ServiceAccountCondition

func (status *AppStatus) ServiceAccountCondition() SingleConditionManager

ServiceAccountCondition gets a manager for the state of the child resource.

func (*AppStatus) ServiceCondition

func (status *AppStatus) ServiceCondition() SingleConditionManager

ServiceCondition gets a manager for the state of the child resource.

func (*AppStatus) ServiceInstanceBindingsCondition

func (status *AppStatus) ServiceInstanceBindingsCondition() SingleConditionManager

ServiceInstanceBindingsCondition gets a manager for the state of the child resource.

func (*AppStatus) SpaceCondition

func (status *AppStatus) SpaceCondition() SingleConditionManager

SpaceCondition gets a manager for the state of the child resource.

type AppTaskStatus

type AppTaskStatus struct {
	// UpdateRequests contains the number of run-task requests on the App.
	UpdateRequests int `json:"updateRequests"`
}

AppTaskStatus contains the Task status on the App.

func (*AppTaskStatus) DeepCopy

func (in *AppTaskStatus) DeepCopy() *AppTaskStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AppTaskStatus.

func (*AppTaskStatus) DeepCopyInto

func (in *AppTaskStatus) DeepCopyInto(out *AppTaskStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type AppVolumeStatus

type AppVolumeStatus struct {
	MountPath       string `json:"mountPath"`
	VolumeName      string `json:"name"`
	VolumeClaimName string `json:"claim"`
	ReadOnly        bool   `json:"readonly,omitempty"`

	UidGid `json:",inline"`
}

AppVolumeStatus contains the status of mounted volume.

func (*AppVolumeStatus) DeepCopy

func (in *AppVolumeStatus) DeepCopy() *AppVolumeStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AppVolumeStatus.

func (*AppVolumeStatus) DeepCopyInto

func (in *AppVolumeStatus) DeepCopyInto(out *AppVolumeStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type AutoscalingRuleMetricValueStatus

type AutoscalingRuleMetricValueStatus struct {
	AverageValue *resource.Quantity `json:"averageValue,omitempty"`
}

AutoscalingRuleMetricValueStatus stores the metric value status.

TODO: This closely resembles https://godoc.org/k8s.io/api/autoscaling/v2beta2#MetricValueStatus Once the v2betaX is promoted to v2, it should be replaced.

func (*AutoscalingRuleMetricValueStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AutoscalingRuleMetricValueStatus.

func (*AutoscalingRuleMetricValueStatus) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type AutoscalingRuleStatus

type AutoscalingRuleStatus struct {
	AppAutoscalingRule `json:",inline"`

	Current AutoscalingRuleMetricValueStatus `json:"Current"`
}

AutoscalingRuleStatus contains the current status of an autoscaling rule.

func (*AutoscalingRuleStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AutoscalingRuleStatus.

func (*AutoscalingRuleStatus) DeepCopyInto

func (in *AutoscalingRuleStatus) DeepCopyInto(out *AutoscalingRuleStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type AutoscalingRuleType

type AutoscalingRuleType string

AutoscalingRuleType defines supported ruletypes for autoscaling.

const (
	CPURuleType AutoscalingRuleType = "CPU"
)

Allowed RuleTypes rule autoscaling.

func GetAutoscalingRuleType

func GetAutoscalingRuleType(s string) AutoscalingRuleType

GetAutoscalingRuleType converts a string to AutoscalingRuleType. This is used by CLI to get rule type based on string. No validation is needed.

type BindingOSBStatus

type BindingOSBStatus struct {
	Binding      *OSBState `json:"binding,omitempty"`
	Bound        *OSBState `json:"bound,omitempty"`
	BindFailed   *OSBState `json:"bindFailed,omitempty"`
	Unbinding    *OSBState `json:"unbinding,omitempty"`
	Unbound      *OSBState `json:"unbound,omitempty"`
	UnbindFailed *OSBState `json:"unbindFailed,omitempty"`
}

BindingOSBStatus is a union of status information for the state of a particular binding. Exactly one should be set at any one time.

func (*BindingOSBStatus) DeepCopy

func (in *BindingOSBStatus) DeepCopy() *BindingOSBStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BindingOSBStatus.

func (*BindingOSBStatus) DeepCopyInto

func (in *BindingOSBStatus) DeepCopyInto(out *BindingOSBStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*BindingOSBStatus) IsBlank

func (o *BindingOSBStatus) IsBlank() bool

IsBlank returns true if the status is unset.

type BindingType

type BindingType struct {

	// App is the Kf App that the service instance is bound to.
	// +optional
	App *AppRef `json:"app,omitempty"`

	// Route is the Route that the service instance is bound to.
	// +optional
	Route *RouteRef `json:"route,omitempty"`
}

BindingType is the type of the service instance binding.

func (*BindingType) DeepCopy

func (in *BindingType) DeepCopy() *BindingType

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BindingType.

func (*BindingType) DeepCopyInto

func (in *BindingType) DeepCopyInto(out *BindingType)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*BindingType) Validate

func (bindingType *BindingType) Validate(ctx context.Context) (errs *apis.FieldError)

Validate implements apis.Validatable.

type BindingVolumeParams

type BindingVolumeParams struct {
	// Mount is the path to mount the NFS share.
	Mount string `json:"mount"`

	// ReadOnly indicates whether the mounted share is readonly.
	ReadOnly bool `json:"readonly,omitempty"`

	UidGid `json:",inline"`
}

BindingVolumeParams are the volume related fields stored in the binding's secret.

func (*BindingVolumeParams) DeepCopy

func (in *BindingVolumeParams) DeepCopy() *BindingVolumeParams

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BindingVolumeParams.

func (*BindingVolumeParams) DeepCopyInto

func (in *BindingVolumeParams) DeepCopyInto(out *BindingVolumeParams)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type BindingVolumeStatus

type BindingVolumeStatus struct {
	// Mount is the path to mount the NFS share.
	Mount string `json:"mount"`

	// PersistentVolumeName is the name of the binded PersistentVolume.
	PersistentVolumeName string `json:"volumeName,omitempty"`

	// PersistentVolumeClaimName is the name of the binded PersistentVolumeClaim.
	PersistentVolumeClaimName string `json:"claimName,omitempty"`

	// ReadOnly indicates whether the mounted share is readonly.
	ReadOnly bool `json:"readonly,omitempty"`

	UidGid `json:",inline"`
}

BindingVolumeStatus is the volume related status.

func (*BindingVolumeStatus) DeepCopy

func (in *BindingVolumeStatus) DeepCopy() *BindingVolumeStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BindingVolumeStatus.

func (*BindingVolumeStatus) DeepCopyInto

func (in *BindingVolumeStatus) DeepCopyInto(out *BindingVolumeStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type BrokeredInstance

type BrokeredInstance struct {
	// Broker is the name of the service broker for the service instance. Fill this in to explicitly specify a broker
	// if a service class and plan could match to multiple brokers.
	// +optional
	Broker string `json:"broker,omitempty"`

	// ClassName is the name of the service class.
	ClassName string `json:"className,omitempty"`

	// PlanName is the name of the service plan.
	PlanName string `json:"planName,omitempty"`

	// Namespaced is true if the service broker/class/plan is namespaced,
	// and false they are available at the cluster level.
	Namespaced bool `json:"namespaced,omitempty"`
}

BrokeredInstance is a service instance created by a service broker via KSC. deprecated

func (*BrokeredInstance) DeepCopy

func (in *BrokeredInstance) DeepCopy() *BrokeredInstance

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BrokeredInstance.

func (*BrokeredInstance) DeepCopyInto

func (in *BrokeredInstance) DeepCopyInto(out *BrokeredInstance)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*BrokeredInstance) SetDefaults

func (instance *BrokeredInstance) SetDefaults(ctx context.Context)

SetDefaults implements apis.Defaultable.

func (*BrokeredInstance) Validate

func (instance *BrokeredInstance) Validate(ctx context.Context) (errs *apis.FieldError)

Validate implements apis.Validatable.

type Build

type Build struct {
	metav1.TypeMeta `json:",inline"`

	// +optional
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// +optional
	Spec BuildSpec `json:"spec,omitempty"`

	// +optional
	Status BuildStatus `json:"status,omitempty"`
}

Build represents the source code and build configuration for an App.

func (*Build) DeepCopy

func (in *Build) DeepCopy() *Build

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Build.

func (*Build) DeepCopyInto

func (in *Build) DeepCopyInto(out *Build)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Build) DeepCopyObject

func (in *Build) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*Build) GetGroupVersionKind

func (r *Build) GetGroupVersionKind() schema.GroupVersionKind

GetGroupVersionKind returns the GroupVersionKind.

func (*Build) SetDefaults

func (k *Build) SetDefaults(ctx context.Context)

SetDefaults implements apis.Defaultable

func (*Build) Validate

func (b *Build) Validate(ctx context.Context) (errs *apis.FieldError)

Validate checks for errors in the Build's spec or status fields.

type BuildList

type BuildList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`

	Items []Build `json:"items"`
}

BuildList is a list of Build resources.

func (*BuildList) DeepCopy

func (in *BuildList) DeepCopy() *BuildList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BuildList.

func (*BuildList) DeepCopyInto

func (in *BuildList) DeepCopyInto(out *BuildList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*BuildList) DeepCopyObject

func (in *BuildList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type BuildParam

type BuildParam struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

BuildParam holds custom parameters for the build being run. Unlike Tekton Params, Kf only supports string values, but the type is otherwise over-the-wire compatible.

func StringParam

func StringParam(key, value string) BuildParam

StringParam returns a BuildParam for the given key.

func (*BuildParam) DeepCopy

func (in *BuildParam) DeepCopy() *BuildParam

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BuildParam.

func (*BuildParam) DeepCopyInto

func (in *BuildParam) DeepCopyInto(out *BuildParam)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*BuildParam) ToTektonParam

func (bp *BuildParam) ToTektonParam() tektonv1beta1.Param

ToTektonParam converts the BuildParam the equivalent value for Tekton TaskRuns to consume.

type BuildSpec

type BuildSpec struct {

	// SourcePackage references the SourcePackage for the source code of the
	// App. If left empty, the SOURCE_IMAGE environment variable will not be
	// added to the resulting TaskRun.
	// +optional
	SourcePackage corev1.LocalObjectReference `json:"sourcePackage,omitempty"`

	// TaskRef is inlined to reference the Tekton Task to use for the Build.
	BuildTaskRef `json:",inline"`

	// Params is the map of keys and values used for the custom task
	Params []BuildParam `json:"params,omitempty"`

	// Env represents the environment variables to apply when building the App.
	// +optional
	Env []corev1.EnvVar `json:"env,omitempty"`

	// NodeSelector represents the selectors to apply when building and deploying the App.
	// +optional
	NodeSelector map[string]string `json:"nodeSelector,omitempty"`
}

BuildSpec defines the source code for an App.

func AppSpecBuildMask

func AppSpecBuildMask(in BuildSpec) BuildSpec

AppSpecBuildMask is a _shallow_ copy of the BuildSpec object to a new BuildSpec object bringing over only the fields allowed to be set in the App by developers. This does not validate the contents or the bounds of the provided fields.

This function should be used with godoc.org/knative.dev/pkg/apis#CheckDisallowedFields to validate that the user hasn't set any fields they're not allowed to in the build of AppSpec.

func BuildpackV2Build

func BuildpackV2Build(sourceImage string, stack config.StackV2Definition, buildpacks []string, skipDetect bool) BuildSpec

BuildpackV2Build is a BuildSpec for building with Cloud Foundry Buildpacks.

func BuildpackV3Build

func BuildpackV3Build(sourceImage string, stack config.StackV3Definition, buildpacks []string) BuildSpec

BuildpackV3Build is a BuildSpec for building with Cloud Native Buildpacks.

func DockerfileBuild

func DockerfileBuild(sourceImage, dockerfile string) BuildSpec

DockerfileBuild is a BuildSpec for building with a Dockerfile.

func (*BuildSpec) DeepCopy

func (in *BuildSpec) DeepCopy() *BuildSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BuildSpec.

func (*BuildSpec) DeepCopyInto

func (in *BuildSpec) DeepCopyInto(out *BuildSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*BuildSpec) SetDefaults

func (k *BuildSpec) SetDefaults(ctx context.Context)

SetDefaults implements apis.Defaultable

func (*BuildSpec) Validate

func (spec *BuildSpec) Validate(ctx context.Context) (errs *apis.FieldError)

Validate makes sure that a BuildSpec is properly configured.

type BuildStatus

type BuildStatus struct {
	// Pull in the fields from Knative's duckv1beta1 status field.
	duckv1beta1.Status `json:",inline"`

	BuildStatusFields `json:",inline"`
}

BuildStatus is the current configuration and running state for an App's Build.

func (*BuildStatus) DeepCopy

func (in *BuildStatus) DeepCopy() *BuildStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BuildStatus.

func (*BuildStatus) DeepCopyInto

func (in *BuildStatus) DeepCopyInto(out *BuildStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*BuildStatus) GetCondition

func (status *BuildStatus) GetCondition(t apis.ConditionType) *apis.Condition

GetCondition returns the condition by name.

func (*BuildStatus) InitializeConditions

func (status *BuildStatus) InitializeConditions()

InitializeConditions sets the initial values to the conditions.

func (*BuildStatus) MarkSpaceHealthy

func (status *BuildStatus) MarkSpaceHealthy()

MarkSpaceHealthy notes that the Space was able to be retrieved and defaults can be applied from it.

func (*BuildStatus) MarkSpaceUnhealthy

func (status *BuildStatus) MarkSpaceUnhealthy(reason, message string)

MarkSpaceUnhealthy notes that the Space was could not be retrieved.

func (*BuildStatus) PropagateBuildStatus

func (status *BuildStatus) PropagateBuildStatus(build *build.TaskRun)

PropagateBuildStatus copies fields from the Build status to Source and updates the readiness based on the current phase.

func (*BuildStatus) PropagateSourcePackageStatus

func (status *BuildStatus) PropagateSourcePackageStatus(sourcePackage *SourcePackage)

PropagateSourcePackageStatus copies the condition from the SourcePackage to the BuildStatus.

func (*BuildStatus) PropagateTerminatingStatus

func (status *BuildStatus) PropagateTerminatingStatus()

PropagateTerminatingStatus updates the ready status of the build to False if the build received a delete request.

func (*BuildStatus) SourcePackageCondition

func (status *BuildStatus) SourcePackageCondition() SingleConditionManager

SourcePackageCondition gets a manager for the state of the child resource.

func (*BuildStatus) SpaceCondition

func (status *BuildStatus) SpaceCondition() SingleConditionManager

SpaceCondition gets a manager for the state of the child resource.

func (*BuildStatus) Succeeded

func (status *BuildStatus) Succeeded() bool

Succeeded returns if the type successfully completed.

func (*BuildStatus) TaskRunCondition

func (status *BuildStatus) TaskRunCondition() SingleConditionManager

TaskRunCondition gets a manager for the state of the child resource.

type BuildStatusFields

type BuildStatusFields struct {
	// Image is the latest successfully built image.
	// +optional
	Image string `json:"image,omitempty"`

	// BuildName is the name of the build that produced the image.
	// +optional
	BuildName string `json:"buildName,omitempty"`

	// StartTime contains the time the build started.
	StartTime *metav1.Time `json:"startTime,omitempty"`

	// CompletionTime contains the time the build completed.
	CompletionTime *metav1.Time `json:"completionTime,omitempty"`

	// Duration contains the duration of the build.
	Duration *metav1.Duration `json:"duration,omitempty"`
}

BuildStatusFields holds the fields of Build's status that are shared. This is defined separately and inlined so that other types can readily consume these fields via duck typing.

func (*BuildStatusFields) DeepCopy

func (in *BuildStatusFields) DeepCopy() *BuildStatusFields

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BuildStatusFields.

func (*BuildStatusFields) DeepCopyInto

func (in *BuildStatusFields) DeepCopyInto(out *BuildStatusFields)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type BuildTaskRef

type BuildTaskRef struct {
	// Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names
	Name string `json:"name,omitempty"`
	// Kind indicates the kind of the task, namespaced or cluster scoped.
	Kind string `json:"kind,omitempty"`
	// API version of the referent
	// +optional
	APIVersion string `json:"apiVersion,omitempty"`
}

BuildTaskRef can be used to refer to a specific instance of a Tekton Task.

func (*BuildTaskRef) DeepCopy

func (in *BuildTaskRef) DeepCopy() *BuildTaskRef

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BuildTaskRef.

func (*BuildTaskRef) DeepCopyInto

func (in *BuildTaskRef) DeepCopyInto(out *BuildTaskRef)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ClusterServiceBroker

type ClusterServiceBroker struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   ClusterServiceBrokerSpec  `json:"spec,omitempty"`
	Status CommonServiceBrokerStatus `json:"status,omitempty"`
}

ClusterServiceBroker represents an Open Service Broker (OSB) compatible service broker available at the cluster level.

func (*ClusterServiceBroker) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterServiceBroker.

func (*ClusterServiceBroker) DeepCopyInto

func (in *ClusterServiceBroker) DeepCopyInto(out *ClusterServiceBroker)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ClusterServiceBroker) DeepCopyObject

func (in *ClusterServiceBroker) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*ClusterServiceBroker) GetCredentialsSecretRef

func (sb *ClusterServiceBroker) GetCredentialsSecretRef() NamespacedObjectReference

GetCredentialsSecretRef implements CommonServiceBroker.

func (*ClusterServiceBroker) GetGroupVersionKind

func (sb *ClusterServiceBroker) GetGroupVersionKind() schema.GroupVersionKind

GetGroupVersionKind implements kmeta.OwnerRefable.

func (*ClusterServiceBroker) GetKind

func (sb *ClusterServiceBroker) GetKind() string

GetKind implements CommonServiceBroker.

func (*ClusterServiceBroker) GetServiceOfferings

func (sb *ClusterServiceBroker) GetServiceOfferings() []ServiceOffering

GetServiceOfferings implements CommonServiceBroker.

func (*ClusterServiceBroker) SetDefaults

func (sb *ClusterServiceBroker) SetDefaults(ctx context.Context)

SetDefaults implements apis.Defaultable.

func (*ClusterServiceBroker) Validate

func (sb *ClusterServiceBroker) Validate(ctx context.Context) (errs *apis.FieldError)

Validate implements apis.Validatable.

type ClusterServiceBrokerList

type ClusterServiceBrokerList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`

	Items []ClusterServiceBroker `json:"items"`
}

ClusterServiceBrokerList is a list of ClusterServiceBroker resources

func (*ClusterServiceBrokerList) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterServiceBrokerList.

func (*ClusterServiceBrokerList) DeepCopyInto

func (in *ClusterServiceBrokerList) DeepCopyInto(out *ClusterServiceBrokerList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ClusterServiceBrokerList) DeepCopyObject

func (in *ClusterServiceBrokerList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ClusterServiceBrokerSpec

type ClusterServiceBrokerSpec struct {
	CommonServiceBrokerSpec `json:",inline"`

	// Credentials contains a reference to a secret containing credentials
	// for the service.
	// +optional
	Credentials NamespacedObjectReference `json:"credentials"`
}

ClusterServiceBrokerSpec contains the user supplied specification for the broker.

func (*ClusterServiceBrokerSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterServiceBrokerSpec.

func (*ClusterServiceBrokerSpec) DeepCopyInto

func (in *ClusterServiceBrokerSpec) DeepCopyInto(out *ClusterServiceBrokerSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ClusterServiceBrokerSpec) SetDefaults

func (spec *ClusterServiceBrokerSpec) SetDefaults(ctx context.Context)

SetDefaults implements apis.Defaultable.

func (*ClusterServiceBrokerSpec) Validate

func (spec *ClusterServiceBrokerSpec) Validate(ctx context.Context) (errs *apis.FieldError)

Validate implements apis.Validatable.

type CommonServiceBroker

type CommonServiceBroker interface {
	// GetName returns the name of the broker.
	GetName() string
	// GetNamespace returns the name of the namespace or blank if cluster-scoped.
	GetNamespace() string
	// GetKind returns the kind of the broker.
	GetKind() string
	// GetServiceOfferings returns the service offerings for the broker.
	GetServiceOfferings() []ServiceOffering
	// GetCredentialsSecretRef gets the Secret reference for the connection
	// credentials.
	GetCredentialsSecretRef() NamespacedObjectReference
}

CommonServiceBroker is an interface common to cluster and namespaced brokers.

type CommonServiceBrokerSpec

type CommonServiceBrokerSpec struct {
	// UpdateRequests is a unique identifier, updating will trigger a
	// refresh.
	// +optional
	UpdateRequests int `json:"updateRequests"`

	// VolumeBrokerSpec indicates this service broker is a VolumeBroker.
	VolumeBrokerSpec *VolumeBrokerSpec `json:"volume,omitempty"`
}

CommonServiceBrokerSpec holds common fields between the ServiceBrokerSpec and ClusterServiceBrokerSpec.

func (*CommonServiceBrokerSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CommonServiceBrokerSpec.

func (*CommonServiceBrokerSpec) DeepCopyInto

func (in *CommonServiceBrokerSpec) DeepCopyInto(out *CommonServiceBrokerSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*CommonServiceBrokerSpec) SetDefaults

func (spec *CommonServiceBrokerSpec) SetDefaults(ctx context.Context)

SetDefaults implements apis.Defaultable.

func (*CommonServiceBrokerSpec) Validate

func (sc *CommonServiceBrokerSpec) Validate(ctx context.Context) (errs *apis.FieldError)

Validate implements apis.Validatable.

type CommonServiceBrokerStatus

type CommonServiceBrokerStatus struct {
	// Pull in the fields from Knative's duckv1beta1 status field.
	duckv1beta1.Status `json:",inline"`

	// UpdateRequests is the last processed UpdateRequests value.
	UpdateRequests int `json:"updateRequests"`

	// Services contains the list of services offered by the broker.
	Services []ServiceOffering `json:"services,omitempty"`
}

CommonServiceBrokerStatus contains the status of the broker.

func (*CommonServiceBrokerStatus) CatalogCondition

func (status *CommonServiceBrokerStatus) CatalogCondition() SingleConditionManager

CatalogCondition gets a manager for the state of the child resource.

func (*CommonServiceBrokerStatus) CredsSecretCondition

func (status *CommonServiceBrokerStatus) CredsSecretCondition() SingleConditionManager

CredsSecretCondition gets a manager for the state of the child resource.

func (*CommonServiceBrokerStatus) CredsSecretPopulatedCondition

func (status *CommonServiceBrokerStatus) CredsSecretPopulatedCondition() SingleConditionManager

CredsSecretPopulatedCondition gets a manager for the state of the child resource.

func (*CommonServiceBrokerStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CommonServiceBrokerStatus.

func (*CommonServiceBrokerStatus) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*CommonServiceBrokerStatus) GetCondition

func (status *CommonServiceBrokerStatus) GetCondition(t apis.ConditionType) *apis.Condition

GetCondition returns the condition by name.

func (*CommonServiceBrokerStatus) InitializeConditions

func (status *CommonServiceBrokerStatus) InitializeConditions()

InitializeConditions sets the initial values to the conditions.

func (*CommonServiceBrokerStatus) IsReady

func (status *CommonServiceBrokerStatus) IsReady() bool

IsReady looks at the conditions to see if they are happy.

func (*CommonServiceBrokerStatus) PropagateDeletionBlockedStatus

func (status *CommonServiceBrokerStatus) PropagateDeletionBlockedStatus()

PropagateDeletionBlockedStatus updates the ready status of the service broker to False if the broker received a delete request and is still part of a service instance.

func (*CommonServiceBrokerStatus) PropagateSecretStatus

func (status *CommonServiceBrokerStatus) PropagateSecretStatus(secret *corev1.Secret)

PropagateSecretStatus updates the status of the parameters secret being created and populated.

func (*CommonServiceBrokerStatus) PropagateTerminatingStatus

func (status *CommonServiceBrokerStatus) PropagateTerminatingStatus()

PropagateTerminatingStatus updates the ready status of the resource to False if the resource received a delete request.

type ID

type ID string

ID is an Int64 that is very flexible. If a string is passed in instead, it will assume a 0 value. NOTE: This has to be a custom type for the UnmarshalJSON (as opposed to just using a string with an embed type) so that the JSON unmarshaler still unmarshals the outer type. See https://github.com/golang/go/issues/39470 for more info.

func (*ID) UnmarshalJSON

func (g *ID) UnmarshalJSON(data []byte) error

UnmarshalJSON implements json.Unmarshaler. This is necessary as the UID and GID can be a bit tricky with strings vs integers. We *wanted* them to be strings, but they can look like ints which can throw off the parsers.

type InstanceStatus

type InstanceStatus struct {
	// Replicas contains the number of App instances.
	Replicas int32 `json:"replicas,omitempty"`

	// Representation contains a human readable description of the instance
	// status.
	Representation string `json:"representation,omitempty"`

	// LabelSelector for pods. It must match the pod template's labels.
	LabelSelector string `json:"labelSelector"`

	// AutoscalingStatus contains status for each autoscaling rule
	AutoscalingStatus []AutoscalingRuleStatus `json:"autoscalingStatus,omitempty"`

	// DeprecatedEffectiveMin contains the effective minimum number of
	// instances passed as an annotation value.
	DeprecatedEffectiveMin string `json:"effectiveMin,omitempty"`

	// DeprecatedEffectiveMax contains the effective maximum number of
	// instances passed as an annotation.
	DeprecatedEffectiveMax string `json:"effectiveMax,omitempty"`
}

InstanceStatus contains the computed scaling.

func (*InstanceStatus) DeepCopy

func (in *InstanceStatus) DeepCopy() *InstanceStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InstanceStatus.

func (*InstanceStatus) DeepCopyInto

func (in *InstanceStatus) DeepCopyInto(out *InstanceStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*InstanceStatus) PropagateAutoscalingStatus

func (status *InstanceStatus) PropagateAutoscalingStatus(app *App, hpa *autoscalingv1.HorizontalPodAutoscaler)

PropagateAutoscalingStatus updates the effective instance status with autoscaling status.

type LocalObjectReferences

type LocalObjectReferences []corev1.LocalObjectReference

LocalObjectReferences implements the necessary interfaces for the algorithms package.

func (LocalObjectReferences) Append

Append implements Interface.

func (LocalObjectReferences) Clone

Clone implements Interface.

func (LocalObjectReferences) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalObjectReferences.

func (LocalObjectReferences) DeepCopyInto

func (in LocalObjectReferences) DeepCopyInto(out *LocalObjectReferences)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (LocalObjectReferences) Len

func (d LocalObjectReferences) Len() int

Len implements Interface.

func (LocalObjectReferences) Less

func (d LocalObjectReferences) Less(i int, j int) bool

Less implements Interface.

func (LocalObjectReferences) Set

Set implements Interface.

func (LocalObjectReferences) Slice

Slice implements Interface.

func (LocalObjectReferences) Swap

func (d LocalObjectReferences) Swap(i int, j int)

Swap implements Interface.

type NamespacedObjectReference

type NamespacedObjectReference struct {
	// Namespace of the referent.
	// More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/
	Namespace string `json:"namespace"`
	// Name of the referent.
	// More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
	Name string `json:"name"`
}

NamespacedObjectReference is like corev1.LocalObjectReference but includes a Namespace specifier.

func (*NamespacedObjectReference) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamespacedObjectReference.

func (*NamespacedObjectReference) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type OSBInstance

type OSBInstance struct {
	// BrokerName is the name of the service broker for the service instance.
	BrokerName string `json:"brokerName,omitempty"`

	// Namespaced is true if the service broker/class/plan is namespaced,
	// and false they are available at the cluster level.
	Namespaced bool `json:"namespaced,omitempty"`

	// ClassUID contains the UID of the class, used for provisioning purposes.
	ClassUID string `json:"classUID,omitempty"`

	// ClassName contains the human-readable name of the class.
	ClassName string `json:"className,omitempty"`

	// PlanUID contains the UID of the plan, used for provisioning purposes.
	PlanUID string `json:"planUID,omitempty"`

	// PlanName contains the human-readable name of the plan.
	PlanName string `json:"planName,omitempty"`

	// ProgressDeadlineSeconds contains a configurable timeout between state
	// transition and reaching a stable state before provisioning or deprovisioning
	// times out.
	ProgressDeadlineSeconds int64 `json:"progressDeadlineSeconds,omitempty"`
}

OSBInstance is a service instance created using Kf's built-in OSB support.

func (*OSBInstance) DeepCopy

func (in *OSBInstance) DeepCopy() *OSBInstance

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OSBInstance.

func (*OSBInstance) DeepCopyInto

func (in *OSBInstance) DeepCopyInto(out *OSBInstance)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*OSBInstance) SetDefaults

func (instance *OSBInstance) SetDefaults(ctx context.Context)

SetDefaults implements apis.Defaultable.

func (*OSBInstance) Validate

func (instance *OSBInstance) Validate(ctx context.Context) (errs *apis.FieldError)

Validate implements apis.Validatable.

type OSBState

type OSBState struct {
	// OperationKey, if specified, holds the long running operation key for a given
	// state. OSB uses this arbitrary value to reference specific back-end tasks
	// it's performing.
	OperationKey *string `json:"operationKey,omitempty"`
}

OSBState contains information about a specific state.

func (*OSBState) DeepCopy

func (in *OSBState) DeepCopy() *OSBState

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OSBState.

func (*OSBState) DeepCopyInto

func (in *OSBState) DeepCopyInto(out *OSBState)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type OSBStatus

type OSBStatus struct {
	Provisioning      *OSBState `json:"provisioning,omitempty"`
	Provisioned       *OSBState `json:"provisioned,omitempty"`
	ProvisionFailed   *OSBState `json:"provisionFailed,omitempty"`
	Deprovisioning    *OSBState `json:"deprovisioning,omitempty"`
	Deprovisioned     *OSBState `json:"deprovisioned,omitempty"`
	DeprovisionFailed *OSBState `json:"deprovisionFailed,omitempty"`
}

OSBStatus is a union of status information for the state of a particular resource. Exactly one should be set at any one time.

func (*OSBStatus) DeepCopy

func (in *OSBStatus) DeepCopy() *OSBStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OSBStatus.

func (*OSBStatus) DeepCopyInto

func (in *OSBStatus) DeepCopyInto(out *OSBStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*OSBStatus) IsBlank

func (o *OSBStatus) IsBlank() bool

IsBlank returns true if the status is unset.

type ObjectReferences

type ObjectReferences []corev1.ObjectReference

ObjectReferences implements the necessary interfaces for the algorithms package.

func (ObjectReferences) Append

Append implements Interface.

func (ObjectReferences) Clone

Clone implements Interface.

func (ObjectReferences) DeepCopy

func (in ObjectReferences) DeepCopy() ObjectReferences

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ObjectReferences.

func (ObjectReferences) DeepCopyInto

func (in ObjectReferences) DeepCopyInto(out *ObjectReferences)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (ObjectReferences) Len

func (d ObjectReferences) Len() int

Len implements Interface.

func (ObjectReferences) Less

func (d ObjectReferences) Less(i int, j int) bool

Less implements Interface.

func (ObjectReferences) Set

Set implements Interface.

func (ObjectReferences) Slice

Slice implements Interface.

func (ObjectReferences) Swap

func (d ObjectReferences) Swap(i int, j int)

Swap implements Interface.

type QualifiedRouteBinding

type QualifiedRouteBinding struct {
	// Source is the route to listen on.
	Source RouteSpecFields `json:"source"` // always encode because blank is meaningful

	// Destination is the traffic sink.
	Destination RouteDestination `json:"destination"` // always encode because blank is meaningful
}

QualifiedRouteBinding contains a fully qualified route binding with all fields filled.

func MergeQualifiedBindings

func MergeQualifiedBindings(bindings []QualifiedRouteBinding) (merged []QualifiedRouteBinding)

MergeQualifiedBindings merges bindings that point to the same destination. They retain their original ordering.

The algorithm is O(n^2), with few route bindings per app this should be workable, but if that assumption ever changes the algorithm will have to be made more robust.

func (*QualifiedRouteBinding) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new QualifiedRouteBinding.

func (*QualifiedRouteBinding) DeepCopyInto

func (in *QualifiedRouteBinding) DeepCopyInto(out *QualifiedRouteBinding)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*QualifiedRouteBinding) MergableWith

func (qrb *QualifiedRouteBinding) MergableWith(other QualifiedRouteBinding) bool

MergableWith returns true if the binding has matching fields across the board except weight.

func (*QualifiedRouteBinding) Merge

func (qrb *QualifiedRouteBinding) Merge(other QualifiedRouteBinding)

Merge adds the weight of two QualifiedRouteBindings that have all other properties matching.

func (*QualifiedRouteBinding) ToUnqualified

func (qrb *QualifiedRouteBinding) ToUnqualified() RouteWeightBinding

ToUnqualified converts the QualifiedRouteBinding back into an unqualified one.

Example
qrb := QualifiedRouteBinding{
	Source: RouteSpecFields{
		Hostname: "host",
		Domain:   "some.domain",
		Path:     "/some/path",
	},
	Destination: RouteDestination{
		Port:        9999,
		ServiceName: "my-service",
		Weight:      33,
	},
}

unqualified := qrb.ToUnqualified()

fmt.Println("URL", unqualified.String())
fmt.Println("Port", *unqualified.DestinationPort)
fmt.Println("Weight", *unqualified.Weight)
Output:

URL host.some.domain/some/path
Port 9999
Weight 33

type Route

type Route struct {
	metav1.TypeMeta `json:",inline"`
	// +optional
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// +optional
	Spec RouteSpec `json:"spec,omitempty"`

	// +optional
	Status RouteStatus `json:"status,omitempty"`
}

Route is a mapping between a Hostname/Domain/Path combination and Apps that want to receive traffic from it.

func (*Route) DeepCopy

func (in *Route) DeepCopy() *Route

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Route.

func (*Route) DeepCopyInto

func (in *Route) DeepCopyInto(out *Route)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Route) DeepCopyObject

func (in *Route) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*Route) GetGroupVersionKind

func (r *Route) GetGroupVersionKind() schema.GroupVersionKind

GetGroupVersionKind implements kmeta.OwnerRefable.

func (*Route) IsOrphaned

func (r *Route) IsOrphaned() bool

IsOrphaned returns true if the route is orphaned or false if it is not. Routes that are out of sync are assumed not to be orphaned.

func (*Route) SetDefaults

func (k *Route) SetDefaults(ctx context.Context)

SetDefaults sets the defaults for a Route.

Example (Labels)
r := &Route{}
r.SetDefaults(context.Background())

fmt.Println("ManagedBy:", r.Labels[ManagedByLabel])
fmt.Println("Component:", r.Labels[ComponentLabel])
Output:

ManagedBy: kf
Component: route

func (*Route) Validate

func (r *Route) Validate(ctx context.Context) (errs *apis.FieldError)

Validate validates a Route.

type RouteBindingStatus

type RouteBindingStatus string

RouteBindingStatus represents the status of a RouteBinding.

const (
	// RouteBindingStatusOrphaned indicates the Binding isn't desired on the App but is
	// still waiting to be reconciled off the VirtualService.
	RouteBindingStatusOrphaned RouteBindingStatus = "Orphaned"

	// RouteBindingStatusUnknown indicates the status is unknown at this time.
	RouteBindingStatusUnknown RouteBindingStatus = "Unknown"

	// RouteBindingStatusReady indicates the binding is ready to receive traffic.
	RouteBindingStatusReady RouteBindingStatus = "Ready"
)

type RouteDestination

type RouteDestination struct {
	// Service is the name of the service to send traffic to.
	// With Apps, the service name is the App name.
	ServiceName string `json:"serviceName"` // always encode because blank is meaningful

	// Port is the port to send traffic to.
	Port int32 `json:"port"` // always encode because zero is meaningful

	// Weight is the proportion of traffic to send to this binding.
	Weight int32 `json:"weight"` // always encode because zero is meaningful
}

RouteDestination represents enough information to route traffic from a source to a sink.

func (*RouteDestination) DeepCopy

func (in *RouteDestination) DeepCopy() *RouteDestination

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RouteDestination.

func (*RouteDestination) DeepCopyInto

func (in *RouteDestination) DeepCopyInto(out *RouteDestination)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type RouteList

type RouteList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`

	Items []Route `json:"items"`
}

RouteList is a list of Route resources

func (*RouteList) DeepCopy

func (in *RouteList) DeepCopy() *RouteList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RouteList.

func (*RouteList) DeepCopyInto

func (in *RouteList) DeepCopyInto(out *RouteList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*RouteList) DeepCopyObject

func (in *RouteList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type RouteRef

type RouteRef RouteSpecFields

func (*RouteRef) DeepCopy

func (in *RouteRef) DeepCopy() *RouteRef

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RouteRef.

func (*RouteRef) DeepCopyInto

func (in *RouteRef) DeepCopyInto(out *RouteRef)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*RouteRef) Validate

func (route *RouteRef) Validate(ctx context.Context) (errs *apis.FieldError)

Validate implements apis.Validatable.

type RouteServiceBinding

type RouteServiceBinding struct {
	// Source is the route to listen on (the route that has a service bound to it).
	Source RouteSpecFields `json:"source"`

	// Destination is the traffic sink (a route service).
	Destination *RouteServiceURL `json:"destination"`
}

RouteServiceBinding represents a binding between a route and a route service.

func (*RouteServiceBinding) DeepCopy

func (in *RouteServiceBinding) DeepCopy() *RouteServiceBinding

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RouteServiceBinding.

func (*RouteServiceBinding) DeepCopyInto

func (in *RouteServiceBinding) DeepCopyInto(out *RouteServiceBinding)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type RouteServiceDestination

type RouteServiceDestination struct {
	// Name is the name of the route service instance. For user-provided services, this is the name defined by the user upon creation.
	Name string `json:"name,omitempty"`

	// RouteServiceURL is an alias for the net/url parsing of the service URL.
	RouteServiceURL *RouteServiceURL `json:"routeServiceURL,omitempty"`
}

RouteServiceDestination includes the fields for a route service destination as well as the name of the route service.

func (*RouteServiceDestination) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RouteServiceDestination.

func (*RouteServiceDestination) DeepCopyInto

func (in *RouteServiceDestination) DeepCopyInto(out *RouteServiceDestination)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type RouteServiceURL

type RouteServiceURL URL

RouteServiceURL is an alias for the net/url parsing of the service URL.

func ParseURL

func ParseURL(rawURL string) (*RouteServiceURL, error)

ParseURL converts a raw string into a RouteServiceURL. It follows the same logic as Parse in net/url.

func (*RouteServiceURL) DeepCopy

func (in *RouteServiceURL) DeepCopy() *RouteServiceURL

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RouteServiceURL.

func (*RouteServiceURL) DeepCopyInto

func (in *RouteServiceURL) DeepCopyInto(out *RouteServiceURL)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*RouteServiceURL) Hostname

func (u *RouteServiceURL) Hostname() string

Hostname returns the Host of the URL, stripping any valid port number if present.

Example
r := &RouteServiceURL{
	Scheme: "http",
	Host:   "auth.example.com",
	Path:   "foo",
}
fmt.Println(r.Hostname())
Output:

auth.example.com
Example (Strips_port)
r := &RouteServiceURL{
	Scheme: "http",
	Host:   "auth.example.com:8080",
	Path:   "foo",
}
fmt.Println(r.Hostname())
Output:

auth.example.com

func (RouteServiceURL) MarshalJSON

func (u RouteServiceURL) MarshalJSON() ([]byte, error)

MarshalJSON is a custom JSON marshal implementation for RouteServiceURL. It encodes the URL as a readable string.

Example
r := RouteServiceURL{
	Scheme: "http",
	Host:   "auth.example.com:8080",
	Path:   "foo",
}
marshaled, _ := json.Marshal(r)
fmt.Println(string(marshaled))
Output:

"http://auth.example.com:8080/foo"

func (*RouteServiceURL) Port

func (u *RouteServiceURL) Port() string

Port returns the port part of the Host, without the leading colon. If the host doesn't contain a valid numberic port, Port returns an empty string.

Example
r := &RouteServiceURL{
	Scheme: "http",
	Host:   "auth.example.com:8080",
	Path:   "foo",
}
fmt.Println(r.Port())
Output:

8080
Example (Empty)
r := &RouteServiceURL{
	Scheme: "http",
	Host:   "auth.example.com",
	Path:   "foo",
}
fmt.Println(r.Port())
Output:

func (*RouteServiceURL) String

func (u *RouteServiceURL) String() string

String converts a URL into a valid URL string, using the net/url implementation to construct the string.

Example
r := &RouteServiceURL{
	Scheme: "http",
	Host:   "auth.example.com:80",
	Path:   "foo",
}
fmt.Println(r.String())
Output:

http://auth.example.com:80/foo
Example (Path_format)
r := &RouteServiceURL{
	Scheme: "http",
	Host:   "auth.example.com",
	Path:   "/foo",
}
fmt.Println(r.String())
Output:

http://auth.example.com/foo
Example (Without_path)
r := &RouteServiceURL{
	Scheme: "http",
	Host:   "auth.example.com:80",
}
fmt.Println(r.String())
Output:

http://auth.example.com:80
Example (Without_port)
r := &RouteServiceURL{
	Scheme: "http",
	Host:   "auth.example.com",
	Path:   "foo",
}
fmt.Println(r.String())
Output:

http://auth.example.com/foo
Example (Without_scheme)
r := &RouteServiceURL{
	Host: "auth.example.com:80",
	Path: "foo",
}
fmt.Println(r.String())
Output:

//auth.example.com:80/foo

func (*RouteServiceURL) URL

func (u *RouteServiceURL) URL() *url.URL

URL converts the RouteServiceURL into a url.URL from net/url.

func (*RouteServiceURL) UnmarshalJSON

func (u *RouteServiceURL) UnmarshalJSON(b []byte) error

UnmarshalJSON is a custom JSON unmarshal implementation for RouteServiceURL. It decodes the JSON into a RouteServiceURL.

Example
r := RouteServiceURL{
	Scheme: "http",
	Host:   "auth.example.com:8080",
	Path:   "foo",
}
marshaled, _ := json.Marshal(r)
rsURL := &RouteServiceURL{}
json.Unmarshal(marshaled, rsURL)
fmt.Println(rsURL)
fmt.Println("Scheme:", rsURL.Scheme)
fmt.Println("Host:", rsURL.Host)
fmt.Println("Path:", rsURL.Path)
Output:

http://auth.example.com:8080/foo
Scheme: http
Host: auth.example.com:8080
Path: /foo

type RouteSpec

type RouteSpec struct {
	// RouteSpecFields contains the fields of a route.
	RouteSpecFields `json:",inline"`
}

RouteSpec contains the specification for a Route.

func (*RouteSpec) DeepCopy

func (in *RouteSpec) DeepCopy() *RouteSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RouteSpec.

func (*RouteSpec) DeepCopyInto

func (in *RouteSpec) DeepCopyInto(out *RouteSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*RouteSpec) SetDefaults

func (k *RouteSpec) SetDefaults(ctx context.Context)

SetDefaults implements apis.Defaultable

func (*RouteSpec) Validate

func (r *RouteSpec) Validate(ctx context.Context) (errs *apis.FieldError)

Validate validates a RouteSpec.

type RouteSpecFields

type RouteSpecFields struct {
	// Hostname is the hostname or subdomain of the route (e.g, in
	// hostname.example.com it would be hostname).
	// +optional
	Hostname string `json:"hostname,omitempty"`

	// Domain is the domain of the route (e.g, in hostname.example.com it
	// would be example.com).
	// +optional
	Domain string `json:"domain,omitempty"`

	// Path is the URL path of the route.
	// +optional
	Path string `json:"path,omitempty"`
}

RouteSpecFields contains the fields of a route.

func (*RouteSpecFields) DeepCopy

func (in *RouteSpecFields) DeepCopy() *RouteSpecFields

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RouteSpecFields.

func (*RouteSpecFields) DeepCopyInto

func (in *RouteSpecFields) DeepCopyInto(out *RouteSpecFields)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (RouteSpecFields) Equals

func (route RouteSpecFields) Equals(cmpRoute RouteSpecFields) bool

Equals returns whether or not the route fields are equal to those of another route.

func (RouteSpecFields) Host

func (route RouteSpecFields) Host() string

Host returns the hostname concatenated with the domain.

Example
r := RouteSpecFields{
	Hostname: "foo",
	Domain:   "example.com",
}

fmt.Println(r.Host())
Output:

foo.example.com
Example (NoHostname)
r := RouteSpecFields{
	Domain: "example.com",
}

fmt.Println(r.Host())
Output:

example.com

func (RouteSpecFields) IsWildcard

func (route RouteSpecFields) IsWildcard() bool

IsWildcard returns whether or not the route is a wildcard e.g. *.example.com.

Example
example := RouteSpecFields{Hostname: "example"}
fmt.Println("Example is wildcard:", example.IsWildcard())

star := RouteSpecFields{Hostname: "*", Domain: "example.com"}
fmt.Println("Star is wildcard:", star.IsWildcard())
Output:

Example is wildcard: false
Star is wildcard: true

func (*RouteSpecFields) SetDefaults

func (k *RouteSpecFields) SetDefaults(ctx context.Context)

SetDefaults implements apis.Defaultable

func (RouteSpecFields) String

func (route RouteSpecFields) String() string

String returns a RouteSpecFields converted into an address.

Example
r := RouteSpecFields{
	Hostname: "foo",
	Domain:   "example.com",
	Path:     "bar",
}

fmt.Println(r.String())
Output:

foo.example.com/bar
Example (Without_hostname)
r := RouteSpecFields{
	Domain: "example.com",
	Path:   "bar",
}

fmt.Println(r.String())
Output:

example.com/bar
Example (Without_path)
r := RouteSpecFields{
	Hostname: "foo",
	Domain:   "example.com",
}

fmt.Println(r.String())
Output:

foo.example.com

func (RouteSpecFields) ToURL

func (route RouteSpecFields) ToURL() url.URL

ToURL creates a URL from the RouteSpecFields

Example
url := RouteSpecFields{
	Hostname: "foo",
	Domain:   "example.com",
	Path:     "bar",
}.ToURL()

fmt.Println((&url).String())
Output:

//foo.example.com/bar

func (*RouteSpecFields) Validate

func (r *RouteSpecFields) Validate(ctx context.Context) (errs *apis.FieldError)

Validate makes sure that RouteSpecFields is properly configured.

type RouteSpecFieldsSlice

type RouteSpecFieldsSlice []RouteSpecFields

RouteSpecFieldsSlice implements the necessary interfaces for the algorithms package.

func (RouteSpecFieldsSlice) Append

Append implements Interface.

func (RouteSpecFieldsSlice) Clone

Clone implements Interface.

func (RouteSpecFieldsSlice) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RouteSpecFieldsSlice.

func (RouteSpecFieldsSlice) DeepCopyInto

func (in RouteSpecFieldsSlice) DeepCopyInto(out *RouteSpecFieldsSlice)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (RouteSpecFieldsSlice) Len

func (d RouteSpecFieldsSlice) Len() int

Len implements Interface.

func (RouteSpecFieldsSlice) Less

func (d RouteSpecFieldsSlice) Less(i int, j int) bool

Less implements Interface. This is used to sort RouteSpecFields in an order that makes sense for generating VirtualService rules. RouteSpecFields are sorted alphabetically by hostname and domain (though the domain should be the same for all RSFs being compared). RSFs with the "*" host are listed last, since they are the most general. Within RSFs with the same hostname + domain, the ones with longer paths come first, since they are more specific and should be evaluated first in the VS.

func (RouteSpecFieldsSlice) Set

Set implements Interface.

func (RouteSpecFieldsSlice) Slice

Slice implements Interface.

func (RouteSpecFieldsSlice) Swap

func (d RouteSpecFieldsSlice) Swap(i int, j int)

Swap implements Interface.

type RouteStatus

type RouteStatus struct {
	// Pull in the fields from Knative's duckv1beta1 status field.
	duckv1beta1.Status `json:",inline"`

	RouteSpecFields `json:",inline"`

	// VirtualService is the VirtualService that is created with the Route.
	VirtualService corev1.LocalObjectReference `json:"virtualservice,omitempty"`

	// Bindings is the list of bindings the RouteSpecFields matches.
	Bindings []RouteDestination `json:"bindings,omitempty"`

	// AppBindingDisplayNames is the list of DisplayNames in the Bindings field
	// that belong to Apps.
	AppBindingDisplayNames []string `json:"appBindingDisplayNames,omitempty"`

	// RouteService is the Route Service instance bound to the route, if one exists.
	RouteService corev1.LocalObjectReference `json:"routeService,omitempty"`
}

RouteStatus is the current configuration for a Route.

func (*RouteStatus) DeepCopy

func (in *RouteStatus) DeepCopy() *RouteStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RouteStatus.

func (*RouteStatus) DeepCopyInto

func (in *RouteStatus) DeepCopyInto(out *RouteStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*RouteStatus) GetCondition

func (status *RouteStatus) GetCondition(t apis.ConditionType) *apis.Condition

GetCondition returns the condition by name.

func (*RouteStatus) InitializeConditions

func (status *RouteStatus) InitializeConditions()

InitializeConditions sets the initial values to the conditions.

func (*RouteStatus) IsReady

func (status *RouteStatus) IsReady() bool

IsReady looks at the conditions to see if they are happy.

func (*RouteStatus) PropagateBindings

func (status *RouteStatus) PropagateBindings(bindings []RouteDestination)

PropagateBindings updates the list of bindings.

func (*RouteStatus) PropagateRouteServiceBinding

func (status *RouteStatus) PropagateRouteServiceBinding(routeServices []RouteServiceDestination)

PropagateRouteServiceBinding updates the route service name on the Route.

func (*RouteStatus) PropagateRouteSpecFields

func (status *RouteStatus) PropagateRouteSpecFields(b RouteSpecFields)

PropagateRouteSpecFields stores the RouteSpecFields in the RouteStatus.

func (*RouteStatus) PropagateSpaceDomain

func (status *RouteStatus) PropagateSpaceDomain(spaceDomain *SpaceDomain)

PropagateSpaceDomain sets status fields from the given SpaceDomain. A nil SpaceDomain is interpreted as not being defined (and thus permitted) on the Space.

func (*RouteStatus) PropagateTerminatingStatus

func (status *RouteStatus) PropagateTerminatingStatus()

PropagateTerminatingStatus updates the ready status of the resource to False if the resource received a delete request.

func (*RouteStatus) PropagateVirtualService

func (status *RouteStatus) PropagateVirtualService(vs *networking.VirtualService, vsErr error, shouldTrack bool)

PropagateVirtualService stores the VirtualService in the RouteStatus. If vsErr is set, a reconciliation error is triggered and the name will be empty. The state is unknown if both VirtualService and error are nil. If shouldTrack is false, directly setting the condition to True.

func (*RouteStatus) RouteServiceCondition

func (status *RouteStatus) RouteServiceCondition() SingleConditionManager

RouteServiceCondition gets a manager for the state of the child resource.

func (*RouteStatus) SpaceDomainCondition

func (status *RouteStatus) SpaceDomainCondition() SingleConditionManager

SpaceDomainCondition gets a manager for the state of the child resource.

func (*RouteStatus) VirtualServiceCondition

func (status *RouteStatus) VirtualServiceCondition() SingleConditionManager

VirtualServiceCondition gets a manager for the state of the child resource.

type RouteWeightBinding

type RouteWeightBinding struct {
	// RouteSpecFields contains the fields of a route.
	RouteSpecFields `json:",inline"`

	// Weight is the weight of the app in the route.
	// Every app has a default weight of 1, meaning if there are multiple apps
	// mapped to a route, traffic will be uniformly distributed among them.
	// If an app is stopped, its weight is 0.
	// +optional
	Weight *int32 `json:"weight"`

	// DestinationPort contains the port number of the service the Route
	// connects to. It can only be nil on Apps or for routes that were created
	// before it was a required field, in which case it will be defaulted to 80
	// at runtime.
	DestinationPort *int32 `json:"destinationPort,omitempty"`
}

RouteWeightBinding contains the fields of a route.

func MergeBindings

func MergeBindings(bindings []RouteWeightBinding) (merged []RouteWeightBinding)

MergeBindings merges bindings that point to the same destination. They retain their original ordering.

The algorithm is O(n^2), with few route bindings per app this should be workable, but if that assumption ever changes the algorithm will have to be made more robust.

func (*RouteWeightBinding) DeepCopy

func (in *RouteWeightBinding) DeepCopy() *RouteWeightBinding

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RouteWeightBinding.

func (*RouteWeightBinding) DeepCopyInto

func (in *RouteWeightBinding) DeepCopyInto(out *RouteWeightBinding)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*RouteWeightBinding) EqualsBinding

func (rwb *RouteWeightBinding) EqualsBinding(ctx context.Context, otherRwb RouteWeightBinding) bool

EqualsBinding tests equality between two bindings.

Example

EqualsBinding tests equality between two bindings.

first := RouteWeightBinding{}
first.Hostname = "*"
first.Domain = "example.com"
first.Path = "/some/path"
first.DestinationPort = ptr.Int32(8080)

second := *first.DeepCopy()
fmt.Println("same port equal?", first.EqualsBinding(context.Background(), second))

second.DestinationPort = ptr.Int32(9999)
fmt.Println("different ports equal?", first.EqualsBinding(context.Background(), second))
Output:

same port equal? true
different ports equal? false

func (*RouteWeightBinding) Merge

func (rwb *RouteWeightBinding) Merge(other RouteWeightBinding)

Merge adds the weights of two RouteWeightBindings that are equal.

func (*RouteWeightBinding) Qualify

func (rwb *RouteWeightBinding) Qualify(defaultDomain, serviceName string) (out QualifiedRouteBinding)

Qualify takes an unqualified RouteWeightBinding and turns it into a fully qualified one.

func (*RouteWeightBinding) SetDefaults

func (k *RouteWeightBinding) SetDefaults(ctx context.Context)

SetDefaults implements apis.Defaultable

func (*RouteWeightBinding) Validate

func (r *RouteWeightBinding) Validate(ctx context.Context) (errs *apis.FieldError)

Validate makes sure that RouteWeightBinding is properly configured.

type Scale

type Scale struct {
	autoscaling.Scale
}

Scale psedo-implements the autoscaling/v1 Scale type. It wraps the the type with Validators and Defaulters so that the webhooks can utilize it.

func (*Scale) DeepCopy

func (in *Scale) DeepCopy() *Scale

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Scale.

func (*Scale) DeepCopyInto

func (in *Scale) DeepCopyInto(out *Scale)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Scale) DeepCopyObject

func (in *Scale) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*Scale) GetObjectKind

func (s *Scale) GetObjectKind() schema.ObjectKind

GetObjectKind implements runtime.Object but for autoscaling/v1.Scale.

func (*Scale) SetDefaults

func (s *Scale) SetDefaults(ctx context.Context)

SetDefaults implements apis.Defaultable.

func (*Scale) Validate

func (s *Scale) Validate(ctx context.Context) (errs *apis.FieldError)

Validate implements Validatable.

type ScaleList

type ScaleList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`

	Items []Scale `json:"items"`
}

ScaleList is a list of Scale resources.

func (*ScaleList) DeepCopy

func (in *ScaleList) DeepCopy() *ScaleList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScaleList.

func (*ScaleList) DeepCopyInto

func (in *ScaleList) DeepCopyInto(out *ScaleList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ScaleList) DeepCopyObject

func (in *ScaleList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ServiceBroker

type ServiceBroker struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   ServiceBrokerSpec         `json:"spec,omitempty"`
	Status CommonServiceBrokerStatus `json:"status,omitempty"`
}

ServiceBroker represents an Open Service Broker (OSB) compatible service broker.

func (*ServiceBroker) DeepCopy

func (in *ServiceBroker) DeepCopy() *ServiceBroker

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceBroker.

func (*ServiceBroker) DeepCopyInto

func (in *ServiceBroker) DeepCopyInto(out *ServiceBroker)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ServiceBroker) DeepCopyObject

func (in *ServiceBroker) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*ServiceBroker) GetCredentialsSecretRef

func (sb *ServiceBroker) GetCredentialsSecretRef() NamespacedObjectReference

GetCredentialsSecretRef implements CommonServiceBroker.

func (*ServiceBroker) GetGroupVersionKind

func (sb *ServiceBroker) GetGroupVersionKind() schema.GroupVersionKind

GetGroupVersionKind implements kmeta.OwnerRefable.

func (*ServiceBroker) GetKind

func (sb *ServiceBroker) GetKind() string

GetServiceOfferings implements CommonServiceBroker.

func (*ServiceBroker) GetServiceOfferings

func (sb *ServiceBroker) GetServiceOfferings() []ServiceOffering

GetServiceOfferings implements CommonServiceBroker.

func (*ServiceBroker) SetDefaults

func (sb *ServiceBroker) SetDefaults(ctx context.Context)

SetDefaults implements apis.Defaultable.

func (*ServiceBroker) Validate

func (sb *ServiceBroker) Validate(ctx context.Context) (errs *apis.FieldError)

Validate implements apis.Validatable.

type ServiceBrokerList

type ServiceBrokerList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`

	Items []ServiceBroker `json:"items"`
}

ServiceBrokerList is a list of ServiceBroker resources

func (*ServiceBrokerList) DeepCopy

func (in *ServiceBrokerList) DeepCopy() *ServiceBrokerList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceBrokerList.

func (*ServiceBrokerList) DeepCopyInto

func (in *ServiceBrokerList) DeepCopyInto(out *ServiceBrokerList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ServiceBrokerList) DeepCopyObject

func (in *ServiceBrokerList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ServiceBrokerSpec

type ServiceBrokerSpec struct {
	CommonServiceBrokerSpec `json:",inline"`

	// Credentials contains a reference to a secret containing credentials
	// for the service.
	// +optional
	Credentials corev1.LocalObjectReference `json:"credentials"`
}

ServiceBrokerSpec contains the user supplied specification for the broker.

func (*ServiceBrokerSpec) DeepCopy

func (in *ServiceBrokerSpec) DeepCopy() *ServiceBrokerSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceBrokerSpec.

func (*ServiceBrokerSpec) DeepCopyInto

func (in *ServiceBrokerSpec) DeepCopyInto(out *ServiceBrokerSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ServiceBrokerSpec) SetDefaults

func (spec *ServiceBrokerSpec) SetDefaults(ctx context.Context)

SetDefaults implements apis.Defaultable.

func (*ServiceBrokerSpec) Validate

func (spec *ServiceBrokerSpec) Validate(ctx context.Context) (errs *apis.FieldError)

Validate implements apis.Validatable.

type ServiceFields

type ServiceFields struct {
	// Tags contains a list of tags to apply to the service when injecting
	// via VCAP_SERVICES.
	// The JSON encoding of tags in VCAP_SERVICES in Cloud Foundry is [] rather than null, which is why
	// the Tags field is not omitempty.
	Tags []string `json:"tags"`

	// ClassName contains the human-readable name of the class
	ClassName string `json:"className,omitempty"`

	// PlanName contains the human-readable name of the plan
	PlanName string `json:"planName,omitempty"`
}

ServiceFields are fields related to the service used in VCAP_SERVICES.

func (*ServiceFields) DeepCopy

func (in *ServiceFields) DeepCopy() *ServiceFields

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceFields.

func (*ServiceFields) DeepCopyInto

func (in *ServiceFields) DeepCopyInto(out *ServiceFields)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ServiceInstance

type ServiceInstance struct {
	metav1.TypeMeta `json:",inline"`
	// +optional
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// +optional
	Spec ServiceInstanceSpec `json:"spec,omitempty"`

	// +optional
	Status ServiceInstanceStatus `json:"status,omitempty"`
}

ServiceInstance is a representation for any type of service instance (user-provided or created using a service broker).

func (*ServiceInstance) DeepCopy

func (in *ServiceInstance) DeepCopy() *ServiceInstance

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceInstance.

func (*ServiceInstance) DeepCopyInto

func (in *ServiceInstance) DeepCopyInto(out *ServiceInstance)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ServiceInstance) DeepCopyObject

func (in *ServiceInstance) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*ServiceInstance) GetGroupVersionKind

func (r *ServiceInstance) GetGroupVersionKind() schema.GroupVersionKind

GetGroupVersionKind returns the GroupVersionKind.

func (*ServiceInstance) HasNoBackingResources

func (service *ServiceInstance) HasNoBackingResources() bool

HasNoBackingResources returns whether the service instance is a ServiceType that has backing resources.

func (*ServiceInstance) IsKfBrokered

func (service *ServiceInstance) IsKfBrokered() bool

IsKfBrokered returns whether the service instance is created with a service broker.

func (*ServiceInstance) IsLegacyBrokered

func (service *ServiceInstance) IsLegacyBrokered() bool

IsLegacyBrokered returns whether the service instance is created with a KSC service broker.

func (*ServiceInstance) IsRouteService

func (service *ServiceInstance) IsRouteService() bool

IsRouteService returns whether the service instance is a route service. Only user-provided services can be route services at this time.

func (*ServiceInstance) IsUserProvided

func (service *ServiceInstance) IsUserProvided() bool

IsUserProvided returns whether the service instance is a user-provided service.

func (*ServiceInstance) IsVolume

func (service *ServiceInstance) IsVolume() bool

IsVolume returns whether the service instance is a volume service.

func (*ServiceInstance) SetDefaults

func (instance *ServiceInstance) SetDefaults(ctx context.Context)

SetDefaults implements apis.Defaultable.

func (*ServiceInstance) Validate

func (instance *ServiceInstance) Validate(ctx context.Context) (errs *apis.FieldError)

Validate makes sure that ServiceInstance is properly configured.

type ServiceInstanceBinding

type ServiceInstanceBinding struct {
	metav1.TypeMeta `json:",inline"`
	// +optional
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// +optional
	Spec ServiceInstanceBindingSpec `json:"spec,omitempty"`

	// +optional
	Status ServiceInstanceBindingStatus `json:"status,omitempty"`
}

ServiceInstanceBinding is an abstraction for a service binding between any type of ServiceInstance and an App.

func (*ServiceInstanceBinding) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceInstanceBinding.

func (*ServiceInstanceBinding) DeepCopyInto

func (in *ServiceInstanceBinding) DeepCopyInto(out *ServiceInstanceBinding)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ServiceInstanceBinding) DeepCopyObject

func (in *ServiceInstanceBinding) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*ServiceInstanceBinding) GetGroupVersionKind

func (r *ServiceInstanceBinding) GetGroupVersionKind() schema.GroupVersionKind

GetGroupVersionKind returns the GroupVersionKind.

func (*ServiceInstanceBinding) IsAppBinding

func (binding *ServiceInstanceBinding) IsAppBinding() bool

IsAppBinding returns true if the service instance binding binds a service to an App.

func (*ServiceInstanceBinding) IsRouteBinding

func (binding *ServiceInstanceBinding) IsRouteBinding() bool

IsRouteBinding returns true if the service instance binding binds a service to a Route.

func (*ServiceInstanceBinding) SetDefaults

func (binding *ServiceInstanceBinding) SetDefaults(ctx context.Context)

SetDefaults implements apis.Defaultable.

func (*ServiceInstanceBinding) Validate

func (binding *ServiceInstanceBinding) Validate(ctx context.Context) (errs *apis.FieldError)

Validate implements apis.Validatable.

type ServiceInstanceBindingList

type ServiceInstanceBindingList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`

	Items []ServiceInstanceBinding `json:"items"`
}

ServiceInstanceBindingList is a list of Binding resources

func (*ServiceInstanceBindingList) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceInstanceBindingList.

func (*ServiceInstanceBindingList) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ServiceInstanceBindingList) DeepCopyObject

func (in *ServiceInstanceBindingList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ServiceInstanceBindingSpec

type ServiceInstanceBindingSpec struct {
	// BindingType is a pointer to the type of the service instance binding.
	BindingType `json:",inline"`

	// InstanceRef is the service instance that is bound to the App or Route.
	InstanceRef core.LocalObjectReference `json:"instanceRef"`

	// ParametersFrom contains a reference to a secret containing parameters for
	// the service instance binding.
	ParametersFrom core.LocalObjectReference `json:"parametersFrom,omitempty"`

	// BindingNameOverride is the custom binding name set by the user. If it is not set, the name of the service instance is used.
	// +optional
	BindingNameOverride string `json:"bindingNameOverride,omitempty"`

	// ProgressDeadlineSeconds contains a configurable timeout between state
	// transition and reaching a stable state before binding or unbinding
	// times out.
	ProgressDeadlineSeconds int64 `json:"progressDeadlineSeconds,omitempty"`

	// UnbindRequests is a unique identifier for an ServiceInstanceBindingSpec.
	// Updating sub-values will trigger an additional unbind retry.
	UnbindRequests int `json:"unbindRequests,omitempty"`
}

ServiceInstanceBindingSpec contains the specification for a binding.

func (*ServiceInstanceBindingSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceInstanceBindingSpec.

func (*ServiceInstanceBindingSpec) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ServiceInstanceBindingSpec) SetDefaults

func (spec *ServiceInstanceBindingSpec) SetDefaults(ctx context.Context)

SetDefaults implements apis.Defaultable.

func (*ServiceInstanceBindingSpec) Validate

func (spec *ServiceInstanceBindingSpec) Validate(ctx context.Context) (errs *apis.FieldError)

Validate implements apis.Validatable.

type ServiceInstanceBindingStatus

type ServiceInstanceBindingStatus struct {
	// Pull in fields from Knative's duckv1beta1 status field.
	duckv1beta1.Status `json:",inline"`

	// BindingName is the custom binding name set by the user, or the name of the service instance if a custom name was not provided.
	BindingName string `json:"bindingName,omitempty"`

	// CredentialsSecretRef is the K8s secret name that stores the credentials for the service binding.
	CredentialsSecretRef core.LocalObjectReference `json:"credentialsSecretRef,omitempty"`

	// ServiceFields is the set of fields related to the service instance in the binding, used for VCAP_SERVICES.
	ServiceFields `json:",inline"`

	// VolumeStatus contains information about the k8s Volume objects
	VolumeStatus *BindingVolumeStatus `json:"volumeStatus,omitempty"`

	// RouteServiceURL is an alias for the net/url parsing of the service URL.
	RouteServiceURL *RouteServiceURL `json:"routeServiceURL,omitempty"`

	// OSBStatus contains information about the lifecycle of the OSB backed
	// service.
	OSBStatus BindingOSBStatus `json:"osbStatus,omitempty"`

	// UnbindRequests is the last processed UnbindRequests value
	UnbindRequests int `json:"unbindRequests,omitempty"`
}

ServiceInstanceBindingStatus represents information about the status of a Binding.

func (*ServiceInstanceBindingStatus) BackingResourceCondition

func (status *ServiceInstanceBindingStatus) BackingResourceCondition() SingleConditionManager

BackingResourceCondition gets a manager for the state of the child resource.

func (*ServiceInstanceBindingStatus) CredentialsSecretCondition

func (status *ServiceInstanceBindingStatus) CredentialsSecretCondition() SingleConditionManager

CredentialsSecretCondition gets a manager for the state of the child resource.

func (*ServiceInstanceBindingStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceInstanceBindingStatus.

func (*ServiceInstanceBindingStatus) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ServiceInstanceBindingStatus) GetCondition

GetCondition returns the condition by name.

func (*ServiceInstanceBindingStatus) InitializeConditions

func (status *ServiceInstanceBindingStatus) InitializeConditions()

InitializeConditions sets the initial values to the conditions.

func (*ServiceInstanceBindingStatus) IsReady

func (status *ServiceInstanceBindingStatus) IsReady() bool

IsReady looks at the conditions to see if they are happy.

func (*ServiceInstanceBindingStatus) MarkBackingResourceReady

func (status *ServiceInstanceBindingStatus) MarkBackingResourceReady()

MarkBackingResourceReady notes that the backing resource is ready. This is always true if no backing resource exists.

func (*ServiceInstanceBindingStatus) ParamsSecretCondition

func (status *ServiceInstanceBindingStatus) ParamsSecretCondition() SingleConditionManager

ParamsSecretCondition gets a manager for the state of the child resource.

func (*ServiceInstanceBindingStatus) ParamsSecretPopulatedCondition

func (status *ServiceInstanceBindingStatus) ParamsSecretPopulatedCondition() SingleConditionManager

ParamsSecretPopulatedCondition gets a manager for the state of the child resource.

func (*ServiceInstanceBindingStatus) PropagateBindLastOperationStatus

func (status *ServiceInstanceBindingStatus) PropagateBindLastOperationStatus(
	response *osbclient.LastOperationResponse,
	err error,
)

PropagateBindLastOperationStatus propagates the result of an asynchronous OSB bind request.

At the end of this call, the backing resource condition and OSBStatus field will be updated.

func (*ServiceInstanceBindingStatus) PropagateBindStatus

func (status *ServiceInstanceBindingStatus) PropagateBindStatus(
	response *osbclient.BindResponse,
	err error,
)

PropagateBindStatus propagates the result of an OSB bind request.

At the end of this call, the backing resource condition and OSBStatus field will be updated.

func (*ServiceInstanceBindingStatus) PropagateBindingNameStatus

func (status *ServiceInstanceBindingStatus) PropagateBindingNameStatus(binding *ServiceInstanceBinding)

PropagateBindingNameStatus propagates the binding name to the Service Instance Binding status.

func (*ServiceInstanceBindingStatus) PropagateCredentialsSecretStatus

func (status *ServiceInstanceBindingStatus) PropagateCredentialsSecretStatus(secret *v1.Secret)

PropagateCredentialsSecretStatus updates the status of the secret holding the credentials for the service instance binding.

func (*ServiceInstanceBindingStatus) PropagateParamsSecretStatus

func (status *ServiceInstanceBindingStatus) PropagateParamsSecretStatus(secret *v1.Secret)

PropagateParamsSecretStatus updates the status of the parameters secret being created and populated.

func (*ServiceInstanceBindingStatus) PropagateRouteServiceURLStatus

func (status *ServiceInstanceBindingStatus) PropagateRouteServiceURLStatus(serviceInstance *ServiceInstance)

PropagateRouteServiceURLStatus copies the route service URL from the Service Instance status into the Service Binding status.

func (*ServiceInstanceBindingStatus) PropagateServiceFieldsStatus

func (status *ServiceInstanceBindingStatus) PropagateServiceFieldsStatus(serviceInstance *ServiceInstance)

PropagateServiceFieldsStatus copies the service fields from the Service Instance status into the Service Binding status.

func (*ServiceInstanceBindingStatus) PropagateServiceInstanceStatus

func (status *ServiceInstanceBindingStatus) PropagateServiceInstanceStatus(serviceInstance *ServiceInstance)

PropagateServiceInstanceStatus propagates the Service Instance status to the Service Binding status.

func (*ServiceInstanceBindingStatus) PropagateTerminatingStatus

func (status *ServiceInstanceBindingStatus) PropagateTerminatingStatus()

PropagateTerminatingStatus updates the ready status of the resource to False if the resource received a delete request.

func (*ServiceInstanceBindingStatus) PropagateUnbindLastOperationStatus

func (status *ServiceInstanceBindingStatus) PropagateUnbindLastOperationStatus(
	response *osbclient.LastOperationResponse,
	err error,
)

PropagateUnbindLastOperationStatus propagates the result of an asynchronous OSB unbind request.

At the end of this call, the backing resource condition and OSBStatus field will be updated.

func (*ServiceInstanceBindingStatus) PropagateUnbindStatus

func (status *ServiceInstanceBindingStatus) PropagateUnbindStatus(
	response *osbclient.UnbindResponse,
	err error,
)

PropagateUnbindStatus propagates the result of an OSB unbind request.

At the end of this call, the backing resource condition and OSBStatus field will be updated.

func (*ServiceInstanceBindingStatus) PropagateVolumeStatus

func (status *ServiceInstanceBindingStatus) PropagateVolumeStatus(serviceInstance *ServiceInstance, secret *v1.Secret)

PropagateServiceFieldsStatus copies the service fields from the Service Instance status into the Service Binding status.

func (*ServiceInstanceBindingStatus) ServiceInstanceCondition

func (status *ServiceInstanceBindingStatus) ServiceInstanceCondition() SingleConditionManager

ServiceInstanceCondition gets a manager for the state of the child resource.

func (*ServiceInstanceBindingStatus) VolumeParamsPopulatedCondition

func (status *ServiceInstanceBindingStatus) VolumeParamsPopulatedCondition() SingleConditionManager

VolumeParamsPopulatedCondition gets a manager for the state of the child resource.

type ServiceInstanceList

type ServiceInstanceList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`

	Items []ServiceInstance `json:"items"`
}

ServiceInstanceList is a list of ServiceInstance resources

func (*ServiceInstanceList) DeepCopy

func (in *ServiceInstanceList) DeepCopy() *ServiceInstanceList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceInstanceList.

func (*ServiceInstanceList) DeepCopyInto

func (in *ServiceInstanceList) DeepCopyInto(out *ServiceInstanceList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ServiceInstanceList) DeepCopyObject

func (in *ServiceInstanceList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ServiceInstanceSpec

type ServiceInstanceSpec struct {
	// ServiceType is a pointer to the type of the service instance.
	ServiceType `json:",inline"`

	// Tags are optional tags provided by the user. They are included in VCAP_SERVICES for a service.
	// Brokered services have tags associated with the CommonServiceClassSpec for that service.
	// The tags set in this field will override all other tags.
	// The JSON encoding of tags in VCAP_SERVICES in Cloud Foundry is [] rather than null, which is why
	// the Tags field is not omitempty.
	Tags []string `json:"tags"`

	// ParametersFrom contains a reference to a secret containing parameters
	// for the service.
	ParametersFrom corev1.LocalObjectReference `json:"parametersFrom,omitempty"`

	// DeleteRequests is a unique identifier for an ServiceInstanceSpec.
	// Updating sub-values will trigger an additional delete retry.
	DeleteRequests int `json:"deleteRequests,omitempty"`
}

ServiceInstanceSpec contains the specification for a binding.

func (*ServiceInstanceSpec) DeepCopy

func (in *ServiceInstanceSpec) DeepCopy() *ServiceInstanceSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceInstanceSpec.

func (*ServiceInstanceSpec) DeepCopyInto

func (in *ServiceInstanceSpec) DeepCopyInto(out *ServiceInstanceSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ServiceInstanceSpec) SetDefaults

func (spec *ServiceInstanceSpec) SetDefaults(ctx context.Context)

SetDefaults implements apis.Defaultable.

func (*ServiceInstanceSpec) Validate

func (spec *ServiceInstanceSpec) Validate(ctx context.Context) (errs *apis.FieldError)

Validate implements apis.Validatable.

type ServiceInstanceStatus

type ServiceInstanceStatus struct {
	// Pull in fields from Knative's duckv1beta1 status field.
	duckv1beta1.Status `json:",inline"`

	// ServiceTypeDescription is a human-readable name for the type of
	// service referenced by this instance.
	ServiceTypeDescription string `json:"serviceTypeDescription,omitempty"`

	// SecretName is the K8s secret name that stores the parameters for a service instance.
	SecretName string `json:"secretName,omitempty"`

	ServiceFields `json:",inline"`

	// RouteServiceURL is an alias for the net/url parsing of the service URL.
	RouteServiceURL *RouteServiceURL `json:"routeServiceURL,omitempty"`

	// OSBStatus contains information about the lifecycle of the OSB backed
	// service.
	OSBStatus OSBStatus `json:"osbStatus,omitempty"`

	// VolumeStatus contains information about the k8s Volume objects
	VolumeStatus *VolumeStatus `json:"volumeStatus,omitempty"`

	// DeleteRequests is the last processed DeleteRequests value
	DeleteRequests int `json:"deleteRequests,omitempty"`
}

ServiceInstanceStatus represents information about the status of a ServiceInstance.

func (*ServiceInstanceStatus) BackingResourceCondition

func (status *ServiceInstanceStatus) BackingResourceCondition() SingleConditionManager

BackingResourceCondition gets a manager for the state of the child resource.

func (*ServiceInstanceStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceInstanceStatus.

func (*ServiceInstanceStatus) DeepCopyInto

func (in *ServiceInstanceStatus) DeepCopyInto(out *ServiceInstanceStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ServiceInstanceStatus) GetCondition

func (status *ServiceInstanceStatus) GetCondition(t apis.ConditionType) *apis.Condition

GetCondition returns the condition by name.

func (*ServiceInstanceStatus) InitializeConditions

func (status *ServiceInstanceStatus) InitializeConditions()

InitializeConditions sets the initial values to the conditions.

func (*ServiceInstanceStatus) IsReady

func (status *ServiceInstanceStatus) IsReady() bool

IsReady looks at the conditions to see if they are happy.

func (*ServiceInstanceStatus) MarkBackingResourceReady

func (status *ServiceInstanceStatus) MarkBackingResourceReady()

MarkBackingResourceReady notes that the backing resource is ready. This is always true if no backing resource exists.

func (*ServiceInstanceStatus) MarkSpaceHealthy

func (status *ServiceInstanceStatus) MarkSpaceHealthy()

MarkSpaceHealthy notes that the space was able to be retrieved and defaults can be applied from it.

func (*ServiceInstanceStatus) MarkSpaceUnhealthy

func (status *ServiceInstanceStatus) MarkSpaceUnhealthy(reason, message string)

MarkSpaceUnhealthy notes that the space was could not be retrieved.

func (*ServiceInstanceStatus) ParamsSecretCondition

func (status *ServiceInstanceStatus) ParamsSecretCondition() SingleConditionManager

ParamsSecretCondition gets a manager for the state of the child resource.

func (*ServiceInstanceStatus) ParamsSecretPopulatedCondition

func (status *ServiceInstanceStatus) ParamsSecretPopulatedCondition() SingleConditionManager

ParamsSecretPopulatedCondition gets a manager for the state of the child resource.

func (*ServiceInstanceStatus) PropagateDeletionBlockedStatus

func (status *ServiceInstanceStatus) PropagateDeletionBlockedStatus()

PropagateDeletionBlockedStatus updates the ready status of the service instance to False if the service received a delete request and is still part of a service binding.

func (*ServiceInstanceStatus) PropagateDeploymentStatus

func (status *ServiceInstanceStatus) PropagateDeploymentStatus(deployment *appsv1.Deployment)

PropagateDeploymentStatus updates the deployment status to reflect the underlying state of the deployment.

func (*ServiceInstanceStatus) PropagateDeprovisionAsyncStatus

func (status *ServiceInstanceStatus) PropagateDeprovisionAsyncStatus(
	response *osbclient.LastOperationResponse,
	err error,
)

PropagateDeprovisionAsyncStatus propagates the result of an asynchronous OSB deprovision request.

At the end of this call, the backing resource condition and OSBStatus field will be updated.

func (*ServiceInstanceStatus) PropagateDeprovisionStatus

func (status *ServiceInstanceStatus) PropagateDeprovisionStatus(
	response *osbclient.DeprovisionResponse,
	err error,
)

PropagateDeprovisionStatus propagates the result of a synchronous OSB deprovision request.

At the end of this call, the backing resource condition and OSBStatus field will be updated.

func (*ServiceInstanceStatus) PropagateProvisionAsyncStatus

func (status *ServiceInstanceStatus) PropagateProvisionAsyncStatus(
	response *osbclient.LastOperationResponse,
	err error,
)

PropagateProvisionAsyncStatus propagates the result of an asynchronous OSB provision request.

At the end of this call, the backing resource condition and OSBStatus field will be updated.

func (*ServiceInstanceStatus) PropagateProvisionStatus

func (status *ServiceInstanceStatus) PropagateProvisionStatus(
	response *osbclient.ProvisionResponse,
	err error,
)

PropagateProvisionStatus propagates the result of a synchronous OSB provision request.

At the end of this call, the backing resource condition and OSBStatus field will be updated.

func (*ServiceInstanceStatus) PropagateRouteServiceURLStatus

func (status *ServiceInstanceStatus) PropagateRouteServiceURLStatus(serviceInstance *ServiceInstance)

PropagateRouteServiceURLStatus copies the route service URL from the Service Instance Spec into the Status.

func (*ServiceInstanceStatus) PropagateSecretStatus

func (status *ServiceInstanceStatus) PropagateSecretStatus(secret *corev1.Secret)

PropagateSecretStatus updates the status of the parameters secret being created and populated.

func (*ServiceInstanceStatus) PropagateServiceFieldsStatus

func (status *ServiceInstanceStatus) PropagateServiceFieldsStatus(serviceInstance *ServiceInstance)

PropagateServiceFieldsStatus copies the service fields from the Service Instance Spec into the Status.

func (*ServiceInstanceStatus) PropagateTerminatingStatus

func (status *ServiceInstanceStatus) PropagateTerminatingStatus()

PropagateTerminatingStatus updates the ready status of the resource to False if the resource received a delete request.

func (*ServiceInstanceStatus) PropagateVolumeServiceStatus

func (status *ServiceInstanceStatus) PropagateVolumeServiceStatus(serviceInstance *ServiceInstance, volumeName, volumeClaimName string)

PropagateVolumeServiceStatus copies the k8s volume objects names into the Status.

func (*ServiceInstanceStatus) SpaceCondition

func (status *ServiceInstanceStatus) SpaceCondition() SingleConditionManager

SpaceCondition gets a manager for the state of the child resource.

type ServiceOffering

type ServiceOffering struct {
	// DisplayName is the human readable name of the offering, the
	// field is unstable across releases.
	DisplayName string `json:"displayName"`
	// UID is a unique ID of the offering within the broker, this value is stable
	// across broker releases and is used to track when names change.
	// It's recommended, but not required that this value be a UUID.
	UID string `json:"uid"`
	// Description is a human readable description of the offering.
	Description string `json:"description"`
	// Tags contains opaque labels to help filter marketplace, examples include:
	// gcp, sql, myssql.
	// +nullable
	Tags []string `json:"tags,omitempty"`
	// Plans contains a list of tiers that can be provisioned. For example,
	// databases might come in different sizes.
	Plans []ServicePlan `json:"plans,omitempty"`
}

ServiceOffering has just enough info to display the offering in the marketplace command and provision it.

func (*ServiceOffering) DeepCopy

func (in *ServiceOffering) DeepCopy() *ServiceOffering

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceOffering.

func (*ServiceOffering) DeepCopyInto

func (in *ServiceOffering) DeepCopyInto(out *ServiceOffering)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ServicePlan

type ServicePlan struct {
	// DisplayName is the human readable name of the plan. This value is unstable
	// across releases.
	DisplayName string `json:"displayName"`
	// Free indicates that the plan has no cost to the end-user.
	// https://github.com/openservicebrokerapi/servicebroker/blob/master/spec.md#service-plan-object
	Free bool `json:"free"`
	// UID is the unique ID of the plan (within the service). The value is
	// stable across broker releases.
	// It's recommended, but not required that this value be a UUID.
	UID string `json:"uid"`
	// Description is a human readable description of the plan.
	Description string `json:"description"`
}

ServicePlan has just enough info to display the offering in the marketplace command and provision it.

func (*ServicePlan) DeepCopy

func (in *ServicePlan) DeepCopy() *ServicePlan

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServicePlan.

func (*ServicePlan) DeepCopyInto

func (in *ServicePlan) DeepCopyInto(out *ServicePlan)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ServiceType

type ServiceType struct {
	// One and only one of the following should be specified.
	// UPS is a user-provided service instance.
	// +optional
	UPS *UPSInstance `json:"userProvided,omitempty"`

	// Brokered is a service instance created using a service broker via KSC.
	// +optional
	Brokered *BrokeredInstance `json:"brokered,omitempty"`

	// Volume is a volume service instance created using volume broker.
	// +optional
	Volume *OSBInstance `json:"volume,omitempty"`

	// OSB is a service instance created using Kf's built-in OSB support.
	// +optional
	OSB *OSBInstance `json:"osb,omitempty"`
}

ServiceType is the type of the service instance.

func (*ServiceType) DeepCopy

func (in *ServiceType) DeepCopy() *ServiceType

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceType.

func (*ServiceType) DeepCopyInto

func (in *ServiceType) DeepCopyInto(out *ServiceType)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ServiceType) SetDefaults

func (serviceType *ServiceType) SetDefaults(ctx context.Context)

SetDefaults implements apis.Defaultable.

func (*ServiceType) Validate

func (serviceType *ServiceType) Validate(ctx context.Context) (errs *apis.FieldError)

Validate implements apis.Validatable.

type SingleConditionManager

type SingleConditionManager interface {
	// MarkChildNotOwned marks the child with the given name as not being owned by
	// the app.
	MarkChildNotOwned(childName string) error

	// MarkTemplateError marks the condition as having an error in its template.
	MarkTemplateError(err error) error

	// MarkReconciliationError marks the condition having some error during the
	// reconciliation process. Context should contain the action that failed.
	MarkReconciliationError(context string, err error) error

	// MarkUnknown sets the condition to Unknown with the given reason and message
	// format.
	MarkUnknown(reason, messageFormat string, messageA ...interface{})

	// MarkFalse sets the condition to False with the given reason and message
	// format.
	MarkFalse(reason, messageFormat string, messageA ...interface{})

	// IsPending returns whether the condition's state is final or in progress.
	IsPending() bool

	// MarkReconcilationPending marks the condition as still requiring reconciliation
	// This is a useful state for when ObservedGeneration doesn't match Generation
	// but progress should still be shown to the user.
	MarkReconciliationPending()

	// MarkSuccess marks the condition as being successfully reconciled.
	MarkSuccess()

	// TimeSinceTransition returns the time since last transition for the resource.
	// If the resource hasn't transitioned, the time is zero.
	TimeSinceTransition() time.Duration

	// String converts the condition to a standard human-readable representation.
	String() string

	// ErrorIfTimeout returns an error if the TimeSinceTransition() is greater than
	// the timeout, otherwise it returns nil.
	ErrorIfTimeout(timeout time.Duration) error
}

SingleConditionManager provides a standard way to set conditions.

func NewSingleConditionManager

func NewSingleConditionManager(manager apis.ConditionManager, destination apis.ConditionType, childType string) SingleConditionManager

NewSingleConditionManager sets up a manager for setting the conditions of a single sub-resource.

type SourcePackage

type SourcePackage struct {
	metav1.TypeMeta `json:",inline"`

	// +optional
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// +optional
	Spec SourcePackageSpec `json:"spec,omitempty"`

	// +optional
	Status SourcePackageStatus `json:"status,omitempty"`
}

SourcePackage is responsible for storing the metadata about the source code bits.

func (*SourcePackage) DeepCopy

func (in *SourcePackage) DeepCopy() *SourcePackage

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SourcePackage.

func (*SourcePackage) DeepCopyInto

func (in *SourcePackage) DeepCopyInto(out *SourcePackage)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*SourcePackage) DeepCopyObject

func (in *SourcePackage) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*SourcePackage) SetDefaults

func (p *SourcePackage) SetDefaults(ctx context.Context)

SetDefaults implements apis.Defaultable.

func (*SourcePackage) Validate

func (p *SourcePackage) Validate(ctx context.Context) (errs *apis.FieldError)

Validate checks for errors in the SourcePackage's spec or status fields.

type SourcePackageChecksum

type SourcePackageChecksum struct {
	// Type is the type of checksum used.
	// The allowed values are (more might be added in the future):
	// * sha256
	Type string `json:"type,omitempty"`

	// Value is the hex encoded checksum of the package bits.
	Value string `json:"value,omitempty"`
}

SourcePackageChecksum has the checksum information for the SourcePackage bits.

func (*SourcePackageChecksum) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SourcePackageChecksum.

func (*SourcePackageChecksum) DeepCopyInto

func (in *SourcePackageChecksum) DeepCopyInto(out *SourcePackageChecksum)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*SourcePackageChecksum) Validate

func (c *SourcePackageChecksum) Validate(ctx context.Context) (errs *apis.FieldError)

Validate makes sure that a SourcePackageChecksum is properly configured.

type SourcePackageList

type SourcePackageList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`

	Items []SourcePackage `json:"items"`
}

SourcePackageList is a list of SourcePackage resources.

func (*SourcePackageList) DeepCopy

func (in *SourcePackageList) DeepCopy() *SourcePackageList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SourcePackageList.

func (*SourcePackageList) DeepCopyInto

func (in *SourcePackageList) DeepCopyInto(out *SourcePackageList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*SourcePackageList) DeepCopyObject

func (in *SourcePackageList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type SourcePackageSpec

type SourcePackageSpec struct {
	// Checksum has the checksum information.
	Checksum SourcePackageChecksum `json:"checksum,omitempty"`

	// Size has the number of bytes of the package.
	Size uint64 `json:"size,omitempty"`
}

SourcePackageSpec is the desired configuration for a SourcePackage.

func (*SourcePackageSpec) DeepCopy

func (in *SourcePackageSpec) DeepCopy() *SourcePackageSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SourcePackageSpec.

func (*SourcePackageSpec) DeepCopyInto

func (in *SourcePackageSpec) DeepCopyInto(out *SourcePackageSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*SourcePackageSpec) SetDefaults

func (p *SourcePackageSpec) SetDefaults(ctx context.Context)

SetDefaults implements apis.Defaultable.

func (*SourcePackageSpec) Validate

func (spec *SourcePackageSpec) Validate(ctx context.Context) (errs *apis.FieldError)

Validate makes sure that a SourcePackageSpec is properly configured.

type SourcePackageStatus

type SourcePackageStatus struct {
	// Pull in the fields from Knative's duckv1beta1 status field.
	duckv1beta1.Status `json:",inline"`

	// Image is the fully qualified image name that has stored the underlying
	// data.
	Image string `json:"image,omitempty"`

	// Checksum has the checksum information.
	Checksum SourcePackageChecksum `json:"checksum,omitempty"`

	// Size has the number of bytes of the package.
	Size uint64 `json:"size,omitempty"`
}

SourcePackageStatus is the current configuration and running state for a SourcePackage.

func (*SourcePackageStatus) DeepCopy

func (in *SourcePackageStatus) DeepCopy() *SourcePackageStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SourcePackageStatus.

func (*SourcePackageStatus) DeepCopyInto

func (in *SourcePackageStatus) DeepCopyInto(out *SourcePackageStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*SourcePackageStatus) GetCondition

func (status *SourcePackageStatus) GetCondition(t apis.ConditionType) *apis.Condition

GetCondition returns the condition by name.

func (*SourcePackageStatus) InitializeConditions

func (status *SourcePackageStatus) InitializeConditions()

InitializeConditions sets the initial values to the conditions.

func (*SourcePackageStatus) PropagateSpec

func (status *SourcePackageStatus) PropagateSpec(image string, spec SourcePackageSpec)

PropagateSpec copies spec fields to the status.

func (*SourcePackageStatus) Succeeded

func (status *SourcePackageStatus) Succeeded() bool

Succeeded returns if the type successfully completed.

func (*SourcePackageStatus) UploadCondition

func (status *SourcePackageStatus) UploadCondition() SingleConditionManager

UploadCondition gets a manager for the state of the child resource.

type Space

type Space struct {
	metav1.TypeMeta `json:",inline"`
	// +optional
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// +optional
	Spec SpaceSpec `json:"spec,omitempty"`

	// +optional
	Status SpaceStatus `json:"status,omitempty"`
}

Space is a high level structure that encompasses a namespace, permissions on it and configuration applied to it.

func (*Space) DeepCopy

func (in *Space) DeepCopy() *Space

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Space.

func (*Space) DeepCopyInto

func (in *Space) DeepCopyInto(out *Space)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Space) DeepCopyObject

func (in *Space) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*Space) DefaultDomainOrBlank

func (s *Space) DefaultDomainOrBlank() string

DefaultDomainOrBlank gets the default domain for the space if set, otherwise blank.

Example
s := Space{}
fmt.Printf("No Domain: %q\n", s.DefaultDomainOrBlank())

s.Status.NetworkConfig.Domains = []SpaceDomain{
	{Domain: "first.is.default.domain"},
	{Domain: "example.com"},
}

fmt.Printf("Domain: %q\n", s.DefaultDomainOrBlank())
Output:

No Domain: ""
Domain: "first.is.default.domain"

func (*Space) GetGroupVersionKind

func (r *Space) GetGroupVersionKind() schema.GroupVersionKind

GetGroupVersionKind returns the GroupVersionKind.

func (*Space) SetDefaults

func (k *Space) SetDefaults(ctx context.Context)

SetDefaults implements apis.Defaultable

func (*Space) Validate

func (space *Space) Validate(ctx context.Context) (errs *apis.FieldError)

Validate makes sure that Space is properly configured.

type SpaceDomain

type SpaceDomain struct {
	// Domain is the valid domain that can be used in conjunction with a
	// hostname and path for a route.
	Domain string `json:"domain"`

	// GatewayName is the name of the Istio Gateway supported by the domain.
	// Values can include a Namespace as a prefix.
	// Only the kf Namespace is allowed e.g. kf/some-gateway.
	// See https://istio.io/docs/reference/config/networking/gateway/
	GatewayName string `json:"gatewayName,omitempty"`
}

SpaceDomain stores information about a domain available in a space.

func StableDeduplicateSpaceDomainList

func StableDeduplicateSpaceDomainList(domains []SpaceDomain) (out []SpaceDomain)

StableDeduplicateSpaceDomainList removes SpaceDomain with duplicate domain fields preserving the order of the input.

func (*SpaceDomain) DeepCopy

func (in *SpaceDomain) DeepCopy() *SpaceDomain

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SpaceDomain.

func (*SpaceDomain) DeepCopyInto

func (in *SpaceDomain) DeepCopyInto(out *SpaceDomain)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type SpaceDomains

type SpaceDomains []SpaceDomain

SpaceDomains implements the necessary interfaces for the algorithms package.

func (SpaceDomains) Append

Append implements Interface.

func (SpaceDomains) Clone

func (d SpaceDomains) Clone() algorithms.Interface

Clone implements Interface.

func (SpaceDomains) DeepCopy

func (in SpaceDomains) DeepCopy() SpaceDomains

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SpaceDomains.

func (SpaceDomains) DeepCopyInto

func (in SpaceDomains) DeepCopyInto(out *SpaceDomains)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (SpaceDomains) Len

func (d SpaceDomains) Len() int

Len implements Interface.

func (SpaceDomains) Less

func (d SpaceDomains) Less(i int, j int) bool

Less implements Interface.

func (SpaceDomains) Set

Set implements Interface.

func (SpaceDomains) Slice

func (d SpaceDomains) Slice(i int, j int) algorithms.Interface

Slice implements Interface.

func (SpaceDomains) Swap

func (d SpaceDomains) Swap(i int, j int)

Swap implements Interface.

type SpaceList

type SpaceList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`

	Items []Space `json:"items"`
}

SpaceList is a list of KfSpace resources

func (*SpaceList) DeepCopy

func (in *SpaceList) DeepCopy() *SpaceList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SpaceList.

func (*SpaceList) DeepCopyInto

func (in *SpaceList) DeepCopyInto(out *SpaceList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*SpaceList) DeepCopyObject

func (in *SpaceList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type SpaceSpec

type SpaceSpec struct {
	// BuildConfig contains config for the build pipelines.
	// +optional
	BuildConfig SpaceSpecBuildConfig `json:"buildConfig,omitempty"`

	// RuntimeConfig contains settings for the app runtime environment.
	// +optional
	RuntimeConfig SpaceSpecRuntimeConfig `json:"runtimeConfig,omitempty"`

	// NetworkConfig contains settings for the space's networking environment.
	// +optional
	NetworkConfig SpaceSpecNetworkConfig `json:"networkConfig,omitempty"`
}

SpaceSpec contains the specification for a space.

func (*SpaceSpec) DeepCopy

func (in *SpaceSpec) DeepCopy() *SpaceSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SpaceSpec.

func (*SpaceSpec) DeepCopyInto

func (in *SpaceSpec) DeepCopyInto(out *SpaceSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*SpaceSpec) SetDefaults

func (k *SpaceSpec) SetDefaults(ctx context.Context)

SetDefaults implements apis.Defaultable

func (*SpaceSpec) Validate

func (s *SpaceSpec) Validate(ctx context.Context) (errs *apis.FieldError)

Validate makes sure that SpaceSpec is properly configured.

type SpaceSpecBuildConfig

type SpaceSpecBuildConfig struct {
	// ContainerRegistry holds the container registry that buildpack builds are
	// stored in.
	ContainerRegistry string `json:"containerRegistry,omitempty"`

	// Env sets default environment variables on the builder.
	//
	// +optional
	// +patchMergeKey=name
	// +patchStrategy=merge
	Env []corev1.EnvVar `json:"env,omitempty" patchStrategy:"merge" patchMergeKey:"name"`

	// DefaultToV3Stack tells kf whether it applications should default
	// to using V3 stacks. If not supplied, the default value is taken from the
	// config-defaults configmap.
	//
	// +nullable
	// +optional
	DefaultToV3Stack *bool `json:"defaultToV3Stack"`

	// ServiceAccount is the service account that will be propagated to
	// all builds.
	// +optional
	ServiceAccount string `json:"serviceAccount,omitempty"`
}

SpaceSpecBuildConfig holds fields for managing building.

func (*SpaceSpecBuildConfig) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SpaceSpecBuildConfig.

func (*SpaceSpecBuildConfig) DeepCopyInto

func (in *SpaceSpecBuildConfig) DeepCopyInto(out *SpaceSpecBuildConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*SpaceSpecBuildConfig) SetDefaults

func (k *SpaceSpecBuildConfig) SetDefaults(ctx context.Context)

SetDefaults implements apis.Defaultable

func (*SpaceSpecBuildConfig) Validate

func (s *SpaceSpecBuildConfig) Validate(ctx context.Context) (errs *apis.FieldError)

Validate makes sure that SpaceSpecBuildConfig is properly configured.

type SpaceSpecNetworkConfig

type SpaceSpecNetworkConfig struct {
	// Domains sets valid domains that can be used for routes in the space.
	// +optional
	// +patchMergeKey=name
	// +patchStrategy=merge
	Domains []SpaceDomain `json:"domains,omitempty" patchStrategy:"merge" patchMergeKey:"domain"`

	// AppNetworkPolicy holds the default network policy for apps.
	AppNetworkPolicy SpaceSpecNetworkConfigPolicy `json:"appNetworkPolicy,omitempty"`

	// BuildNetworkPolicy holds the default network policy for builds.
	BuildNetworkPolicy SpaceSpecNetworkConfigPolicy `json:"buildNetworkPolicy,omitempty"`
}

SpaceSpecNetworkConfig contains settings for the space's networking.

func (*SpaceSpecNetworkConfig) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SpaceSpecNetworkConfig.

func (*SpaceSpecNetworkConfig) DeepCopyInto

func (in *SpaceSpecNetworkConfig) DeepCopyInto(out *SpaceSpecNetworkConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*SpaceSpecNetworkConfig) DefaultSpaceDomainGateways

func (k *SpaceSpecNetworkConfig) DefaultSpaceDomainGateways(ctx context.Context)

DefaultSpaceDomainGateways replaces missing gatewayNames with the kf default external gateway.

func (*SpaceSpecNetworkConfig) SetDefaults

func (k *SpaceSpecNetworkConfig) SetDefaults(ctx context.Context)

SetDefaults implements apis.Defaultable

func (*SpaceSpecNetworkConfig) Validate

func (s *SpaceSpecNetworkConfig) Validate(ctx context.Context) (errs *apis.FieldError)

Validate implements apis.Validatable.

func (*SpaceSpecNetworkConfig) ValidateDomainGateways

func (s *SpaceSpecNetworkConfig) ValidateDomainGateways(ctx context.Context) (errs *apis.FieldError)

ValidateDomainGateways ensures the Istio gateway names for domains are valid.

type SpaceSpecNetworkConfigPolicy

type SpaceSpecNetworkConfigPolicy struct {
	// Ingress holds the default network policy for inbound traffic.
	Ingress string `json:"ingress,omitempty"`
	// Egress holds the default network policy for outbound traffic.
	Egress string `json:"egress,omitempty"`
}

SpaceSpecNetworkConfigPolicy holds the policy for a particular type.

func (*SpaceSpecNetworkConfigPolicy) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SpaceSpecNetworkConfigPolicy.

func (*SpaceSpecNetworkConfigPolicy) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*SpaceSpecNetworkConfigPolicy) SetDefaults

func (s *SpaceSpecNetworkConfigPolicy) SetDefaults(ctx context.Context)

SetDefaults implements apis.Defaultable

func (*SpaceSpecNetworkConfigPolicy) Validate

func (s *SpaceSpecNetworkConfigPolicy) Validate(ctx context.Context) (errs *apis.FieldError)

Validate implements apis.Validatable.

type SpaceSpecRuntimeConfig

type SpaceSpecRuntimeConfig struct {
	// Env sets default environment variables on kf applications for the whole
	// space.
	// +patchMergeKey=name
	// +patchStrategy=merge
	// +optional
	Env []corev1.EnvVar `json:"env,omitempty" patchStrategy:"merge" patchMergeKey:"name"`

	// NodeSelector sets the NodeSelector in the podSpec to invoke Node Assignment
	// https://kubernetes.io/docs/tasks/configure-pod-container/assign-pods-nodes/
	// +optional
	NodeSelector map[string]string `json:"nodeSelector,omitempty"`
}

SpaceSpecRuntimeConfig contains config for the actual applciation runtime configuration for the space.

func (*SpaceSpecRuntimeConfig) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SpaceSpecRuntimeConfig.

func (*SpaceSpecRuntimeConfig) DeepCopyInto

func (in *SpaceSpecRuntimeConfig) DeepCopyInto(out *SpaceSpecRuntimeConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*SpaceSpecRuntimeConfig) SetDefaults

func (k *SpaceSpecRuntimeConfig) SetDefaults(ctx context.Context)

SetDefaults implements apis.Defaultable

func (*SpaceSpecRuntimeConfig) Validate

func (s *SpaceSpecRuntimeConfig) Validate(ctx context.Context) (errs *apis.FieldError)

Validate implements apis.Validatable.

type SpaceStatus

type SpaceStatus struct {
	// Pull in the fields from Knative's duckv1beta1 status field.
	duckv1beta1.Status `json:",inline"`

	// RuntimeConfig contains the info necessary to configure the application
	// runtime.
	RuntimeConfig SpaceStatusRuntimeConfig `json:"runtimeConfig,omitempty"`

	// NetworkConfig contains the info necessary to configure application
	// networking.
	NetworkConfig SpaceStatusNetworkConfig `json:"networkConfig,omitempty"`

	// BuildConfig contains the info necessary to configure builds.
	BuildConfig SpaceStatusBuildConfig `json:"buildConfig,omitempty"`

	// IngressGateways contains the list of ingress gateways that could
	// direct traffic into this Kf space.
	IngressGateways []corev1.LoadBalancerIngress `json:"ingressGateways"`
}

SpaceStatus represents information about the status of a Space.

func (*SpaceStatus) AppNetworkPolicyCondition

func (status *SpaceStatus) AppNetworkPolicyCondition() SingleConditionManager

AppNetworkPolicyCondition gets a manager for the state of the child resource.

func (*SpaceStatus) BuildConfigCondition

func (status *SpaceStatus) BuildConfigCondition() SingleConditionManager

BuildConfigCondition gets a manager for the state of the child resource.

func (*SpaceStatus) BuildNetworkPolicyCondition

func (status *SpaceStatus) BuildNetworkPolicyCondition() SingleConditionManager

BuildNetworkPolicyCondition gets a manager for the state of the child resource.

func (*SpaceStatus) BuildRoleBindingCondition

func (status *SpaceStatus) BuildRoleBindingCondition() SingleConditionManager

BuildRoleBindingCondition gets a manager for the state of the child resource.

func (*SpaceStatus) BuildRoleCondition

func (status *SpaceStatus) BuildRoleCondition() SingleConditionManager

BuildRoleCondition gets a manager for the state of the child resource.

func (*SpaceStatus) BuildSecretCondition

func (status *SpaceStatus) BuildSecretCondition() SingleConditionManager

BuildSecretCondition gets a manager for the state of the child resource.

func (*SpaceStatus) BuildServiceAccountCondition

func (status *SpaceStatus) BuildServiceAccountCondition() SingleConditionManager

BuildServiceAccountCondition gets a manager for the state of the child resource.

func (*SpaceStatus) ClusterRoleBindingsCondition

func (status *SpaceStatus) ClusterRoleBindingsCondition() SingleConditionManager

ClusterRoleBindingsCondition gets a manager for the state of the child resource.

func (*SpaceStatus) ClusterRoleCondition

func (status *SpaceStatus) ClusterRoleCondition() SingleConditionManager

ClusterRoleCondition gets a manager for the state of the child resource.

func (*SpaceStatus) DeepCopy

func (in *SpaceStatus) DeepCopy() *SpaceStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SpaceStatus.

func (*SpaceStatus) DeepCopyInto

func (in *SpaceStatus) DeepCopyInto(out *SpaceStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*SpaceStatus) FindIngressIP

func (s *SpaceStatus) FindIngressIP() *string

FindIngressIP gets the lexicographicaly first IP address from a the listed ingress gateways if one exists.

func (*SpaceStatus) GetCondition

func (status *SpaceStatus) GetCondition(t apis.ConditionType) *apis.Condition

GetCondition returns the condition by name.

func (*SpaceStatus) IAMPolicyCondition

func (status *SpaceStatus) IAMPolicyCondition() SingleConditionManager

IAMPolicyCondition gets a manager for the state of the child resource.

func (*SpaceStatus) IngressGatewayCondition

func (status *SpaceStatus) IngressGatewayCondition() SingleConditionManager

IngressGatewayCondition gets a manager for the state of the child resource.

func (*SpaceStatus) InitializeConditions

func (status *SpaceStatus) InitializeConditions()

InitializeConditions sets the initial values to the conditions.

func (*SpaceStatus) IsReady

func (status *SpaceStatus) IsReady() bool

IsReady looks at the conditions to see if they are happy.

func (*SpaceStatus) NamespaceCondition

func (status *SpaceStatus) NamespaceCondition() SingleConditionManager

NamespaceCondition gets a manager for the state of the child resource.

func (*SpaceStatus) NetworkConfigCondition

func (status *SpaceStatus) NetworkConfigCondition() SingleConditionManager

NetworkConfigCondition gets a manager for the state of the child resource.

func (*SpaceStatus) PropagateBuildConfigStatus

func (status *SpaceStatus) PropagateBuildConfigStatus(spaceSpec SpaceSpec, cfg *config.Config)

PropagateBuildConfigStatus copies the application build settings to the space status.

func (*SpaceStatus) PropagateIAMPolicyStatus

func (status *SpaceStatus) PropagateIAMPolicyStatus(ctx context.Context, u *unstructured.Unstructured)

PropagateIAMPolicyStatus updates the readiness based on the current phase.

func (*SpaceStatus) PropagateIngressGatewayStatus

func (status *SpaceStatus) PropagateIngressGatewayStatus(ingresses []corev1.LoadBalancerIngress)

PropagateIngressGatewayStatus copies the list of ingresses to the status and updates the condition. There must be at least one externally reachable ingress for the space to become healthy.

func (*SpaceStatus) PropagateNamespaceStatus

func (status *SpaceStatus) PropagateNamespaceStatus(ns *v1.Namespace)

PropagateNamespaceStatus copies fields from the Namespace status to Space and updates the readiness based on the current phase.

func (*SpaceStatus) PropagateNetworkConfigStatus

func (status *SpaceStatus) PropagateNetworkConfigStatus(networkConfig SpaceSpecNetworkConfig, cfg *config.Config, spaceName string)

PropagateNetworkConfigStatus copies the application networking settings to the space status.

func (*SpaceStatus) PropagateRuntimeConfigStatus

func (status *SpaceStatus) PropagateRuntimeConfigStatus(runtimeConfig SpaceSpecRuntimeConfig, cfg *config.Config)

PropagateRuntimeConfigStatus copies the application runtime settings to the space status.

func (*SpaceStatus) PropagateTerminatingStatus

func (status *SpaceStatus) PropagateTerminatingStatus()

PropagateTerminatingStatus updates the ready status of the resource to False if the resource received a delete request.

func (*SpaceStatus) RoleBindingsCondition

func (status *SpaceStatus) RoleBindingsCondition() SingleConditionManager

RoleBindingsCondition gets a manager for the state of the child resource.

func (*SpaceStatus) RuntimeConfigCondition

func (status *SpaceStatus) RuntimeConfigCondition() SingleConditionManager

RuntimeConfigCondition gets a manager for the state of the child resource.

type SpaceStatusBuildConfig

type SpaceStatusBuildConfig struct {
	// BuildpacksV2 contains a list of V2 (Cloud Foundry) compatible buildpacks
	// that will be available by builders in the space.
	BuildpacksV2 config.BuildpackV2List `json:"buildpacksV2,omitempty"`

	// StacksV2 contains a list of V2 (Cloud Foundry) compatible stacks
	// that will be available by builders in the space.
	StacksV2 config.StackV2List `json:"stacksV2,omitempty"`

	// StacksV3 contains a list of V3 (Cloud Native Buildpacks) compatible stacks
	// that will be available by builders in the space.
	StacksV3 config.StackV3List `json:"stacksV3,omitempty"`

	// Env contains additional build environment variables for the whole space.
	// +optional
	Env []corev1.EnvVar `json:"env,omitempty"`

	// ServiceAccount is the service account that will be propagated to
	// all builds.
	// +optional
	ServiceAccount string `json:"serviceAccount,omitempty"`

	// ContainerRegistry holds the container registry that buildpack builds are
	// stored in.
	ContainerRegistry string `json:"containerRegistry,omitempty"`

	// DefaultToV3Stack tells kf whether it applications should default to using
	// V3 stacks.
	DefaultToV3Stack bool `json:"defaultToV3Stack"`
}

SpaceStatusBuildConfig reflects the actual build configuration for the space.

func (*SpaceStatusBuildConfig) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SpaceStatusBuildConfig.

func (*SpaceStatusBuildConfig) DeepCopyInto

func (in *SpaceStatusBuildConfig) DeepCopyInto(out *SpaceStatusBuildConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type SpaceStatusNetworkConfig

type SpaceStatusNetworkConfig struct {
	// Domains sets valid domains that can be used for routes in the space.
	// +optional
	Domains []SpaceDomain `json:"domains,omitempty"`
}

SpaceStatusNetworkConfig reflects the actual Networking configuration for the space.

func (*SpaceStatusNetworkConfig) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SpaceStatusNetworkConfig.

func (*SpaceStatusNetworkConfig) DeepCopyInto

func (in *SpaceStatusNetworkConfig) DeepCopyInto(out *SpaceStatusNetworkConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type SpaceStatusRuntimeConfig

type SpaceStatusRuntimeConfig struct {
	// Env sets default environment variables on kf applications for the whole
	// space.
	// +optional
	Env []corev1.EnvVar `json:"env,omitempty"`

	// AppCPUPerGBOfRAM sets the default amount of CPU to assign an app per GB of RAM.
	AppCPUPerGBOfRAM *resource.Quantity `json:"appCPUPerGBOfRAM,omitempty"`

	// AppCPUMin sets the minimum amount of CPU to assign an app regardless of the
	// amount of RAM it's assigned.
	AppCPUMin *resource.Quantity `json:"appCPUMin,omitempty"`

	// ProgressDeadlineSeconds contains the maximum time in seconds for a deployment to make progress before it
	// is considered to be failed
	ProgressDeadlineSeconds *int32 `json:"progressDeadlineSeconds,omitempty"`

	// TerminationGracePeriodSeconds is the duration in seconds after the processes running in the pod are sent
	// a termination signal and the time when the processes are forcibly halted with a kill signal.
	TerminationGracePeriodSeconds *int64 `json:"terminationGracePeriodSeconds,omitempty"`
}

SpaceStatusRuntimeConfig reflects the actual applciation runtime configuration for the space.

func (*SpaceStatusRuntimeConfig) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SpaceStatusRuntimeConfig.

func (*SpaceStatusRuntimeConfig) DeepCopyInto

func (in *SpaceStatusRuntimeConfig) DeepCopyInto(out *SpaceStatusRuntimeConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type StartCommandStatus added in v2.11.13

type StartCommandStatus struct {
	Container []string `json:"container,omitempty"`
	Buildpack []string `json:"buildpack,omitempty"`
	Image     string   `json:"image,omitempty"`
	Error     string   `json:"error,omitempty"`
}

StartCommandStatus contains the app start commands.

func (*StartCommandStatus) DeepCopy added in v2.11.13

func (in *StartCommandStatus) DeepCopy() *StartCommandStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StartCommandStatus.

func (*StartCommandStatus) DeepCopyInto added in v2.11.13

func (in *StartCommandStatus) DeepCopyInto(out *StartCommandStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Task

type Task struct {
	metav1.TypeMeta `json:",inline"`

	// +optional
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// +optional
	Spec TaskSpec `json:"spec,omitempty"`

	// +optional
	Status TaskStatus `json:"status,omitempty"`
}

Task is a representation for short-lived task.

func (*Task) DeepCopy

func (in *Task) DeepCopy() *Task

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Task.

func (*Task) DeepCopyInto

func (in *Task) DeepCopyInto(out *Task)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Task) DeepCopyObject

func (in *Task) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*Task) GetGroupVersionKind

func (t *Task) GetGroupVersionKind() schema.GroupVersionKind

GetGroupVersionKind returns the GroupVersionKind.

func (*Task) SetDefaults

func (k *Task) SetDefaults(ctx context.Context)

SetDefaults implements apis.Defaultable.

func (*Task) Validate

func (t *Task) Validate(ctx context.Context) (errs *apis.FieldError)

Validate makes sure that Task is properly configured.

type TaskList

type TaskList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`

	Items []Task `json:"items"`
}

TaskList is a list of Task resources.

func (*TaskList) DeepCopy

func (in *TaskList) DeepCopy() *TaskList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TaskList.

func (*TaskList) DeepCopyInto

func (in *TaskList) DeepCopyInto(out *TaskList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*TaskList) DeepCopyObject

func (in *TaskList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type TaskSchedule

type TaskSchedule struct {
	metav1.TypeMeta `json:",inline"`

	// +optional
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// +optional
	Spec TaskScheduleSpec `json:"spec,omitempty"`

	// +optional
	Status TaskScheduleStatus `json:"status,omitempty"`
}

TaskSchedule is a configuration to create Tasks on a cron schedule.

func (*TaskSchedule) DeepCopy

func (in *TaskSchedule) DeepCopy() *TaskSchedule

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TaskSchedule.

func (*TaskSchedule) DeepCopyInto

func (in *TaskSchedule) DeepCopyInto(out *TaskSchedule)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*TaskSchedule) DeepCopyObject

func (in *TaskSchedule) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*TaskSchedule) GetGroupVersionKind

func (t *TaskSchedule) GetGroupVersionKind() schema.GroupVersionKind

GetGroupVersionKind returns the GroupVersionKind.

func (*TaskSchedule) SetDefaults

func (k *TaskSchedule) SetDefaults(ctx context.Context)

SetDefaults implements apis.Defaultable.

func (*TaskSchedule) Validate

func (t *TaskSchedule) Validate(ctx context.Context) (errs *apis.FieldError)

Validate makes sure that TaskSchedule is properly configured.

type TaskScheduleList

type TaskScheduleList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`

	Items []TaskSchedule `json:"items"`
}

TaskScheduleList is a list of TaskSchedule resources.

func (*TaskScheduleList) DeepCopy

func (in *TaskScheduleList) DeepCopy() *TaskScheduleList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TaskScheduleList.

func (*TaskScheduleList) DeepCopyInto

func (in *TaskScheduleList) DeepCopyInto(out *TaskScheduleList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*TaskScheduleList) DeepCopyObject

func (in *TaskScheduleList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type TaskScheduleSpec

type TaskScheduleSpec struct {
	// ConcurrencyPolicy specifies how to treat concurrent executions of Tasks.
	// Valid values are
	//
	// - "Allow" (default): allows CronJobs to run concurrently;
	// - "Forbid": forbids concurrent runs, skipping next run if previous run
	// 		hasn't finished yet;
	// - "Replace": cancels currently running job and replaces it with a new one.
	ConcurrencyPolicy string `json:"concurrencyPolicy,omitempty"`

	// Schedule is the interval to start Tasks in Cron format, see https://en.wikipedia.org/wiki/Cron.
	Schedule string `json:"schedule,omitempty"`

	// Suspend tells the controller to suspend subsequent executions. It does
	// not apply to already started executions.
	// +optional
	Suspend bool `json:"suspend"`

	// TaskTemplate specifies the Task that will be created when executing a TaskSchedule.
	TaskTemplate TaskSpec `json:"taskTemplate,omitempty"`
}

TaskScheduleSpec contains the specification of a TaskSchedule.

func (*TaskScheduleSpec) DeepCopy

func (in *TaskScheduleSpec) DeepCopy() *TaskScheduleSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TaskScheduleSpec.

func (*TaskScheduleSpec) DeepCopyInto

func (in *TaskScheduleSpec) DeepCopyInto(out *TaskScheduleSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*TaskScheduleSpec) SetDefaults

func (k *TaskScheduleSpec) SetDefaults(ctx context.Context)

SetDefaults implements apis.Defaultable.

func (*TaskScheduleSpec) Validate

func (spec *TaskScheduleSpec) Validate(ctx context.Context) (errs *apis.FieldError)

Validate implements apis.Validatable.

type TaskScheduleStatus

type TaskScheduleStatus struct {
	// Pull in the fields from Knative's duckv1beta1 status field.
	duckv1beta1.Status `json:",inline"`

	TaskScheduleStatusFields `json:",inline"`
}

TaskScheduleStatus represents information about the status of a TaskSchedule.

func (*TaskScheduleStatus) DeepCopy

func (in *TaskScheduleStatus) DeepCopy() *TaskScheduleStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TaskScheduleStatus.

func (*TaskScheduleStatus) DeepCopyInto

func (in *TaskScheduleStatus) DeepCopyInto(out *TaskScheduleStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*TaskScheduleStatus) GetCondition

func (status *TaskScheduleStatus) GetCondition(t apis.ConditionType) *apis.Condition

GetCondition returns the condition by name.

func (*TaskScheduleStatus) InitializeConditions

func (status *TaskScheduleStatus) InitializeConditions()

InitializeConditions sets the initial values to the conditions.

func (*TaskScheduleStatus) IsReady

func (status *TaskScheduleStatus) IsReady() bool

IsReady looks at the conditions to see if they are happy.

func (*TaskScheduleStatus) MarkScheduleError

func (status *TaskScheduleStatus) MarkScheduleError(err error)

MarkScheduleError notes that the TaskSchedule is not Ready due to an error with the cron schedule.

func (*TaskScheduleStatus) MarkSpaceHealthy

func (status *TaskScheduleStatus) MarkSpaceHealthy()

MarkSpaceHealthy notes that the Space was able to be retrieved and defaults can be applied from it.

func (*TaskScheduleStatus) MarkSpaceUnhealthy

func (status *TaskScheduleStatus) MarkSpaceUnhealthy(reason, message string)

MarkSpaceUnhealthy notes that the Space was could not be retrieved.

func (*TaskScheduleStatus) PropagateTerminatingStatus

func (status *TaskScheduleStatus) PropagateTerminatingStatus()

PropagateTerminatingStatus updates the ready status of the resource to False if the resource received a delete request.

func (*TaskScheduleStatus) SpaceCondition

func (status *TaskScheduleStatus) SpaceCondition() SingleConditionManager

SpaceCondition gets a manager for the state of the child resource.

type TaskScheduleStatusFields

type TaskScheduleStatusFields struct {
	// Active is a list of currently running Tasks created via this TaskSchedule.
	Active []corev1.LocalObjectReference `json:"active,omitempty"`

	// LastScheduleTime is the timestamp of when a Task was last scheduled.
	LastScheduleTime *metav1.Time `json:"lastScheduleTime,omitempty"`
}

TaskScheduleStatusFields hold the fields of Task's status that are shared.

func (*TaskScheduleStatusFields) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TaskScheduleStatusFields.

func (*TaskScheduleStatusFields) DeepCopyInto

func (in *TaskScheduleStatusFields) DeepCopyInto(out *TaskScheduleStatusFields)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TaskSpec

type TaskSpec struct {

	// DisplayName of the Task, it is either user-provided or auto generated.
	DisplayName string `json:"displayName,omitempty"`

	// AppRef is to reference the App the task is created on.
	AppRef corev1.LocalObjectReference `json:"appRef,omitempty"`

	// CPU is the number of cpu core to request for the Task, e.g. "1", "500m" or "0.5".
	// +optional
	CPU string `json:"cpu,omitempty"`

	// Memory is the number of memory units to request for the Task, e.g. "1G", "2Gi".
	// +optional
	Memory string `json:"memory,omitempty"`

	// Disk is the number of ephermeral storage units to request for the Task, e.g. "1G", "2Gi".
	// +optional
	Disk string `json:"disk,omitempty"`

	// Command is the start command to be set for the Task.
	// +optional
	Command string `json:"command,omitempty"`

	// Terminated determines if the Task should have been terminated or not.
	// +optional
	Terminated bool `json:"terminated,omitempty"`
}

TaskSpec contains the specification of a Task.

func (*TaskSpec) DeepCopy

func (in *TaskSpec) DeepCopy() *TaskSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TaskSpec.

func (*TaskSpec) DeepCopyInto

func (in *TaskSpec) DeepCopyInto(out *TaskSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*TaskSpec) SetDefaults

func (k *TaskSpec) SetDefaults(ctx context.Context)

SetDefaults implements apis.Defaultable.

func (*TaskSpec) Validate

func (spec *TaskSpec) Validate(ctx context.Context) (errs *apis.FieldError)

Validate implements apis.Validatable.

type TaskStatus

type TaskStatus struct {
	// Pull in the fields from Knative's duckv1beta1 status field.
	duckv1beta1.Status `json:",inline"`

	TaskStatusFields `json:",inline"`
}

TaskStatus represents information about the status of a Task.

func (*TaskStatus) AppCondition

func (status *TaskStatus) AppCondition() SingleConditionManager

AppCondition gets a manager for the state of the child resource.

func (*TaskStatus) ConfigCondition

func (status *TaskStatus) ConfigCondition() SingleConditionManager

ConfigCondition gets a manager for the state of the child resource.

func (*TaskStatus) DeepCopy

func (in *TaskStatus) DeepCopy() *TaskStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TaskStatus.

func (*TaskStatus) DeepCopyInto

func (in *TaskStatus) DeepCopyInto(out *TaskStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*TaskStatus) GetCondition

func (status *TaskStatus) GetCondition(t apis.ConditionType) *apis.Condition

GetCondition returns the condition by name.

func (*TaskStatus) InitializeConditions

func (status *TaskStatus) InitializeConditions()

InitializeConditions sets the initial values to the conditions.

func (*TaskStatus) MarkSpaceHealthy

func (status *TaskStatus) MarkSpaceHealthy()

MarkSpaceHealthy notes that the Space was able to be retrieved and defaults can be applied from it.

func (*TaskStatus) MarkSpaceUnhealthy

func (status *TaskStatus) MarkSpaceUnhealthy(reason, message string)

MarkSpaceUnhealthy notes that the Space was could not be retrieved.

func (*TaskStatus) PipelineRunCondition

func (status *TaskStatus) PipelineRunCondition() SingleConditionManager

PipelineRunCondition gets a manager for the state of the child resource.

func (*TaskStatus) PropagateTaskStatus

func (status *TaskStatus) PropagateTaskStatus(tr *tektonv1beta1.TaskRun)

PropagateTaskStatus copies fields from the Tekton TaskRun and updates the Task readiness based on the TaskRun state.

func (*TaskStatus) PropagateTerminatingStatus

func (status *TaskStatus) PropagateTerminatingStatus()

PropagateTerminatingStatus updates the ready status of the Task to False if the Task received a delete request.

func (*TaskStatus) SpaceCondition

func (status *TaskStatus) SpaceCondition() SingleConditionManager

SpaceCondition gets a manager for the state of the child resource.

func (*TaskStatus) Succeeded

func (status *TaskStatus) Succeeded() bool

Succeeded returns if the type successfully completed.

func (*TaskStatus) TaskRunCondition

func (status *TaskStatus) TaskRunCondition() SingleConditionManager

TaskRunCondition gets a manager for the state of the child resource.

type TaskStatusFields

type TaskStatusFields struct {
	// ID is a unique identifier of the Task within an App.
	ID int `json:"id,omitempty"`

	// StartTime is the timestamp of when the Task starts.
	StartTime *metav1.Time `json:"startTime,omitempty"`

	// CompletionTime is the timestamp of when the Task completes.
	CompletionTime *metav1.Time `json:"completionTime,omitempty"`

	// Duration is the time duration of how long did it take for the
	// Task to transition from start to completion.
	Duration *metav1.Duration `json:"duration,omitempty"`
}

TaskStatusFields hold the fields of Task's status that are shared.

func (*TaskStatusFields) DeepCopy

func (in *TaskStatusFields) DeepCopy() *TaskStatusFields

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TaskStatusFields.

func (*TaskStatusFields) DeepCopyInto

func (in *TaskStatusFields) DeepCopyInto(out *TaskStatusFields)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type UPSInstance

type UPSInstance struct {
	// RouteServiceURL is an alias for the net/url parsing of the service URL.
	// It is not empty if the service instance is a route service.
	// +optional
	RouteServiceURL *RouteServiceURL `json:"routeServiceURL,omitempty"`

	// MockClassName mocks the name of a different service class.
	// This allows overriding the name as it shows up in VCAP_SERVICES
	// to something other than the default "user-provided".
	MockClassName string `json:"mockClassName,omitempty"`

	// MockPlanName mocks the name of a different plan.
	// This allows overriding the name as it shows up in VCAP_SERVICES
	// to something other than the default blank string.
	MockPlanName string `json:"mockPlanName,omitempty"`
}

UPSInstance is a user-provided service instance.

func (*UPSInstance) DeepCopy

func (in *UPSInstance) DeepCopy() *UPSInstance

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UPSInstance.

func (*UPSInstance) DeepCopyInto

func (in *UPSInstance) DeepCopyInto(out *UPSInstance)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*UPSInstance) SetDefaults

func (instance *UPSInstance) SetDefaults(ctx context.Context)

SetDefaults implements apis.Defaultable.

func (*UPSInstance) Validate

func (instance *UPSInstance) Validate(ctx context.Context) (errs *apis.FieldError)

Validate implements apis.Validatable.

type URL

type URL struct {
	Scheme      string `json:"Scheme,omitempty"`
	Opaque      string `json:"Opaque,omitempty"`
	Host        string `json:"Host,omitempty"`
	Path        string `json:"Path,omitempty"`
	RawPath     string `json:"RawPath,omitempty"`
	ForceQuery  bool   `json:"ForceQuery,omitempty"`
	RawQuery    string `json:"RawQuery,omitempty"`
	Fragment    string `json:"Fragment,omitempty"`
	RawFragment string `json:"RawFragment,omitempty"`
}

URL is a copy of url.URL. We have to duplicate this so the schema generartion tools are happy.

func (*URL) DeepCopy

func (in *URL) DeepCopy() *URL

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new URL.

func (*URL) DeepCopyInto

func (in *URL) DeepCopyInto(out *URL)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type UidGid

type UidGid struct {

	// UID if specified will change the owner of the mounted directory to UID.
	// +kubebuilder:validation:Type=string
	// +nullable
	// +optional
	UID ID `json:"UID,omitempty" type:"string"`

	// GID if specified will change the group of the mounted directory to GID.
	// +kubebuilder:validation:Type=string
	// +nullable
	// +optional
	GID ID `json:"GID,omitempty" type:"string"`
}

UidGid contains the UID and GID fields and the necessary unmarshal logic.

func (*UidGid) DeepCopy

func (in *UidGid) DeepCopy() *UidGid

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UidGid.

func (*UidGid) DeepCopyInto

func (in *UidGid) DeepCopyInto(out *UidGid)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*UidGid) GIDInt64

func (g *UidGid) GIDInt64() (int64, error)

GIDInt64 returns the GID as an Int64.

func (*UidGid) UIDInt64

func (g *UidGid) UIDInt64() (int64, error)

UIDInt64 returns the UID as an Int64.

type VolumeBrokerSpec

type VolumeBrokerSpec struct {
	// VolumeOfferings contains ServiceOfferings supported by this broker.
	VolumeOfferings []ServiceOffering `json:"offering,omitempty"`
}

VolumeBrokerSpec contains the user supplied specification for the broker.

func (*VolumeBrokerSpec) DeepCopy

func (in *VolumeBrokerSpec) DeepCopy() *VolumeBrokerSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeBrokerSpec.

func (*VolumeBrokerSpec) DeepCopyInto

func (in *VolumeBrokerSpec) DeepCopyInto(out *VolumeBrokerSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*VolumeBrokerSpec) Validate

func (spec *VolumeBrokerSpec) Validate(ctx context.Context) (errs *apis.FieldError)

Validate implements apis.Validatable.

type VolumeInstanceParams

type VolumeInstanceParams struct {
	// Share is the NFS share address.
	Share string `json:"share,omitempty"`

	// Capacity is the requested capacity for this volume instance.
	// Must be parsable to k8s quantity. https://github.com/kubernetes/apimachinery/blob/master/pkg/api/resource/quantity.go
	// +optional
	Capacity string `json:"capacity,omitempty"`

	// Version specifies the NFS version to use.
	// +optional
	Version string `json:"version,omitempty"`
}

VolumeInstanceParams are the volume related fields stored in the instance secret.

func ParseVolumeInstanceParams

func ParseVolumeInstanceParams(secret *corev1.Secret) (*VolumeInstanceParams, error)

ParseVolumeInstanceParams parses VolumeInstanceParams from the secret of the serviceinstance.

func (*VolumeInstanceParams) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeInstanceParams.

func (*VolumeInstanceParams) DeepCopyInto

func (in *VolumeInstanceParams) DeepCopyInto(out *VolumeInstanceParams)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type VolumeStatus

type VolumeStatus struct {
	// PersistentVolumeName is the name of the PersistentVolume created for
	// this instance.
	PersistentVolumeName string `json:"PersistentVolumeName,omitempty"`

	// PersistentVolumeClaimName is the name of the PersistentVolumeClaim
	// created for this instance.
	PersistentVolumeClaimName string `json:"PersistentVolumeClaimName,omitempty"`
}

VolumeStatus is a union of status information for an volume instance.

func (*VolumeStatus) DeepCopy

func (in *VolumeStatus) DeepCopy() *VolumeStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeStatus.

func (*VolumeStatus) DeepCopyInto

func (in *VolumeStatus) DeepCopyInto(out *VolumeStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Source Files

Jump to

Keyboard shortcuts

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