Skip to content

Commit 2e87501

Browse files
committed
feat(k8s): adding k8s config as well as arm support for linux containers
1 parent 1e4521f commit 2e87501

File tree

3 files changed

+80
-3
lines changed

3 files changed

+80
-3
lines changed

.gitignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
void
2-
config.yaml
3-
config.json
4-
config.toml
52

63
dist/
74

.goreleaser.yaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,32 @@ dockers:
5050
- "--platform=linux/amd64"
5151
extra_files:
5252
- LICENSE
53+
- id: void-arm
54+
ids:
55+
- void
56+
goos: linux
57+
goarch: arm64
58+
dockerfile: deployment/docker/Dockerfile
59+
image_templates:
60+
- "ghcr.io/devnw/void:{{ .ShortCommit }}"
61+
- "ghcr.io/devnw/void:v{{ .Major }}"
62+
- "ghcr.io/devnw/void:{{ .Tag }}"
63+
- "ghcr.io/devnw/void:latest"
64+
build_flag_templates:
65+
- "--pull"
66+
- "--label=org.opencontainers.image.created={{.Date}}"
67+
- "--label=org.opencontainers.image.title=Void DNS Sink Hole"
68+
- "--label=org.opencontainers.image.description=Void is a DNS sink hole and local DNS resolver"
69+
- "--label=org.opencontainers.image.url=https://avoid.dev"
70+
71+
- "--label=org.opencontainers.image.source=https://github.com/devnw/void"
72+
- "--label=org.opencontainers.image.documentation=https://avoid.dev"
73+
- "--label=org.opencontainers.image.licenses=Apache 2.0"
74+
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
75+
- "--label=org.opencontainers.image.version={{.Version}}"
76+
- "--platform=linux/arm64"
77+
extra_files:
78+
- LICENSE
5379
release:
5480
prerelease: auto
5581

deployment/k8s/deploy.yaml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: void-deployment
5+
spec:
6+
replicas: 3
7+
selector:
8+
matchLabels:
9+
app: void
10+
template:
11+
metadata:
12+
labels:
13+
app: void
14+
spec:
15+
containers:
16+
- name: void-container
17+
image: ghcr.io/devnw/void:v0.0.1-beta2
18+
ports:
19+
- containerPort: 53
20+
resources:
21+
limits:
22+
cpu: 500m
23+
requests:
24+
cpu: 250m
25+
26+
---
27+
28+
apiVersion: v1
29+
kind: Service
30+
metadata:
31+
name: void-loadbalancer
32+
spec:
33+
selector:
34+
app: void
35+
ports:
36+
- protocol: TCP
37+
port: 53
38+
targetPort: 53
39+
type: LoadBalancer
40+
41+
---
42+
43+
apiVersion: autoscaling/v1
44+
kind: HorizontalPodAutoscaler
45+
metadata:
46+
name: void-autoscaler
47+
spec:
48+
scaleTargetRef:
49+
apiVersion: apps/v1
50+
kind: Deployment
51+
name: void-deployment
52+
minReplicas: 3
53+
maxReplicas: 10
54+
targetCPUUtilizationPercentage: 80

0 commit comments

Comments
 (0)