-
Notifications
You must be signed in to change notification settings - Fork 404
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add git function tutorial #9379
Conversation
🥰 Documentation preview ready! 🥰 Built with commit 0c0de98 https://deploy-preview-9379--kyma-project-docs-preview.netlify.app |
🥰 Documentation preview ready! 🥰 Built with commit 4daa717 https://deploy-preview-9379--kyma-project-docs-preview.netlify.app |
🥰 Documentation preview ready! 🥰 Built with commit 74200d6 https://deploy-preview-9379--kyma-project-docs-preview.netlify.app |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very good! :) I prefer use the function from organisation repo, not from account one of our contributors :)
metadata: | ||
name: $NAME | ||
spec: | ||
url: "https://github.com/pPrecel/public-gitops" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use the https://github.com/kyma-project/examples.git repository. It's better to ref to repo in organisation, not to repo in account one of our contributors.
apiVersion: serverless.kyma-project.io/v1alpha1 | ||
kind: GitRepository | ||
metadata: | ||
name: $NAME |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add also namespace namespace: $NAMESPACE
apiVersion: serverless.kyma-project.io/v1alpha1 | ||
kind: Function | ||
metadata: | ||
name: $NAME |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add also namespace namespace: $NAMESPACE
EOF | ||
``` | ||
|
||
>**NOTE** Auth possibility TODO |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add correct indents (3 or 4 spaces)
runtime: nodejs12 | ||
source: $NAME | ||
reference: master | ||
baseDir: js-handler |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change to orders-service/function
EOF | ||
``` | ||
|
||
>**NOTE** To see full spec, go to the xxx page |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
type: Tutorials | ||
--- | ||
|
||
This tutorial shows how you can create a simple "Hello World!" Function from Git repository. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This tutorial shows how you can create a Function from Git repository.
The function from examples
repo is a more complex than Hello World!
:)
|
||
2. Go to the **Functions** view in the left navigation panel and select **Repositories** tab. | ||
|
||
3. Click **Connect Repository**, fill in required fields and click **Connect**. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Click Connect Repository, fill the Url
field with https://github.com/kyma-project/examples.git
value and click Connect.
|
||
3. Click **Connect Repository**, fill in required fields and click **Connect**. | ||
|
||
>**NOTE** Auth possibility TODO |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NOTE If you want connect the private repository, change the
Authorization
field fromPublic
toKey
orBasic
and fill the required fields -> Auth possibility link TODO
|
||
4. Go to the **Functions** tab and click **Create Function**. | ||
|
||
3. In the pop-up box, change `Source type` to `From Repository`, fill in required fields and select **Create** to confirm changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- In the pop-up box, change
Source type
toFrom Repository
, select created Repository's name, fill theReference
field withmaster
andBase directory
field withorders-service/function
values and select Create to confirm changes.
🥰 Documentation preview ready! 🥰 Built with commit 29f675f https://deploy-preview-9379--kyma-project-docs-preview.netlify.app |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added some comments & suggestions.
Console UI | ||
</summary> | ||
|
||
1. Create a Namespace or select one from the drop-down list in the top navigation panel. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
```bash | ||
NAME CONFIGURED BUILT RUNNING VERSION AGE | ||
test-function True True True 1 18m | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pls add the RUNTIME
column.
|
||
4. Go to the **Functions** tab and click **Create Function**. | ||
|
||
5. In the pop-up box, change `Source type` to `From Repository`, select created Repository's name, fill the `Reference` field with `master` and `Base directory` field with `orders-service/function` values and select **Create** to confirm changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
5. In the pop-up box, change `Source type` to `From Repository`, select created Repository's name, fill the `Reference` field with `master` and `Base directory` field with `orders-service/function` values and select **Create** to confirm changes. | |
5. In the pop-up box, change **Source Type** to `Git repository`, select the repository name, fill in the **Reference** field with `master`, and the **Base Directory** field with `orders-service/function`. Finish by selecting **Create** to confirm changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Source type
or Source Type
?
Base directory
or Base Directory
?
@magicmatatjahu, help wanted :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(I asked Maciek and it will be capitalized - as in other views)
Co-authored-by: Karolina Zydek <karolina.zydek@sap.com>
Co-authored-by: Karolina Zydek <karolina.zydek@sap.com>
kubectl | ||
</summary> | ||
|
||
1. Export these variables: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Console UI | ||
</summary> | ||
|
||
1. Create a Namespace or select one from the drop-down list in the top navigation panel. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
```bash | ||
NAME CONFIGURED BUILT RUNNING VERSION AGE | ||
test-function True True True 1 18m | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pls add the RUNTIME
column.
EOF | ||
``` | ||
|
||
>**NOTE** To see other authorization methods, go to the [documentation](). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok:
>**NOTE:** Read also about other [supported authentication methods](#details-git-source-type).
|
||
>**NOTE** If you are using a private repository, add `auth` object with `type` and `secretName` fields to the spec. For details, see [documentation](). | ||
|
||
3. Create a Function CR that specifies the Function's logic: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
3. Create a Function CR that specifies the Function's logic and points to the directory with code and dependencies in the given repository.
username: <USERNAME> | ||
password: <PASSWORD> | ||
``` | ||
>**NOTE** To see other possible authorization methods, go to the [documentation](). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK: >**NOTE:** Read also about other [supported authentication methods](#details-git-source-type).
|
||
2. Go to the **Functions** view in the left navigation panel and select the **Repositories** tab. | ||
|
||
3. Select **Connect Repository**, fill in the `Url` field with `https://github.com/kyma-project/examples.git`, and confirm by selecting **Connect**. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
3. Select **Connect Repository**, fill in the `Url` field with `https://github.com/kyma-project/examples.git`, and confirm by selecting **Connect**. | |
3. Select **Connect Repository**, fill in the **Url** field with `https://github.com/kyma-project/examples.git`, and confirm by selecting **Connect**. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, my bad - I didn't notice it before.
|
||
3. Select **Connect Repository**, fill in the `Url` field with `https://github.com/kyma-project/examples.git`, and confirm by selecting **Connect**. | ||
|
||
>**NOTE:** If you want to connect the secured repository with basic authentication, change the **Authorization** field from `Public` to `Basic` and fill the required fields. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
>**NOTE:** If you want to connect the secured repository with basic authentication, change the **Authorization** field from `Public` to `Basic` and fill the required fields. | |
>**NOTE:** If you want to connect the secured repository with basic authentication, change the **Authorization** field from `Public` to `Basic` and fill in the required fields. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again, my bad.
|
||
4. Go to the **Functions** tab and click **Create Function**. | ||
|
||
5. In the pop-up box, change `Source type` to `From Repository`, select created Repository's name, fill the `Reference` field with `master` and `Base directory` field with `orders-service/function` values and select **Create** to confirm changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(I asked Maciek and it will be capitalized - as in other views)
Co-authored-by: Karolina Zydek <karolina.zydek@sap.com>
Description
Changes proposed in this pull request:
Related issue(s)