-
-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add Kubernetes Manifests #5
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
FROM golang:alpine AS build | ||
RUN apk add --update git gcc musl-dev libpcap-dev openssh-client | ||
|
||
WORKDIR /app | ||
COPY . . | ||
RUN go mod init nexclipper/goul | ||
RUN go mod tidy | ||
RUN go build -o goul | ||
|
||
FROM alpine | ||
LABEL version=0.1.0 | ||
RUN apk add --update --no-cache libpcap-dev | ||
COPY --from=build /app/goul /usr/bin/goul | ||
CMD [ "goul", "--help" ] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
version: '3' | ||
services: | ||
goul-server: | ||
image: nexclipper/goul:0.2-head | ||
restart: always | ||
privileged: true | ||
environment: | ||
- GOUL_DEVICE="eth0" | ||
ports: | ||
- "6001:6001" | ||
command: | ||
- goul | ||
- --server | ||
- --debug | ||
- --dev=eth0 | ||
|
||
goul-client: | ||
image: nexclipper/goul:0.2-head | ||
depends_on: | ||
- goul-server | ||
links: | ||
- goul-server | ||
environment: | ||
- GOUL_SERVER_ADDRESS="goul-server" | ||
- GOUL_DEVICE="eth0" | ||
command: | ||
- goul | ||
- --addr=goul-server | ||
- --dev=eth0 | ||
- --debug |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: goul-client | ||
namespace: nc | ||
labels: | ||
app: goul-client | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: goul-client | ||
template: | ||
metadata: | ||
labels: | ||
app: goul-client | ||
spec: | ||
# nodeSelector: | ||
# key: client | ||
hostNetwork: true | ||
containers: | ||
- name: goul-client | ||
image: nexclipper/goul:0.2-head | ||
ports: | ||
- containerPort: 6001 | ||
env: | ||
- name: GOUL_PORT | ||
value: "6001" | ||
- name: GOUL_DEVICE | ||
value: "ens6f0" | ||
- name: GOUL_SERVER_ADDRESS | ||
value: "172.16.9.126" | ||
command: ["goul"] | ||
args: ["--addr=$(GOUL_SERVER_ADDRESS)", "--debug", "--dev=$(GOUL_DEVICE)", "--port=$(GOUL_PORT)"] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The client container runs with no |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: goul-server | ||
namespace: nc | ||
labels: | ||
app: goul-server | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: goul-server | ||
template: | ||
metadata: | ||
labels: | ||
app: goul-server | ||
spec: | ||
# nodeSelector: | ||
# key: server | ||
hostNetwork: true | ||
containers: | ||
- name: goul-server | ||
image: nexclipper/goul:0.2-head | ||
ports: | ||
- containerPort: 6001 | ||
env: | ||
- name: GOUL_DEVICE | ||
value: "ens6f0" | ||
command: ["goul"] | ||
args: ["--server", "--debug", "--dev=$(GOUL_DEVICE)"] |
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.
I just committed go.mod and go.sum (to make it compatible with recent go) so this line can make an error. Could you please remove this line?