mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-07-27 01:05:18 -04:00
add namespace to kubectl requests (#315)
* add namespace to kubectl requests * Add tests for missing/wrong namespace Co-authored-by: Otto Bittner <cobittner@posteo.net>
This commit is contained in:
parent
c37fab0a4c
commit
e0ce2e8a51
6 changed files with 43 additions and 27 deletions
|
@ -45,8 +45,8 @@ type Client interface {
|
|||
Apply(resources resources.Marshaler, forceConflicts bool) error
|
||||
SetKubeconfig(kubeconfig []byte)
|
||||
CreateConfigMap(ctx context.Context, configMap corev1.ConfigMap) error
|
||||
AddTolerationsToDeployment(ctx context.Context, tolerations []corev1.Toleration, name string) error
|
||||
AddNodeSelectorsToDeployment(ctx context.Context, selectors map[string]string, name string) error
|
||||
AddTolerationsToDeployment(ctx context.Context, tolerations []corev1.Toleration, name string, namespace string) error
|
||||
AddNodeSelectorsToDeployment(ctx context.Context, selectors map[string]string, name string, namespace string) error
|
||||
}
|
||||
|
||||
type installer interface {
|
||||
|
@ -235,13 +235,13 @@ func (k *KubernetesUtil) setupGCPPodNetwork(ctx context.Context, nodeName, nodeP
|
|||
Effect: "NoSchedule",
|
||||
},
|
||||
}
|
||||
if err = kubectl.AddTolerationsToDeployment(ctx, tolerations, "coredns"); err != nil {
|
||||
if err = kubectl.AddTolerationsToDeployment(ctx, tolerations, "coredns", "kube-system"); err != nil {
|
||||
return err
|
||||
}
|
||||
selectors := map[string]string{
|
||||
"node-role.kubernetes.io/control-plane": "",
|
||||
}
|
||||
if err = kubectl.AddNodeSelectorsToDeployment(ctx, selectors, "coredns"); err != nil {
|
||||
if err = kubectl.AddNodeSelectorsToDeployment(ctx, selectors, "coredns", "kube-system"); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue