Documentation ¶
Index ¶
- Constants
- func GetRepoName(project string) string
- func GetUpdatedPolicy(currentPolicy *cloudresourcemanager.Policy, iamConf *IamConf, ...) cloudresourcemanager.Policy
- func LoadConfig(path string, o interface{}) error
- func NewServer(appsDir string, registries []RegistryConfig) (*ksServer, error)
- func Run(opt *options.ServerOption) error
- type AppConfig
- type AppConfigFile
- type ApplyIamRequest
- type ApplyRequest
- type CreateRequest
- type DmConf
- type HealthzRequest
- type HealthzResponse
- type IamBinding
- type IamConf
- type InitProjectRequest
- type InsertSaKeyRequest
- type KsComponent
- type KsPackage
- type KsParameter
- type KsRegistry
- type KsService
- type LibrarySpec
- type RegistriesConfigFile
- type RegistryConfig
- type Resource
Constants ¶
const CACHED_REGISTRIES = "/opt/versioned_registries"
root dir of local cached VERSIONED REGISTRIES
const DefaultStorageAnnotation = "storageclass.beta.kubernetes.io/is-default-class"
DefaultStorageAnnotation is the Name of the default annotation used to indicate whether a storage class is the default.
const GcloudPath = "gcloud"
Assume gcloud is on the path.
const IAM_ADMIN_ROLE = "roles/resourcemanager.projectIamAdmin"
const JUPYTER_PROTOTYPE = "jupyterhub"
The name of the prototype for Jupyter.
const RecommendedConfigPathEnvVar = "KUBECONFIG"
RecommendedConfigPathEnvVar is a environment variable for path configuration
const RegistriesRoot = "/opt/registries"
Variables ¶
This section is empty.
Functions ¶
func GetRepoName ¶ added in v0.3.0
func GetUpdatedPolicy ¶ added in v0.3.0
func GetUpdatedPolicy(currentPolicy *cloudresourcemanager.Policy, iamConf *IamConf, req ApplyIamRequest) cloudresourcemanager.Policy
func LoadConfig ¶ added in v0.2.0
Load yaml config
func NewServer ¶ added in v0.3.0
func NewServer(appsDir string, registries []RegistryConfig) (*ksServer, error)
NewServer constructs a ksServer.
Types ¶
type AppConfig ¶ added in v0.2.0
type AppConfig struct { Registries []RegistryConfig Packages []KsPackage Components []KsComponent Parameters []KsParameter }
type AppConfigFile ¶ added in v0.3.0
type AppConfigFile struct { // App describes a ksonnet application. App AppConfig }
AppConfigFile corresponds to a YAML file specifying information about the app to create.
type ApplyIamRequest ¶ added in v0.3.0
type ApplyRequest ¶ added in v0.3.0
type ApplyRequest struct { // Name of the app to apply Name string // Environment is the environment to use. Environment string // Components is a list of the names of the components to apply. Components []string // target GKE cLuster info Cluster string Project string Zone string // Token is an authorization token to use to authorize to the K8s API Server. // Leave blank to use the pods service account. Token string Email string }
Request to apply an app.
type CreateRequest ¶ added in v0.3.0
type CreateRequest struct { // Name for the app. Name string // AppConfig is the config for the app. AppConfig AppConfig // Namespace for the app. Namespace string // Whether to try to autoconfigure the app. AutoConfigure bool // target GKE cLuster info Cluster string Project string ProjectNumber string Zone string // Access token, need to access target cluster in order for AutoConfigure Token string Apply bool Email string // temporary ClientId string ClientSecret string IpName string }
CreateRequest represents a request to create a ksonnet application.
type DmConf ¶ added in v0.3.0
type DmConf struct { Imports interface{} `json:"imports"` Resources []Resource `json:"resources"` }
type HealthzRequest ¶ added in v0.3.0
type HealthzRequest struct {
Msg string
}
type HealthzResponse ¶ added in v0.3.0
type HealthzResponse struct {
Reply string
}
type IamBinding ¶ added in v0.3.0
type IamConf ¶ added in v0.3.0
type IamConf struct {
IamBindings []IamBinding `json:"bindings"`
}
type InitProjectRequest ¶ added in v0.3.0
type InsertSaKeyRequest ¶ added in v0.3.0
type KsComponent ¶ added in v0.2.0
type KsParameter ¶ added in v0.2.0
type KsRegistry ¶ added in v0.2.0
type KsRegistry struct { ApiVersion string Kind string Libraries map[string]LibrarySpec }
KsRegistry corresponds to ksonnet.io/registry which is the registry.yaml file found in every registry.
type KsService ¶ added in v0.3.0
type KsService interface { // CreateApp creates a ksonnet application. CreateApp(context.Context, CreateRequest) error // Apply ksonnet app to target GKE cluster Apply(ctx context.Context, req ApplyRequest) error InsertSaKeys(context.Context, InsertSaKeyRequest) error BindRole(context.Context, string, string, string) error InsertDeployment(context.Context, CreateRequest) error GetDeploymentStatus(context.Context, CreateRequest) (string, error) ApplyIamPolicy(context.Context, ApplyIamRequest) error }
KsService defines an interface for working with ksonnet.
type LibrarySpec ¶ added in v0.2.0
type RegistriesConfigFile ¶ added in v0.3.0
type RegistriesConfigFile struct { // Registries provides information about known registries. Registries []RegistryConfig }
RegistriesConfigFile corresponds to a YAML file specifying information about known registries.
type RegistryConfig ¶ added in v0.2.0
RegistryConfig is used for two purposes:
- used during image build, to configure registries that should be baked into the bootstrapper docker image. (See: https://github.com/kubeflow/kubeflow/blob/master/bootstrap/image_registries.yaml)
- used during app create rpc call, specifies a registry to be added to an app. required info for registry: Name, Repo, Version, Path Additionally if any of required fields is blank we will try to map with one of the registries baked into the Docker image using the name.