-
Notifications
You must be signed in to change notification settings - Fork 101
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #100 from guymguym/guy-operator
Bug fix + v2.0.4
- Loading branch information
Showing
5 changed files
with
14 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -211,22 +211,22 @@ func NewBucketRequest( | |
r := &BucketRequest{ | ||
Provisioner: p, | ||
OB: ob, | ||
OBC: bucketOptions.ObjectBucketClaim, | ||
SysClient: sysClient, | ||
} | ||
|
||
if r.OB == nil { | ||
r.OBC = bucketOptions.ObjectBucketClaim | ||
r.BucketName = bucketOptions.BucketName | ||
r.AccountName = fmt.Sprintf("obc-account.%s.%[email protected]", r.BucketName, time.Now().Unix()) | ||
|
||
bucketClassName := bucketOptions.ObjectBucketClaim.Spec.AdditionalConfig["bucketclass"] | ||
bucketClassName := r.OBC.Spec.AdditionalConfig["bucketclass"] | ||
if bucketClassName == "" { | ||
bucketClassName = bucketOptions.Parameters["bucketclass"] | ||
} | ||
if bucketClassName == "" { | ||
return nil, fmt.Errorf("failed to find bucket class in OBC %s or storage class %s", | ||
bucketOptions.ObjectBucketClaim.Name, | ||
bucketOptions.ObjectBucketClaim.Spec.StorageClassName, | ||
r.OBC.Name, | ||
r.OBC.Spec.StorageClassName, | ||
) | ||
} | ||
|
||
|
@@ -239,12 +239,12 @@ func NewBucketRequest( | |
} | ||
if !util.KubeCheck(r.BucketClass) { | ||
msg := fmt.Sprintf("BucketClass %q not found in provisioner namespace %q", bucketClassName, p.Namespace) | ||
p.recorder.Event(bucketOptions.ObjectBucketClaim, "Warning", "MissingBucketClass", msg) | ||
p.recorder.Event(r.OBC, "Warning", "MissingBucketClass", msg) | ||
return nil, fmt.Errorf(msg) | ||
} | ||
if r.BucketClass.Status.Phase != nbv1.BucketClassPhaseReady { | ||
msg := fmt.Sprintf("BucketClass %q is not ready", bucketClassName) | ||
p.recorder.Event(bucketOptions.ObjectBucketClaim, "Warning", "BucketClassNotReady", msg) | ||
p.recorder.Event(r.OBC, "Warning", "BucketClassNotReady", msg) | ||
return nil, fmt.Errorf(msg) | ||
} | ||
r.OB = &nbv1.ObjectBucket{ | ||
|
@@ -253,7 +253,7 @@ func NewBucketRequest( | |
Endpoint: &nbv1.ObjectBucketEndpoint{ | ||
BucketHost: s3Hostname, | ||
BucketPort: s3Port, | ||
BucketName: bucketOptions.BucketName, | ||
BucketName: r.BucketName, | ||
AdditionalConfigData: map[string]string{}, | ||
}, | ||
AdditionalState: map[string]string{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,5 +2,5 @@ package version | |
|
||
const ( | ||
// Version is the noobaa-operator version (semver) | ||
Version = "2.0.3" | ||
Version = "2.0.4" | ||
) |