apps

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: 21 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"
	DUMP                  CliOption = "dump"
)

type KfApp

type KfApp interface {
	Apply(resources ResourceEnum) error
	Delete(resources ResourceEnum) error
	Dump(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
imagemirror

Jump to

Keyboard shortcuts

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