Skip to content

Commit 7875c80

Browse files
committed
first istio steps
1 parent 3f42b81 commit 7875c80

File tree

7 files changed

+50
-39
lines changed

7 files changed

+50
-39
lines changed

README.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -186,10 +186,10 @@ To install busola on k8s cluster run:
186186
(cd resources && kustomize build base/ | kubectl apply -f- )
187187
```
188188

189-
To install busola with istio gateway please prepare `DOMAIN`, go to `resources` and run:
189+
To install busola using specific environment configuration, set `ENVIRONMENT` environment variable and run:
190190

191191
```shell
192-
./apply-resources-istio.sh ${YOUR_DOMAIN}
192+
(cd resources && kustomize build environments/${ENVIRONMENT} | kubectl apply -f- )
193193
```
194194

195195
### Access busola installed on Kubernetes
@@ -214,9 +214,13 @@ Install ingress resources by running:
214214

215215
Then go to `localhost`
216216

217-
### Istio-ingress gateway
217+
### Istio
218218

219-
TODO: access via istio ingress
219+
To install Istio needed resources, prepare `DOMAIN`and run:
220+
221+
```shell
222+
(cd resources && ./apply-resources-istio.sh ${YOUR_DOMAIN})
223+
```
220224

221225
## Troubleshooting
222226

resources/apply-resources-istio.sh

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,15 @@ if [ -z "$1" ] ; then
77
fi
88

99
export DOMAIN=$1
10-
export NAMESPACE=${2:-busola}
11-
export ENVIRONMENT=$3
10+
export NAMESPACE=${2:-default}
1211
TMP_DIR="../temp/resources"
1312

14-
./apply-resources.sh "$@"
1513

16-
envsubst < "${TMP_DIR}"/istio/virtualservice-busola.tpl.yaml > "${TMP_DIR}"/istio/virtualservice-busola.yaml
14+
mkdir -p "${TMP_DIR}"
15+
cp -rf . "${TMP_DIR}"
16+
#./apply-resources.sh "$@"
17+
18+
envsubst < "${TMP_DIR}"/istio/gateway.tpl.yaml > "${TMP_DIR}"/istio/gateway.yaml
19+
envsubst < "${TMP_DIR}"/istio/http_route.tpl.yaml > "${TMP_DIR}"/istio/http_route.yaml
1720

1821
kubectl apply -k "${TMP_DIR}"/istio --namespace=$NAMESPACE

resources/istio/destinationrule-busola-backend.yaml

Lines changed: 0 additions & 9 deletions
This file was deleted.

resources/istio/gateway.tpl.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
apiVersion: gateway.networking.k8s.io/v1
2+
kind: Gateway
3+
metadata:
4+
name: busola
5+
namespace: ${NAMESPACE}
6+
spec:
7+
gatewayClassName: istio
8+
listeners:
9+
- name: http
10+
hostname: ${DOMAIN}
11+
port: 80
12+
protocol: HTTP
13+
allowedRoutes:
14+
namespaces:
15+
from: Same
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
apiVersion: gateway.networking.k8s.io/v1
2+
kind: HTTPRoute
3+
metadata:
4+
name: httproute
5+
namespace: ${NAMESPACE}
6+
spec:
7+
parentRefs:
8+
- name: gateway
9+
hostnames: ['${DOMAIN}']
10+
rules:
11+
- matches:
12+
- path:
13+
type: PathPrefix
14+
value: /headers
15+
backendRefs:
16+
- name: busola
17+
namespace: ${NAMESPACE}
18+
port: 3001

resources/istio/kustomization.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
apiVersion: kustomize.config.k8s.io/v1beta1
22
kind: Kustomization
33
resources:
4-
- virtualservice-busola.yaml
4+
- gateway.yaml
5+
- http_route.yaml
56
# Add the destinationrule for TLS into the backend pod.
67
# This will tell the istio sidecar to use TLS to connect to the backend service.
78
# For this to work, you need to enable TLS in the backend. See docs/install-kyma-dashboard-manually.md for more information.

resources/istio/virtualservice-busola.tpl.yaml

Lines changed: 0 additions & 21 deletions
This file was deleted.

0 commit comments

Comments
 (0)