Documentation ¶
Index ¶
- Constants
- func GetGcloudDefaultAccount() (string, error)
- func GetGcloudDefaultProject() (string, error)
- func GetGcloudDefaultZone() (string, error)
- func GetPlatform(kfdef *kfconfig.KfConfig) (kftypesv3.Platform, error)
- type Gcp
- func (gcp *Gcp) AddNamedContext() error
- func (gcp *Gcp) Apply(resources kftypesv3.ResourceEnum) error
- func (gcp *Gcp) ConfigK8s() error
- func (gcp *Gcp) ConfigPodDefault() error
- func (gcp *Gcp) Delete(resources kftypesv3.ResourceEnum) error
- func (gcp *Gcp) Dump(resources kftypesv3.ResourceEnum) error
- func (gcp *Gcp) Generate(resources kftypesv3.ResourceEnum) error
- func (gcp *Gcp) GetK8sConfig() (*rest.Config, *clientcmdapi.Config)
- func (gcp *Gcp) GetPluginSpec() (*gcpplugin.GcpPluginSpec, error)
- func (gcp *Gcp) Init(resources kftypesv3.ResourceEnum) error
- func (gcp *Gcp) SetRunGetCredentials(v bool)
- func (gcp *Gcp) SetTokenSource(s oauth2.TokenSource) error
- func (gcp *Gcp) SetupWorkloadIdentityPermission() error
- 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}" // The default path in kubeflow/kubeflow to the deployment manager configs. // TODO(jlewi): This is only provided for legacy reasons. In 0.7 the path should be set explicitly // in the KfDef spec. DEFAULT_DM_PATH = "deployment/gke/deployment_manager_configs" // Plugin parameter constants GcpPluginName = "KfGcpPlugin" GcpAccessTokenName = "accessToken" BasicAuthPasswordSecretName = "password" // The PodDefault in default namespace PodDefaultName = "add-gcp-secret" DefaultIstioNamespace = "istio-system" )
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 GetGcloudDefaultProject ¶
GetGcloudDefaultProject try to get the default project.
func GetGcloudDefaultZone ¶
GetGcloudDefaultZone try to get the default zone.
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 kftypesv3.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 kftypesv3.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() (*gcpplugin.GcpPluginSpec, error)
GetPluginSpec gets the plugin spec.
func (*Gcp) Init ¶
func (gcp *Gcp) Init(resources kftypesv3.ResourceEnum) error
Init initializes a gcp kfapp
func (*Gcp) SetRunGetCredentials ¶
func (*Gcp) SetTokenSource ¶
func (gcp *Gcp) SetTokenSource(s oauth2.TokenSource) error
func (*Gcp) SetupWorkloadIdentityPermission ¶
SetupWorkloadIdentityPermission bind gcp admin service account to owner of gcp "user" service account, so controller can edit WorkloadIdentity