Skip to content

Commit

Permalink
Merge branch 'master' of github.com:kyma-project/kyma into feature/go…
Browse files Browse the repository at this point in the history
…frs-bump
  • Loading branch information
Jakub Błaszczyk committed Mar 13, 2019
2 parents 98a634a + 91e5ade commit a6e3cf9
Show file tree
Hide file tree
Showing 58 changed files with 226 additions and 70 deletions.
4 changes: 4 additions & 0 deletions components/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,7 @@ This table lists the available types:
|service| Serves an HTTP/S-based API, usually securely exposed to the public. It uses the domain name and the API it serves.|connector-service|
|broker| Implements the [OpenServiceBroker](https://www.openservicebrokerapi.org/) specification to enrich the Kyma Service Catalog with the services of a provider. It uses the name of the provider it integrates with.|azure-broker|
|configurer| A one-time task which usually runs as an [Init Container](https://kubernetes.io/docs/concepts/workloads/pods/init-containers/) in order to configure the application.|ark-plugins-configurer (not migrated yet)|

## Development

Follow [this](https://github.com/kyma-project/kyma/blob/master/resources/README.md) development guide when you add a new component to the `kyma` repository.
6 changes: 5 additions & 1 deletion components/api-controller/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,8 @@ ci-release: build build-image push-image

.PHONY: clean
clean:
rm -rf bin
rm -rf bin

.PHONY: path-to-referenced-charts
path-to-referenced-charts:
@echo "resources/core"
4 changes: 4 additions & 0 deletions components/apiserver-proxy/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,7 @@ ci-release: build build-image push-image
.PHONY: clean
clean:
rm -rf bin

.PHONY: path-to-referenced-charts
path-to-referenced-charts:
@echo "resources/core"
3 changes: 3 additions & 0 deletions components/apiserver-proxy/internal/proxy/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ func (h *kubeRBACProxy) Handle(w http.ResponseWriter, req *http.Request) bool {
}

req.Header.Set("Impersonate-User", u.GetName())
for _, gr := range u.GetGroups() {
req.Header.Add("Impersonate-Group", gr)
}

return true
}
Expand Down
4 changes: 4 additions & 0 deletions components/application-broker/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,7 @@ ci-release: build build-image push-image
clean:
rm -f $(binary)

.PHONY: path-to-referenced-charts
path-to-referenced-charts:
@echo "resources/application-connector"

6 changes: 5 additions & 1 deletion components/application-gateway/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,8 @@ ci-pr: build build-image push-image
ci-master: build build-image push-image

.PHONY: ci-release
ci-release: build build-image push-image
ci-release: build build-image push-image

.PHONY: path-to-referenced-charts
path-to-referenced-charts:
@echo "resources/application-connector"
3 changes: 3 additions & 0 deletions components/application-operator/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,6 @@ ci-master: build build-image push-image
.PHONY: ci-release
ci-release: build build-image push-image

.PHONY: path-to-referenced-charts
path-to-referenced-charts:
@echo "resources/application-connector"
3 changes: 3 additions & 0 deletions components/application-registry/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,6 @@ ci-master: build build-image push-image
.PHONY: ci-release
ci-release: build build-image push-image

.PHONY: path-to-referenced-charts
path-to-referenced-charts:
@echo "resources/application-connector"
6 changes: 5 additions & 1 deletion components/asset-upload-service/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,8 @@ build-image:
docker build -t $(IMG_NAME) .
push-image:
docker tag $(IMG_NAME) $(IMG):$(TAG)
docker push $(IMG):$(TAG)
docker push $(IMG):$(TAG)

.PHONY: path-to-referenced-charts
path-to-referenced-charts:
@echo "resources/assetstore"
2 changes: 1 addition & 1 deletion components/asset-upload-service/internal/bucket/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ func (h *Handler) tryCreatingBucket(prefix string) (string, error) {
}

func (h *Handler) bucketPolicyString(bucketName string, bucketPolicy policy.BucketPolicy) (string, error) {
statements := policy.SetPolicy([]policy.Statement{}, bucketPolicy, bucketName, "*")
statements := policy.SetPolicy([]policy.Statement{}, bucketPolicy, bucketName, "")
p := policy.BucketAccessPolicy{
Version: "2012-10-17", // Fixed version
Statements: statements,
Expand Down
6 changes: 5 additions & 1 deletion components/assetstore-controller-manager/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,8 @@ docker-push:

ci-pr: setup docker-build docker-push
ci-master: setup docker-build docker-push
ci-release: setup docker-build docker-push
ci-release: setup docker-build docker-push

.PHONY: path-to-referenced-charts
path-to-referenced-charts:
@echo "resources/assetstore"
8 changes: 4 additions & 4 deletions components/assetstore-controller-manager/pkg/store/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -274,13 +274,13 @@ func (s *store) prepareBucketPolicy(bucketName string, bucketPolicy v1alpha2.Buc
statements := make([]policy.Statement, 0)
switch {
case bucketPolicy == v1alpha2.BucketPolicyReadOnly:
statements = policy.SetPolicy(statements, policy.BucketPolicyReadOnly, bucketName, "*")
statements = policy.SetPolicy(statements, policy.BucketPolicyReadOnly, bucketName, "")
case bucketPolicy == v1alpha2.BucketPolicyWriteOnly:
statements = policy.SetPolicy(statements, policy.BucketPolicyWriteOnly, bucketName, "*")
statements = policy.SetPolicy(statements, policy.BucketPolicyWriteOnly, bucketName, "")
case bucketPolicy == v1alpha2.BucketPolicyReadWrite:
statements = policy.SetPolicy(statements, policy.BucketPolicyReadWrite, bucketName, "*")
statements = policy.SetPolicy(statements, policy.BucketPolicyReadWrite, bucketName, "")
default:
statements = policy.SetPolicy(statements, policy.BucketPolicyNone, bucketName, "*")
statements = policy.SetPolicy(statements, policy.BucketPolicyNone, bucketName, "")
}

return policy.BucketAccessPolicy{
Expand Down
12 changes: 6 additions & 6 deletions components/assetstore-controller-manager/pkg/store/store_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ func TestStore_CompareBucketPolicy(t *testing.T) {
g := gomega.NewGomegaWithT(t)
bucketName := "test-bucket"
expectedPolicy := v1alpha2.BucketPolicyReadOnly
remotePolicy := "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"s3:GetBucketLocation\"],\"Effect\":\"Allow\",\"Principal\":{\"AWS\":[\"*\"]},\"Resource\":[\"arn:aws:s3:::test-bucket\"],\"Sid\":\"\"},{\"Action\":[\"s3:ListBucket\"],\"Condition\":{\"StringEquals\":{\"s3:prefix\":[\"*\"]}},\"Effect\":\"Allow\",\"Principal\":{\"AWS\":[\"*\"]},\"Resource\":[\"arn:aws:s3:::test-bucket\"],\"Sid\":\"\"},{\"Action\":[\"s3:GetObject\"],\"Effect\":\"Allow\",\"Principal\":{\"AWS\":[\"*\"]},\"Resource\":[\"arn:aws:s3:::test-bucket/**\"],\"Sid\":\"\"}]}"
remotePolicy := "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"s3:GetBucketLocation\",\"s3:ListBucket\"],\"Effect\":\"Allow\",\"Principal\":{\"AWS\":[\"*\"]},\"Resource\":[\"arn:aws:s3:::test-bucket\"],\"Sid\":\"\"},{\"Action\":[\"s3:GetObject\"],\"Effect\":\"Allow\",\"Principal\":{\"AWS\":[\"*\"]},\"Resource\":[\"arn:aws:s3:::test-bucket/*\"],\"Sid\":\"\"}]}"

minio := new(automock.MinioClient)
minio.On("GetBucketPolicy", bucketName).Return(remotePolicy, nil).Once()
Expand All @@ -121,7 +121,7 @@ func TestStore_CompareBucketPolicy(t *testing.T) {
g := gomega.NewGomegaWithT(t)
bucketName := "test-bucket"
expectedPolicy := v1alpha2.BucketPolicyWriteOnly
remotePolicy := "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"s3:GetBucketLocation\",\"s3:ListBucketMultipartUploads\"],\"Effect\":\"Allow\",\"Principal\":{\"AWS\":[\"*\"]},\"Resource\":[\"arn:aws:s3:::test-bucket\"],\"Sid\":\"\"},{\"Action\":[\"s3:AbortMultipartUpload\",\"s3:DeleteObject\",\"s3:ListMultipartUploadParts\",\"s3:PutObject\"],\"Effect\":\"Allow\",\"Principal\":{\"AWS\":[\"*\"]},\"Resource\":[\"arn:aws:s3:::test-bucket/**\"],\"Sid\":\"\"}]}"
remotePolicy := "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"s3:GetBucketLocation\",\"s3:ListBucketMultipartUploads\"],\"Effect\":\"Allow\",\"Principal\":{\"AWS\":[\"*\"]},\"Resource\":[\"arn:aws:s3:::test-bucket\"],\"Sid\":\"\"},{\"Action\":[\"s3:AbortMultipartUpload\",\"s3:DeleteObject\",\"s3:ListMultipartUploadParts\",\"s3:PutObject\"],\"Effect\":\"Allow\",\"Principal\":{\"AWS\":[\"*\"]},\"Resource\":[\"arn:aws:s3:::test-bucket/*\"],\"Sid\":\"\"}]}"

minio := new(automock.MinioClient)
minio.On("GetBucketPolicy", bucketName).Return(remotePolicy, nil).Once()
Expand All @@ -142,7 +142,7 @@ func TestStore_CompareBucketPolicy(t *testing.T) {
g := gomega.NewGomegaWithT(t)
bucketName := "test-bucket"
expectedPolicy := v1alpha2.BucketPolicyReadWrite
remotePolicy := "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"s3:GetBucketLocation\",\"s3:ListBucketMultipartUploads\"],\"Effect\":\"Allow\",\"Principal\":{\"AWS\":[\"*\"]},\"Resource\":[\"arn:aws:s3:::test-bucket\"],\"Sid\":\"\"},{\"Action\":[\"s3:ListBucket\"],\"Condition\":{\"StringEquals\":{\"s3:prefix\":[\"*\"]}},\"Effect\":\"Allow\",\"Principal\":{\"AWS\":[\"*\"]},\"Resource\":[\"arn:aws:s3:::test-bucket\"],\"Sid\":\"\"},{\"Action\":[\"s3:AbortMultipartUpload\",\"s3:DeleteObject\",\"s3:GetObject\",\"s3:ListMultipartUploadParts\",\"s3:PutObject\"],\"Effect\":\"Allow\",\"Principal\":{\"AWS\":[\"*\"]},\"Resource\":[\"arn:aws:s3:::test-bucket/**\"],\"Sid\":\"\"}]}"
remotePolicy := "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"s3:GetBucketLocation\",\"s3:ListBucket\",\"s3:ListBucketMultipartUploads\"],\"Effect\":\"Allow\",\"Principal\":{\"AWS\":[\"*\"]},\"Resource\":[\"arn:aws:s3:::test-bucket\"],\"Sid\":\"\"},{\"Action\":[\"s3:AbortMultipartUpload\",\"s3:DeleteObject\",\"s3:GetObject\",\"s3:ListMultipartUploadParts\",\"s3:PutObject\"],\"Effect\":\"Allow\",\"Principal\":{\"AWS\":[\"*\"]},\"Resource\":[\"arn:aws:s3:::test-bucket/*\"],\"Sid\":\"\"}]}"

minio := new(automock.MinioClient)
minio.On("GetBucketPolicy", bucketName).Return(remotePolicy, nil).Once()
Expand Down Expand Up @@ -782,7 +782,7 @@ func TestStore_SetBucketPolicy(t *testing.T) {
g := gomega.NewGomegaWithT(t)
bucketName := "test-bucket"
expectedPolicy := v1alpha2.BucketPolicyReadOnly
marshaledPolicy := "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"s3:GetBucketLocation\"],\"Effect\":\"Allow\",\"Principal\":{\"AWS\":[\"*\"]},\"Resource\":[\"arn:aws:s3:::test-bucket\"],\"Sid\":\"\"},{\"Action\":[\"s3:ListBucket\"],\"Condition\":{\"StringEquals\":{\"s3:prefix\":[\"*\"]}},\"Effect\":\"Allow\",\"Principal\":{\"AWS\":[\"*\"]},\"Resource\":[\"arn:aws:s3:::test-bucket\"],\"Sid\":\"\"},{\"Action\":[\"s3:GetObject\"],\"Effect\":\"Allow\",\"Principal\":{\"AWS\":[\"*\"]},\"Resource\":[\"arn:aws:s3:::test-bucket/**\"],\"Sid\":\"\"}]}"
marshaledPolicy := "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"s3:GetBucketLocation\",\"s3:ListBucket\"],\"Effect\":\"Allow\",\"Principal\":{\"AWS\":[\"*\"]},\"Resource\":[\"arn:aws:s3:::test-bucket\"],\"Sid\":\"\"},{\"Action\":[\"s3:GetObject\"],\"Effect\":\"Allow\",\"Principal\":{\"AWS\":[\"*\"]},\"Resource\":[\"arn:aws:s3:::test-bucket/*\"],\"Sid\":\"\"}]}"

minio := new(automock.MinioClient)
minio.On("SetBucketPolicy", bucketName, marshaledPolicy).Return(nil).Once()
Expand All @@ -802,7 +802,7 @@ func TestStore_SetBucketPolicy(t *testing.T) {
g := gomega.NewGomegaWithT(t)
bucketName := "test-bucket"
expectedPolicy := v1alpha2.BucketPolicyWriteOnly
marshaledPolicy := "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"s3:GetBucketLocation\",\"s3:ListBucketMultipartUploads\"],\"Effect\":\"Allow\",\"Principal\":{\"AWS\":[\"*\"]},\"Resource\":[\"arn:aws:s3:::test-bucket\"],\"Sid\":\"\"},{\"Action\":[\"s3:AbortMultipartUpload\",\"s3:DeleteObject\",\"s3:ListMultipartUploadParts\",\"s3:PutObject\"],\"Effect\":\"Allow\",\"Principal\":{\"AWS\":[\"*\"]},\"Resource\":[\"arn:aws:s3:::test-bucket/**\"],\"Sid\":\"\"}]}"
marshaledPolicy := "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"s3:GetBucketLocation\",\"s3:ListBucketMultipartUploads\"],\"Effect\":\"Allow\",\"Principal\":{\"AWS\":[\"*\"]},\"Resource\":[\"arn:aws:s3:::test-bucket\"],\"Sid\":\"\"},{\"Action\":[\"s3:AbortMultipartUpload\",\"s3:DeleteObject\",\"s3:ListMultipartUploadParts\",\"s3:PutObject\"],\"Effect\":\"Allow\",\"Principal\":{\"AWS\":[\"*\"]},\"Resource\":[\"arn:aws:s3:::test-bucket/*\"],\"Sid\":\"\"}]}"

minio := new(automock.MinioClient)
minio.On("SetBucketPolicy", bucketName, marshaledPolicy).Return(nil).Once()
Expand All @@ -822,7 +822,7 @@ func TestStore_SetBucketPolicy(t *testing.T) {
g := gomega.NewGomegaWithT(t)
bucketName := "test-bucket"
expectedPolicy := v1alpha2.BucketPolicyReadWrite
marshaledPolicy := "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"s3:GetBucketLocation\",\"s3:ListBucketMultipartUploads\"],\"Effect\":\"Allow\",\"Principal\":{\"AWS\":[\"*\"]},\"Resource\":[\"arn:aws:s3:::test-bucket\"],\"Sid\":\"\"},{\"Action\":[\"s3:ListBucket\"],\"Condition\":{\"StringEquals\":{\"s3:prefix\":[\"*\"]}},\"Effect\":\"Allow\",\"Principal\":{\"AWS\":[\"*\"]},\"Resource\":[\"arn:aws:s3:::test-bucket\"],\"Sid\":\"\"},{\"Action\":[\"s3:AbortMultipartUpload\",\"s3:DeleteObject\",\"s3:GetObject\",\"s3:ListMultipartUploadParts\",\"s3:PutObject\"],\"Effect\":\"Allow\",\"Principal\":{\"AWS\":[\"*\"]},\"Resource\":[\"arn:aws:s3:::test-bucket/**\"],\"Sid\":\"\"}]}"
marshaledPolicy := "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"s3:GetBucketLocation\",\"s3:ListBucket\",\"s3:ListBucketMultipartUploads\"],\"Effect\":\"Allow\",\"Principal\":{\"AWS\":[\"*\"]},\"Resource\":[\"arn:aws:s3:::test-bucket\"],\"Sid\":\"\"},{\"Action\":[\"s3:AbortMultipartUpload\",\"s3:DeleteObject\",\"s3:GetObject\",\"s3:ListMultipartUploadParts\",\"s3:PutObject\"],\"Effect\":\"Allow\",\"Principal\":{\"AWS\":[\"*\"]},\"Resource\":[\"arn:aws:s3:::test-bucket/*\"],\"Sid\":\"\"}]}"

minio := new(automock.MinioClient)
minio.On("SetBucketPolicy", bucketName, marshaledPolicy).Return(nil).Once()
Expand Down
4 changes: 4 additions & 0 deletions components/configurations-generator/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,7 @@ ci-release: build build-image push-image
.PHONY: clean
clean:
rm -rf bin/

.PHONY: path-to-referenced-charts
path-to-referenced-charts:
@echo "resources/core"
4 changes: 4 additions & 0 deletions components/connection-token-handler/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,7 @@ ci-master: build build-image push-image

.PHONY: ci-release
ci-release: build build-image push-image

.PHONY: path-to-referenced-charts
path-to-referenced-charts:
@echo "resources/application-connector"
4 changes: 4 additions & 0 deletions components/connectivity-certs-controller/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,7 @@ ci-master: build build-image push-image

.PHONY: ci-release
ci-release: build build-image push-image

.PHONY: path-to-referenced-charts
path-to-referenced-charts:
@echo "resources/application-connector"
4 changes: 4 additions & 0 deletions components/connector-service/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,7 @@ ci-master: build build-image push-image

.PHONY: ci-release
ci-release: build build-image push-image

.PHONY: path-to-referenced-charts
path-to-referenced-charts:
@echo "resources/application-connector"
7 changes: 6 additions & 1 deletion components/etcd-backup-job/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,9 @@ ci-release: build build-image push-image

.PHONY: clean
clean:
rm -f $(binary)
rm -f $(binary)

.PHONY: path-to-referenced-charts
path-to-referenced-charts:
@echo "resources/core"
@echo "resources/service-catalog"
4 changes: 4 additions & 0 deletions components/event-bus/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -87,3 +87,7 @@ clean:
rm -rf ./cmd/event-bus-subscription-controller-knative/$(BINARY_SCK) ./cmd/event-bus-subscription-controller-knative/docker
rm -rf ./cmd/event-bus-sv/$(BINARY_SV) ./cmd/event-bus-sv/docker
rm -rf ./cmd/nats-streaming-init/$(BINARY_NI) ./cmd/nats-streaming-init/docker

.PHONY: path-to-referenced-charts
path-to-referenced-charts:
@echo "resources/event-bus"
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,6 @@ func (r *reconciler) Reconcile(request reconcile.Request) (reconcile.Result, err
r.recorder.Eventf(subscription, corev1.EventTypeNormal, subReconciled, "Subscription reconciled, name: %q; namespace: %q", subscription.Name, subscription.Namespace)
}

/*if err = util.UpdateSubscriptionStatus(ctx, r.client, subscription); err != nil {
logging.FromContext(ctx).Info("Error updating Subscription Status", zap.Error(err))
r.recorder.Eventf(ccp, corev1.EventTypeWarning, subUpdateStatusFailed, "Failed to update Subscription's status: %v", err)
return reconcile.Result{}, err
}*/

return reconcile.Result{
Requeue: requeue,
}, reconcileErr
Expand Down Expand Up @@ -107,7 +101,7 @@ func (r *reconciler) reconcile(ctx context.Context, subscription *eventingv1alph
// The object is being deleted
if util.ContainsString(&subscription.ObjectMeta.Finalizers, finalizerName) {
// our finalizer is present, so lets handle our external dependency
if err := r.deleteExternalDependency(ctx, subscription, knativeChannelName, knativeSubsNamespace); err != nil {
if err := r.deleteExternalDependency(ctx, knativeSubsName, knativeChannelName, knativeSubsNamespace); err != nil {
// if fail to delete the external dependency here, return with error
// so that it can be retried
return false, err
Expand Down Expand Up @@ -170,7 +164,7 @@ func (r *reconciler) reconcile(ctx context.Context, subscription *eventingv1alph
log.Error(err, "ActivateSubscriptions() failed")
return false, err
}
log.Info("Kyma Subscription is activated", "Subscription", knativeSubsName)
log.Info("Kyma Subscription is activated", "Subscription", subscription.Name)

return true, nil
} else {
Expand Down Expand Up @@ -205,14 +199,14 @@ func (r *reconciler) reconcile(ctx context.Context, subscription *eventingv1alph
return false, nil
}

func (r *reconciler) deleteExternalDependency(ctx context.Context, subscription *eventingv1alpha1.Subscription, channelName string, channelNamespace string) error {
func (r *reconciler) deleteExternalDependency(ctx context.Context, knativeSubsName string, channelName string, namespace string) error {
log.Info("Deleting the external dependencies")

// In case Knative Subscription exists, delete it.
knativeSubs, err := r.knativeLib.GetSubscription(subscription.Name, channelNamespace)
knativeSubs, err := r.knativeLib.GetSubscription(knativeSubsName, namespace)
if err != nil && !errors.IsNotFound(err) {
return err
} else if err == nil && knativeSubs != nil {
} else if err == nil {
err = r.knativeLib.DeleteSubscription(knativeSubs.Name, knativeSubs.Namespace)
if err != nil {
return err
Expand All @@ -221,13 +215,13 @@ func (r *reconciler) deleteExternalDependency(ctx context.Context, subscription
}

// Check if Channel has any other Subscription, if not, delete it.
knativeChannel, err := r.knativeLib.GetChannel(channelName, channelNamespace)
knativeChannel, err := r.knativeLib.GetChannel(channelName, namespace)
if err != nil && !errors.IsNotFound(err) {
return err
} else if err == nil && knativeChannel != nil {
if knativeChannel.Spec.Subscribable == nil || (len(knativeChannel.Spec.Subscribable.Subscribers) == 1 &&
knativeChannel.Spec.Subscribable.Subscribers[0].SubscriberURI == subscription.Endpoint) {
err = r.knativeLib.DeleteChannel(channelName, channelNamespace)
} else if err == nil {
if knativeChannel.Spec.Subscribable == nil || (len(knativeChannel.Spec.Subscribable.Subscribers) == 1 && knativeSubs != nil &&
knativeChannel.Spec.Subscribable.Subscribers[0].SubscriberURI == *knativeSubs.Spec.Subscriber.DNSName) {
err = r.knativeLib.DeleteChannel(channelName, namespace)
if err != nil {
return err
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ func updateSubscriptions(ctx context.Context, client runtimeClient.Client, subs
if subsWithErrors := WriteSubscriptions(ctx, client, subs); len(subsWithErrors) != 0 {
// try to set the "Ready" status to false
for _, es := range subsWithErrors {
log.Error(es.Err, "WriteSubscription() failed for this subscription:", "subscription", es.Sub)
log.Error(es.Err, "WriteSubscriptions() failed for this subscription:", "subscription", es.Sub)
us := UpdateSubscriptionReadyStatus(es.Sub, subApis.ConditionFalse, es.Err.Error())
if err := WriteSubscription(ctx, client, us); err != nil {
log.Error(err, "Update Ready status failed")
Expand Down
4 changes: 4 additions & 0 deletions components/event-service/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,7 @@ ci-release: build build-image push-image
.PHONY: clean
clean:
rm -f $(binary)

.PHONY: path-to-referenced-charts
path-to-referenced-charts:
@echo "resources/application-connector"
3 changes: 3 additions & 0 deletions components/helm-broker/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,6 @@ clean:
rm -f targz
rm -f indexbuilder

.PHONY: path-to-referenced-charts
path-to-referenced-charts:
@echo "resources/helm-broker"
4 changes: 4 additions & 0 deletions components/istio-kyma-patch/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,7 @@ ci-master: build-image push-image

.PHONY: ci-release
ci-release: build-image push-image

.PHONY: path-to-referenced-charts
path-to-referenced-charts:
@echo "resources/istio-kyma-patch"
4 changes: 4 additions & 0 deletions components/namespace-controller/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,7 @@ ci-release: build build-image push-image
.PHONY: clean
clean:
rm -f $(binary)

.PHONY: path-to-referenced-charts
path-to-referenced-charts:
@echo "resources/core"
4 changes: 4 additions & 0 deletions components/service-binding-usage-controller/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,7 @@ ci-release: build build-image push-image
clean:
rm -f $(binary)


.PHONY: path-to-referenced-charts
path-to-referenced-charts:
@echo "resources/service-catalog-addons"
6 changes: 5 additions & 1 deletion components/ui-api-layer/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,8 @@ build-image:
docker build -t $(IMG_NAME) .
push-image:
docker tag $(IMG_NAME) $(IMG):$(TAG)
docker push $(IMG):$(TAG)
docker push $(IMG):$(TAG)

.PHONY: path-to-referenced-charts
path-to-referenced-charts:
@echo "resources/core"
Loading

0 comments on commit a6e3cf9

Please sign in to comment.