v1alpha1

package
v1.11.0 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the kfconfig.apps.kubeflow.org v1alpha1 API group +kubebuilder:object:generate=true +groupName=kfconfig.apps.kubeflow.org //+kubebuilder:storageversion

Index

Constants

View Source
const (
	DefaultCacheDir = ".cache"
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "kfconfig.apps.kubeflow.org", Version: "v1alpha1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

func IsAppNotFound

func IsAppNotFound(e error) bool

func IsConditionNotFound

func IsConditionNotFound(e error) bool

func IsPluginNotFound

func IsPluginNotFound(e error) bool

func IsSecretNotFound

func IsSecretNotFound(e error) bool

Types

type AppNotFound

type AppNotFound struct {
	Name string
}

func (*AppNotFound) DeepCopy

func (in *AppNotFound) DeepCopy() *AppNotFound

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

func (*AppNotFound) DeepCopyInto

func (in *AppNotFound) DeepCopyInto(out *AppNotFound)

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

func (*AppNotFound) Error

func (e *AppNotFound) Error() string

type Application

type Application struct {
	Name            string           `json:"name,omitempty"`
	KustomizeConfig *KustomizeConfig `json:"kustomizeConfig,omitempty"`
}

Application defines an application to install

func (*Application) DeepCopy

func (in *Application) DeepCopy() *Application

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

func (*Application) DeepCopyInto

func (in *Application) DeepCopyInto(out *Application)

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

type Cache

type Cache struct {
	Name      string `json:"name,omitempty"`
	LocalPath string `json:"localPath,omitempty"`
}

func (*Cache) DeepCopy

func (in *Cache) DeepCopy() *Cache

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

func (*Cache) DeepCopyInto

func (in *Cache) DeepCopyInto(out *Cache)

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

type Condition

type Condition struct {
	// Type of deployment condition.
	Type ConditionType `json:"type,omitempty"`
	// Status of the condition, one of True, False, Unknown.
	Status v1.ConditionStatus `json:"status,omitempty"`
	// The last time this condition was updated.
	LastUpdateTime metav1.Time `json:"lastUpdateTime,omitempty"`
	// Last time the condition transitioned from one status to another.
	LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"`
	// The reason for the condition's last transition.
	Reason string `json:"reason,omitempty"`
	// A human readable message indicating details about the transition.
	Message string `json:"message,omitempty"`
}

func (*Condition) DeepCopy

func (in *Condition) DeepCopy() *Condition

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

func (*Condition) DeepCopyInto

func (in *Condition) DeepCopyInto(out *Condition)

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

type ConditionType

type ConditionType string
const (
	// Available means Kubeflow is serving.
	Available ConditionType = "Available"

	// Degraded means one or more Kubeflow services are not healthy.
	Degraded ConditionType = "Degraded"

	// Pending means Kubeflow services is being updated.
	Pending ConditionType = "Pending"
)

func GetPluginFailedCondition

func GetPluginFailedCondition(pluginKind PluginKindType) ConditionType

func GetPluginSucceededCondition

func GetPluginSucceededCondition(pluginKind PluginKindType) ConditionType

Define plugin related conditions to be the format: - conditions for successful plugins: ${PluginKind}Succeeded - conditions for failed plugins: ${PluginKind}Failed

type EnvSource

type EnvSource struct {
	Name string `json:"name,omitempty"`
}

func (*EnvSource) DeepCopy

func (in *EnvSource) DeepCopy() *EnvSource

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

func (*EnvSource) DeepCopyInto

func (in *EnvSource) DeepCopyInto(out *EnvSource)

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

type HashedSource

type HashedSource struct {
	HashedValue string `json:"value,omitempty"`
}

func (*HashedSource) DeepCopy

func (in *HashedSource) DeepCopy() *HashedSource

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

func (*HashedSource) DeepCopyInto

func (in *HashedSource) DeepCopyInto(out *HashedSource)

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

type KfConfig

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

	Spec   KfConfigSpec `json:"spec,omitempty"`
	Status Status       `json:"status,omitempty"`
}

KfConfig is the Schema for the kfconfigs API

func (*KfConfig) DeepCopy

func (in *KfConfig) DeepCopy() *KfConfig

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

func (*KfConfig) DeepCopyInto

func (in *KfConfig) DeepCopyInto(out *KfConfig)

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

func (*KfConfig) DeepCopyObject

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

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

func (*KfConfig) GetApplicationParameter

func (c *KfConfig) GetApplicationParameter(appName string, paramName string) (string, bool)

GetApplicationParameter gets the desired application parameter.

func (*KfConfig) GetCondition

func (c *KfConfig) GetCondition(condType ConditionType) (*Condition, error)

Gets condition from KfConfig.

func (*KfConfig) GetPluginSpec

func (c *KfConfig) GetPluginSpec(pluginKind PluginKindType, s interface{}) error

func (*KfConfig) GetRepoCache

func (c *KfConfig) GetRepoCache(repoName string) (Cache, bool)

Returns the repo with the name and true if repo exists. nil and false otherwise.

func (*KfConfig) GetSecret

func (c *KfConfig) GetSecret(name string) (string, error)

GetSecret returns the specified secret or an error if the secret isn't specified.

func (*KfConfig) GetSecretSource

func (c *KfConfig) GetSecretSource(name string) (*SecretSource, error)

GetSecretSource returns the SecretSource of the specified name or an error if the secret isn't specified.

func (*KfConfig) IsPluginFailed

func (c *KfConfig) IsPluginFailed(pluginKind PluginKindType) bool

func (*KfConfig) IsPluginFinished

func (c *KfConfig) IsPluginFinished(pluginKind PluginKindType) bool

func (*KfConfig) SetApplicationParameter

func (c *KfConfig) SetApplicationParameter(appName string, paramName string, value string) error

SetApplicationParameter sets the desired application parameter.

func (*KfConfig) SetCondition

func (c *KfConfig) SetCondition(condType ConditionType,
	status v1.ConditionStatus,
	reason string,
	message string)

Sets condition and status to KfConfig.

func (*KfConfig) SetPluginFailed

func (c *KfConfig) SetPluginFailed(pluginKind PluginKindType, msg string)

func (*KfConfig) SetPluginFinished

func (c *KfConfig) SetPluginFinished(pluginKind PluginKindType, msg string)

func (*KfConfig) SetPluginSpec

func (c *KfConfig) SetPluginSpec(pluginKind PluginKindType, spec interface{}) error

SetPluginSpec sets the requested parameter: add the plugin if it doesn't already exist, or replace existing plugin.

func (*KfConfig) SetSecret

func (c *KfConfig) SetSecret(newSecret Secret)

SetSecret sets the specified secret; if a secret with the given name already exists it is overwritten.

func (*KfConfig) SyncCache

func (c *KfConfig) SyncCache() error

SyncCache will synchronize the local cache of any repositories. On success the status is updated with pointers to the cache.

TODO(jlewi): I'm not sure this handles head references correctly. e.g. suppose we have a URI like https://github.com/kubeflow/manifests/tarball/pull/189/head?archive=tar.gz This gets unpacked to: kubeflow-manifests-e2c1bcb where e2c1bcb is the commit. I don't think the code is currently setting the local directory for the cache correctly in that case.

Using tarball vs. archive in github links affects the download path e.g. https://github.com/kubeflow/manifests/tarball/master?archive=tar.gz

unpacks to  kubeflow-manifests-${COMMIT}

https://github.com/kubeflow/manifests/archive/master.tar.gz

unpacks to manifests-master

Always use archive format so that the path is predetermined.

Instructions: https://github.com/hashicorp/go-getter#protocol-specific-options

What is the correct syntax for downloading pull requests? The following doesn't seem to work https://github.com/kubeflow/manifests/archive/master.tar.gz?ref=pull/188

  • Appears to download master

This appears to work https://github.com/kubeflow/manifests/tarball/pull/188/head?archive=tar.gz But unpacks it into kubeflow-manifests-${COMMIT}

type KfConfigList

type KfConfigList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []KfConfig `json:"items"`
}

KfConfigList contains a list of KfConfig

func (*KfConfigList) DeepCopy

func (in *KfConfigList) DeepCopy() *KfConfigList

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

func (*KfConfigList) DeepCopyInto

func (in *KfConfigList) DeepCopyInto(out *KfConfigList)

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

func (*KfConfigList) DeepCopyObject

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

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

type KfConfigSpec

type KfConfigSpec struct {
	// Shared fields among all components. should limit this list.
	// TODO(gabrielwen): Deprecate AppDir and move it to cache in Status.
	AppDir string `json:"appDir,omitempty"`
	// The filename of the config, e.g. app.yaml.
	// Base name only, as the directory is AppDir above.
	ConfigFileName string `json:"configFileName,omitempty"`

	Version string `json:"version,omitempty"`

	// TODO(gabrielwen): Can we infer this from Applications?
	UseBasicAuth bool `json:"useBasicAuth,omitempty"`

	Platform string `json:"platform,omitempty"`

	// TODO(gabrielwen): Deprecate these fields as they only makes sense to GCP.
	Project         string `json:"project,omitempty"`
	Email           string `json:"email,omitempty"`
	IpName          string `json:"ipName,omitempty"`
	Hostname        string `json:"hostname,omitempty"`
	SkipInitProject bool   `json:"skipInitProject,omitempty"`
	Zone            string `json:"zone,omitempty"`

	DeleteStorage bool `json:"deleteStorage,omitempty"`

	Applications []Application `json:"applications,omitempty"`
	Plugins      []Plugin      `json:"plugins,omitempty"`
	Secrets      []Secret      `json:"secrets,omitempty"`
	Repos        []Repo        `json:"repos,omitempty"`
}

KfConfigSpec defines the desired state of KfConfig

func (*KfConfigSpec) DeepCopy

func (in *KfConfigSpec) DeepCopy() *KfConfigSpec

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

func (*KfConfigSpec) DeepCopyInto

func (in *KfConfigSpec) DeepCopyInto(out *KfConfigSpec)

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

type KustomizeConfig

type KustomizeConfig struct {
	RepoRef    *RepoRef    `json:"repoRef,omitempty"`
	Overlays   []string    `json:"overlays,omitempty"`
	Parameters []NameValue `json:"parameters,omitempty"`
}

func (*KustomizeConfig) DeepCopy

func (in *KustomizeConfig) DeepCopy() *KustomizeConfig

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

func (*KustomizeConfig) DeepCopyInto

func (in *KustomizeConfig) DeepCopyInto(out *KustomizeConfig)

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

type LiteralSource

type LiteralSource struct {
	Value string `json:"value,omitempty"`
}

func (*LiteralSource) DeepCopy

func (in *LiteralSource) DeepCopy() *LiteralSource

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

func (*LiteralSource) DeepCopyInto

func (in *LiteralSource) DeepCopyInto(out *LiteralSource)

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

type NameValue

type NameValue struct {
	Name  string `json:"name,omitempty"`
	Value string `json:"value,omitempty"`
}

func (*NameValue) DeepCopy

func (in *NameValue) DeepCopy() *NameValue

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

func (*NameValue) DeepCopyInto

func (in *NameValue) DeepCopyInto(out *NameValue)

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

type Plugin

type Plugin struct {
	Name      string                `json:"name,omitempty"`
	Namespace string                `json:"namespace,omitempty"`
	Kind      PluginKindType        `json:"kind,omitempty"`
	Spec      *runtime.RawExtension `json:"spec,omitempty"`
}

func (*Plugin) DeepCopy

func (in *Plugin) DeepCopy() *Plugin

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

func (*Plugin) DeepCopyInto

func (in *Plugin) DeepCopyInto(out *Plugin)

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

type PluginKindType

type PluginKindType string
const (
	AWS_PLUGIN_KIND              PluginKindType = "KfAwsPlugin"
	GCP_PLUGIN_KIND              PluginKindType = "KfGcpPlugin"
	MINIKUBE_PLUGIN_KIND         PluginKindType = "KfMinikubePlugin"
	EXISTING_ARRIKTO_PLUGIN_KIND PluginKindType = "KfExistingArriktoPlugin"
)

Plugin kind used starting from v1beta1

type Repo

type Repo struct {
	// Name is a name to identify the repository.
	Name string `json:"name,omitempty"`
	// URI where repository can be obtained.
	// Can use any URI understood by go-getter:
	// https://github.com/hashicorp/go-getter/blob/master/README.md#installation-and-usage
	URI string `json:"uri,omitempty"`
}

Repo provides information about a repository providing config (e.g. kustomize packages, Deployment manager configs, etc...)

func (*Repo) DeepCopy

func (in *Repo) DeepCopy() *Repo

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

func (*Repo) DeepCopyInto

func (in *Repo) DeepCopyInto(out *Repo)

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

type RepoRef

type RepoRef struct {
	Name string `json:"name,omitempty"`
	Path string `json:"path,omitempty"`
}

func (*RepoRef) DeepCopy

func (in *RepoRef) DeepCopy() *RepoRef

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

func (*RepoRef) DeepCopyInto

func (in *RepoRef) DeepCopyInto(out *RepoRef)

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

type Secret

type Secret struct {
	Name         string        `json:"name,omitempty"`
	SecretSource *SecretSource `json:"secretSource,omitempty"`
}

Secret provides information about secrets needed to configure Kubeflow. Secrets can be provided via references.

func (*Secret) DeepCopy

func (in *Secret) DeepCopy() *Secret

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

func (*Secret) DeepCopyInto

func (in *Secret) DeepCopyInto(out *Secret)

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

type SecretNotFound

type SecretNotFound struct {
	Name string
}

func NewSecretNotFound

func NewSecretNotFound(n string) *SecretNotFound

func (*SecretNotFound) DeepCopy

func (in *SecretNotFound) DeepCopy() *SecretNotFound

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

func (*SecretNotFound) DeepCopyInto

func (in *SecretNotFound) DeepCopyInto(out *SecretNotFound)

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

func (*SecretNotFound) Error

func (e *SecretNotFound) Error() string

type SecretRef

type SecretRef struct {
	// Name of the secret
	Name string `json:"name,omitempty"`
}

SecretRef is a reference to a secret

func (*SecretRef) DeepCopy

func (in *SecretRef) DeepCopy() *SecretRef

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

func (*SecretRef) DeepCopyInto

func (in *SecretRef) DeepCopyInto(out *SecretRef)

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

type SecretSource

type SecretSource struct {
	LiteralSource *LiteralSource `json:"literalSource,omitempty"`
	HashedSource  *HashedSource  `json:"hashedSource,omitempty"`
	EnvSource     *EnvSource     `json:"envSource,omitempty"`
}

func (*SecretSource) DeepCopy

func (in *SecretSource) DeepCopy() *SecretSource

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

func (*SecretSource) DeepCopyInto

func (in *SecretSource) DeepCopyInto(out *SecretSource)

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

type Status

type Status struct {
	Conditions []Condition `json:"conditions,omitempty"`
	Caches     []Cache     `json:"caches,omitempty"`
}

func (*Status) DeepCopy

func (in *Status) DeepCopy() *Status

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

func (*Status) DeepCopyInto

func (in *Status) DeepCopyInto(out *Status)

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