Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ kubectl create clusterrolebinding cluster-admin-binding \
### Deploy Istio

```shell
kubectl apply -f ./third_party/istio-0.8.0/istio.yaml
kubectl apply -f ./third_party/istio-1.0-prerelease/istio.yaml
```

Optionally label namespaces with `istio-injection=enabled`:
Expand All @@ -133,7 +133,7 @@ Optionally label namespaces with `istio-injection=enabled`:
kubectl label namespace default istio-injection=enabled
```

Follow the [instructions](./docs/setting-up-ingress-static-ip.md) if you need
Follow the [instructions](./docs/setting-up-ingress-static-ip.md) if you need
to set up static IP for Ingresses in the cluster.

### Deploy Build
Expand All @@ -146,7 +146,7 @@ kubectl apply -f ./third_party/config/build/release.yaml

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.
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.

Expand Down Expand Up @@ -216,7 +216,7 @@ ko delete --ignore-not-found=true \
-f config/monitoring/100-common \
-f config/ \
-f ./third_party/config/build/release.yaml \
-f ./third_party/istio-0.8.0/istio.yaml
-f ./third_party/istio-1.0-prerelease/istio.yaml
```

## Telemetry
Expand Down
2 changes: 2 additions & 0 deletions config/202-gateway.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ spec:
protocol: HTTPS
hosts:
- "*"
tls:
mode: PASSTHROUGH
---
# This is the Service definition for the ingress pods serving
# Knative's shared Gateway.
Expand Down
4 changes: 2 additions & 2 deletions docs/creating-a-kubernetes-cluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,13 +143,13 @@ To use a k8s cluster running in GKE:
so deploy istio with `LoadBalancer` replaced by `NodePort`:

```bash
sed 's/LoadBalancer/NodePort/' third_party/istio-0.8.0/istio.yaml | kubectl apply -f -
sed 's/LoadBalancer/NodePort/' third_party/istio-1.0-prerelease/istio.yaml | kubectl apply -f -
```

(Then optionally [enable istio injection](../DEVELOPMENT.md#deploy-istio).)

1. [Deploy build](../DEVELOPMENT.md#deploy-build):

```shell
kubectl apply -f ./third_party/config/build/release.yaml
```
Expand Down
2 changes: 1 addition & 1 deletion hack/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ readonly SERVING_RELEASE_GCR

# istio.yaml file to upload
# We publish our own istio.yaml, so users don't need to use helm"
readonly ISTIO_YAML=./third_party/istio-0.8.0/istio.yaml
readonly ISTIO_YAML=./third_party/istio-1.0-prerelease/istio.yaml
# Local generated yaml file.
readonly OUTPUT_YAML=release.yaml
# Local generated lite yaml file.
Expand Down
4 changes: 2 additions & 2 deletions pkg/controller/names.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ func GetServingK8SServiceNameForObj(name string) string {
}

func GetRevisionHeaderName() string {
return "Knative-Serving-Revision"
return "knative-serving-revision"
}

func GetRevisionHeaderNamespace() string {
return "Knative-Serving-Namespace"
return "knative-serving-namespace"
}
6 changes: 3 additions & 3 deletions pkg/controller/route/resources/virtual_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,11 +140,11 @@ func makeVirtualServiceRoute(domains []string, ns string, targets []traffic.Revi
})
}
route := v1alpha3.HTTPRoute{
Match: matches,
Route: weights,
Match: matches,
Route: weights,
Timeout: DefaultRouteTimeout,
AppendHeaders: map[string]string{
IstioTimeoutHackHeaderKey: IstioTimeoutHackHeaderValue,
IstioTimeoutHackHeaderKey: IstioTimeoutHackHeaderValue,
},
}
// Add traffic rules for activator.
Expand Down
20 changes: 10 additions & 10 deletions pkg/controller/route/resources/virtual_service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ func TestMakeVirtualServiceSpec_CorrectRoutes(t *testing.T) {
}},
Timeout: DefaultRouteTimeout,
AppendHeaders: map[string]string{
IstioTimeoutHackHeaderKey: IstioTimeoutHackHeaderValue,
IstioTimeoutHackHeaderKey: IstioTimeoutHackHeaderValue,
},
}, {
Match: []v1alpha3.HTTPMatchRequest{{
Expand All @@ -139,7 +139,7 @@ func TestMakeVirtualServiceSpec_CorrectRoutes(t *testing.T) {
}},
Timeout: DefaultRouteTimeout,
AppendHeaders: map[string]string{
IstioTimeoutHackHeaderKey: IstioTimeoutHackHeaderValue,
IstioTimeoutHackHeaderKey: IstioTimeoutHackHeaderValue,
},
}}
routes := MakeVirtualService(r, &traffic.TrafficConfig{Targets: targets}).Spec.Http
Expand Down Expand Up @@ -215,7 +215,7 @@ func TestMakeVirtualServiceRoute_Vanilla(t *testing.T) {
}},
Timeout: DefaultRouteTimeout,
AppendHeaders: map[string]string{
IstioTimeoutHackHeaderKey: IstioTimeoutHackHeaderValue,
IstioTimeoutHackHeaderKey: IstioTimeoutHackHeaderValue,
},
}
if diff := cmp.Diff(&expected, route); diff != "" {
Expand Down Expand Up @@ -255,7 +255,7 @@ func TestMakeVirtualServiceRoute_ZeroPercentTarget(t *testing.T) {
}},
Timeout: DefaultRouteTimeout,
AppendHeaders: map[string]string{
IstioTimeoutHackHeaderKey: IstioTimeoutHackHeaderValue,
IstioTimeoutHackHeaderKey: IstioTimeoutHackHeaderValue,
},
}
if diff := cmp.Diff(&expected, route); diff != "" {
Expand Down Expand Up @@ -302,7 +302,7 @@ func TestMakeVirtualServiceRoute_TwoTargets(t *testing.T) {
}},
Timeout: DefaultRouteTimeout,
AppendHeaders: map[string]string{
IstioTimeoutHackHeaderKey: IstioTimeoutHackHeaderValue,
IstioTimeoutHackHeaderKey: IstioTimeoutHackHeaderValue,
},
}
if diff := cmp.Diff(&expected, route); diff != "" {
Expand Down Expand Up @@ -337,8 +337,8 @@ func TestMakeVirtualServiceRoute_VanillaScaledToZero(t *testing.T) {
Weight: 100,
}},
AppendHeaders: map[string]string{
"Knative-Serving-Revision": "revision",
"Knative-Serving-Namespace": "test-ns",
"knative-serving-revision": "revision",
"knative-serving-namespace": "test-ns",
IstioTimeoutHackHeaderKey: IstioTimeoutHackHeaderValue,
},
Timeout: DefaultRouteTimeout,
Expand Down Expand Up @@ -380,8 +380,8 @@ func TestMakeVirtualServiceRoute_TwoInactiveTargets(t *testing.T) {
Weight: 100,
}},
AppendHeaders: map[string]string{
"Knative-Serving-Revision": "revision",
"Knative-Serving-Namespace": "test-ns",
"knative-serving-revision": "revision",
"knative-serving-namespace": "test-ns",
IstioTimeoutHackHeaderKey: IstioTimeoutHackHeaderValue,
},
Timeout: DefaultRouteTimeout,
Expand Down Expand Up @@ -424,7 +424,7 @@ func TestMakeVirtualServiceRoute_ZeroPercentNamedTargetScaledToZero(t *testing.T
}},
Timeout: DefaultRouteTimeout,
AppendHeaders: map[string]string{
IstioTimeoutHackHeaderKey: IstioTimeoutHackHeaderValue,
IstioTimeoutHackHeaderKey: IstioTimeoutHackHeaderValue,
},
}
if diff := cmp.Diff(&expected, route); diff != "" {
Expand Down
2 changes: 1 addition & 1 deletion test/e2e-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
[ -v KNATIVE_TEST_INFRA ] || exit 1

# Location of istio for the test cluster
readonly ISTIO_YAML=./third_party/istio-0.8.0/istio.yaml
readonly ISTIO_YAML=./third_party/istio-1.0-prerelease/istio.yaml

# Helper functions.

Expand Down
14 changes: 0 additions & 14 deletions test/e2e/e2e.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package e2e

import (
"testing"
"time"

"go.uber.org/zap"

Expand Down Expand Up @@ -41,19 +40,6 @@ func TearDown(clients *test.Clients, names test.ResourceNames, logger *zap.Sugar
if clients != nil {
clients.Delete([]string{names.Route}, []string{names.Config})
}

// There seems to be an Istio bug where if we delete / create
// VirtualServices too quickly we will hit pro-longed "No health
// upstream" causing timeouts. Adding this small sleep to
// sidestep the issue.
//
// Only perform this sleep if the test created a Route.
//
// TODO(#1376): Fix this when upstream fix is released.
if names.Route != "" {
logger.Info("Sleeping for 20 seconds after Route deletion to avoid hitting issue in #1376")
time.Sleep(20 * time.Second)
}
}

// CreateRouteAndConfig will create Route and Config objects using clients.
Expand Down
8 changes: 0 additions & 8 deletions test/e2e/helloworld_shell_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,6 @@ func noStderrShell(name string, arg ...string) string {
func cleanup(yamlFilename string, logger *zap.SugaredLogger) {
exec.Command("kubectl", "delete", "-f", yamlFilename).Run()
os.Remove(yamlFilename)
// There seems to be an Istio bug where if we delete / create
// VirtualServices too quickly we will hit pro-longed "No health
// upstream" causing timeouts. Adding this small sleep to
// sidestep the issue.
//
// TODO(#1376): Fix this when upstream fix is released.
logger.Info("Sleeping for 20 seconds after Route deletion to avoid hitting issue in #1376")
time.Sleep(20 * time.Second)
}

func TestHelloWorldFromShell(t *testing.T) {
Expand Down
11 changes: 0 additions & 11 deletions third_party/istio-0.8.0/BUILD.bazel

This file was deleted.

9 changes: 0 additions & 9 deletions third_party/istio-0.8.0/README.md

This file was deleted.

16 changes: 0 additions & 16 deletions third_party/istio-0.8.0/download-istio.sh

This file was deleted.

7 changes: 7 additions & 0 deletions third_party/istio-1.0-prerelease/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
This istio.yaml file is is generated by running
```
./download-istio.sh
```

and modify `istio.yaml` to add a prestop hook to keep `istio-proxy` alive longer
after container receiving prestop request.
24 changes: 24 additions & 0 deletions third_party/istio-1.0-prerelease/download-istio.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Download and unpack Istio
ISTIO_VERSION=release-1.0-20180723-09-15
DOWNLOAD_URL=https://storage.googleapis.com/istio-prerelease/daily-build/${ISTIO_VERSION}/istio-${ISTIO_VERSION}-linux.tar.gz
wget $DOWNLOAD_URL
tar xzf istio-${ISTIO_VERSION}-linux.tar.gz
cd istio-${ISTIO_VERSION}

# Create template
helm template --namespace=istio-system \
--set sidecarInjectorWebhook.enabled=true \
--set sidecarInjectorWebhook.enableNamespacesByDefault=true \
--set global.proxy.image=proxyv2 \
--set global.autoInject=disabled \
--set prometheus.enabled=false \
install/kubernetes/helm/istio > ../istio.yaml

# Clean up.
cd ..
rm -rf istio-${ISTIO_VERSION}
rm istio-${ISTIO_VERSION}-linux.tar.gz

# Add in the `istio-system` namespace, so we only need to
# run one kubectl command to install istio.
patch istio.yaml namespace.yaml.patch
Loading