Skip to content

Commit 7f42685

Browse files
committed
Fix helm install and add tiller test
1 parent 357c313 commit 7f42685

File tree

3 files changed

+36
-12
lines changed

3 files changed

+36
-12
lines changed

integration/heapster.go integration/addons.go

+12
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,18 @@ func verifyHeapster(master NodeDeets, sshKey string) error {
3939
"heapster": 3,
4040
"heapster-influxdb": 1,
4141
}
42+
return verifyDeployment(deployments, master, sshKey)
43+
}
44+
45+
func verifyTiller(master NodeDeets, sshKey string) error {
46+
// verify pods are up
47+
deployments := map[string]int{
48+
"tiller-deploy": 1,
49+
}
50+
return verifyDeployment(deployments, master, sshKey)
51+
}
52+
53+
func verifyDeployment(deployments map[string]int, master NodeDeets, sshKey string) error {
4254
for k, v := range deployments {
4355
if err := retry.WithBackoff(func() error {
4456
return runViaSSH([]string{fmt.Sprintf("sudo kubectl get deployment %s -n kube-system -o jsonpath='{.status.availableReplicas}' | grep %d", k, v)}, []NodeDeets{master}, sshKey, 1*time.Minute)

integration/install_test.go

+23-12
Original file line numberDiff line numberDiff line change
@@ -157,12 +157,32 @@ var _ = Describe("kismatic", func() {
157157
})
158158
})
159159

160+
Context("when deploying an HA cluster", func() {
161+
ItOnAWS("should still be a highly available cluster after removing a master node [slow]", func(aws infrastructureProvisioner) {
162+
WithInfrastructureAndDNS(NodeCount{1, 2, 1, 0, 0}, Ubuntu1604LTS, aws, func(nodes provisionedNodes, sshKey string) {
163+
// install cluster
164+
installOpts := installOptions{allowPackageInstallation: true}
165+
err := installKismatic(nodes, installOpts, sshKey)
166+
Expect(err).ToNot(HaveOccurred())
167+
168+
By("Removing a Kubernetes master node")
169+
if err = aws.TerminateNode(nodes.master[0]); err != nil {
170+
FailIfError(err, "could not remove node")
171+
}
172+
By("Re-running Kuberang")
173+
if err = runViaSSH([]string{"sudo kuberang"}, []NodeDeets{nodes.master[1]}, sshKey, 5*time.Minute); err != nil {
174+
FailIfError(err, "kuberang error")
175+
}
176+
})
177+
})
178+
})
179+
160180
// This spec will be used for testing non-destructive kismatic features on
161181
// a new cluster.
162182
// This spec is open to modification when new assertions have to be made
163183
Context("when deploying a skunkworks cluster", func() {
164184
ItOnAWS("should install successfully [slow]", func(aws infrastructureProvisioner) {
165-
WithInfrastructureAndDNS(NodeCount{3, 2, 3, 2, 2}, Ubuntu1604LTS, aws, func(nodes provisionedNodes, sshKey string) {
185+
WithInfrastructure(NodeCount{3, 2, 3, 2, 2}, Ubuntu1604LTS, aws, func(nodes provisionedNodes, sshKey string) {
166186
// reserve one of the workers for the add-worker test
167187
allWorkers := nodes.worker
168188
nodes.worker = allWorkers[0 : len(nodes.worker)-1]
@@ -206,17 +226,8 @@ var _ = Describe("kismatic", func() {
206226
return verifyHeapster(nodes.master[0], sshKey)
207227
})
208228

209-
// This test should always be last
210-
sub.It("should still be a highly available cluster after removing a master node", func() error {
211-
By("Removing a Kubernetes master node")
212-
if err = aws.TerminateNode(nodes.master[0]); err != nil {
213-
return fmt.Errorf("could not remove node: %v", err)
214-
}
215-
By("Re-running Kuberang")
216-
if err = runViaSSH([]string{"sudo kuberang"}, []NodeDeets{nodes.master[1]}, sshKey, 5*time.Minute); err != nil {
217-
return err
218-
}
219-
return nil
229+
sub.It("should have tiller running", func() error {
230+
return verifyTiller(nodes.master[0], sshKey)
220231
})
221232
})
222233
})

pkg/install/execute.go

+1
Original file line numberDiff line numberDiff line change
@@ -771,6 +771,7 @@ func (ae *ansibleExecutor) buildClusterCatalog(p *Plan) (*ansible.ClusterCatalog
771771
// Currently only helm is supported
772772
switch p.AddOns.PackageManager.Provider {
773773
case "helm":
774+
cc.Helm.Enabled = true
774775
default:
775776
cc.Helm.Enabled = true
776777
}

0 commit comments

Comments
 (0)