Skip to content

Commit

Permalink
updates to tsb v1.7; updates gateways config to use unified gateway s…
Browse files Browse the repository at this point in the history
…chema
  • Loading branch information
Eitan Suez committed Oct 17, 2023
1 parent 0d7d4c6 commit d6e3a0d
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 19 deletions.
7 changes: 4 additions & 3 deletions config.yaml.template
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
k8s_version: "1.25.9"
istio_version: "1.15.7"
k8s_version: "1.27.6"
istio_version: "1.17.8"
tsb_version: "1.7.0"
tsb_repo:
username: johndoe
apikey: qqqqq
scenario: tsb-training
scenario: tsb-training
9 changes: 5 additions & 4 deletions install-tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

k8s_version=$(yq .k8s_version config.yaml)
istio_version=$(yq .istio_version config.yaml)
tsb_version=$(yq .tsb_version config.yaml)

# Colors
end="\033[0m"
Expand Down Expand Up @@ -39,7 +40,7 @@ sudo install /tmp/istioctl /usr/local/bin/istioctl
rm -f /tmp/istioctl*

print_info "Installing tctl"
curl -sLo /tmp/tctl "https://binaries.dl.tetrate.io/public/raw/versions/linux-amd64-1.6.2/tctl"
curl -sLo /tmp/tctl "https://binaries.dl.tetrate.io/public/raw/versions/linux-amd64-${tsb_version}/tctl"
chmod +x /tmp/tctl
sudo install /tmp/tctl /usr/local/bin/tctl
rm -f /tmp/tctl
Expand All @@ -48,9 +49,9 @@ print_info "Installing vcluster"
curl -sLo vcluster "https://github.com/loft-sh/vcluster/releases/latest/download/vcluster-linux-amd64" && sudo install -c -m 0755 vcluster /usr/local/bin && rm -f vcluster

print_info "Installing step cli"
wget --quiet https://dl.smallstep.com/gh-release/cli/docs-cli-install/v0.23.4/step-cli_0.23.4_amd64.deb
sudo dpkg --install step-cli_0.23.4_amd64.deb
rm step-cli_0.23.4_amd64.deb
wget --quiet https://dl.smallstep.com/gh-release/cli/docs-cli-install/v0.25.0/step-cli_0.25.0_amd64.deb
sudo dpkg --install step-cli_0.25.0_amd64.deb
rm step-cli_0.25.0_amd64.deb

print_info "Appending to .bashrc file completion commands for CLIs"
cat >> ~/.bashrc <<'EOF'
Expand Down
24 changes: 15 additions & 9 deletions scenarios/tsb-training/artifacts/gateways.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
apiVersion: gateway.tsb.tetrate.io/v2
kind: Tier1Gateway
kind: Gateway
metadata:
name: tier1-gateway
group: tier1-gateway-group
Expand All @@ -12,18 +12,22 @@ spec:
namespace: tier1
labels:
app: tier1-gateway
externalServers:
http:
- hostname: bookinfo.tetrate.com
name: bookinfo
port: 80
clusters:
- name: c1
weight: 50
- name: c2
weight: 50
routing:
rules:
- route:
clusterDestination:
clusters:
- name: c1
weight: 50
- name: c2
weight: 50
---
apiVersion: gateway.tsb.tetrate.io/v2
kind: IngressGateway
kind: Gateway
metadata:
organization: tetrate
name: bookinfo-gw-ingress
Expand All @@ -42,4 +46,6 @@ spec:
routing:
rules:
- route:
host: "bookinfo/productpage.bookinfo.svc.cluster.local"
serviceDestination:
host: "bookinfo/productpage.bookinfo.svc.cluster.local"
port: 9080
5 changes: 3 additions & 2 deletions spec/config-test.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
k8s_version: "1.25.9"
istio_version: "1.15.7"
k8s_version: "1.27.6"
istio_version: "1.17.8"
tsb_version: "1.7.0"
tsb_repo:
username: john-jones
apikey: 12345abcd
Expand Down
2 changes: 1 addition & 1 deletion spec/tsb_config_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
end

it 'parses a direct field' do
expect(@config.params['k8s_version']).to eq "1.25.9"
expect(@config.params['k8s_version']).to eq "1.27.6"
end

it 'parses a nested field' do
Expand Down

0 comments on commit d6e3a0d

Please sign in to comment.