v1alpha1

package
v0.29.1 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2024 License: Apache-2.0 Imports: 21 Imported by: 79

Documentation

Overview

+groupName=appcatalog.appscode.com

Index

Constants

View Source
const (
	ResourceKindApp = "AppBinding"
	ResourceApps    = "appbindings"
	ResourceApp     = "appbinding"
)

Variables

View Source
var (
	// TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api.
	// localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
	SchemeBuilder runtime.SchemeBuilder

	AddToScheme = localSchemeBuilder.AddToScheme
)
View Source
var SchemeGroupVersion = schema.GroupVersion{Group: appcatalog.GroupName, Version: "v1alpha1"}

Functions

func CanonicalMySQLDSN added in v0.29.1

func CanonicalMySQLDSN(dsn string) (string, error)

CanonicalMySQLDSN will convert a regular URL into MySQL DSN format

func Kind

func Kind(kind string) schema.GroupKind

Kind takes an unqualified kind and returns a Group qualified GroupKind

func ParseMySQLHost added in v0.29.1

func ParseMySQLHost(dsn string) (string, error)

func ParseMySQLHostname added in v0.29.1

func ParseMySQLHostname(dsn string) (string, error)

func ParseMySQLPort added in v0.29.1

func ParseMySQLPort(dsn string) (string, error)

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

Types

type AddKeyTransform

type AddKeyTransform struct {
	// The name of the key to add
	Key string `json:"key"`
	// The binary value (possibly non-string) to add to the Secret under the specified key. If both
	// value and stringValue are specified, then value is ignored and stringValue is stored.
	// +optional
	Value []byte `json:"value,omitempty"`
	// The string (non-binary) value to add to the Secret under the specified key.
	// +optional
	StringValue *string `json:"stringValue,omitempty"`
}

AddKeyTransform specifies that Service Catalog should add an additional entry to the Secret associated with the ServiceBinding. For example, given the following AddKeyTransform:

{"key": "CONNECTION_POOL_SIZE", "stringValue": "10"}

the following entry will appear in the Secret:

"CONNECTION_POOL_SIZE": "10"

Note that this transform should only be used to add non-sensitive (non-secret) values. To add sensitive information, the AddKeysFromTransform should be used instead.

func (*AddKeyTransform) DeepCopy

func (in *AddKeyTransform) DeepCopy() *AddKeyTransform

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

func (*AddKeyTransform) DeepCopyInto

func (in *AddKeyTransform) DeepCopyInto(out *AddKeyTransform)

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

type AddKeysFromTransform

type AddKeysFromTransform struct {
	// The reference to the Secret that should be merged into the credentials Secret.
	SecretRef *core.LocalObjectReference `json:"secretRef,omitempty"`
}

AddKeysFromTransform specifies that Service Catalog should merge an existing secret into the Secret associated with the ServiceBinding. For example, given the following AddKeysFromTransform:

{"secretRef": {"namespace": "foo", "name": "bar"}}

the entries of the Secret "bar" from Namespace "foo" will be merged into the credentials Secret.

func (*AddKeysFromTransform) DeepCopy

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

func (*AddKeysFromTransform) DeepCopyInto

func (in *AddKeysFromTransform) DeepCopyInto(out *AddKeysFromTransform)

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

type AppBinding

type AppBinding struct {
	metav1.TypeMeta   `json:",inline,omitempty"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	Spec              AppBindingSpec `json:"spec,omitempty"`
}

+kubebuilder:object:root=true +kubebuilder:resource:path=appbindings,singular=appbinding,categories={catalog,appscode,all} +kubebuilder:printcolumn:name="Type",type="string",JSONPath=".spec.type" +kubebuilder:printcolumn:name="Version",type="string",JSONPath=".spec.version" +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"

func (AppBinding) AppGroupResource

func (a AppBinding) AppGroupResource() (string, string)

func (AppBinding) CustomResourceDefinition

func (_ AppBinding) CustomResourceDefinition() *apiextensions.CustomResourceDefinition

func (*AppBinding) DeepCopy

func (in *AppBinding) DeepCopy() *AppBinding

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

func (*AppBinding) DeepCopyInto

func (in *AppBinding) DeepCopyInto(out *AppBinding)

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

func (*AppBinding) DeepCopyObject

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

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

func (AppBinding) Host

func (a AppBinding) Host() (string, error)

func (AppBinding) Hostname

func (a AppBinding) Hostname() (string, error)

func (AppBinding) MySQLDSN added in v0.29.1

func (a AppBinding) MySQLDSN() (string, error)

func (AppBinding) Port

func (a AppBinding) Port() (int32, error)

func (AppBinding) URL

func (a AppBinding) URL() (string, error)

func (AppBinding) URLTemplate

func (a AppBinding) URLTemplate() (string, error)

type AppBindingList

type AppBindingList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	// Items is a list of AppBinding CRD objects
	Items []AppBinding `json:"items,omitempty"`
}

AppBindingList is a list of Apps

func (*AppBindingList) DeepCopy

func (in *AppBindingList) DeepCopy() *AppBindingList

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

func (*AppBindingList) DeepCopyInto

func (in *AppBindingList) DeepCopyInto(out *AppBindingList)

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

func (*AppBindingList) DeepCopyObject

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

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

type AppBindingMeta

type AppBindingMeta interface {
	Name() string
	Type() AppType
}

type AppBindingSpec

type AppBindingSpec struct {
	// Type used to facilitate programmatic handling of application.
	// +optional
	Type AppType `json:"type,omitempty"`

	// Reference to underlying application
	// +optional
	AppRef *kmapi.TypedObjectReference `json:"appRef,omitempty"`

	// Version used to facilitate programmatic handling of application.
	// +optional
	Version string `json:"version,omitempty"`

	// ClientConfig defines how to communicate with the app.
	// Required
	ClientConfig ClientConfig `json:"clientConfig"`

	// Secret is the name of the secret to create in the AppBinding's
	// namespace that will hold the credentials associated with the AppBinding.
	Secret *core.LocalObjectReference `json:"secret,omitempty"`

	// List of transformations that should be applied to the credentials
	// associated with the ServiceBinding before they are inserted into the Secret.
	SecretTransforms []SecretTransform `json:"secretTransforms,omitempty"`

	// Parameters is a set of the parameters to be used to connect to the
	// app. The inline YAML/JSON payload to be translated into equivalent
	// JSON object.
	//
	// The Parameters field is NOT secret or secured in any way and should
	// NEVER be used to hold sensitive information. To set parameters that
	// contain secret information, you should ALWAYS store that information
	// in a Secret.
	//
	// +optional
	// +kubebuilder:validation:EmbeddedResource
	// +kubebuilder:pruning:PreserveUnknownFields
	Parameters *runtime.RawExtension `json:"parameters,omitempty"`

	// TLSSecret is the name of the secret that will hold
	// the client certificate and private key associated with the AppBinding.
	TLSSecret *core.LocalObjectReference `json:"tlsSecret,omitempty"`
}

AppBindingSpec is the spec for app

func (*AppBindingSpec) DeepCopy

func (in *AppBindingSpec) DeepCopy() *AppBindingSpec

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

func (*AppBindingSpec) DeepCopyInto

func (in *AppBindingSpec) DeepCopyInto(out *AppBindingSpec)

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

type AppReference

type AppReference struct {
	// `namespace` is the namespace of the app.
	// Required
	Namespace string `json:"namespace"`

	// `name` is the name of the app.
	// Required
	Name string `json:"name"`

	// Parameters is a set of the parameters to be used to override default
	// parameters. The inline YAML/JSON payload to be translated into equivalent
	// JSON object.
	//
	// The Parameters field is NOT secret or secured in any way and should
	// NEVER be used to hold sensitive information.
	//
	// +optional
	// +kubebuilder:validation:EmbeddedResource
	// +kubebuilder:pruning:PreserveUnknownFields
	Parameters *runtime.RawExtension `json:"parameters,omitempty"`
}

func (*AppReference) DeepCopy

func (in *AppReference) DeepCopy() *AppReference

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

func (*AppReference) DeepCopyInto

func (in *AppReference) DeepCopyInto(out *AppReference)

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

type AppType

type AppType string
const (
	// AppTypeOpaque is the default. A generic application.
	AppTypeOpaque AppType = "Opaque"
)

type ClientConfig

type ClientConfig struct {
	// `url` gives the location of the app, in standard URL form
	// (`[scheme://]host:port/path`). Exactly one of `url` or `service`
	// must be specified.
	//
	// The `host` should not refer to a service running in the cluster; use
	// the `service` field instead. The host might be resolved via external
	// DNS in some apiservers (e.g., `kube-apiserver` cannot resolve
	// in-cluster DNS as that would be a layering violation). `host` may
	// also be an IP address.
	//
	// A path is optional, and if present may be any string permissible in
	// a URL. You may use the path to pass an arbitrary string to the
	// app, for example, a cluster identifier.
	//
	// Attempting to use a user or basic auth e.g. "user:password@" is not
	// allowed. Fragments ("#...") and query parameters ("?...") are not
	// allowed, either.
	//
	// +optional
	URL *string `json:"url,omitempty"`

	// `service` is a reference to the service for this app. Either
	// `service` or `url` must be specified.
	//
	// If the webhook is running within the cluster, then you should use `service`.
	//
	// +optional
	Service *ServiceReference `json:"service,omitempty"`

	// InsecureSkipTLSVerify disables TLS certificate verification when communicating with this app.
	// This is strongly discouraged.  You should use the CABundle instead.
	InsecureSkipTLSVerify bool `json:"insecureSkipTLSVerify,omitempty"`

	// CABundle is a PEM encoded CA bundle which will be used to validate the serving certificate of this app.
	// +optional
	CABundle []byte `json:"caBundle,omitempty"`

	// ServerName is used to verify the hostname on the returned
	// certificates unless InsecureSkipVerify is given. It is also included
	// in the client's handshake to support virtual hosting unless it is
	// an IP address.
	ServerName string `json:"serverName,omitempty"`
}

ClientConfig contains the information to make a connection with an app

func (*ClientConfig) DeepCopy

func (in *ClientConfig) DeepCopy() *ClientConfig

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

func (*ClientConfig) DeepCopyInto

func (in *ClientConfig) DeepCopyInto(out *ClientConfig)

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

type ObjectReference

type ObjectReference struct {
	// Namespace of the referent.
	Namespace string `json:"namespace,omitempty"`
	// Name of the referent.
	Name string `json:"name,omitempty"`
}

ObjectReference contains enough information to let you locate the referenced object.

func (*ObjectReference) DeepCopy

func (in *ObjectReference) DeepCopy() *ObjectReference

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

func (*ObjectReference) DeepCopyInto

func (in *ObjectReference) DeepCopyInto(out *ObjectReference)

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

type Param

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

Param declares a value to use for the Param called Name.

func (*Param) DeepCopy

func (in *Param) DeepCopy() *Param

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

func (*Param) DeepCopyInto

func (in *Param) DeepCopyInto(out *Param)

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

type RemoveKeyTransform

type RemoveKeyTransform struct {
	// The key to remove from the Secret
	Key string `json:"key"`
}

RemoveKeyTransform specifies that one of the credentials keys returned from the broker should not be included in the credentials Secret.

func (*RemoveKeyTransform) DeepCopy

func (in *RemoveKeyTransform) DeepCopy() *RemoveKeyTransform

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

func (*RemoveKeyTransform) DeepCopyInto

func (in *RemoveKeyTransform) DeepCopyInto(out *RemoveKeyTransform)

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

type RenameKeyTransform

type RenameKeyTransform struct {
	// The name of the key to rename
	From string `json:"from"`
	// The new name for the key
	To string `json:"to"`
}

RenameKeyTransform specifies that one of the credentials keys returned from the broker should be renamed and stored under a different key in the Secret. For example, given the following credentials entry:

"USERNAME": "johndoe"

and the following RenameKeyTransform:

{"from": "USERNAME", "to": "DB_USER"}

the following entry will appear in the Secret:

"DB_USER": "johndoe"

func (*RenameKeyTransform) DeepCopy

func (in *RenameKeyTransform) DeepCopy() *RenameKeyTransform

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

func (*RenameKeyTransform) DeepCopyInto

func (in *RenameKeyTransform) DeepCopyInto(out *RenameKeyTransform)

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

type SecretTransform

type SecretTransform struct {
	// RenameKey represents a transform that renames a credentials Secret entry's key
	RenameKey *RenameKeyTransform `json:"renameKey,omitempty"`
	// AddKey represents a transform that adds an additional key to the credentials Secret
	AddKey *AddKeyTransform `json:"addKey,omitempty"`
	// AddKeysFrom represents a transform that merges all the entries of an existing Secret
	// into the credentials Secret
	AddKeysFrom *AddKeysFromTransform `json:"addKeysFrom,omitempty"`
	// RemoveKey represents a transform that removes a credentials Secret entry
	RemoveKey *RemoveKeyTransform `json:"removeKey,omitempty"`
}

SecretTransform is a single transformation that is applied to the credentials returned from the broker before they are inserted into the Secret associated with the ServiceBinding. Because different brokers providing the same type of service may each return a different credentials structure, users can specify the transformations that should be applied to the Secret to adapt its entries to whatever the service consumer expects. For example, the credentials returned by the broker may include the key "USERNAME", but the consumer requires the username to be exposed under the key "DB_USER" instead. To have the Service Catalog transform the Secret, the following SecretTransform must be specified in ServiceBinding.spec.secretTransform: - {"renameKey": {"from": "USERNAME", "to": "DB_USER"}} Only one of the SecretTransform's members may be specified.

func (*SecretTransform) DeepCopy

func (in *SecretTransform) DeepCopy() *SecretTransform

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

func (*SecretTransform) DeepCopyInto

func (in *SecretTransform) DeepCopyInto(out *SecretTransform)

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

type ServiceReference

type ServiceReference struct {
	// Specifies which scheme to use, for example: http, https
	// If specified, then it will applied as prefix in this format: scheme://
	// If not specified, then nothing will be prefixed
	Scheme string `json:"scheme"`

	// `namespace` is the namespace of the service.
	// +optional
	Namespace string `json:"namespace,omitempty"`

	// `name` is the name of the service.
	// Required
	Name string `json:"name"`

	// The port that will be exposed by this app.
	Port int32 `json:"port"`

	// `path` is an optional URL path which will be sent in any request to
	// this service.
	// +optional
	Path string `json:"path,omitempty"`

	// `query` is optional encoded query string, without '?' which will be
	// sent in any request to this service.
	// +optional
	Query string `json:"query,omitempty"`
}

ServiceReference holds a reference to Service.legacy.k8s.io

func (*ServiceReference) DeepCopy

func (in *ServiceReference) DeepCopy() *ServiceReference

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

func (*ServiceReference) DeepCopyInto

func (in *ServiceReference) DeepCopyInto(out *ServiceReference)

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

type StashAddon

type StashAddon struct {
	metav1.TypeMeta `json:",inline,omitempty"`
	Stash           StashAddonSpec `json:"stash,omitempty"`
}

func (*StashAddon) DeepCopy

func (in *StashAddon) DeepCopy() *StashAddon

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

func (*StashAddon) DeepCopyInto

func (in *StashAddon) DeepCopyInto(out *StashAddon)

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

func (*StashAddon) DeepCopyObject

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

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

type StashAddonSpec

type StashAddonSpec struct {
	Addon StashTaskSpec `json:"addon,omitempty"`
}

StashAddonSpec is the spec for app

func (*StashAddonSpec) DeepCopy

func (in *StashAddonSpec) DeepCopy() *StashAddonSpec

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

func (*StashAddonSpec) DeepCopyInto

func (in *StashAddonSpec) DeepCopyInto(out *StashAddonSpec)

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

type StashTaskSpec

type StashTaskSpec struct {
	// Backup task definition
	BackupTask TaskRef `json:"backupTask"`

	// Restore task definition
	RestoreTask TaskRef `json:"restoreTask"`
}

StashTaskSpec is the spec for app

func (*StashTaskSpec) DeepCopy

func (in *StashTaskSpec) DeepCopy() *StashTaskSpec

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

func (*StashTaskSpec) DeepCopyInto

func (in *StashTaskSpec) DeepCopyInto(out *StashTaskSpec)

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

type TaskRef

type TaskRef struct {
	Name string `json:"name"`
	// Params specifies a list of parameter to pass to the Task. Stash will use this parameters to resolve the task.
	// +optional
	Params []Param `json:"params,omitempty"`
}

func (*TaskRef) DeepCopy

func (in *TaskRef) DeepCopy() *TaskRef

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

func (*TaskRef) DeepCopyInto

func (in *TaskRef) DeepCopyInto(out *TaskRef)

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

Jump to

Keyboard shortcuts

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