Skip to content

Commit ce4b436

Browse files
authored
Rename org to 'redhat-best-practices-for-k8s' (#170)
1 parent 32cf40d commit ce4b436

File tree

8 files changed

+13
-13
lines changed

8 files changed

+13
-13
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# oct - Offline Catalog Tool for Red Hat's certified containerized artifacts
2-
OCT is a containerized application that retrieves the latest certified artifacts (operators, containers and helm charts) from the [Red Hat's online catalog](https://catalog.redhat.com/api/containers/v1/ui/) to be used by RH's certification tools like [TNF](https://github.com/test-network-function/cnf-certification-test) or similar.
2+
OCT is a containerized application that retrieves the latest certified artifacts (operators, containers and helm charts) from the [Red Hat's online catalog](https://catalog.redhat.com/api/containers/v1/ui/) to be used by RH's certification tools like [TNF](https://github.com/redhat-best-practices-for-k8s/certsuite) or similar.
33

44
# Important
5-
This is a Work in Progress PoC/demo project, not a complete/GA nor a ready to use tool. Most of the code was copied from the [TNF repo](https://github.com/test-network-function/cnf-certification-test) in order to get a running code quickly.
5+
This is a Work in Progress PoC/demo project, not a complete/GA nor a ready to use tool. Most of the code was copied from the [TNF repo](https://github.com/redhat-best-practices-for-k8s/certsuite) in order to get a running code quickly.
66

77
# Motivation
88
## Completely disconnected environments issue
@@ -89,7 +89,7 @@ TNF's fetch CLI tool code was copied here, so the syntax is the same, but it's h
8989
```
9090
9191
# How it works
92-
The `oct` container has a script [run.sh](https://github.com/test-network-function/oct/blob/main/scripts/run.sh) that will run the TNF's `fetch` command. If it succeeds, the db files are copied into the container's `/tmp/dump` folder. The `OCT_DUMP_ONLY` env var is used to bypass the call to `fetch` so the current content of the container's db is copied into /tmp/dump.
92+
The `oct` container has a script [run.sh](https://github.com/redhat-best-practices-for-k8s/oct/blob/main/scripts/run.sh) that will run the TNF's `fetch` command. If it succeeds, the db files are copied into the container's `/tmp/dump` folder. The `OCT_DUMP_ONLY` env var is used to bypass the call to `fetch` so the current content of the container's db is copied into /tmp/dump.
9393
9494
The `fetch` tool was updated in this repo to retrieve the operator and container pages in a concurrent way, using a go routine for each http get. I did this modification to speed up the dev tests, as the original `fetch` implementation to the the sequantial retrieval of catalog pages was too slow (RH's online catalog takes a lot of time for each response). Do not pay too much attention to the current implementation, as the original `fetch` tool's code was copied some weeks ago, and it was modified later by some PRs in the TNF's repo.
9595
# Issues/Caveats/Warnings
@@ -101,6 +101,6 @@ The current TNF's `fetch` tool (used in `oct`) works like this:
101101
3. The current workflow to create a new `oct` container has two issues:
102102
- The catalog API to get the certified containers is not working quite well lately, so the workflow fails too many times.
103103
- The workflow uses the `fetch`tool directly, but the repo's db index is empty, so it will always create a new container, no matter if it contains exactly the same files as the latest one. This can easily be solved by improving the workflow to dump the latest container's db and comparing it with the new one obtained by the `fetch` tool. Whatever solution is implemented, it should avoid uploading the db files into this repo.
104-
4. The DB format of the `oct` tool is coupled to the one that TNF expects, where it should be the other way around (TNF depending on oct's repo) or both repos importing a third repo with the API/scheme only (as TNF does with the [claim file format](https://github.com/test-network-function/test-network-function-claim)).
104+
4. The DB format of the `oct` tool is coupled to the one that TNF expects, where it should be the other way around (TNF depending on oct's repo) or both repos importing a third repo with the API/scheme only (as TNF does with the [claim file format](https://github.com/redhat-best-practices-for-k8s/certsuite-claim)).
105105
106106
In my opinion, as these certification processes have begun to play important roles in the Red Hat's Ecosystem, this kind of tools shouldn't be needed, as the RH's online catalog could easily provide (a) its own container with this information or (b) a way to download a db.tar.gz with it.

cmd/tnf/fetch/fetch.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ import (
88
"os"
99
"time"
1010

11+
"github.com/redhat-best-practices-for-k8s/oct/pkg/certdb/offlinecheck"
1112
log "github.com/sirupsen/logrus"
1213
"github.com/spf13/cobra"
13-
"github.com/test-network-function/oct/pkg/certdb/offlinecheck"
1414
"gopkg.in/yaml.v3"
1515
)
1616

cmd/tnf/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
log "github.com/sirupsen/logrus"
55
"github.com/spf13/cobra"
66

7-
"github.com/test-network-function/oct/cmd/tnf/fetch"
7+
"github.com/redhat-best-practices-for-k8s/oct/cmd/tnf/fetch"
88
)
99

1010
var (

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module github.com/test-network-function/oct
1+
module github.com/redhat-best-practices-for-k8s/oct
22

33
go 1.22.5
44

pkg/certdb/certdb.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ package certdb
33
import (
44
"fmt"
55

6+
"github.com/redhat-best-practices-for-k8s/oct/pkg/certdb/offlinecheck"
7+
"github.com/redhat-best-practices-for-k8s/oct/pkg/certdb/onlinecheck"
68
"github.com/sirupsen/logrus"
7-
"github.com/test-network-function/oct/pkg/certdb/offlinecheck"
8-
"github.com/test-network-function/oct/pkg/certdb/onlinecheck"
99
"helm.sh/helm/v3/pkg/release"
1010
)
1111

pkg/certdb/offlinecheck/container.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ import (
2121
"io"
2222
"os"
2323

24+
"github.com/redhat-best-practices-for-k8s/oct/pkg/certdb/config"
2425
"github.com/sirupsen/logrus"
25-
"github.com/test-network-function/oct/pkg/certdb/config"
2626
)
2727

2828
var (

pkg/certdb/onlinecheck/api_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ package onlinecheck_test
1818
import (
1919
"testing"
2020

21+
"github.com/redhat-best-practices-for-k8s/oct/pkg/certdb/onlinecheck"
2122
"github.com/stretchr/testify/assert"
22-
"github.com/test-network-function/oct/pkg/certdb/onlinecheck"
2323
)
2424

2525
func TestIsContainerCertified(t *testing.T) {

pkg/certdb/onlinecheck/onlinecheck.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ import (
2323
"io"
2424
"net/http"
2525

26+
"github.com/redhat-best-practices-for-k8s/oct/pkg/certdb/config"
27+
"github.com/redhat-best-practices-for-k8s/oct/pkg/certdb/offlinecheck"
2628
log "github.com/sirupsen/logrus"
27-
"github.com/test-network-function/oct/pkg/certdb/config"
28-
"github.com/test-network-function/oct/pkg/certdb/offlinecheck"
2929
yaml "gopkg.in/yaml.v3"
3030
"helm.sh/helm/v3/pkg/release"
3131
)

0 commit comments

Comments
 (0)