Skip to content

Commit

Permalink
Remove External Object Storage Secret Creation
Browse files Browse the repository at this point in the history
  • Loading branch information
gmfrasca committed May 23, 2023
1 parent 6c77c77 commit e5d0fd1
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions controllers/storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,11 @@ import (
dspav1alpha1 "github.com/opendatahub-io/data-science-pipelines-operator/api/v1alpha1"
)

const storageSecret = "minio/secret.yaml.tmpl"

var storageTemplates = []string{
"minio/deployment.yaml.tmpl",
"minio/pvc.yaml.tmpl",
"minio/service.yaml.tmpl",
storageSecret,
"minio/secret.yaml.tmpl",
}

// ReconcileStorage will set up Storage Connection.
Expand All @@ -45,13 +43,7 @@ func (r *DSPAReconciler) ReconcileStorage(ctx context.Context, dsp *dspav1alpha1

// If external storage is specified, it takes precedence
if externalStorageSpecified {
log.Info("Deploying external storage secret.")
// If using external storage, we just need to create the secret
// for apiserver
err := r.Apply(dsp, params, storageSecret)
if err != nil {
return err
}
log.Info("Using externalStorage, bypassing object storage deployment.")
} else if deployMinio {
log.Info("Applying object storage resources.")
for _, template := range storageTemplates {
Expand All @@ -72,7 +64,7 @@ func (r *DSPAReconciler) ReconcileStorage(ctx context.Context, dsp *dspav1alpha1
}
}
} else {
log.Info("No externalstorage detected, and minio disabled. " +
log.Info("No externalStorage detected, and minio disabled. " +
"skipping application of storage Resources")
return nil
}
Expand Down

0 comments on commit e5d0fd1

Please sign in to comment.