Skip to content

Commit e4e8ac0

Browse files
authored
ITEP-67065 harbor-docker-oci registry add project (#36)
1 parent 6617480 commit e4e8ac0

File tree

5 files changed

+9
-11
lines changed

5 files changed

+9
-11
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.3.6-dev
1+
0.3.6

deploy/charts/app-orch-tenant-controller/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
apiVersion: v2
66
description: Tenant Controller
77
name: app-orch-tenant-controller
8-
version: 0.3.5
8+
version: 0.3.6
99
annotations:
1010
revision: ""
1111
created: ""
12-
appVersion: "0.3.5"
12+
appVersion: "0.3.6"

internal/plugins/catalog-provisioner.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ func (p *CatalogProvisionerPlugin) CreateEvent(ctx context.Context, event Event,
177177
Description: `Harbor OCI docker images registry`,
178178
Type: "IMAGE",
179179
ProjectUUID: event.UUID,
180-
RootURL: p.config.HarborServerExternal + "/",
180+
RootURL: ociRegistry + "/" + harborProjectName,
181181
Username: username,
182182
Cacerts: cacerts,
183183
AuthToken: token,

internal/plugins/catalog-provisioner_test.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,9 @@ func (s *PluginsTestSuite) TestCatalogProvisionerPluginCreate() {
4646
s.NoError(err, "Cannot initialize plugins")
4747

4848
err = Dispatch(ctx, Event{
49-
EventType: "create",
50-
UUID: "default",
49+
EventType: "create",
50+
UUID: "default",
51+
Organization: "test-org",
5152
}, nil)
5253
s.NoError(err, "Cannot dispatch create event")
5354

@@ -62,6 +63,8 @@ func (s *PluginsTestSuite) TestCatalogProvisionerPluginCreate() {
6263
s.Equal("token", mockCatalog.registries["harbor-helm-oci"].AuthToken)
6364
s.Equal("user", mockCatalog.registries["harbor-docker-oci"].Username)
6465
s.Equal("user", mockCatalog.registries["harbor-helm-oci"].Username)
66+
s.Equal("/catalog-apps-test-org-", mockCatalog.registries["harbor-docker-oci"].RootURL)
67+
s.Equal("/catalog-apps-test-org-", mockCatalog.registries["harbor-helm-oci"].RootURL)
6568
s.Equal("use-dynamic-cacert", mockCatalog.registries["harbor-docker-oci"].Cacerts)
6669
s.Equal("use-dynamic-cacert", mockCatalog.registries["harbor-helm-oci"].Cacerts)
6770

internal/southbound/harbor.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,6 @@ func NewK8s(namespace string) (K8s, error) {
4141
var K8sFactory = NewK8s
4242

4343
func HarborProjectName(org string, displayName string) string {
44-
// Begin hack - Remove this once the integration pipeline can handle Harbor projects named after the projectID
45-
if displayName == "default" && org == "" {
46-
return "catalog-apps"
47-
}
48-
// End hack
4944
return fmt.Sprintf(`catalog-apps-%s-%s`, org, displayName)
5045
}
5146

0 commit comments

Comments
 (0)