apps

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2019 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Overview

Package apps provides a cf compatible way of managing Knative Services as cf apps.

Index

Examples

Constants

View Source
const (
	// Kind contains the kind for the backing Kubernetes API.
	Kind = "App"

	// APIVersion contains the version for the backing Kubernetes API.
	APIVersion = "v1alpha1"
)

Variables

Functions

func BindService added in v0.2.0

func BindService(app *v1alpha1.App, binding *v1alpha1.AppSpecServiceBinding)

BindService binds a service to an App.

Example
package main

import (
	"fmt"

	kfv1alpha1 "github.com/google/kf/pkg/apis/kf/v1alpha1"
	"github.com/google/kf/pkg/kf/apps"
)

func main() {
	myApp := &kfv1alpha1.App{}
	apps.BindService(myApp, &kfv1alpha1.AppSpecServiceBinding{
		Instance:    "some-service",
		BindingName: "some-binding-name",
	})
	apps.BindService(myApp, &kfv1alpha1.AppSpecServiceBinding{
		Instance:    "another-service",
		BindingName: "some-binding-name",
	})
	apps.BindService(myApp, &kfv1alpha1.AppSpecServiceBinding{
		Instance:    "third-service",
		BindingName: "third",
	})
	apps.BindService(myApp, &kfv1alpha1.AppSpecServiceBinding{
		Instance:    "forth-service",
		BindingName: "forth",
	})
	apps.UnbindService(myApp, "third")

	for _, b := range myApp.Spec.ServiceBindings {
		fmt.Println("Instance", b.Instance, "BindingName", b.BindingName)
	}

}
Output:

Instance another-service BindingName some-binding-name
Instance forth-service BindingName forth

func ConditionDeleted

func ConditionDeleted(_ *v1alpha1.App, apiErr error) (bool, error)

ConditionDeleted is a ConditionFuncE that succeeds if the error returned by the cluster was a not found error.

func ConditionKnativeServiceReadyTrue added in v0.2.0

func ConditionKnativeServiceReadyTrue(obj *v1alpha1.App, err error) (bool, error)

ConditionKnativeServiceReadyTrue is a ConditionFuncE that waits for Condition{KnativeServiceReady v1alpha1.AppConditionKnativeServiceReady } to become true and fails with an error if the condition becomes false.

func ConditionReadyTrue added in v0.2.0

func ConditionReadyTrue(obj *v1alpha1.App, err error) (bool, error)

ConditionReadyTrue is a ConditionFuncE that waits for Condition{Ready v1alpha1.AppConditionReady } to become true and fails with an error if the condition becomes false.

func ConditionRoutesReadyTrue added in v0.2.0

func ConditionRoutesReadyTrue(obj *v1alpha1.App, err error) (bool, error)

ConditionRoutesReadyTrue is a ConditionFuncE that waits for Condition{RoutesReady v1alpha1.AppConditionRouteReady } to become true and fails with an error if the condition becomes false.

func ConditionServiceBindingsReadyTrue added in v0.2.0

func ConditionServiceBindingsReadyTrue(obj *v1alpha1.App, err error) (bool, error)

ConditionServiceBindingsReadyTrue is a ConditionFuncE that waits for Condition{ServiceBindingsReady v1alpha1.AppConditionServiceBindingsReady } to become true and fails with an error if the condition becomes false.

func ExtractConditions added in v0.2.0

func ExtractConditions(obj *v1alpha1.App) (extracted []apis.Condition)

ExtractConditions converts the native condition types into an apis.Condition array with the Type, Status, Reason, and Message fields intact.

func FormatDiff

func FormatDiff(w io.Writer, leftName, rightName string, left, right *v1alpha1.App)

FormatDiff creates a diff between two v1alpha1.Apps and writes it to the given writer.

func JoinRepositoryImage

func JoinRepositoryImage(repository, imageName string) string

JoinRepositoryImage joins a repository and image name.

func NewHealthCheck

func NewHealthCheck(healthCheckType string, endpoint string, timeoutSeconds int) (*corev1.Probe, error)

NewHealthCheck creates a corev1.Probe that maps the health checks CloudFoundry does.

func ObservedGenerationMatchesGeneration added in v0.2.0

func ObservedGenerationMatchesGeneration(obj *v1alpha1.App) bool

ObservedGenerationMatchesGeneration is a predicate that returns true if the object's ObservedGeneration matches the genration of the object.

func SourceImageName

func SourceImageName(namespace, appName string) string

SourceImageName gets the image name for source code for an application.

func UnbindService added in v0.2.0

func UnbindService(app *v1alpha1.App, bindingName string)

UnbindService unbinds a service from an App.

Types

type Client

type Client interface {
	Create(namespace string, obj *v1alpha1.App, opts ...CreateOption) (*v1alpha1.App, error)
	Update(namespace string, obj *v1alpha1.App, opts ...UpdateOption) (*v1alpha1.App, error)
	Transform(namespace string, name string, transformer Mutator) (*v1alpha1.App, error)
	Get(namespace string, name string, opts ...GetOption) (*v1alpha1.App, error)
	Delete(namespace string, name string, opts ...DeleteOption) error
	List(namespace string, opts ...ListOption) ([]v1alpha1.App, error)
	Upsert(namespace string, newObj *v1alpha1.App, merge Merger) (*v1alpha1.App, error)
	WaitFor(ctx context.Context, namespace string, name string, interval time.Duration, condition Predicate) (*v1alpha1.App, error)
	WaitForE(ctx context.Context, namespace string, name string, interval time.Duration, condition ConditionFuncE) (*v1alpha1.App, error)

	// Utility functions
	WaitForDeletion(ctx context.Context, namespace string, name string, interval time.Duration) (*v1alpha1.App, error)
	WaitForConditionReadyTrue(ctx context.Context, namespace string, name string, interval time.Duration) (*v1alpha1.App, error)
	WaitForConditionServiceBindingsReadyTrue(ctx context.Context, namespace string, name string, interval time.Duration) (*v1alpha1.App, error)
	WaitForConditionKnativeServiceReadyTrue(ctx context.Context, namespace string, name string, interval time.Duration) (*v1alpha1.App, error)
	WaitForConditionRoutesReadyTrue(ctx context.Context, namespace string, name string, interval time.Duration) (*v1alpha1.App, error)

	// ClientExtension can be used by the developer to extend the client.
	ClientExtension
}

Client is the interface for interacting with v1alpha1.App types as App CF style objects.

func NewClient

func NewClient(
	kclient cv1alpha1.AppsGetter,
	sourcesClient sources.Client) Client

NewClient creates a new application client.

type ClientExtension

type ClientExtension interface {
	DeleteInForeground(namespace string, name string) error
	DeployLogsForApp(out io.Writer, app *v1alpha1.App) error
	DeployLogs(out io.Writer, appName, resourceVersion, namespace string, noStart bool) error
	Restart(namespace, name string) error
	Restage(namespace, name string) (*v1alpha1.App, error)
	BindService(namespace, name string, binding *v1alpha1.AppSpecServiceBinding) (*v1alpha1.App, error)
	UnbindService(namespace, name, bindingName string) (*v1alpha1.App, error)
}

ClientExtension holds additional functions that should be exposed by client.

type ConditionFuncE

type ConditionFuncE func(instance *v1alpha1.App, apiErr error) (done bool, err error)

ConditionFuncE is a callback used by WaitForE. Done should be set to true once the condition succeeds and shouldn't be called anymore. The error will be passed back to the user.

This function MAY retrieve a nil instance and an apiErr. It's up to the function to decide how to handle the apiErr.

type CreateOption

type CreateOption func(*createConfig)

CreateOption is a single option for configuring a createConfig

type CreateOptions

type CreateOptions []CreateOption

CreateOptions is a configuration set defining a createConfig

func CreateOptionDefaults

func CreateOptionDefaults() CreateOptions

CreateOptionDefaults gets the default values for Create.

func (CreateOptions) Extend

func (opts CreateOptions) Extend(other CreateOptions) CreateOptions

Extend creates a new CreateOptions with the contents of other overriding the values set in this CreateOptions.

type DeleteOption

type DeleteOption func(*deleteConfig)

DeleteOption is a single option for configuring a deleteConfig

func WithDeleteForegroundDeletion

func WithDeleteForegroundDeletion(val bool) DeleteOption

WithDeleteForegroundDeletion creates an Option that sets If the resource should be deleted in the foreground.

type DeleteOptions

type DeleteOptions []DeleteOption

DeleteOptions is a configuration set defining a deleteConfig

func DeleteOptionDefaults

func DeleteOptionDefaults() DeleteOptions

DeleteOptionDefaults gets the default values for Delete.

func (DeleteOptions) Extend

func (opts DeleteOptions) Extend(other DeleteOptions) DeleteOptions

Extend creates a new DeleteOptions with the contents of other overriding the values set in this DeleteOptions.

func (DeleteOptions) ForegroundDeletion

func (opts DeleteOptions) ForegroundDeletion() bool

ForegroundDeletion returns the last set value for ForegroundDeletion or the empty value if not set.

type DeployOption

type DeployOption func(*deployConfig)

DeployOption is a single option for configuring a deployConfig

func WithDeployNamespace

func WithDeployNamespace(val string) DeployOption

WithDeployNamespace creates an Option that sets the Kubernetes namespace to use

type DeployOptions

type DeployOptions []DeployOption

DeployOptions is a configuration set defining a deployConfig

func DeployOptionDefaults

func DeployOptionDefaults() DeployOptions

DeployOptionDefaults gets the default values for Deploy.

func (DeployOptions) Extend

func (opts DeployOptions) Extend(other DeployOptions) DeployOptions

Extend creates a new DeployOptions with the contents of other overriding the values set in this DeployOptions.

func (DeployOptions) Namespace

func (opts DeployOptions) Namespace() string

Namespace returns the last set value for Namespace or the empty value if not set.

type GetOption

type GetOption func(*getConfig)

GetOption is a single option for configuring a getConfig

type GetOptions

type GetOptions []GetOption

GetOptions is a configuration set defining a getConfig

func GetOptionDefaults

func GetOptionDefaults() GetOptions

GetOptionDefaults gets the default values for Get.

func (GetOptions) Extend

func (opts GetOptions) Extend(other GetOptions) GetOptions

Extend creates a new GetOptions with the contents of other overriding the values set in this GetOptions.

type KfApp

type KfApp v1alpha1.App

KfApp provides a facade around Knative services for accessing and mutating its values.

Example
space := NewKfApp()
// Setup
space.SetName("nsname")

// Values
fmt.Println(space.GetName())
Output:

nsname

func NewFromApp

func NewFromApp(app *v1alpha1.App) *KfApp

NewFromApp creates a new KfApp from the given service pointer modifications to the KfApp will affect the underling app.

func NewKfApp

func NewKfApp() KfApp

NewKfApp creates a new KfApp.

func (*KfApp) DeleteEnvVars

func (k *KfApp) DeleteEnvVars(names []string)

DeleteEnvVars removes environment variables with the given key.

Example
myApp := NewKfApp()
myApp.SetEnvVars([]corev1.EnvVar{
	{Name: "FOO", Value: "0"},
	{Name: "BAR", Value: "0"},
})

myApp.DeleteEnvVars([]string{"FOO", "DOES_NOT_EXIST"})

for _, e := range myApp.GetEnvVars() {
	fmt.Println("Key", e.Name, "Value", e.Value)
}
Output:

Key BAR Value 0

func (*KfApp) GetArgs added in v0.2.0

func (k *KfApp) GetArgs() []string

GetArgs gets the arguments for the app.

Example
myApp := NewKfApp()
fmt.Printf("Default: %v\n", myApp.GetArgs())

myApp.SetArgs([]string{"arg1", "arg2"})
fmt.Printf("After set: %v\n", myApp.GetArgs())
Output:

Default: []
After set: [arg1 arg2]

func (*KfApp) GetClusterURL

func (k *KfApp) GetClusterURL() string

GetClusterURL gets the internal address of the app or the empty string if unset.

Example
app := NewKfApp()
app.Status.Address = &duckv1alpha1.Addressable{
	Addressable: duckv1beta1.Addressable{
		URL: &apis.URL{
			Host:   "app-a.some-namespace.svc.cluster.local",
			Scheme: "http",
		},
	},
}

fmt.Println(app.GetClusterURL())
Output:

http://app-a.some-namespace.svc.cluster.local

func (*KfApp) GetCommand added in v0.2.0

func (k *KfApp) GetCommand() []string

GetCommand gets the entrypoint for the app.

Example
myApp := NewKfApp()
fmt.Printf("Default: %v\n", myApp.GetCommand())

myApp.SetCommand([]string{"/bin/bash", "-x"})
fmt.Printf("After set: %v\n", myApp.GetCommand())
Output:

Default: []
After set: [/bin/bash -x]

func (*KfApp) GetContainerPorts

func (k *KfApp) GetContainerPorts() []corev1.ContainerPort

GetContainerPorts gets the ports the container will open.

Example
myApp := NewKfApp()
fmt.Printf("Default: %v\n", myApp.GetContainerPorts())

myApp.SetContainerPorts([]corev1.ContainerPort{{Name: "HTTP", ContainerPort: 8080}})

for _, port := range myApp.GetContainerPorts() {
	fmt.Printf("Open %d (%s)\n", port.ContainerPort, port.Name)

}
Output:

Default: []
Open 8080 (HTTP)

func (*KfApp) GetEnvVars

func (k *KfApp) GetEnvVars() []corev1.EnvVar

GetEnvVars reads the environment variables off an app.

Example
myApp := NewKfApp()
myApp.SetEnvVars([]corev1.EnvVar{
	{Name: "FOO", Value: "2"},
	{Name: "BAR", Value: "0"},
})

env := myApp.GetEnvVars()

for _, e := range env {
	fmt.Println("Key", e.Name, "Value", e.Value)
}
Output:

Key FOO Value 2
Key BAR Value 0
Example (EmptyApp)
myApp := NewKfApp()

env := myApp.GetEnvVars()

fmt.Println(env)
Output:

[]

func (*KfApp) GetHealthCheck

func (k *KfApp) GetHealthCheck() *corev1.Probe

GetHealthCheck gets the readiness probe or nil if one doesn't exist.

Example
check, err := NewHealthCheck("http", "/healthz", 50)
if err != nil {
	panic(err)
}

myApp := NewKfApp()
fmt.Printf("Default: %v\n", myApp.GetHealthCheck())

myApp.SetHealthCheck(check)

fmt.Println("After set:")
describe.HealthCheck(os.Stdout, myApp.GetHealthCheck())
Output:

Default: nil
After set:
Health Check:
  Timeout:   50s
  Type:      http
  Endpoint:  /healthz

func (*KfApp) GetImage

func (k *KfApp) GetImage() string

GetImage gets the image associated with the container.

Example
myApp := NewKfApp()
fmt.Printf("Default: %q\n", myApp.GetImage())

myApp.SetImage("my-company/my-app")
fmt.Printf("After set: %q\n", myApp.GetImage())
Output:

Default: ""
After set: "my-company/my-app"

func (*KfApp) GetName

func (k *KfApp) GetName() string

GetName retrieves the name of the app.

func (*KfApp) GetNamespace

func (k *KfApp) GetNamespace() string

GetNamespace gets the namespace for the app.

Example
myApp := NewKfApp()
myApp.SetNamespace("my-ns")

fmt.Println(myApp.GetNamespace())
Output:

my-ns

func (*KfApp) GetResourceRequests added in v0.2.0

func (k *KfApp) GetResourceRequests() v1.ResourceList

GetResourceRequests gets the resource request list for the container

Example
requests := corev1.ResourceList{
	corev1.ResourceCPU:    resource.MustParse("100m"),
	corev1.ResourceMemory: resource.MustParse("1Gi"),
}

myApp := NewKfApp()
myApp.SetResourceRequests(requests)

out := myApp.GetResourceRequests()
for _, key := range []corev1.ResourceName{corev1.ResourceCPU, corev1.ResourceMemory} {
	qty := out[key]
	fmt.Println(key, "=", qty.String())
}
Output:

cpu = 100m
memory = 1Gi

func (*KfApp) GetServiceAccount

func (k *KfApp) GetServiceAccount() string

GetServiceAccount returns the service account used by the container.

Example
myApp := NewKfApp()
fmt.Printf("Default: %q\n", myApp.GetServiceAccount())

myApp.SetServiceAccount("my-sa")
fmt.Printf("After set: %q\n", myApp.GetServiceAccount())
Output:

Default: ""
After set: "my-sa"

func (*KfApp) GetServiceBindings

func (k *KfApp) GetServiceBindings() []v1alpha1.AppSpecServiceBinding

func (*KfApp) MergeEnvVars

func (k *KfApp) MergeEnvVars(env []corev1.EnvVar)

MergeEnvVars adds the environment variables listed to the existing ones, overwriting duplicates by key.

Example
myApp := NewKfApp()
myApp.SetEnvVars([]corev1.EnvVar{
	{Name: "FOO", Value: "0"},
	{Name: "BAR", Value: "0"},
})

myApp.MergeEnvVars([]corev1.EnvVar{
	{Name: "FOO", Value: "1"},  // will replace old
	{Name: "BAZZ", Value: "0"}, // will be added
})

env := myApp.GetEnvVars()

for _, e := range env {
	fmt.Println("Key", e.Name, "Value", e.Value)
}
Output:

Key BAR Value 0
Key BAZZ Value 0
Key FOO Value 1

func (*KfApp) SetArgs added in v0.2.0

func (k *KfApp) SetArgs(args []string)

SetArgs sets the arguments for the app.

func (*KfApp) SetCommand added in v0.2.0

func (k *KfApp) SetCommand(entrypoint []string)

SetCommand sets the entrypoint for the app.

func (*KfApp) SetContainerPorts

func (k *KfApp) SetContainerPorts(ports []corev1.ContainerPort)

SetContainerPorts sets the ports the container will open.

func (*KfApp) SetEnvVars

func (k *KfApp) SetEnvVars(env []corev1.EnvVar)

SetEnvVars sets environment variables on an app.

func (*KfApp) SetHealthCheck

func (k *KfApp) SetHealthCheck(probe *corev1.Probe)

SetHealthCheck sets the readiness probe for the container.

func (*KfApp) SetImage

func (k *KfApp) SetImage(imageName string)

SetImage sets the image for the application and a policy to always refresh it.

func (*KfApp) SetName

func (k *KfApp) SetName(name string)

SetName sets the name of the app.

func (*KfApp) SetNamespace

func (k *KfApp) SetNamespace(namespace string)

SetNamespace sets the namespace for the app.

func (*KfApp) SetResourceRequests added in v0.2.0

func (k *KfApp) SetResourceRequests(requests v1.ResourceList)

SetResourceRequests sets the resource request list for the container

func (*KfApp) SetServiceAccount

func (k *KfApp) SetServiceAccount(sa string)

SetServiceAccount sets the account the application will run as.

func (*KfApp) SetSource

func (k *KfApp) SetSource(src sources.KfSource)

SetSource sets the source the application will use to build.

func (*KfApp) ToApp

func (k *KfApp) ToApp() *v1alpha1.App

ToApp casts this alias back into an App.

type List

type List []v1alpha1.App

List represents a collection of v1alpha1.App.

func (List) Filter

func (list List) Filter(filter Predicate) (out List)

Filter returns a new list items for which the predicates fails removed.

type ListOption

type ListOption func(*listConfig)

ListOption is a single option for configuring a listConfig

func WithListFieldSelector

func WithListFieldSelector(val map[string]string) ListOption

WithListFieldSelector creates an Option that sets A selector on the resource's fields.

func WithListFilter added in v0.2.0

func WithListFilter(val Predicate) ListOption

WithListFilter creates an Option that sets Filter to apply.

type ListOptions

type ListOptions []ListOption

ListOptions is a configuration set defining a listConfig

func ListOptionDefaults

func ListOptionDefaults() ListOptions

ListOptionDefaults gets the default values for List.

func (ListOptions) Extend

func (opts ListOptions) Extend(other ListOptions) ListOptions

Extend creates a new ListOptions with the contents of other overriding the values set in this ListOptions.

type Merger

type Merger func(newObj, oldObj *v1alpha1.App) *v1alpha1.App

Merger is a type to merge an existing value with a new one.

type Mutator

type Mutator func(*v1alpha1.App) error

Mutator is a function that changes v1alpha1.App.

func DiffWrapper

func DiffWrapper(w io.Writer, mutator Mutator) Mutator

DiffWrapper wraps a mutator and prints out the diff between the original object and the one it returns if there's no error.

type Predicate

type Predicate func(*v1alpha1.App) bool

Predicate is a boolean function for a v1alpha1.App.

type PushOption

type PushOption func(*pushConfig)

PushOption is a single option for configuring a pushConfig

func WithPushAppSpecInstances added in v0.2.0

func WithPushAppSpecInstances(val v1alpha1.AppSpecInstances) PushOption

WithPushAppSpecInstances creates an Option that sets Scaling information for the service

func WithPushArgs added in v0.2.0

func WithPushArgs(val []string) PushOption

WithPushArgs creates an Option that sets the app container arguments

func WithPushBuildpack

func WithPushBuildpack(val string) PushOption

WithPushBuildpack creates an Option that sets skip the detect buildpack step and use the given name

func WithPushCommand added in v0.2.0

func WithPushCommand(val []string) PushOption

WithPushCommand creates an Option that sets the app container entrypoint

func WithPushContainerImage

func WithPushContainerImage(val string) PushOption

WithPushContainerImage creates an Option that sets the container to deploy

func WithPushDefaultRouteDomain

func WithPushDefaultRouteDomain(val string) PushOption

WithPushDefaultRouteDomain creates an Option that sets Domain for a defaultroute. Only used if a route doesn't already exist

func WithPushDockerfilePath added in v0.2.0

func WithPushDockerfilePath(val string) PushOption

WithPushDockerfilePath creates an Option that sets the path to a Dockerfile to build

func WithPushEnvironmentVariables

func WithPushEnvironmentVariables(val map[string]string) PushOption

WithPushEnvironmentVariables creates an Option that sets set environment variables

func WithPushGrpc

func WithPushGrpc(val bool) PushOption

WithPushGrpc creates an Option that sets setup the ports for the container to allow gRPC to work

func WithPushHealthCheck

func WithPushHealthCheck(val *corev1.Probe) PushOption

WithPushHealthCheck creates an Option that sets the health check to use on the app

func WithPushNamespace

func WithPushNamespace(val string) PushOption

WithPushNamespace creates an Option that sets the Kubernetes namespace to use

func WithPushOutput

func WithPushOutput(val io.Writer) PushOption

WithPushOutput creates an Option that sets the io.Writer to write output such as build logs

func WithPushRandomRouteDomain

func WithPushRandomRouteDomain(val string) PushOption

WithPushRandomRouteDomain creates an Option that sets Domain for a random route. Only used if a route doesn't already exist

func WithPushResourceRequests added in v0.2.0

func WithPushResourceRequests(val corev1.ResourceList) PushOption

WithPushResourceRequests creates an Option that sets Resource requests for the container

func WithPushRoutes

func WithPushRoutes(val []v1alpha1.RouteSpecFields) PushOption

WithPushRoutes creates an Option that sets routes for the app

func WithPushServiceBindings

func WithPushServiceBindings(val []v1alpha1.AppSpecServiceBinding) PushOption

WithPushServiceBindings creates an Option that sets a list of Services to bind to the app

func WithPushSourceImage

func WithPushSourceImage(val string) PushOption

WithPushSourceImage creates an Option that sets the source code as a container image

func WithPushStack added in v0.2.0

func WithPushStack(val string) PushOption

WithPushStack creates an Option that sets the builder stack to use for buildpack based apps

type PushOptions

type PushOptions []PushOption

PushOptions is a configuration set defining a pushConfig

func PushOptionDefaults

func PushOptionDefaults() PushOptions

PushOptionDefaults gets the default values for Push.

func (PushOptions) AppSpecInstances added in v0.2.0

func (opts PushOptions) AppSpecInstances() v1alpha1.AppSpecInstances

AppSpecInstances returns the last set value for AppSpecInstances or the empty value if not set.

func (PushOptions) Args added in v0.2.0

func (opts PushOptions) Args() []string

Args returns the last set value for Args or the empty value if not set.

func (PushOptions) Buildpack

func (opts PushOptions) Buildpack() string

Buildpack returns the last set value for Buildpack or the empty value if not set.

func (PushOptions) Command added in v0.2.0

func (opts PushOptions) Command() []string

Command returns the last set value for Command or the empty value if not set.

func (PushOptions) ContainerImage

func (opts PushOptions) ContainerImage() string

ContainerImage returns the last set value for ContainerImage or the empty value if not set.

func (PushOptions) DefaultRouteDomain

func (opts PushOptions) DefaultRouteDomain() string

DefaultRouteDomain returns the last set value for DefaultRouteDomain or the empty value if not set.

func (PushOptions) DockerfilePath added in v0.2.0

func (opts PushOptions) DockerfilePath() string

DockerfilePath returns the last set value for DockerfilePath or the empty value if not set.

func (PushOptions) EnvironmentVariables

func (opts PushOptions) EnvironmentVariables() map[string]string

EnvironmentVariables returns the last set value for EnvironmentVariables or the empty value if not set.

func (PushOptions) Extend

func (opts PushOptions) Extend(other PushOptions) PushOptions

Extend creates a new PushOptions with the contents of other overriding the values set in this PushOptions.

func (PushOptions) Grpc

func (opts PushOptions) Grpc() bool

Grpc returns the last set value for Grpc or the empty value if not set.

func (PushOptions) HealthCheck

func (opts PushOptions) HealthCheck() *corev1.Probe

HealthCheck returns the last set value for HealthCheck or the empty value if not set.

func (PushOptions) Namespace

func (opts PushOptions) Namespace() string

Namespace returns the last set value for Namespace or the empty value if not set.

func (PushOptions) Output

func (opts PushOptions) Output() io.Writer

Output returns the last set value for Output or the empty value if not set.

func (PushOptions) RandomRouteDomain

func (opts PushOptions) RandomRouteDomain() string

RandomRouteDomain returns the last set value for RandomRouteDomain or the empty value if not set.

func (PushOptions) ResourceRequests added in v0.2.0

func (opts PushOptions) ResourceRequests() corev1.ResourceList

ResourceRequests returns the last set value for ResourceRequests or the empty value if not set.

func (PushOptions) Routes

func (opts PushOptions) Routes() []v1alpha1.RouteSpecFields

Routes returns the last set value for Routes or the empty value if not set.

func (PushOptions) ServiceBindings

func (opts PushOptions) ServiceBindings() []v1alpha1.AppSpecServiceBinding

ServiceBindings returns the last set value for ServiceBindings or the empty value if not set.

func (PushOptions) SourceImage

func (opts PushOptions) SourceImage() string

SourceImage returns the last set value for SourceImage or the empty value if not set.

func (PushOptions) Stack added in v0.2.0

func (opts PushOptions) Stack() string

Stack returns the last set value for Stack or the empty value if not set.

type Pusher

type Pusher interface {
	// Push deploys an application.
	Push(appName string, opts ...PushOption) error
}

Pusher deploys applications.

func NewPusher

func NewPusher(appsClient Client) Pusher

NewPusher creates a new Pusher.

type UpdateOption

type UpdateOption func(*updateConfig)

UpdateOption is a single option for configuring a updateConfig

type UpdateOptions

type UpdateOptions []UpdateOption

UpdateOptions is a configuration set defining a updateConfig

func UpdateOptionDefaults

func UpdateOptionDefaults() UpdateOptions

UpdateOptionDefaults gets the default values for Update.

func (UpdateOptions) Extend

func (opts UpdateOptions) Extend(other UpdateOptions) UpdateOptions

Extend creates a new UpdateOptions with the contents of other overriding the values set in this UpdateOptions.

Directories

Path Synopsis
Package fake is a generated GoMock package.
Package fake is a generated GoMock package.

Jump to

Keyboard shortcuts

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