Skip to content

Commit d07ee9f

Browse files
add draft for new standard scs-0201-v1
Signed-off-by: Marvin Frommhold <depressiveRobot@users.noreply.github.com>
1 parent 74a3197 commit d07ee9f

6 files changed

Lines changed: 55 additions & 9 deletions

File tree

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
title: CNCF Kubernetes conformance
3+
type: Standard
4+
status: Draft
5+
track: KaaS
6+
description: |
7+
SCS-0201 describes conformance testing of Kubernetes environments using the upstream CNCF Kubernetes e2e suite.
8+
---
9+
10+
## Introduction
11+
12+
Interoperability, consistency, and traceability play a crucial role in the deployment and use of a Kubernetes environment. Testing ensures this conformance across different Kubernetes environments.
13+
14+
The SCS project always intended to reuse existing standards whenever possible. For this reason, the upstream tooling of the [Certified Kubernetes Conformance Program](https://github.com/cncf/k8s-conformance) is used for conformance testing.
15+
16+
## Motivation
17+
18+
As an operator as well as an user, I want to check the conformance of a Kubernetes environment in order to ensure the interoperability, consistency, and traceability of it.
19+
20+
## Regulations
21+
22+
The conformance testing is performed as part of the [SCS compliance check suite](https://github.com/SovereignCloudStack/standards/tree/main/Tests) executing the standard set of conformance tests defined by the `[Conformance]` tag in the [Kubernetes e2e suite](https://github.com/kubernetes/kubernetes/tree/master/test/e2e). All conformance tests MUST be passed successfully.
23+
24+
We allow exceptions from the Kubernetes e2e tests if it is reasonable, e.g. [bugs in certain tests][https://github.com/SovereignCloudStack/standards/blob/74a3197d37cbfae3f8f0ed45644e6611186639da/Tests/kaas/scs-sonobuoy-config.yaml#L12]. Please note that exceptions may be added and/or removed in such reasonable cases and thereby allowing the standard to be updated without the need for a new version of it. If the reason for an exception goes away, so does the exception and it will therefore be removed.
25+
26+
The exceptions are listed under the key `okToFail` in
27+
[Tests/kaas/scs-sonobuoy-config-v1.yaml](https://raw.githubusercontent.com/SovereignCloudStack/standards/refs/heads/main/Tests/kaas/scs-sonobuoy-config-v1.yaml).
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
title: "CNCF Kubernetes conformance: Implementation and Testing Notes"
3+
type: Supplement
4+
track: KaaS
5+
supplements:
6+
- scs-0201-v1-cncf-conformance.md
7+
---
8+
9+
## Implementation notes
10+
11+
The actual execution of the conformance tests is performed by the [SCS compliance check suite](https://github.com/SovereignCloudStack/standards/tree/main/Tests) using [Sonobuoy](https://sonobuoy.io). The rationale for this decision and further details regarding its implementation are documented in detail in [scs-0200-v1](https://docs.scs.community/standards/scs-0200-v1-using-sonobuoy-for-kaas-conformance-tests).
12+
13+
## Automated tests
14+
15+
The script [`run_sonobuoy.py`](https://github.com/SovereignCloudStack/standards/blob/main/Tests/kaas/sonobuoy_handler/run_sonobuoy.py) connects to an existing K8s cluster and handles both the execution of Sonobuoy and the generation of the results for a test report.
16+
17+
## Manual tests
18+
19+
None.

Tests/kaas/sonobuoy_handler/run_sonobuoy.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def cli():
2020
@click.option("-k", "--kubeconfig", "kubeconfig", required=True, type=click.Path(exists=True), help="path/to/kubeconfig_file.yaml",)
2121
@click.option("-r", "--result_dir_name", "result_dir_name", type=str, default="sonobuoy_results", help="directory name to store results at",)
2222
@click.option("-c", "--check", "check_name", type=str, default="sonobuoy_executor", help="this MUST be the same name as the id in 'scs-compatible-kaas.yaml'",)
23-
@click.option("--scs-sonobuoy-config", "scs_sonobuoy_config_yaml", type=click.Path(exists=True), default="kaas/sonobuoy-config.yaml", help="Configuration for Sonobuoy (yaml format)")
23+
@click.option("--scs-sonobuoy-config", "scs_sonobuoy_config_yaml", type=click.Path(exists=True), default="kaas/scs-sonobuoy-config-v1.yaml", help="Configuration for Sonobuoy (yaml format)")
2424
@click.option('--execution-mode', 'mode', type=click.Choice(('serial', 'parallel')), default='serial')
2525
@click.option("-a", "--arg", "args", multiple=True)
2626
def sonobuoy_run(kubeconfig, result_dir_name, check_name, scs_sonobuoy_config_yaml, mode, args):
@@ -33,7 +33,7 @@ def sonobuoy_run(kubeconfig, result_dir_name, check_name, scs_sonobuoy_config_ya
3333

3434

3535
@cli.command("check-results")
36-
@click.option("--scs-sonobuoy-config", "scs_sonobuoy_config_yaml", type=click.Path(exists=True), default="kaas/scs-sonobuoy-config.yaml", help="Configuration for Sonobuoy (yaml format)")
36+
@click.option("--scs-sonobuoy-config", "scs_sonobuoy_config_yaml", type=click.Path(exists=True), default="kaas/scs-sonobuoy-config-v1.yaml", help="Configuration for Sonobuoy (yaml format)")
3737
@click.argument("sonobuoy_result_yaml", type=click.Path(exists=True))
3838
def check_results(scs_sonobuoy_config_yaml, sonobuoy_result_yaml):
3939
check_sonobuoy_result(scs_sonobuoy_config_yaml, sonobuoy_result_yaml)

Tests/kaas/sonobuoy_handler/sonobuoy_handler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def __init__(
4242
check_name="sonobuoy_handler",
4343
kubeconfig=None,
4444
result_dir_name="sonobuoy_results",
45-
scs_sonobuoy_config_yaml="kaas/sonobuoy-config.yaml",
45+
scs_sonobuoy_config_yaml="kaas/scs-sonobuoy-config-v1.yaml",
4646
args=(),
4747
):
4848
self.check_name = check_name

Tests/scs-compatible-kaas.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@ variables:
1212
- execution_mode: parallel # alternatively: serial
1313
scripts:
1414
- executable: ./kaas/sonobuoy_handler/run_sonobuoy.py
15-
args: run -k {kubeconfig} --scs-sonobuoy-config kaas/scs-sonobuoy-config.yaml -r {subject_root}/sono-results-e2e -c 'cncf-k8s-conformance' -a '--mode=certified-conformance' --execution-mode {execution_mode}
15+
args: run -k {kubeconfig} --scs-sonobuoy-config kaas/scs-sonobuoy-config-v1.yaml -r {subject_root}/sono-results-e2e -c 'cncf-k8s-conformance' -a '--mode=certified-conformance' --execution-mode {execution_mode}
1616
#~ args: -k {kubeconfig} -r {subject_root}/sono-results -c 'cncf-k8s-conformance' -a '--plugin-env e2e.E2E_DRYRUN=true'
1717
testcases:
1818
- id: cncf-k8s-conformance
1919
lifetime: year
2020
section: heavy
21-
description: Must fulfill all requirements of _CNCF Kubernetes conformance_.
22-
url: https://github.com/cncf/k8s-conformance/tree/master
21+
description: Must fulfill all requirements of scs-0201-v1.
22+
url: https://docs.scs.community/standards/scs-0201-v1-cncf-conformance#regulations
2323
- executable: ./kaas/k8s-version-policy/k8s_version_policy.py
2424
args: -k {kubeconfig}
2525
testcases:
@@ -35,7 +35,7 @@ scripts:
3535
description: Must fulfill all requirements of scs-0214-v2.
3636
url: https://docs.scs.community/standards/scs-0214-v2-k8s-node-distribution#decision
3737
- executable: ./kaas/sonobuoy_handler/run_sonobuoy.py
38-
args: run -k {kubeconfig} --scs-sonobuoy-config kaas/scs-sonobuoy-config.yaml -r {subject_root}/sono-results-0219 -c 'kaas-networking-check' -a '--e2e-focus "NetworkPolicy"' --execution-mode {execution_mode}
38+
args: run -k {kubeconfig} --scs-sonobuoy-config kaas/scs-sonobuoy-config-v1.yaml -r {subject_root}/sono-results-0219 -c 'kaas-networking-check' -a '--e2e-focus "NetworkPolicy"' --execution-mode {execution_mode}
3939
testcases:
4040
- id: kaas-networking-check
4141
lifetime: month
@@ -44,8 +44,8 @@ scripts:
4444
url: https://docs.scs.community/standards/scs-0219-v1-kaas-networking#decision
4545
modules:
4646
- id: cncf-k8s-conformance
47-
name: CNCF Kubernetes conformance
48-
url: https://github.com/cncf/k8s-conformance/tree/master
47+
name: scs-0201-v1: CNCF Kubernetes conformance
48+
url: https://docs.scs.community/standards/scs-0201-v1-cncf-conformance
4949
targets:
5050
main:
5151
- cncf-k8s-conformance

0 commit comments

Comments
 (0)