Format markdown (#1245)

* Format markdown

Produced via: `prettier --write --prose-wrap=always $(find -name '*.md' | grep -v vendor | grep -v .github)`

* Revert the bad portion of the auto-format
This commit is contained in:
mattmoor-sockpuppet 2019-04-28 08:13:30 -07:00 committed by Knative Prow Robot
parent f8884fd0e9
commit 429da39a46
44 changed files with 358 additions and 354 deletions

View File

@ -1,8 +1,9 @@
Get up and running with one of the community code samples. Get up and running with one of the community code samples. These samples are
These samples are contributed and maintained by members of the Knative community. contributed and maintained by members of the Knative community.
Note: It is possible that one or more samples might become outdated or the original author is unable to maintain their Note: It is possible that one or more samples might become outdated or the
contribution. If you find that something isn't working, lend a helping hand and fix it in a PR. original author is unable to maintain their contribution. If you find that
something isn't working, lend a helping hand and fix it in a PR.
[Learn more about the lifespan of samples](../../contributing/DOCS-CONTRIBUTING.md). [Learn more about the lifespan of samples](../../contributing/DOCS-CONTRIBUTING.md).
[**See all Knative code samples**](../../docs/samples/) [**See all Knative code samples**](../../docs/samples/)
@ -12,14 +13,14 @@ contribution. If you find that something isn't working, lend a helping hand and
Knative Serving sample apps. Knative Serving sample apps.
| Sample Name | Description | Language(s) | | Sample Name | Description | Language(s) |
| ----------- | ---------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ----------- | ----------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Hello World | A quick introduction to Knative Serving that highlights how to deploy an app. | [Clojure](./serving/helloworld-clojure/README.md), [Dart](./serving/helloworld-dart/README.md), [Elixir](./serving/helloworld-elixir/README.md), [Haskell](./serving/helloworld-haskell/README.md), [Rust](./serving/helloworld-rust/README.md), [Swift](./serving/helloworld-swift/README.md), [Vertx](./serving/helloworld-vertx/README.md) | | Hello World | A quick introduction to Knative Serving that highlights how to deploy an app. | [Clojure](./serving/helloworld-clojure/README.md), [Dart](./serving/helloworld-dart/README.md), [Elixir](./serving/helloworld-elixir/README.md), [Haskell](./serving/helloworld-haskell/README.md), [Rust](./serving/helloworld-rust/README.md), [Swift](./serving/helloworld-swift/README.md), [Vertx](./serving/helloworld-vertx/README.md) |
#### Build samples #### Build samples
* *Be the first to contribute a Build code sample to the community collection.* - _Be the first to contribute a Build code sample to the community collection._
#### Eventing and Eventing Sources samples #### Eventing and Eventing Sources samples
* *Be the first to contribute an Eventing or Eventing Sources code sample to the community collection.* - _Be the first to contribute an Eventing or Eventing Sources code sample to the
community collection._

View File

@ -1,4 +1,3 @@
A simple web app written in Clojure that you can use for testing. It reads in an A simple web app written in Clojure that you can use for testing. It reads in an
env variable `TARGET` and prints "Hello \${TARGET}!". If TARGET is not env variable `TARGET` and prints "Hello \${TARGET}!". If TARGET is not
specified, it will use "World" as the TARGET. specified, it will use "World" as the TARGET.

View File

@ -1,4 +1,3 @@
A simple web app written in the [Dart](www.dartlang.org) programming language A simple web app written in the [Dart](www.dartlang.org) programming language
that you can use for testing. It reads in the env variable `TARGET` and prints that you can use for testing. It reads in the env variable `TARGET` and prints
`"Hello $TARGET"`. If `TARGET` is not specified, it will use `"World"` as `"Hello $TARGET"`. If `TARGET` is not specified, it will use `"World"` as

View File

@ -1,4 +1,3 @@
A simple web application written in [Elixir](https://elixir-lang.org/) using the A simple web application written in [Elixir](https://elixir-lang.org/) using the
[Phoenix Framework](https://phoenixframework.org/). The application prints all [Phoenix Framework](https://phoenixframework.org/). The application prints all
environment variables to the main page. environment variables to the main page.

View File

@ -1,4 +1,3 @@
A simple web app written in Haskell that you can use for testing. It reads in an A simple web app written in Haskell that you can use for testing. It reads in an
env variable `TARGET` and prints "Hello \${TARGET}!". If TARGET is not env variable `TARGET` and prints "Hello \${TARGET}!". If TARGET is not
specified, it will use "World" as the TARGET. specified, it will use "World" as the TARGET.

View File

@ -1,4 +1,3 @@
A simple web app written in Rust that you can use for testing. It reads in an A simple web app written in Rust that you can use for testing. It reads in an
env variable `TARGET` and prints "Hello \${TARGET}!". If env variable `TARGET` and prints "Hello \${TARGET}!". If

View File

@ -1,4 +1,3 @@
A simple web app written in Swift that you can use for testing. The app reads in A simple web app written in Swift that you can use for testing. The app reads in
an env variable `TARGET` and prints "Hello \${TARGET}!". If TARGET is not an env variable `TARGET` and prints "Hello \${TARGET}!". If TARGET is not
specified, the app uses "World" as the TARGET. specified, the app uses "World" as the TARGET.

View File

@ -1,4 +1,3 @@
Learn how to deploy a simple web app that is written in Java and uses Eclipse Learn how to deploy a simple web app that is written in Java and uses Eclipse
Vert.x. This samples uses Docker to build locally. The app reads in a `TARGET` Vert.x. This samples uses Docker to build locally. The app reads in a `TARGET`
env variable and then prints "Hello World: \${TARGET}!". If a value for `TARGET` env variable and then prints "Hello World: \${TARGET}!". If a value for `TARGET`

View File

@ -26,8 +26,9 @@ behavior to knative-code-of-conduct@googlegroups.com.
### Contributor license agreements ### Contributor license agreements
We'd love to accept your contributions! But before we can take them, you need to We'd love to accept your contributions! But before we can take them, you need to
fill out the [Google CLA](https://cla.developers.google.com). Important: You must fill fill out the [Google CLA](https://cla.developers.google.com). Important: You
out the CLA with the same email address that you used to create your GitHub account. must fill out the CLA with the same email address that you used to create your
GitHub account.
Once you are CLA'ed, we'll be able to accept your pull requests. This is Once you are CLA'ed, we'll be able to accept your pull requests. This is
necessary because you own the copyright to your changes, even after your necessary because you own the copyright to your changes, even after your
@ -64,8 +65,8 @@ Note that code issues should be filed against the
[individual Knative repositories](http://github.com/knative), while [individual Knative repositories](http://github.com/knative), while
documentation issues should go in the documentation issues should go in the
[`knative/docs`repo](https://github.com/knative/docs/issues). If the issue is [`knative/docs`repo](https://github.com/knative/docs/issues). If the issue is
specific to the [https://knative.dev](https://knative.dev) website, open the issue specific to the [https://knative.dev](https://knative.dev) website, open the
in the [`knative/website`repo](https://github.com/knative/website/issues). issue in the [`knative/website`repo](https://github.com/knative/website/issues).
### Working group ### Working group
@ -92,8 +93,7 @@ There are a couple different ways to jump in to the Knative doc set:
You should keep a You should keep a
[friction log](https://devrel.net/developer-experience/an-introduction-to-friction-logging) [friction log](https://devrel.net/developer-experience/an-introduction-to-friction-logging)
of your experience and then use that to open your first set of PRs. of your experience and then use that to open your first set of PRs. Examples:
Examples:
- What was hard for you? - What was hard for you?
- Did you stumble on something because it wasn't clear? - Did you stumble on something because it wasn't clear?
@ -101,48 +101,52 @@ There are a couple different ways to jump in to the Knative doc set:
**A few pointers and other considerations** **A few pointers and other considerations**
- Think about how you can improve the documentation as a whole. <br> - Think about how you can improve the documentation as a whole. <br> For
For example, how can you fix the issue you found so that others don't run example, how can you fix the issue you found so that others don't run into the
into the same challenges? same challenges?
- Are there multiple places that could be fixed? - Are there multiple places that could be fixed?
- Are there other pages that you should apply your update? - Are there other pages that you should apply your update?
- Would it help if there was a link to more or related information on a - Would it help if there was a link to more or related information on a the
the page? On a related page? page? On a related page?
- Was the title or description misleading? Did you expect to find something - Was the title or description misleading? Did you expect to find something
else? else?
- If you find something and don't have the bandwidth to open a PR, - If you find something and don't have the bandwidth to open a PR, make us aware
make us aware of the pain point and open an of the pain point and open an
[Issue](https://github.com/knative/docs/issues/new). [Issue](https://github.com/knative/docs/issues/new).
### Submitting documentation PRs - what to expect ### Submitting documentation PRs - what to expect
Here's what generally happens when you open a PR against the `knative/docs` repo: Here's what generally happens when you open a PR against the `knative/docs`
repo:
1. One of the assigned repo maintainers will triage the PR by assigning relative 1. One of the assigned repo maintainers will triage the PR by assigning relative
priority, adding appropriate labels, and performing an initial documentation priority, adding appropriate labels, and performing an initial documentation
review. review.
1. If the PR involves significant technical changes, for example new features, 1. If the PR involves significant technical changes, for example new features,
or new and changed sample code, the PR is assigned to a Subject Matter or new and changed sample code, the PR is assigned to a Subject Matter Expert
Expert (SME), typically an engineer working on Knative, for technical review and approval. (SME), typically an engineer working on Knative, for technical review and
1. When both the technical writers and SMEs are satisfied with the quality approval.
of the writing and the technical accuracy of the content, the PR can be 1. When both the technical writers and SMEs are satisfied with the quality of
merged. A PR requires two labels before it can merge: the writing and the technical accuracy of the content, the PR can be merged.
`lgtm` and `approved`. A PR requires two labels before it can merge: `lgtm` and `approved`.
* The SME is responsible for reviewing the technical accuracy and adding
the `lgtm` label.
* The [Knative technical writers](https://github.com/knative/docs/blob/master/OWNERS_ALIASES) - The SME is responsible for reviewing the technical accuracy and adding the
are who provide the `approved` label when the content meets quality, clarity, and `lgtm` label.
organization standards (see [Style Guide](#style-guide)).
We appreciate contributions to the docs, so if you open a PR we - The
will help you get it merged. You can also post in the `#docs` [Knative technical writers](https://github.com/knative/docs/blob/master/OWNERS_ALIASES)
[Slack channel](https://knative.slack.com/) to get input on your ideas before creating a PR. are who provide the `approved` label when the content meets quality,
clarity, and organization standards (see [Style Guide](#style-guide)).
We appreciate contributions to the docs, so if you open a PR we will help you
get it merged. You can also post in the `#docs`
[Slack channel](https://knative.slack.com/) to get input on your ideas before
creating a PR.
### Putting your docs in the right place ### Putting your docs in the right place
@ -155,113 +159,115 @@ Depending on the type of content that you want to contribute, it might belong in
one of the Knative code repositories (`knative/serving`, `knative/eventing`, one of the Knative code repositories (`knative/serving`, `knative/eventing`,
etc.) or in `knative/docs`, the Knative documentation repo. etc.) or in `knative/docs`, the Knative documentation repo.
* **Contributor-focused content** - **Contributor-focused content**
* *Documentation*: Includes content that is component specific and relevant - _Documentation_: Includes content that is component specific and relevant
only to contributors of a given component. Contributor focused only to contributors of a given component. Contributor focused documentation
documentation is located in the corresponding `docs` folder of that is located in the corresponding `docs` folder of that component's
component's repository. For example, if you contribute code to repository. For example, if you contribute code to the Knative Serving
the Knative Serving component, you might need to add contributor focused component, you might need to add contributor focused information into the
information into the `docs` folder of the `docs` folder of the
[knative/serving repo](https://github.com/knative/serving/tree/master/docs/). [knative/serving repo](https://github.com/knative/serving/tree/master/docs/).
* *Code samples*: Includes contributor related code or samples. Code or samples - _Code samples_: Includes contributor related code or samples. Code or
that are contributor focused also belong in their corresponding samples that are contributor focused also belong in their corresponding
component's repo. For example, Eventing specific test code is located in the component's repo. For example, Eventing specific test code is located in the
[knative/eventing tests](https://github.com/knative/eventing/tree/master/test) [knative/eventing tests](https://github.com/knative/eventing/tree/master/test)
folder. folder.
* **User-focused content** - **User-focused content**
* *Documentation*: Includes all content for Knative users. The - _Documentation_: Includes all content for Knative users. The external-facing
external-facing user documentation belongs in the user documentation belongs in the
[`knative/docs` repo](https://github.com/knative/docs). All content in [`knative/docs` repo](https://github.com/knative/docs). All content in
`knative/docs` is published to [https://knative.dev](https://knative.dev). `knative/docs` is published to [https://knative.dev](https://knative.dev).
* *Code samples*: Includes user-facing code samples and their accompanying - _Code samples_: Includes user-facing code samples and their accompanying
step-by-step instructions. User code samples are currently separated into step-by-step instructions. User code samples are currently separated into
two different locations within the `knative/docs` repo. See the following two different locations within the `knative/docs` repo. See the following
section for details about determining where you can add your code sample. section for details about determining where you can add your code sample.
##### Determining where to add user focused code samples ##### Determining where to add user focused code samples
There are currently two categories of user-focused code samples, There are currently two categories of user-focused code samples, _Knative owned
*Knative owned and maintained* and *Community owned and maintained*. and maintained_ and _Community owned and maintained_.
* **Knative owned and maintained**: Includes code samples that are actively - **Knative owned and maintained**: Includes code samples that are actively
maintained and e2e tested. To ensure content currency and balance available maintained and e2e tested. To ensure content currency and balance available
resource, only the code samples that meet the following requirements are resource, only the code samples that meet the following requirements are
located in the `docs/[*component*]/samples` folders of the `knative/docs` repo: located in the `docs/[*component*]/samples` folders of the `knative/docs`
repo:
* *Actively maintained* - The code sample has an active Knative team member - _Actively maintained_ - The code sample has an active Knative team member
who has committed to regular maintenance of that content and ensures that who has committed to regular maintenance of that content and ensures that
the code is updated and working for every product release. the code is updated and working for every product release.
* *Receives regular traffic* - To avoid hosting and maintaining unused - _Receives regular traffic_ - To avoid hosting and maintaining unused or
or stale content, if code samples are not being viewed and fail to stale content, if code samples are not being viewed and fail to receive
receive attention or use, those samples will be moved into the attention or use, those samples will be moved into the
"[community maintained](https://github.com/knative/docs/tree/master/community/samples)" "[community maintained](https://github.com/knative/docs/tree/master/community/samples)"
set of samples. set of samples.
* *Passes e2e testing* - All code samples within `docs/[*component*]/samples` - _Passes e2e testing_ - All code samples within `docs/[*component*]/samples`
folders must align with (and pass) the folders must align with (and pass) the
[`e2e` tests](https://github.com/knative/docs/tree/master/test). [`e2e` tests](https://github.com/knative/docs/tree/master/test).
Depending on the Knative component covered by the code sample that you Depending on the Knative component covered by the code sample that you want to
want to contribute, your PR should add that sample in one of the following contribute, your PR should add that sample in one of the following folders:
folders:
* Build samples: [`/docs/build/samples`](https://github.com/knative/docs/tree/master/docs/build/samples) - Build samples:
* Eventing samples: [`/docs/eventing/samples`](https://github.com/knative/docs/tree/master/docs/eventing/samples) [`/docs/build/samples`](https://github.com/knative/docs/tree/master/docs/build/samples)
* Serving samples: [`/docs/serving/samples`](https://github.com/knative/docs/tree/master/docs/serving/samples) - Eventing samples:
[`/docs/eventing/samples`](https://github.com/knative/docs/tree/master/docs/eventing/samples)
- Serving samples:
[`/docs/serving/samples`](https://github.com/knative/docs/tree/master/docs/serving/samples)
* **Community owned and maintained samples**: Code samples that have - **Community owned and maintained samples**: Code samples that have been
been contributed by Knative community members. These samples might not receive contributed by Knative community members. These samples might not receive
regular maintenance. It is possible that a sample is no longer current and regular maintenance. It is possible that a sample is no longer current and is
is not actively maintained by its original author. While we encourage a not actively maintained by its original author. While we encourage a
contributor to maintain their content, we acknowledge that it's not always contributor to maintain their content, we acknowledge that it's not always
possible for certain reasons, for example other commitments and time possible for certain reasons, for example other commitments and time
constraints. constraints.
While a sample might be out of date, it could still provide assistance and While a sample might be out of date, it could still provide assistance and help
help you get up-and-running with certain use-cases. If you find that you get up-and-running with certain use-cases. If you find that something is not
something is not right or contains outdated info, open an right or contains outdated info, open an
[Issue](https://github.com/knative/docs/issues/new). The sample might be [Issue](https://github.com/knative/docs/issues/new). The sample might be fixed
fixed if bandwidth or available resource exists, or the sample might be if bandwidth or available resource exists, or the sample might be taken down and
taken down and archived into the last release branch where it worked. archived into the last release branch where it worked.
#### Choosing the correct branch #### Choosing the correct branch
It is likely that your docs contribution is either for new or changed It is likely that your docs contribution is either for new or changed features
features in the product, or for a fix or update existing content. in the product, or for a fix or update existing content.
* **New or changed features**: - **New or changed features**: If you are adding or updating documentation for a
If you are adding or updating documentation for a new or changed feature, new or changed feature, you likely want to open your PR against the `master`
you likely want to open your PR against the `master` branch. All pre-release branch. All pre-release content for active Knative development belongs in
content for active Knative development belongs in
[`master`](https://github.com/knative/docs/tree/master/). [`master`](https://github.com/knative/docs/tree/master/).
* **Fixes and updates**: - **Fixes and updates**: If you find an issue in a past release, for example a
If you find an issue in a past release, for example a typo or out-of-date typo or out-of-date content, you likely need to open multiple and subsequent
content, you likely need to open multiple and subsequent PRs. If not a PRs. If not a followup PR, at least add the "`cherrypick` labels" to your
followup PR, at least add the "`cherrypick` labels" to your original PR original PR to indicate in which of the past release that your change affects.
to indicate in which of the past release that your change affects.
For example, if you find a typo in a page of the `v0.5` release, then that For example, if you find a typo in a page of the `v0.5` release, then that
page in the `master` branch likely also has that typo. page in the `master` branch likely also has that typo.
To fix the typo: To fix the typo:
1. Open a PR against the 1. Open a PR against the
[`master`](https://github.com/knative/docs/tree/master/) branch. [`master`](https://github.com/knative/docs/tree/master/) branch.
1. Add one or more `cherrypick-#.#` labels to that PR to indicate which 1. Add one or more `cherrypick-#.#` labels to that PR to indicate which of
of the past release branches should also be fixed. Generally, we only maintain the most recent numbered release. the past release branches should also be fixed. Generally, we only
1. If you want to complete the fix yourself (best practice), you then open maintain the most recent numbered release.
a subsequent PR by running `git cherry-pick [COMMIT#]` against 1. If you want to complete the fix yourself (best practice), you then open a
the [release-0.5](https://github.com/knative/docs/tree/release-0.5). subsequent PR by running `git cherry-pick [COMMIT#]` against the
Where [COMMIT#] is the commit of your merged PR. [release-0.5](https://github.com/knative/docs/tree/release-0.5). Where
[COMMIT#] is the commit of your merged PR.
Note: Depending on workload and available bandwidth, one of Note: Depending on workload and available bandwidth, one of the Knative
the Knative team members might be able to help handle the team members might be able to help handle the `git cherry-pick` in order
`git cherry-pick` in order to push the fix into the affected release to push the fix into the affected release branch(es).
branch(es).
For a list of the available branches in the `knative/docs` repo, see For a list of the available branches in the `knative/docs` repo, see
[Documentation Releases](https://github.com/knative/docs/blob/master/doc-releases.md). [Documentation Releases](https://github.com/knative/docs/blob/master/doc-releases.md).
@ -269,15 +275,15 @@ There are currently two categories of user-focused code samples,
## Assigning owners and reviewers ## Assigning owners and reviewers
For both documentation and code samples, you should assign your PR to a single For both documentation and code samples, you should assign your PR to a single
owner ("*Assignee*"). It's best to set the "Assignee" and include other stakeholders owner ("_Assignee_"). It's best to set the "Assignee" and include other
as "Reviewers" rather than leaving it unassigned or allowing stakeholders as "Reviewers" rather than leaving it unassigned or allowing
[Prow](https://prow.k8s.io/command-help) to auto assign reviewers. [Prow](https://prow.k8s.io/command-help) to auto assign reviewers.
Use the `/assign` command to set the owner. For example: `/assign @owner_id` Use the `/assign` command to set the owner. For example: `/assign @owner_id`
For code samples, initially set the owner of your PR to the SME who should review For code samples, initially set the owner of your PR to the SME who should
for technical accuracy. If you don't know who the appropriate owner is, nor review for technical accuracy. If you don't know who the appropriate owner is,
who your reviewers should be for your PR, you can assign the nor who your reviewers should be for your PR, you can assign the
[current working group lead](./WORKING-GROUPS.md) of the related component. [current working group lead](./WORKING-GROUPS.md) of the related component.
If you want to notify and include other stakeholders in your PR review, use the If you want to notify and include other stakeholders in your PR review, use the

View File

@ -84,7 +84,7 @@ The current membership of the committee is currently (listed alphabetically by
first name): first name):
| &nbsp; | Member | Organization | Profile | | &nbsp; | Member | Organization | Profile |
| --------------------------------------------------------- | -------------- | ------------ | ---------------------------------------- | | --------------------------------------------------------- | ---------------- | ------------ | ------------------------------------------ |
| <img width="30px" src="https://github.com/dewitt.png"> | DeWitt Clinton | Google | [@dewitt](https://github.com/dewitt) | | <img width="30px" src="https://github.com/dewitt.png"> | DeWitt Clinton | Google | [@dewitt](https://github.com/dewitt) |
| <img width="30px" src="https://github.com/mchmarny.png"> | Mark Chmarny | Google | [@mchmarny](https://github.com/mchmarny) | | <img width="30px" src="https://github.com/mchmarny.png"> | Mark Chmarny | Google | [@mchmarny](https://github.com/mchmarny) |
| <img width="30px" src="https://github.com/mbehrendt.png"> | Michael Behrendt | IBM | [@mbehrendt](https://github.com/mbehrendt) | | <img width="30px" src="https://github.com/mbehrendt.png"> | Michael Behrendt | IBM | [@mbehrendt](https://github.com/mbehrendt) |

View File

@ -69,7 +69,7 @@ API
[Build](https://github.com/knative/build), Builders, and Build templates [Build](https://github.com/knative/build), Builders, and Build templates
| Artifact | Link | | Artifact | Link |
| -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Forum | [knative-dev@](https://groups.google.com/forum/#!forum/knative-dev) | | Forum | [knative-dev@](https://groups.google.com/forum/#!forum/knative-dev) |
| Community Meeting VC | [meet.google.com/hau-nwak-tgm](https://meet.google.com/hau-nwak-tgm) <br>Or dial in:<br>(US) +1 219-778-6103 PIN: 573 000# | | Community Meeting VC | [meet.google.com/hau-nwak-tgm](https://meet.google.com/hau-nwak-tgm) <br>Or dial in:<br>(US) +1 219-778-6103 PIN: 573 000# |
| Community Meeting Calendar | Every other Wednesday 10:00a-10:30a PST <br>[Calendar](https://calendar.google.com/calendar/embed?src=google.com_18un4fuh6rokqf8hmfftm5oqq4%40group.calendar.google.com) | | Community Meeting Calendar | Every other Wednesday 10:00a-10:30a PST <br>[Calendar](https://calendar.google.com/calendar/embed?src=google.com_18un4fuh6rokqf8hmfftm5oqq4%40group.calendar.google.com) |

View File

@ -5,12 +5,13 @@ weight: 90
type: "docs" type: "docs"
--- ---
Use the following code samples to help you understand the various use cases for Knative Use the following code samples to help you understand the various use cases for
Build. [Learn more about Knative Build](../index.html). Knative Build. [Learn more about Knative Build](../index.html).
[**See all Knative code samples**](../samples/) [**See all Knative code samples**](../samples/)
Use the following code samples to learn about configuring and createing your Knative Builds. Use the following code samples to learn about configuring and createing your
Knative Builds.
Tip: Review and reference multiple samples to piece together more complex Tip: Review and reference multiple samples to piece together more complex
builds. builds.
@ -22,7 +23,6 @@ builds.
#### Build template samples #### Build template samples
- View the collection of build templates in the `knative/build-template` repo: - View the collection of build templates in the `knative/build-template` repo:
[Sample build templates](https://github.com/knative/build-templates). [Sample build templates](https://github.com/knative/build-templates).

View File

@ -9,8 +9,8 @@ Knative Eventing is designed around the following goals:
1. Knative Eventing services are loosely coupled. These services can be 1. Knative Eventing services are loosely coupled. These services can be
developed and deployed independently on, and across a variety of platforms developed and deployed independently on, and across a variety of platforms
(for example Kubernetes, VMs, SaaS or FaaS). (for example Kubernetes, VMs, SaaS or FaaS).
1. Event producers and event consumers are independent. Any producer (or source), 1. Event producers and event consumers are independent. Any producer (or
can generate events before there are active event consumers that are source), can generate events before there are active event consumers that are
listening. Any event consumer can express interest in an event or class of listening. Any event consumer can express interest in an event or class of
events, before there are producers that are creating those events. events, before there are producers that are creating those events.
1. Other services can be connected to the Eventing system. These services can 1. Other services can be connected to the Eventing system. These services can

View File

@ -5,7 +5,8 @@ weight: 90
type: "docs" type: "docs"
--- ---
Use the following code samples to help you understand the various use cases for Knative Use the following code samples to help you understand the various use cases for
Eventing and Event Sources. [Learn more about Knative Eventing and Eventing Sources](../index.html). Knative Eventing and Event Sources.
[Learn more about Knative Eventing and Eventing Sources](../index.html).
[**See all Knative code samples**](../../samples/) [**See all Knative code samples**](../../samples/)

View File

@ -305,8 +305,9 @@ commands below.
1. To install Knative components or plugins, specify the filenames in the 1. To install Knative components or plugins, specify the filenames in the
`kubectl apply` command. To prevent install failures due to race conditions, `kubectl apply` command. To prevent install failures due to race conditions,
run the install command first with the `-l knative.dev/crd-install=true` flag, run the install command first with the `-l knative.dev/crd-install=true`
then a second time without the selector flag. This installs the CRDs first: flag, then a second time without the selector flag. This installs the CRDs
first:
```bash ```bash
kubectl apply --selector knative.dev/crd-install=true \ kubectl apply --selector knative.dev/crd-install=true \
@ -339,14 +340,15 @@ commands below.
**Example install commands:** **Example install commands:**
- To install the Knative Serving component with the set of observability - To install the Knative Serving component with the set of observability
plugins, enter the following command. The `--selector` flag plugins, enter the following command. The `--selector` flag installs the
installs the CRDs first: CRDs first:
```bash ```bash
kubectl apply --selector knative.dev/crd-install=true \ kubectl apply --selector knative.dev/crd-install=true \
--filename https://github.com/knative/serving/releases/download/v0.5.0/serving.yaml \ --filename https://github.com/knative/serving/releases/download/v0.5.0/serving.yaml \
--filename https://github.com/knative/serving/releases/download/v0.5.0/monitoring.yaml --filename https://github.com/knative/serving/releases/download/v0.5.0/monitoring.yaml
``` ```
Then complete the install by running the command again, this time without Then complete the install by running the command again, this time without
`--selector knative.dev/crd-install=true`: `--selector knative.dev/crd-install=true`:

View File

@ -209,8 +209,8 @@ your Knative installation, see
``` ```
1. To complete the install of Knative and its dependencies, run the 1. To complete the install of Knative and its dependencies, run the
`kubectl apply` command again, this time without the `--selector` `kubectl apply` command again, this time without the `--selector` flag, to
flag, to complete the install of Knative and its dependencies: complete the install of Knative and its dependencies:
```bash ```bash
kubectl apply --filename https://github.com/knative/serving/releases/download/v0.5.0/serving.yaml \ kubectl apply --filename https://github.com/knative/serving/releases/download/v0.5.0/serving.yaml \

View File

@ -219,8 +219,8 @@ see [Performing a Custom Knative Installation](./Knative-custom-install.md).
``` ```
1. To complete the install of Knative and its dependencies, run the 1. To complete the install of Knative and its dependencies, run the
`kubectl apply` command again, this time without the `--selector` `kubectl apply` command again, this time without the `--selector` flag, to
flag, to complete the install of Knative and its dependencies: complete the install of Knative and its dependencies:
```bash ```bash
kubectl apply --filename https://github.com/knative/serving/releases/download/v0.5.0/serving.yaml \ kubectl apply --filename https://github.com/knative/serving/releases/download/v0.5.0/serving.yaml \

View File

@ -145,8 +145,8 @@ see [Performing a Custom Knative Installation](./Knative-custom-install.md).
``` ```
1. To complete the install of Knative and its dependencies, run the 1. To complete the install of Knative and its dependencies, run the
`kubectl apply` command again, this time without the `--selector` `kubectl apply` command again, this time without the `--selector` flag, to
flag, to complete the install of Knative and its dependencies: complete the install of Knative and its dependencies:
```bash ```bash
kubectl apply --filename https://github.com/knative/serving/releases/download/v0.5.0/serving.yaml \ kubectl apply --filename https://github.com/knative/serving/releases/download/v0.5.0/serving.yaml \

View File

@ -130,13 +130,14 @@ Knative: via a one-click "add-on" or manually.
## Installing Knative using an IKS managed add-on ## Installing Knative using an IKS managed add-on
The easiest way to install it is using the Managed Knative add-on facility. The easiest way to install it is using the Managed Knative add-on facility. This
This one-click install process will install Knative, and Istio if not already one-click install process will install Knative, and Istio if not already
installed, and provide automatic updates and lifecycle management of your installed, and provide automatic updates and lifecycle management of your
Knative control plane. Knative control plane.
You can get the add-on via the "Add-ons" tab of your Kubernetes cluster's You can get the add-on via the "Add-ons" tab of your Kubernetes cluster's
console page, or via the command line: console page, or via the command line:
```bash ```bash
ibmcloud ks cluster-addon-enable -y knative $CLUSTER_NAME ibmcloud ks cluster-addon-enable -y knative $CLUSTER_NAME
``` ```
@ -146,10 +147,10 @@ For more information about the add-on see
## Manually installing Knative on IKS ## Manually installing Knative on IKS
However, if you'd like to install Knative manually, see the instructions However, if you'd like to install Knative manually, see the instructions below.
below. Kind in mind that if you do not use the add-on mechanism then you will Kind in mind that if you do not use the add-on mechanism then you will need to
need to manually manage the upgrade of your Istio and Knative installs manually manage the upgrade of your Istio and Knative installs yourself going
yourself going forward. forward.
### Installing Istio ### Installing Istio
@ -226,8 +227,8 @@ see [Performing a Custom Knative Installation](./Knative-custom-install.md).
``` ```
1. To complete the install of Knative and its dependencies, run the 1. To complete the install of Knative and its dependencies, run the
`kubectl apply` command again, this time without the `--selector` `kubectl apply` command again, this time without the `--selector` flag, to
flag, to complete the install of Knative and its dependencies: complete the install of Knative and its dependencies:
```bash ```bash
kubectl apply --filename https://github.com/knative/serving/releases/download/v0.5.0/serving.yaml \ kubectl apply --filename https://github.com/knative/serving/releases/download/v0.5.0/serving.yaml \

View File

@ -131,8 +131,8 @@ see [Performing a Custom Knative Installation](./Knative-custom-install.md).
``` ```
1. To complete the install of Knative and its dependencies, run the 1. To complete the install of Knative and its dependencies, run the
`kubectl apply` command again, this time without the `--selector` `kubectl apply` command again, this time without the `--selector` flag, to
flag, to complete the install of Knative and its dependencies: complete the install of Knative and its dependencies:
```bash ```bash
kubectl apply --filename https://github.com/knative/serving/releases/download/v0.5.0/serving.yaml \ kubectl apply --filename https://github.com/knative/serving/releases/download/v0.5.0/serving.yaml \

View File

@ -91,8 +91,8 @@ minishift start
that is usually after successful start of Minishift that is usually after successful start of Minishift
- The [addon](https://docs.okd.io/latest/minishift/using/addons.html) **anyuid** - The [addon](https://docs.okd.io/latest/minishift/using/addons.html) **anyuid**
allows the `default` service account to run the application with uid `0` allows the `default` service account to run the application with uid `0`
- The [addon](https://docs.okd.io/latest/minishift/using/addons.html) **admissions-webhook** - The [addon](https://docs.okd.io/latest/minishift/using/addons.html)
allows cluster to register admissions webhooks **admissions-webhook** allows cluster to register admissions webhooks
- The command `minishift profile set knative` is required every time you start - The command `minishift profile set knative` is required every time you start
and stop minishift to make sure that you are on right `knative` minishift and stop minishift to make sure that you are on right `knative` minishift

View File

@ -119,8 +119,8 @@ see [Performing a Custom Knative Installation](./Knative-custom-install.md).
``` ```
1. To complete the install of Knative and its dependencies, run the 1. To complete the install of Knative and its dependencies, run the
`kubectl apply` command again, this time without the `--selector` `kubectl apply` command again, this time without the `--selector` flag, to
flag, to complete the install of Knative and its dependencies: complete the install of Knative and its dependencies:
```bash ```bash
kubectl apply --filename https://github.com/knative/serving/releases/download/v0.5.0/serving.yaml \ kubectl apply --filename https://github.com/knative/serving/releases/download/v0.5.0/serving.yaml \

View File

@ -98,8 +98,8 @@ your Knative installation, see
``` ```
1. To complete the install of Knative and its dependencies, run the 1. To complete the install of Knative and its dependencies, run the
`kubectl apply` command again, this time without the `--selector` `kubectl apply` command again, this time without the `--selector` flag, to
flag, to complete the install of Knative and its dependencies: complete the install of Knative and its dependencies:
```bash ```bash
kubectl apply --filename https://github.com/knative/serving/releases/download/v0.5.0/serving.yaml \ kubectl apply --filename https://github.com/knative/serving/releases/download/v0.5.0/serving.yaml \

View File

@ -5,18 +5,19 @@ weight: 90
type: "docs" type: "docs"
--- ---
Find and use Knative code samples to help you get up and running with common use cases. Find and use Knative code samples to help you get up and running with common use
Code samples include content from the Knative team and community members. cases. Code samples include content from the Knative team and community members.
Browse all code samples to find other languages and use cases that might align closer with your goals. Browse all code samples to find other languages and use cases that might align
closer with your goals.
### Knative owned and maintained ### Knative owned and maintained
View the set of Knative code samples that are actively tested and maintained: View the set of Knative code samples that are actively tested and maintained:
* [Build code samples](./build/samples.md) - [Build code samples](./build/samples.md)
* [Eventing and Eventing Sources code samples](./eventing/samples/) - [Eventing and Eventing Sources code samples](./eventing/samples/)
* [Serving code samples](./serving/samples/README.md) - [Serving code samples](./serving/samples/README.md)
### Community owned and maintained ### Community owned and maintained
@ -24,6 +25,7 @@ View the set of Knative code samples that are actively tested and maintained:
### External code samples ### External code samples
A list of links to Knative code samples that live outside of [https://knative.dev](https://knative.dev): A list of links to Knative code samples that live outside of
[https://knative.dev](https://knative.dev):
* *Be the first to link your externally hosted Knative code sample.* - _Be the first to link your externally hosted Knative code sample._

View File

@ -5,7 +5,7 @@ Serving resources and how they can be applied across common use cases.
[**See all Knative code samples**](../../samples/) [**See all Knative code samples**](../../samples/)
| Name | Description | Languages | | Name | Description | Languages |
| -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | | -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | :-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
| Hello World | A quick introduction that highlights how to deploy an app using Knative Serving. | [C#](./hello-world/helloworld-csharp/README.md), [Go](./hello-world/helloworld-go/README.md), [Java](./hello-world/helloworld-java/README.md), [Kotlin](./hello-world/helloworld-kotlin/README.md), [Node.js](./hello-world/helloworld-nodejs/README.md), [PHP](./hello-world/helloworld-php/README.md), [Python](./hello-world/helloworld-python/README.md), [Ruby](./hello-world/helloworld-ruby/README.md), [Scala](./hello-world/helloworld-scala/README.md), [Shell](./hello-world/helloworld-shell/README.md) | | Hello World | A quick introduction that highlights how to deploy an app using Knative Serving. | [C#](./hello-world/helloworld-csharp/README.md), [Go](./hello-world/helloworld-go/README.md), [Java](./hello-world/helloworld-java/README.md), [Kotlin](./hello-world/helloworld-kotlin/README.md), [Node.js](./hello-world/helloworld-nodejs/README.md), [PHP](./hello-world/helloworld-php/README.md), [Python](./hello-world/helloworld-python/README.md), [Ruby](./hello-world/helloworld-ruby/README.md), [Scala](./hello-world/helloworld-scala/README.md), [Shell](./hello-world/helloworld-shell/README.md) |
| Advanced Deployment | Simple blue/green-like application deployment pattern illustrating the process of updating a live application without dropping any traffic. | [YAML](./blue-green-deployment.md) | | Advanced Deployment | Simple blue/green-like application deployment pattern illustrating the process of updating a live application without dropping any traffic. | [YAML](./blue-green-deployment.md) |
| Autoscale | A demonstration of the autoscaling capabilities of Knative. | [Go](./autoscale-go/README.md) | | Autoscale | A demonstration of the autoscaling capabilities of Knative. | [Go](./autoscale-go/README.md) |

View File

@ -41,9 +41,8 @@ recreate the source files from this folder.
4. In your project directory, create a file named `Dockerfile` and copy the code 4. In your project directory, create a file named `Dockerfile` and copy the code
block below into it. For detailed instructions on dockerizing a Spark Java block below into it. For detailed instructions on dockerizing a Spark Java
app, see app, see [Spark with Docker](http://sparkjava.com/tutorials/docker). For
[Spark with Docker](http://sparkjava.com/tutorials/docker). additional information on multi-stage docker builds for Java see
For additional information on multi-stage docker builds for Java see
[Creating Smaller Java Image using Docker Multi-stage Build](http://blog.arungupta.me/smaller-java-image-docker-multi-stage-build/). [Creating Smaller Java Image using Docker Multi-stage Build](http://blog.arungupta.me/smaller-java-image-docker-multi-stage-build/).
```docker ```docker
@ -169,9 +168,8 @@ folder) you're ready to build and deploy the sample app.
--output jsonpath={.status.domain}) --output jsonpath={.status.domain})
``` ```
6. Now you can make a request to your app to see the result. Presuming, 6. Now you can make a request to your app to see the result. Presuming, the IP
the IP address you got in the step above is in the `${IP_ADDRESS}` address you got in the step above is in the `${IP_ADDRESS}` env variable:
env variable:
```shell ```shell
curl -H "Host: ${DOMAIN_NAME}" http://${IP_ADDRESS} curl -H "Host: ${DOMAIN_NAME}" http://${IP_ADDRESS}

View File

@ -71,10 +71,10 @@ kubectl get ksvc stock-service-example --output yaml
This section describes how to create a new Revision by updating your Service. This section describes how to create a new Revision by updating your Service.
A new Revision is created every time a value in the `template` section A new Revision is created every time a value in the `template` section of the
of the Service `spec` is updated. The `updated_sample.yaml` in this folder Service `spec` is updated. The `updated_sample.yaml` in this folder changes the
changes the environment variable `RESOURCE` from `stock` to `share`. Applying environment variable `RESOURCE` from `stock` to `share`. Applying this change
this change will result in a new Revision. will result in a new Revision.
For comparison, you can diff the `release_sample.yaml` with the For comparison, you can diff the `release_sample.yaml` with the
`updated_sample.yaml`. `updated_sample.yaml`.
@ -90,10 +90,10 @@ serving/samples/traffic-splitting/updated_sample.yaml
kubectl apply --filename serving/samples/traffic-splitting/updated_sample.yaml kubectl apply --filename serving/samples/traffic-splitting/updated_sample.yaml
``` ```
2. With our `traffic` block, traffic will _not_ shift to the new 2. With our `traffic` block, traffic will _not_ shift to the new Revision
Revision automatically. However, it will be available via the URL associated automatically. However, it will be available via the URL associated with our
with our `latest` sub-route. This can be verified through the Service status, `latest` sub-route. This can be verified through the Service status, by
by finding the entry of `status.traffic` for `latest`: finding the entry of `status.traffic` for `latest`:
```shell ```shell
kubectl get ksvc stock-service-example --output yaml kubectl get ksvc stock-service-example --output yaml
@ -102,8 +102,8 @@ kubectl get ksvc stock-service-example --output yaml
3. The readiness of the Service can be verified through the Service Conditions. 3. The readiness of the Service can be verified through the Service Conditions.
When the Service conditions report it is ready again, you can access the new When the Service conditions report it is ready again, you can access the new
Revision using the same method as found in the Revision using the same method as found in the
[previous sample](../rest-api-go/README.md#access-the-service) using [previous sample](../rest-api-go/README.md#access-the-service) using the
the Service hostname found above. Service hostname found above.
```shell ```shell
# Replace "latest" with whichever tag for which we want the hostname. # Replace "latest" with whichever tag for which we want the hostname.