зеркало из https://github.com/Azure/acs-engine.git
schedule ip-masq-agent on masters (#4049)
This commit is contained in:
Родитель
17aa20ed64
Коммит
20ff962bd7
|
@ -18,6 +18,13 @@ spec:
|
|||
hostNetwork: true
|
||||
nodeSelector:
|
||||
beta.kubernetes.io/os: linux
|
||||
tolerations:
|
||||
- key: CriticalAddonsOnly
|
||||
operator: Exists
|
||||
- key: node-role.kubernetes.io/master
|
||||
operator: Equal
|
||||
value: "true"
|
||||
effect: NoSchedule
|
||||
containers:
|
||||
- name: azure-ip-masq-agent
|
||||
image: gcr.io/google-containers/ip-masq-agent-amd64:v2.0.0
|
||||
|
|
|
@ -781,6 +781,27 @@ var _ = Describe("Azure Container Cluster using the Kubernetes Orchestrator", fu
|
|||
Skip("No linux agent was provisioned for this Cluster Definition")
|
||||
}
|
||||
})
|
||||
|
||||
It("should be able to schedule a pod to a master node", func() {
|
||||
By("Creating a pod with master nodeSelector")
|
||||
p, err := pod.CreatePodFromFile(filepath.Join(WorkloadDir, "nginx-master.yaml"), "nginx-master", "default")
|
||||
if err != nil {
|
||||
p, err = pod.Get("nginx-master", "default")
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
}
|
||||
running, err := p.WaitOnReady(5*time.Second, cfg.Timeout)
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
Expect(running).To(Equal(true))
|
||||
|
||||
By("validating that master-scheduled pod has outbound internet connectivity")
|
||||
pass, err := p.CheckLinuxOutboundConnection(5*time.Second, cfg.Timeout)
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
Expect(pass).To(BeTrue())
|
||||
|
||||
By("Cleaning up after ourselves")
|
||||
err = p.Delete(deleteResourceRetries)
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
})
|
||||
})
|
||||
|
||||
Describe("with a GPU-enabled agent pool", func() {
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: nginx-master
|
||||
labels:
|
||||
app: nginx-master
|
||||
spec:
|
||||
containers:
|
||||
- image: library/nginx:latest
|
||||
name: nginx-master
|
||||
command:
|
||||
- sleep
|
||||
- "1000000"
|
||||
tolerations:
|
||||
- effect: NoSchedule
|
||||
key: node-role.kubernetes.io/master
|
||||
operator: "Exists"
|
||||
nodeSelector:
|
||||
kubernetes.io/role: master
|
Загрузка…
Ссылка в новой задаче