Skip to content

Commit

Permalink
Add test for k8s version recency (#288)
Browse files Browse the repository at this point in the history
* add initial test script
* check k8s release for releases
* check cluster with kubeconfig for version
* check version against each other
* if not matching, check for cadence time

Signed-off-by: Hannes Baum <[email protected]>
  • Loading branch information
cah-hbaum committed Jul 5, 2023
1 parent 59dc21e commit eb6028f
Show file tree
Hide file tree
Showing 5 changed files with 491 additions and 2 deletions.
4 changes: 3 additions & 1 deletion Standards/scs-0210-v1-k8s-new-version-policy.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,6 @@ All important documents regarding versioning, releases, etc. for the official Ku

## Conformance Tests

TBD
The conformance test is written in the 'k8s-version-recency-check.py' script. The script requires the path to a valid
kubeconfig file, which should describe the k8s cluster under test. This can either be done by creating a config from
the also provided 'config.yaml.template' or by calling the test script with its cli arguments.
Empty file removed Tests/kaas/.gitkeep
Empty file.
24 changes: 24 additions & 0 deletions Tests/kaas/k8s-version-recency/config.yaml.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
## Configuration file for the K8s Version Recency Test

logging:
level: INFO
version: 1
disable_existing_loggers: False
formatters:
k8s-version-recency-check:
format: "%(levelname)s: %(message)s"
handlers:
console:
class: logging.StreamHandler
formatter: k8s-version-recency-check
stream: ext://sys.stdout
file:
class: logging.handlers.WatchedFileHandler
formatter: k8s-version-recency-check
filename: MY-LOG-FILE-NAME.log
root: # Configuring the default (root) logger is highly recommended
handlers: [console]
loggers:
k8s-version-recency-check:
handlers: [console, file]
propagate: no
Loading

0 comments on commit eb6028f

Please sign in to comment.