Skip to content

Latest commit

 

History

History
110 lines (76 loc) · 3.38 KB

DEVELOPMENT.md

File metadata and controls

110 lines (76 loc) · 3.38 KB

Development

This doc explains how to setup a development environment so you can get started contributing to Knative net-istio. Also take a look at:

Getting started

  1. Create a GitHub account
  2. Setup GitHub access via SSH
  3. Install requirements
  4. Set up your shell environment
  5. Create and checkout a repo fork

Before submitting a PR, see also CONTRIBUTING.md.

Requirements

You must install these tools:

  1. go: The language Knative net-istio is built in
  2. git: For source control

Environment setup

To get started you'll need to set these environment variables (we recommend adding them to your .bashrc):

  1. GOPATH: If you don't have one, simply pick a directory and add export GOPATH=...
  2. $GOPATH/bin on PATH: This is so that tooling installed via go get will work properly.

.bashrc example:

export GOPATH="$HOME/go"
export PATH="${PATH}:${GOPATH}/bin"

Checkout your fork

The Go tools require that you clone the repository to the src/knative.dev/net-istio directory in your GOPATH.

To check out this repository:

  1. Create your own fork of this repo
  2. Clone it to your machine:
mkdir -p ${GOPATH}/src/knative.dev
cd ${GOPATH}/src/knative.dev
git clone git@github.com:${YOUR_GITHUB_USERNAME}/net-istio.git
cd net-istio
git remote add upstream https://knative.dev/net-istio.git
git remote set-url --push upstream no_push

Adding the upstream remote sets you up nicely for regularly syncing your fork.

Once you reach this point you are ready to do a full build and deploy as described below.

Install Istio

Run the following command to install Istio for development purpose:

istioctl install -y

Install Knative Serving

Run the following command to install Knative

kubectl apply -f https://github.com/knative/serving/releases/latest/download/serving-crds.yaml
kubectl apply -f https://github.com/knative/serving/releases/latest/download/serving-core.yaml

Install Knative net-istio

Run the following command to install net-istio components

ko apply -f config/

System Internal TLS (optional)

If you want to work with system-internal-tls enabled you can either:

You can then enable system-internal-tls in config-network like in our test resources and specify the following environment variables before you run the e2e/conformance tests:

export UPSTREAM_TLS_CERT=serving-certs
export SERVER_NAME=kn-user-serving-tests