Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KubeConfig ¶
type KubeConfig struct { // KubeConfigContent stores the kubeconfig file of a K8s cluster KubeConfigContent string `json:"kubeconfig_content"` // IsInCluster indicates this config can be used for in cluster actions, meaning the KubeConfig content can be empty IsInCluster bool `json:"is_in_cluster"` // NamespacesList stores namespaces the user in KubeConfigContent can access NamespacesList []string `json:"namespaces_list"` }
KubeConfig contains necessary information needed to work with a kubernetes cluster
func (*KubeConfig) APIHost ¶
func (c *KubeConfig) APIHost() (string, error)
APIHost returns the address for the API server connection
func (*KubeConfig) SHA2565 ¶
func (c *KubeConfig) SHA2565() string
SHA2565 hashes the kubeconfig content and returns the hash string
func (*KubeConfig) Scan ¶
func (c *KubeConfig) Scan(v interface{}) error
func (*KubeConfig) Validate ¶
func (c *KubeConfig) Validate() error
Validate checks if the config can be used to connect to a K8s cluster and if the user has enough privilege
type KubeRegistryConfig ¶
type KubeRegistryConfig struct { UseRegistry bool `json:"use_registry" form:"use_registry" yaml:"useRegistry"` Registry string `json:"registry" form:"registry" yaml:"registry"` UseRegistrySecret bool `json:"use_registry_secret" form:"use_registry_secret" yaml:"useRegistrySecret"` RegistrySecretConfig KubeRegistrySecretConfig `json:"registry_secret_config" yaml:"registrySecretConfig"` }
KubeRegistryConfig contains registry configurations that can be used in K8s clusters
func (*KubeRegistryConfig) Scan ¶
func (c *KubeRegistryConfig) Scan(v interface{}) error
type KubeRegistrySecretConfig ¶
type KubeRegistrySecretConfig struct { ServerURL string `json:"server_url" yaml:"serverURL"` Username string `json:"username" yaml:"username"` Password string `json:"password" yaml:"password"` }
KubeRegistrySecretConfig is the secret configuration that can be used to generate K8s imagePullSecret
func (KubeRegistrySecretConfig) BuildKubeSecret ¶
func (c KubeRegistrySecretConfig) BuildKubeSecret(name, namespace string) (*corev1.Secret, error)
BuildKubeSecret create a K8s secret containing the `.dockerconfigjson` for authenticating with remote registry
func (KubeRegistrySecretConfig) BuildSecretB64String ¶
func (c KubeRegistrySecretConfig) BuildSecretB64String() (string, error)
BuildSecretB64String generates the authentication string
type ShardDescriptorConfig ¶
type ShardDescriptorConfig struct { SampleShape []string `json:"sample_shape"` TargetShape []string `json:"target_shape"` EnvoyConfigYaml string `json:"envoy_config_yaml"` PythonFiles map[string]string `json:"python_files"` }
ShardDescriptorConfig contains configurations for OpenFL shards
func (*ShardDescriptorConfig) Scan ¶
func (c *ShardDescriptorConfig) Scan(v interface{}) error