Skip to content

Commit 6fe8b1c

Browse files
committed
Prepare publishing-bot to be migrate over aaa GKE Cluster.
Most of those changes are suggestions coming from https://github.com/kubernetes/k8s.io/pull/520/files. Signed-off-by: Arnaud Meukam <[email protected]>
1 parent c810f7e commit 6fe8b1c

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

Makefile

+4-2
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,14 @@ TOKEN ?=
2424
KUBECTL ?= kubectl
2525
SCHEDULE ?= 0 5 * * *
2626
INTERVAL ?= 86400
27+
CPU_LIMITS ?= 2
28+
CPU_REQUESTS ?= 300m
2729
MEMORY_REQUESTS ?= 200Mi
2830
MEMORY_LIMITS ?= 1.6Gi
2931
GOOS ?= linux
3032

3133
build_cmd = GO111MODULE=on mkdir -p _output && GOOS=$(GOOS) go build -o _output/$(1) ./cmd/$(1)
32-
prepare_spec = sed 's,DOCKER_IMAGE,$(DOCKER_REPO),g;s,MEMORY_REQUESTS,$(MEMORY_REQUESTS),g;s,MEMORY_LIMITS,$(MEMORY_LIMITS),g'
34+
prepare_spec = sed 's,DOCKER_IMAGE,$(DOCKER_REPO),g;s,CPU_LIMITS,$(CPU_LIMITS),g;s,CPU_REQUESTS,$(CPU_REQUESTS),g;s,MEMORY_REQUESTS,$(MEMORY_REQUESTS),g;s,MEMORY_LIMITS,$(MEMORY_LIMITS),g'
3335

3436
SHELL := /bin/bash
3537

@@ -54,7 +56,7 @@ clean:
5456
.PHONY: clean
5557

5658
update-deps:
57-
glide update --strip-vendor
59+
go mod tidy
5860
.PHONY: update-deps
5961

6062
validate:

artifacts/manifests/podspec.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ containers:
3838
imagePullPolicy: Always
3939
resources:
4040
requests:
41-
cpu: 300m
41+
cpu: CPU_REQUESTS
4242
memory: MEMORY_REQUESTS
4343
limits:
44-
cpu: 2
44+
cpu: CPU_LIMITS
4545
memory: MEMORY_LIMITS
4646
volumeMounts:
4747
- mountPath: /etc/munge-config

configs/kubernetes

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
DOCKER_REPO = gcr.io/k8s-staging-publishing-bot/k8s-publishing-bot
2-
NAMESPACE = k8s-publishing-bot
2+
NAMESPACE = publishing-bot
33
SCHEDULE = * */4 * * *
44
INTERVAL = 14400
5+
CPU_LIMITS = 2
6+
CPU_REQUESTS = 300m
57
MEMORY_REQUESTS = 2Gi
6-
MEMORY_LIMITS = 3Gi
8+
MEMORY_LIMITS = 2Gi

0 commit comments

Comments
 (0)