forked from kubernetes/test-infra
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
boskos: Deploying a new Boskos janitor for AWS
This patch deploys a new Boskos janitor as a service in the same cluster running Prow. The new service is named `boskos-janitor-aws`. Related to kubernetes-sigs/cluster-api-provider-aws#272 and kubernetes-sigs/cluster-api-provider-aws#606. /area boskos
- Loading branch information
Showing
5 changed files
with
98 additions
and
2 deletions.
There are no files selected for viewing
This file contains 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 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 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 @@ | ||
/aws-janitor-boskos |
This file contains 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,25 @@ | ||
# Copyright 2019 The Kubernetes Authors. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
FROM debian:stretch-20190204-slim | ||
|
||
RUN apt-get -y update && \ | ||
apt-get -y install ca-certificates && \ | ||
update-ca-certificates && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
COPY aws-janitor-boskos /usr/local/bin/ | ||
|
||
CMD ["aws-janitor-boskos"] | ||
ENTRYPOINT ["/bin/bash", "-c"] |
This file contains 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,41 @@ | ||
# Copyright 2019 The Kubernetes Authors. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
PROGRAM ?= aws-janitor-boskos | ||
HUB ?= gcr.io/k8s-testimages | ||
IMAGE ?= $(HUB)/$(notdir $(PROGRAM)) | ||
TAG ?= $(shell date +v%Y%m%d)-$(shell git describe --tags --always --dirty) | ||
|
||
GOOS ?= $(shell go env GOOS) | ||
GOARCH ?= $(shell go env GOARCH) | ||
|
||
build: $(PROGRAM) | ||
$(PROGRAM): | ||
CGO_ENABLED=0 GOOS=$(GOOS) GOARCH=$(GOARCH) go build -o "$@" | ||
|
||
image: | ||
GOOS=linux GOARCH=amd64 $(MAKE) --always-make build | ||
docker build $(DOCKER_OPTS) -t "$(IMAGE):$(TAG)" . | ||
|
||
push: image | ||
docker push "$(IMAGE):$(TAG)" | ||
|
||
push-latest: push | ||
docker tag "$(IMAGE):$(TAG)" "$(IMAGE):latest" | ||
docker push "$(IMAGE):latest" | ||
|
||
clean: | ||
rm -f $(PROGRAM) | ||
|
||
.PHONY: clean image push push-latest |