Documentation ¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the kfdef v1alpha1 API group +k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:conversion-gen=github.com/kubeflow/kfctl/v3/pkg/kfconfig +k8s:defaulter-gen=TypeMeta +groupName=kfconfig.apps.kubeflow.org
Index ¶
- Constants
- Variables
- func IsAppNotFound(e error) bool
- func IsConditionNotFound(e error) bool
- func IsPluginNotFound(e error) bool
- func IsSecretNotFound(e error) bool
- func Resource(resource string) schema.GroupResource
- type AppNotFound
- type Application
- type Cache
- type Condition
- type ConditionType
- type EnvSource
- type HashedSource
- type KfConfig
- func (c *KfConfig) AddApplicationOverlay(appName, overlayName string) error
- func (in *KfConfig) DeepCopy() *KfConfig
- func (in *KfConfig) DeepCopyInto(out *KfConfig)
- func (in *KfConfig) DeepCopyObject() runtime.Object
- func (c *KfConfig) DeleteApplication(appName string) error
- func (c *KfConfig) GetApplicationParameter(appName string, paramName string) (string, bool)
- func (c *KfConfig) GetCondition(condType ConditionType) (*Condition, error)
- func (c *KfConfig) GetPluginSpec(pluginKind PluginKindType, s interface{}) error
- func (c *KfConfig) GetRepoCache(repoName string) (Cache, bool)
- func (c *KfConfig) GetSecret(name string) (string, error)
- func (c *KfConfig) GetSecretSource(name string) (*SecretSource, error)
- func (c *KfConfig) IsPluginFailed(pluginKind PluginKindType) bool
- func (c *KfConfig) IsPluginFinished(pluginKind PluginKindType) bool
- func (c *KfConfig) RemoveApplicationOverlay(appName, overlayName string) error
- func (c *KfConfig) SetApplicationParameter(appName string, paramName string, value string) error
- func (c *KfConfig) SetCondition(condType ConditionType, status v1.ConditionStatus, reason string, ...)
- func (c *KfConfig) SetPluginFailed(pluginKind PluginKindType, msg string)
- func (c *KfConfig) SetPluginFinished(pluginKind PluginKindType, msg string)
- func (c *KfConfig) SetPluginSpec(pluginKind PluginKindType, spec interface{}) error
- func (c *KfConfig) SetSecret(newSecret Secret)
- func (c *KfConfig) SyncCache() error
- func (c *KfConfig) UsingStacks() bool
- type KfConfigSpec
- type KustomizeConfig
- type LiteralSource
- type NameValue
- type Plugin
- type PluginKindType
- type Repo
- type RepoRef
- type Secret
- type SecretNotFound
- type SecretRef
- type SecretSource
- type Status
Constants ¶
const ( DefaultCacheDir = ".cache" // KfAppsStackName is the name that should be assigned to the application corresponding to the kubeflow // application stack. KfAppsStackName = "kubeflow-apps" KustomizeDir = "kustomize" )
Variables ¶
var ( // SchemeGroupVersion is group version used to register these objects SchemeGroupVersion = schema.GroupVersion{Group: "kfconfig.apps.kubeflow.org", Version: "v1alpha1"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) // AddToScheme is required by pkg/kfdef/... AddToScheme = localSchemeBuilder.AddToScheme )
Functions ¶
func IsAppNotFound ¶
func IsConditionNotFound ¶
func IsPluginNotFound ¶
func IsSecretNotFound ¶
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource is required by pkg/kfdef/listers/...
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Cache.
func (*Cache) DeepCopyInto ¶
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Condition.
func (*Condition) DeepCopyInto ¶
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvSource.
func (*EnvSource) DeepCopyInto ¶
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"` }
Internal data structure to hold app related info. +k8s:openapi-gen=true
func (*KfConfig) AddApplicationOverlay ¶
func (*KfConfig) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KfConfig.
func (*KfConfig) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*KfConfig) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*KfConfig) DeleteApplication ¶
func (*KfConfig) GetApplicationParameter ¶
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 ¶
Returns the repo with the name and true if repo exists. nil and false otherwise.
func (*KfConfig) GetSecret ¶
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) RemoveApplicationOverlay ¶
func (*KfConfig) SetApplicationParameter ¶
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 ¶
SetSecret sets the specified secret; if a secret with the given name already exists it is overwritten.
func (*KfConfig) SyncCache ¶
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}
func (*KfConfig) UsingStacks ¶
UsingStacks returns true if the KfDef is using kustomize to collect all of the Kubeflow applications
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"` }
The spec of kKfConfig
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 ¶
func (*NameValue) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NameValue.
func (*NameValue) DeepCopyInto ¶
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Plugin.
func (*Plugin) DeepCopyInto ¶
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Repo.
func (*Repo) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RepoRef ¶
func (*RepoRef) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RepoRef.
func (*RepoRef) DeepCopyInto ¶
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Secret.
func (*Secret) DeepCopyInto ¶
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretRef.
func (*SecretRef) DeepCopyInto ¶
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Status.
func (*Status) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
Directories ¶
Path | Synopsis |
---|---|
Package v1alpha1 contains API Schema definitions for the KfAwsPlugin v1alpha1.
|
Package v1alpha1 contains API Schema definitions for the KfAwsPlugin v1alpha1. |
Package v1alpha1 contains API Schema definitions for the KfGcpPlugin v1alpha1.
|
Package v1alpha1 contains API Schema definitions for the KfGcpPlugin v1alpha1. |