apps

package
v3.0.0-...-c7e9b3a Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2020 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Overview

Package apis contains Kubernetes API groups.

Package apps contains apps API versions

Index

Constants

View Source
const (
	DefaultNamespace = "kubeflow"
	// TODO: find the latest tag dynamically
	DefaultVersion         = "master"
	KfConfigFile           = "app.yaml"
	KustomizationFile      = "kustomization.yaml"
	KustomizationParamFile = "params.env"
	DefaultCacheDir        = ".cache"
	KubeflowRepoName       = "kubeflow"
	ManifestsRepoName      = "manifests"
	KubeflowRepo           = "kubeflow"
	ManifestsRepo          = "manifests"
	DefaultConfigDir       = "bootstrap/config"
	DefaultZone            = "us-east1-d"
	DefaultGkeApiVer       = "v1beta1"
	DefaultAppLabel        = "app.kubernetes.io/name"
	DefaultAppVersion      = "app.kubernetes.io/version"
	DefaultAppType         = "kubeflow"
	KUBEFLOW_USERNAME      = "KUBEFLOW_USERNAME"
	KUBEFLOW_PASSWORD      = "KUBEFLOW_PASSWORD"
	DefaultSwaggerFile     = "bootstrap/k8sSpec/v1.11.7/api/openapi-spec/swagger.json"
	YamlSeparator          = "(?m)^---[ \t]*$"
	Dns1123LabelFmt        = "[a-z0-9]([-a-z0-9]*[a-z0-9])?"
	ProfileNameMaxLen      = 30
)
View Source
const (
	AWS              = "aws"
	GCP              = "gcp"
	MINIKUBE         = "minikube"
	EXISTING_ARRIKTO = "existing_arrikto"
)

Platforms

View Source
const (
	KSONNET   = "ksonnet"
	KUSTOMIZE = "kustomize"
)

PackageManagers

Variables

View Source
var AddToSchemes runtime.SchemeBuilder

AddToSchemes may be used to add all resources defined in the project to a Scheme

Functions

func AddToScheme

func AddToScheme(s *runtime.Scheme) error

AddToScheme adds all Resources to the Scheme

func Capture

func Capture() func() (string, error)

Capture replaces os.Stdout with a writer that buffers any data written to os.Stdout. Call the returned function to cleanup and get the data as a string. This is used in cases where the API we're calling writes to stdout eg ksonnet's show

func DownloadToCache

func DownloadToCache(appDir string, repo string, version string) (string, error)

DownloadToCache will download a version of kubeflow github repo or the manifests repo where version can be

  master
	 tag
	 pull/<ID>[/head]

It returns the local file path of where the repo was downloaded

func EmailToDefaultName

func EmailToDefaultName(email string) string

Remove unvalid characters to compile a valid name for default Profile. To prevent violation to the naming length restriction, ignore everything after `@`.

func GetApiExtClientset

func GetApiExtClientset(config *rest.Config) apiext.ApiextensionsV1beta1Interface

GetApiExtClientset returns a client that can query for CRDs

func GetClientset

func GetClientset(config *rest.Config) *clientset.Clientset

GetClientset returns a k8s clientset using .kube/config credentials

func GetConfig

func GetConfig() *rest.Config

GetConfig returns rest.Config using $HOME/.kube/config

func GetKubeConfig

func GetKubeConfig() *clientcmdapi.Config

GetKubeConfig returns a representation of $HOME/.kube/config

func GetServerVersion

func GetServerVersion(c *clientset.Clientset) string

GetServerVersion returns the verison of the k8 api server

func KubeConfigPath

func KubeConfigPath() string

TODO(#2586): Consolidate kubeconfig and API calls. KubeConfigPath returns the filepath to the k8 client config file

func QuoteItems

func QuoteItems(items []string) []string

QuoteItems will place quotes around the string arrays items

func RemoveItem

func RemoveItem(defaults []string, name string) []string

RemoveItem will remove a string item from the string array

Types

type CliOption

type CliOption string
const (
	EMAIL                 CliOption = "email"
	IPNAME                CliOption = "ipName"
	HOSTNAME              CliOption = "hostname"
	MOUNT_LOCAL           CliOption = "mount-local"
	SKIP_INIT_GCP_PROJECT CliOption = "skip-init-gcp-project"
	VERBOSE               CliOption = "verbose"
	NAMESPACE             CliOption = "namespace"
	VERSION               CliOption = "version"
	REPO                  CliOption = "repo"
	PROJECT               CliOption = "project"
	APPNAME               CliOption = "appname"
	DATA                  CliOption = "Data"
	ZONE                  CliOption = "zone"
	USE_BASIC_AUTH        CliOption = "use_basic_auth"
	USE_ISTIO             CliOption = "use_istio"
	DELETE_STORAGE        CliOption = "delete_storage"
	DISABLE_USAGE_REPORT  CliOption = "disable_usage_report"
	PACKAGE_MANAGER       CliOption = "package-manager"
	FILE                  CliOption = "file"
	FORCE_DELETION        CliOption = "force-deletion"
)

type KfApp

type KfApp interface {
	Apply(resources ResourceEnum) error
	Delete(resources ResourceEnum) error
	Generate(resources ResourceEnum) error
	Init(resources ResourceEnum) error
}

KfApp provides a common API for PackageManagers like ksonnet or kustomize They all implement the API below

func LoadKfApp

func LoadKfApp(name string, kfdef *kfdefs.KfDef) (KfApp, error)

LoadKfApp will load a shared library of the form <name>.so

type KfShow

type KfShow interface {
	Show(resources ResourceEnum) error
}

This is used in the ksonnet implementation for `ks show`

type Platform

type Platform interface {
	KfApp
}

Platform provides a common API for platforms like gcp or minikube They all implement the API below

type ResourceEnum

type ResourceEnum string
const (
	ALL      ResourceEnum = "all"
	K8S      ResourceEnum = "k8s"
	PLATFORM ResourceEnum = "platform"
)

type SupportedResourceType

type SupportedResourceType string
const (
	KFDEF     SupportedResourceType = "KfDef"
	KFUPGRADE SupportedResourceType = "KfUpgrade"
)

Directories

Path Synopsis
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
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
Package kfdef contains kfdef related types
Package kfdef contains kfdef related types
v1
Package v1 contains API Schema definitions for the kfdef v1 API group +k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:conversion-gen=github.com/kubeflow/kfctl/v3/pkg/apis/apps/kfdef +k8s:defaulter-gen=TypeMeta +groupName=kfdef.apps.kubeflow.org
Package v1 contains API Schema definitions for the kfdef v1 API group +k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:conversion-gen=github.com/kubeflow/kfctl/v3/pkg/apis/apps/kfdef +k8s:defaulter-gen=TypeMeta +groupName=kfdef.apps.kubeflow.org
v1alpha1
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/apis/apps/kfdef +k8s:defaulter-gen=TypeMeta +groupName=kfdef.apps.kubeflow.org
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/apis/apps/kfdef +k8s:defaulter-gen=TypeMeta +groupName=kfdef.apps.kubeflow.org
v1beta1
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/apis/apps/kfdef +k8s:defaulter-gen=TypeMeta +groupName=kfdef.apps.kubeflow.org
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/apis/apps/kfdef +k8s:defaulter-gen=TypeMeta +groupName=kfdef.apps.kubeflow.org
Package kfupgrade contains kfupgrade related types
Package kfupgrade contains kfupgrade related types
v1alpha1
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/apis/apps/kfupdate +k8s:defaulter-gen=TypeMeta +groupName=kfupdate.apps.kubeflow.org
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/apis/apps/kfupdate +k8s:defaulter-gen=TypeMeta +groupName=kfupdate.apps.kubeflow.org
aws
aws/v1alpha1
Package v1alpha1 contains API Schema definitions for the KfAwsPlugin v1alpha1.
Package v1alpha1 contains API Schema definitions for the KfAwsPlugin v1alpha1.
gcp
gcp/v1alpha1
Package v1alpha1 contains API Schema definitions for the KfGcpPlugin v1alpha1.
Package v1alpha1 contains API Schema definitions for the KfGcpPlugin v1alpha1.

Jump to

Keyboard shortcuts

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