Documentation ¶
Index ¶
- Constants
- func GetGcloudDefaultAccount() (string, error)
- func GetPlatform(kfdef *kfdefs.KfDef) (kftypes.Platform, error)
- func IsValid(kfDef kfdefs.KfDef) (bool, string)
- type Auth
- type BasicAuth
- type Gcp
- func (gcp *Gcp) AddNamedContext() error
- func (gcp *Gcp) Apply(resources kftypes.ResourceEnum) error
- func (gcp *Gcp) ConfigK8s() error
- func (gcp *Gcp) ConfigPodDefault() error
- func (gcp *Gcp) Delete(resources kftypes.ResourceEnum) error
- func (gcp *Gcp) Generate(resources kftypes.ResourceEnum) error
- func (gcp *Gcp) GetK8sConfig() (*rest.Config, *clientcmdapi.Config)
- func (gcp *Gcp) GetPluginSpec() (*GcpPluginSpec, error)
- func (gcp *Gcp) Init(resources kftypes.ResourceEnum) error
- func (gcp *Gcp) SetRunGetCredentials(v bool)
- func (gcp *Gcp) SetTokenSource(s oauth2.TokenSource) error
- type GcpPluginSpec
- type IAP
- type Setter
Constants ¶
const ( GCP_CONFIG = "gcp_config" CONFIG_FILE = "cluster-kubeflow.yaml" STORAGE_FILE = "storage-kubeflow.yaml" NETWORK_FILE = "network.yaml" GCFS_FILE = "gcfs.yaml" ADMIN_SECRET_NAME = "admin-gcp-sa" USER_SECRET_NAME = "user-gcp-sa" KUBEFLOW_OAUTH = "kubeflow-oauth" IMPORTS = "imports" PATH = "path" CLIENT_ID = "CLIENT_ID" CLIENT_SECRET = "CLIENT_SECRET" BASIC_AUTH_SECRET = "kubeflow-login" KUBECONFIG_FORMAT = "gke_{project}_{zone}_{cluster}" // Plugin parameter constants GcpPluginName = kftypes.GCP GcpAccessTokenName = "accessToken" BasicAuthPasswordSecretName = "password" )
TODO: golint complains that we should not use all capital var name.
Variables ¶
This section is empty.
Functions ¶
func GetGcloudDefaultAccount ¶
GetGcloudDefaultAccount try to get the default account.
func GetPlatform ¶
GetPlatform returns the gcp kfapp. It's called by coordinator.GetPlatform
Types ¶
type Gcp ¶
type Gcp struct {
// contains filtered or unexported fields
}
Gcp implements KfApp Interface It includes the KsApp along with additional Gcp types TODO(jlewi): Why doesn't Gcp store GcpArgs as opposed to duplicating the options?
func (*Gcp) AddNamedContext ¶
Add a conveniently named context to KUBECONFIG.
func (*Gcp) Apply ¶
func (gcp *Gcp) Apply(resources kftypes.ResourceEnum) error
Apply applies the gcp kfapp. Remind: Need to be thread-safe: this entry is share among kfctl and deploy app
func (*Gcp) ConfigPodDefault ¶
Configure PodDefault to add secret.
func (*Gcp) Generate ¶
func (gcp *Gcp) Generate(resources kftypes.ResourceEnum) error
Generate generates the gcp kfapp manifest. Remind: Need to be thread-safe: this entry is share among kfctl and deploy app
func (*Gcp) GetK8sConfig ¶
func (gcp *Gcp) GetK8sConfig() (*rest.Config, *clientcmdapi.Config)
TODO(jlewi): We should be able to get rid of this method because it was only used for ksonnet.
func (*Gcp) GetPluginSpec ¶
func (gcp *Gcp) GetPluginSpec() (*GcpPluginSpec, error)
GetPluginSpec gets the plugin spec.
func (*Gcp) Init ¶
func (gcp *Gcp) Init(resources kftypes.ResourceEnum) error
Init initializes a gcp kfapp
func (*Gcp) SetRunGetCredentials ¶
func (*Gcp) SetTokenSource ¶
func (gcp *Gcp) SetTokenSource(s oauth2.TokenSource) error
type GcpPluginSpec ¶
type GcpPluginSpec struct { Auth *Auth `json:"auth,omitempty"` // SAClientId if supplied grant this service account cluster admin access // TODO(jlewi): Might want to make it a list SAClientId string `json:"username,omitempty"` // CreatePipelinePersistentStorage indicates whether to create storage. // Use a pointer so we can distinguish unset values. CreatePipelinePersistentStorage *bool `json:"createPipelinePersistentStorage,omitempty"` }
GcpPlugin defines the extra data provided by the GCP Plugin in KfDef
func (*GcpPluginSpec) GetCreatePipelinePersistentStorage ¶
func (p *GcpPluginSpec) GetCreatePipelinePersistentStorage() bool
func (*GcpPluginSpec) IsValid ¶
func (s *GcpPluginSpec) IsValid() (bool, string)
IsValid returns true if the spec is a valid and complete spec. If false it will also return a string providing a message about why its invalid.