Skip to content
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

Start testing Istio 1.4.0 #6097

Merged
merged 5 commits into from
Nov 26, 2019
Merged
Show file tree
Hide file tree
Changes from 4 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
34 changes: 0 additions & 34 deletions test/config/mtls/destinationrule.yaml

This file was deleted.

26 changes: 0 additions & 26 deletions test/config/mtls/policy.yaml

This file was deleted.

8 changes: 0 additions & 8 deletions test/e2e-common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -352,14 +352,6 @@ function test_setup() {

echo ">> Creating test resources (test/config/)"
ko apply ${KO_FLAGS} -f test/config/ || return 1
if (( MESH )); then
if [[ ${ISTIO_VERSION} =~ 1.3.* ]]; then
# TODO: Enable mTLS with Istio 1.3 once https://github.com/knative/serving/issues/5725 is identified.
continue
else
ko apply ${KO_FLAGS} -f test/config/mtls/ || return 1
fi
fi
${REPO_ROOT_DIR}/test/upload-test-images.sh || return 1
wait_until_pods_running knative-serving || return 1
if [[ -n "${ISTIO_VERSION}" ]]; then
Expand Down
1 change: 1 addition & 0 deletions test/e2e/istio/probing_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ func TestIstioProbing(t *testing.T) {
Mode: v1alpha3.TLSModeSimple,
PrivateKey: "/etc/istio/ingressgateway-certs/tls.key",
ServerCertificate: "/etc/istio/ingressgateway-certs/tls.crt",
SubjectAltNames: []string{},
}

cases := []struct {
Expand Down
1 change: 1 addition & 0 deletions third_party/istio-1.4-latest
7 changes: 7 additions & 0 deletions third_party/istio-1.4.0/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
The istio\*.yaml files are generated by running

```
./download-istio.sh
```

Using the Helm v2.14.1
68 changes: 68 additions & 0 deletions third_party/istio-1.4.0/download-istio.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
#!/usr/bin/env bash

# Copyright 2019 The Knative Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Download and unpack Istio
ISTIO_VERSION=1.4.0
DOWNLOAD_URL=https://github.com/istio/istio/releases/download/${ISTIO_VERSION}/istio-${ISTIO_VERSION}-linux.tar.gz

wget --no-check-certificate $DOWNLOAD_URL
if [ $? != 0 ]; then
echo "Failed to download istio package"
exit 1
fi
tar xzf istio-${ISTIO_VERSION}-linux.tar.gz

( # subshell in downloaded directory
cd istio-${ISTIO_VERSION} || exit

# Create CRDs template
helm template --namespace=istio-system \
install/kubernetes/helm/istio-init \
`# Removing trailing whitespaces to make automation happy` \
| sed 's/[ \t]*$//' \
> ../istio-crds.yaml

# Create a custom cluster local gateway, based on the Istio custom-gateway template.
helm template --namespace=istio-system install/kubernetes/helm/istio --values ../values-extras.yaml \
`# Removing trailing whitespaces to make automation happy` \
| sed 's/[ \t]*$//' \
> ../istio-knative-extras.yaml

# A template with sidecar injection enabled.
helm template --namespace=istio-system install/kubernetes/helm/istio --values ../values.yaml \
`# Removing trailing whitespaces to make automation happy` \
| sed 's/[ \t]*$//' \
> ../istio.yaml

# A lighter template, with just pilot/gateway.
# Based on install/kubernetes/helm/istio/values-istio-minimal.yaml
helm template --namespace=istio-system install/kubernetes/helm/istio --values ../values-lean.yaml \
`# Removing trailing whitespaces to make automation happy` \
| sed 's/[ \t]*$//' \
> ../istio-lean.yaml
)

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

# Add in the `istio-system` namespace to reduce number of commands.
patch istio-crds.yaml namespace.yaml.patch
patch istio.yaml namespace.yaml.patch
patch istio-lean.yaml namespace.yaml.patch

# Increase termination drain duration seconds.
patch -l istio.yaml drain-seconds.yaml.patch
5 changes: 5 additions & 0 deletions third_party/istio-1.4.0/drain-seconds.yaml.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
654a655,658
> # PATCH #2: Increase termination drain duration.
> - name: TERMINATION_DRAIN_DURATION_SECONDS
> value: "20"
> # PATCH #2 ends.
Loading