forked from knative/serving
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Produced via: `prettier --write --prose-wrap=always $(find -name '*.md' | grep -v vendor | grep -v .github)`
- Loading branch information
1 parent
3bc686c
commit 6086685
Showing
52 changed files
with
1,309 additions
and
1,027 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# Contribution guidelines | ||
|
||
So you want to hack on Knative Serving? Yay! Please refer to Knative's | ||
overall [contribution guidelines](https://github.com/knative/docs/blob/master/community/CONTRIBUTING.md) | ||
So you want to hack on Knative Serving? Yay! Please refer to Knative's overall | ||
[contribution guidelines](https://github.com/knative/docs/blob/master/community/CONTRIBUTING.md) | ||
to find out how you can help. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,12 +25,13 @@ Start by creating [a GitHub account](https://github.com/join), then setup | |
|
||
You must install these tools: | ||
|
||
1. [`go`](https://golang.org/doc/install): The language `Knative Serving` is built in | ||
1. [`go`](https://golang.org/doc/install): The language `Knative Serving` is | ||
built in | ||
1. [`git`](https://help.github.com/articles/set-up-git/): For source control | ||
1. [`dep`](https://github.com/golang/dep): For managing external Go | ||
dependencies. | ||
1. [`ko`](https://github.com/google/go-containerregistry/tree/master/cmd/ko): For | ||
development. | ||
1. [`ko`](https://github.com/google/go-containerregistry/tree/master/cmd/ko): | ||
For development. | ||
1. [`kubectl`](https://kubernetes.io/docs/tasks/tools/install-kubectl/): For | ||
managing development environments. | ||
|
||
|
@@ -41,8 +42,7 @@ You must install these tools: | |
simply create the cluster and come back here. However, if you _did_ install | ||
Istio/Knative following those instructions, that's fine too, you'll just | ||
redeploy over them, below. | ||
1. [Set up a docker repository you can push | ||
to](./docs/setting-up-a-docker-registry.md) | ||
1. [Set up a docker repository you can push to](./docs/setting-up-a-docker-registry.md) | ||
|
||
### Setup your environment <a name="environment-setup"></a> | ||
|
||
|
@@ -55,8 +55,10 @@ recommend adding them to your `.bashrc`): | |
work properly. | ||
1. `KO_DOCKER_REPO` and `DOCKER_REPO_OVERRIDE`: The docker repository to which | ||
developer images should be pushed (e.g. `gcr.io/[gcloud-project]`). | ||
- **Note**: if you are using docker hub to store your images your `KO_DOCKER_REPO` variable should be `docker.io/<username>`. | ||
- **Note**: Currently Docker Hub doesn't let you create subdirs under your username. | ||
- **Note**: if you are using docker hub to store your images your | ||
`KO_DOCKER_REPO` variable should be `docker.io/<username>`. | ||
- **Note**: Currently Docker Hub doesn't let you create subdirs under your | ||
username. | ||
|
||
`.bashrc` example: | ||
|
||
|
@@ -68,27 +70,31 @@ export DOCKER_REPO_OVERRIDE="${KO_DOCKER_REPO}" | |
export K8S_CLUSTER_OVERRIDE='my-k8s-cluster-name' | ||
``` | ||
|
||
Make sure to configure [authentication](https://cloud.google.com/container-registry/docs/advanced-authentication#standalone_docker_credential_helper) | ||
for your `KO_DOCKER_REPO` if required. To be able to push images to `gcr.io/<project>`, you need to run this once: | ||
Make sure to configure | ||
[authentication](https://cloud.google.com/container-registry/docs/advanced-authentication#standalone_docker_credential_helper) | ||
for your `KO_DOCKER_REPO` if required. To be able to push images to | ||
`gcr.io/<project>`, you need to run this once: | ||
|
||
```shell | ||
gcloud auth configure-docker | ||
``` | ||
|
||
For `K8S_CLUSTER_OVERRIDE`, we expect that this name matches a cluster with authentication configured | ||
with `kubectl`. You can list the clusters you currently have configured via: | ||
`kubectl config get-contexts`. For the cluster you want to target, the value in the CLUSTER column | ||
should be put in this variable. | ||
For `K8S_CLUSTER_OVERRIDE`, we expect that this name matches a cluster with | ||
authentication configured with `kubectl`. You can list the clusters you | ||
currently have configured via: `kubectl config get-contexts`. For the cluster | ||
you want to target, the value in the CLUSTER column should be put in this | ||
variable. | ||
|
||
### Checkout your fork | ||
|
||
The Go tools require that you clone the repository to the `src/github.com/knative/serving` directory | ||
in your [`GOPATH`](https://github.com/golang/go/wiki/SettingGOPATH). | ||
The Go tools require that you clone the repository to the | ||
`src/github.com/knative/serving` directory in your | ||
[`GOPATH`](https://github.com/golang/go/wiki/SettingGOPATH). | ||
|
||
To check out this repository: | ||
|
||
1. Create your own [fork of this | ||
repo](https://help.github.com/articles/fork-a-repo/) | ||
1. Create your own | ||
[fork of this repo](https://help.github.com/articles/fork-a-repo/) | ||
1. Clone it to your machine: | ||
|
||
```shell | ||
|
@@ -100,10 +106,11 @@ git remote add upstream [email protected]:knative/serving.git | |
git remote set-url --push upstream no_push | ||
``` | ||
|
||
_Adding the `upstream` remote sets you up nicely for regularly [syncing your | ||
fork](https://help.github.com/articles/syncing-a-fork/)._ | ||
_Adding the `upstream` remote sets you up nicely for regularly | ||
[syncing your fork](https://help.github.com/articles/syncing-a-fork/)._ | ||
|
||
Once you reach this point you are ready to do a full build and deploy as described below. | ||
Once you reach this point you are ready to do a full build and deploy as | ||
described below. | ||
|
||
## Starting Knative Serving | ||
|
||
|
@@ -114,10 +121,11 @@ can easily [clean your cluster up](#clean-up) and try again. | |
|
||
### Setup cluster admin | ||
|
||
Your `$K8S_USER_OVERRIDE` must be a cluster admin to perform | ||
the setup needed for Knative. | ||
Your `$K8S_USER_OVERRIDE` must be a cluster admin to perform the setup needed | ||
for Knative. | ||
|
||
The value you use depends on [your cluster setup](./docs/creating-a-kubernetes-cluster.md): | ||
The value you use depends on | ||
[your cluster setup](./docs/creating-a-kubernetes-cluster.md): | ||
|
||
```shell | ||
# When using Minikube, the K8s user is your local user. | ||
|
@@ -141,16 +149,18 @@ done | |
kubectl apply -f ./third_party/istio-1.0.4/istio.yaml | ||
``` | ||
|
||
Follow the [instructions](./docs/setting-up-ingress-static-ip.md) if you need | ||
to set up static IP for Ingresses in the cluster. | ||
Follow the [instructions](./docs/setting-up-ingress-static-ip.md) if you need to | ||
set up static IP for Ingresses in the cluster. | ||
|
||
### Deploy Knative Serving | ||
|
||
This step includes building Knative Serving, creating and pushing developer images and deploying them to your Kubernetes cluster. | ||
This step includes building Knative Serving, creating and pushing developer | ||
images and deploying them to your Kubernetes cluster. | ||
|
||
First, edit [config-network.yaml](config/config-network.yaml) as instructed within the file. | ||
If this file is edited and deployed after Knative Serving installation, the changes in it will be | ||
effective only for newly created revisions. | ||
First, edit [config-network.yaml](config/config-network.yaml) as instructed | ||
within the file. If this file is edited and deployed after Knative Serving | ||
installation, the changes in it will be effective only for newly created | ||
revisions. | ||
|
||
Next, run: | ||
|
||
|
@@ -173,9 +183,11 @@ You can access the Knative Serving Controller's logs with: | |
kubectl -n knative-serving logs $(kubectl -n knative-serving get pods -l app=controller -o name) | ||
``` | ||
|
||
If you're using a GCP project to host your Kubernetes cluster, it's good to check the | ||
If you're using a GCP project to host your Kubernetes cluster, it's good to | ||
check the | ||
[Discovery & load balancing](http://console.developers.google.com/kubernetes/discovery) | ||
page to ensure that all services are up and running (and not blocked by a quota issue, for example). | ||
page to ensure that all services are up and running (and not blocked by a quota | ||
issue, for example). | ||
|
||
### Install logging and monitoring backends | ||
|
||
|
@@ -192,30 +204,35 @@ kubectl apply -R -f config/monitoring/100-namespace.yaml \ | |
|
||
## Iterating | ||
|
||
As you make changes to the code-base, there are two special cases to be aware of: | ||
As you make changes to the code-base, there are two special cases to be aware | ||
of: | ||
|
||
- **If you change an input to generated code**, then you must run [`./hack/update-codegen.sh`](./hack/update-codegen.sh). Inputs include: | ||
- **If you change an input to generated code**, then you must run | ||
[`./hack/update-codegen.sh`](./hack/update-codegen.sh). Inputs include: | ||
|
||
- API type definitions in [pkg/apis/serving/v1alpha1/](./pkg/apis/serving/v1alpha1/.), | ||
- API type definitions in | ||
[pkg/apis/serving/v1alpha1/](./pkg/apis/serving/v1alpha1/.), | ||
- Types definitions annotated with `// +k8s:deepcopy-gen=true`. | ||
|
||
- **If you change a package's deps** (including adding external dep), then you must run | ||
[`./hack/update-deps.sh`](./hack/update-deps.sh). | ||
- **If you change a package's deps** (including adding external dep), then you | ||
must run [`./hack/update-deps.sh`](./hack/update-deps.sh). | ||
|
||
These are both idempotent, and we expect that running these at `HEAD` to have no diffs. | ||
Code generation and dependencies are automatically checked to produce no diffs for each pull request. | ||
These are both idempotent, and we expect that running these at `HEAD` to have no | ||
diffs. Code generation and dependencies are automatically checked to produce no | ||
diffs for each pull request. | ||
|
||
update-deps.sh runs "dep ensure" command. In some cases, if newer dependencies are required, you | ||
need to run "dep ensure -update package-name" manually. | ||
update-deps.sh runs "dep ensure" command. In some cases, if newer dependencies | ||
are required, you need to run "dep ensure -update package-name" manually. | ||
|
||
Once the codegen and dependency information is correct, redeploying the controller is simply: | ||
Once the codegen and dependency information is correct, redeploying the | ||
controller is simply: | ||
|
||
```shell | ||
ko apply -f config/controller.yaml | ||
``` | ||
|
||
Or you can [clean it up completely](./DEVELOPMENT.md#clean-up) and [completely | ||
redeploy `Knative Serving`](./DEVELOPMENT.md#starting-knative-serving). | ||
Or you can [clean it up completely](./DEVELOPMENT.md#clean-up) and | ||
[completely redeploy `Knative Serving`](./DEVELOPMENT.md#starting-knative-serving). | ||
|
||
## Clean up | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,9 +5,9 @@ | |
In the interest of fostering an open and welcoming environment, we as | ||
contributors and maintainers pledge to making participation in our project and | ||
our community a harassment-free experience for everyone, regardless of age, body | ||
size, disability, ethnicity, gender identity and expression, level of experience, | ||
education, socio-economic status, nationality, personal appearance, race, | ||
religion, or sexual identity and orientation. | ||
size, disability, ethnicity, gender identity and expression, level of | ||
experience, education, socio-economic status, nationality, personal appearance, | ||
race, religion, or sexual identity and orientation. | ||
|
||
## Our Standards | ||
|
||
|
@@ -37,11 +37,11 @@ Project maintainers are responsible for clarifying the standards of acceptable | |
behavior and are expected to take appropriate and fair corrective action in | ||
response to any instances of unacceptable behavior. | ||
|
||
Project maintainers have the right and responsibility to remove, edit, or | ||
reject comments, commits, code, wiki edits, issues, and other contributions | ||
that are not aligned to this Code of Conduct, or to ban temporarily or | ||
permanently any contributor for other behaviors that they deem inappropriate, | ||
threatening, offensive, or harmful. | ||
Project maintainers have the right and responsibility to remove, edit, or reject | ||
comments, commits, code, wiki edits, issues, and other contributions that are | ||
not aligned to this Code of Conduct, or to ban temporarily or permanently any | ||
contributor for other behaviors that they deem inappropriate, threatening, | ||
offensive, or harmful. | ||
|
||
## Scope | ||
|
||
|
@@ -54,22 +54,22 @@ further defined and clarified by project maintainers. | |
|
||
## Enforcement | ||
|
||
Instances of abusive, harassing, or otherwise unacceptable behavior | ||
may be reported by contacting the project team at | ||
[email protected]. All complaints will be reviewed | ||
and investigated and will result in a response that is deemed | ||
necessary and appropriate to the circumstances. The project team is | ||
obligated to maintain confidentiality with regard to the reporter of | ||
an incident. Further details of specific enforcement policies may be | ||
posted separately. | ||
Instances of abusive, harassing, or otherwise unacceptable behavior may be | ||
reported by contacting the project team at | ||
[email protected]. All complaints will be reviewed and | ||
investigated and will result in a response that is deemed necessary and | ||
appropriate to the circumstances. The project team is obligated to maintain | ||
confidentiality with regard to the reporter of an incident. Further details of | ||
specific enforcement policies may be posted separately. | ||
|
||
Project maintainers who do not follow or enforce the Code of Conduct in good | ||
faith may face temporary or permanent repercussions as determined by other | ||
members of the project's leadership. | ||
|
||
## Attribution | ||
|
||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, | ||
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html | ||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], | ||
version 1.4, available at | ||
https://www.contributor-covenant.org/version/1/4/code-of-conduct.html | ||
|
||
[homepage]: https://www.contributor-covenant.org |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
# Knative Community | ||
|
||
For community information, see [Knative Community](https://github.com/knative/docs/tree/master/community) | ||
in the [Docs](https://github.com/knative/docs) repo. | ||
For community information, see | ||
[Knative Community](https://github.com/knative/docs/tree/master/community) in | ||
the [Docs](https://github.com/knative/docs) repo. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.