Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,15 @@ generate-dashboards:
go run ./hack/index/generate.go

## @Helpers - Deprecated implementations

.PHONY: generate-deprecate-green ## This method should be remove soon. It is only an internal helper
generate-deprecate-green: ## ensure that you have update the the date of the report.
go run ./hack/scripts/deprecated-bundles-repo/deprecate-green/deprecated_index.go --image=testdata/reports/redhat_certified_operator_index/bundles_registry.redhat.io_redhat_certified_operator_index_v4.8_2021-08-16.json
go run ./hack/scripts/deprecated-bundles-repo/deprecate-green/deprecated_index.go --image=testdata/reports/redhat_redhat_marketplace_index/bundles_registry.redhat.io_redhat_redhat_marketplace_index_v4.8_2021-08-16.json
go run ./hack/scripts/deprecated-bundles-repo/deprecate-green/deprecated_index.go --image=testdata/reports/redhat_redhat_operator_index/bundles_registry.redhat.io_redhat_redhat_operator_index_v4.8_2021-08-15.json

.PHONY: generate-ivs-report ## This method should be remove soon. It is only an internal helper
generate-ivs-report: ## ensure that you have the mongo json file and update the the date of the report.
go run hack/scripts/ivs-emails/generate.go --mongo=hack/scripts/ivs-emails/mongo-query-join-results-prod.json --image=testdata/reports/redhat_certified_operator_index/bundles_registry.redhat.io_redhat_certified_operator_index_v4.8_2021-08-16.json
go run hack/scripts/ivs-emails/generate.go --mongo=hack/scripts/ivs-emails/mongo-query-join-results-prod.json --image=testdata/reports/redhat_redhat_marketplace_index/bundles_registry.redhat.io_redhat_redhat_marketplace_index_v4.8_2021-08-16.json

Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,20 @@
// deprecated on 4.9. That will be removed as soon as possible and is just added
// here in case it be required to be checked and used so far.
// The following script uses the JSON format output image to
// generates the deprecate.yml file with all bundles which requires
// generates the yml file with all bundles which requires
// to be deprecated because are using the APIs which will be removed on ocp 4.9 .
// Note that is equals the deprecate-all but will only return the cases where
// we can found a compatible path with 4.9
// we can found a compatible distribution with 4.9
// Example of usage: (see that we leave makefile target to help you out here)
// nolint: lll
// go run ./hack/scripts/deprecated-bundles-repo/deprecate-green/deprecated_index.go --image=testdata/reports/redhat_certified_operator_index/bundles_registry.redhat.io_redhat_certified_operator_index_v4.8_2021-08-10.json
// go run ./hack/scripts/deprecated-bundles-repo/deprecate-green/deprecated_index.go --image=testdata/reports/redhat_redhat_marketplace_index/bundles_registry.redhat.io_redhat_redhat_marketplace_index_v4.8_2021-08-06.json
// go run ./hack/scripts/deprecated-bundles-repo/deprecate-green/deprecated_index.go --image=testdata/reports/redhat_redhat_operator_index/bundles_registry.redhat.io_redhat_redhat_operator_index_v4.8_2021-08-15.json
package main

import (
"encoding/json"
"flag"
"log"
"os"
"path/filepath"
Expand Down Expand Up @@ -60,10 +66,17 @@ func main() {
log.Fatal(err)
}

// Update here the path of the JSON report for the image that you would like to be used
path := "testdata/reports/redhat_redhat_operator_index/bundles_registry.redhat.io_redhat_redhat_operator_index_v4.8_2021-08-07.json"
defaultOutputPath := "hack/scripts/deprecated-bundles-repo/deprecate-green"

var outputPath string
var jsonFile string

flag.StringVar(&outputPath, "output", defaultOutputPath, "Inform the path for output the report, if not informed it will be generated at hack/scripts/deprecated-bundles-repo/deprecate-green.")
flag.StringVar(&jsonFile, "image", "", "Inform the path for the JSON result which will be used to generate the report. ")

flag.Parse()

byteValue, err := pkg.ReadFile(filepath.Join(currentPath, path))
byteValue, err := pkg.ReadFile(filepath.Join(currentPath, jsonFile))
if err != nil {
log.Fatal(err)
}
Expand Down Expand Up @@ -109,7 +122,7 @@ func main() {
mapPackagesWithBundles[""] = all
}

apiDashReport, err := getAPIDashForImage(path)
apiDashReport, err := getAPIDashForImage(jsonFile)
if err != nil {
log.Fatal(err)
}
Expand Down Expand Up @@ -149,6 +162,13 @@ func main() {
})

for _, b := range bundles {

// skip the scenarios where deprecate apis were not found
if len(b.KindsDeprecateAPIs) == 0 ||
(len(b.KindsDeprecateAPIs) == 1 && b.KindsDeprecateAPIs[0] == pkg.Unknown) {
continue
}

deprecatedYaml.Bundles = append(deprecatedYaml.Bundles,
Bundles{
Paths: strings.ReplaceAll(b.BundleImagePath, "registry.redhat.io/", ""),
Expand All @@ -162,7 +182,8 @@ func main() {
return allDeprecated[i].PackageName < allDeprecated[j].PackageName
})

f, err := os.Create(filepath.Join(currentPath, "hack/scripts/deprecated-bundles-repo/deprecate-green/deprecated.yml"))
fp := filepath.Join(currentPath, outputPath, pkg.GetReportName(apiDashReport.ImageName, "deprecated", "yml"))
f, err := os.Create(fp)
if err != nil {
log.Fatal(err)
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
couchbase-enterprise-certified:
# Bundle: couchbase-operator.v1.2.1 : Note that this package has 1..N bundles compatible with 4.9
- registry.connect.redhat.com/couchbase/operator-bundle@sha256:cf4a0448fa22963d711bb2d3af8b56e3c356073b76233f33421121403893a859
# Bundle: couchbase-operator.v1.2.2 : Note that this package has 1..N bundles compatible with 4.9
- registry.connect.redhat.com/couchbase/operator-bundle@sha256:a2c9323d78e4a2e83810eb9df6e2f364356cd5432cee9bbd98c94784fbc27468
# Bundle: couchbase-operator.v2.0.0 : Note that this package has 1..N bundles compatible with 4.9
- registry.connect.redhat.com/couchbase/operator-bundle@sha256:9462f3735254b047f4b80b539797b83c31faa0ad923fe4a351dba693e51cadef
# Bundle: couchbase-operator.v2.0.1 : Note that this package has 1..N bundles compatible with 4.9
- registry.connect.redhat.com/couchbase/operator-bundle@sha256:1ec6fc8724eed1b9260eb3765a6280c0f1781bf6d51e998903cb65f1e20b5d73
# Bundle: couchbase-operator.v2.0.2 : Note that this package has 1..N bundles compatible with 4.9
- registry.connect.redhat.com/couchbase/operator-bundle@sha256:10ec7cafa6c4be66ea634b88e10a2b136fcd3322cad00309a7ccef455679c6ba
# Bundle: couchbase-operator.v2.1.0 : Note that this package has 1..N bundles compatible with 4.9
- registry.connect.redhat.com/couchbase/operator-bundle@sha256:78656ed0df41696e67429609e3262ec31f5ca9f5ca946300e6a4a6503c1bbd18
gpu-operator-certified:
# Bundle: gpu-operator-certified.v1.3.0 : Note that this package has 1..N bundles compatible with 4.9
- registry.connect.redhat.com/nvidia/gpu-operator-bundle@sha256:3a70920f1aca227ebe5b1db44125c4370bad00379a941f0bac301d61ee112ba2
# Bundle: gpu-operator-certified.v1.3.1 : Note that this package has 1..N bundles compatible with 4.9
- registry.connect.redhat.com/nvidia/gpu-operator-bundle@sha256:243b8f0bbc2bda6bb13395f165fe5ec01999331e9b61878686d2073df3bf906c
# Bundle: gpu-operator-certified.v1.4.0 : Note that this package has 1..N bundles compatible with 4.9
- registry.connect.redhat.com/nvidia/gpu-operator-bundle@sha256:0e69c29d33d5ab9d6676c6a6d5b89e57caddf44090bbabc74a12fea3005704bd
# Bundle: gpu-operator-certified.v1.5.1 : Note that this package has 1..N bundles compatible with 4.9
- registry.connect.redhat.com/nvidia/gpu-operator-bundle@sha256:5ec5a5cbaf6e667e761d3a6273c44f5facf29dabe2ffe502f08fe345536c8dc8
# Bundle: gpu-operator-certified.v1.5.2 : Note that this package has 1..N bundles compatible with 4.9
- registry.connect.redhat.com/nvidia/gpu-operator-bundle@sha256:3a944050b7ba261b5451e639165eb230f1afbc3be7624a7d6039f138b09cb19f
ibm-block-csi-operator:
# Bundle: ibm-block-csi-operator.v1.3.0 : Note that this package has 1..N bundles compatible with 4.9
- registry.connect.redhat.com/ibm/ibm-block-csi-operator-bundle@sha256:aa2f7b4b4b2d489cd9671b0b45d696ca2fcb8f76ad2b2551a06475917b9fdc99
# Bundle: ibm-block-csi-operator.v1.4.0 : Note that this package has 1..N bundles compatible with 4.9
- registry.connect.redhat.com/ibm/ibm-block-csi-operator-bundle@sha256:d78c62ef65db4858374cb7bc8434ef6442f6aef306475eb482d130abce8db971
# Bundle: ibm-block-csi-operator.v1.5.0 : Note that this package has 1..N bundles compatible with 4.9
- registry.connect.redhat.com/ibm/ibm-block-csi-operator-bundle@sha256:4e6b7b6006f6ad537b75fb681805003d4873230ef2706cab3333c4567502361c
nginx-ingress-operator:
# Bundle: nginx-ingress-operator.v0.0.4 : Note that this package has 1..N bundles compatible with 4.9
- registry.connect.redhat.com/nginx/nginx-ingress-operator-bundle@sha256:5825614ced508b2d168fca5dc0d53e169c0c598bf9008dd3ee0d6bf75781d3f6
# Bundle: nginx-ingress-operator.v0.0.6 : Note that this package has 1..N bundles compatible with 4.9
- registry.connect.redhat.com/nginx/nginx-ingress-operator-bundle@sha256:d53eea0345b2e18fb84d1208f5ca6c2e74c425403ba1611b5b1ee525315da0ae
# Bundle: nginx-ingress-operator.v0.0.7 : Note that this package has 1..N bundles compatible with 4.9
- registry.connect.redhat.com/nginx/nginx-ingress-operator-bundle@sha256:3dc0dc8f785195dc30977d96d038b8101ddb79e4e7ea9375c94bdbb533d4969b
# Bundle: nginx-ingress-operator.v0.1.0 : Note that this package has 1..N bundles compatible with 4.9
- registry.connect.redhat.com/nginx/nginx-ingress-operator-bundle@sha256:bb5088b3310edf490b5b72e89077326cb92ce6ad543330953c8fab92dfb6637d
# Bundle: nginx-ingress-operator.v0.2.0 : Note that this package has 1..N bundles compatible with 4.9
- registry.connect.redhat.com/nginx/nginx-ingress-operator-bundle@sha256:39e36214aae291f6724a9e688b16d702bbe57dfcb06e81de6d0d5efb0a5864d6
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
couchbase-enterprise-certified-rhmp:
# Bundle: couchbase-operator.v1.2.1 : Note that this package has 1..N bundles compatible with 4.9
- registry.connect.redhat.com/couchbase/operator-bundle@sha256:e97934cd2d4218d63105de60bcc8872e3d5aefefe81536d815e29463b2b2dc50
# Bundle: couchbase-operator.v1.2.2 : Note that this package has 1..N bundles compatible with 4.9
- registry.connect.redhat.com/couchbase/operator-bundle@sha256:6a5bda304437d7f303b09baf5f489654ca64b5ecbdc7c412798689c6392adcb6
# Bundle: couchbase-operator.v2.0.0 : Note that this package has 1..N bundles compatible with 4.9
- registry.connect.redhat.com/couchbase/operator-bundle@sha256:0778f04a4ff5fdbbcd57abf6ad06f1f9081281873dd927e48ff4be288588135b
# Bundle: couchbase-operator.v2.0.1 : Note that this package has 1..N bundles compatible with 4.9
- registry.connect.redhat.com/couchbase/operator-bundle@sha256:246ebf83967674dcdf0abb1553544690564927ea698dbf1928f3097f388ad677
# Bundle: couchbase-operator.v2.0.2 : Note that this package has 1..N bundles compatible with 4.9
- registry.connect.redhat.com/couchbase/operator-bundle@sha256:27f2297c5bf84bf8c28dd67bf806436992400763ada87263ebf90abe6c3cb692
# Bundle: couchbase-operator.v2.1.0 : Note that this package has 1..N bundles compatible with 4.9
- registry.connect.redhat.com/couchbase/operator-bundle@sha256:7d00537b2505fdb5418ad7a279451d5953f0b12b0223ac328ba885be73cbdbed
seldon-deploy-operator-rhmp:
# Bundle: seldon-deploy-operator.v0.7.0 : Note that this package has 1..N bundles compatible with 4.9
- registry.connect.redhat.com/seldonio/seldon-deploy-operator-bundle@sha256:ec4e1dd7d2049b5378e41987cec3fa36470aa20c89a98a96cb0ed433437afe34
Loading