AB#2234: Introduce AddNodeSelectorsToDeployment

Add the above function to the different client interfaces.
Remove previously used Command.Exec call.
This commit is contained in:
Otto Bittner 2022-07-26 10:10:34 +02:00
parent 6b6a3ee976
commit ff5100f332
6 changed files with 109 additions and 21 deletions

View file

@ -606,6 +606,7 @@ type stubKubectl struct {
ApplyErr error
createConfigMapErr error
AddTolerationsToDeploymentErr error
AddTNodeSelectorsToDeploymentErr error
resources []resources.Marshaler
kubeconfigs [][]byte
@ -628,6 +629,10 @@ func (s *stubKubectl) AddTolerationsToDeployment(ctx context.Context, toleration
return s.AddTolerationsToDeploymentErr
}
func (s *stubKubectl) AddNodeSelectorsToDeployment(ctx context.Context, selectors map[string]string, name string) error {
return s.AddTNodeSelectorsToDeploymentErr
}
type stubKubeconfigReader struct {
Kubeconfig []byte
ReadErr error