Using bucket endpoint
- Using endpoint field to store AWS region when generating s3bucket secrets - Regenerated crds to reflect change to s3bucket - Minor improvement to Makefile Signed-off-by: Sam Leavens <rbwsam@gmail.com>
This commit is contained in:
		
							parent
							
								
									8af4e58adf
								
							
						
					
					
						commit
						d7f8dadcbd
					
				
							
								
								
									
										10
									
								
								Makefile
								
								
								
								
							
							
						
						
									
										10
									
								
								Makefile
								
								
								
								
							| 
						 | 
				
			
			@ -59,13 +59,19 @@ include build/makelib/docs.mk
 | 
			
		|||
 | 
			
		||||
# run `make help` to see the targets and options
 | 
			
		||||
 | 
			
		||||
go.test.unit: $(KUBEBUILDER)
 | 
			
		||||
 | 
			
		||||
# Generate manifests e.g. CRD, RBAC etc.
 | 
			
		||||
manifests:
 | 
			
		||||
manifests: vendor
 | 
			
		||||
	@$(INFO) Generating CRD manifests
 | 
			
		||||
	go run vendor/sigs.k8s.io/controller-tools/cmd/controller-gen/main.go crd --output-dir cluster/charts/crossplane/crds --nested
 | 
			
		||||
	@$(OK) Generating CRD manifests
 | 
			
		||||
 | 
			
		||||
# Generate a coverage report for cobertura applying exclusions on
 | 
			
		||||
# - generated file
 | 
			
		||||
cobertura:
 | 
			
		||||
	@cat $(GO_TEST_OUTPUT)/coverage.txt | \
 | 
			
		||||
		grep -v zz_generated.deepcopy | \
 | 
			
		||||
		$(GOCOVER_COBERTURA) > $(GO_TEST_OUTPUT)/cobertura-coverage.xml
 | 
			
		||||
		$(GOCOVER_COBERTURA) > $(GO_TEST_OUTPUT)/cobertura-coverage.xml
 | 
			
		||||
 | 
			
		||||
.PHONY: manifests cobertura
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -17,7 +17,6 @@ limitations under the License.
 | 
			
		|||
package v1alpha1
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	"fmt"
 | 
			
		||||
	"strconv"
 | 
			
		||||
 | 
			
		||||
	"github.com/aws/aws-sdk-go-v2/service/s3"
 | 
			
		||||
| 
						 | 
				
			
			@ -199,11 +198,6 @@ func (b *S3Bucket) OwnerReference() metav1.OwnerReference {
 | 
			
		|||
	return *util.ObjectToOwnerReference(b.ObjectReference())
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Endpoint returns the endpoint for the bucket
 | 
			
		||||
func (b *S3Bucket) Endpoint() string {
 | 
			
		||||
	return fmt.Sprintf("https://s3-%s.amazonaws.com", b.Spec.Region)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// IsAvailable for usage/binding
 | 
			
		||||
func (b *S3Bucket) IsAvailable() bool {
 | 
			
		||||
	return b.Status.IsCondition(corev1alpha1.Ready)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -40,8 +40,6 @@ const (
 | 
			
		|||
	ResourceCredentialsSecretClientKeyKey = "clientKey"
 | 
			
		||||
	// ResourceCredentialsTokenKey is the key inside a connection secret for the bearer token value
 | 
			
		||||
	ResourceCredentialsTokenKey = "token"
 | 
			
		||||
	// ResourceBucketNameKey is the key inside a connection secret for a bucket that identifies the name of the bucket
 | 
			
		||||
	ResourceBucketNameKey = "bucketName"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
// Resource defines a concrete resource that can be provisioned and bound to a resource claim.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue