The main purpose of this repo is build the necessary tooling to collect necessary synchronization-related data logs from a running OpenShift cluster. This data will then be leveraged by different analysis tools to determine if the cluster is running within acceptable bounds synchronization-wise.```
The core approach taken is to strongly encourage and enforce separation of concerns between:
- Declarative description of the cluster(s) under test
- Configuration of a test (e.g. number of repetitions, acceptable thresholds, etc.)
- Collectors - methods of collecting indicative information about the cluster
- Checks - performed on collected values
- Install Go
- Install dependencies with
go mod tidy
- Install dev binaries:
make install-tools
. Ensure your$GOBIN
is on your$PATH
- yamllint
- Install yamllint with
sudo yum install yamllint
- run with
yamllint ./
- Install yamllint with
- golangci-lint
- Install golangci-lint
- run with
make lint
- license-eye
- Install license-eye with
go install github.com/apache/skywalking-eyes/cmd/license-eye@latest
- run with
license-eye header check
orlicense-eye header fix
- Install license-eye with
- pre-commit
- on RHEL,
pre-commit
requires recompiling python to include optional sqlite modules:sudo yum install sqlite-devel
- See instructions here
- install pre-commit with
pip3.10 install pre-commit
- configure your repository to run pre-commit hooks with
pre-commit install
- manually run against all files with
pre-commit run --all-files
or against staged files withpre-commit run
. - Otherwise pre-commit will now run automatically when you make a new commit.
- on RHEL,
Run the following command to build the binary used in the following commands:
go build
Run the following command (check help string for more details):
./vse-sync-collection-tools env verify --interface="<ptp interface>" --kubeconfig="${KUBECONFIG}"
Run the following command (check help string for more details):
./vse-sync-collection-tools collect --interface="<ptp interface>" --kubeconfig="${KUBECONFIG}"
The log subcommand has been removed. Instead we have implimented at collector which is enabled by default.
If possible you should use a log aggregator. You can control the collectors running using the --collector
flag.
TODO: implement tests for all packages
To test the framework components run ginkgo pkg/<packagename>
, for example to run the unit tests for the config
package use ginkgo pkg/config
- unit tests for all of
pkg/
- add more collectors
- better data persistance options