Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@ FROM golang:1.17 as builder
WORKDIR /workspace
COPY . .
RUN go mod download
RUN CGO_ENABLE=0 go build -ldflags "-w -s" -o atest cmd/*.go

FROM ghcr.io/linuxsuren/hd:v0.0.67 as hd
RUN CGO_ENABLE=0 go build -ldflags "-w -s" -o atest .

FROM alpine:3.10

Expand Down
46 changes: 46 additions & 0 deletions sample/manifest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
creationTimestamp: null
labels:
app: api-testing
name: api-testing
spec:
replicas: 1
selector:
matchLabels:
app: api-testing
strategy: {}
template:
metadata:
creationTimestamp: null
labels:
app: api-testing
spec:
containers:
- image: ghcr.io/linuxsuren/api-testing
name: server
resources:
limits:
cpu: "1"
memory: 1Gi
requests:
cpu: "100m"
memory: 100m
status: {}
---
apiVersion: v1
kind: Service
metadata:
name: api-testing
spec:
ports:
- name: server
port: 9090
protocol: TCP
targetPort: 9090
selector:
app: api-testing
sessionAffinity: None
type: NodePort