apps

package
v0.0.0-...-9ad3809 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2019 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Overview

Package apps contains apps API versions

Index

Constants

View Source
const (
	DefaultNamespace = "kubeflow"
	// TODO: find the latest tag dynamically
	DefaultVersion         = "v0.6.1"
	KfConfigFile           = "app.yaml"
	KustomizationFile      = "kustomization.yaml"
	KustomizationParamFile = "params.env"
	DefaultCacheDir        = ".cache"
	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"
)
View Source
const (
	AWS      = "aws"
	GCP      = "gcp"
	MINIKUBE = "minikube"
)

Platforms

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

PackageManagers

Variables

This section is empty.

Functions

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 LoadKfApp

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

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

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

type KfShow

type KfShow interface {
	Show(resources kfapps.ResourceEnum, options map[string]interface{}) error
}

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

Directories

Path Synopsis
Package kfdef contains kfdef related types
Package kfdef contains kfdef 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/kubeflow/bootstrap/v2/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/kubeflow/bootstrap/v2/pkg/apis/apps/kfdef +k8s:defaulter-gen=TypeMeta +groupName=kfdef.apps.kubeflow.org

Jump to

Keyboard shortcuts

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