Skip to content

Commit f9a416d

Browse files
authored
Created a document simplifying deployment with Helm-Charts (#615)
2 parents 843c713 + e016875 commit f9a416d

File tree

3 files changed

+103
-1
lines changed

3 files changed

+103
-1
lines changed

docs/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Index
22

3+
- [Tornjak Deployment Using Helm-Charts](/docs/helm/tornjak-helm-chart.md)
4+
35
- [Blogs](/docs/blogs.md)
46

57
- [Debugging, Hints and Tips for Solving Common Problems with Tornjak](/docs/tornjak-hints.md)
@@ -16,7 +18,6 @@
1618
- [Server plugin: Datastore "SQL"](/docs/plugins/plugin_server_datastore_sql.md)
1719

1820
- [Server plugin: SPIRECRDManager](/docs/plugins/plugin_server_spirecrd.md)
19-
2021
- [Tornjak Agent](/docs/tornjak-agent.md)
2122
- [Tornjak SPIRE Server Agent](/docs/tornjak-agent.md#tornjak-spire-server-agent)
2223
- [APIs](/docs/tornjak-agent.md#apis)

docs/helm/tornjak-helm-chart.md

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
# Deploying Tornjak via Helm Charts
2+
3+
## Overview
4+
5+
You can deploy **Tornjak** using the [SPIFFE helm-charts-hardened repository](https://github.com/spiffe/helm-charts-hardened).
6+
7+
This guide walks you through deploying both the frontend and backend of Tornjak with Direct Access, using Helm charts in a local Kubernetes environment via Minikube.
8+
9+
By the end, you’ll have a working instance of SPIRE integrated with Tornjak for easier visibility and management of your SPIFFE identities.
10+
11+
## Prerequisites
12+
13+
Make sure you have the following installed on your system:
14+
15+
- [Minikube](https://minikube.sigs.k8s.io/docs/start/?arch=%2Fmacos%2Fx86-64%2Fstable%2Fbinary+download)
16+
- [Helm](https://helm.sh/docs/intro/install/)
17+
18+
## Step-by-Step Deployment
19+
20+
### 1. Clone Repo
21+
22+
```sh
23+
git clone https://github.com/spiffe/tornjak.git
24+
cd tornjak
25+
cd docs/helm
26+
```
27+
28+
### 2. Start Minikube
29+
30+
```sh
31+
minikube start
32+
```
33+
34+
### 3. Deploy SPIRE
35+
36+
Now we can excute the following to deploy our SPIRE instance:
37+
38+
```sh
39+
helm upgrade --install -n spire-server spire-crds spire-crds --repo https://spiffe.github.io/helm-charts-hardened/ --create-namespace
40+
```
41+
42+
### 4. Deploy Tornjak
43+
44+
Now we can deploy Tornjak with SPIRE.
45+
46+
First, we need to export the Tornjak backend API URL:
47+
48+
```sh
49+
export TORNJAK_API=http://localhost:10000
50+
```
51+
52+
Then, run the following Helm command to deploy Tornjak with the frontend and backend enabled:
53+
54+
```sh
55+
helm upgrade --install -n spire-server spire spire \
56+
--repo https://spiffe.github.io/helm-charts-hardened/ \
57+
--set tornjak-frontend.apiServerURL=$TORNJAK_API \
58+
--values values.yaml \
59+
--render-subchart-notes
60+
```
61+
62+
### 5. Test Deployment
63+
64+
You can verify the deployment with:
65+
66+
```sh
67+
helm test spire -n spire-server
68+
```
69+
70+
### 6. Access Tornjak UI
71+
72+
Run the backend.
73+
74+
```sh
75+
kubectl -n spire-server port-forward service/spire-tornjak-backend 10000:10000
76+
```
77+
78+
In a separate terminal, run the frontend.
79+
80+
```sh
81+
kubectl -n spire-server port-forward service/spire-tornjak-frontend 3000:3000
82+
```
83+
84+
Open your browser and go to [http://localhost:3000](http://localhost:3000)
85+
You should now see the Tornjak UI!

docs/helm/values.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
spire-server:
2+
tornjak:
3+
enabled: true
4+
5+
tornjak-frontend:
6+
enabled: true
7+
service:
8+
type: ClusterIP
9+
port: 3000
10+
resources:
11+
requests:
12+
cpu: 50m
13+
memory: 128Mi
14+
limits:
15+
cpu: 100m
16+
memory: 512Mi

0 commit comments

Comments
 (0)