diff --git a/.checkmake b/.checkmake new file mode 100644 index 0000000000..90fc7b3e20 --- /dev/null +++ b/.checkmake @@ -0,0 +1,2 @@ +[maxbodylength] +disabled = true diff --git a/.github/workflows/pre-main.yaml b/.github/workflows/pre-main.yaml index 3762543c8d..428a2960f3 100644 --- a/.github/workflows/pre-main.yaml +++ b/.github/workflows/pre-main.yaml @@ -32,11 +32,8 @@ env: jobs: lint: - name: Run Linter and Vet - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [ubuntu-22.04, macos-latest] + name: Run Linters and Vet + runs-on: ubuntu-latest env: SHELL: /bin/bash @@ -59,84 +56,50 @@ jobs: with: token: ${{ secrets.GITHUB_TOKEN }} - # TODO: golangci-lint team recommends using a GitHub Action to perform golangci-lint responsibilities. However - # there does not appear to be a way to honor our existing .golangci.yml. For now, mimic developer behavior. - - name: Install golangci-lint - run: make install-lint - - - name: Install checkmake (Linux) - run: curl --location --output $CM_BIN --silent $CM_URL_LINUX - if: runner.os == 'Linux' - - - name: Install checkmake (MacOS) - run: brew install checkmake - if: runner.os == 'macOS' - - - run: chmod +x $CM_BIN - if: runner.os == 'Linux' - - - name: Install hadolint (Linux) - run: | - curl \ - --location \ - --output /usr/local/bin/hadolint \ - https://github.com/hadolint/hadolint/releases/download/v2.12.0/hadolint-Linux-x86_64 - chmod +x /usr/local/bin/hadolint - if: runner.os == 'Linux' - - - name: Install hadolint (MacOS) + - name: Install checkmake run: | - brew install hadolint - if: runner.os == 'macOS' + curl --location --output $CM_BIN --silent $CM_URL_LINUX + chmod +x $CM_BIN - - name: Install shfmt (Linux) - run: make install-shfmt - if: runner.os == 'Linux' + - name: Install Shfmt + uses: mfinelli/setup-shfmt@v3 - - name: Install shfmt (MacOS) - run: brew install shfmt - if: runner.os == 'macOS' + - name: Golangci-lint + uses: golangci/golangci-lint-action@v3 + with: + version: v1.54 + args: --timeout 10m0s - - name: make lint - run: make lint + - name: Checkmake + run: checkmake --config=.checkmake Makefile - - name: make vet - run: make vet - action-linters: - name: Checkmake, hadolint, markdownlint, shellcheck, shfmt, typos, yamllint - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@v4 - - run: | - curl --location --output $CM_BIN --silent $CM_URL_LINUX - chmod +x $CM_BIN - $CM_BIN Makefile - - uses: hadolint/hadolint-action@v3.1.0 + - name: Hadolint + uses: hadolint/hadolint-action@v3.1.0 with: dockerfile: Dockerfile recursive: true - - uses: nosborn/github-action-markdown-cli@v3.3.0 + + - name: Shfmt + run: shfmt -d *.sh script + + - name: Markdownlint + uses: nosborn/github-action-markdown-cli@v3.3.0 with: files: . - ignore_files: cmd/tnf/generate/catalog/{INTRO,TEST_CASE_CATALOG}.md - - uses: ludeeus/action-shellcheck@master - - uses: mfinelli/setup-shfmt@v3 - - run: shfmt -d *.sh script - - uses: crate-ci/typos@master - - uses: ibiqlik/action-yamllint@v3 - with: - config_data: | - extends: default - rules: - line-length: - max: 180 - level: warning - trailing-spaces: - level: warning - brackets: - level: warning - empty-lines: - level: warning + + - name: ShellCheck + uses: ludeeus/action-shellcheck@master + + - name: Typos + uses: crate-ci/typos@master + + - name: Yamllint + uses: ibiqlik/action-yamllint@v3 + with: + config_file: .yamllint.yml + + - name: Go vet + run: make vet unit-tests: name: Run Unit Tests runs-on: ${{ matrix.os }} @@ -376,7 +339,7 @@ jobs: uses: actions/setup-go@v4 with: go-version: 1.21.2 - # Prepare collector to be used when running smoke tests + - name: Check out `Collector` uses: actions/checkout@v4 with: @@ -387,11 +350,6 @@ jobs: - name: Setup tmate session uses: mxschmitt/action-tmate@v3 - - name: Deploy collector and mysql - uses: ./collector/.github/actions/prepare-collector-for-use - with: - working_directory: collector - # Perform smoke tests using a TNF container. - name: Check out code into the Go module directory uses: actions/checkout@v4 @@ -430,7 +388,7 @@ jobs: - name: 'Test: Run Smoke Tests in a TNF container' run: TNF_LOG_LEVEL=${TNF_SMOKE_TESTS_LOG_LEVEL} TNF_ENABLE_DATA_COLLECTION=true ./run-tnf-container.sh ${{ env.TESTING_CMD_PARAMS }} -l "${SMOKE_TESTS_GINKGO_LABELS_FILTER}" - # Perform tests on collector + # Prepare collector to be used when running smoke tests - name: Check out `Collector` uses: actions/checkout@v4 with: diff --git a/.yamllint.yml b/.yamllint.yml new file mode 100644 index 0000000000..913df75baf --- /dev/null +++ b/.yamllint.yml @@ -0,0 +1,12 @@ +extends: default +rules: + line-length: + max: 180 + level: warning + trailing-spaces: + level: warning + brackets: + level: warning + empty-lines: + level: warning +no_warnings: true diff --git a/Dockerfile b/Dockerfile index e18ad4cb84..078efd0af2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM registry.access.redhat.com/ubi8/ubi:8.8-1067.1696517599 AS build +FROM registry.access.redhat.com/ubi8/ubi:8.8-1067.1698056881 AS build ENV TNF_DIR=/usr/tnf ENV \ TNF_SRC_DIR=${TNF_DIR}/tnf-src \ @@ -99,7 +99,7 @@ FROM quay.io/testnetworkfunction/oct:latest AS db # Copy the state into a new flattened image to reduce size. # TODO run as non-root -FROM registry.access.redhat.com/ubi8/ubi-minimal:8.8-1072.1696517598 +FROM registry.access.redhat.com/ubi8/ubi-minimal:8.8-1072.1697626218 ENV \ TNF_DIR=/usr/tnf \ diff --git a/Makefile b/Makefile index fcd8d3625f..70e34f69a8 100644 --- a/Makefile +++ b/Makefile @@ -55,6 +55,7 @@ LINKER_TNF_RELEASE_FLAGS+= -X github.com/test-network-function/cnf-certification LINKER_TNF_RELEASE_FLAGS+= -X github.com/test-network-function/cnf-certification-test/cnf-certification-test.GitPreviousRelease=${GIT_PREVIOUS_RELEASE} LINKER_TNF_RELEASE_FLAGS+= -X github.com/test-network-function/cnf-certification-test/cnf-certification-test.ClaimFormatVersion=${CLAIM_FORMAT_VERSION} PARSER_RELEASE=$(shell jq .parserTag version.json) +BASH_SCRIPTS=$(shell find -name "*.sh" -not -path "./.git/*") all: build @@ -77,10 +78,14 @@ clean: # Runs configured linters lint: - checkmake Makefile + checkmake --config=.checkmake Makefile golangci-lint run --timeout 10m0s hadolint Dockerfile shfmt -d *.sh script + typos + markdownlint '**/*.md' + yamllint --no-warnings . + shellcheck --format=gcc ${BASH_SCRIPTS} # Builds and runs unit tests test: coverage-qe diff --git a/_typos.toml b/_typos.toml index badcbe8e48..16e80207ec 100644 --- a/_typos.toml +++ b/_typos.toml @@ -2,4 +2,4 @@ iif = "iif" [files] -extend-exclude = ["go.mod", "results.html", "cmd/tnf/claim/compare/testdata", "docs/assets/images/demo-config.svg"] +extend-exclude = ["go.mod", "results.html", "cmd/tnf/claim/compare/testdata", "docs/assets/images/*.svg"] diff --git a/cmd/tnf/claim/compare/compare.go b/cmd/tnf/claim/compare/compare.go index 54c88d1967..1c78f703a8 100644 --- a/cmd/tnf/claim/compare/compare.go +++ b/cmd/tnf/claim/compare/compare.go @@ -14,14 +14,75 @@ import ( "github.com/test-network-function/cnf-certification-test/cmd/tnf/pkg/claim" ) +const longHelp = `Compares sections of both claim files and the differences are shown in a table per section. +This tool can be helpful when the result of some test cases is different between two (consecutive) runs, as it shows +configuration differences in both the CNF Cert Suite config and the cluster nodes that could be the root cause for +some of the test cases results discrepancy. + +All the compared sections, except the test cases results are compared blindly, traversing the whole json tree and +substrees to get a list of all the fields and their values. Three tables are shown: + - Differences: same fields with different values. + - Fields in claim 1 only: json fields in claim file 1 that don't exist in claim 2. + - Fields in claim 2 only: json fields in claim file 2 that don't exist in claim 1. + +Let's say one of the nodes of the claim.json file contains this struct: +{ + "field1": "value1", + "field2": { + "field3": "value2", + "field4": { + "field5": "value3", + "field6": "value4" + } + } +} + +When parsing that json struct fields, it will produce a list of fields like this: +/field1=value1 +/field2/field3=value2 +/field2/field4/field5=value3 +/field2/field4/field6=finalvalue2 + +Once this list of field's path+value strings has been obtained from both claim files, +it is compared in order to find the differences or the fields that only exist on each file. + +This is a fake example of a node "clus0-0" whose first CNI (index 0) has a different cniVersion +and the ipMask flag of its first plugin (also index 0) has changed to false in the second run. +Also, the plugin has another "newFakeFlag" config flag in claim 2 that didn't exist in clam file 1. + +... +CNIs: Differences +FIELD CLAIM 1 CLAIM 2 +/clus0-0/0/cniVersion 1.0.0 1.0.1 +/clus0-1/0/plugins/0/ipMasq true false + +CNIs: Only in CLAIM 1 + + +CNIs: Only in CLAIM 2 +/clus0-1/0/plugins/0/newFakeFlag=true +... + + Currently, the following sections are compared, in this order: + - claim.versions + - claim.Results + - claim.configurations.Config + - claim.nodes.cniPlugins + - claim.nodes.csiDriver + - claim.nodes.nodesHwInfo + - claim.nodes.nodeSummary +` + var ( Claim1FilePathFlag string Claim2FilePathFlag string claimCompareFiles = &cobra.Command{ - Use: "compare", - Short: "Compare two claim files.", - RunE: claimCompare, + Use: "compare", + Short: "Compare two claim files.", + Long: longHelp, + Example: "claim compare -1 claim1.json -2 claim2.json", + RunE: claimCompare, } ) diff --git a/cnf-certification-test/platform/operatingsystem/files/rhcos_version_map b/cnf-certification-test/platform/operatingsystem/files/rhcos_version_map index cb6607fa0b..66b61e5820 100644 --- a/cnf-certification-test/platform/operatingsystem/files/rhcos_version_map +++ b/cnf-certification-test/platform/operatingsystem/files/rhcos_version_map @@ -135,6 +135,7 @@ 4.11.5 / 411.86.202209140028-0 4.11.50 / 411.86.202309200611-0 4.11.51 / 411.86.202310091037-0 +4.11.52 / 411.86.202310140407-0 4.11.6 / 411.86.202209211811-0 4.11.7 / 411.86.202209211811-0 4.11.8 / 411.86.202210032349-0 @@ -181,7 +182,9 @@ 4.12.36 / 412.86.202309200923-0 4.12.37 / 412.86.202309281644-0 4.12.38 / 412.86.202310111011-0 +4.12.39 / 412.86.202310141028-0 4.12.4 / 412.86.202302091419-0 +4.12.40 / 412.86.202310170023-0 4.12.5 / 412.86.202302170236-0 4.12.6 / 412.86.202302282003-0 4.12.7 / 412.86.202303011010-0 @@ -209,6 +212,7 @@ 4.13.15 / 413.92.202310021538-0 4.13.16 / 413.92.202310100714-0 4.13.17 / 413.92.202310141129-0 +4.13.18 / 413.92.202310170351-0 4.13.2 / 413.92.202305302312-0 4.13.3 / 413.92.202306070210-0 4.13.4 / 413.92.202306141213-0 @@ -229,6 +233,7 @@ 4.14.0-rc.4 / 414.92.202309282257-0 4.14.0-rc.5 / 414.92.202310100209-0 4.14.0-rc.6 / 414.92.202310121638-0 +4.14.0-rc.7 / 414.92.202310210434-0 4.4.0 / 44.81.202004260825-0 4.4.0-rc.0 / 44.81.202003110830-0 4.4.0-rc.1 / 44.81.202003130330-0 diff --git a/docs/assets/images/claim-compare-cni.svg b/docs/assets/images/claim-compare-cni.svg new file mode 100644 index 0000000000..a47bed88d4 --- /dev/null +++ b/docs/assets/images/claim-compare-cni.svg @@ -0,0 +1,254 @@ + + + + + + + + + + + $ $ c $ cl $ cle $ clea $ clear $ clear $ $ v $ vi $ vim $ vim $ vim c $ vim cl $ vim cla $ vim clai $ vim claim $ vim claim2 $ vim claim2. $ vim claim2.j $ vim claim2.json $ vim claim2.json "claim2.json""claim2.json" 11888L, 553715B 11195 "Telco": "Mandatory"11196 }, 11197 "duration": 111202, 11198 "endTime": "2023-09-04 09:18:08.856076584 -0500 CDT m=+20.598088352",11199 "failureLineContent": "",11200 "failureLocation": ":0",11201 "failureReason": "",11202 "startTime": "2023-09-04 09:18:08.855965389 -0500 CDT m=+20.597977150",11203 "state": "failed",11204 "testID": {11205 "id": "observability-pod-disruption-budget",11206 "suite": "observability",11207 "tags": "common"11208 }11209 }11210 ],11211 "observability-termination-policy": ["claim2.json" 11888L, 553715B11203,11 94%11203 "state": "failed",/ /c 11203 "state": "failed",11207 "tags": "common"11212 {/c /cn 11213 "capturedTestOutput": "FAILURE: [container: xdp-c pod: xdp ns: tnf] does not have a TerminationMessagePolicy: FallbackToLogsOnError\n{\"CompliantObjectsOut\":[{\"ObjectType\":\"Container\",\"ObjectFieldsKeys\":[\"Reason For Compliance\",\"Namesp ace\",\"Pod Name\",\"Container Name\"],\"ObjectFieldsValues\":[\"TerminationMessagePolicy is FallbackToLogsOnError\",\"tnf\",\"test-0\",\"test\"]},{\"ObjectType\":\"Container\ ace\",\"Pod Name\",\"Container Name\"],\"ObjectFieldsValues\":[\"TerminationMessagePolicy is FallbackToLogsOnError\",\"tnf\",\"test-0\",\"test\"]},{\"ObjectType\":\"Container\",\"ObjectFieldsKeys\":[\"Reason For Compliance\",\"Namespace\",\"Pod Name\",\"C ontainer Name\"],\"ObjectFieldsValues\":[\"TerminationMessagePolicy is FallbackToLogsOnError\",\"tnf\",\"test-1\",\"test\"]},{\"ObjectType\":\"Container\",\"ObjectFieldsKeys\":[\"Reason For Compliance\",\"Namespace\",\"Pod Name\",\"Container Name\"],\"Obj ectFieldsValues\":[\" ectFieldsValues\":[\"TerminationMessagePolicy is FallbackToLogsOnError\",\"tnf\",\"test-765d6b8dcf-gbvsd\",\"test\"]},{\"ObjectType\":\"Container\",\"ObjectFieldsKeys\":[\"Reason For Compliance\",\"Namespace\",\"Pod Name\",\"Container Name\"],\"ObjectFiel dsValues\":[\"TerminationMessagePolicy is FallbackToLogsOnError\",\"tnf\",\"test-765d6b8dcf-s768n\",\"test\"]}],\"NonCompliantObjectsOut\":[{\"ObjectType\":\"Container\" dsValues\":[\"TerminationMessagePolicy is FallbackToLogsOnError\",\"tnf\",\"test-765d6b8dcf-s768n\",\"test\"]}],\"NonCompliantObjectsOut\":[{\"ObjectType\":\"Container\",\"ObjectFieldsKeys\":[\"Reason For Non Compliance\",\"Namespace\",\"Pod Name\",\"Cont ainer Name\"],\"ObjectFieldsValues\":[\"TerminationMessagePolicy is not FallbackToLogsOnError\",\"tnf\",\"xdp\",\"xdp-c\"]}]}\n%!(EXTRA []interface {}=[])",11214 "catalogInfo": {11215 "bestPracticeReference": "https://test-network-function.github.io/cnf-best-practices/#cnf-best-practices-pod-exit-status",11216 "description": "Check that all containers are using terminationMes11216 "description": "Check that all containers are using terminationMessagePolicy: FallbackToLogsOnError. There are different ways a pod can stop on an OpenShift cluster. One way is that the pod can remain alive but non-functional. Another way is t hat the pod can crash and become non-functional. In the first case, if the administrator has implemented liveness and readiness checks, OpenShift can stop the pod and either restart it on the same node or a different node in the cluster. For the second ca se, when the application in the pod stops, it should exit with a code and write suitable log entries to help the administrator diagnose what the issue was that caused the problem.",11217 "exceptionProcess": "There is no documented exception process for this.",11218 "remediation": "Ensure containers are all using FallbackToLogsOnError in terminationMessagePolicy"/cn /cni 86 ] 87 } 88 }, 89 "metadata": { 90 "endTime": "2023-09-04T14:18:08+00:00", 91 "startTime": "2023-09-04T14:17:48+00:00" 92 }, 93 "nodes": { 94 "cniPlugins": { 95 "clus0-0": [ 96 { 97 "cniVersion": "1.0.0", 98 "name": "crio", 99 "plugins": [ 100 application in the pod stops, it should exit with a code and write suitable log entries to help the administrator diagnose what the issue was that caused the problem.", 100 { 101 "bridge": "cni0", 102 "hairpinMode": true, /cni /cniP 94 "cniPlugins": { /cniP /cniPl 94 "cniPlugins": { /cniPl /cniPlu 94 "cniPlugins": { /cniPlu /cniPlug 94 "cniPlugins": { /cniPlug /cniPlug 94 "cniPlugins": { search hit BOTTOM, continuing at TOP 94,8 0% 94 "cniPlugins": { 95 "clus0-0": [ search hit BOTTOM, continuing at TOP 95,8 0% 96 { search hit BOTTOM, continuing at TOP 96,8 0% 97 "cniVersion": "1.0.0", search hit BOTTOM, continuing at TOP 97,8 0% 97 "cniVersion": "1.0.0", search hit BOTTOM, continuing at TOP 97,13 0% 97 "cniVersion": "1.0.0", search hit BOTTOM, continuing at TOP 97,14 0% 97 "cniVersion": "1.0.0", search hit BOTTOM, continuing at TOP 97,24 0% 97 "cniVersion": "1.0.0", search hit BOTTOM, continuing at TOP 97,27 0% 97 "cniVersion": "1.0.0", search hit BOTTOM, continuing at TOP 97,28 0% 97 "cniVersion": "1.0.0", search hit BOTTOM, continuing at TOP 97,29 0% 97 "cniVersion": "1.0.0", search hit BOTTOM, continuing at TOP 97,30 0% 97 "cniVersion": "1.0.0", search hit BOTTOM, continuing at TOP 97,31 0% 97 "cniVersion": "1.0.0", search hit BOTTOM, continuing at TOP 97,32 0% 97 "cniVersion": "1.0.1", 97 "cniVersion": "1.0.1", : :w :wq :wq "claim2.json" 11888L, 553715B written $ $ . $ ./ $ ./t $ ./tn $ ./tnf $ ./tnf $ ./tnf c $ ./tnf cl $ ./tnf cla $ ./tnf clai $ ./tnf claim $ ./tnf claim $ ./tnf claim c $ ./tnf claim co $ ./tnf claim com $ ./tnf claim comp $ ./tnf claim compa $ ./tnf claim compar $ ./tnf claim compare $ ./tnf claim compare $ ./tnf claim compare - $ ./tnf claim compare -1 $ ./tnf claim compare -1 $ ./tnf claim compare -1 c $ ./tnf claim compare -1 cl $ ./tnf claim compare -1 cla $ ./tnf claim compare -1 clai $ ./tnf claim compare -1 claim $ ./tnf claim compare -1 claim. $ ./tnf claim compare -1 claim.1 $ ./tnf claim compare -1 claim.1j $ ./tnf claim compare -1 claim.1js $ ./tnf claim compare -1 claim.1jso $ ./tnf claim compare -1 claim.1json $ ./tnf claim compare -1 claim1 $ ./tnf claim compare -1 claim1. $ ./tnf claim compare -1 claim1.j $ ./tnf claim compare -1 claim1.json $ ./tnf claim compare -1 claim1.json - $ ./tnf claim compare -1 claim1.json -2 $ ./tnf claim compare -1 claim1.json -2 $ ./tnf claim compare -1 claim1.json -2 c $ ./tnf claim compare -1 claim1.json -2 cl $ ./tnf claim compare -1 claim1.json -2 cla $ ./tnf claim compare -1 claim1.json -2 clai $ ./tnf claim compare -1 claim1.json -2 claim $ ./tnf claim compare -1 claim1.json -2 claim2 $ ./tnf claim compare -1 claim1.json -2 claim2.json $ ./tnf claim compare -1 claim1.json -2 claim2.json | $ ./tnf claim compare -1 claim1.json -2 claim2.json | $ ./tnf claim compare -1 claim1.json -2 claim2.json | l $ ./tnf claim compare -1 claim1.json -2 claim2.json | le $ ./tnf claim compare -1 claim1.json -2 claim2.json | les $ ./tnf claim compare -1 claim1.json -2 claim2.json | less $ ./tnf claim compare -1 claim1.json -2 claim2.json | less VERSIONS: Differences FIELD CLAIM 1 CLAIM 2 <none> VERSIONS: Only in CLAIM 1 VERSIONS: Only in CLAIM 2 <none> RESULTS SUMMARY --------------- STATUS # in CLAIM-1 # in CLAIM-2 passed 3 2 skipped 86 86 failed 1 2RESULTS DIFFERENCES ------------------- TEST CASE NAME CLAIM-1 CLAIM-2 observability-pod-disruption-budget passed failed CONFIGURATIONS -------------- CNF Cert Suite Configuration: Differences CNF Cert Suite Configuration: Only in CLAIM 1 CNF Cert Suite Configuration: Only in CLAIM 2 Cluster abnormal events count CLAIM 1 CLAIM 2 1 1 CLUSTER NODES DIFFERENCES ------------------------- Nodes: Differences Nodes: Only in CLAIM 1 Nodes: Only in CLAIM 2 CNIs: Differences FIELD CLAIM 1 CLAIM 2 /clus0-0/0/cniVersion 1.0.0 1.0.1 CNIs: Only in CLAIM 1 CNIs: Only in CLAIM 2 $ e $ ex $ exi $ exit $ exit exit + \ No newline at end of file diff --git a/docs/assets/images/claim-compare-nodes.svg b/docs/assets/images/claim-compare-nodes.svg new file mode 100644 index 0000000000..00d4bf9933 --- /dev/null +++ b/docs/assets/images/claim-compare-nodes.svg @@ -0,0 +1,279 @@ + + + + + + + + + + + $ $ c $ cl $ cle $ clea $ clear $ clear $ $ v $ vi $ vim $ vim $ vim c $ vim cl $ vim cla $ vim clai $ vim claim $ vim claim2 $ vim claim2. $ vim claim2.j $ vim claim2.js $ vim claim2.jso $ vim claim2.json $ vim claim2.json "claim2.json""claim2.json" 11888L, 553715B 1 { 2 "claim": { 3 "configurations" : { 4 "AbnormalEvents" : ["EVENT1"], 5 "Config": { 6 "acceptedKernelTaints": [ 7 { 8 "module": "vboxsf" 9 }, 10 { 11 "module": "vboxguest" 12 } 13 ], 14 "certifiedcontainerinfo": [ 15 { 16 "digest": "", 17 "registry": "","claim2.json" 11888L, 553715B1,1Top 1 { / /n 1 { 3 "configurations" : { /n /no 4 "AbnormalEvents" : ["EVENT1"],/no /nod 85 "sctp" 86 ] 87 } 88 }, 89 "metadata": { 90 "endTime": "2023-09-04T14:18:08+00:00", 91 "startTime": "2023-09-04T14:17:48+00:00" 92 }, 93 "nodes": { 94 "cniPlugins": { 95 "clus0-0": [ 96 { 97 "cniVersion": "1.0.1", 98 "name": "crio", 99 "plugins": [ 100 { 101 "bridge": "cni 101 "bridge": "cni0",/nod /node 93 "nodes": {/node /nodeS 237 "csiDriver": { 238 "apiVersion": "storage.k8s.io/v1", 239 "items": [], 240 "kind": "CSIDriverList", 241 "metadata": { 242 "resourceVersion": "18038123" 243 } 244 }, 245 "nodeSummary": { 246 "clus0-0": { 247 "metadata": { 248 "annotations": { 249 "k8s.ovn.org/host-addresses": "[\"10.1.24.3\"]", 250 "k8s.ovn.org/l3 250 "k8s.ovn.org/l3-gateway-config": "{\"default\":{\"mode\":\"shared\",\"interface-id\":\"br-ex_clus0-0\",\"mac-address\":\"48:df:37:bc:f1:64\",\"ip-addresses\":[\"10.1.24.3/24\"],\"ip-address\":\"10.1.24.3/24\",\"next-hops\":[\"10.1.24.254\"], \"next-hop\":\"10.1.24.254\",\"node-port-enable\":\"true\",\"vlan-id\":\"0\"}}", 251 "k8s.ovn.org/node-chassis-id 251 "k8s.ovn.org/node-chassis-id": "80e76bb1-749f-48a6-80c7-e2c70ae9846f", 252 "k8s.ovn.org/node-gateway-router-lrp-ifaddr": "{\"ipv4\":\"100.64.0.4/16\"}",/nodeS /nodeSu 245 "nodeSummary": {/nodeSu /nodeSum 245 "nodeSummary": {/nodeSum /nodeSum 245 "nodeSummary": {/nodeSum 245,8 1% 245 "nodeSummary": { 246 "clus0-0": { /nodeSum 246,8 1% 247 "metadata": { /nodeSum 247,8 1% 248 "annotations": {/nodeSum 248,8 1% 249 "k8s.ovn.org/host-addresses": "[\"10.1.24.3\"]", 253 "k8s.ovn.org/node-mgmt-port-mac-address": "1a:10:cb:30:6c:90", 249,8 1% 250 "k8s.ovn.org/l3-gateway-config": "{\"default\":{\"mode\":\"shared\",\"interface-id\":\"br-ex_clus0-0\",\"mac-address\":\"48:df:37:bc:f1:64\",\"ip-addresses\":[\"10.1.24.3/24\"],\"ip-address\":\"10.1.24.3/24\",\"next-hops\":[\"10.1.24.254\"], \"next-hop\":\"10.1.24.254\",\"node-port-enable\":\"true\",\"vlan-id\":\"0\"}}", 254 "k8s.ovn.org/node-primary-ifaddr": "{\"ipv4\":\"10.1.24.3/25\"}", 255 "k8s.ovn.org/node-subnets": "{\"default\":[\"10.134.0.0/23\"]}", 250,8 2% 251 "k8s.ovn.org/node-chassis-id": "80e76bb1-749f-48a6-80c7-e2c70ae9846f", 256 "machine.openshift.io/machine": "openshift-machine-api/clus0-2b56q-master-0", 251,8 2% 252 "k8s.ovn.org/node-gateway-router-lrp-ifaddr": "{\"ipv4\":\"100.64.0.4/16\"}", 257 "machineconfiguration.openshift.io/controlPlaneTopology": "HighlyAvailable", 252,8 2% 253 "k8s.ovn.org/node-mgmt-port-mac-address": "1a:10:cb:30:6c:90", 258 "machineconfiguration.openshift.io/currentConfig": "rendered-master-d2cd891abd576e085880b9ad7857ab13", 253,8 2% 254 "k8s.ovn.org/node-primary-ifaddr": "{\"ipv4\":\"10.1.24.3/25\"}", 259 "machineconfiguration.openshift.io/desiredConfig": "rendered-master-d2cd891abd576e085880b9ad7857ab13", 254,8 2% 255 "k8s.ovn.org/node-subnets": "{\"default\":[\"10.134.0.0/23\"]}", 260 "machineconfiguration.openshift.io/desiredDrain": "uncordon-rendered-master-d2cd891abd576e085880b9ad7857ab13", 255,8 2% 256 "machine.openshift.io/machine": "openshift-machine-api/clus0-2b56q-master-0", 261 "machineconfiguration.openshift.io/lastAppliedDrain": "uncordon-rendered-master-d2cd891abd576e085880b9ad7857ab13", 256,8 2% 257 "machineconfiguration.openshift.io/controlPlaneTopology": "HighlyAvailable", 262 "machineconfiguration.openshift.io/lastSyncedControllerConfigResourceVersion": "15432132", 257,8 2% 258 "machineconfiguration.openshift.io/currentConfig": "rendered-master-d2cd891abd576e085880b9ad7857ab13", 263 "machineconfiguration.openshift.io/reason": "", 258,8 2% 259 "machineconfiguration.openshift.io/desiredConfig": "rendered-master-d2cd891abd576e085880b9ad7857ab13", 264 "machineconfiguration.openshift.io/state": "Done", 259,8 2% 260 "machineconfiguration.openshift.io/desiredDrain": "uncordon-rendered-master-d2cd891abd576e085880b9ad7857ab13", 265 "volumes.kubernetes.io/controller-managed-attach-detach": "true" 260,8 2% 261 "machineconfiguration.openshift.io/lastAppliedDrain": "uncordon-rendered-master-d2cd891abd576e085880b9ad7857ab13", 266 }, 267 "creationTimestamp": "2023-07-28T21:16:58Z", 261,8 2% 262 "machineconfiguration.openshift.io/lastSyncedControllerConfigResourceVersion": "15432132", 262,8 2% 263 "machineconfiguration.openshift.io/reason": "", 268 "labels": { 263,8 2% 264 "machineconfiguration.openshift.io/state": "Done", 269 "beta.kubernetes.io/arch": "amd64", 264,8 2% 265 "volumes.kubernetes.io/controller-managed-attach-detach": "true" 270 "beta.kubernetes.io/os": "linux", 265,8 2% 266 }, 271 "kubernetes.io/arch": "amd64", 266,8 2% 266 }, 267 "creationTimestamp": "2023-07-28T21:16:58Z", 272 "kubernetes.io/hostname": "clus0-0", 267,8 2% 268 "labels": { 273 "kubernetes.io/os": "linux", 268,8 2% 269 "beta.kubernetes.io/arch": "amd64", 274 "node-role.kubernetes.io/master": "", 269,8 2% 270 "beta.kubernetes.io/os": "linux", 275 "node-role.kubernetes.io/worker": "", 270,8 2% 271 "kubernetes.io/arch": "amd64", 276 "node-role.kubernetes.io/worker-cnf": "", 271,8 2% 272 "kubernetes.io/hostname": "clus0-0", 277 "node.openshift.io/os_id": "rhcos" 272,8 2% 273 "kubernetes.io/os": "linux", 278 }, 273,8 2% 274 "node-role.kubernetes.io/master": "", 279 "managedFields": [ 274,8 2% 275 "node-role.kubernetes.io/worker": "", 280 { 275,8 2% 276 "node-role.kubernetes.io/worker-cnf": "", 281 "apiVersion": "v1", 276,8 2% 277 "node.openshift.io/os_id": "rhcos" 282 "fieldsType": "FieldsV1", 277,8 2% 278 }, 283 "fieldsV1": { 278,8 2% 278 }, 279 "managedFields": [ 284 "f:metadata": { 279,8 2% 280 { 285 "f:annotations": { 280,8 2% 279 "managedFields": [ 279,9 2% 278 }, 278,9 2% 277 "node.openshift.io/os_id": "rhcos" 277,9 2% 276 "node-role.kubernetes.io/worker-cnf": "", 276,9 2% 276 "node-role.kubernetes.io/worker-cnf": "", 276,15 2% 276 "node-role.kubernetes.io/worker-cnf": "", 276,16 2% 276 "node.openshift.io/os_id": "rhcos" 277 }, 278 "managedFields": [ 279 { 280 "apiVersion": "v1", 281 "fieldsType": "FieldsV1", 282 "fieldsV1": { 283 "f:metadata": { 284 "f:annotations": { 285 ".": {}, 276 "node.openshift.io/os_id": "rhcos" : :w :wq "claim2.json" "claim2.json" 11887L, 553659B written $ $ . $ ./ $ ./t $ ./tn $ ./tnf $ ./tnf $ ./tnf c $ ./tnf cl $ ./tnf cla $ ./tnf clai $ ./tnf claim $ ./tnf claim $ ./tnf claim c $ ./tnf claim co $ ./tnf claim com $ ./tnf claim comp $ ./tnf claim compa $ ./tnf claim compar $ ./tnf claim compare $ ./tnf claim compare $ ./tnf claim compare - $ ./tnf claim compare -1 $ ./tnf claim compare -1 $ ./tnf claim compare -1 c $ ./tnf claim compare -1 cl $ ./tnf claim compare -1 cla $ ./tnf claim compare -1 clai $ ./tnf claim compare -1 claim $ ./tnf claim compare -1 claim1 $ ./tnf claim compare -1 claim1. $ ./tnf claim compare -1 claim1.j $ ./tnf claim compare -1 claim1.js $ ./tnf claim compare -1 claim1.jso $ ./tnf claim compare -1 claim1.json $ ./tnf claim compare -1 claim1.json $ ./tnf claim compare -1 claim1.json - $ ./tnf claim compare -1 claim1.json -2 $ ./tnf claim compare -1 claim1.json -2 $ ./tnf claim compare -1 claim1.json -2 c $ ./tnf claim compare -1 claim1.json -2 cl $ ./tnf claim compare -1 claim1.json -2 cla $ ./tnf claim compare -1 claim1.json -2 clai $ ./tnf claim compare -1 claim1.json -2 claim $ ./tnf claim compare -1 claim1.json -2 claim2 $ ./tnf claim compare -1 claim1.json -2 claim2. $ ./tnf claim compare -1 claim1.json -2 claim2.j $ ./tnf claim compare -1 claim1.json -2 claim2.js $ ./tnf claim compare -1 claim1.json -2 claim2.jso $ ./tnf claim compare -1 claim1.json -2 claim2.json $ ./tnf claim compare -1 claim1.json -2 claim2.json $ ./tnf claim compare -1 claim1.json -2 claim2.json | $ ./tnf claim compare -1 claim1.json -2 claim2.json | $ ./tnf claim compare -1 claim1.json -2 claim2.json | l $ ./tnf claim compare -1 claim1.json -2 claim2.json | le $ ./tnf claim compare -1 claim1.json -2 claim2.json | les $ ./tnf claim compare -1 claim1.json -2 claim2.json | less $ ./tnf claim compare -1 claim1.json -2 claim2.json | less VERSIONS: Differences FIELD CLAIM 1 CLAIM 2 <none> VERSIONS: Only in CLAIM 1 <none> VERSIONS: Only in CLAIM 2 <none> RESULTS SUMMARY --------------- STATUS # in CLAIM-1 # in CLAIM-2passed 3 2 skipped 86 86 failed 1 2RESULTS DIFFERENCES ------------------- TEST CASE NAME CLAIM-1 CLAIM-2 observability-pod-disruption-budget passed failed CONFIGURATIONS -------------- CNF Cert Suite Configuration: Differences FIELD CLAIM 1 CLAIM 2 <none> CNF Cert Suite Configuration: Only in CLAIM 1 CNF Cert Suite Configuration: Only in CLAIM 2 Cluster abnormal events count CLAIM 1 CLAIM 2 1 1 CLUSTER NODES DIFFERENCES ------------------------- Nodes: Differences Nodes: Only in CLAIM 1 /clus0-0/metadata/labels/node-role.kubernetes.io/worker-cnf= Nodes: Only in CLAIM 2 CNIs: Differences FIELD CLAIM 1 CLAIM 2 /clus0-0/0/cniVersion 1.0.0 1.0.1 $ $ e $ ex $ exi $ exit $ exit exit + \ No newline at end of file diff --git a/docs/assets/images/claim-compare-results.svg b/docs/assets/images/claim-compare-results.svg new file mode 100644 index 0000000000..9eac3d3ff8 --- /dev/null +++ b/docs/assets/images/claim-compare-results.svg @@ -0,0 +1,254 @@ + + + + + + + + + + + $ $ c $ cl $ cle $ clea $ clear $ clear $ $ c $ cp $ cp $ cp c $ cp cl $ cp cla $ cp clai $ cp claim $ cp claim. $ cp claim.j $ cp claim.js $ cp claim.jso $ cp claim.json $ cp claim.json $ cp claim.json c $ cp claim.json cl $ cp claim.json cla $ cp claim.json clai $ cp claim.json claim $ cp claim.json claim1 $ cp claim.json claim1. $ cp claim.json claim1.j $ cp claim.json claim1.js $ cp claim.json claim1.jso $ cp claim.json claim1.json $ cp claim.json claim1.json$ cp $ cp $ cp claim.json claim2 $ cp claim.json claim2. $ cp claim.json claim2.j $ cp claim.json claim2.js $ cp claim.json claim2.jso $ cp claim.json claim2.json $ cp claim.json claim2.json$ v $ vi $ vim $ vim $ vim c $ vim cl $ vim cla $ vim clai $ vim claim $ vim claim2 $ vim claim2. $ vim claim2.j $ vim claim2.js $ vim claim2.jso $ vim claim2.json $ vim claim2.json "claim2.json""claim2.json" [noeol] 11888L, 553714B11872 "id": "platform-alteration-tainted-node-kernel",11873 "suite": "platform-alteration", 11874 "tags": "common" 11875 }11876 }11877 ]11878 },11879 "versions": {11880 "claimFormat": "v0.1.0",11881 "k8s": "v1.26.4+c343423",11882 "ocClient": "n/a, (not using oc or kubectl client)",11883 "ocp": "4.13.1",11884 "tnf": "Unreleased build post v4.3.2",11885 "tnfGitCommit": "1b968e53b79fd8e81e48b761c3efd7a808d4567e"11886 }11887 }11888 }"claim2.json" [noeol] 11888L, 553714B11883,7Bot11883 "ocp": "4.13.1",? ?p 11868 "failureReason": "",11869 "startTime": "2023-09-04 09:18:08.857303112 -0500 CDT m=+20.599314872",11870 "state": "skipped",11871 "testID": {11873 "suite": "platform-alteration", 11875 }11883 "ocp": "4.13.1",?p ?pa 11788 } 11789 } 11790 ], 11791 "platform-alteration-service-mesh-usage": [11792 { 11793 "capturedTestOutput": "", 11794 "catalogInfo": { 11795 "bestPracticeReference": "No Doc Link - Extended",11796 "description": "Checks if the istio namespace (\"istio-system\") is present. If it is present, checks that the istio sidecar is present in all pods under test.",11797 "exceptionProcess": "No exception needed for optional/extended tests.",11798 "remediation": "Ensure all the CNF pods are using service mesh 11798 "remediation": "Ensure all the CNF pods are using service mesh if the cluster provides it."11799 }, 11800 "categoryClassification": {11801 "Extended": "Optional",11802 "FarEdge": "Optional", 11803 "NonTelco": "Optional",11804 "Telco": "Optional" ?pa ?pas 11615 } 11616 ], 11617 "platform-alteration-hugepages-config": [ 11618 { 11619 "capturedTestOutput": "", 11620 "catalogInfo": { 11621 "bestPracticeReference": "https://test-network-function.github.io/cnf-best-practices/#cnf-best-practices-huge-pages", 11622 "description": "Checks to see that HugePage settings have been configured through MachineConfig, and not manually on the underlying Node. This test case applies only to Nodes that are configured with the \"worker\" MachineConfigSet. First, the \"worker\" MachineConfig is polled, and the Hugepage settings are extracted. Next, the underlying Nodes , checks that the istio sidecar is present in all pods under test.", \"worker\" MachineConfig is polled, and the Hugepage settings are extracted. Next, the underlying Nodes are polled for configured HugePages through inspection of /proc/meminfo. The results are compared, and the test passes only if they are the same.",11623 "exceptionProcess": "No exceptions", 11624 "remediation": "HugePage settings should be configured either directly through the MachineConfigOperator or indirectly using the PerformanceAddonOperator. This ensures that OpenShift is aware of the special MachineConfig requirements, and can provision your CNF on a Node that is part of the corresponding MachineConfigSet. Avoid making changes directly to an underlying Node, and let OpenShift handle the heavy lifting of configuring advanced settings. This test case applies only to Nodes that ar e configured with the \"worker\" MachineConfigSet."11625 }, 11626 "categoryClassification": 11626 "categoryClassification": { 11627 "Extended": "Mandatory",11628 "FarEdge": "Mandatory", ?pas ?pass \"worker\" MachineConfig is polled, and the Hugepage settings are extracted. Next, the underlying Nodes are polled for configured HugePages through inspection of /proc/meminfo. The results are compared, and the test passes only if they are the same.",?pass ?passe \"worker\" MachineConfig is polled, and the Hugepage settings are extracted. Next, the underlying Nodes are polled for configured HugePages through inspection of /proc/meminfo. The results are compared, and the test passes only if they are the same.",?passe ?passed 11195 "Telco": "Mandatory" 11196 }, 11197 "duration": 111202, 11198 "endTime": "2023-09-04 09:18:08.856076584 -0500 CDT m=+20.598088352", 11199 "failureLineContent": "", 11200 "failureLocation": ":0", 11201 "failureReason": "", 11202 "startTime": "2023-09-04 09:18:08.855965389 -0500 CDT m=+20.597977150", 11203 "state": "passed", 11204 "testID": { 11205 "id": "observability-pod-disruption-budget", 11206 "suite": "observability", 11207 "tags the \"worker\" MachineConfigSet."11207 "tags": "common" 11208 } 11209 } 11210 ], 11211 "observability-termination-policy": [ ?passed 11203 "state": "passed", ?passed 11203,21 94% 11203 "state": "", -- INSERT -- 11203,21 94% 11203 "state": "f", -- INSERT -- 11203,22 94% 11203 "state": "fa", -- INSERT -- 11203,23 94% 11203 "state": "fai", -- INSERT -- 11203,24 94% 11203 "state": "fail", -- INSERT -- 11203,25 94% 11203 "state": "faile", -- INSERT -- 11203,26 94% 11203 "state": "failed", -- INSERT -- 11203,27 94% 11203 "state": "failed", 11203 "state": "failed", : :w :wq :wq "claim2.json" 11888L, 553715B written $ $ . $ ./ $ ./t $ ./tn $ ./tnf $ ./tnf $ ./tnf c $ ./tnf cl $ ./tnf cla $ ./tnf clai $ ./tnf claim $ ./tnf claim $ ./tnf claim c $ ./tnf claim co $ ./tnf claim com $ ./tnf claim comp $ ./tnf claim compa $ ./tnf claim compar $ ./tnf claim compare $ ./tnf claim compare $ ./tnf claim compare - $ ./tnf claim compare -1 $ ./tnf claim compare -1 $ ./tnf claim compare -1 c $ ./tnf claim compare -1 cl $ ./tnf claim compare -1 cla $ ./tnf claim compare -1 clai $ ./tnf claim compare -1 claim $ ./tnf claim compare -1 claim1 $ ./tnf claim compare -1 claim1. $ ./tnf claim compare -1 claim1.j $ ./tnf claim compare -1 claim1.js $ ./tnf claim compare -1 claim1.json $ ./tnf claim compare -1 claim1.json - $ ./tnf claim compare -1 claim1.json -2 $ ./tnf claim compare -1 claim1.json -2 $ ./tnf claim compare -1 claim1.json -2 c $ ./tnf claim compare -1 claim1.json -2 cl $ ./tnf claim compare -1 claim1.json -2 cla $ ./tnf claim compare -1 claim1.json -2 clai $ ./tnf claim compare -1 claim1.json -2 claim $ ./tnf claim compare -1 claim1.json -2 claim2 $ ./tnf claim compare -1 claim1.json -2 claim2. $ ./tnf claim compare -1 claim1.json -2 claim2.j $ ./tnf claim compare -1 claim1.json -2 claim2.json $ ./tnf claim compare -1 claim1.json -2 claim2.json | $ ./tnf claim compare -1 claim1.json -2 claim2.json | $ ./tnf claim compare -1 claim1.json -2 claim2.json | l $ ./tnf claim compare -1 claim1.json -2 claim2.json | le $ ./tnf claim compare -1 claim1.json -2 claim2.json | les $ ./tnf claim compare -1 claim1.json -2 claim2.json | less $ ./tnf claim compare -1 claim1.json -2 claim2.json | less VERSIONS: Differences FIELD CLAIM 1 CLAIM 2 <none> VERSIONS: Only in CLAIM 1 VERSIONS: Only in CLAIM 2 RESULTS SUMMARY --------------- STATUS # in CLAIM-1 # in CLAIM-2 passed 3 2 skipped 86 86 failed 1 2RESULTS DIFFERENCES ------------------- TEST CASE NAME CLAIM-1 CLAIM-2 observability-pod-disruption-budget passed failed CONFIGURATIONS -------------- CNF Cert Suite Configuration: Differences $ $ e $ ex $ exi $ exit $ exit exit + \ No newline at end of file diff --git a/docs/assets/images/claim-compare-self.svg b/docs/assets/images/claim-compare-self.svg new file mode 100644 index 0000000000..f8e4f9cb40 --- /dev/null +++ b/docs/assets/images/claim-compare-self.svg @@ -0,0 +1,224 @@ + + + + + + + + + + + $ $ c $ cl $ cle $ clea $ clear $ clear $ $ . $ ./ $ ./t $ ./tn $ ./tnf $ ./tnf $ ./tnf c $ ./tnf cl $ ./tnf cle $ ./tnf cl $ ./tnf cla $ ./tnf clai $ ./tnf claim $ ./tnf claim $ ./tnf claim c $ ./tnf claim co $ ./tnf claim com $ ./tnf claim comp $ ./tnf claim compa $ ./tnf claim compar $ ./tnf claim compare $ ./tnf claim compare $ ./tnf claim compare - $ ./tnf claim compare -1 $ ./tnf claim compare -1 $ ./tnf claim compare -1 c $ ./tnf claim compare -1 cl $ ./tnf claim compare -1 cla $ ./tnf claim compare -1 clai $ ./tnf claim compare -1 claim $ ./tnf claim compare -1 claim. $ ./tnf claim compare -1 claim.j $ ./tnf claim compare -1 claim.js $ ./tnf claim compare -1 claim.jso $ ./tnf claim compare -1 claim.json $ ./tnf claim compare -1 claim.json $ ./tnf claim compare -1 claim.json - $ ./tnf claim compare -1 claim.json -2 $ ./tnf claim compare -1 claim.json -2 $ ./tnf claim compare -1 claim.json -2 c $ ./tnf claim compare -1 claim.json -2 cl $ ./tnf claim compare -1 claim.json -2 cla $ ./tnf claim compare -1 claim.json -2 clai $ ./tnf claim compare -1 claim.json -2 claim $ ./tnf claim compare -1 claim.json -2 claim. $ ./tnf claim compare -1 claim.json -2 claim.j $ ./tnf claim compare -1 claim.json -2 claim.js $ ./tnf claim compare -1 claim.json -2 claim.jso $ ./tnf claim compare -1 claim.json -2 claim.json $ ./tnf claim compare -1 claim.json -2 claim.json $ ./tnf claim compare -1 claim.json -2 claim.json | $ ./tnf claim compare -1 claim.json -2 claim.json | $ ./tnf claim compare -1 claim.json -2 claim.json | l $ ./tnf claim compare -1 claim.json -2 claim.json | le $ ./tnf claim compare -1 claim.json -2 claim.json | les $ ./tnf claim compare -1 claim.json -2 claim.json | less $ ./tnf claim compare -1 claim.json -2 claim.json | less VERSIONS: DifferencesFIELD CLAIM 1 CLAIM 2<none>VERSIONS: Only in CLAIM 1VERSIONS: Only in CLAIM 2RESULTS SUMMARY---------------STATUS # in CLAIM-1 # in CLAIM-2passed 3 3skipped 86 86failed 1 1: RESULTS DIFFERENCES ------------------- <none> CONFIGURATIONS -------------- CNF Cert Suite Configuration: Differences FIELD CLAIM 1 CLAIM 2 CNF Cert Suite Configuration: Only in CLAIM 1 CNF Cert Suite Configuration: Only in CLAIM 2 Cluster abnormal events count CLAIM 1 CLAIM 2 1 1 CLUSTER NODES DIFFERENCES ------------------------- Nodes: Differences Nodes: Only in CLAIM 1 Nodes: Only in CLAIM 2 CNIs: Differences CNIs: Only in CLAIM 1 CNIs: Only in CLAIM 2 CSIs: Differences CSIs: Only in CLAIM 1 CSIs: Only in CLAIM 2 CNIs: DifferencesHardware: Differences Hardware: Only in CLAIM 1 Hardware: Only in CLAIM 2 (END) $ $ e $ ex $ exi $ exit $ exit exit + \ No newline at end of file diff --git a/docs/assets/images/claim-compare-versions.svg b/docs/assets/images/claim-compare-versions.svg new file mode 100644 index 0000000000..df87c58824 --- /dev/null +++ b/docs/assets/images/claim-compare-versions.svg @@ -0,0 +1,209 @@ + + + + + + + + + + + $ $ c $ cl $ cle $ clea $ clear $ clear $ $ . $ ./ $ ./t $ ./tn $ ./tnf $ ./tnf $ ./tnf c $ ./tnf cl $ ./tnf cla $ ./tnf clai $ ./tnf claim $ ./tnf claim $ ./tnf claim c $ ./tnf claim co $ ./tnf claim com $ ./tnf claim comp $ ./tnf claim compa $ ./tnf claim compar $ ./tnf claim compare $ ./tnf claim compare $ ./tnf claim compare - $ ./tnf claim compare -1 $ ./tnf claim compare -1 $ ./tnf claim compare -1 c $ ./tnf claim compare -1 cl $ ./tnf claim compare -1 cla $ ./tnf claim compare -1 clai $ ./tnf claim compare -1 claim $ ./tnf claim compare -1 claim1 $ ./tnf claim compare -1 claim1. $ ./tnf claim compare -1 claim1.j $ ./tnf claim compare -1 claim1.js $ ./tnf claim compare -1 claim1.jso $ ./tnf claim compare -1 claim1.json $ ./tnf claim compare -1 claim1.json $ ./tnf claim compare -1 claim1.json - $ ./tnf claim compare -1 claim1.json -2 $ ./tnf claim compare -1 claim1.json -2 $ ./tnf claim compare -1 claim1.json -2 c $ ./tnf claim compare -1 claim1.json -2 cl $ ./tnf claim compare -1 claim1.json -2 cla $ ./tnf claim compare -1 claim1.json -2 clai $ ./tnf claim compare -1 claim1.json -2 claim $ ./tnf claim compare -1 claim1.json -2 claim2 $ ./tnf claim compare -1 claim1.json -2 claim2. $ ./tnf claim compare -1 claim1.json -2 claim2.j $ ./tnf claim compare -1 claim1.json -2 claim2.js $ ./tnf claim compare -1 claim1.json -2 claim2.jso $ ./tnf claim compare -1 claim1.json -2 claim2.json $ ./tnf claim compare -1 claim1.json -2 claim2.json $ ./tnf claim compare -1 claim1.json -2 claim2.json | $ ./tnf claim compare -1 claim1.json -2 claim2.json | $ ./tnf claim compare -1 claim1.json -2 claim2.json | l $ ./tnf claim compare -1 claim1.json -2 claim2.json | le $ ./tnf claim compare -1 claim1.json -2 claim2.json | les $ ./tnf claim compare -1 claim1.json -2 claim2.json | less $ ./tnf claim compare -1 claim1.json -2 claim2.json | lessVERSIONS: DifferencesFIELD CLAIM 1 CLAIM 2<none>VERSIONS: Only in CLAIM 1VERSIONS: Only in CLAIM 2RESULTS SUMMARY---------------STATUS # in CLAIM-1 # in CLAIM-2passed 3 2skipped 86 86failed 1 2: $ $ c $ cl $ cle $ clea $ clear $ clear $ $ v $ vi $ vim $ vim $ vim c $ vim cl $ vim cla $ vim clai $ vim claim $ vim claim2 $ vim claim2. $ vim claim2.j $ vim claim2.js $ vim claim2.jso $ vim claim2.json $ vim claim2.json $ vim claim2.json "claim2.json""claim2.json" 11887L, 553659B 11871 "id": "platform-alteration-tainted-node-kernel",11872 "suite": "platform-alteration", 11873 "tags": "common" 11874 } 11875 }11876 ]11877 }, 11878 "versions": {11879 "claimFormat": "v0.1.0",11880 "k8s": "v1.26.4+c343423",11881 "ocClient": "n/a, (not using oc or kubectl client)",11882 "ocp": "4.13.1", 11883 "tnf": "Unreleased build post v4.3.2",11884 "tnfGitCommit": "1b968e53b79fd8e81e48b761c3efd7a808d4567e"11885 } 11882 "ocp": "4.13.1", 11886 }11887 } "claim2.json" 11887L, 553659B11882,7Bot11882 "ocp": "4.13.1", "claim2.json" 11887L, 553659B11882,8Bot11882 "ocp": "4.13.1", "claim2.json" 11887L, 553659B11882,9Bot11882 "ocp": "4.13.1", "claim2.json" 11887L, 553659B11882,10Bot11882 "ocp": "4.13.1", "claim2.json" 11887L, 553659B11882,11Bot11882 "ocp": "4.13.1", "claim2.json" 11887L, 553659B11882,12Bot11882 "ocp": "4.13.1", "claim2.json" 11887L, 553659B11882,13Bot11882 "ocp": "4.13.1", "claim2.json" 11887L, 553659B11882,14Bot11882 "ocp": "4.13.1", "claim2.json" 11887L, 553659B11882,15Bot11882 "ocp": "4.13.1", "claim2.json" 11887L, 553659B11882,16Bot11882 "ocp": "4.13.1", "claim2.json" 11887L, 553659B11882,17Bot11882 "ocp": "4.13.1", "claim2.json" 11887L, 553659B11882,18Bot11882 "ocp": "4.13.1", "claim2.json" 11887L, 553659B11882,19Bot11882 "ocp": "4.13.1", "claim2.json" 11887L, 553659B11882,20Bot11882 "ocp": "4.13.1", "claim2.json" 11887L, 553659B11882,21Bot11882 "ocp": "4.13.1", "claim2.json" 11887L, 553659B11882,22Bot11882 "ocp": "4.13.2", 11882 "ocp": "4.13.2", :w :wq "claim2.json" "claim2.json" 11887L, 553659B written (reverse-i-search)`': (reverse-i-search)`c': clear (reverse-i-search)`cl': clear (reverse-i-search)`cla': vim claim2.json (reverse-i-search)`clai': vim claim2.json (reverse-i-search)`claim': vim claim2.json (reverse-i-search)`claim ': ./tnf claim compare -1 claim1.json -2 claim2.json | less (reverse-i-search)`claim c': ./tnf claim compare -1 claim1.json -2 claim2.json | less (reverse-i-search)`claim co': ./tnf claim compare -1 claim1.json -2 claim2.json | less $ ./tnf claim compare -1 claim1.json -2 claim2.json | less VERSIONS: Differences /ocp 4.13.1 4.13.2<none> VERSIONS: Only in CLAIM 2 <none> RESULTS SUMMARY --------------- passed 3 2 skipped 86 86 $ e $ ex $ exi $ exit $ exit exit + \ No newline at end of file diff --git a/docs/configuration.md b/docs/configuration.md index 0d81122276..aa7565ea1e 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -1,15 +1,9 @@ -# Test configuration +# CNF Certification configuration -The certification test suite supports autodiscovery using labels and annotations. +The CNF Certification Test uses a YAML configuration file to certify a specific CNF workload. This file specifies the CNF resources to be certified, as well as any exceptions or other general configuration options. -These can be configured through the following config file. - -- `tnf_config.yml` - -[Sample](https://github.com/test-network-function/cnf-certification-test/blob/main/cnf-certification-test/tnf_config.yml) - -As per the requirement the following fields can be changed. +By default a file named _tnf_config.yml_ will be used. Here's an [example](https://github.com/test-network-function/cnf-certification-test/blob/main/cnf-certification-test/tnf_config.yml) of the CNF Config File. For a description of each config option see the section [CNF Config File options](#cnf-config-file-options). ## CNF Config Generator @@ -31,119 +25,180 @@ Here's an example of how to use the tool: - + -## targetNameSpaces +## CNF Config File options + +### CNF resources + +These options allow configuring the workload resources of the CNF to be verified. Only the resources that the CNF uses are required to be configured. The rest can be left empty. Usually a basic configuration includes _Namespaces_ and _Pods_ at least. + +#### targetNameSpaces -Multiple namespaces can be specified to deploy partner pods for testing through `targetNameSpaces` in the config file. +The namespaces in which the CNF under test will be deployed. ``` { .yaml .annotate } targetNameSpaces: - - name: firstnamespace - - name: secondnamespace + - name: tnf ``` -## targetPodLabels +#### podsUnderTestLabels -The goal of this section is to specify the labels to be used to identify the CNF resources under test. +The labels that each Pod of the CNF under test must have to be verified by the CNF Certification Suite. !!! note "Highly recommended" - The labels should be defined in pod definition rather than added after pod is created, as labels added later on will be lost in case the pod gets rescheduled. In case of pods defined as part of a deployment, it's best to use the same label as the one defined in the `spec.selector.matchLabels` section of the deployment yaml. The prefix field can be used to avoid naming collision with other labels. + The labels should be defined in Pod definition rather than added after the Pod is created, as labels added later on will be lost in case the Pod gets rescheduled. In the case of Pods defined as part of a Deployment, it's best to use the same label as the one defined in the _spec.selector.matchLabels_ section of the Deployment YAML. The prefix field can be used to avoid naming collision with other labels. ``` { .yaml .annotate } -targetPodLabels: - - prefix: test-network-function.com - name: generic - value: target +podsUnderTestLabels: + - "test-network-function.com/generic: target" ``` -The corresponding pod label used to match pods is: +#### operatorsUnderTestLabels + +The labels that each operator's CSV of the CNF under test must have to be verified by the CNF Certification Suite. + +If a new label is used for this purpose make sure it is added to the CNF operator's CSVs. ``` { .yaml .annotate } -test-network-function.com/generic: target +operatorsUnderTestLabels: + - "test-network-function.com/operator: target" ``` -Once the pods are found, all of their containers are also added to the target container list. A target deployment list will also be created with all the deployments which the test pods belong to. - -## targetCrds +#### targetCrdFilters -In order to autodiscover the CRDs to be tested, an array of search filters can be set under the "targetCrdFilters" label. The autodiscovery mechanism will iterate through all the filters to look for all the CRDs that match it. Currently, filters only work by name suffix. +The CRD name suffix used to filter the CNF's CRDs among all the CRDs present in the cluster. For each CRD it can also be specified if it's scalable or not in order to avoid some lifecycle test cases. ``` { .yaml .annotate } targetCrdFilters: - nameSuffix: "group1.tnf.com" + scalable: false - nameSuffix: "anydomain.com" + scalable: true ``` -The autodiscovery mechanism will create a list of all CRD names in the cluster whose names have the suffix `group1.tnf.com` or `anydomain.com`, e.g. `crd1.group1.tnf.com` or `mycrd.mygroup.anydomain.com`. +With the config show above, all CRD names in the cluster whose names have the suffix _group1.tnf.com_ or _anydomain.com_ ( e.g. _crd1.group1.tnf.com_ or _mycrd.mygroup.anydomain.com_) will be tested. -## testTarget +#### managedDeployments / managedStatefulSets -### podsUnderTest / containersUnderTest +The Deployments/StatefulSets managed by a Custom Resource whose scaling is controlled using the "scale" subresource of the CR. -The autodiscovery mechanism will attempt to identify the default network device and all the IP addresses of the pods it needs for network connectivity tests, though that information can be explicitly set using annotations if needed. +The CRD defining that CR should be included in the CRD filters with the scalable property set to true. If so, the test case _lifecycle-{deployment/statefulset}-scaling_ will be skipped, otherwise it will fail. -#### Pod IPs +``` { .yaml .annotate } +managedDeployments: + - name: jack +managedStatefulsets: + - name: jack +``` -- The `k8s.v1.cni.cncf.io/networks-status` annotation is checked and all IPs from it are used. This annotation is automatically managed in OpenShift but may not be present in K8s. -- If it is not present, then only known IPs associated with the pod are used (the pod `.status.ips` field). +### Exceptions -#### Network Interfaces +These options allow adding exceptions to skip several checks for different resources. The exceptions must be justified in order to pass the CNF Certification. + +#### acceptedKernelTaints + +The list of kernel modules loaded by the CNF that make the Linux kernel mark itself as _tainted_ but that should skip verification. + +Test cases affected: _platform-alteration-tainted-node-kernel_. + +``` { .yaml .annotate } +acceptedKernelTaints: + - module: vboxsf + - module: vboxguest +``` + +#### skipHelmChartList + +The list of Helm charts that the CNF uses whose certification status will not be verified. -- The `k8s.v1.cni.cncf.io/networks-status` annotation is checked and the `interface` from the first entry found with `“default”=true` is used. This annotation is automatically managed in OpenShift but may not be present in K8s. +If no exception is configured, the certification status for all Helm charts will be checked in the [OpenShift Helms Charts repository](https://charts.openshift.io/). -The label `test-network-function.com/skip_connectivity_tests` excludes pods from all connectivity tests. The label value is trivial, only its presence. -The label `test-network-function.com/skip_multus_connectivity_tests` excludes pods from [Multus](https://github.com/k8snetworkplumbingwg/multus-cni) connectivity tests. Tests on default interface are still done. The label value is trivial, but its presence. +Test cases affected: _affiliated-certification-helmchart-is-certified_. -## AffinityRequired +``` { .yaml .annotate } +skipHelmChartList: + - name: coredns +``` -For CNF workloads that require pods to use Pod or Node Affinity rules, the label `AffinityRequired: true` must be included on the Pod YAML. This will prevent any tests for anti-affinity to fail as well as test your workloads for affinity rules that support your CNF's use-case. +#### validProtocolNames -## certifiedcontainerinfo +The list of allowed protocol names to be used for container port names. -The `certifiedcontainerinfo` section contains information about CNFs containers that are -to be checked for certification status on Red Hat catalogs. +The name field of a container port must be of the form _protocol[-suffix]_ where _protocol_ must be allowed by default or added to this list. The optional _suffix_ can be chosen by the application. Protocol names allowed by default: _grpc_, _grpc-web_, _http_, _http2_, _tcp_, _udp_. -## Operators +Test cases affected: _manageability-container-port-name-format_. -The CSV of the installed Operators can be tested by the `operator` and `affiliated-certification` specs are identified with the `test-network-function.com/operator=target` -label. Any value is permitted here but `target` is used here for consistency with the other specs. +``` { .yaml .annotate } +validProtocolNames: + - "http3" + - "sctp" +``` -## AllowedProtocolNames +#### servicesIgnoreList -This name of protocols that allowed. -If we want to add another name, we just need to write the name in the yaml file. +The list of Services that will skip verification. -for example: if we want to add new protocol - "http4", we add in "tnf_config.yml" below "validProtocolNames" and then this protocol ("http4") add to map allowedProtocolNames and finally "http4" will be allow protocol. +Services included in this list will be filtered out at the autodiscovery stage and will not be subject to checks in any test case. -## ServicesIgnoreList +Tests cases affected: _networking-dual-stack-service_, _access-control-service-type_. -This is a list of service names present in the namespace under test and that should not be tested. +``` { .yaml .annotate } +servicesignorelist: + - "hazelcast-platform-controller-manager-service" + - "hazelcast-platform-webhook-service" + - "new-pro-controller-manager-metrics-service" +``` -## skipScalingTestDeployments and skipScalingTestStatefulSetNames +#### skipScalingTestDeployments / skipScalingTestStatefulSets -This section of the TNF config allows the user to skip the scaling tests that potentially cause known problems with workloads that do not like being scaled up and scaled down. +The list of Deployments/StatefulSets that do not support scale in/out operations. -Example: +Deployments/StatefulSets included in this list will skip any scaling operation check. + +Test cases affected: _lifecycle-deployment-scaling_, _lifecycle-statefulset-scaling_. ``` { .yaml .annotate } skipScalingTestDeployments: - - name: "deployment1" - namespace: "tnf" + - name: deployment1 + namespace: tnf skipScalingTestStatefulSetNames: - - name: "statefulset1" - namespace: "tnf" + - name: statefulset1 + namespace: tnf ``` -## debugDaemonSetNamespace +### CNF Certification settings + +#### debugDaemonSetNamespace -This is an optional field with the name of the namespace where a privileged DaemonSet will be deployed. The namespace will be created in case it does not exist. In case this field is not set, the default namespace for this DaemonSet is "cnf-suite". +This is an optional field with the name of the namespace where a privileged DaemonSet will be deployed. The namespace will be created in case it does not exist. In case this field is not set, the default namespace for this DaemonSet is _cnf-suite_. -```sh +``` { .yaml .annotate } debugDaemonSetNamespace: cnf-cert ``` -This DaemonSet, called "tnf-debug" is deployed and used internally by the CNF Certification tool to issue some shell commands that are needed in certain test cases. Some of these test cases might fail or be skipped in case it wasn't deployed correctly. +This DaemonSet, called _tnf-debug_ is deployed and used internally by the CNF Certification tool to issue some shell commands that are needed in certain test cases. Some of these test cases might fail or be skipped in case it wasn't deployed correctly. + +### Other settings + +The autodiscovery mechanism will attempt to identify the default network device and all the IP addresses of the Pods it needs for network connectivity tests, though that information can be explicitly set using annotations if needed. + +#### Pod IPs + +- The _k8s.v1.cni.cncf.io/networks-status_ annotation is checked and all IPs from it are used. This annotation is automatically managed in OpenShift but may not be present in K8s. +- If it is not present, then only known IPs associated with the Pod are used (the Pod _.status.ips_ field). + +#### Network Interfaces + +- The _k8s.v1.cni.cncf.io/networks-status_ annotation is checked and the _interface_ from the first entry found with _“default”=true_ is used. This annotation is automatically managed in OpenShift but may not be present in K8s. + +The label _test-network-function.com/skip_connectivity_tests_ excludes Pods from all connectivity tests. + +The label _test-network-function.com/skip_multus_connectivity_tests_ excludes Pods from [Multus](https://github.com/k8snetworkplumbingwg/multus-cni) connectivity tests. Tests on the default interface are still run. + +#### Affinity requirements + +For CNF workloads that require Pods to use Pod or Node Affinity rules, the label _AffinityRequired: true_ must be included on the Pod YAML. This will ensure that the affinity best practices are tested and prevent any test cases for anti-affinity to fail. diff --git a/docs/runtime-env.md b/docs/runtime-env.md index d8cac9c279..16d3c7c158 100644 --- a/docs/runtime-env.md +++ b/docs/runtime-env.md @@ -68,4 +68,4 @@ export TNF_PARTNER_REPO=registry.dfwt5g.lab:5000/testnetworkfunction ``` Note that you can also specify the debug pod image to use with `SUPPORT_IMAGE` -environment variable, default to `debug-partner:4.5.0`. +environment variable, default to `debug-partner:4.5.1`. diff --git a/docs/test-container.md b/docs/test-container.md index d36b137dff..a727050412 100644 --- a/docs/test-container.md +++ b/docs/test-container.md @@ -112,8 +112,8 @@ Two env vars allow to control the web artifacts and the the new tar.gz file gene ### Build locally ```shell -podman build -t cnf-certification-test:v4.5.0 \ - --build-arg TNF_VERSION=v4.5.0 \ +podman build -t cnf-certification-test:v4.5.1 \ + --build-arg TNF_VERSION=v4.5.1 \ ``` * `TNF_VERSION` value is set to a branch, a tag, or a hash of a commit that will be installed into the image @@ -125,8 +125,8 @@ The unofficial source could be a fork of the TNF repository. Use the `TNF_SRC_URL` build argument to override the URL to a source repository. ```shell -podman build -t cnf-certification-test:v4.5.0 \ - --build-arg TNF_VERSION=v4.5.0 \ +podman build -t cnf-certification-test:v4.5.1 \ + --build-arg TNF_VERSION=v4.5.1 \ --build-arg TNF_SRC_URL=https://github.com/test-network-function/cnf-certification-test . ``` @@ -135,7 +135,7 @@ podman build -t cnf-certification-test:v4.5.0 \ Specify the custom TNF image using the `-i` parameter. ```shell -./run-tnf-container.sh -i cnf-certification-test:v4.5.0 +./run-tnf-container.sh -i cnf-certification-test:v4.5.1 -t ~/tnf/config -o ~/tnf/output -l "networking,access-control" ``` diff --git a/docs/test-output.md b/docs/test-output.md index 2603f23e51..b5468a81b1 100644 --- a/docs/test-output.md +++ b/docs/test-output.md @@ -77,3 +77,120 @@ This file serves two different purposes: A standalone HTML page is available to decode the results. For more details, see: https://github.com/test-network-function/parser + +## Compare claim files from two different CNF Certification Suite runs + +Parters can use the `tnf claim compare` tool in order to compare two claim files. The differences are shown in a table per section. +This tool can be helpful when the result of some test cases is different between two (consecutive) runs, as it shows +configuration differences in both the CNF Cert Suite config and the cluster nodes that could be the root cause for +some of the test cases results discrepancy. + +All the compared sections, except the test cases results are compared blindly, traversing the whole json tree and +substrees to get a list of all the fields and their values. Three tables are shown: + +* Differences: same fields with different values. +* Fields in claim 1 only: json fields in claim file 1 that don't exist in claim 2. +* Fields in claim 2 only: json fields in claim file 2 that don't exist in claim 1. + +Let's say one of the nodes of the claim.json file contains this struct: + +```json +{ + "field1": "value1", + "field2": { + "field3": "value2", + "field4": { + "field5": "value3", + "field6": "value4" + } + } +} +``` + +When parsing that json struct fields, it will produce a list of fields like this: + +```console +/field1=value1 +/field2/field3=value2 +/field2/field4/field5=value3 +/field2/field4/field6=finalvalue2 +``` + +Once this list of field's path+value strings has been obtained from both claim files, +it is compared in order to find the differences or the fields that only exist on each file. + +This is a fake example of a node "clus0-0" whose first CNI (index 0) has a different cniVersion +and the ipMask flag of its first plugin (also index 0) has changed to false in the second run. +Also, the plugin has another "newFakeFlag" config flag in claim 2 that didn't exist in clam file 1. + +```console +... +CNIs: Differences +FIELD CLAIM 1 CLAIM 2 +/clus0-0/0/cniVersion 1.0.0 1.0.1 +/clus0-1/0/plugins/0/ipMasq true false + +CNIs: Only in CLAIM 1 + + +CNIs: Only in CLAIM 2 +/clus0-1/0/plugins/0/newFakeFlag=true +... +``` + + Currently, the following sections are compared, in this order: + +* claim.versions +* claim.Results +* claim.configurations.Config +* claim.nodes.cniPlugins +* claim.nodes.csiDriver +* claim.nodes.nodesHwInfo +* claim.nodes.nodeSummary + +### How to build the tnf tool + +The `tnf` tool is located in the repo's `cmd/tnf` folder. In order to compile it, just run: + +```console +make build-tnf-tool +``` + +### Examples + +#### Compare a claim file against itself: no differences expected + + + + + +#### Different test cases results + +Let's assume we have two claim files, claim1.json and claim2.json, obtained from two CNF Certification Suite runs in the same cluster. + +During the second run, there was a test case that failed. Let's simulate it modifying manually the second run's claim file to switch one test case's state from "passed" to "failed". + + + + + +#### Different cluster configurations + +First, let's simulate that the second run took place in a cluster with a different OCP version. As we store the OCP version in the claim file (section claim.versions), we can also modify it manually. +The versions section comparison appears at the very beginning of the `tnf claim compare` output: + + + + + +Now, let's simulate that the cluster was a bit different when the second CNF Certification Suite run was performed. First, let's make a manual change in claim2.json to emulate a different CNI version in the first node. + + + + + +Finally, we'll simulate that, for some reason, the first node had one label removed when the second run was performed: + + + + diff --git a/go.mod b/go.mod index 6ffab3f286..7b2c54b645 100644 --- a/go.mod +++ b/go.mod @@ -8,25 +8,25 @@ require ( github.com/sirupsen/logrus v1.9.3 github.com/spf13/cobra v1.7.0 github.com/stretchr/testify v1.8.4 - github.com/test-network-function/test-network-function-claim v1.0.27 + github.com/test-network-function/test-network-function-claim v1.0.28 github.com/xeipuuv/gojsonschema v1.2.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect ) -require k8s.io/client-go v0.28.2 +require k8s.io/client-go v0.28.3 require ( github.com/kelseyhightower/envconfig v1.4.0 github.com/mittwald/go-helm-client v0.12.3 - github.com/onsi/ginkgo/v2 v2.12.1 + github.com/onsi/ginkgo/v2 v2.13.0 github.com/openshift/api v0.0.1 github.com/openshift/client-go v0.0.1 - github.com/operator-framework/api v0.17.7 + github.com/operator-framework/api v0.18.0 github.com/operator-framework/operator-lifecycle-manager v0.20.0 github.com/pkg/errors v0.9.1 // indirect - helm.sh/helm/v3 v3.13.0 - k8s.io/api v0.28.2 - k8s.io/apimachinery v0.28.2 + helm.sh/helm/v3 v3.13.1 + k8s.io/api v0.28.3 + k8s.io/apimachinery v0.28.3 k8s.io/klog/v2 v2.100.1 // indirect ) @@ -55,7 +55,7 @@ require ( github.com/davecgh/go-spew v1.1.1 // indirect github.com/docker/cli v24.0.6+incompatible // indirect github.com/docker/distribution v2.8.2+incompatible // indirect - github.com/docker/docker v23.0.5+incompatible // indirect + github.com/docker/docker v24.0.6+incompatible // indirect github.com/docker/docker-credential-helpers v0.7.0 // indirect github.com/docker/go-connections v0.4.0 // indirect github.com/docker/go-metrics v0.0.1 // indirect @@ -109,7 +109,6 @@ require ( github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de // indirect github.com/magiconair/properties v1.8.7 // indirect github.com/mailru/easyjson v0.7.7 // indirect - github.com/manifoldco/promptui v0.9.0 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.18 // indirect github.com/mattn/go-runewidth v0.0.14 // indirect @@ -128,7 +127,7 @@ require ( github.com/morikuni/aec v1.0.0 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect - github.com/opencontainers/image-spec v1.1.0-rc4 // indirect + github.com/opencontainers/image-spec v1.1.0-rc5 // indirect github.com/operator-framework/operator-manifest-tools v0.4.0 // indirect github.com/pelletier/go-toml/v2 v2.0.8 // indirect github.com/peterbourgon/diskv v2.0.1+incompatible // indirect @@ -165,14 +164,14 @@ require ( go.opentelemetry.io/proto/otlp v0.19.0 // indirect go.starlark.net v0.0.0-20230525235612-a134d8f9ddca // indirect go.uber.org/atomic v1.11.0 // indirect - golang.org/x/crypto v0.12.0 // indirect + golang.org/x/crypto v0.14.0 // indirect golang.org/x/exp v0.0.0-20230510235704-dd950f8aeaea // indirect - golang.org/x/net v0.14.0 // indirect + golang.org/x/net v0.17.0 // indirect golang.org/x/oauth2 v0.8.0 // indirect golang.org/x/sync v0.3.0 // indirect - golang.org/x/sys v0.12.0 // indirect - golang.org/x/term v0.11.0 // indirect - golang.org/x/text v0.12.0 // indirect + golang.org/x/sys v0.13.0 // indirect + golang.org/x/term v0.13.0 // indirect + golang.org/x/text v0.13.0 // indirect golang.org/x/time v0.3.0 // indirect golang.org/x/tools v0.12.0 // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect @@ -181,20 +180,20 @@ require ( google.golang.org/genproto v0.0.0-20230526161137-0005af68ea54 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20230525234035-dd9d682886f9 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234030-28d5490b6b19 // indirect - google.golang.org/grpc v1.55.0 // indirect + google.golang.org/grpc v1.56.3 // indirect google.golang.org/protobuf v1.30.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.67.0 // indirect - k8s.io/apiserver v0.28.2 // indirect - k8s.io/cli-runtime v0.28.2 // indirect - k8s.io/component-base v0.28.2 // indirect + k8s.io/apiserver v0.28.3 // indirect + k8s.io/cli-runtime v0.28.3 // indirect + k8s.io/component-base v0.28.3 // indirect k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 // indirect k8s.io/utils v0.0.0-20230505201702-9f6742963106 // indirect modernc.org/libc v1.22.5 // indirect modernc.org/mathutil v1.5.0 // indirect modernc.org/memory v1.5.0 // indirect modernc.org/sqlite v1.23.1 // indirect - oras.land/oras-go v1.2.3 // indirect + oras.land/oras-go v1.2.4 // indirect sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.1.2 // indirect sigs.k8s.io/controller-runtime v0.15.0 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect @@ -206,7 +205,7 @@ require ( require ( github.com/hashicorp/go-version v1.6.0 - k8s.io/apiextensions-apiserver v0.28.2 + k8s.io/apiextensions-apiserver v0.28.3 ) require ( @@ -215,13 +214,14 @@ require ( github.com/go-logr/logr v1.2.4 github.com/go-logr/stdr v1.2.2 github.com/k8snetworkplumbingwg/network-attachment-definition-client v1.4.0 + github.com/manifoldco/promptui v0.9.0 github.com/openshift/machine-config-operator v0.0.1-0.20230515070935-49f32d46538e - github.com/redhat-openshift-ecosystem/openshift-preflight v0.0.0-20230926153703-7ab81a71d043 + github.com/redhat-openshift-ecosystem/openshift-preflight v0.0.0-20231018165107-f04b78186455 github.com/test-network-function/oct v0.0.1 - github.com/test-network-function/privileged-daemonset v1.0.10 + github.com/test-network-function/privileged-daemonset v1.0.12 gopkg.in/yaml.v3 v3.0.1 gotest.tools/v3 v3.5.1 - k8s.io/kubectl v0.28.2 + k8s.io/kubectl v0.28.3 ) -replace github.com/redhat-openshift-ecosystem/openshift-preflight => github.com/redhat-openshift-ecosystem/openshift-preflight v0.0.0-20230926153703-7ab81a71d043 +replace github.com/redhat-openshift-ecosystem/openshift-preflight => github.com/redhat-openshift-ecosystem/openshift-preflight v0.0.0-20231018165107-f04b78186455 diff --git a/go.sum b/go.sum index ce975ad342..ab8a914e0f 100644 --- a/go.sum +++ b/go.sum @@ -106,11 +106,13 @@ github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XL github.com/chai2010/gettext-go v1.0.2 h1:1Lwwip6Q2QGsAdl/ZKPCwTe9fe0CjlUbqj5bFNSjIRk= github.com/chai2010/gettext-go v1.0.2/go.mod h1:y+wnP2cHYaVj19NZhYKAwEMH2CI1gNHeQQ+5AjwawxA= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/logex v1.2.1 h1:XHDu3E6q+gdHgsdTPH6ImJMIp436vR6MPtH8gP05QzM= github.com/chzyer/logex v1.2.1/go.mod h1:JLbx6lG2kDbNRFnfkgvh4eRJRPX1QCoOIWomwysCBrQ= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/readline v1.5.1 h1:upd/6fQk4src78LMRzh5vItIt361/o4uq553V8B5sGI= github.com/chzyer/readline v1.5.1/go.mod h1:Eh+b79XXUwfKfcPLepksvw2tcLE/Ct21YObkaSkeBlk= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/chzyer/test v1.0.0 h1:p3BQDXSxOhOG0P9z6/hGnII4LGiEPOYBhs8asl/fC04= github.com/chzyer/test v1.0.0/go.mod h1:2JlltgoNkt4TW/z9V/IzDdFaMTM2JPIi26O1pF38GC8= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= @@ -147,8 +149,8 @@ github.com/docker/cli v24.0.6+incompatible h1:fF+XCQCgJjjQNIMjzaSmiKJSCcfcXb3TWT github.com/docker/cli v24.0.6+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8= github.com/docker/distribution v2.8.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v23.0.5+incompatible h1:DaxtlTJjFSnLOXVNUBU1+6kXGz2lpDoEAH6QoxaSg8k= -github.com/docker/docker v23.0.5+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v24.0.6+incompatible h1:hceabKCtUgDqPu+qm0NgsaXf28Ljf4/pWFL7xjWWDgE= +github.com/docker/docker v24.0.6+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker-credential-helpers v0.7.0 h1:xtCHsjxogADNZcdv1pKUHXryefjlVRqWqIhk/uXJp0A= github.com/docker/docker-credential-helpers v0.7.0/go.mod h1:rETQfLdHNT3foU5kuNkFR1R1V12OJRRO5lzt2D1b5X0= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= @@ -468,22 +470,22 @@ github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= -github.com/onsi/ginkgo/v2 v2.12.1 h1:uHNEO1RP2SpuZApSkel9nEh1/Mu+hmQe7Q+Pepg5OYA= -github.com/onsi/ginkgo/v2 v2.12.1/go.mod h1:TE309ZR8s5FsKKpuB1YAQYBzCaAfUgatB/xlT/ETL/o= +github.com/onsi/ginkgo/v2 v2.13.0 h1:0jY9lJquiL8fcf3M4LAXN5aMlS/b2BV86HFFPCPMgE4= +github.com/onsi/ginkgo/v2 v2.13.0/go.mod h1:TE309ZR8s5FsKKpuB1YAQYBzCaAfUgatB/xlT/ETL/o= github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI= github.com/onsi/gomega v1.27.10/go.mod h1:RsS8tutOdbdgzbPtzzATp12yT7kM5I5aElG3evPbQ0M= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= -github.com/opencontainers/image-spec v1.1.0-rc4 h1:oOxKUJWnFC4YGHCCMNql1x4YaDfYBTS5Y4x/Cgeo1E0= -github.com/opencontainers/image-spec v1.1.0-rc4/go.mod h1:X4pATf0uXsnn3g5aiGIsVnJBR4mxhKzfwmvK/B2NTm8= +github.com/opencontainers/image-spec v1.1.0-rc5 h1:Ygwkfw9bpDvs+c9E34SdgGOj41dX/cbdlwvlWt0pnFI= +github.com/opencontainers/image-spec v1.1.0-rc5/go.mod h1:X4pATf0uXsnn3g5aiGIsVnJBR4mxhKzfwmvK/B2NTm8= github.com/openshift/api v0.0.1 h1:i8SdJ41c7gqwssxxr7/V3x1vGDBzulkLZVewfCH6z6I= github.com/openshift/api v0.0.1/go.mod h1:yimSGmjsI+XF1mr+AKBs2//fSXIOhhetHGbMlBEfXbs= github.com/openshift/client-go v0.0.1 h1:zJ9NsS9rwBtYkYzLCUECkdmrM6jPit3W7Q0+Pxf5gd4= github.com/openshift/client-go v0.0.1/go.mod h1:I8qTI1lgErsWc6CVukSjP1PYqpafE7fue0ZPy7A2jiw= github.com/openshift/machine-config-operator v0.0.1-0.20230515070935-49f32d46538e h1:mR9giLRlLXK52kaEGOR96rIQchQRDUkttjMAkyao2XQ= github.com/openshift/machine-config-operator v0.0.1-0.20230515070935-49f32d46538e/go.mod h1:t9dXGgC9WVzI2cNv/4rMetGVYakWtaDxHWQuyN2til8= -github.com/operator-framework/api v0.17.7 h1:NLn+Ieg+HaPrw75KbX4efllN21ofFArQzS3q8TDbQY0= -github.com/operator-framework/api v0.17.7/go.mod h1:lnurXgadLnoZ7pufKMHkErr2BVOIZSpHtvEkHBcKvdk= +github.com/operator-framework/api v0.18.0 h1:6EdSNeAjin4LRu2YQnQWMJMc6HXS0AQDG+CfaEvFrAo= +github.com/operator-framework/api v0.18.0/go.mod h1:SCCslqke6AVOJ5JM+NqNE1CHuAgJLScsL66pnPaSMXs= github.com/operator-framework/operator-lifecycle-manager v0.20.0 h1:h8SPePMO492krrRnamt5AepqD4nSWb3RRZdvZdN8x6I= github.com/operator-framework/operator-lifecycle-manager v0.20.0/go.mod h1:sml7etyu98h87eikzA6IKay6BRCzagkwYdcbuisdBTk= github.com/operator-framework/operator-manifest-tools v0.4.0 h1:u/qlCyVA84MtS5Ne016KpTcF0kqWgHyYEeOyFgVrX5k= @@ -522,8 +524,8 @@ github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsT github.com/prometheus/procfs v0.0.3/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= github.com/prometheus/procfs v0.10.1 h1:kYK1Va/YMlutzCGazswoHKo//tZVlFpKYh+PymziUAg= github.com/prometheus/procfs v0.10.1/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPHWJq+XBB/FM= -github.com/redhat-openshift-ecosystem/openshift-preflight v0.0.0-20230926153703-7ab81a71d043 h1:x6acjQkmSzRpxesD2VCj1ORtvWExu1koGKEL7lwh0JQ= -github.com/redhat-openshift-ecosystem/openshift-preflight v0.0.0-20230926153703-7ab81a71d043/go.mod h1:nBrN/6sJ+U7b8OdGOImefq6wMm/9voN8oac0fjwM7wU= +github.com/redhat-openshift-ecosystem/openshift-preflight v0.0.0-20231018165107-f04b78186455 h1:ZF268LdtLMQHFFM40SMc2dPMrNrNQFA5k/MM37lnSNc= +github.com/redhat-openshift-ecosystem/openshift-preflight v0.0.0-20231018165107-f04b78186455/go.mod h1:nBrN/6sJ+U7b8OdGOImefq6wMm/9voN8oac0fjwM7wU= github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE= github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= @@ -584,14 +586,12 @@ github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcU github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/subosito/gotenv v1.4.2 h1:X1TuBLAMDFbaTAChgCBLu3DU3UPyELpnF2jjJ2cz/S8= github.com/subosito/gotenv v1.4.2/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= -github.com/test-network-function/oct v0.0.0-20231010095713-cb0313db086e h1:uvL+oJMbSaITbHRHPvockbL53p+FBa0MakUYc/WG+bE= -github.com/test-network-function/oct v0.0.0-20231010095713-cb0313db086e/go.mod h1:D3gNs3SfzvuTGECrojyHUmdNSUrAJRYpGLCUIzwbLss= github.com/test-network-function/oct v0.0.1 h1:lOu9X/+refH4EFxVDSUFXGWiDrjIgiifOkcoOcxvKVA= github.com/test-network-function/oct v0.0.1/go.mod h1:D3gNs3SfzvuTGECrojyHUmdNSUrAJRYpGLCUIzwbLss= -github.com/test-network-function/privileged-daemonset v1.0.10 h1:6CKIa7T2JcBQ3jdm4KZLZh7xwpV8x8vFgQ9tpIPbqBY= -github.com/test-network-function/privileged-daemonset v1.0.10/go.mod h1:OmZMWwRXPvlVr43KjLBapQzzOh3aj+YcNmnpxA2GzSg= -github.com/test-network-function/test-network-function-claim v1.0.27 h1:kxRb8Z668txqsCrzaeWLu9T9TeuwB+3d7xnq39xUlOE= -github.com/test-network-function/test-network-function-claim v1.0.27/go.mod h1:ManMHiKx8sLk4UDLRiYITVM8XmV4048pdfqh855v5RU= +github.com/test-network-function/privileged-daemonset v1.0.12 h1:6zPRdbWvho3GLzmi+Ou6fXpapRYhHXzRukf0AnqiuLk= +github.com/test-network-function/privileged-daemonset v1.0.12/go.mod h1:hjT4g2I0yNWAOtsdWWnDVmjtB6pf0sw7xoKFnqTfF8I= +github.com/test-network-function/test-network-function-claim v1.0.28 h1:do9IF2ILh98LB8m8nhbDAf2Ti5YATjL9LUAV3DmVglc= +github.com/test-network-function/test-network-function-claim v1.0.28/go.mod h1:P/EGpfCfJ60f8wIZiKlPQ8hDX/GOBN2xSHkcMclmJEc= github.com/urfave/cli v1.22.12/go.mod h1:sSBEIC79qR6OvcmsD4U3KABeOTxDqQtdDnaFuUN30b8= github.com/vbatts/tar-split v0.11.3 h1:hLFqsOLQ1SsppQNTMpkpPXClLDfC2A3Zgy9OUU+RVck= github.com/vbatts/tar-split v0.11.3/go.mod h1:9QlHN18E+fEH7RdG+QAJJcuya3rqT7eXSTY7wGrAokY= @@ -662,8 +662,8 @@ golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= -golang.org/x/crypto v0.12.0 h1:tFM/ta59kqch6LlvYnPa0yx5a83cL2nHflFhYKvv9Yk= -golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw= +golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= +golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -739,8 +739,8 @@ golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96b golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= -golang.org/x/net v0.14.0 h1:BONx9s002vGdD9umnlX1Po8vOZmrgH34qlHcD1MfK14= -golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI= +golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= +golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -808,6 +808,7 @@ golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220310020820-b874c991c1a5/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -816,14 +817,14 @@ golang.org/x/sys v0.0.0-20220906165534-d0df966e6959/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= -golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= +golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.0.0-20220526004731-065cf7ba2467/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= -golang.org/x/term v0.11.0 h1:F9tnn/DA/Im8nCwm+fX+1/eBwi4qFjRT++MhtVC4ZX0= -golang.org/x/term v0.11.0/go.mod h1:zC9APTIj3jG3FdV/Ons+XE1riIZXG4aZ4GTHiPZJPIU= +golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek= +golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -834,8 +835,8 @@ golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.12.0 h1:k+n5B8goJNdU7hSvEtMUz3d1Q6D/XW4COJSJR6fN0mc= -golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= +golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -992,8 +993,8 @@ google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAG google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= google.golang.org/grpc v1.42.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= -google.golang.org/grpc v1.55.0 h1:3Oj82/tFSCeUrRTg/5E/7d/W5A1tj6Ky1ABAuZuv5ag= -google.golang.org/grpc v1.55.0/go.mod h1:iYEXKGkEBhg1PjZQvoYEVPTDkHo1/bjTnfwTeGONTY8= +google.golang.org/grpc v1.56.3 h1:8I4C0Yq1EjstUzUJzpcRVbuYA2mODtEmpWiQoN/b2nc= +google.golang.org/grpc v1.56.3/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -1033,8 +1034,8 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU= gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= -helm.sh/helm/v3 v3.13.0 h1:XPJKIU30K4JTQ6VX/6e0hFAmEIonYa8E7wx5aqv4xOc= -helm.sh/helm/v3 v3.13.0/go.mod h1:2PBEKsMWKLVZTojUOqMS3Eadv5mP43FBWrRgLNkNm9Y= +helm.sh/helm/v3 v3.13.1 h1:DG+XLGzBJeZvMLlMbm6bPDLV1dGaVW9eZsDoUd1/LM0= +helm.sh/helm/v3 v3.13.1/go.mod h1:TdQRMiq46CSWcc68Hb0uVhvAWusaN90YwAV54cz6JzU= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -1042,26 +1043,26 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.28.2 h1:9mpl5mOb6vXZvqbQmankOfPIGiudghwCoLl1EYfUZbw= -k8s.io/api v0.28.2/go.mod h1:RVnJBsjU8tcMq7C3iaRSGMeaKt2TWEUXcpIt/90fjEg= -k8s.io/apiextensions-apiserver v0.28.2 h1:J6/QRWIKV2/HwBhHRVITMLYoypCoPY1ftigDM0Kn+QU= -k8s.io/apiextensions-apiserver v0.28.2/go.mod h1:5tnkxLGa9nefefYzWuAlWZ7RZYuN/765Au8cWLA6SRg= -k8s.io/apimachinery v0.28.2 h1:KCOJLrc6gu+wV1BYgwik4AF4vXOlVJPdiqn0yAWWwXQ= -k8s.io/apimachinery v0.28.2/go.mod h1:RdzF87y/ngqk9H4z3EL2Rppv5jj95vGS/HaFXrLDApU= -k8s.io/apiserver v0.28.2 h1:rBeYkLvF94Nku9XfXyUIirsVzCzJBs6jMn3NWeHieyI= -k8s.io/apiserver v0.28.2/go.mod h1:f7D5e8wH8MWcKD7azq6Csw9UN+CjdtXIVQUyUhrtb+E= -k8s.io/cli-runtime v0.28.2 h1:64meB2fDj10/ThIMEJLO29a1oujSm0GQmKzh1RtA/uk= -k8s.io/cli-runtime v0.28.2/go.mod h1:bTpGOvpdsPtDKoyfG4EG041WIyFZLV9qq4rPlkyYfDA= -k8s.io/client-go v0.28.2 h1:DNoYI1vGq0slMBN/SWKMZMw0Rq+0EQW6/AK4v9+3VeY= -k8s.io/client-go v0.28.2/go.mod h1:sMkApowspLuc7omj1FOSUxSoqjr+d5Q0Yc0LOFnYFJY= -k8s.io/component-base v0.28.2 h1:Yc1yU+6AQSlpJZyvehm/NkJBII72rzlEsd6MkBQ+G0E= -k8s.io/component-base v0.28.2/go.mod h1:4IuQPQviQCg3du4si8GpMrhAIegxpsgPngPRR/zWpzc= +k8s.io/api v0.28.3 h1:Gj1HtbSdB4P08C8rs9AR94MfSGpRhJgsS+GF9V26xMM= +k8s.io/api v0.28.3/go.mod h1:MRCV/jr1dW87/qJnZ57U5Pak65LGmQVkKTzf3AtKFHc= +k8s.io/apiextensions-apiserver v0.28.3 h1:Od7DEnhXHnHPZG+W9I97/fSQkVpVPQx2diy+2EtmY08= +k8s.io/apiextensions-apiserver v0.28.3/go.mod h1:NE1XJZ4On0hS11aWWJUTNkmVB03j9LM7gJSisbRt8Lc= +k8s.io/apimachinery v0.28.3 h1:B1wYx8txOaCQG0HmYF6nbpU8dg6HvA06x5tEffvOe7A= +k8s.io/apimachinery v0.28.3/go.mod h1:uQTKmIqs+rAYaq+DFaoD2X7pcjLOqbQX2AOiO0nIpb8= +k8s.io/apiserver v0.28.3 h1:8Ov47O1cMyeDzTXz0rwcfIIGAP/dP7L8rWbEljRcg5w= +k8s.io/apiserver v0.28.3/go.mod h1:YIpM+9wngNAv8Ctt0rHG4vQuX/I5rvkEMtZtsxW2rNM= +k8s.io/cli-runtime v0.28.3 h1:lvuJYVkwCqHEvpS6KuTZsUVwPePFjBfSGvuaLl2SxzA= +k8s.io/cli-runtime v0.28.3/go.mod h1:jeX37ZPjIcENVuXDDTskG3+FnVuZms5D9omDXS/2Jjc= +k8s.io/client-go v0.28.3 h1:2OqNb72ZuTZPKCl+4gTKvqao0AMOl9f3o2ijbAj3LI4= +k8s.io/client-go v0.28.3/go.mod h1:LTykbBp9gsA7SwqirlCXBWtK0guzfhpoW4qSm7i9dxo= +k8s.io/component-base v0.28.3 h1:rDy68eHKxq/80RiMb2Ld/tbH8uAE75JdCqJyi6lXMzI= +k8s.io/component-base v0.28.3/go.mod h1:fDJ6vpVNSk6cRo5wmDa6eKIG7UlIQkaFmZN2fYgIUD8= k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 h1:LyMgNKD2P8Wn1iAwQU5OhxCKlKJy0sHc+PcDwFB24dQ= k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9/go.mod h1:wZK2AVp1uHCp4VamDVgBP2COHZjqD1T68Rf0CM3YjSM= -k8s.io/kubectl v0.28.2 h1:fOWOtU6S0smdNjG1PB9WFbqEIMlkzU5ahyHkc7ESHgM= -k8s.io/kubectl v0.28.2/go.mod h1:6EQWTPySF1fn7yKoQZHYf9TPwIl2AygHEcJoxFekr64= +k8s.io/kubectl v0.28.3 h1:H1Peu1O3EbN9zHkJCcvhiJ4NUj6lb88sGPO5wrWIM6k= +k8s.io/kubectl v0.28.3/go.mod h1:RDAudrth/2wQ3Sg46fbKKl4/g+XImzvbsSRZdP2RiyE= k8s.io/utils v0.0.0-20230505201702-9f6742963106 h1:EObNQ3TW2D+WptiYXlApGNLVy0zm/JIBVY9i+M4wpAU= k8s.io/utils v0.0.0-20230505201702-9f6742963106/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= modernc.org/libc v1.22.5 h1:91BNch/e5B0uPbJFgqbxXuOnxBQjlS//icfQEGmvyjE= @@ -1072,8 +1073,8 @@ modernc.org/memory v1.5.0 h1:N+/8c5rE6EqugZwHii4IFsaJ7MUhoWX07J5tC/iI5Ds= modernc.org/memory v1.5.0/go.mod h1:PkUhL0Mugw21sHPeskwZW4D6VscE/GQJOnIpCnW6pSU= modernc.org/sqlite v1.23.1 h1:nrSBg4aRQQwq59JpvGEQ15tNxoO5pX/kUjcRNwSAGQM= modernc.org/sqlite v1.23.1/go.mod h1:OrDj17Mggn6MhE+iPbBNf7RGKODDE9NFT0f3EwDzJqk= -oras.land/oras-go v1.2.3 h1:v8PJl+gEAntI1pJ/LCrDgsuk+1PKVavVEPsYIHFE5uY= -oras.land/oras-go v1.2.3/go.mod h1:M/uaPdYklze0Vf3AakfarnpoEckvw0ESbRdN8Z1vdJg= +oras.land/oras-go v1.2.4 h1:djpBY2/2Cs1PV87GSJlxv4voajVOMZxqqtq9AB8YNvY= +oras.land/oras-go v1.2.4/go.mod h1:DYcGfb3YF1nKjcezfX2SNlDAeQFKSXmf+qrFmrh4324= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= diff --git a/internal/clientsholder/clientsholder.go b/internal/clientsholder/clientsholder.go index 513d0777d7..7992d6e675 100644 --- a/internal/clientsholder/clientsholder.go +++ b/internal/clientsholder/clientsholder.go @@ -17,6 +17,7 @@ package clientsholder import ( + "errors" "fmt" "time" @@ -164,29 +165,66 @@ func createByteArrayKubeConfig(kubeConfig *clientcmdapi.Config) ([]byte, error) return yamlBytes, nil } -// GetClientsHolder instantiate an ocp client -func newClientsHolder(filenames ...string) (*ClientsHolder, error) { //nolint:funlen // this is a special function with lots of assignments - logrus.Infof("Creating k8s go-clients holder.") - loadingRules := clientcmd.NewDefaultClientConfigLoadingRules() +// Creates a clientcmdapi.Config object from a rest.Config. +// Based on https://github.com/kubernetes/client-go/issues/711#issuecomment-1666075787 +func GetClientConfigFromRestConfig(restConfig *rest.Config) *clientcmdapi.Config { + return &clientcmdapi.Config{ + Kind: "Config", + APIVersion: "v1", + Clusters: map[string]*clientcmdapi.Cluster{ + "default-cluster": { + Server: restConfig.Host, + CertificateAuthority: restConfig.TLSClientConfig.CAFile, + }, + }, + Contexts: map[string]*clientcmdapi.Context{ + "default-context": { + Cluster: "default-cluster", + AuthInfo: "default-user", + }, + }, + CurrentContext: "default-context", + AuthInfos: map[string]*clientcmdapi.AuthInfo{ + "default-user": { + Token: restConfig.BearerToken, + }, + }, + } +} - precedence := []string{} - if len(filenames) > 0 { - precedence = append(precedence, filenames...) +func getClusterRestConfig(filenames ...string) (*rest.Config, error) { + restConfig, err := rest.InClusterConfig() + if err == nil { + logrus.Infof("CNF Cert Suite is running inside a cluster.") + + // Convert restConfig to clientcmdapi.Config so we can get the kubeconfig "file" bytes + // needed by preflight's operator checks. + clientConfig := GetClientConfigFromRestConfig(restConfig) + clientsHolder.KubeConfig, err = createByteArrayKubeConfig(clientConfig) + if err != nil { + return nil, fmt.Errorf("failed to create byte array from kube config reference: %v", err) + } + + // No error: we're inside a cluster. + return restConfig, nil } + logrus.Infof("Running outside a cluster. Parsing kubeconfig file/s %+v", filenames) + if len(filenames) == 0 { + return nil, errors.New("no kubeconfig files set") + } + + // Get the rest.Config from the kubeconfig file/s. + precedence := []string{} + precedence = append(precedence, filenames...) + + loadingRules := clientcmd.NewDefaultClientConfigLoadingRules() loadingRules.Precedence = precedence - configOverrides := &clientcmd.ConfigOverrides{} + kubeconfig := clientcmd.NewNonInteractiveDeferredLoadingClientConfig( loadingRules, - configOverrides, + &clientcmd.ConfigOverrides{}, ) - // Get a rest.Config from the kubeconfig file. This will be passed into all - // the client objects we create. - var err error - clientsHolder.RestConfig, err = kubeconfig.ClientConfig() - if err != nil { - return nil, fmt.Errorf("cannot instantiate rest config: %s", err) - } // Save merged config to temporary kubeconfig file. kubeRawConfig, err := kubeconfig.RawConfig() @@ -199,6 +237,24 @@ func newClientsHolder(filenames ...string) (*ClientsHolder, error) { //nolint:fu return nil, fmt.Errorf("failed to byte array kube config reference: %w", err) } + restConfig, err = kubeconfig.ClientConfig() + if err != nil { + return nil, fmt.Errorf("cannot instantiate rest config: %s", err) + } + + return restConfig, nil +} + +// GetClientsHolder instantiate an ocp client +func newClientsHolder(filenames ...string) (*ClientsHolder, error) { //nolint:funlen // this is a special function with lots of assignments + logrus.Infof("Creating k8s go-clients holder.") + + var err error + clientsHolder.RestConfig, err = getClusterRestConfig(filenames...) + if err != nil { + return nil, fmt.Errorf("failed to get rest.Config: %v", err) + } + DefaultTimeout := 10 * time.Second clientsHolder.RestConfig.Timeout = DefaultTimeout diff --git a/pkg/provider/provider.go b/pkg/provider/provider.go index df00ffd597..809b410ebd 100644 --- a/pkg/provider/provider.go +++ b/pkg/provider/provider.go @@ -60,7 +60,7 @@ const ( cscosName = "CentOS Stream CoreOS" rhelName = "Red Hat Enterprise Linux" tnfPartnerRepoDef = "quay.io/testnetworkfunction" - supportImageDef = "debug-partner:4.5.0" + supportImageDef = "debug-partner:4.5.1" ) // Node's roles labels. Node is role R if it has **any** of the labels of each list. diff --git a/pkg/provider/provider_test.go b/pkg/provider/provider_test.go index 3507483b11..5713a78285 100644 --- a/pkg/provider/provider_test.go +++ b/pkg/provider/provider_test.go @@ -788,7 +788,7 @@ func TestBuildImageWithVersion(t *testing.T) { { repoVar: "", supportImageVar: "", - expectedOutput: "quay.io/testnetworkfunction/debug-partner:4.5.0", + expectedOutput: "quay.io/testnetworkfunction/debug-partner:4.5.1", }, } diff --git a/version.json b/version.json index c8dc3842b7..4cb56e04cd 100644 --- a/version.json +++ b/version.json @@ -1,5 +1,5 @@ { - "partner_tag": "v4.5.0", + "partner_tag": "v4.5.1", "claimFormat": "v0.1.0", "parserTag": "v0.1.2" }