Skip to content
This repository has been archived by the owner on Oct 24, 2023. It is now read-only.

test: use kured 1.7.0 to validate kamino #4427

Merged
merged 2 commits into from
May 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions test/e2e/kubernetes/kubernetes_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2828,8 +2828,11 @@ var _ = Describe("Azure Container Cluster using the Kubernetes Orchestrator", fu
It("should be able to install vmss node prototype", func() {
if cfg.RunVMSSNodePrototype {
if eng.ExpandedDefinition.Properties.HasVMSSAgentPool() {
By("Installing kured with node annotations configuration")
_, err := daemonset.CreateDaemonsetFromFileWithRetry(filepath.Join(WorkloadDir, "kured-annotations.yaml"), "kured", "kube-system", 5*time.Second, cfg.Timeout)
By("Installing kured 1.7.0 with node annotations configuration")
cmd := exec.Command("helm", "install", "--wait", "--generate-name", "--repo", "https://weaveworks.github.io/kured", "kured", "--version", "2.6.0", "--set", "configuration.annotateNodes=true", "--set", "configuration.period=1m")
util.PrintCommand(cmd)
out, err := cmd.CombinedOutput()
log.Printf("%s\n", out)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now that this does the annotations, we could run vmss-prototype with the automatic mode where it uses the annotations. That would help validate that too and simplify some of the logic here.

Also, kamino no longer deletes the "prototype" node, it just reboots it (temporary shutdown in order to take the snapshot).

You just need to tell kamino what annotations to look for via kamino.auto.lastPatchAnnotation and, more importantly, kamino.auto.pendingRebootAnnotation.

These values tell the names of the the annotations within the node. I think you want:

kamino.auto.lastPatchAnnotation=weave.works/kured-most-recent-reboot-needed
kamino.auto.pendingRebootAnnotation=weave.works/kured-reboot-in-progress

There is also the cronjob mechanism but you don't want that as you want to signal directly.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, I did not scroll down far enough in the unchaged code - you already do that. :-)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Definitely. I wanted to quickly get rid of my static manifest referencing my custom-built kured image first.

Next step will be to integrate this test scenario into a "soak" cluster so that we can validate the nominal use case of vmss prototype being a "self-maintaining" VMSS optimization.

Expect(err).NotTo(HaveOccurred())
nodes, err := node.GetReadyWithRetry(1*time.Second, cfg.Timeout)
Expect(err).NotTo(HaveOccurred())
Expand Down Expand Up @@ -2929,8 +2932,8 @@ var _ = Describe("Azure Container Cluster using the Kubernetes Orchestrator", fu
timeToLargeContainerDaemonsetRunningBaseline = time.Since(start)
log.Printf("Took %s for large-container-daemonset pod to reach Running state on new node\n", timeToLargeContainerDaemonsetRunningBaseline)
}
cmd := exec.Command("helm", "status", "vmss-prototype")
out, err := cmd.CombinedOutput()
cmd = exec.Command("helm", "status", "vmss-prototype")
out, err = cmd.CombinedOutput()
if err == nil {
By("Found pre-existing 'vmss-prototype' helm release, deleting it...")
cmd := exec.Command("helm", "delete", "vmss-prototype")
Expand Down
129 changes: 0 additions & 129 deletions test/e2e/kubernetes/workloads/kured-annotations.yaml

This file was deleted.