4 Commits

Author SHA1 Message Date
fd266ae24b Added README
Some checks failed
Build and deploy / Build container and manifests (push) Failing after 5m22s
2025-04-17 13:32:49 +02:00
e2475f15b8 Removed test file 2025-04-17 13:32:13 +02:00
184091c188 Changed name to Siranga 2025-04-17 13:31:33 +02:00
68df9af0da Only push on tags
All checks were successful
Build and deploy / Build container and manifests (push) Successful in 5m39s
2025-04-17 12:36:12 +02:00
8 changed files with 14 additions and 13 deletions

View File

@@ -71,16 +71,18 @@ jobs:
SOURCE_DATE_EPOCH: ${{ env.TIMESTAMP }}
- name: Kustomize manifests
if: gitea.ref_type == 'tag'
run: |
./kustomize build ./manifests | sed "s/\${DIGEST}/${{ steps.build.outputs.digest }}/" > ./manifests.yaml
- name: Push manifests
if: gitea.ref_type == 'tag'
run: |
flux push artifact oci://$OCI_REPO/manifests:${{ gitea.head_ref || gitea.ref_name }} \
flux push artifact oci://$OCI_REPO/manifests:latest \
--path="./manifests.yaml" \
--source="$(git config --get remote.origin.url)" \
--revision="$(git rev-parse HEAD)" \
$(echo "${{ steps.meta.outputs.labels }}" | sed -e 's/^/-a /')
flux tag artifact oci://$OCI_REPO/manifests:${{ gitea.head_ref || gitea.ref_name }} \
flux tag artifact oci://$OCI_REPO/manifests:latest \
$(echo "${{ steps.meta.outputs.tags }}" | sed -e 's/^.*:/--tag /')

View File

@@ -18,5 +18,5 @@ ENV RUSTC_BOOTSTRAP=1
RUN cargo auditable build --release
FROM gcr.io/distroless/cc-debian12:nonroot AS runtime
COPY --from=builder /app/target/release/siranga /siranga
CMD ["/siranga"]
COPY --from=builder /app/target/release/tunnel_rs /tunnel_rs
CMD ["/tunnel_rs"]

View File

@@ -40,7 +40,7 @@ By appending `-- --help` you can view the available command line options.
### Tip
To make connecting slightly easier I recommend adding the following to `~/.ssh/config`:
To make connecting slightly easier I recommend adding the following to `~/.ssh/config`.
```
Host tunnel

View File

@@ -17,8 +17,6 @@ spec:
annotations:
kubectl.kubernetes.io/default-container: siranga
spec:
# Service links cause issues with the HTTP_PORT and SSH_PORT env variables
enableServiceLinks: false
containers:
- name: siranga
image: git.huizinga.dev/dreaded_x/siranga@${DIGEST}

View File

@@ -10,6 +10,6 @@ spec:
kind: Rule
services:
- name: http
port: http
port: 3000
tls:
secretName: tunnel-tls

View File

@@ -4,7 +4,7 @@ namespace: siranga
resources:
- ./namespace.yaml
- ./service-user.yaml
- ./secret-siranga-key.yaml
- ./secret-tunnel-key.yaml
- ./deployment.yaml
- ./service.yaml
- ./certificate.yaml

View File

@@ -4,8 +4,9 @@ metadata:
name: http
spec:
ports:
- name: http
- name: "3000"
port: 3000
targetPort: 3000
selector:
app: siranga
---
@@ -18,7 +19,7 @@ metadata:
spec:
type: LoadBalancer
ports:
- name: ssh
- name: "2222"
port: 22
targetPort: 2222
selector:

View File

@@ -45,10 +45,10 @@ async fn main() -> color_eyre::Result<()> {
};
let http_port = std::env::var("HTTP_PORT")
.map(|port| port.parse().wrap_err_with(|| format!("HTTP_PORT={port}")))
.map(|port| port.parse())
.unwrap_or(Ok(3000))?;
let ssh_port = std::env::var("SSH_PORT")
.map(|port| port.parse().wrap_err_with(|| format!("SSH_PORT={port}")))
.map(|port| port.parse())
.unwrap_or(Ok(2222))?;
let domain =