Skip to content

Commit

Permalink
Merge pull request #100 from guymguym/guy-operator
Browse files Browse the repository at this point in the history
Bug fix + v2.0.4
  • Loading branch information
guymguym authored Oct 24, 2019
2 parents 6c97a06 + bcb8984 commit b489207
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ For Mac
```
brew install noobaa/noobaa/noobaa
# or
wget https://github.com/noobaa/noobaa-operator/releases/download/v2.0.3/noobaa-mac-v2.0.3; mv noobaa-mac-* noobaa; chmod +x noobaa
wget https://github.com/noobaa/noobaa-operator/releases/download/v2.0.4/noobaa-mac-v2.0.4; mv noobaa-mac-* noobaa; chmod +x noobaa
```

For Linux
```
wget https://github.com/noobaa/noobaa-operator/releases/download/v2.0.3/noobaa-linux-v2.0.3; mv noobaa-linux-* noobaa; chmod +x noobaa
wget https://github.com/noobaa/noobaa-operator/releases/download/v2.0.4/noobaa-linux-v2.0.4; mv noobaa-linux-* noobaa; chmod +x noobaa
```

- Run: `./noobaa --help` for CLI usage
Expand Down
2 changes: 1 addition & 1 deletion deploy/operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ spec:
serviceAccountName: noobaa
containers:
- name: noobaa-operator
image: noobaa/noobaa-operator:2.0.3
image: noobaa/noobaa-operator:2.0.4
imagePullPolicy: IfNotPresent
resources:
limits:
Expand Down
6 changes: 3 additions & 3 deletions pkg/bundle/deploy.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package bundle

const Version = "2.0.3"
const Version = "2.0.4"

const Sha256_deploy_cluster_role_yaml = "f719ff8e0015a73d4e6ff322d2b30efa1cc89fcb3f856c06a5910785cb9e8dd8"

Expand Down Expand Up @@ -1741,7 +1741,7 @@ spec:
sourceNamespace: marketplace
`

const Sha256_deploy_operator_yaml = "ee73435f1e351d4e4bf9b33bc38b2520a67e75a6815a4c2f8154dc9dd3effb7e"
const Sha256_deploy_operator_yaml = "0acb64853eaab5e67dc262d6060d44b0f1054c61014af5615aa15f2f8d0ab6de"

const File_deploy_operator_yaml = `apiVersion: apps/v1
kind: Deployment
Expand All @@ -1761,7 +1761,7 @@ spec:
serviceAccountName: noobaa
containers:
- name: noobaa-operator
image: noobaa/noobaa-operator:2.0.3
image: noobaa/noobaa-operator:2.0.4
imagePullPolicy: IfNotPresent
resources:
limits:
Expand Down
14 changes: 7 additions & 7 deletions pkg/obc/provisioner.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
}

Expand All @@ -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{
Expand All @@ -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{
Expand Down
2 changes: 1 addition & 1 deletion version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ package version

const (
// Version is the noobaa-operator version (semver)
Version = "2.0.3"
Version = "2.0.4"
)

0 comments on commit b489207

Please sign in to comment.