Documentation
¶
Index ¶
- Constants
- Variables
- func BuildPathRegexp(path string) (string, error)
- func DefaultDomain(ctx context.Context) (domain string)
- func GenerateName(parts ...string) string
- func GenerateRouteClaimName(hostname, domain, urlPath string) string
- func GenerateRouteName(hostname, domain, urlPath, appName string) string
- func GenerateRouteNameFromSpec(spec RouteSpecFields, appName string) string
- func GetBuildArg(b *build.Build, key string) string
- func IsStatusFinal(duck duckv1beta1.Status) bool
- func IstioClientFromContext(ctx context.Context) cv1alpha3.VirtualServicesGetter
- func Kind(kind string) schema.GroupKind
- func PropagateCondition(manager apis.ConditionManager, destination apis.ConditionType, ...) bool
- func Resource(resource string) schema.GroupResource
- func SetKfAppContainerDefaults(_ context.Context, container *corev1.Container)
- func SetupIstioClient(ctx context.Context, istioClient cv1alpha3.VirtualServicesGetter) context.Context
- func ToBase36(s string) string
- func ValidatePodSpec(podSpec v1.PodSpec) (errs *apis.FieldError)
- type App
- func (app *App) ComponentLabels(component string) map[string]string
- func (in *App) DeepCopy() *App
- func (in *App) DeepCopyInto(out *App)
- func (in *App) DeepCopyObject() runtime.Object
- func (r *App) GetGroupVersionKind() schema.GroupVersionKind
- func (k *App) SetDefaults(ctx context.Context)
- func (app *App) Validate(ctx context.Context) (errs *apis.FieldError)
- type AppList
- type AppSpec
- func (in *AppSpec) DeepCopy() *AppSpec
- func (in *AppSpec) DeepCopyInto(out *AppSpec)
- func (k *AppSpec) SetDefaults(ctx context.Context)
- func (k *AppSpec) SetServiceBindingDefaults(ctx context.Context)
- func (k *AppSpec) SetSourceDefaults(ctx context.Context)
- func (spec *AppSpec) Validate(ctx context.Context) (errs *apis.FieldError)
- func (spec *AppSpec) ValidateServiceBindings(ctx context.Context) (errs *apis.FieldError)
- func (spec *AppSpec) ValidateSourceSpec(ctx context.Context) (errs *apis.FieldError)
- type AppSpecInstances
- func (in *AppSpecInstances) DeepCopy() *AppSpecInstances
- func (in *AppSpecInstances) DeepCopyInto(out *AppSpecInstances)
- func (instances *AppSpecInstances) MaxAnnotationValue() string
- func (instances *AppSpecInstances) MinAnnotationValue() string
- func (instances *AppSpecInstances) ScalingAnnotations() map[string]string
- func (instances *AppSpecInstances) Validate(ctx context.Context) (errs *apis.FieldError)
- type AppSpecServiceBinding
- type AppSpecTemplate
- type AppStatus
- func (in *AppStatus) DeepCopy() *AppStatus
- func (in *AppStatus) DeepCopyInto(out *AppStatus)
- func (status *AppStatus) EnvVarSecretCondition() SingleConditionManager
- func (status *AppStatus) GetCondition(t apis.ConditionType) *apis.Condition
- func (status *AppStatus) InitializeConditions()
- func (status *AppStatus) IsReady() bool
- func (status *AppStatus) KnativeServiceCondition() SingleConditionManager
- func (status *AppStatus) MarkSpaceHealthy()
- func (status *AppStatus) MarkSpaceUnhealthy(reason, message string)
- func (status *AppStatus) PropagateEnvVarSecretStatus(secret *v1.Secret)
- func (status *AppStatus) PropagateKnativeServiceStatus(service *serving.Service)
- func (status *AppStatus) PropagateServiceBindingsStatus(bindings []servicecatalogv1beta1.ServiceBinding)
- func (status *AppStatus) PropagateSourceStatus(source *Source)
- func (status *AppStatus) RouteCondition() SingleConditionManager
- func (status *AppStatus) ServiceBindingCondition() SingleConditionManager
- func (status *AppStatus) SourceCondition() SingleConditionManager
- type HTTPRoutes
- func (h HTTPRoutes) Append(a algorithms.Interface) algorithms.Interface
- func (h HTTPRoutes) Clone() algorithms.Interface
- func (in HTTPRoutes) DeepCopy() HTTPRoutes
- func (in HTTPRoutes) DeepCopyInto(out *HTTPRoutes)
- func (h HTTPRoutes) Len() int
- func (h HTTPRoutes) Less(i int, j int) bool
- func (h HTTPRoutes) Set(i int, a algorithms.Interface, j int, b algorithms.Interface)
- func (h HTTPRoutes) Slice(i int, j int) algorithms.Interface
- func (h HTTPRoutes) Swap(i int, j int)
- type OwnerReferences
- func (d OwnerReferences) Append(a algorithms.Interface) algorithms.Interface
- func (d OwnerReferences) Clone() algorithms.Interface
- func (in OwnerReferences) DeepCopy() OwnerReferences
- func (in OwnerReferences) DeepCopyInto(out *OwnerReferences)
- func (d OwnerReferences) Len() int
- func (d OwnerReferences) Less(i int, j int) bool
- func (d OwnerReferences) Set(i int, a algorithms.Interface, j int, b algorithms.Interface)
- func (d OwnerReferences) Slice(i int, j int) algorithms.Interface
- func (d OwnerReferences) Swap(i int, j int)
- type Route
- func (in *Route) DeepCopy() *Route
- func (in *Route) DeepCopyInto(out *Route)
- func (in *Route) DeepCopyObject() runtime.Object
- func (r *Route) GetGroupVersionKind() schema.GroupVersionKind
- func (k *Route) SetDefaults(ctx context.Context)
- func (k *Route) SetSpaceDefaults(space *Space)
- func (r *Route) Validate(ctx context.Context) (errs *apis.FieldError)
- type RouteClaim
- type RouteClaimList
- type RouteClaimSpec
- type RouteList
- type RouteSpec
- type RouteSpecFields
- func (in *RouteSpecFields) DeepCopy() *RouteSpecFields
- func (in *RouteSpecFields) DeepCopyInto(out *RouteSpecFields)
- func (k *RouteSpecFields) SetDefaults(ctx context.Context)
- func (k *RouteSpecFields) SetSpaceDefaults(space *Space)
- func (route RouteSpecFields) String() string
- func (r *RouteSpecFields) Validate(ctx context.Context) (errs *apis.FieldError)
- type RouteSpecFieldsSlice
- func (d RouteSpecFieldsSlice) Append(a algorithms.Interface) algorithms.Interface
- func (d RouteSpecFieldsSlice) Clone() algorithms.Interface
- func (in RouteSpecFieldsSlice) DeepCopy() RouteSpecFieldsSlice
- func (in RouteSpecFieldsSlice) DeepCopyInto(out *RouteSpecFieldsSlice)
- func (d RouteSpecFieldsSlice) Len() int
- func (d RouteSpecFieldsSlice) Less(i int, j int) bool
- func (d RouteSpecFieldsSlice) Set(i int, a algorithms.Interface, j int, b algorithms.Interface)
- func (d RouteSpecFieldsSlice) Slice(i int, j int) algorithms.Interface
- func (d RouteSpecFieldsSlice) Swap(i int, j int)
- type Routes
- func (d Routes) Append(a algorithms.Interface) algorithms.Interface
- func (d Routes) Clone() algorithms.Interface
- func (in Routes) DeepCopy() Routes
- func (in Routes) DeepCopyInto(out *Routes)
- func (d Routes) Len() int
- func (d Routes) Less(i int, j int) bool
- func (d Routes) Set(i int, a algorithms.Interface, j int, b algorithms.Interface)
- func (d Routes) Slice(i int, j int) algorithms.Interface
- func (d Routes) Swap(i int, j int)
- type ServiceBindings
- func (d ServiceBindings) Append(a algorithms.Interface) algorithms.Interface
- func (s ServiceBindings) Clone() algorithms.Interface
- func (in ServiceBindings) DeepCopy() ServiceBindings
- func (in ServiceBindings) DeepCopyInto(out *ServiceBindings)
- func (s ServiceBindings) Len() int
- func (s ServiceBindings) Less(i int, j int) bool
- func (d ServiceBindings) Set(i int, a algorithms.Interface, j int, b algorithms.Interface)
- func (s ServiceBindings) Slice(i int, j int) algorithms.Interface
- func (s ServiceBindings) Swap(i int, j int)
- type SingleConditionManager
- type Source
- func (in *Source) DeepCopy() *Source
- func (in *Source) DeepCopyInto(out *Source)
- func (in *Source) DeepCopyObject() runtime.Object
- func (r *Source) GetGroupVersionKind() schema.GroupVersionKind
- func (k *Source) SetDefaults(ctx context.Context)
- func (source *Source) Validate(ctx context.Context) (errs *apis.FieldError)
- type SourceList
- type SourceSpec
- func (in *SourceSpec) DeepCopy() *SourceSpec
- func (in *SourceSpec) DeepCopyInto(out *SourceSpec)
- func (spec *SourceSpec) IsBuildpackBuild() bool
- func (spec *SourceSpec) IsContainerBuild() bool
- func (spec *SourceSpec) NeedsUpdateRequestsIncrement(old SourceSpec) bool
- func (k *SourceSpec) SetDefaults(ctx context.Context)
- func (spec *SourceSpec) Validate(ctx context.Context) (errs *apis.FieldError)
- type SourceSpecBuildpackBuild
- type SourceSpecContainerImage
- type SourceStatus
- func (in *SourceStatus) DeepCopy() *SourceStatus
- func (in *SourceStatus) DeepCopyInto(out *SourceStatus)
- func (status *SourceStatus) GetCondition(t apis.ConditionType) *apis.Condition
- func (status *SourceStatus) InitializeConditions()
- func (status *SourceStatus) MarkBuildNotOwned(name string)
- func (status *SourceStatus) PropagateBuildStatus(build *build.Build)
- func (status *SourceStatus) Succeeded() bool
- type SourceStatusFields
- type Space
- func (in *Space) DeepCopy() *Space
- func (in *Space) DeepCopyInto(out *Space)
- func (in *Space) DeepCopyObject() runtime.Object
- func (r *Space) GetGroupVersionKind() schema.GroupVersionKind
- func (k *Space) SetDefaults(ctx context.Context)
- func (space *Space) Validate(ctx context.Context) (errs *apis.FieldError)
- type SpaceDomain
- type SpaceDomains
- func (d SpaceDomains) Append(a algorithms.Interface) algorithms.Interface
- func (d SpaceDomains) Clone() algorithms.Interface
- func (in SpaceDomains) DeepCopy() SpaceDomains
- func (in SpaceDomains) DeepCopyInto(out *SpaceDomains)
- func (d SpaceDomains) Len() int
- func (d SpaceDomains) Less(i int, j int) bool
- func (d SpaceDomains) Set(i int, a algorithms.Interface, j int, b algorithms.Interface)
- func (d SpaceDomains) Slice(i int, j int) algorithms.Interface
- func (d SpaceDomains) Swap(i int, j int)
- type SpaceList
- type SpaceSpec
- type SpaceSpecBuildpackBuild
- func (in *SpaceSpecBuildpackBuild) DeepCopy() *SpaceSpecBuildpackBuild
- func (in *SpaceSpecBuildpackBuild) DeepCopyInto(out *SpaceSpecBuildpackBuild)
- func (k *SpaceSpecBuildpackBuild) SetDefaults(ctx context.Context)
- func (s *SpaceSpecBuildpackBuild) Validate(ctx context.Context) (errs *apis.FieldError)
- type SpaceSpecExecution
- type SpaceSpecResourceLimits
- func (in *SpaceSpecResourceLimits) DeepCopy() *SpaceSpecResourceLimits
- func (in *SpaceSpecResourceLimits) DeepCopyInto(out *SpaceSpecResourceLimits)
- func (k *SpaceSpecResourceLimits) SetDefaults(ctx context.Context)
- func (s *SpaceSpecResourceLimits) Validate(ctx context.Context) (errs *apis.FieldError)
- type SpaceSpecSecurity
- type SpaceStatus
- func (in *SpaceStatus) DeepCopy() *SpaceStatus
- func (in *SpaceStatus) DeepCopyInto(out *SpaceStatus)
- func (status *SpaceStatus) GetCondition(t apis.ConditionType) *apis.Condition
- func (status *SpaceStatus) InitializeConditions()
- func (status *SpaceStatus) IsReady() bool
- func (status *SpaceStatus) MarkAuditorRoleNotOwned(name string)
- func (status *SpaceStatus) MarkDeveloperRoleNotOwned(name string)
- func (status *SpaceStatus) MarkLimitRangeNotOwned(name string)
- func (status *SpaceStatus) MarkNamespaceNotOwned(name string)
- func (status *SpaceStatus) MarkResourceQuotaNotOwned(name string)
- func (status *SpaceStatus) PropagateAuditorRoleStatus(*rv1.Role)
- func (status *SpaceStatus) PropagateDeveloperRoleStatus(*rv1.Role)
- func (status *SpaceStatus) PropagateLimitRangeStatus(limitRange *v1.LimitRange)
- func (status *SpaceStatus) PropagateNamespaceStatus(ns *v1.Namespace)
- func (status *SpaceStatus) PropagateResourceQuotaStatus(quota *v1.ResourceQuota)
Examples ¶
- App.ComponentLabels
- DefaultDomain
- Route.SetDefaults (Labels)
- Route.SetDefaults (PrefixRoutes)
- RouteClaim.SetDefaults (Labels)
- RouteSpecFields.String
- RouteSpecFields.String (Without_hostname)
- RouteSpecFields.String (Without_path)
- Space.SetDefaults
- SpaceSpecExecution.SetDefaults (Dedupe)
- SpaceSpecSecurity.SetDefaults (BadContextPanic)
- SpaceSpecSecurity.SetDefaults (Dedupe)
Constants ¶
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 = "/" )
const ( // AppConditionReady is set when the app is configured // and is usable by developers. AppConditionReady = apis.ConditionReady // AppConditionSourceReady is set when the build is ready. AppConditionSourceReady apis.ConditionType = "SourceReady" // AppConditionKnativeServiceReady is set when service is ready. AppConditionKnativeServiceReady apis.ConditionType = "KnativeServiceReady" // AppConditionSpaceReady is used to indicate when the space has an error that // causes apps to not reconcile correctly. AppConditionSpaceReady apis.ConditionType = "SpaceReady" // AppConditionRouteReady is set when route is ready. AppConditionRouteReady apis.ConditionType = "RouteReady" // AppConditionEnvVarSecretReady is set when env var secret is ready. AppConditionEnvVarSecretReady apis.ConditionType = "EnvVarSecretReady" // AppConditionServiceBindingsReady is set when all service bindings are ready. AppConditionServiceBindingsReady apis.ConditionType = "ServiceBindingsReady" )
ConditionType represents a Service condition value
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 // identifiers. ComponentLabel = "app.kubernetes.io/component" )
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" )
const ( // SourceConditionSucceeded is set when the source is configured // and is usable by developers. SourceConditionSucceeded = apis.ConditionSucceeded SourceConditionBuildSucceeded apis.ConditionType = "BuildSucceeded" BuildArgImage = "IMAGE" BuildArgBuildpack = "BUILDPACK" BuildArgBuildpackBuilder = "BUILDER_IMAGE" BuildArgBuildpackRunImage = "RUN_IMAGE" )
const ( // DefaultBuilderImage contains the default buildpack builder image. DefaultBuilderImage = "gcr.io/kf-releases/buildpack-builder:latest" // DefaultDomainTemplate contains the default domain template. It should // be used with `fmt.Sprintf(DefaultDomainTemplate, namespace)` DefaultDomainTemplate = "%s.%s" )
TODO(#396): We should pull these from a ConfigMap
const ( // SpaceConditionReady is set when the space is configured // and is usable by developers. SpaceConditionReady = apis.ConditionReady // SpaceConditionNamespaceReady is set when the backing namespace is ready. SpaceConditionNamespaceReady apis.ConditionType = "NamespaceReady" // SpaceConditionDeveloperRoleReady is set when the developer RBAC role is // ready. SpaceConditionDeveloperRoleReady apis.ConditionType = "DeveloperRoleReady" // SpaceConditionAuditorRoleReady is set when the auditor RBAC role is // ready. SpaceConditionAuditorRoleReady apis.ConditionType = "AuditorRoleReady" // SpaceConditionResourceQuotaReady is set when the resource quota is // ready. SpaceConditionResourceQuotaReady apis.ConditionType = "ResourceQuotaReady" // SpaceConditionLimitRangeReady is set when the limit range is // ready. SpaceConditionLimitRangeReady apis.ConditionType = "LimitRangeReady" )
ConditionType represents a Service condition value
const (
KfNamespace = "kf"
)
Variables ¶
var (
AddToScheme = schemeBuilder.AddToScheme
)
var SchemeGroupVersion = schema.GroupVersion{ Group: kf.GroupName, Version: "v1alpha1", }
SchemeGroupVersion is group version used to register these objects
Functions ¶
func BuildPathRegexp ¶
BuildPathRegexp uses gorilla/mux to convert a path into regular expression that can be used to determine if a requests' path matches.
func DefaultDomain ¶
DefaultDomain gets the default domain to use for spaces from the context.
Example ¶
fmt.Println(DefaultDomain(context.Background()))
Output: example.com
func GenerateName ¶
GenerateName generates a name given the parts. It is a DNS valid name.
func GenerateRouteClaimName ¶
GenerateRouteClaimName creates the deterministic name for a Route claim.
func GenerateRouteName ¶
GenerateRouteName creates the deterministic name for a Route.
func GenerateRouteNameFromSpec ¶
func GenerateRouteNameFromSpec(spec RouteSpecFields, appName string) string
GenerateRouteNameFromSpec creates the deterministic name for a Route.
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 IstioClientFromContext ¶
func IstioClientFromContext(ctx context.Context) cv1alpha3.VirtualServicesGetter
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 ¶
SetKfAppContainerDefaults sets the defaults for an application container. This function MAY be context sensitive in the future.
func SetupIstioClient ¶
func ToBase36 ¶
ToBase36 is a helpful function that converts a string into something that is encoded and safe for URLs, names etc... Base 36 uses 0-9a-z
func ValidatePodSpec ¶
func ValidatePodSpec(podSpec v1.PodSpec) (errs *apis.FieldError)
ValidatePodSpec proxies Knative Serving's checks on PodSpec, except for one condition. We don't allow setting the container image directly on the PodSpec because it'll be set by the source instead.
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 ¶
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new App.
func (*App) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*App) DeepCopyObject ¶
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) SetDefaults ¶
SetDefaults implements apis.Defaultable
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AppList.
func (*AppList) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*AppList) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type AppSpec ¶
type AppSpec struct { // Source contains the source configuration of the App. // +optional Source SourceSpec `json:"source,omitempty"` // 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 []RouteSpecFields `json:"routes,omitempty"` // ServiceBindings defines desired bindings to external services for the // App. // +optional // +patchStrategy=merge ServiceBindings []AppSpecServiceBinding `json:"serviceBindings,omitempty"` }
AppSpec is the desired configuration for an App.
func (*AppSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AppSpec.
func (*AppSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*AppSpec) SetDefaults ¶
SetDefaults implements apis.Defaultable
func (*AppSpec) SetServiceBindingDefaults ¶
SetServiceBindingDefaults sets the defaults for an AppSpec's ServiceBindings.
func (*AppSpec) SetSourceDefaults ¶
SetSourceDefaults implements apis.Defaultable for the embedded SourceSpec.
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) ValidateServiceBindings ¶
func (spec *AppSpec) ValidateServiceBindings(ctx context.Context) (errs *apis.FieldError)
ValidateServiceBindings validates each AppSpecServiceBinding for an App.
func (*AppSpec) ValidateSourceSpec ¶
func (spec *AppSpec) ValidateSourceSpec(ctx context.Context) (errs *apis.FieldError)
ValidateSourceSpec validates the SourceSpec embedded in the AppSpec.
type AppSpecInstances ¶
type AppSpecInstances struct { // Stopped determines if the App should be running or not. Stopped bool `json:"stopped,omitempty"` // Exactly defines a static number of desired instances. // If Exactly is set, it supersedes the Min and Max values. Exactly *int `json:"exactly,omitempty"` // Min defines a minimum auto-scaling limit. Min *int `json:"min,omitempty"` // Max defines a maximum auto-scaling limit. Max *int `json:"max,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) MaxAnnotationValue ¶
func (instances *AppSpecInstances) MaxAnnotationValue() string
MaxAnnotationValue returns the value autoscaling.knative.dev/maxScale should be set to.
func (*AppSpecInstances) MinAnnotationValue ¶
func (instances *AppSpecInstances) MinAnnotationValue() string
MinAnnotationValue returns the value autoscaling.knative.dev/minScale should be set to.
func (*AppSpecInstances) ScalingAnnotations ¶
func (instances *AppSpecInstances) ScalingAnnotations() map[string]string
ScalingAnnotations returns the annotations to put on the underling Serving to set scaling bounds.
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 AppSpecServiceBinding ¶
type AppSpecServiceBinding struct { // Instance is the service the app will bind to. Instance string `json:"instance"` // Parameters is an arbitrary JSON to be injected into VCAP_SERVICES. // +optional Parameters json.RawMessage `json:"parameters,omitempty"` // BindingName is the name of the binding. // If unspecified it will default to the service name // +optional BindingName string `json:"bindingName,omitempty"` }
AppSpecServiceBinding is a binding to an external service.
func (*AppSpecServiceBinding) DeepCopy ¶
func (in *AppSpecServiceBinding) DeepCopy() *AppSpecServiceBinding
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AppSpecServiceBinding.
func (*AppSpecServiceBinding) DeepCopyInto ¶
func (in *AppSpecServiceBinding) DeepCopyInto(out *AppSpecServiceBinding)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*AppSpecServiceBinding) SetDefaults ¶
func (k *AppSpecServiceBinding) SetDefaults(ctx context.Context)
SetDefaults sets the defaults for an AppSpecServiceBinding.
func (*AppSpecServiceBinding) Validate ¶
func (binding *AppSpecServiceBinding) Validate(ctx context.Context) (errs *apis.FieldError)
Validate validates the fields of an AppSpecServiceBinding.
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 core.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)
SetDefaults implements apis.Defaultable
type AppStatus ¶
type AppStatus struct { // Pull in the fields from Knative's duckv1beta1 status field. duckv1beta1.Status `json:",inline"` // SourceStatusFields embeds the image and build name for the latest // passing source. SourceStatusFields `json:",inline"` // Inline the latest serving.Service revisions that are ready serving.ConfigurationStatusFields `json:",inline"` // Inline the latest Service route information. serving.RouteStatusFields `json:",inline"` // LatestReadySourceName contains the name of the source that was most // recently built correctly. LatestReadySourceName string `json:"latestReadySource,omitempty"` // LatestCreatedSourceName contains the name of the source that was most // recently created. LatestCreatedSourceName string `json:"latestSource,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"` }
AppStatus is the current configuration and running state for an App.
func (*AppStatus) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AppStatus.
func (*AppStatus) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*AppStatus) EnvVarSecretCondition ¶
func (status *AppStatus) EnvVarSecretCondition() SingleConditionManager
EnvVarSecretCondition gets a manager for the state of the env var secret.
func (*AppStatus) GetCondition ¶
func (status *AppStatus) GetCondition(t apis.ConditionType) *apis.Condition
GetCondition returns the condition by name.
func (*AppStatus) InitializeConditions ¶
func (status *AppStatus) InitializeConditions()
InitializeConditions sets the initial values to the conditions.
func (*AppStatus) KnativeServiceCondition ¶
func (status *AppStatus) KnativeServiceCondition() SingleConditionManager
KnativeServiceCondition gets a manager for the state of the Knative Service.
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 ¶
MarkSpaceUnhealthy notes that the space was could not be retrieved.
func (*AppStatus) PropagateEnvVarSecretStatus ¶
PropagateEnvVarSecretStatus updates the env var secret readiness status.
func (*AppStatus) PropagateKnativeServiceStatus ¶
PropagateKnativeServiceStatus updates the Knative service status to reflect the underlying service.
func (*AppStatus) PropagateServiceBindingsStatus ¶
func (status *AppStatus) PropagateServiceBindingsStatus(bindings []servicecatalogv1beta1.ServiceBinding)
PropagateServiceBindingsStatus updates the service binding readiness status.
func (*AppStatus) PropagateSourceStatus ¶
PropagateSourceStatus copies the source status to the app's.
func (*AppStatus) RouteCondition ¶
func (status *AppStatus) RouteCondition() SingleConditionManager
RouteCondition gets a manager for the state of the kf Route.
func (*AppStatus) ServiceBindingCondition ¶
func (status *AppStatus) ServiceBindingCondition() SingleConditionManager
ServiceBindingCondition gets a manager for the state of the service bindings.
func (*AppStatus) SourceCondition ¶
func (status *AppStatus) SourceCondition() SingleConditionManager
SourceCondition gets a manager for the state of the source.
type HTTPRoutes ¶
HTTPRoutes implements the necessary interfaces for the algorithms package.
func (HTTPRoutes) Append ¶
func (h HTTPRoutes) Append(a algorithms.Interface) algorithms.Interface
Append implements Interface.
func (HTTPRoutes) Clone ¶
func (h HTTPRoutes) Clone() algorithms.Interface
Clone implements Interface.
func (HTTPRoutes) DeepCopy ¶
func (in HTTPRoutes) DeepCopy() HTTPRoutes
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPRoutes.
func (HTTPRoutes) DeepCopyInto ¶
func (in HTTPRoutes) DeepCopyInto(out *HTTPRoutes)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (HTTPRoutes) Set ¶
func (h HTTPRoutes) Set(i int, a algorithms.Interface, j int, b algorithms.Interface)
Set implements Interface.
func (HTTPRoutes) Slice ¶
func (h HTTPRoutes) Slice(i int, j int) algorithms.Interface
Slice implements Interface.
type OwnerReferences ¶
type OwnerReferences []metav1.OwnerReference
OwnerReferences implements the necessary interfaces for the algorithms package.
func (OwnerReferences) Append ¶
func (d OwnerReferences) Append(a algorithms.Interface) algorithms.Interface
Append implements Interface.
func (OwnerReferences) Clone ¶
func (d OwnerReferences) Clone() algorithms.Interface
Clone implements Interface.
func (OwnerReferences) DeepCopy ¶
func (in OwnerReferences) DeepCopy() OwnerReferences
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OwnerReferences.
func (OwnerReferences) DeepCopyInto ¶
func (in OwnerReferences) DeepCopyInto(out *OwnerReferences)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (OwnerReferences) Less ¶
func (d OwnerReferences) Less(i int, j int) bool
Less implements Interface.
func (OwnerReferences) Set ¶
func (d OwnerReferences) Set(i int, a algorithms.Interface, j int, b algorithms.Interface)
Set implements Interface.
func (OwnerReferences) Slice ¶
func (d OwnerReferences) Slice(i int, j int) algorithms.Interface
Slice implements Interface.
func (OwnerReferences) Swap ¶
func (d OwnerReferences) Swap(i int, j int)
Swap implements Interface.
type Route ¶
type Route struct { metav1.TypeMeta `json:",inline"` // +optional metav1.ObjectMeta `json:"metadata,omitempty"` // +optional Spec RouteSpec `json:"spec,omitempty"` }
Route is a high level structure that encompasses an Istio VirtualService and configuration applied to it.
func (*Route) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Route.
func (*Route) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Route) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*Route) GetGroupVersionKind ¶
func (r *Route) GetGroupVersionKind() schema.GroupVersionKind
GetGroupVersionKind returns the GroupVersionKind.
func (*Route) SetDefaults ¶
SetDefaults implements apis.Defaultable
Example (Labels) ¶
r := &Route{} r.Spec.Hostname = "some-hostname" r.Spec.Domain = "example.com" r.SetDefaults(context.Background()) fmt.Println("Hostname:", r.Labels[RouteHostname]) fmt.Println("Domain:", r.Labels[RouteDomain]) fmt.Println("Path:", r.Labels[RoutePath])
Output: Hostname: some-hostname Domain: example.com Path: pvdf1ls1w14a
Example (PrefixRoutes) ¶
r := &Route{} r.Spec.Path = "some-path" r.SetDefaults(context.Background()) fmt.Println("Route:", r.Spec.Path)
Output: Route: /some-path
func (*Route) SetSpaceDefaults ¶
SetSpaceDefaults sets the default values for the Route based on the space's settings.
type RouteClaim ¶
type RouteClaim struct { metav1.TypeMeta `json:",inline"` // +optional metav1.ObjectMeta `json:"metadata,omitempty"` // +optional Spec RouteClaimSpec `json:"spec,omitempty"` }
RouteClaim is similar to Route, however it is not associated with an App. It is created (by the Route Controller) along with its associated Routes.
func (*RouteClaim) DeepCopy ¶
func (in *RouteClaim) DeepCopy() *RouteClaim
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RouteClaim.
func (*RouteClaim) DeepCopyInto ¶
func (in *RouteClaim) DeepCopyInto(out *RouteClaim)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*RouteClaim) DeepCopyObject ¶
func (in *RouteClaim) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*RouteClaim) SetDefaults ¶
func (k *RouteClaim) SetDefaults(ctx context.Context)
SetDefaults sets the defaults for a RouteClaim.
Example (Labels) ¶
r := &RouteClaim{} r.Spec.Hostname = "some-hostname" r.Spec.Domain = "example.com" r.SetDefaults(context.Background()) fmt.Println("Hostname:", r.Labels[RouteHostname]) fmt.Println("Domain:", r.Labels[RouteDomain]) fmt.Println("Path:", r.Labels[RoutePath])
Output: Hostname: some-hostname Domain: example.com Path: pvdf1ls1w14a
func (*RouteClaim) Validate ¶
func (r *RouteClaim) Validate(ctx context.Context) (errs *apis.FieldError)
Validate validates a RouteClaim.
type RouteClaimList ¶
type RouteClaimList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata"` Items []RouteClaim `json:"items"` }
RouteClaimList is a list of RouteClaim resources
func (*RouteClaimList) DeepCopy ¶
func (in *RouteClaimList) DeepCopy() *RouteClaimList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RouteClaimList.
func (*RouteClaimList) DeepCopyInto ¶
func (in *RouteClaimList) DeepCopyInto(out *RouteClaimList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*RouteClaimList) DeepCopyObject ¶
func (in *RouteClaimList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type RouteClaimSpec ¶
type RouteClaimSpec struct { // RouteSpecFields contains the fields of a route. RouteSpecFields `json:",inline"` }
RouteClaimSpec contains the specification for a RouteClaim.
func (*RouteClaimSpec) DeepCopy ¶
func (in *RouteClaimSpec) DeepCopy() *RouteClaimSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RouteClaimSpec.
func (*RouteClaimSpec) DeepCopyInto ¶
func (in *RouteClaimSpec) DeepCopyInto(out *RouteClaimSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*RouteClaimSpec) SetDefaults ¶
func (k *RouteClaimSpec) SetDefaults(ctx context.Context)
SetDefaults implements apis.Defaultable
func (*RouteClaimSpec) Validate ¶
func (r *RouteClaimSpec) Validate(ctx context.Context) (errs *apis.FieldError)
Validate validates a RouteClaimSpec.
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RouteList.
func (*RouteList) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*RouteList) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type RouteSpec ¶
type RouteSpec struct { // AppName contains the Kf App that is bound to the route. AppName string `json:"appName,omitempty"` // RouteSpecFields contains the fields of a route. RouteSpecFields `json:",inline"` }
RouteSpec contains the specification for a Route.
func (*RouteSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RouteSpec.
func (*RouteSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*RouteSpec) SetDefaults ¶
SetDefaults implements apis.Defaultable
func (*RouteSpec) SetSpaceDefaults ¶
SetSpaceDefaults sets the default values for the RouteSpec based on the space's settings.
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) SetDefaults ¶
func (k *RouteSpecFields) SetDefaults(ctx context.Context)
SetDefaults implements apis.Defaultable
func (*RouteSpecFields) SetSpaceDefaults ¶
func (k *RouteSpecFields) SetSpaceDefaults(space *Space)
SetSpaceDefaults sets the default values for the RouteSpec based on the space's settings.
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) 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 ¶
func (d RouteSpecFieldsSlice) Append(a algorithms.Interface) algorithms.Interface
Append implements Interface.
func (RouteSpecFieldsSlice) Clone ¶
func (d RouteSpecFieldsSlice) Clone() algorithms.Interface
Clone implements Interface.
func (RouteSpecFieldsSlice) DeepCopy ¶
func (in RouteSpecFieldsSlice) DeepCopy() RouteSpecFieldsSlice
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) Less ¶
func (d RouteSpecFieldsSlice) Less(i int, j int) bool
Less implements Interface.
func (RouteSpecFieldsSlice) Set ¶
func (d RouteSpecFieldsSlice) Set(i int, a algorithms.Interface, j int, b algorithms.Interface)
Set implements Interface.
func (RouteSpecFieldsSlice) Slice ¶
func (d RouteSpecFieldsSlice) Slice(i int, j int) algorithms.Interface
Slice implements Interface.
func (RouteSpecFieldsSlice) Swap ¶
func (d RouteSpecFieldsSlice) Swap(i int, j int)
Swap implements Interface.
type Routes ¶
type Routes []Route
Routes implements the necessary interfaces for the algorithms package.
func (Routes) Append ¶
func (d Routes) Append(a algorithms.Interface) algorithms.Interface
Append implements Interface.
func (Routes) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Routes.
func (Routes) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (Routes) Set ¶
func (d Routes) Set(i int, a algorithms.Interface, j int, b algorithms.Interface)
Set implements Interface.
type ServiceBindings ¶
type ServiceBindings []servicecatalogv1beta1.ServiceBinding
ServiceBindings implements the necessary interfaces for the algorithms package.
func (ServiceBindings) Append ¶
func (d ServiceBindings) Append(a algorithms.Interface) algorithms.Interface
Append implements Interface.
func (ServiceBindings) Clone ¶
func (s ServiceBindings) Clone() algorithms.Interface
Clone implements Interface.
func (ServiceBindings) DeepCopy ¶
func (in ServiceBindings) DeepCopy() ServiceBindings
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceBindings.
func (ServiceBindings) DeepCopyInto ¶
func (in ServiceBindings) DeepCopyInto(out *ServiceBindings)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (ServiceBindings) Less ¶
func (s ServiceBindings) Less(i int, j int) bool
Less implements Interface.
func (ServiceBindings) Set ¶
func (d ServiceBindings) Set(i int, a algorithms.Interface, j int, b algorithms.Interface)
Set implements Interface.
func (ServiceBindings) Slice ¶
func (s ServiceBindings) Slice(i int, j int) algorithms.Interface
Slice implements Interface.
func (ServiceBindings) Swap ¶
func (s ServiceBindings) Swap(i int, j int)
Swap implements Interface.
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 // MarkSourceReconciliationError marks the Source having some error during the // reconciliation process. Context should contain the action that failed. MarkReconciliationError(context string, err error) error // IsPending returns whether the condition's state is final or in progress. IsPending() bool }
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 Source ¶
type Source struct { metav1.TypeMeta `json:",inline"` // +optional metav1.ObjectMeta `json:"metadata,omitempty"` // +optional Spec SourceSpec `json:"spec,omitempty"` // +optional Status SourceStatus `json:"status,omitempty"` }
Source represents the source code and build configuration for an App.
func (*Source) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Source.
func (*Source) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Source) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*Source) GetGroupVersionKind ¶
func (r *Source) GetGroupVersionKind() schema.GroupVersionKind
GetGroupVersionKind returns the GroupVersionKind.
func (*Source) SetDefaults ¶
SetDefaults implements apis.Defaultable
type SourceList ¶
type SourceList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata"` Items []Source `json:"items"` }
SourceList is a list of Source resources.
func (*SourceList) DeepCopy ¶
func (in *SourceList) DeepCopy() *SourceList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SourceList.
func (*SourceList) DeepCopyInto ¶
func (in *SourceList) DeepCopyInto(out *SourceList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*SourceList) DeepCopyObject ¶
func (in *SourceList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type SourceSpec ¶
type SourceSpec struct { // UpdateRequests is a unique identifier for an SourceSpec. // Updating sub-values will trigger a new value. // +optional UpdateRequests int `json:"updateRequests,omitempty"` // ServiceAccount holds the service account the build will execute as. // This can be used to attach credentials to the build. // +optional ServiceAccount string `json:"serviceAccount,omitempty"` // ContainerImage defines the container image for source. // +optional ContainerImage SourceSpecContainerImage `json:"containerImage,omitempty"` // BuildpackBuild defines buildpack information for source. // +optional BuildpackBuild SourceSpecBuildpackBuild `json:"buildpackBuild,omitempty"` }
SourceSpec defines the source code for an App. The fields ContainerImage and BuildpackBuild are mutually exclusive.
func AppSpecSourceMask ¶
func AppSpecSourceMask(in SourceSpec) SourceSpec
AppSpecSourceMask is a _shallow_ copy of the SourceSpec object to a new SourceSpec 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 source of AppSpec.
func (*SourceSpec) DeepCopy ¶
func (in *SourceSpec) DeepCopy() *SourceSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SourceSpec.
func (*SourceSpec) DeepCopyInto ¶
func (in *SourceSpec) DeepCopyInto(out *SourceSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*SourceSpec) IsBuildpackBuild ¶
func (spec *SourceSpec) IsBuildpackBuild() bool
IsBuildpackBuild returns true if the build is for a buildpack
func (*SourceSpec) IsContainerBuild ¶
func (spec *SourceSpec) IsContainerBuild() bool
IsContainerBuild returns true if the build is for a container
func (*SourceSpec) NeedsUpdateRequestsIncrement ¶
func (spec *SourceSpec) NeedsUpdateRequestsIncrement(old SourceSpec) 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 SourceSpec is embedded.
This can happen if a field in the source changes without also updating the UpdateRequests.
func (*SourceSpec) SetDefaults ¶
func (k *SourceSpec) SetDefaults(ctx context.Context)
SetDefaults implements apis.Defaultable
func (*SourceSpec) Validate ¶
func (spec *SourceSpec) Validate(ctx context.Context) (errs *apis.FieldError)
Validate makes sure that a SourceSpec is properly configured.
type SourceSpecBuildpackBuild ¶
type SourceSpecBuildpackBuild struct { // Source is the Container Image which contains the App's source code. Source string `json:"source"` // Stack is the base layer to use for the App. // +optional Stack string `json:"stack,omitempty"` // Buildpack is the Buildpack to use for the App. // +optional Buildpack string `json:"buildpack,omitempty"` // BuildpackBuilder is the container image which builds the App. BuildpackBuilder string `json:"buildpackBuilder"` // Image is the location to store the built image. Image string `json:"image"` // Env represents the environment variables to apply when building the App. Env []corev1.EnvVar `json:"env,omitempty"` }
SourceSpecBuildpackBuild defines building an App using Buildpacks.
func (*SourceSpecBuildpackBuild) DeepCopy ¶
func (in *SourceSpecBuildpackBuild) DeepCopy() *SourceSpecBuildpackBuild
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SourceSpecBuildpackBuild.
func (*SourceSpecBuildpackBuild) DeepCopyInto ¶
func (in *SourceSpecBuildpackBuild) DeepCopyInto(out *SourceSpecBuildpackBuild)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*SourceSpecBuildpackBuild) Validate ¶
func (buildpackBuild *SourceSpecBuildpackBuild) Validate(ctx context.Context) (errs *apis.FieldError)
Validate makes sure that a SourceSpecBuildpackBuild is properly configured.
type SourceSpecContainerImage ¶
type SourceSpecContainerImage struct { // Image is the container image URI for the App. Image string `json:"image"` }
SourceSpecContainerImage defines a container image for an App.
func (*SourceSpecContainerImage) DeepCopy ¶
func (in *SourceSpecContainerImage) DeepCopy() *SourceSpecContainerImage
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SourceSpecContainerImage.
func (*SourceSpecContainerImage) DeepCopyInto ¶
func (in *SourceSpecContainerImage) DeepCopyInto(out *SourceSpecContainerImage)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*SourceSpecContainerImage) Validate ¶
func (containerImage *SourceSpecContainerImage) Validate(ctx context.Context) (errs *apis.FieldError)
Validate makes sure that an SourceSpecContainerImage is properly configured.
type SourceStatus ¶
type SourceStatus struct { // Pull in the fields from Knative's duckv1beta1 status field. duckv1beta1.Status `json:",inline"` SourceStatusFields `json:",inline"` }
SourceStatus is the current configuration and running state for an App's Source.
func (*SourceStatus) DeepCopy ¶
func (in *SourceStatus) DeepCopy() *SourceStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SourceStatus.
func (*SourceStatus) DeepCopyInto ¶
func (in *SourceStatus) DeepCopyInto(out *SourceStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*SourceStatus) GetCondition ¶
func (status *SourceStatus) GetCondition(t apis.ConditionType) *apis.Condition
GetCondition returns the condition by name.
func (*SourceStatus) InitializeConditions ¶
func (status *SourceStatus) InitializeConditions()
InitializeConditions sets the initial values to the conditions.
func (*SourceStatus) MarkBuildNotOwned ¶
func (status *SourceStatus) MarkBuildNotOwned(name string)
MarkBuildNotOwned marks the Build as not being owned by the Source.
func (*SourceStatus) PropagateBuildStatus ¶
func (status *SourceStatus) PropagateBuildStatus(build *build.Build)
PropagateBuildStatus copies fields from the Build status to Space and updates the readiness based on the current phase.
func (*SourceStatus) Succeeded ¶
func (status *SourceStatus) Succeeded() bool
Succeeded returns if the space is ready to be used.
type SourceStatusFields ¶
type SourceStatusFields 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"` }
SourceStatusFields holds the fields of Source's status that are shared. This is defined separately and inlined so that other types can readily consume these fields via duck typing.
func (*SourceStatusFields) DeepCopy ¶
func (in *SourceStatusFields) DeepCopy() *SourceStatusFields
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SourceStatusFields.
func (*SourceStatusFields) DeepCopyInto ¶
func (in *SourceStatusFields) DeepCopyInto(out *SourceStatusFields)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Space.
func (*Space) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Space) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*Space) GetGroupVersionKind ¶
func (r *Space) GetGroupVersionKind() schema.GroupVersionKind
GetGroupVersionKind returns the GroupVersionKind.
func (*Space) SetDefaults ¶
SetDefaults implements apis.Defaultable
Example ¶
space := Space{} space.Name = "mynamespace" space.SetDefaults(dummyConfig()) var domainNames []string for _, domain := range space.Spec.Execution.Domains { if domain.Default { domainNames = append(domainNames, "*"+domain.Domain) continue } domainNames = append(domainNames, domain.Domain) } fmt.Println("Builder:", space.Spec.BuildpackBuild.BuilderImage) fmt.Println("Domains:", strings.Join(domainNames, ", "))
Output: Builder: gcr.io/kf-releases/buildpack-builder:latest Domains: *mynamespace.custom.example.com
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"` // Default implies that this SpaceDomain is used when a domain is not // specified. There can only be a single default set to true per space. // NOTE: This may change in the future. Default bool `json:"default,omitempty"` }
SpaceDomain stores information about a domain available in a space.
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 ¶
func (d SpaceDomains) Append(a algorithms.Interface) algorithms.Interface
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) Set ¶
func (d SpaceDomains) Set(i int, a algorithms.Interface, j int, b algorithms.Interface)
Set implements Interface.
func (SpaceDomains) Slice ¶
func (d SpaceDomains) Slice(i int, j int) algorithms.Interface
Slice 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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SpaceList.
func (*SpaceList) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*SpaceList) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type SpaceSpec ¶
type SpaceSpec struct { // Security contains config for RBAC roles that will be created for the // space. // +optional Security SpaceSpecSecurity `json:"security,omitempty"` // BuildpackBuild contains config for the build pipelines. // Currently, this is the only way to build source -> container workflows, but // in the future additional types may be added. For example DockerBuild or // WebhookBuild to execute a build via webhook. // +optional BuildpackBuild SpaceSpecBuildpackBuild `json:"buildpackBuild,omitempty"` // Execution contains settings for the execution environment. // +optional Execution SpaceSpecExecution `json:"execution,omitempty"` // SpaceSpecResourceLimits contains definitions for resource usage limits. // +optional ResourceLimits SpaceSpecResourceLimits `json:"resourceLimits,omitempty"` }
SpaceSpec contains the specification for a space.
func (*SpaceSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SpaceSpec.
func (*SpaceSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*SpaceSpec) SetDefaults ¶
SetDefaults implements apis.Defaultable
type SpaceSpecBuildpackBuild ¶
type SpaceSpecBuildpackBuild struct { // BuilderImage is a buildpacks.io builder image. BuilderImage string `json:"builderImage,omitempty"` // 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"` }
SpaceSpecBuildpackBuild holds fields for managing building via buildpacks.
func (*SpaceSpecBuildpackBuild) DeepCopy ¶
func (in *SpaceSpecBuildpackBuild) DeepCopy() *SpaceSpecBuildpackBuild
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SpaceSpecBuildpackBuild.
func (*SpaceSpecBuildpackBuild) DeepCopyInto ¶
func (in *SpaceSpecBuildpackBuild) DeepCopyInto(out *SpaceSpecBuildpackBuild)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*SpaceSpecBuildpackBuild) SetDefaults ¶
func (k *SpaceSpecBuildpackBuild) SetDefaults(ctx context.Context)
SetDefaults implements apis.Defaultable
func (*SpaceSpecBuildpackBuild) Validate ¶
func (s *SpaceSpecBuildpackBuild) Validate(ctx context.Context) (errs *apis.FieldError)
Validate makes sure that SpaceSpecBuildpackBuild is properly configured.
type SpaceSpecExecution ¶
type SpaceSpecExecution struct { // Env sets default environment variables on kf applications for the whole // space. // +optional // +patchMergeKey=name // +patchStrategy=merge Env []corev1.EnvVar `json:"env,omitempty" patchStrategy:"merge" patchMergeKey:"name"` // 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"` }
SpaceSpecExecution contains settings for the execution environment.
func (*SpaceSpecExecution) DeepCopy ¶
func (in *SpaceSpecExecution) DeepCopy() *SpaceSpecExecution
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SpaceSpecExecution.
func (*SpaceSpecExecution) DeepCopyInto ¶
func (in *SpaceSpecExecution) DeepCopyInto(out *SpaceSpecExecution)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*SpaceSpecExecution) SetDefaults ¶
func (k *SpaceSpecExecution) SetDefaults(ctx context.Context, name string)
SetDefaults implements apis.Defaultable
Example (Dedupe) ¶
space := Space{} space.Spec.Execution = SpaceSpecExecution{ Domains: []SpaceDomain{ {Domain: "example.com"}, {Domain: "other-example.com"}, {Domain: "example.com", Default: true}, {Domain: "other-example.com"}, }, } space.SetDefaults(context.Background()) var domainNames []string for _, domain := range space.Spec.Execution.Domains { if domain.Default { domainNames = append(domainNames, "*"+domain.Domain) continue } domainNames = append(domainNames, domain.Domain) } fmt.Println(strings.Join(domainNames, ", "))
Output: *example.com, other-example.com
func (*SpaceSpecExecution) Validate ¶
func (s *SpaceSpecExecution) Validate(ctx context.Context) (errs *apis.FieldError)
Validate makes sure that SpaceSpecExecution is properly configured.
type SpaceSpecResourceLimits ¶
type SpaceSpecResourceLimits struct { // SpaceQuota holds the k8s ResourceQuota created for the whole space. // For now, only one ResourceQuota per space is supported. // Consider allowing multiple ResourceQuotas when more quota scopes are enabled in k8s // +optional SpaceQuota corev1.ResourceList `json:"spaceQuota,omitempty"` // ResourceDefaults holds the k8s LimitRange created for the whole space, // which sets default request/limit for resources per pod or container. // +optional ResourceDefaults []corev1.LimitRangeItem `json:"resourceDefaults,omitempty"` }
SpaceSpecResourceLimits contains definitions for resource usage limits.
func (*SpaceSpecResourceLimits) DeepCopy ¶
func (in *SpaceSpecResourceLimits) DeepCopy() *SpaceSpecResourceLimits
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SpaceSpecResourceLimits.
func (*SpaceSpecResourceLimits) DeepCopyInto ¶
func (in *SpaceSpecResourceLimits) DeepCopyInto(out *SpaceSpecResourceLimits)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*SpaceSpecResourceLimits) SetDefaults ¶
func (k *SpaceSpecResourceLimits) SetDefaults(ctx context.Context)
SetDefaults implements apis.Defaultable
func (*SpaceSpecResourceLimits) Validate ¶
func (s *SpaceSpecResourceLimits) Validate(ctx context.Context) (errs *apis.FieldError)
Validate makes sure that SpaceSpecResourceLimits is properly configured.
type SpaceSpecSecurity ¶
type SpaceSpecSecurity struct { // EnableDeveloperLogsAccess allows developers to access pod logging endpoints. // +optional EnableDeveloperLogsAccess bool `json:"enableDeveloperLogsAccess,omitempty"` // BuildServiceAccount sets the service account that will be propagated to // all builds. // +optional BuildServiceAccount string `json:"buildServiceAccount,omitempty"` }
SpaceSpecSecurity holds fields for creating RBAC in the space.
func (*SpaceSpecSecurity) DeepCopy ¶
func (in *SpaceSpecSecurity) DeepCopy() *SpaceSpecSecurity
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SpaceSpecSecurity.
func (*SpaceSpecSecurity) DeepCopyInto ¶
func (in *SpaceSpecSecurity) DeepCopyInto(out *SpaceSpecSecurity)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*SpaceSpecSecurity) SetDefaults ¶
func (k *SpaceSpecSecurity) SetDefaults(ctx context.Context)
SetDefaults implements apis.Defaultable
Example (BadContextPanic) ¶
space := Space{} space.Name = "mynamespace" space.SetDefaults(context.Background()) var domainNames []string for _, domain := range space.Spec.Execution.Domains { if domain.Default { domainNames = append(domainNames, "*"+domain.Domain) continue } domainNames = append(domainNames, domain.Domain) } fmt.Println("Domains:", strings.Join(domainNames, ", "))
Output: Domains: *mynamespace.example.com
Example (Dedupe) ¶
space := Space{} space.Spec.Security = SpaceSpecSecurity{ EnableDeveloperLogsAccess: false, } space.SetDefaults(dummyConfig()) fmt.Println("EnableDeveloperLogsAccess:", space.Spec.Security.EnableDeveloperLogsAccess)
Output: EnableDeveloperLogsAccess: true
func (*SpaceSpecSecurity) Validate ¶
func (s *SpaceSpecSecurity) Validate(ctx context.Context) (errs *apis.FieldError)
Validate makes sure that SpaceSpecSecurity is properly configured.
type SpaceStatus ¶
type SpaceStatus struct { // Pull in the fields from Knative's duckv1beta1 status field. duckv1beta1.Status `json:",inline"` Quota corev1.ResourceQuotaStatus `json:"quota,omitempty"` }
SpaceStatus represents information about the status of a Space.
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) GetCondition ¶
func (status *SpaceStatus) GetCondition(t apis.ConditionType) *apis.Condition
GetCondition returns the condition by name.
func (*SpaceStatus) InitializeConditions ¶
func (status *SpaceStatus) InitializeConditions()
InitializeConditions sets the initial values to the conditions.
func (*SpaceStatus) IsReady ¶
func (status *SpaceStatus) IsReady() bool
IsReady returns if the space is ready to be used.
func (*SpaceStatus) MarkAuditorRoleNotOwned ¶
func (status *SpaceStatus) MarkAuditorRoleNotOwned(name string)
MarkAuditorRoleNotOwned marks the auditor role as not being owned by the Space.
func (*SpaceStatus) MarkDeveloperRoleNotOwned ¶
func (status *SpaceStatus) MarkDeveloperRoleNotOwned(name string)
MarkDeveloperRoleNotOwned marks the developer role as not being owned by the Space.
func (*SpaceStatus) MarkLimitRangeNotOwned ¶
func (status *SpaceStatus) MarkLimitRangeNotOwned(name string)
MarkLimitRangeNotOwned marks the LimitRange as not being owned by the Space.
func (*SpaceStatus) MarkNamespaceNotOwned ¶
func (status *SpaceStatus) MarkNamespaceNotOwned(name string)
MarkNamespaceNotOwned marks the namespace as not being owned by the Space.
func (*SpaceStatus) MarkResourceQuotaNotOwned ¶
func (status *SpaceStatus) MarkResourceQuotaNotOwned(name string)
MarkResourceQuotaNotOwned marks the ResourceQuota as not being owned by the Space.
func (*SpaceStatus) PropagateAuditorRoleStatus ¶
func (status *SpaceStatus) PropagateAuditorRoleStatus(*rv1.Role)
PropagateAuditorRoleStatus copies fields from the Role to Space and updates the readiness based on the current phase.
func (*SpaceStatus) PropagateDeveloperRoleStatus ¶
func (status *SpaceStatus) PropagateDeveloperRoleStatus(*rv1.Role)
PropagateDeveloperRoleStatus copies fields from the Role to Space and updates the readiness based on the current phase.
func (*SpaceStatus) PropagateLimitRangeStatus ¶
func (status *SpaceStatus) PropagateLimitRangeStatus(limitRange *v1.LimitRange)
PropagateLimitRangeStatus updates the readiness of the space based on if a LimitRange exists.
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) PropagateResourceQuotaStatus ¶
func (status *SpaceStatus) PropagateResourceQuotaStatus(quota *v1.ResourceQuota)
PropagateResourceQuotaStatus copies the ResourceQuota Used and Hard amounts to the Space and updates the readiness based on if a quota exists.
Source Files
¶
- alg_types.go
- app_defaults.go
- app_lifecycle.go
- app_masks.go
- app_types.go
- app_validation.go
- doc.go
- register.go
- route_defaults.go
- route_lifecycle.go
- route_types.go
- route_validation.go
- servicebinding_validation.go
- source_defaults.go
- source_lifecycle.go
- source_types.go
- source_validation.go
- space_defaults.go
- space_lifecycle.go
- space_types.go
- space_validation.go
- utils.go
- zz_generated.deepcopy.go