Skip to content

Commit

Permalink
Release 0.6.0 rc2 (#2231)
Browse files Browse the repository at this point in the history
* Make is-installed script not exit on error (#2087)

* add timeout option to is-installed script
* add info about the script
* do not immediately exit with code 1 on Error status
* add information about is-installed script to docs
* add default timeout to is-installed script on CI
* do not use echo and subshell to print output from kubectl
* move information about timeout below the logs from installer
* update codeowners

* Use bundles 0.2.0 - added testing bundles. (#2178)

* Bump Instances Image

* Allow to pass ingressgateway service name (#2186)

* Luigified Console  (#1991)

Luigified Console

* Split "servicecatalog" module in UI API Layer Acceptance tests (#2168)

* Add shared types, fixtures and wait helpers

* Do not skip tests when SCI is not enabled

* Split servicecatalog domain for UI API acceptance tests

* Move service catalog installation to shared package

* Increase timeout for BackendModule test

* Make separate namespaces for SC and SCA tests

* Rename SkipMainIfShould and SkipTestIfShould methods

* Split "servicecatalog" domain in UI API Layer (#2174)

* Move files to servicecatalogaddons domain

* Adjust changes to servicecatalogaddons

* Finish splitting SC domain to SC and SCA

* Format code

* Make cross-domain dependencies nullable

* Create separate resolver for application field in environments

* Improve the overall SC documentation (#2177)

* Fix the links in the SC documentation (#2198)

* Stabilize ui tests for variable network conditions (#2201)

* stabilize ui tests for variable network conditions

* stabilize ui tests for variable network conditions

* Fix GKE installation with dynamic IPs (#2187)

* Fix dynamic IPs

* Set knative domain

* Set ingress service name in xip-patch

* Fix passing external ip to istio

* Fix again

* Revert "Fix again"

This reverts commit e41f7f1.

* And one more fix

* Add badges to readme to point to slack and twitter (#2224)

* incorporate default clusterrolebinding into minikube.sh (#2204)

* Support for minikube restart (#2156)

* Support minikube restart

* TW updates

* TW review 2

* Bump lambda UI Image to latest (#2219)

* Remove function for calling Bash scripts from the Installer component (#2226)

* Skip Application charts installation in acceptance tests if not needed (#2154)

* Rename dummyRe to dummyApp

* Skip app chart installation in connector-service and application-registry

* Add random postfix for connector test pods names

* Dep ensure connector-tests

* Dep ensure with dep 0-4-1

* Add random postfix to app registry test apps

* Go fmt changed files

* Add skip chart installation for apps in acceptance tests

* Add skip all charts installation for apps in acceptance tests

* Rename RE to Application

* Add docs how to install Knative from release (#2218)

* Add docs how to install Knative from release

* Apply suggestions from code review

Co-Authored-By: sjanota <[email protected]>

* Update 038-inst-knative.md

* link fix

* Update version of components to 0.6.0-rc2

* Add finalizers to Applications (#2199)

* Update xip installation documentation (#2205)

* Disable cache in ui tests (#2228)

disable cache in ui tests and extend default navigation timeout

* Introduce UI API Layer documentation (#2229)

* Add BackendModule CR description

* Describe UI API Layer

* Improve language in UI API Layer docs

* Adjust labels in console UI (#2207)

* Adjust labels in console UI

* Bump content-ui image (#2234)

* Bump image of Application Operator (#2232)

* Fix console-basic-test (#2239)

* Fix console-basic-test

* Fix image name of Application Operator tests (#2241)

* Bump console core image (#2242)

* Add cluster name info to the stability checker summary (#2235)

* Add cluster name info to the stability checker summary

* Update tools/stability-checker/README.md

* Bump Instances image

* Update grafana and lambda ui documentation (#2200)

* Update grafana and lambda ui documentation

* Update resources/monitoring/charts/grafana/README.md

Co-Authored-By: venturasr <[email protected]>

* Update resources/monitoring/charts/grafana/README.md

Co-Authored-By: venturasr <[email protected]>

* Update resources/core/charts/kubeless/charts/lambdas-ui/README.md

Co-Authored-By: venturasr <[email protected]>

* Update resources/monitoring/charts/grafana/README.md

Co-Authored-By: venturasr <[email protected]>

* Update resources/monitoring/charts/grafana/README.md

Co-Authored-By: venturasr <[email protected]>

* Update resources/monitoring/charts/grafana/README.md

Co-Authored-By: venturasr <[email protected]>

* Update resources/monitoring/charts/grafana/README.md

Co-Authored-By: venturasr <[email protected]>

* Update resources/monitoring/charts/grafana/README.md

Co-Authored-By: venturasr <[email protected]>

* Update README.md

* Update resources/monitoring/charts/grafana/README.md

Co-Authored-By: venturasr <[email protected]>

* Updated base images (#2247)

* Bump stability-checker version (#2249)

* Fix EventActivation ark backups (#2254)

* Update image version for all console components (#2252)
  • Loading branch information
Adam Szecówka authored Jan 11, 2019
1 parent cbcb07d commit 1862cc2
Show file tree
Hide file tree
Showing 186 changed files with 2,455 additions and 1,464 deletions.
2 changes: 1 addition & 1 deletion CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# For more details, read the following article on GitHub: https://help.github.com/articles/about-codeowners/.

# These are the default owners for the whole content of the `kyma` repository. The default owners are automatically added as reviewers when you open a pull request, unless different owners are specified in the file.
* @derberg @pbochynski @PK85 @a-thaler @lszymik
* @derberg @pbochynski @PK85 @a-thaler @lszymik @piotrmsc

/common/ @mszostok @aszecowka @piotrmiskiewicz @sjanota @Tomasz-Smelcerz-SAP @strekm @crabtree @akgalwas @janmedrek @Szymongib @sayanh @radufa @suleymanakbas91

Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
</p>

[![Go Report Card](https://goreportcard.com/badge/kyma-project/kyma)](https://goreportcard.com/report/github.com/kyma-project/kyma)
[![Slack](https://img.shields.io/badge/[email protected])](http://slack.kyma-project.io)
[![Twitter](https://img.shields.io/badge/[email protected])](https://twitter.com/kymaproject)




## Overview

Expand Down
2 changes: 1 addition & 1 deletion ci.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ RUN echo 'alias kc="kubectl"' >> ~/.bashrc
# minikube and docker start must be done on starting container to make it work
ENTRYPOINT /kyma/installation/scripts/docker-start.sh \
&& /kyma/installation/cmd/run.sh --vm-driver none \
&& /kyma/installation/scripts/is-installed.sh \
&& /kyma/installation/scripts/is-installed.sh --timeout 30m \
&& /kyma/installation/scripts/watch-pods.sh \
&& (($RUN_TESTS && /kyma/installation/scripts/testing.sh) || $IGNORE_TEST_FAIL) \
&& exec bash
1 change: 1 addition & 0 deletions components/application-broker/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,4 @@ fabric.properties
/application-broker.iml
/application-broker
/vendor
/deploy/broker/application-broker
Binary file not shown.
26 changes: 23 additions & 3 deletions components/application-broker/internal/broker/provision.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"sync"
"time"

"github.com/kubernetes-incubator/service-catalog/pkg/apis/servicecatalog/v1beta1"
"github.com/kyma-project/kyma/components/application-broker/internal"
"github.com/kyma-project/kyma/components/application-broker/internal/access"
"github.com/kyma-project/kyma/components/application-broker/pkg/apis/applicationconnector/v1alpha1"
Expand Down Expand Up @@ -229,9 +230,8 @@ func (svc *ProvisionService) createEaOnSuccessProvision(appName, appID, ns strin
svc.log.Infof("Created EventActivation: [%s], in namespace: [%s]", appID, ns)
case apiErrors.IsAlreadyExists(err):
// We perform update action to adjust OwnerReference of the EventActivation after the backup restore.
_, err := svc.eaClient.EventActivations(ns).Update(ea)
if err != nil {
return errors.Wrapf(err, "while updating EventActivation with name: %q in namespace: %q", appID, ns)
if err = svc.ensureEaUpdate(appID, ns, si); err != nil {
return errors.Wrapf(err, "while ensuring update on EventActivation")
}
svc.log.Infof("Updated EventActivation: [%s], in namespace: [%s]", appID, ns)
default:
Expand All @@ -240,6 +240,26 @@ func (svc *ProvisionService) createEaOnSuccessProvision(appName, appID, ns strin
return nil
}

func (svc *ProvisionService) ensureEaUpdate(appID, ns string, si *v1beta1.ServiceInstance) error {
ea, err := svc.eaClient.EventActivations(ns).Get(appID, v1.GetOptions{})
if err != nil {
return errors.Wrapf(err, "while getting EventActivation with name: %q from namespace: %q", appID, ns)
}
ea.OwnerReferences = []v1.OwnerReference{
{
APIVersion: serviceCatalogAPIVersion,
Kind: "ServiceInstance",
Name: si.Name,
UID: si.UID,
},
}
_, err = svc.eaClient.EventActivations(ns).Update(ea)
if err != nil {
return errors.Wrapf(err, "while updating EventActivation with name: %q in namespace: %q", appID, ns)
}
return nil
}

func getNamespaceFromContext(contextProfile map[string]interface{}) (internal.Namespace, error) {
return internal.Namespace(contextProfile["namespace"].(string)), nil
}
Expand Down
18 changes: 17 additions & 1 deletion components/application-broker/internal/broker/provision_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,17 @@ func TestProvisionCreatingEventActivation(t *testing.T) {
Return(nil).
Once()
},
"generic error when getting EA after already exist error": func(cli *fake.Clientset, instStorage *automock.InstanceStorage, optStorage *automock.OperationStorage) {
cli.PrependReactor("create", "eventactivations", func(action k8testing.Action) (handled bool, ret runtime.Object, err error) {
return true, nil, apiErrors.NewAlreadyExists(schema.GroupResource{}, "fix")
})
cli.PrependReactor("get", "eventactivations", failingReactor)
optStorage.On("UpdateStateDesc", fixInstanceID(), fixOperationID(), internal.OperationStateFailed, fixErrWhileGettingEA()).
Return(nil)
instStorage.On("UpdateState", fixInstanceID(), internal.InstanceStateFailed).
Return(nil).
Once()
},
}
for tn, setupMocks := range tests {
t.Run(tn, func(t *testing.T) {
Expand Down Expand Up @@ -523,7 +534,12 @@ func fixErrWhileCreatingEA() *string {
}

func fixErrWhileUpdatingEA() *string {
err := fmt.Sprintf("provisioning failed while creating EventActivation on error: while updating EventActivation with name: %q in namespace: %q: custom error", fixServiceID(), fixNs())
err := fmt.Sprintf("provisioning failed while creating EventActivation on error: while ensuring update on EventActivation: while updating EventActivation with name: %q in namespace: %q: custom error", fixServiceID(), fixNs())
return &err
}

func fixErrWhileGettingEA() *string {
err := fmt.Sprintf("provisioning failed while creating EventActivation on error: while ensuring update on EventActivation: while getting EventActivation with name: %q from namespace: %q: custom error", fixServiceID(), fixNs())
return &err
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
package v1alpha1

func (app *Application) SetInstallationStatus(status InstallationStatus) {
app.Status.InstallationStatus = status
}

func (app *Application) SetAccessLabel() {
app.Spec.AccessLabel = app.Name
}

func (app *Application) SetFinalizer(finalizer string) {
if !app.HasFinalizer(finalizer) {
app.addFinalizer(finalizer)
}
}

func (app *Application) addFinalizer(finalizer string) {
app.Finalizers = append(app.Finalizers, finalizer)
}

func (app *Application) HasFinalizer(finalizer string) bool {
return app.finalizerIndex(finalizer) != -1
}

func (app *Application) RemoveFinalizer(finalizer string) {
finalizerIndex := app.finalizerIndex(finalizer)
if finalizerIndex == -1 {
return
}

app.Finalizers = append(app.Finalizers[:finalizerIndex], app.Finalizers[finalizerIndex+1:]...)
}

func (app *Application) finalizerIndex(finalizer string) int {
for i, e := range app.Finalizers {
if e == finalizer {
return i
}
}

return -1
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
package v1alpha1_test

import (
"testing"

"github.com/kyma-project/kyma/components/application-operator/pkg/apis/applicationconnector/v1alpha1"
"github.com/stretchr/testify/assert"
"k8s.io/apimachinery/pkg/apis/meta/v1"
)

func TestApplication_HasFinalizer(t *testing.T) {
testCases := []struct {
finalizers []string
searched string
result bool
}{
{
finalizers: []string{"finalizer.test", "finalizer.test2", "finalizer.test3"},
searched: "finalizer.test",
result: true,
},
{
finalizers: []string{"finalizer.test", "finalizer.test2", "finalizer.test3"},
searched: "finalizer.not.present",
result: false,
},
{
finalizers: nil,
searched: "finalizer",
result: false,
},
}

t.Run("test has finalizer", func(t *testing.T) {
for _, test := range testCases {
app := v1alpha1.Application{
ObjectMeta: v1.ObjectMeta{
Name: "test",
Finalizers: test.finalizers,
},
}

assert.Equal(t, test.result, app.HasFinalizer(test.searched))
}
})
}

func TestApplication_RemoveFinalizer(t *testing.T) {
testCases := []struct {
finalizers []string
removed string
result []string
}{
{
finalizers: []string{"finalizer.test", "finalizer.test2", "finalizer.test3"},
removed: "finalizer.test",
result: []string{"finalizer.test2", "finalizer.test3"},
},
{
finalizers: []string{"finalizer.test", "finalizer.test2", "finalizer.test3"},
removed: "finalizer.not.present",
result: []string{"finalizer.test", "finalizer.test2", "finalizer.test3"},
},
{
finalizers: nil,
removed: "finalizer",
result: nil,
},
}

t.Run("test has finalizer", func(t *testing.T) {
for _, test := range testCases {
app := v1alpha1.Application{
ObjectMeta: v1.ObjectMeta{
Name: "test",
Finalizers: test.finalizers,
},
}

app.RemoveFinalizer(test.removed)

assert.Equal(t, test.result, app.Finalizers)
}
})
}

func TestApplication_SetFinalizer(t *testing.T) {
testCases := []struct {
finalizers []string
new string
result []string
}{
{
finalizers: []string{"finalizer.test", "finalizer.test2", "finalizer.test3"},
new: "finalizer.test4",
result: []string{"finalizer.test", "finalizer.test2", "finalizer.test3", "finalizer.test4"},
},
{
finalizers: []string{"finalizer.test", "finalizer.test2", "finalizer.test3"},
new: "finalizer.test",
result: []string{"finalizer.test", "finalizer.test2", "finalizer.test3"},
},
{
finalizers: nil,
new: "finalizer",
result: []string{"finalizer"},
},
}

t.Run("test has finalizer", func(t *testing.T) {
for _, test := range testCases {
app := v1alpha1.Application{
ObjectMeta: v1.ObjectMeta{
Name: "test",
Finalizers: test.finalizers,
},
}

app.SetFinalizer(test.new)

assert.Equal(t, test.result, app.Finalizers)
}
})
}
Loading

0 comments on commit 1862cc2

Please sign in to comment.