This repository has been archived by the owner on Jan 11, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 560
E2E Addons #2294
Merged
CecileRobertMichon
merged 29 commits into
Azure:master
from
CecileRobertMichon:addon-e2e
Feb 16, 2018
Merged
E2E Addons #2294
Changes from 23 commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
82b5646
add features on and features off
e17abdd
Merge branch 'master' of https://github.com/CecileRobertMichon/acs-en…
b2e283a
fix off model
ddabe64
Merge branch 'master' of https://github.com/Azure/acs-engine into mor…
c567806
add seperate tests for each feature disabled
94ef10a
Merge branch 'master' of https://github.com/Azure/acs-engine into mor…
913671d
move features off dir
c60e25e
rbac bool
6a17e0c
added clear containers
e93d361
added addons enabled test
e2e908b
fix typo in apimodel
974efa0
remove aci-connector
51dc9fd
wip add mem/cpu limits/requests checks
a28fbbf
Merge branch 'master' of https://github.com/Azure/acs-engine into add…
49c0ae2
add resources to container spec
3c059ad
fix resources type
72e05b8
add checks to tiller
098efb0
remove extra err var
e72a004
add check for dashboard and aci connector
5ae6b2e
update default definition
5a5bbd3
fmt
c47c3c5
fix typo
2d216ad
Merge branch 'master' of https://github.com/Azure/acs-engine into add…
e71f4dc
Refactor resources validation
4ce083c
fix error string
328a065
fix linter
47c7188
remove pointer
db5ea23
fix ineffassign
6b1626c
small fixes
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -125,27 +125,41 @@ var _ = Describe("Azure Container Cluster using the Kubernetes Orchestrator", fu | |
}) | ||
|
||
It("should have tiller running", func() { | ||
if hasTiller, tillerAddon := eng.HasTiller(); hasTiller { | ||
if hasTiller, tillerAddon := eng.HasAddon("tiller"); hasTiller { | ||
running, err := pod.WaitOnReady("tiller", "kube-system", 3, 30*time.Second, cfg.Timeout) | ||
Expect(err).NotTo(HaveOccurred()) | ||
Expect(running).To(Equal(true)) | ||
if tillerAddon.Config != nil { | ||
By("Ensuring that the correct max-history has been applied") | ||
maxHistory := tillerAddon.Config["max-history"] | ||
pods, err := pod.GetAllByPrefix("tiller-deploy", "kube-system") | ||
Expect(err).NotTo(HaveOccurred()) | ||
// There is only one tiller pod and one container in that pod. | ||
actualTillerMaxHistory, err := pods[0].Spec.Containers[0].GetEnvironmentVariable("TILLER_HISTORY_MAX") | ||
Expect(err).NotTo(HaveOccurred()) | ||
Expect(actualTillerMaxHistory).To(Equal(maxHistory)) | ||
} | ||
pods, err := pod.GetAllByPrefix("tiller-deploy", "kube-system") | ||
Expect(err).NotTo(HaveOccurred()) | ||
By("Ensuring that the correct max-history has been applied") | ||
maxHistory := tillerAddon.Config["max-history"] | ||
// There is only one tiller pod and one container in that pod. | ||
actualTillerMaxHistory, err := pods[0].Spec.Containers[0].GetEnvironmentVariable("TILLER_HISTORY_MAX") | ||
Expect(err).NotTo(HaveOccurred()) | ||
Expect(actualTillerMaxHistory).To(Equal(maxHistory)) | ||
By("Ensuring that the correct resources have been applied") | ||
c := tillerAddon.Containers[0] | ||
cpuRequests := c.CPURequests | ||
cpuLimits := c.CPULimits | ||
memoryRequests := c.MemoryRequests | ||
memoryLimits := c.MemoryLimits | ||
Expect(err).NotTo(HaveOccurred()) | ||
// There is only one tiller pod and one container in that pod. | ||
actualTillerCPURequests := pods[0].Spec.Containers[0].GetCPURequests() | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this (and the 3 blocks below) easily generalizeable in a convenience func? |
||
Expect(actualTillerCPURequests).To(Equal(cpuRequests)) | ||
actualTillerCPULimits := pods[0].Spec.Containers[0].GetCPULimits() | ||
Expect(actualTillerCPULimits).To(Equal(cpuLimits)) | ||
actualTillerMemoryRequests := pods[0].Spec.Containers[0].GetMemoryRequests() | ||
Expect(actualTillerMemoryRequests).To(Equal(memoryRequests)) | ||
actualTillerMemoryLimits := pods[0].Spec.Containers[0].GetMemoryLimits() | ||
Expect(actualTillerMemoryLimits).To(Equal(memoryLimits)) | ||
} else { | ||
Skip("tiller disabled for this cluster, will not test") | ||
} | ||
}) | ||
|
||
It("should be able to access the dashboard from each node", func() { | ||
if eng.HasDashboard() { | ||
if hasDashboard, dashboardAddon := eng.HasAddon("kubernetes-dashboard"); hasDashboard { | ||
By("Ensuring that the kubernetes-dashboard pod is Running") | ||
|
||
running, err := pod.WaitOnReady("kubernetes-dashboard", "kube-system", 3, 30*time.Second, cfg.Timeout) | ||
|
@@ -201,27 +215,79 @@ var _ = Describe("Azure Container Cluster using the Kubernetes Orchestrator", fu | |
} | ||
Expect(success).To(BeTrue()) | ||
} | ||
By("Ensuring that the correct resources have been applied") | ||
pods, err := pod.GetAllByPrefix("kubernetes-dashboard", "kube-system") | ||
for i, c := range dashboardAddon.Containers { | ||
cpuRequests := c.CPURequests | ||
cpuLimits := c.CPULimits | ||
memoryRequests := c.MemoryRequests | ||
memoryLimits := c.MemoryLimits | ||
Expect(err).NotTo(HaveOccurred()) | ||
actualDashboardCPURequests := pods[0].Spec.Containers[i].GetCPURequests() | ||
Expect(actualDashboardCPURequests).To(Equal(cpuRequests)) | ||
actualDashboardCPULimits := pods[0].Spec.Containers[i].GetCPULimits() | ||
Expect(actualDashboardCPULimits).To(Equal(cpuLimits)) | ||
actualDashboardMemoryRequests := pods[0].Spec.Containers[i].GetMemoryRequests() | ||
Expect(actualDashboardMemoryRequests).To(Equal(memoryRequests)) | ||
actualDashboardMemoryLimits := pods[0].Spec.Containers[i].GetMemoryLimits() | ||
Expect(actualDashboardMemoryLimits).To(Equal(memoryLimits)) | ||
} | ||
} | ||
} else { | ||
Skip("kubernetes-dashboard disabled for this cluster, will not test") | ||
} | ||
}) | ||
|
||
It("should have aci-connector running", func() { | ||
if eng.HasACIConnector() { | ||
if hasACIConnector, ACIConnectorAddon := eng.HasAddon("aci-connector"); hasACIConnector { | ||
running, err := pod.WaitOnReady("aci-connector", "kube-system", 3, 30*time.Second, cfg.Timeout) | ||
Expect(err).NotTo(HaveOccurred()) | ||
Expect(running).To(Equal(true)) | ||
By("Ensuring that the correct resources have been applied") | ||
pods, err := pod.GetAllByPrefix("aci-connector", "kube-system") | ||
for i, c := range ACIConnectorAddon.Containers { | ||
cpuRequests := c.CPURequests | ||
cpuLimits := c.CPULimits | ||
memoryRequests := c.MemoryRequests | ||
memoryLimits := c.MemoryLimits | ||
Expect(err).NotTo(HaveOccurred()) | ||
actualACIConnectorCPURequests := pods[0].Spec.Containers[i].GetCPURequests() | ||
Expect(actualACIConnectorCPURequests).To(Equal(cpuRequests)) | ||
actualACIConnectorCPULimits := pods[0].Spec.Containers[i].GetCPULimits() | ||
Expect(actualACIConnectorCPULimits).To(Equal(cpuLimits)) | ||
actualACIConnectorMemoryRequests := pods[0].Spec.Containers[i].GetMemoryRequests() | ||
Expect(actualACIConnectorMemoryRequests).To(Equal(memoryRequests)) | ||
actualACIConnectorMemoryLimits := pods[0].Spec.Containers[i].GetMemoryLimits() | ||
Expect(actualACIConnectorMemoryLimits).To(Equal(memoryLimits)) | ||
} | ||
|
||
} else { | ||
Skip("aci-connector disabled for this cluster, will not test") | ||
} | ||
}) | ||
|
||
It("should have rescheduler running", func() { | ||
if eng.HasRescheduler() { | ||
if hasRescheduler, reschedulerAddon := eng.HasAddon("rescheduler"); hasRescheduler { | ||
running, err := pod.WaitOnReady("rescheduler", "kube-system", 3, 30*time.Second, cfg.Timeout) | ||
Expect(err).NotTo(HaveOccurred()) | ||
Expect(running).To(Equal(true)) | ||
By("Ensuring that the correct resources have been applied") | ||
pods, err := pod.GetAllByPrefix("rescheduler", "kube-system") | ||
for i, c := range reschedulerAddon.Containers { | ||
cpuRequests := c.CPURequests | ||
cpuLimits := c.CPULimits | ||
memoryRequests := c.MemoryRequests | ||
memoryLimits := c.MemoryLimits | ||
Expect(err).NotTo(HaveOccurred()) | ||
actualReschedulerCPURequests := pods[0].Spec.Containers[i].GetCPURequests() | ||
Expect(actualReschedulerCPURequests).To(Equal(cpuRequests)) | ||
actualReschedulerCPULimits := pods[0].Spec.Containers[i].GetCPULimits() | ||
Expect(actualReschedulerCPULimits).To(Equal(cpuLimits)) | ||
actualReschedulerMemoryRequests := pods[0].Spec.Containers[i].GetMemoryRequests() | ||
Expect(actualReschedulerMemoryRequests).To(Equal(memoryRequests)) | ||
actualReschedulerMemoryLimits := pods[0].Spec.Containers[i].GetMemoryLimits() | ||
Expect(actualReschedulerMemoryLimits).To(Equal(memoryLimits)) | ||
} | ||
} else { | ||
Skip("rescheduler disabled for this cluster, will not test") | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💥