Documentation ¶
Index ¶
- type Shard
- func (shard *Shard) CreateConfigMap(mla *v1.MachineLearningAlgorithm, configMap *corev1.ConfigMap, ...) (*corev1.ConfigMap, error)
- func (shard *Shard) CreateMachineLearningAlgorithm(mlaName string, mlaNamespace string, mlaSpec v1.MachineLearningAlgorithmSpec, ...) (*v1.MachineLearningAlgorithm, error)
- func (shard *Shard) CreateSecret(mla *v1.MachineLearningAlgorithm, secret *corev1.Secret, fieldManager string) (*corev1.Secret, error)
- func (shard *Shard) DeleteMachineLearningAlgorithm(mla *v1.MachineLearningAlgorithm) error
- func (shard *Shard) DereferenceConfigMap(configMap *corev1.ConfigMap, mla *v1.MachineLearningAlgorithm, ...) error
- func (shard *Shard) DereferenceSecret(secret *corev1.Secret, mla *v1.MachineLearningAlgorithm, fieldManager string) error
- func (shard *Shard) GetReferenceLabels() map[string]string
- func (shard *Shard) UpdateConfigMap(configMap *corev1.ConfigMap, newData map[string]string, ...) (*corev1.ConfigMap, error)
- func (shard *Shard) UpdateMachineLearningAlgorithm(mla *v1.MachineLearningAlgorithm, mlaSpec v1.MachineLearningAlgorithmSpec, ...) (*v1.MachineLearningAlgorithm, error)
- func (shard *Shard) UpdateSecret(secret *corev1.Secret, newData map[string][]byte, ...) (*corev1.Secret, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Shard ¶
type Shard struct { OwnerName string Name string // SecretLister is a Secret lister in this Shard SecretLister corelisters.SecretLister SecretsSynced cache.InformerSynced // ConfigMapLister is a ConfigMap lister in this Shard ConfigMapLister corelisters.ConfigMapLister ConfigMapsSynced cache.InformerSynced // MlaLister is a MachineLearningAlgorithm lister in this Shard MlaLister nexuslisters.MachineLearningAlgorithmLister MlaSynced cache.InformerSynced // contains filtered or unexported fields }
func NewShard ¶
func NewShard( ownerName string, name string, kubeClient kubernetes.Interface, nexusClient clientset.Interface, mlainformer nexusinformers.MachineLearningAlgorithmInformer, secretinformer coreinformers.SecretInformer, configmapinformer coreinformers.ConfigMapInformer, ) *Shard
NewShard creates a new Shard instance. File name in *kubeConfigPath* will be used as the Shard's name in case of more than a single Shard make sure their kubeconfig files are named differently.
func (*Shard) CreateConfigMap ¶
func (shard *Shard) CreateConfigMap(mla *v1.MachineLearningAlgorithm, configMap *corev1.ConfigMap, fieldManager string) (*corev1.ConfigMap, error)
CreateConfigMap creates a new ConfigMap for a MachineLearningAlgorithm resource. It also sets the appropriate OwnerReferences on the resource so handleObject can discover the Foo resource that 'owns' it.
func (*Shard) CreateMachineLearningAlgorithm ¶
func (shard *Shard) CreateMachineLearningAlgorithm(mlaName string, mlaNamespace string, mlaSpec v1.MachineLearningAlgorithmSpec, fieldManager string) (*v1.MachineLearningAlgorithm, error)
func (*Shard) CreateSecret ¶
func (shard *Shard) CreateSecret(mla *v1.MachineLearningAlgorithm, secret *corev1.Secret, fieldManager string) (*corev1.Secret, error)
CreateSecret creates a new Secret for a MachineLearningAlgorithm resource. It also sets the appropriate OwnerReferences on the resource so handleObject can discover the Foo resource that 'owns' it.
func (*Shard) DeleteMachineLearningAlgorithm ¶
func (shard *Shard) DeleteMachineLearningAlgorithm(mla *v1.MachineLearningAlgorithm) error
DeleteMachineLearningAlgorithm removes the MLA from this shard
func (*Shard) DereferenceConfigMap ¶ added in v0.2.1
func (shard *Shard) DereferenceConfigMap(configMap *corev1.ConfigMap, mla *v1.MachineLearningAlgorithm, fieldManager string) error
DereferenceConfigMap removes provided algorithm as the owner of the secret, and optionally removes the secret if it has no owners
func (*Shard) DereferenceSecret ¶ added in v0.2.1
func (shard *Shard) DereferenceSecret(secret *corev1.Secret, mla *v1.MachineLearningAlgorithm, fieldManager string) error
DereferenceSecret removes provided algorithm as the owner of the secret, and optionally removes the secret if it has no owners
func (*Shard) GetReferenceLabels ¶
func (*Shard) UpdateConfigMap ¶
func (shard *Shard) UpdateConfigMap(configMap *corev1.ConfigMap, newData map[string]string, newOwner *v1.MachineLearningAlgorithm, fieldManager string) (*corev1.ConfigMap, error)
UpdateConfigMap updates the config map with new content
func (*Shard) UpdateMachineLearningAlgorithm ¶
func (shard *Shard) UpdateMachineLearningAlgorithm(mla *v1.MachineLearningAlgorithm, mlaSpec v1.MachineLearningAlgorithmSpec, fieldManager string) (*v1.MachineLearningAlgorithm, error)
UpdateMachineLearningAlgorithm updates the MLA in this shard in case it drifts from the one in the controller cluster