Commit Graph

172 Commits

Author SHA1 Message Date
Derek Nola
9702f92345
Fix for Kubeflag Integration test (#8154)
* Use argument that doesn't require file
* Use build-k3s workflow in cgroup
* Bump timeout on integration tests

Signed-off-by: Derek Nola <derek.nola@suse.com>
2023-08-07 14:04:04 -07:00
Ian Cardoso
53fc3eef0a
add --disable-cloud-controller and --disable-kube-proxy test (#8018)
Signed-off-by: Ian Cardoso <osodracnai@gmail.com>
2023-08-04 14:27:09 -03:00
Ian Cardoso
e551308db8
fix for etcd-snapshot delete with --etcd-s3 flag (#8110)
k3s etcd-snapshot save --etcd-s3 ... is creating a local snapshot and uploading it to s3 while k3s etcd-snapshot delete --etcd-s3 ... was deleting the snapshot only on s3 buckets, this commit change the behavior of delete to do it locally and on s3

Signed-off-by: Ian Cardoso <osodracnai@gmail.com>
2023-08-04 14:26:32 -03:00
fmoral2
45bc26309f
Remove terraform test package (#8136)
Signed-off-by: Francisco <francisco.moral@suse.com>
2023-08-04 10:06:45 -03:00
Ikko Eltociear Ashimine
3515d712a7
Fix typo in terraform/README.md (#8090)
Signed-off-by: Ikko Eltociear Ashimine <eltociear@gmail.com>
2023-08-01 14:15:08 -04:00
Derek Nola
a87b183f9c
E2E: Support GOCOVER for more tests + fixes (#8080)
* Add support for local build and go coverage to all E2E tests
* Remove unused EXTERNAL_DB from etcd tests
* Fix private reg test
* Add coverage to tailscale
* Cleanup unnecessary "sudo" in commands

Signed-off-by: Derek Nola <derek.nola@suse.com>

* Add additonal s3 coverage clause

Signed-off-by: Derek Nola <derek.nola@suse.com>
2023-08-01 09:32:34 -07:00
Derek Nola
3eb4e12c3b
Don't use zgrep in check-config if apparmor porfile is enforced (#7939)
* Don't use zgrep if apparmor is enforced for it

* Bump e2e se timeouts for reencryption time

Signed-off-by: Derek Nola <derek.nola@suse.com>
2023-07-12 08:49:05 -07:00
dependabot[bot]
782a3a1cb4
Bump google.golang.org/grpc from 1.51.0 to 1.53.0 in /tests/terraform (#7879)
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.51.0 to 1.53.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.51.0...v1.53.0)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-07 09:19:57 -07:00
Ian Cardoso
9e334153cf
add e2e s3 test (#7833)
Signed-off-by: Ian Cardoso <osodracnai@gmail.com>
2023-07-05 17:35:44 -03:00
Ian Cardoso
324f9ad4da
fix e2e startup flaky test (#7839)
Signed-off-by: Ian Cardoso <osodracnai@gmail.com>
2023-07-03 10:35:56 -07:00
Manuel Buil
55db9b18f0
Merge pull request #7745 from manuelbuil/removeVagrantConfig
Remove useless libvirt config
2023-06-12 18:15:28 +02:00
Manuel Buil
a5874f855f Remove unused libvirt config
Signed-off-by: Manuel Buil <mbuil@suse.com>
2023-06-12 14:29:31 +02:00
Manuel Buil
c6a6e8ef57 Fix spelling check
Signed-off-by: Manuel Buil <mbuil@suse.com>
2023-06-12 10:24:30 +02:00
Manuel Buil
268c9a7684
Merge pull request #7352 from manuelbuil/vpnintegrations-afterparental
Integrate tailscale into k3s
2023-06-09 19:02:46 +02:00
Derek Nola
efa86a63e8
Remove unnecessary daemonset addition/deletion (#7696)
Signed-off-by: Derek Nola <derek.nola@suse.com>
2023-06-09 09:51:41 -07:00
Ian Cardoso
7c151d468f
add private registry e2e test (#7653)
add private registry e2e test

Signed-off-by: Ian Cardoso <osodracnai@gmail.com>
Co-authored-by: Derek Nola <derek.nola@suse.com>
2023-06-09 10:51:21 -03:00
Manuel Buil
869e030bdd VPN PoC
Signed-off-by: Manuel Buil <mbuil@suse.com>
2023-06-09 12:39:33 +02:00
Derek Nola
8f9502233a E2E: Inject gocover ENV for k3s commands
Signed-off-by: Derek Nola <derek.nola@suse.com>
2023-06-08 09:39:48 -07:00
Derek Nola
4a68fbd8e9 E2E: Use sudo for all RunCmdOnNode
Signed-off-by: Derek Nola <derek.nola@suse.com>
2023-06-08 09:39:48 -07:00
Derek Nola
b0188f5a13
Test Coverage Reports for E2E tests (#7526)
* Move coverage writer into agent and server
* Add coverage report to E2E PR tests
* Add codecov upload to drone

Signed-off-by: Derek Nola <derek.nola@suse.com>
2023-06-05 14:15:17 -07:00
Brad Davidson
7b61aacb56 Fix test file list
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2023-05-30 18:15:11 -07:00
Hussein Galal
9543470eb7
Add el9 selinux rpm (#7635)
* Add el9 to the install script

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>

* Add rocky-9 install test to test el9 selinux

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>

* Add rocky-9 install test to test el9 selinux to workflow

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>

* Use el8 for fedora 37

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>

* Add a warning to reboot in coreos systems

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>

* remove k3s-selinux module in case of upgrade in el9

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>

* Check for available container-selinux and k3s-selinux

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>

* extend selinux upgrade to sle distros

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>

* create /var/lib/rpm-state in sle systems

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>

* nit fix

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>

* extend selinux upgrade to sle distros

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>

---------

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
2023-05-31 01:51:23 +03:00
Hussein Galal
213d7ad499
Revert "Add el9 selinux rpm (#7443)" (#7608)
This reverts commit d55ec08675.

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
2023-05-25 16:41:05 +03:00
Hussein Galal
d55ec08675
Add el9 selinux rpm (#7443)
* Add el9 to the install script

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>

* Add rocky-9 install test to test el9 selinux

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>

* Add rocky-9 install test to test el9 selinux to workflow

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>

* Use el8 for fedora 37

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>

* Add a warning to reboot in coreos systems

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>

* remove k3s-selinux module in case of upgrade in el9

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>

* Check for available container-selinux and k3s-selinux

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>

* extend selinux upgrade to sle distros

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>

* create /var/lib/rpm-state in sle systems

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>

* nit fix

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>

---------

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
2023-05-25 02:52:07 +03:00
Manuel Buil
290f67c939 Add '-all' flag to apply to inactive units
Signed-off-by: Manuel Buil <mbuil@suse.com>
2023-05-17 12:24:23 +02:00
Esteban Esquivel Alvarado
9bcfac8b88
Add Rotation certification Check (#7097)
* Add Certification Test to Validate Cluster

Signed-off-by: est-suse <esteban.esquivel@suse.com>

* Fix to stop/start for k3s certificate rotation

Signed-off-by: Derek Nola <derek.nola@suse.com>

---------

Signed-off-by: est-suse <esteban.esquivel@suse.com>
Signed-off-by: Derek Nola <derek.nola@suse.com>
Co-authored-by: est-suse <esteban.esquivel@suse.com>
Co-authored-by: Derek Nola <derek.nola@suse.com>
2023-05-12 10:36:41 -07:00
Derek Nola
c6dc789e25
Add support for -cover + integration test code coverage (#7415)
* Add support for -cover in k3s server
* Update codecov reporting
* Sigterm in StopK3sServer
Signed-off-by: Derek Nola <derek.nola@suse.com>
2023-05-08 12:46:51 -07:00
Ian Cardoso
3982213f06
add kube-* server flags integration tests (#7416)
This commit adds SearchK3sLog function to find specific strings in integration tests log file and also removes FindStringInCmdAsync function since it was not being used.

Signed-off-by: Ian Cardoso <osodracnai@gmail.com>
2023-05-08 05:25:47 -03:00
Brad Davidson
c98137ddca Fix token startup test
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2023-05-05 15:52:12 -07:00
Brad Davidson
cf9ebb3259 Fail to validate server tokens that use bootstrap id/secret format
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2023-05-05 12:24:35 -07:00
Derek Nola
7175ebe2be
E2E: Startup test cleanup + RunCommand Enhancement (#7388)
* Add beforesuite to startup
* Reduce timeouts for startup
* Fix cleanup + set kubeconfig

Signed-off-by: Derek Nola <derek.nola@suse.com>
2023-05-05 11:00:47 -07:00
Boleyn Su
a736b4b1b9
local-storage: Fix permission (#7217)
* local-storage: Fix permission

/var/lib/rancher/k3s/storage/ should be 700
/var/lib/rancher/k3s/storage/* should be 777

Fixes #2348

Signed-off-by: Boleyn Su <boleyn.su@gmail.com>

* Fix pod command field type

* Fix to int test

Signed-off-by: Derek Nola <derek.nola@suse.com>

---------

Signed-off-by: Boleyn Su <boleyn.su@gmail.com>
Signed-off-by: Derek Nola <derek.nola@suse.com>
Co-authored-by: Brad Davidson <brad@oatmail.org>
Co-authored-by: Derek Nola <derek.nola@suse.com>
2023-05-04 10:43:54 -07:00
Brad Davidson
1ca035accc Add e2e test for --disable-agent
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2023-04-28 11:24:34 -07:00
Brooks Newberry
bbda54b332
Add longhorn storage test (#6445)
Signed-off-by: Brooks Newberry <brooks@newberry.com>
2023-04-28 11:17:19 -07:00
Ian Cardoso
1ac03aad43
Add integration tests for etc-snapshot server flags and refactor /tests/integration/integration.go/K3sStartServer (#7300)
This adds integration tests for the following flags: "--etcd-snapshot-name","--etcd-snapshot-dir","--etcd-snapshot-retention","--etcd-snapshot-schedule-cron" and "--etcd-snapshot-compress". It also refactors K3sStartServer to stop applying strings.Fields() into inputArgs, so it can accept arguments that have space in their definition.

Signed-off-by: Ian Cardoso <osodracnai@gmail.com>
2023-04-28 14:07:11 -03:00
Derek Nola
f2bde63eea
Kubernetes v1.27.1 (#7271)
* Bump go version to 1.20.3 to match upstream
* Bump cri-dockerd
* Bump golanci-lint
* go generate
* Bump selinux in cgroup test
* Bump to v1.27.1 tags
* Release documentation improvements
* Only run upgrade e2e test on PR

Signed-off-by: Derek Nola <derek.nola@suse.com>
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
Co-authored-by: Brad Davidson <brad.davidson@rancher.com>
2023-04-18 21:48:36 -07:00
fmoral2
6c394abb32
Add make commands to terraform automation and fix external dbs related issue (#7159)
* test: add make commands and dependencies

Signed-off-by: Francisco <francisco.moral@suse.com>

* fix: fix issue on logic for using external dbs and dependencies

Signed-off-by: Francisco <francisco.moral@suse.com>

---------

Signed-off-by: Francisco <francisco.moral@suse.com>
2023-04-06 12:17:13 -03:00
Derek Nola
d2e04b826a
Don't apply hardened args to agent (#7089)
Signed-off-by: Derek Nola <derek.nola@suse.com>
2023-04-04 09:35:28 -07:00
ShylajaDevadiga
8ec7d5e6b0
fix_get_sha_url (#7187)
Signed-off-by: ShylajaDevadiga <shylaja@rancher.com>
2023-03-31 13:26:29 -07:00
Derek Nola
9980504196
Fix to Rotate CA e2e test (#7101)
* Include note on service keys

Signed-off-by: Derek Nola <derek.nola@suse.com>

* Fix rotate cert ca test

Signed-off-by: Derek Nola <derek.nola@suse.com>

* Remove periods

Signed-off-by: Derek Nola <derek.nola@suse.com>

* Add new test to nightly script

Signed-off-by: Derek Nola <derek.nola@suse.com>

---------

Signed-off-by: Derek Nola <derek.nola@suse.com>
2023-03-16 17:56:17 -07:00
Esteban Esquivel Alvarado
85b261096c
Add automation for Restart command for K3s (#7002)
Signed-off-by: est-suse <esteban.esquivel@suse.com>
2023-03-14 15:47:18 -07:00
Roberto Bonafiglia
7d2f997b3e Added multiClusterCIDR E2E test
Signed-off-by: Roberto Bonafiglia <roberto.bonafiglia@suse.com>
2023-03-14 18:30:52 +01:00
Roberto Bonafiglia
262cd7de0a Added IPv6 check and agent restart on e2e test utils
Signed-off-by: Roberto Bonafiglia <roberto.bonafiglia@suse.com>
2023-03-14 18:30:52 +01:00
Derek Nola
c259403af1
Bump various dependencies for CVEs (#7044)
* Bump wrangler to 1.1.1
* Match golang.org/x/net with flannel version
* Match golang.org/x/sys with containerd version
* Update gax-go to 2.1.1
* Isolate terraform e2e test with seperate go.mod/go.sum
* Bump containerd

Signed-off-by: Derek Nola <derek.nola@suse.com>
2023-03-13 09:37:45 -07:00
Derek Nola
522ad1e697
Add E2E to Drone (#6890)
* Initial drone vagrant pipeline

Signed-off-by: Derek Nola <derek.nola@suse.com>

* Build e2e test image

Signed-off-by: Derek Nola <derek.nola@suse.com>

* Add docker registry to E2E pipeline

Signed-off-by: Derek Nola <derek.nola@suse.com>

* Bump libvirt image

Signed-off-by: Derek Nola <derek.nola@suse.com>

* Add ci flag to secretsencryption

Signed-off-by: Derek Nola <derek.nola@suse.com>

* Fix vagrant log on secretsencryption

Signed-off-by: Derek Nola <derek.nola@suse.com>

* Remove DB parallel tests

Signed-off-by: Derek Nola <derek.nola@suse.com>

* Reduce sonobuoy tests even further

Signed-off-by: Derek Nola <derek.nola@suse.com>

* Add local build

Signed-off-by: Derek Nola <derek.nola@suse.com>

* Add cron conformance pipeline

Signed-off-by: Derek Nola <derek.nola@suse.com>

* Add string output for nodes

Signed-off-by: Derek Nola <derek.nola@suse.com>

* Switch snapshot restore for upgrade cluster

Signed-off-by: Derek Nola <derek.nola@suse.com>

* Fix cp

Signed-off-by: Derek Nola <derek.nola@suse.com>

---------

Signed-off-by: Derek Nola <derek.nola@suse.com>
2023-03-10 19:53:41 -08:00
Derek Nola
9efa0797b7
Don't default to local K3s for startup test (#6950)
Signed-off-by: Derek Nola <derek.nola@suse.com>
2023-02-13 15:00:57 -08:00
Brad Davidson
3d146d2f1b Allow for multiple sets of leader-elected controllers
Addresses an issue where etcd controllers did not run on etcd-only nodes

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2023-02-10 10:46:48 -08:00
Brad Davidson
be7f751863 Add e2e tests for CA cert rotation
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2023-02-06 15:09:31 -08:00
Derek Nola
7cad3db251
E2E: Consoldiate docker and prefer bundled tests into new startup test (#6851)
* Convert docker E2E to startup E2E
* Move preferedbundled into the e2e startup test

Signed-off-by: Derek Nola <derek.nola@suse.com>
2023-02-06 10:39:46 -08:00
Derek Nola
750cff561d
Bump vagrant boxes to fedora37 (#6832)
* Bump to generic/fedora37
* fix epic permissions
* Disable sonobuoy on rootless

Signed-off-by: Derek Nola <derek.nola@suse.com>
2023-01-30 13:14:29 -08:00