Skip to content

Commit

Permalink
objectstorage: Return error if no object bucket claims found (PROJQUA…
Browse files Browse the repository at this point in the history
…Y-7995)

- If there are no objects returned in the object bucket claims list and storage is managed, return an error
  • Loading branch information
jonathankingfc committed Oct 9, 2024
1 parent 2d9f2fe commit 0b5d06c
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ ENVTEST ?= $(LOCALBIN)/setup-envtest

## Tool Versions
KUSTOMIZE_VERSION ?= v5.2.1
CONTROLLER_TOOLS_VERSION ?= v0.13.0
CONTROLLER_TOOLS_VERSION ?= v0.16.3

.PHONY: kustomize
kustomize: $(KUSTOMIZE) ## Download kustomize locally if necessary. If wrong version is installed, it will be removed before downloading.
Expand Down
4 changes: 1 addition & 3 deletions bundle/manifests/quayregistries.crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.14.0
controller-gen.kubebuilder.io/version: v0.16.3
name: quayregistries.quay.redhat.com
spec:
group: quay.redhat.com
Expand Down Expand Up @@ -871,7 +871,6 @@ spec:
description: |-
Name of the referent.
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
TODO: Add other useful fields. apiVersion, kind, uid?
type: string
optional:
description: Specify whether the ConfigMap
Expand Down Expand Up @@ -934,7 +933,6 @@ spec:
description: |-
Name of the referent.
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
TODO: Add other useful fields. apiVersion, kind, uid?
type: string
optional:
description: Specify whether the Secret or
Expand Down
4 changes: 1 addition & 3 deletions config/crd/bases/quay.redhat.com_quayregistries.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.14.0
controller-gen.kubebuilder.io/version: v0.16.3
name: quayregistries.quay.redhat.com
spec:
group: quay.redhat.com
Expand Down Expand Up @@ -871,7 +871,6 @@ spec:
description: |-
Name of the referent.
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
TODO: Add other useful fields. apiVersion, kind, uid?
type: string
optional:
description: Specify whether the ConfigMap
Expand Down Expand Up @@ -934,7 +933,6 @@ spec:
description: |-
Name of the referent.
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
TODO: Add other useful fields. apiVersion, kind, uid?
type: string
optional:
description: Specify whether the Secret or
Expand Down
3 changes: 1 addition & 2 deletions controllers/quay/features.go
Original file line number Diff line number Diff line change
Expand Up @@ -344,8 +344,7 @@ func (r *QuayRegistryReconciler) checkObjectBucketClaimsAvailable(
return nil
}

r.Log.Info("`ObjectBucketClaim` not found")
return nil
return fmt.Errorf("`ObjectBucketClaim` not found")
}

// checkBuildManagerAvailable verifies if the config bundle contains an entry pointing to the
Expand Down

0 comments on commit 0b5d06c

Please sign in to comment.