-
Notifications
You must be signed in to change notification settings - Fork 140
Update trustee to support nebula VPN feature #814
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
portersrc
wants to merge
7
commits into
confidential-containers:main
Choose a base branch
from
portersrc:feature/encrypted-mesh
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
22ab57a
Use nebula-ca plugin by default for kbs' docker-compose setup
portersrc 574278c
Add lighthouse to kbs k8s deployment
portersrc d3834ab
Dockerfile for building a lighthouse container image
portersrc b71901d
Add a couple assets to the lighthouse image
portersrc 110afb9
Add a k8s deploy yaml for the lighthouse
portersrc b932422
Build kbs images with nebula plugin by default
portersrc bdcd2e4
Add ENTRYPOINT to lighthouse Dockerfile
portersrc File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| apiVersion: v1 | ||
| kind: Deployment | ||
| metadata: | ||
| name: lighthouse | ||
| spec: | ||
| containers: | ||
| - name: lighthouse | ||
| image: lighthouse-container-image | ||
| command: | ||
| - "bin/sh" | ||
| - "-c" | ||
| - "while (true); do sleep 10000; done" | ||
| securityContext: | ||
| privileged: true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| apiVersion: kustomize.config.k8s.io/v1beta1 | ||
| kind: Kustomization | ||
| namespace: coco-tenant | ||
|
|
||
| images: | ||
| - name: lighthouse | ||
| newName: ghcr.io/portersrc/lighthouse | ||
| newTag: latest | ||
|
|
||
| resources: | ||
| - deployment.yaml | ||
| - service.yaml | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| # Service to expose the lighthouse | ||
| apiVersion: v1 | ||
| kind: Service | ||
| metadata: | ||
| name: lighthouse | ||
| spec: | ||
| selector: | ||
| app: lighthouse | ||
| ports: | ||
| - protocol: UDP | ||
| port: 4242 | ||
| targetPort: 4242 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,6 +4,7 @@ namespace: coco-tenant | |
|
|
||
| resources: | ||
| - ../base | ||
| - ../lighthouse | ||
|
|
||
| patches: | ||
| - path: patch.yaml | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| # Create an image with kbs-client | ||
| # Based on kbs/docker/kbs-client-image/Dockerfile | ||
| FROM docker.io/library/rust:1.80.0 AS builder | ||
|
|
||
| WORKDIR /usr/src/kbs | ||
| COPY . . | ||
|
|
||
| RUN apt-get update && apt-get install -y pkg-config libssl-dev git sudo | ||
| RUN cd kbs && make cli-static-linux && \ | ||
| cp ../target/$(uname -m)-unknown-linux-gnu/release/kbs-client / | ||
|
|
||
|
|
||
| # Create a 2nd image. The other will be discarded. | ||
| # Copy in the kbs-client that we just built, add some utilities and nebula | ||
| FROM ubuntu:22.04 | ||
| COPY --from=builder /kbs-client /usr/local/bin/kbs-client | ||
|
|
||
| ARG BUILDPLATFORM=linux/amd64 | ||
| ARG NEBULA_VERSION=v1.9.5 | ||
|
|
||
| # Install some useful tools | ||
| RUN apt-get update | ||
| RUN apt install -y \ | ||
| curl \ | ||
| jq \ | ||
| iputils-ping \ | ||
| iproute2 | ||
| RUN echo no | apt-get install -y iperf3 | ||
|
|
||
| # Download and install Nebula | ||
| RUN \ | ||
| curl -fSLO https://github.com/slackhq/nebula/releases/download/${NEBULA_VERSION}/nebula-$(echo ${BUILDPLATFORM} | sed 's/\//-/').tar.gz && \ | ||
| tar -C /usr/local/bin -xzf nebula-$(echo "${BUILDPLATFORM}" | sed 's/\//-/').tar.gz | ||
portersrc marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| RUN mkdir -p /opt/nebula/config | ||
| RUN mkdir -p /opt/nebula/creds | ||
| COPY kbs/docker/lighthouse/assets/lighthouse-config.yaml /opt/nebula/config | ||
| COPY kbs/docker/lighthouse/assets/start-lighthouse.sh /usr/local/bin | ||
|
|
||
| # Start the lighthouse on container start-up | ||
| ENTRYPOINT ["/usr/local/bin/start-lighthouse.sh"] | ||
|
|
||
| # Default values of kbs_url and lighthouse_vpn_ip for start-lighthouse script | ||
| CMD ["127.0.0.1", "192.168.100.100"] | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need a hand from coco devs if we go this route