Skip to content

Commit

Permalink
Add initial port of shutdown await from bash to Go
Browse files Browse the repository at this point in the history
  • Loading branch information
dghubble committed Nov 3, 2022
0 parents commit d387652
Show file tree
Hide file tree
Showing 15 changed files with 1,623 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
- package-ecosystem: docker
directory: "/"
schedule:
interval: daily
pull-request-branch-name:
separator: "-"
open-pull-requests-limit: 1
- package-ecosystem: gomod
directory: "/"
schedule:
interval: daily
pull-request-branch-name:
separator: "-"
open-pull-requests-limit: 2
ignore:
- dependency-name: "k8s.io/api"
- dependency-name: "k8s.io/apimachinery"
25 changes: 25 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: test
on:
push:
branches:
- main
pull_request:
jobs:
build:
name: go
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
go: ['1.18', '1.19']
steps:
- name: setup
uses: actions/setup-go@v3
with:
go-version: ${{matrix.go}}

- name: checkout
uses: actions/checkout@v3

- name: test
run: make
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
bin/
13 changes: 13 additions & 0 deletions .golangci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
linters:
enable:
- goheader
linters-settings:
goheader:
template: |-
Copyright (C) {{year}} Poseidon Labs
Copyright (C) {{year}} Dalton Hubble
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at https://mozilla.org/MPL/2.0/.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# scuttle

Notable changes between versions.

## Latest

## v0.1.0

* Initial port from bash script to Go
* Make uncordon, drain, and delete optional
* Poll AWS spot instance termination notices
* Drop requirement that `kubectl` be present
9 changes: 9 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM docker.io/golang:1.19.3 AS builder
COPY . src
RUN cd src && make build

FROM docker.io/alpine:3.16.2
LABEL maintainer="Dalton Hubble <dghubble@gmail.com>"
RUN apk --no-cache --update add ca-certificates
COPY --from=builder /go/src/bin/scuttle /usr/local/bin
ENTRYPOINT ["/usr/local/bin/scuttle"]
Loading

0 comments on commit d387652

Please sign in to comment.