Skip to content

Commit

Permalink
fix: add fileSystem
Browse files Browse the repository at this point in the history
Signed-off-by: cndoit18 <cndoit18@outlook.com>
  • Loading branch information
cndoit18 authored and bitsf committed Jun 30, 2021
1 parent f99c43a commit db72477
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pkg/cluster/controllers/harbor/harbor.go
Expand Up @@ -99,7 +99,7 @@ func NewHarborController(options ...k8s.Option) *Controller {
}

// getHarborCR will get a Harbor CR from the harborcluster definition.
func (harbor *Controller) getHarborCR(ctx context.Context, harborcluster *goharborv1.HarborCluster, dependencies *lcm.CRStatusCollection) *goharborv1.Harbor {
func (harbor *Controller) getHarborCR(ctx context.Context, harborcluster *goharborv1.HarborCluster, dependencies *lcm.CRStatusCollection) *goharborv1.Harbor { // nolint:funlen
namespacedName := harbor.getHarborCRNamespacedName(harborcluster)

spec := harborcluster.Spec.EmbeddedHarborSpec.DeepCopy()
Expand Down Expand Up @@ -130,6 +130,11 @@ func (harbor *Controller) getHarborCR(ctx context.Context, harborcluster *goharb
},
}

if harborcluster.Spec.Storage.Spec.FileSystem != nil {
harborCR.Spec.ImageChartStorage = &goharborv1.HarborStorageImageChartStorageSpec{
FileSystem: harborCR.Spec.ImageChartStorage.FileSystem,
}
}
// Use incluster spec in first priority.
// Check based on the case that if the related dependent services are created
if db := harbor.getDatabaseSpec(dependencies); db != nil {
Expand Down

0 comments on commit db72477

Please sign in to comment.