Skip to content

Commit

Permalink
Merge pull request #22 from uselagoon/improve-readme-ci
Browse files Browse the repository at this point in the history
Improve README and add coverage to CI
  • Loading branch information
smlx authored Feb 17, 2022
2 parents 30af497 + 5afbd57 commit 45ab104
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/coverage.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Coverage
on:
push:
branches:
- main

jobs:
coverage:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Configure git
run: |
git config --global user.name "$GITHUB_ACTOR"
git config --global user.email "$GITHUB_ACTOR@users.noreply.github.com"
- name: Set up go
uses: actions/setup-go@v2
with:
go-version: "^1.16"
- name: Install Dependencies
run: sudo apt-get update && sudo apt-get -u install libpcsclite-dev
- name: Calculate coverage
run: |
go test -v -covermode=count -coverprofile=coverage.out.raw -coverpkg=./... ./...
grep -v mock_ coverage.out.raw > coverage.out
- name: Convert coverage to lcov
uses: jandelgado/gcov2lcov-action@v1.0.8
- name: Coveralls
uses: coverallsapp/github-action@1.1.3
with:
github-token: ${{ secrets.github_token }}
path-to-lcov: coverage.lcov
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,29 @@
# Lagoon SSH Portal

[![Release](https://github.com/uselagoon/lagoon-ssh-portal/actions/workflows/release.yaml/badge.svg)](https://github.com/uselagoon/lagoon-ssh-portal/actions/workflows/release.yaml)
[![Coverage](https://coveralls.io/repos/github/uselagoon/lagoon-ssh-portal/badge.svg?branch=main)](https://coveralls.io/github/uselagoon/lagoon-ssh-portal?branch=main)
[![Go Report Card](https://goreportcard.com/badge/github.com/uselagoon/lagoon-ssh-portal)](https://goreportcard.com/report/github.com/uselagoon/lagoon-ssh-portal)

This is an experimental cluster-local SSH service for [Lagoon](https://github.com/uselagoon/lagoon).

## Architecture

This git repository comprises two services: `service-api`, and `ssh-portal`.
These two services communicate over a backend messaging system.
Currently the message system used is [NATS](https://nats.io/).

### Service API

`service-api` is part of Lagoon Core, and serves requests from other Lagoon components such as the SSH portal, which may be in a remote cluster.

`service-api` is explicitly _not_ a public API and makes no guarantees about compatiblity.
It is _only_ designed to cater to the requirements of other internal Lagoon services.

### SSH Portal

`ssh-portal` is part of Lagoon Remote, and implements an SSH server which connects incoming SSH sessions with pods running in the cluster.
To perform authentication it communicates back to `service-api` running in Lagoon Core, which responds with a true/false if the SSH key is valid for the requested Lagoon environment.

`ssh-portal` implements shell access with service and container selection [as described in the Lagoon documentation](https://docs.lagoon.sh/using-lagoon-advanced/ssh/#ssh-into-a-pod), but it does not implement token generation.

Unlike the existing Lagoon SSH service, `ssh-portal` _only_ provides access to Lagoon environments running in the local cluster.

0 comments on commit 45ab104

Please sign in to comment.