Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/sonobuoy integration #819

Closed
wants to merge 40 commits into from
Closed

Feat/sonobuoy integration #819

wants to merge 40 commits into from

Conversation

tonifinger
Copy link
Contributor

This PR introduces the usage of sonobuoy to

  • Run kubernetes e2e tests
  • Parse results from the sonobouy testsuite

tonifinger and others added 30 commits September 20, 2024 14:09
And apply static plugin

Signed-off-by: Toni Finger <[email protected]>
Signed-off-by: Toni Finger <[email protected]>
Splitting the functionality into the
handling of sonobuoys and the provision of K8s clusters.

Signed-off-by: Toni Finger <[email protected]>
Signed-off-by: Toni Finger <[email protected]>
Signed-off-by: Matthias Büchse <[email protected]>
Rework rebase conflicts

Signed-off-by: Toni Finger <[email protected]>
In order to have one clusterspec file for each k8s version

Signed-off-by: Toni Finger <[email protected]>
Signed-off-by: Toni Finger <[email protected]>
Signed-off-by: Toni Finger <[email protected]>
Signed-off-by: Toni Finger <[email protected]>
Co-authored-by: Matthias Büchse <[email protected]>
Signed-off-by: tonifinger <[email protected]>
Co-authored-by: Matthias Büchse <[email protected]>
Signed-off-by: tonifinger <[email protected]>
Add plugin_config to delete process as well
Add missing file `kind_cluster_config.yaml` as configuration example

Signed-off-by: Toni Finger <[email protected]>
make use of Not ImplementedError

Signed-off-by: Toni Finger <[email protected]>
Signed-off-by: Toni Finger <[email protected]>
Co-authored-by: Matthias Büchse <[email protected]>
Signed-off-by: tonifinger <[email protected]>
Removed the return of the kubeconfig filepath from the `create_cluster`
method as we do not use this handling.

Signed-off-by: Toni Finger <[email protected]>
Signed-off-by: Toni Finger <[email protected]>
Remove default values to prevent parameters from being optional

Signed-off-by: Toni Finger <[email protected]>
@tonifinger tonifinger self-assigned this Nov 13, 2024
@tonifinger tonifinger added the SCS-VP10 Related to tender lot SCS-VP10 label Nov 13, 2024
@tonifinger
Copy link
Contributor Author

tonifinger commented Nov 19, 2024

I performed the cncf conformance tests using the moin cluster with the following workload cluster:

apiVersion: cluster.x-k8s.io/v1beta1
kind: Cluster
metadata:
  name: scs-cluster-129
  labels:
    managed-secret: cloud-config
spec:
  topology:
    variables:
    class: openstack-scs-1-29-v4
    controlPlane:
      replicas: 3
    version: v1.29.10
    workers:
      machineDeployments:
        - class: default-worker
          name: md-0
          replicas: 3

I manually downloaded the kubeconfig.yaml for the workload cluster and used the static_plugin to run the scs-conformance tests against the cluster:

(venv) tf@tf-ThinkPad:~/standards/Tests$ time ./scs-test-runner.py --config ./config.toml --debug run --preset="all-kaas" --monitor-url localhost -o REPORT.yaml
DEBUG: running tests for scope(s) scs-compatible-kaas and subject(s) cspB-static
DEBUG: monitor url: localhost, num_workers: 4, output: REPORT.yaml
DEBUG: running "./kaas/sonobuoy_handler/run_sonobuoy.py -k cspB-static/kubeconfig.yaml -r cspB-static/sono-results -c 'cncf-conformance'  -a '--mode=certified-conformance'"...
ERROR: failed: 4
ERROR: skipped: 7022
ERROR: 388 passed, 4 failed, 7022 skipped
DEBUG: .. rc 3, 0 critical, 3 error
WARNING: ignoring invalid result id: cncf-conformance
********************************************************************************
cspB-static SCS-compatible KaaS v1 (draft):
- main: TENTATIVE pass (0 passed, 1 missing)
  - MISSING:
    - cncf-k8s-conformance:
4.94user 1.45system 2:04:23elapsed 0%CPU (0avgtext+0avgdata 59796maxresident)k
88592inputs+64outputs (265major+29770minor)pagefaults 0swaps

As you can see by the output the cluster did not pass the cncf conformance tests.

REPORT.yaml:

cat REPORT.yaml
---
spec:
  uuid: 1fffebe6-fd4b-44d3-a36c-fc58b4bb0180
  name: SCS-compatible KaaS
  url: https://raw.githubusercontent.com/SovereignCloudStack/standards/main/Tests/scs-compatible-kaas.yaml
checked_at: 2024-11-19 01:33:03.410632
reference_date: 2024-11-18
subject: cspB-static
versions:
  v1: {}
run:
  uuid: a2484705-da2b-4ca3-abfe-d92b8ed733b8
  argv:
  - /home/tf/repos/ci/scs/01_ISSUES/standard_710/Tests/./scs-compatible-kaas.yaml
  - --debug
  - -C
  - -o
  - /home/tf/repos/ci/scs/01_ISSUES/standard_710/Tests/tmpqs_qlpiq/report-0.yaml
  - -s
  - cspB-static
  - -a
  - os_cloud=cspB-static
  - -a
  - subject_root=cspB-static
  assignment:
    os_cloud: cspB-static
    subject_root: cspB-static
  sections: null
  forced_version: null
  forced_tests: null
  invocations:
    6c5669e7-048a-495c-ba26-e4dfa199d407:
      id: 6c5669e7-048a-495c-ba26-e4dfa199d407
      cmd: ./kaas/sonobuoy_handler/run_sonobuoy.py -k cspB-static/kubeconfig.yaml
        -r cspB-static/sono-results -c 'cncf-conformance'  -a '--mode=certified-conformance'
      result: 0
      results:
        cncf-conformance: -1
      rc: 3
      stdout:
      - 'Sonobuoy Version: v0.57.2'
      - 'MinimumKubeVersion: 1.17.0'
      - 'MaximumKubeVersion: 1.99.99'
      - 'GitSHA: cc22d58f4c8b5a155bd1778cd3702eca5ad43e05'
      - 'GoVersion: go1.22.4'
      - 'Platform: linux/amd64'
      - 'API Version:  v1.29.10'
      - check kubeconfig
      - plugin:e2e:failed
      - plugin:systemd-logs:passed
      - plugin:systemd-logs:passed
      - plugin:systemd-logs:passed
      - plugin:systemd-logs:passed
      - plugin:systemd-logs:passed
      - plugin:systemd-logs:passed
      - 'cncf-conformance: FAIL'
      stderr:
      - 'ERROR: failed: 4'
      - 'ERROR: skipped: 7022'
      - 'ERROR: 388 passed, 4 failed, 7022 skipped'
      info: 0
      warning: 0
      error: 3
      critical: 0

@tonifinger tonifinger force-pushed the feat/sonobuoy-integration branch from 8231dc1 to 07cd635 Compare November 19, 2024 12:30
The scripts introduced in this commit allow using Sonobuoy to:
- Run kubernetes e2e tests
- Parse results from the sonobouy testsuite

Signed-off-by: Toni Finger <[email protected]>
@tonifinger tonifinger force-pushed the feat/sonobuoy-integration branch from 07cd635 to e3f0932 Compare November 19, 2024 12:54
Remove missing not needed f string formatter

Signed-off-by: Toni Finger <[email protected]>
@mbuechse
Copy link
Contributor

To be continued at #832

@mbuechse mbuechse closed this Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
SCS-VP10 Related to tender lot SCS-VP10
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants