Code Monkey home page Code Monkey logo

examples's People

Contributors

a-thaler avatar abbi-gaurav avatar anishj0shi avatar bszwarc avatar chrkl avatar clebs avatar derberg avatar grego952 avatar halamix2 avatar hisarbalik avatar hudymi avatar joek avatar klaudiagrz avatar kwiatekus avatar lilitgh avatar magicmatatjahu avatar marcobebway avatar mmitoraj avatar nachtmaar avatar nataliasitko avatar nhingerl avatar pkosiec avatar polskikiel avatar pprecel avatar rakesh-garimella avatar sayanh avatar shorim avatar skhalash avatar suleymanakbas91 avatar tgorgol avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

examples's Issues

Lambda UI doesn't work when the function is deployed with kubectl

Description
The following function deployments cannot be edited in the UI - function editor is not visible.
https://github.com/kyma-project/examples/blob/master/service-binding/lambda/deployment/lambda-function.yaml
https://github.com/kyma-project/examples/blob/master/gateway/lambda/deployment.yaml

Expected result
UI editor displays the function body.

Actual result
screen shot 2018-09-12 at 10 47 52

Troubleshooting

Just follow the tutorials for service-binding or gateway, navigate to lambda UI and open created functions.

Run automated tests on Prow

Description
Currently the examples have local tests which are assuring that they work isolated.
We need tests assuring that they will work when applied to a Kyma cluster. Especially examples consisting only of yaml files needs to be tested against a Kyma cluster.

AC
Tests running on Kyma cluster using Prow

Gateway example is not clear

Description

In Gateway example the flow of the document suggests, that user can expose two different APIs (secured and unsecured) at the same time while this is not possible. Only the first one will be created and the second will contain error in object status (which is not showed in UI). Example needs to be clear that two APIs may not exist at the same time.

Expected result

Actual result

Steps to reproduce

Follow blindly the example ;)

Troubleshooting

Provide an example how to connect application running on developer's machine to Kyma

Description
Provide an example how developer can establish secure tunnel from Kyma cluster to the application running on the local machine and ensure that bidirectional communication works (sending events from application to Kyma and calling APIs on local system).

Reasons
Developers prefer to use systems running on their local machine. The cannot easily connect those systems to Kyma as their machines are usually not reachable from the Kyma cluster (internal IP, firewalls, NAT).

JWT Token

Hi Kyma team,

Is there a way to call a url to get JWT token like getting the Oauth token in the example ?
I am trying to have a client get the JWT token using a call instead of manual step of getting it from the kubeconfig like in the example docs.

Thanks,
Sunar

Examples are using old event-activation CRD

Description

Some CRDs were updated as part of remote environment enhancement (Issue 914) . Currently the examples reference the old CRDs for EventActivation and Subscription CRDs and that needs to be fixed.

Expected result
Examples reference and use latest CRDs as defined here

Actual result
Examples are using outdated CRDs.

AC

  • All examples creating event-activation have been updated

Unable to access the http-db-service externally

Confirm these statements before you submit the issue:

  • I have searched open and closed issues for duplicates.
  • I have read the contributing guidelines.

Ran the following commands
/build.sh
docker run -it --rm -p 8017:8017 http-db-service:latest

I can now access the docker image from http://127.0.0.1:8017
I can submit a POST and GET request on orders

Deployed to Kyma
export KYMA_EXAMPLE_ENV="qa"
kubectl apply -f deployment/deploymentOriginal.yaml -n $KYMA_EXAMPLE_ENV

Now I am not sure how to access this service. I only see internal IP address of the service - nothing external. Not sure what to use for host and port

curl --request GET --url http://:/orders

Binding service to lambda, missing information in the example

Description

I just compared the ServiceBindingUsage that is created via the UI against the example that is provided in https://github.com/kyma-project/examples/tree/master/service-binding/lambda.
I see that the following section is added via the UI, which is not available in the example:

spec:
  parameters:
    envPrefix:
      name: ""  

Expected result

The Service Binding is reflected in the UI of Lambda details.

Actual result

Without this parameters section in the example, the Service Binding is not displayed in the UI of Kyma.

Steps to reproduce

Follow the example as it is. Later just add the parameters section below spec in the ServiceBindingUsage and try it again. The Binding is then shown in the UI.

Troubleshooting

none.

Extend example service with email integration

Confirm these statements before you submit the issue:

  • I have searched open and closed issues for duplicates.
  • I have read the contributing guidelines.

Description
The goal of the already existing event-email-service is to demonstrate the e2e scenario of

  • receive of an event
  • call a 3party API
  • have e2e tracing working
  • have a way to demonstrate error situations with eventing

Currently the example just receives an event, so the leftovers still need to be implemented.

Acceptance Criteria

  • On event receive, an a welcome email will be send to the new registrar
  • A 3party email provider gets used and is configured via env variables/configMap
  • If call to provider cannot be done successful, the event receive should be rejected. Have good logs in place to demonstrate it.
  • Assure e2e tracability by passing the correct headers

Verify that all examples are leveraging the app label

Description
Iterate over all resource definitions in the examples and check for existence and consistent usage of the app label, especially for functions.

Reasons
Many kubernetes tooling is based on the app label and will work out of the box if it is used. So the recommended code snippets should use it as well. See also kyma-project/kyma#3953

Add the personservice example

Description

  • Add the end-to-end personservice example (created by Andreas Krause) to the examples repo. Divide the docs (preferably by components), proofread them, add conclusions from the investigation made as part of the this issue.

  • Expose the example in the main README.md document of the kyma repository.

Reasons

To have an end-to-end scenario in the kyma organization.

Attachments

Link to the example: https://github.com/kyma-incubator/examples/tree/master/personservice

Add example of storing static pages via asset-store

** Description **

  • Asset-store may be used to store static pages, so we have to create example with static page and instruction how to install it using asset-store and minio.
  • To prove, that it works fine, page should be created from files of various formats (*.html, *.js, *.css)

Improve consistency of example "example-tracing"

Description
The example has some inconsistencies which should be fixed:

  • Adjust naming by renaming to "tracing"
  • Adjust location of yaml file by having it in "deployment" folder and a better naming of the file
  • Move go sources into a "src" folder

Reasons
Consistency across all examples to increase developer experience

local build failes

Description

Following the instructions provided on the readme - the build appears to be failing with the following results

github.com/stretchr/testify/assert

../../../stretchr/testify/assert/assertions.go:1703:5: undefined: errors.Is
../../../stretchr/testify/assert/assertions.go:1726:6: undefined: errors.Is
../../../stretchr/testify/assert/assertions.go:1749:5: undefined: errors.As
../../../stretchr/testify/assert/assertions.go:1766:7: undefined: errors.Unwrap
../../../stretchr/testify/assert/assertions.go:1770:7: undefined: errors.Unwrap
The command '/bin/sh -c CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o main .' returned a non-zero code: 2

Expected result

Build is successful

Actual result

Build fails which is preventing the ability to run the next step of running the docker image

Steps to reproduce

  1. Cloned the repo on local
  2. verify pre-req are present
  3. run $ ./build.sh

Troubleshooting

Create Application Connectivity samples for various languages to make Kyma integration easier

Description

Applications integrating with Kyma must interact with the Application Connector API to generate certificates and register APIs. Although the Application Connector API is stable and documented, it requires users to write boilerplate code and get familiar with (sometimes) technical APIs of the respective programming languages. These constraints and efforts are seen as inhibitors to Kyma adoption.

Although we are part of a polyglot environment the majority of modern business applications are written in:

  • Java
  • Node.Js
  • Python
  • .Net
  • PHP

Reasons

Providing simple to use convenience libraries (examples) for developers on these platforms would speed up the understanding and initial efforts of integrating with Kyma. An example of such a convenience library is: https://github.com/akrausesap/connector/tree/master/scpxf-connector

Monitoring examples are not correct

Description

In both examples:

The name of prometheus pod is invalid. The correct name for this pod is prometheus-monitoring but in the examples we use prometheus-core.

The other things from this example works normally.

Update the serverless runtime example image

Hello,
I've noticed some difference between the example serverless python runtime docker image and the one running in my Kyma cluster.
Could you please either:

  • sync kubeless.py so it is identical to the version running in the cluster?
  • publish the current image for python serverless runtime, so I can use inheritance to extend it ?

Description

Reference image for python runtime seems outdated.

Reasons

I need to customize the python runtime image (only to apt install an OS package). I don't want to encounter regressions because I used an outdated reference image.

Thanks.

Examples metadata in a renderable format

Confirm these statements before you submit the issue:

  • I have searched open and closed issues for duplicates.
  • I have read the contributing guidelines.

Description

The overview of all examples with title,description, technology is available as table in the README.md.

We want to enable a nice overview as part of the product documentation, for that we need a way to integrate the examples overview table.

Acceptance Criteria

  • the current listing is in a format so that you can embed it into the documentation
  • the listing contains at least:
    -- name
    -- short description
    -- url to example
    -- url to readme
    -- tags/labels for technology and domain
  • Lukasz G. is informed about the new file so that he can create follow-up task for documentation overview page

Comment
An idea is to simply transform the table in the readme to HTML and it is still going to display nice as here: https://github.com/derberg/examples/blob/derberg-patch-1/README.md and in the UI we will always parse realtime the master version https://raw.githubusercontent.com/derberg/examples/derberg-patch-1/README.md and we will be able to transform the data into HTML and easily extract the table from it reliable way. It was verified by triggering the following code in the browser's console:

var xhr = new XMLHttpRequest();
--
xhr.addEventListener("load", transferComplete)
xhr.open("GET", "https://raw.githubusercontent.com/derberg/examples/derberg-patch-1/README.md");
xhr.send();
 
function transferComplete(event){
  html = new DOMParser().parseFromString(event.currentTarget.response, "text/html");
  table = html.getElementsByTagName('table');
 
  console.log(table[0].innerHTML)
}

Go build error on main.go of tutorial 'examples/http-db-service'

Hi,

Trying to follow the tutorial 'Develop a service locally without using Docker' on https://kyma-project.io/docs/#tutorials-tutorials.

First steps is building the application 'examples/http-db-service' locally using GO. Now I am quite new to GO but I think I followed the steps correctly.

After applying the first 2 steps I am in the right subfolder and all the github packages are installed under go/src

Still I am getting a build error when executing:

CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o main .

package .
main.go:14:2: use of internal package github.com/kyma-project/examples/http-db-service/internal/repository not allowed

Using go version go1.15.3 linux/amd64

Bind a Service to a Lambda Function example is not correct

Description

Following example is not correct: https://github.com/kyma-project/examples/blob/master/service-binding/lambda/README.md

I've encountered the following issues while executing this example step by step:

  • We should create a test namespace at the beginning - before step 2.
  • In the step nr. 3 there is a command to check binding status: kubectl get servicebinding/redis-instance-binding -o jsonpath='{ .status.conditions[0].reason }' -n $KYMA_EXAMPLE_NS , but at this step, the binding doesn't exist, we create it in the next step.
  • At the step number 6, when lambda is ready, I'm getting this error message:
ERRO[0000]                                              
FATA[0000] the server is currently unable to handle the request (get services redis-client:http-function-

Expected result

Example scenario can be executed step by step for anyone.

Actual result

We can't call lambda at the end and we get troubles with the test scenario steps

Steps to reproduce

Just follow the test scenario

PoC on having examples available as bundle via helm-broker

Description
Try to make the examples-chart of the examples repo available as bundle for the helm-broker/service catalog.

For that:

  • Enrich the example-chart with the necessary files and metadata
  • Provide a config so that the example selector of the values.yaml is available as combo box in the service instance instantiation wizard

For testing:

  • Create a fork of the examples repo
  • Create a zip out of the chart and write a index.yaml file, attach them as release to the forked repo
  • In your kyma installation, adjust the repository of the helm-broker to your github release URL

Reasons
Via the helm-broker there is a nice way available of deploying services into a kyma installation without requiring any tooling. That will be a good alternative of testing and trying out the examples.

In consequence of making the examples testabale a generic hem chart got introduced supporting the installation of all examples into a kyma cluster. If that chart will be an official bundle, the alternative way of installation will be available out of the box, without modifying any example. As examples are very small, having one bundle for all examples instead of a bundle per example seems reasonable. It will not spoil the service catalog view so much. However, an example should be installable selectively by a parameter.

Replace http-db-service with orders-service

Description

For the purpose of the Getting Started guides, Wookiees created a new orders-service example that consists of a simple microservice and function that use in-memory storage which can be switched to a Redis database.

After discussions with @a-thaler , it was decided that this new example should replace the currently existing http-db-service example that works with MySQL instance.

To replace them:

Service Binding Lambda Example not working

Description

I am trying service-binding example for lambda , installation goes fine but executing lambda function fails
kubeless function call redis-client -n stage

Fails with error

an error on the server ( "Internal Server Error") has prevented the request from succeeding ( get services redis-client:http-function-import)

I am trying this out on latest version of kyma deployed on gke

Automated testing for examples

Confirm these statements before you submit the issue:

  • I have searched open and closed issues for duplicates.
  • I have read the contributing guidelines.

Description

Currently the examples have local tests which are assuring that they work isolated.
We need tests assuring that they will work when applied to a Kyma cluster. Especially examples consisting only of yaml files needs to be tested against a Kyma cluster.

Goal is to have one helm chart where you can configure the installation of an example together with tests, so that you can install and test all/selectively the examples on any Kyma cluster.

Acceptance Criteria

  • As a developer I can read how to provide tests for my example
  • As a developer I can trigger the installation and tests of one example with one action using my local kubeconfig
  • The tests are getting executed continuously on changes to the repository

Bind a Service to a Lambda - could not trigger the function

Description

The example https://github.com/kyma-project/examples/tree/master/service-binding/lambda does not work. The step "Trigger the function" gives the result:

ERRO[0000]
FATA[0000] an error on the server ("Error: 'EOF'
Trying to reach: 'http://10.28.3.28:8080/'") has prevented the request from succeeding (get services redis-client:http-function-port)

Expected result

The step 7 contains a command which triggers the function.

Actual result

Could not trigger the function

Steps to reproduce

Follow the test scenario

Examples for gateway should use simple hostnames

Confirm these statements before you submit the issue:

  • I have searched open and closed issues for duplicates.
  • I have read the contributing guidelines.

Description

Resources in gateway example should use simplified hostnames to ensure the ability to run and use them on different clusters.

Expected result

After applying example API from gateway samples with simple host, I can access my service on the domain I'm currently working on.

Actual result

Currently, they refer to *.kyma.local.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.