Skip to content

Commit a752f58

Browse files
perdasilvaPer Goncalves da Silva
andauthored
🌱 Bump catalogd from v0.28.0 to v0.29.0 (#1288)
* 🌱 Bump catalogd from v0.28.0 to v0.29.0 Signed-off-by: Per Goncalves da Silva <[email protected]> * Update operator-controller for catalogd condition changes Signed-off-by: Per Goncalves da Silva <[email protected]> --------- Signed-off-by: Per Goncalves da Silva <[email protected]> Co-authored-by: Per Goncalves da Silva <[email protected]>
1 parent 134386d commit a752f58

File tree

9 files changed

+20
-20
lines changed

9 files changed

+20
-20
lines changed

docs/Tasks/adding-a-catalog.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ This catalog is distributed as an image [quay.io/operatorhubio/catalog](https://
113113
Reason: UnpackSuccessful
114114
Status: True
115115
Type: Unpacked
116-
Content URL: https://catalogd-catalogserver.olmv1-system.svc/catalogs/operatorhubio/all.json
116+
Content URL: https://catalogd-server.olmv1-system.svc/catalogs/operatorhubio/all.json
117117
Observed Generation: 2
118118
Resolved Source:
119119
Image:

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ require (
1818
github.com/onsi/gomega v1.34.2
1919
github.com/opencontainers/go-digest v1.0.0
2020
github.com/operator-framework/api v0.27.0
21-
github.com/operator-framework/catalogd v0.28.0
21+
github.com/operator-framework/catalogd v0.29.0
2222
github.com/operator-framework/helm-operator-plugins v0.5.0
2323
github.com/operator-framework/operator-registry v1.47.0
2424
github.com/spf13/pflag v1.0.5

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -537,8 +537,8 @@ github.com/openshift/crd-schema-checker v0.0.0-20240404194209-35a9033b1d11 h1:eT
537537
github.com/openshift/crd-schema-checker v0.0.0-20240404194209-35a9033b1d11/go.mod h1:EmVJt97N+pfWFsli/ipXTBZqSG5F5KGQhm3c3IsGq1o=
538538
github.com/operator-framework/api v0.27.0 h1:OrVaGKZJvbZo58HTv2guz7aURkhVKYhFqZ/6VpifiXI=
539539
github.com/operator-framework/api v0.27.0/go.mod h1:lg2Xx+S8NQWGYlEOvFwQvH46E5EK5IrAIL7HWfAhciM=
540-
github.com/operator-framework/catalogd v0.28.0 h1:4M8Jpe443EAWJ2L0knTidq3haM+ac6seT+0IrAGULng=
541-
github.com/operator-framework/catalogd v0.28.0/go.mod h1:cikCg3BwFMyMrRhMXN6cxpv03Cm/EMV3rHX5yi2w8vo=
540+
github.com/operator-framework/catalogd v0.29.0 h1:GpeBGUWNGbVTH9l2S4RLi2wRvLAguG/4LYdxqfrwlak=
541+
github.com/operator-framework/catalogd v0.29.0/go.mod h1:cikCg3BwFMyMrRhMXN6cxpv03Cm/EMV3rHX5yi2w8vo=
542542
github.com/operator-framework/helm-operator-plugins v0.5.0 h1:qph2OoECcI9mpuUBtOsWOMgvpx52mPTTSvzVxICsT04=
543543
github.com/operator-framework/helm-operator-plugins v0.5.0/go.mod h1:yVncrZ/FJNqedMil+055fk6sw8aMKRrget/AqGM0ig0=
544544
github.com/operator-framework/operator-lib v0.15.0 h1:0QeRM4PMtThqINpcFGCEBnIV3Z8u7/8fYLEx6mUtdcM=

hack/tools/catalogs/download-catalog

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ assert-commands kubectl jq wget
88

99
# ClusterCatalog coordinates
1010
: "${CATALOGD_CATALOGD_SERVICE_NAMESPACE:=olmv1-system}"
11-
: "${CATALOGD_SERVICE_NAME:=catalogd-catalogserver}"
11+
: "${CATALOGD_SERVICE_NAME:=catalogd-server}"
1212
: "${CATALOGD_SERVICE_PORT:=443}" # Assumes the service uses HTTPS on port 443
1313
: "${CATALOGD_LOCAL_SERVICE_PORT:=8001}"
1414

internal/catalogmetadata/client/client.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ type Client struct {
3939
func (c *Client) GetPackage(ctx context.Context, catalog *catalogd.ClusterCatalog, pkgName string) (*declcfg.DeclarativeConfig, error) {
4040
// if the catalog has not been successfully unpacked, report an error. This ensures that our
4141
// reconciles are deterministic and wait for all desired catalogs to be ready.
42-
if !meta.IsStatusConditionPresentAndEqual(catalog.Status.Conditions, catalogd.TypeUnpacked, metav1.ConditionTrue) {
43-
return nil, fmt.Errorf("catalog %q is not unpacked", catalog.Name)
42+
if !meta.IsStatusConditionPresentAndEqual(catalog.Status.Conditions, catalogd.TypeServing, metav1.ConditionTrue) {
43+
return nil, fmt.Errorf("catalog %q is not being served", catalog.Name)
4444
}
4545

4646
catalogFsys, err := c.fetcher.FetchCatalogContents(ctx, catalog)

internal/catalogmetadata/client/client_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,13 @@ func TestClientNew(t *testing.T) {
3434
catalog: &catalogd.ClusterCatalog{ObjectMeta: metav1.ObjectMeta{Name: "catalog-1"}},
3535
fetcher: fetcherFunc(func(context.Context, *catalogd.ClusterCatalog) (fs.FS, error) { return testFS, nil }),
3636
assert: func(t *testing.T, dc *declcfg.DeclarativeConfig, err error) {
37-
assert.ErrorContains(t, err, `catalog "catalog-1" is not unpacked`)
37+
assert.ErrorContains(t, err, `catalog "catalog-1" is not being served`)
3838
},
3939
},
4040
{
4141
name: "unpacked, fetcher returns error",
4242
catalog: &catalogd.ClusterCatalog{
43-
Status: catalogd.ClusterCatalogStatus{Conditions: []metav1.Condition{{Type: catalogd.TypeUnpacked, Status: metav1.ConditionTrue}}},
43+
Status: catalogd.ClusterCatalogStatus{Conditions: []metav1.Condition{{Type: catalogd.TypeServing, Status: metav1.ConditionTrue}}},
4444
},
4545
fetcher: fetcherFunc(func(context.Context, *catalogd.ClusterCatalog) (fs.FS, error) { return nil, errors.New("fetch error") }),
4646
assert: func(t *testing.T, dc *declcfg.DeclarativeConfig, err error) {
@@ -50,7 +50,7 @@ func TestClientNew(t *testing.T) {
5050
{
5151
name: "unpacked, invalid package path",
5252
catalog: &catalogd.ClusterCatalog{
53-
Status: catalogd.ClusterCatalogStatus{Conditions: []metav1.Condition{{Type: catalogd.TypeUnpacked, Status: metav1.ConditionTrue}}},
53+
Status: catalogd.ClusterCatalogStatus{Conditions: []metav1.Condition{{Type: catalogd.TypeServing, Status: metav1.ConditionTrue}}},
5454
},
5555
fetcher: fetcherFunc(func(context.Context, *catalogd.ClusterCatalog) (fs.FS, error) { return testFS, nil }),
5656
pkgName: "/",
@@ -61,7 +61,7 @@ func TestClientNew(t *testing.T) {
6161
{
6262
name: "unpacked, package missing",
6363
catalog: &catalogd.ClusterCatalog{
64-
Status: catalogd.ClusterCatalogStatus{Conditions: []metav1.Condition{{Type: catalogd.TypeUnpacked, Status: metav1.ConditionTrue}}},
64+
Status: catalogd.ClusterCatalogStatus{Conditions: []metav1.Condition{{Type: catalogd.TypeServing, Status: metav1.ConditionTrue}}},
6565
},
6666
pkgName: "pkg-missing",
6767
fetcher: fetcherFunc(func(context.Context, *catalogd.ClusterCatalog) (fs.FS, error) { return testFS, nil }),
@@ -73,7 +73,7 @@ func TestClientNew(t *testing.T) {
7373
{
7474
name: "unpacked, invalid package present",
7575
catalog: &catalogd.ClusterCatalog{
76-
Status: catalogd.ClusterCatalogStatus{Conditions: []metav1.Condition{{Type: catalogd.TypeUnpacked, Status: metav1.ConditionTrue}}},
76+
Status: catalogd.ClusterCatalogStatus{Conditions: []metav1.Condition{{Type: catalogd.TypeServing, Status: metav1.ConditionTrue}}},
7777
},
7878
pkgName: "invalid-pkg-present",
7979
fetcher: fetcherFunc(func(context.Context, *catalogd.ClusterCatalog) (fs.FS, error) {
@@ -89,7 +89,7 @@ func TestClientNew(t *testing.T) {
8989
{
9090
name: "unpacked, package present",
9191
catalog: &catalogd.ClusterCatalog{
92-
Status: catalogd.ClusterCatalogStatus{Conditions: []metav1.Condition{{Type: catalogd.TypeUnpacked, Status: metav1.ConditionTrue}}},
92+
Status: catalogd.ClusterCatalogStatus{Conditions: []metav1.Condition{{Type: catalogd.TypeServing, Status: metav1.ConditionTrue}}},
9393
},
9494
pkgName: "pkg-present",
9595
fetcher: fetcherFunc(func(context.Context, *catalogd.ClusterCatalog) (fs.FS, error) { return testFS, nil }),

scripts/install.tpl.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ kubectl_wait "olmv1-system" "deployment/catalogd-controller-manager" "60s"
5151

5252
if [[ "${install_default_catalogs,,}" != "false" ]]; then
5353
kubectl apply -f "https://github.com/operator-framework/catalogd/releases/download/${catalogd_version}/default-catalogs.yaml"
54-
kubectl wait --for=condition=Unpacked "clustercatalog/operatorhubio" --timeout="60s"
54+
kubectl wait --for=condition=Serving "clustercatalog/operatorhubio" --timeout="60s"
5555
fi
5656

5757
kubectl apply -f "${operator_controller_manifest}"

test/e2e/cluster_extension_install_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -614,12 +614,12 @@ func TestClusterExtensionInstallReResolvesWhenCatalogIsPatched(t *testing.T) {
614614
require.NoError(t, err)
615615
require.EventuallyWithT(t, func(ct *assert.CollectT) {
616616
assert.NoError(ct, c.Get(context.Background(), types.NamespacedName{Name: extensionCatalog.Name}, extensionCatalog))
617-
cond := apimeta.FindStatusCondition(extensionCatalog.Status.Conditions, catalogd.TypeUnpacked)
617+
cond := apimeta.FindStatusCondition(extensionCatalog.Status.Conditions, catalogd.TypeServing)
618618
if !assert.NotNil(ct, cond) {
619619
return
620620
}
621621
assert.Equal(ct, metav1.ConditionTrue, cond.Status)
622-
assert.Equal(ct, catalogd.ReasonUnpackSuccessful, cond.Reason)
622+
assert.Equal(ct, catalogd.ReasonAvailable, cond.Reason)
623623
}, pollDuration, pollInterval)
624624

625625
t.Log("By eventually reporting a successful resolution and bundle path")
@@ -714,12 +714,12 @@ func TestClusterExtensionInstallReResolvesWhenNewCatalog(t *testing.T) {
714714
require.NoError(t, err)
715715
require.EventuallyWithT(t, func(ct *assert.CollectT) {
716716
assert.NoError(ct, c.Get(context.Background(), types.NamespacedName{Name: extensionCatalog.Name}, extensionCatalog))
717-
cond := apimeta.FindStatusCondition(extensionCatalog.Status.Conditions, catalogd.TypeUnpacked)
717+
cond := apimeta.FindStatusCondition(extensionCatalog.Status.Conditions, catalogd.TypeServing)
718718
if !assert.NotNil(ct, cond) {
719719
return
720720
}
721721
assert.Equal(ct, metav1.ConditionTrue, cond.Status)
722-
assert.Equal(ct, catalogd.ReasonUnpackSuccessful, cond.Reason)
722+
assert.Equal(ct, catalogd.ReasonAvailable, cond.Reason)
723723
}, pollDuration, pollInterval)
724724

725725
t.Log("By eventually reporting a successful resolution and bundle path")

test/upgrade-e2e/post_upgrade_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,12 @@ func TestClusterExtensionAfterOLMUpgrade(t *testing.T) {
6767
require.EventuallyWithT(t, func(ct *assert.CollectT) {
6868
var clusterCatalog catalogdv1alpha1.ClusterCatalog
6969
assert.NoError(ct, c.Get(ctx, types.NamespacedName{Name: testClusterCatalogName}, &clusterCatalog))
70-
cond := apimeta.FindStatusCondition(clusterCatalog.Status.Conditions, catalogdv1alpha1.TypeUnpacked)
70+
cond := apimeta.FindStatusCondition(clusterCatalog.Status.Conditions, catalogdv1alpha1.TypeServing)
7171
if !assert.NotNil(ct, cond) {
7272
return
7373
}
7474
assert.Equal(ct, metav1.ConditionTrue, cond.Status)
75-
assert.Equal(ct, catalogdv1alpha1.ReasonUnpackSuccessful, cond.Reason)
75+
assert.Equal(ct, catalogdv1alpha1.ReasonAvailable, cond.Reason)
7676
}, time.Minute, time.Second)
7777

7878
t.Log("Checking that the ClusterExtension is installed")

0 commit comments

Comments
 (0)