mirror of
https://github.com/kairos-io/provider-kairos.git
synced 2025-09-26 07:10:15 +00:00
Bump to v2.2.0 (#399)
This commit is contained in:
18
.github/workflows/image.yaml
vendored
18
.github/workflows/image.yaml
vendored
@@ -52,7 +52,17 @@ jobs:
|
||||
- name: Login to Quay Registry
|
||||
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
|
||||
run: echo ${{ secrets.QUAY_PASSWORD }} | docker login -u ${{ secrets.QUAY_USERNAME }} --password-stdin quay.io
|
||||
- name: Build 🔧
|
||||
- name: Build PR 🔧
|
||||
if: ${{ github.event_name == 'pull_request' }}
|
||||
env:
|
||||
FLAVOR: ${{ matrix.flavor }}
|
||||
IMAGE: quay.io/kairos/kairos-${{ matrix.flavor }}:latest
|
||||
run: |
|
||||
./earthly.sh +ci --IMAGE=$IMAGE --FLAVOR=$FLAVOR
|
||||
sudo mv build/* .
|
||||
sudo rm -rf build
|
||||
- name: Build main 🔧
|
||||
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
|
||||
env:
|
||||
FLAVOR: ${{ matrix.flavor }}
|
||||
IMAGE: quay.io/kairos/kairos-${{ matrix.flavor }}:latest
|
||||
@@ -68,6 +78,7 @@ jobs:
|
||||
*.sha256
|
||||
if-no-files-found: error
|
||||
- uses: actions/upload-artifact@v3
|
||||
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
|
||||
with:
|
||||
name: kairos-${{ matrix.flavor }}.sbom.zip
|
||||
path: |
|
||||
@@ -75,18 +86,21 @@ jobs:
|
||||
*.spdx.json
|
||||
if-no-files-found: error
|
||||
- uses: actions/upload-artifact@v3
|
||||
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
|
||||
with:
|
||||
name: kairos-${{ matrix.flavor }}.initrd.zip
|
||||
path: |
|
||||
*-initrd
|
||||
if-no-files-found: error
|
||||
- uses: actions/upload-artifact@v3
|
||||
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
|
||||
with:
|
||||
name: kairos-${{ matrix.flavor }}.squashfs.zip
|
||||
path: |
|
||||
*.squashfs
|
||||
if-no-files-found: error
|
||||
- uses: actions/upload-artifact@v3
|
||||
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
|
||||
with:
|
||||
name: kairos-${{ matrix.flavor }}.kernel.zip
|
||||
path: |
|
||||
@@ -94,6 +108,7 @@ jobs:
|
||||
*-initrd
|
||||
if-no-files-found: error
|
||||
- uses: actions/upload-artifact@v3
|
||||
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
|
||||
with:
|
||||
name: kairos-${{ matrix.flavor }}.ipxe.zip
|
||||
path: |
|
||||
@@ -196,7 +211,6 @@ jobs:
|
||||
name: ${{ matrix.flavor }}-upgrade-test.logs.zip
|
||||
path: tests/**/logs/*
|
||||
if-no-files-found: warn
|
||||
|
||||
provider_upgrade:
|
||||
needs:
|
||||
- build
|
||||
|
@@ -1 +1 @@
|
||||
v2.1.0
|
||||
v2.2.0
|
||||
|
@@ -55,6 +55,10 @@ all:
|
||||
BUILD +ipxe-iso
|
||||
DO +RELEASEVERSION
|
||||
|
||||
ci:
|
||||
BUILD +docker
|
||||
BUILD +iso
|
||||
|
||||
all-arm:
|
||||
ARG SECURITY_SCANS=true
|
||||
BUILD --platform=linux/arm64 +docker
|
||||
|
@@ -45,7 +45,6 @@ var _ = Describe("kairos decentralized k8s test", Label("decentralized-k8s"), fu
|
||||
vmForEach("checking if it has default service active", vms, func(vm VM) {
|
||||
if isFlavor(vm, "alpine") {
|
||||
out, _ := vm.Sudo("rc-status")
|
||||
Expect(out).Should(ContainSubstring("kairos"))
|
||||
Expect(out).Should(ContainSubstring("kairos-agent"))
|
||||
} else {
|
||||
out, _ := vm.Sudo("systemctl status kairos")
|
||||
@@ -73,7 +72,6 @@ var _ = Describe("kairos decentralized k8s test", Label("decentralized-k8s"), fu
|
||||
out, _ := vm.Sudo("rc-status")
|
||||
return out
|
||||
}, 30*time.Second, 10*time.Second).Should(And(
|
||||
ContainSubstring("kairos"),
|
||||
ContainSubstring("kairos-agent")))
|
||||
} else {
|
||||
Eventually(func() string {
|
||||
@@ -119,6 +117,8 @@ var _ = Describe("kairos decentralized k8s test", Label("decentralized-k8s"), fu
|
||||
out, err := vm.Sudo("cat /run/cos/live_mode")
|
||||
Expect(err).To(HaveOccurred(), out)
|
||||
if isFlavor(vm, "alpine") {
|
||||
// Skip for now as agent doesn't log anymore as it cannot behave both as a one-off and a daemon
|
||||
/*
|
||||
Eventually(func() string {
|
||||
out, _ = vm.Sudo("sudo cat /var/log/kairos/agent.log")
|
||||
return out
|
||||
@@ -127,6 +127,7 @@ var _ = Describe("kairos decentralized k8s test", Label("decentralized-k8s"), fu
|
||||
ContainSubstring("Configuring k3s-agent"),
|
||||
ContainSubstring("Configuring k3s"),
|
||||
), out)
|
||||
*/
|
||||
} else {
|
||||
Eventually(func() string {
|
||||
out, _ = vm.Sudo("systemctl status kairos-agent")
|
||||
|
@@ -76,6 +76,8 @@ func startVM(iso string) (context.Context, VM) {
|
||||
stateDir, err := os.MkdirTemp("", "stateDir-*")
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
|
||||
fmt.Printf("Statedir: %s\n", stateDir)
|
||||
|
||||
sshPort, err = getFreePort()
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
|
||||
@@ -111,6 +113,14 @@ func startVM(iso string) (context.Context, VM) {
|
||||
// but we just print the output just in case.
|
||||
fmt.Printf("\nVM Aborted: %s %s Exit status: %s\n", out, err, status)
|
||||
}),
|
||||
func(m *types.MachineConfig) error {
|
||||
m.Args = append(m.Args,
|
||||
"-chardev", fmt.Sprintf("stdio,mux=on,id=char0,logfile=%s,signal=off", path.Join(stateDir, "serial.log")),
|
||||
"-serial", "chardev:char0",
|
||||
"-mon", "chardev=char0",
|
||||
)
|
||||
return nil
|
||||
},
|
||||
types.WithStateDir(stateDir),
|
||||
types.WithDataSource(os.Getenv("DATASOURCE")),
|
||||
}
|
||||
|
@@ -86,22 +86,23 @@ var _ = Describe("k3s upgrade test", Label("upgrade-k8s"), func() {
|
||||
"loaded (/usr/lib/systemd/system/systemd-timesyncd.service; enabled; vendor preset: disabled)"))
|
||||
}
|
||||
|
||||
By("checking if it has a working kubeconfig")
|
||||
By("checking if kairos-agent has started")
|
||||
Eventually(func() string {
|
||||
var out string
|
||||
if isFlavor(vm, "alpine") {
|
||||
out, _ = vm.Sudo("cat /var/log/kairos/agent.log;cat /var/log/kairos-agent.log")
|
||||
out, _ = vm.Sudo("rc-service kairos-agent status")
|
||||
} else {
|
||||
out, _ = vm.Sudo("systemctl status kairos-agent")
|
||||
}
|
||||
return out
|
||||
}, 900*time.Second, 10*time.Second).Should(ContainSubstring("One time bootstrap starting"))
|
||||
|
||||
}, 900*time.Second, 10*time.Second).Should(Or(ContainSubstring("One time bootstrap starting"), ContainSubstring("status: started")))
|
||||
By("Checking agent provider correct start")
|
||||
Eventually(func() string {
|
||||
out, _ := vm.Sudo("cat /var/log/kairos/agent-provider.log")
|
||||
return out
|
||||
}, 900*time.Second, 10*time.Second).Should(Or(ContainSubstring("One time bootstrap starting"), ContainSubstring("Sentinel exists")))
|
||||
|
||||
By("Checking k3s is pointing to https")
|
||||
Eventually(func() string {
|
||||
out, _ := vm.Sudo("cat /etc/rancher/k3s/k3s.yaml")
|
||||
return out
|
||||
@@ -120,6 +121,14 @@ var _ = Describe("k3s upgrade test", Label("upgrade-k8s"), func() {
|
||||
return out
|
||||
}, 900*time.Second, 10*time.Second).Should(ContainSubstring("system-upgrade-controller"))
|
||||
|
||||
By("wait for all containers to be in running state")
|
||||
Eventually(func() string {
|
||||
out, _ := kubectl(vm, "get pods -A")
|
||||
fmt.Printf("out = %+v\n", out)
|
||||
return out
|
||||
|
||||
}, 900*time.Second, 10*time.Second).ShouldNot(And(ContainSubstring("Pending"), ContainSubstring("ContainerCreating")))
|
||||
|
||||
By("applying upgrade plan")
|
||||
err = vm.Scp("assets/suc.yaml", "./suc.yaml", "0770")
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
|
@@ -144,7 +144,15 @@ var _ = Describe("k3s upgrade test from k8s", Label("upgrade-latest-with-kuberne
|
||||
out, _ := kubectl(vm, "get pods -A")
|
||||
fmt.Printf("out = %+v\n", out)
|
||||
return out
|
||||
}, 900*time.Second, 10*time.Second).Should(ContainSubstring("system-upgrade-controller"))
|
||||
})
|
||||
|
||||
By("wait for all containers to be in running state")
|
||||
Eventually(func() string {
|
||||
out, _ := kubectl(vm, "get pods -A")
|
||||
fmt.Printf("out = %+v\n", out)
|
||||
return out
|
||||
|
||||
}, 900*time.Second, 10*time.Second).ShouldNot(And(ContainSubstring("Pending"), ContainSubstring("ContainerCreating")))
|
||||
|
||||
By("triggering an upgrade")
|
||||
suc := sucYAML(strings.ReplaceAll(containerImage, ":8h", ""), "8h")
|
||||
|
Reference in New Issue
Block a user