Skip to content

Commit ee8729a

Browse files
authored
Release version v1.8 (#500)
2 parents 8cb2177 + 4300db3 commit ee8729a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+3083
-905
lines changed

.github/workflows/ci.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,16 @@ jobs:
1515
EOF
1616
1717
- name: Check out repository code
18-
uses: actions/checkout@v4.1.6
18+
uses: actions/checkout@v4.1.7
1919

2020
- name: Install Golang
21-
uses: actions/setup-go@v5.0.1
21+
uses: actions/setup-go@v5.0.2
2222
with:
2323
go-version-file: go.mod
2424
check-latest: true
2525
cache: true
2626

27-
- uses: actions/setup-node@v4.0.2
27+
- uses: actions/setup-node@v4.0.3
2828
with:
2929
node-version: '18'
3030

@@ -39,7 +39,7 @@ jobs:
3939
run: go mod download
4040

4141
- name: golangci-lint
42-
uses: golangci/golangci-lint-action@v6.0.1
42+
uses: golangci/golangci-lint-action@v6.1.0
4343
with:
4444
version: v1.57.2
4545
args: --timeout 7m

.github/workflows/master-build.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ jobs:
1919
EOF
2020
2121
- name: Check out repository code
22-
uses: actions/checkout@v4.1.6
22+
uses: actions/checkout@v4.1.7
2323

2424
- name: Log in to GHCR.io
25-
uses: docker/login-action@v3.2.0
25+
uses: docker/login-action@v3.3.0
2626
with:
2727
registry: ghcr.io
2828
username: ${{ github.repository_owner }}
@@ -60,9 +60,9 @@ jobs:
6060
EOF
6161
6262
- name: Check out repository code
63-
uses: actions/checkout@v4.1.6
63+
uses: actions/checkout@v4.1.7
6464
- name: Log in to GHCR.io
65-
uses: docker/login-action@v3.2.0
65+
uses: docker/login-action@v3.3.0
6666
with:
6767
registry: ghcr.io
6868
username: ${{ github.repository_owner }}

CONTRIBUTING.md

Lines changed: 43 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,12 @@
99

1010
## Contributor Guidelines and Governance
1111

12-
Please see [CONTRIBUTING](https://github.com/spiffe/spiffe/blob/main/CONTRIBUTING.md) and [GOVERNANCE](https://github.com/spiffe/spiffe/blob/main/GOVERNANCE.md) from the SPIFFE project.
12+
Please see [CONTRIBUTING](https://github.com/spiffe/spiffe/blob/main/CONTRIBUTING.md) and [GOVERNANCE](https://github.com/spiffe/spiffe/blob/main/GOVERNANCE.md) from the SPIFFE project for community guidelines.
13+
14+
> [!IMPORTANT]
15+
> Before opening a new issue, search for any existing issues [here](https://github.com/spiffe/tornjak/issues) to avoid duplication.
16+
17+
If you're new to this project, we recommend you join us on [Slack](https://spiffe.slack.com/archives/C024JTTK58T) for discussion of potential new features.
1318

1419
## Pre-built images
1520

@@ -26,20 +31,54 @@ In order to build, we require the following installations:
2631

2732
## Building Executables and Images
2833

29-
Building Tornjak manually can be done with the Makefile. Notable make targets follow:
34+
Building Tornjak manually can be done with the Makefile. Below is a list of local executable builds:
3035
- `make bin/tornjak-backend`: makes the Go executable of the Tornjak backend
3136
- `make bin/tornjak-manager`: makes the Go executable of the Tornjak manager
3237
- `make frontend-local-build`: makes the optimized ReactJS app locally for the Tornjak frontend. Uses environment variable configuration as in tornjak-frontend/.env
38+
39+
And below is a list of container image builds:
3340
- `make image-tornjak-backend`: containerizes Go executable of the Tornjak backend
3441
- `make image-tornjak-manager`:containerizes Go executable of the Tornjak manager
3542
- `make image-tornjak-frontend`: containerizes React JS app for the Tornjak frontend
36-
- `make image-tornjak`: containerizes Tornjak backend with Tornjak frontend
3743

3844
For usage instructions of the containers, please see our [USAGE document](./USAGE.md) to get started.
3945

4046
## Development
4147

42-
We welcome all development attempst and contributions from the community. The easiest place to start is by reviewing our code architecture diagrams available in our [api documentation](./docs/tornjak-ui-api-documentation.md#11-overview).
48+
We welcome all development attempts and contributions from the community. The easiest place to start is by reviewing our code architecture diagrams available in our [api documentation](./docs/tornjak-ui-api-documentation.md#11-overview).
49+
50+
## Opening a pull request
51+
52+
1. Fork the tornjak repo
53+
2. Ensure your branch is based on the latest commit in `dev`
54+
3. Commit changes to your fork. Make sure your commit messages contain a `Signed-off-by: <your-email-address>` line (see `git-commit --signoff`) to certify the [DCO](/DCO)
55+
4. Test your PR locally and ensure all tests in Github actions pass
56+
5. Open a [pull request](https://help.github.com/articles/creating-a-pull-request-from-a-fork/)
57+
against the upstream `dev` branch
58+
59+
> [!IMPORTANT]
60+
> Please make sure you open all PRs against the `dev` branch
61+
62+
> [!IMPORTANT]
63+
> For any new feature design, or feature level changes, please create an issue first, then submit a PR with design details before code implementation.
64+
65+
## After your pull request is submitted
66+
67+
At least one maintainer must approve the pull request.
68+
69+
Once your pull request is submitted, it's your responsibility to:
70+
71+
* Respond to reviewer's feedback
72+
* Keep it merge-ready at all times until it has been approved and actually merged
73+
74+
Following approval, the pull request will be merged by the last maintainer to approve the request.
75+
76+
#### Third-party code
77+
78+
When third-party code must be included, all licenses must be preserved. This includes modified
79+
third-party code and excerpts, as well.
80+
81+
Thank you for contributing to Tornjak!
4382

4483
## Local testing
4584

Dockerfile.backend-container

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ RUN if [ "$TARGETARCH" = "arm64" ]; then CC=aarch64-alpine-linux-musl; fi && \
1818
go build --tags 'sqlite_json' -mod=vendor -ldflags '-s -w -linkmode external -extldflags "-static"' -o bin/tornjak-backend ./cmd/agent/main.go
1919

2020
FROM alpine AS runtime
21-
RUN mkdir -p /opt/spire
21+
RUN mkdir -p /opt/tornjak
2222

23-
WORKDIR /opt/spire
24-
ENTRYPOINT ["/opt/spire/run_backend.sh"]
23+
WORKDIR /opt/tornjak
24+
ENTRYPOINT ["/opt/tornjak/run_backend.sh"]
2525

2626
# Add init
2727
COPY scripts/run_backend.sh run_backend.sh

Dockerfile.backend-container.ubi

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ RUN if [ "$TARGETARCH" = "arm64" ]; then CC=aarch64-alpine-linux-musl; fi && \
1818
go build --tags 'sqlite_json' -mod=vendor -ldflags '-s -w -linkmode external -extldflags "-static"' -o bin/tornjak-backend ./cmd/agent/main.go
1919

2020
FROM registry.access.redhat.com/ubi8-micro:latest AS runtime
21-
RUN mkdir -p /opt/spire
21+
RUN mkdir -p /opt/tornjak
2222

23-
WORKDIR /opt/spire
24-
ENTRYPOINT ["/opt/spire/run_backend.sh"]
23+
WORKDIR /opt/tornjak
24+
ENTRYPOINT ["/opt/tornjak/run_backend.sh"]
2525

2626
# Add init
2727
COPY scripts/run_backend.sh run_backend.sh

USAGE.md

Lines changed: 11 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# Usage
22

3-
We publish four container images currently:
3+
We publish and support three container images currently:
44
- [Tornjak Backend](https://github.com/spiffe/tornjak/pkgs/container/tornjak-backend): This image can be deployed as a sidecar with any SPIRE server.
55
- [Tornjak Manager](https://github.com/spiffe/tornjak/pkgs/container/tornjak-manager): A container that runs this image exposes a port to register multiple Tornjak backends and forward typical commands to multiple Tornjak backends from one API.
66
- [Tornjak Frontend](https://github.com/spiffe/tornjak/pkgs/container/tornjak-frontend): This image is typically deployed after the Tornjak Backend or Manager are deployed, as it requires a URL to connect directly to the Tornjak backend API.
7-
- [Tornjak](https://github.com/spiffe/tornjak/pkgs/container/tornjak): This image containing both Tornjak Backend and Frontend components can deployed as a sidecar alongside a SPIRE Server container
87

9-
NOTE: Previously, we had images placing the Tornjak backend and SPIRE server in the same container, but these are currently deprecated. The above is a comprehensive list of images
8+
> [!NOTE]
9+
> Previously, we had images placing the Tornjak backend and SPIRE server in the same container, but these are currently deprecated. The above is a comprehensive list of supported images
1010
11-
Pre-built images can be found at the above links. To decide which tag to use, typically choose a release from [this page](https://github.com/spiffe/tornjak/releases) and choose the corresponding tag. For example, if you are interested in release `tornjak-1.0.2`, then choose image tag `v1.0.2`.
11+
Pre-built images can be found at the above links. To decide which tag to use, typically choose a release from [this page](https://github.com/spiffe/tornjak/releases) and choose the corresponding tag. For example, if you are interested in release `v1.7.0`, then choose image tag `v1.7.0`.
1212

1313
### Compatibility Table
1414

@@ -17,11 +17,11 @@ Please see below for compatibility charts of SPIRE server versions with Tornjak:
1717
| Tornjak version | SPIRE Server version |
1818
| :--------------------- | :------------------- |
1919
| v1.1.x, v1.2.x, v1.3.x | v1.1.x, v1.2.x, v1.3.x, v1.4.x |
20-
| v1.4.x, v1.5.x, v1.6.x | v1.5.x, v1.6.x, v1.7.x, v1.8.x, v1.9.x|
20+
| v1.4.x, v1.5.x, v1.6.x, v1.7.x | v1.5.x, v1.6.x, v1.7.x, v1.8.x, v1.9.x|
2121

22-
## Tornjak Backend
22+
## [Tornjak Backend](https://github.com/spiffe/tornjak/pkgs/container/tornjak-backend)
2323

24-
This is meant to be deployed where it can access a SPIRE server. To run, the container has three arguments:
24+
The backend is designed to be deployed where it can access a SPIRE server. To run, the container has three arguments:
2525

2626
| Flag | Description | Default | Arguments | Required |
2727
|:-----------------------|:------------------------------------------------------------|:--------|:----------|:---------|
@@ -49,7 +49,9 @@ This creates a service listening on container port 50000, forwarded to localhost
4949

5050
## Tornjak Frontend
5151

52-
The frontend is meant to connect to either the Tornjak backend or the Tornjak manager. To run the container, we must set some environment variables:
52+
The Tornjak frontend container exposes a browser application and must be able to connect to either the Tornjak backend or the Tornjak manager.
53+
54+
The container requires certain environment variables be set. Below is a comprehensive list of all environment variables:
5355

5456
| Variable | Description | Default | Example Argument | Required |
5557
|:----------------------------|-------------|--|--|--|
@@ -64,26 +66,11 @@ The frontend is meant to connect to either the Tornjak backend or the Tornjak ma
6466
| `REACT_APP_SPIRE_HEALTH_CHECK_ENABLE` | Enable SPIRE health check component | `false` | `true` | false |
6567

6668
```
67-
docker run -p 3000:8080 -e REACT_APP_API_SERVER_URI='http://localhost:50000' -e REACT_APP_TORNJAK_MANAGER=true -e PORT_FE-8080 -e REACT_APP_SPIRE_HEALTH_CHECK=true ghcr.io/spiffe/tornjak-frontend:latest
69+
docker run -p 3000:8080 -e REACT_APP_API_SERVER_URI='http://localhost:50000' -e REACT_APP_TORNJAK_MANAGER=true -e PORT_FE=8080 -e REACT_APP_SPIRE_HEALTH_CHECK=true ghcr.io/spiffe/tornjak-frontend:latest
6870
```
6971

7072
The above command is an example of how to run the frontend. This creates a UI available at http://localhost:3000 forwarded from container port `8080`. It is listening to a Tornjak manager component available at http://localhost:50000, and knows to run in manager mode with the `REACT_APP_TORNJAK_MANAGER` flag. The last environment variables namely, `REACT_APP_SPIRE_HEALTH_CHECK_ENABLE` is used to enable the SPIRE health check component.
7173

72-
## Tornjak
73-
74-
This container may be used as an alternative to having a frontend and backend container separately. The backend is configured exactly as the [Tornjak backend] with container arguments, and the frontend is configured exactly as the [Tornjak frontend] with container environment variables.
75-
76-
An example command:
77-
78-
```
79-
docker run -p 10000:10000 -p 3000:8080 -e REACT_APP_API_SERVER_URI='http://localhost:10000' -e PORT_FE-8080 -e PORT_BE-10000 ghcr.io/spiffe/tornjak:latest --spire-config <SPIRE CONFIG PATH> --tornjak-config <TORNJAK CONFIG PATH>
80-
```
81-
82-
The above command creates a UI available at `http://localhost:3000` forwarded from container port `8080`. It is listening to the Tornjak backend at `http://localhost:10000`, as given by the `REACT_APP_API_SERVER_URI` value. At the same time, the container is exposing port `10000` for the backend, which reads the SPIRE config and Tornjak config at `<SPIRE CONFIG PATH>` and `<TORNJAK CONFIG PATH>` respectively.
83-
84-
NOTE: The value of `REACT_APP_API_SERVER_URI` must be a URI that is separately available to any browser that accesses the frontend. Therefore, in production environments, it is necessary that backend service endpoint be public.
85-
86-
8774
## Further steps
8875

8976
It is recommended to try a full deployment of the Tornjak frontend, backend, and SPIRE Server in minikube. Please see our [tutorial document](docs/quickstart/README.md) for step-by-step instructions.

0 commit comments

Comments
 (0)