This repository has been archived by the owner on Oct 6, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #27 from everpeace/scheduler-plugin/main
Re-implement the whole codebase as scheduler-plugin
- Loading branch information
Showing
132 changed files
with
8,834 additions
and
8,278 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name-template: 'v$NEXT_PATCH_VERSION' | ||
tag-template: 'v$NEXT_PATCH_VERSION' | ||
categories: | ||
- title: '💣 Breaking Changes' | ||
label: 'release-note/breaking-change' | ||
- title: '🚀 Features' | ||
label: 'release-note/feature' | ||
- title: '🐛 Bug Fixes' | ||
label: 'release-note/bugfix' | ||
- title: '📜 Documentation' | ||
label: 'release-note/document' | ||
- title: '🧰 Maintenance' | ||
label: 'release-note/chore' | ||
exclude-labels: | ||
- 'release-note/skip' | ||
template: | | ||
## What’s Changed from $PREVIOUS_TAG | ||
$CHANGES | ||
Thanks to $CONTRIBUTORS |
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,71 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
tags-ignore: [ "**" ] | ||
paths-ignore: [ "**.md" ] | ||
pull_request: | ||
types: [opened, synchronize] | ||
paths-ignore: [ "**.md" ] | ||
|
||
jobs: | ||
|
||
test: | ||
name: Test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up Go 1.x | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: ^1.16 | ||
id: go | ||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Get dependencies | ||
run: go mod download | ||
- name: Get Devtools | ||
run: make setup | ||
- name: Lint | ||
run : make lint | ||
- name: Build | ||
run: make | ||
- name: Test | ||
run: make test | ||
- name: Validate .goreleaser.yml | ||
uses: goreleaser/goreleaser-action@v2 | ||
with: | ||
version: latest | ||
args: release --snapshot --skip-publish --rm-dist --debug | ||
|
||
image_build: | ||
name: Image Build | ||
runs-on: ubuntu-latest | ||
env: | ||
DOCKER_BUILDKIT: 1 | ||
IMAGE_PREFIX: ghcr.io/${{ github.repository_owner }}/ | ||
steps: | ||
- name: Set up Go 1.x | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: ^1.16 | ||
id: go | ||
- name: Check out | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Get Devtools | ||
run: make setup | ||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v1 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Build Docker image | ||
run: make build-image | ||
- name: Push Docker image | ||
if: github.ref == 'refs/heads/master' && github.event_name == 'push' | ||
run: make push-image |
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,76 @@ | ||
name: Release | ||
on: | ||
push: | ||
tags: | ||
- "v[0-9]+.[0-9]+.[0-9]+" | ||
|
||
jobs: | ||
image_build: | ||
name: Release Docker Image | ||
runs-on: ubuntu-latest | ||
if: startsWith(github.ref, 'refs/tags/') | ||
env: | ||
RELEASE: "true" | ||
DOCKER_BUILDKIT: 1 | ||
IMAGE_PREFIX: ghcr.io/${{ github.repository_owner }}/ | ||
steps: | ||
- name: Set up Go 1.x | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: ^1.16 | ||
id: go | ||
- name: Check out | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Get Devtools | ||
run: make setup | ||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v1 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Build Docker image | ||
run: make build-image | ||
- name: Push Docker image | ||
run: make push-image | ||
|
||
goreleaser: | ||
name: Release Binaries | ||
runs-on: ubuntu-latest | ||
if: startsWith(github.ref, 'refs/tags/') | ||
env: | ||
RELEASE: "true" | ||
steps: | ||
- name: Set up Go 1.x | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: ^1.16 | ||
id: go | ||
- name: Check out | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Get Devtools | ||
run: make setup | ||
- name: Get dependencies | ||
run: go mod download | ||
- name: Run GoReleaser | ||
uses: goreleaser/goreleaser-action@v2 | ||
with: | ||
version: latest | ||
args: release --rm-dist | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
update_release_draft: | ||
name: Draft Release Note | ||
runs-on: ubuntu-latest | ||
if: startsWith(github.ref, 'refs/tags/') | ||
env: | ||
RELEASE: "true" | ||
steps: | ||
- uses: release-drafter/release-drafter@v5 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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 |
---|---|---|
@@ -1,99 +1,46 @@ | ||
native/** | ||
|
||
# Created by https://www.gitignore.io/api/sbt,scala,intellij+all | ||
|
||
### Intellij+all ### | ||
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm | ||
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 | ||
|
||
# User-specific stuff | ||
.idea/**/workspace.xml | ||
.idea/**/tasks.xml | ||
.idea/**/usage.statistics.xml | ||
.idea/**/dictionaries | ||
.idea/**/shelf | ||
|
||
# Sensitive or high-churn files | ||
.idea/**/dataSources/ | ||
.idea/**/dataSources.ids | ||
.idea/**/dataSources.local.xml | ||
.idea/**/sqlDataSources.xml | ||
.idea/**/dynamic.xml | ||
.idea/**/uiDesigner.xml | ||
.idea/**/dbnavigator.xml | ||
|
||
# Gradle | ||
.idea/**/gradle.xml | ||
.idea/**/libraries | ||
|
||
# Gradle and Maven with auto-import | ||
# When using Gradle or Maven with auto-import, you should exclude module files, | ||
# since they will be recreated, and may cause churn. Uncomment if using | ||
# auto-import. | ||
# .idea/modules.xml | ||
# .idea/*.iml | ||
# .idea/modules | ||
|
||
# CMake | ||
cmake-build-*/ | ||
|
||
# Mongo Explorer plugin | ||
.idea/**/mongoSettings.xml | ||
|
||
# File-based project format | ||
*.iws | ||
|
||
# IntelliJ | ||
out/ | ||
|
||
# mpeltonen/sbt-idea plugin | ||
.idea_modules/ | ||
|
||
# JIRA plugin | ||
atlassian-ide-plugin.xml | ||
|
||
# Cursive Clojure plugin | ||
.idea/replstate.xml | ||
|
||
# Crashlytics plugin (for Android Studio and IntelliJ) | ||
com_crashlytics_export_strings.xml | ||
crashlytics.properties | ||
crashlytics-build.properties | ||
fabric.properties | ||
|
||
# Editor-based Rest Client | ||
.idea/httpRequests | ||
|
||
### Intellij+all Patch ### | ||
# Ignores the whole .idea folder and all .iml files | ||
# See https://github.com/joeblau/gitignore.io/issues/186 and https://github.com/joeblau/gitignore.io/issues/360 | ||
|
||
.idea/ | ||
|
||
# Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-249601023 | ||
|
||
*.iml | ||
modules.xml | ||
.idea/misc.xml | ||
*.ipr | ||
|
||
### SBT ### | ||
# Simple Build Tool | ||
# http://www.scala-sbt.org/release/docs/Getting-Started/Directories.html#configuring-version-control | ||
|
||
dist/* | ||
target/ | ||
lib_managed/ | ||
src_managed/ | ||
project/boot/ | ||
project/plugins/project/ | ||
dist/ | ||
.dev/ | ||
|
||
# Created by https://www.toptal.com/developers/gitignore/api/visualstudiocode,go | ||
# Edit at https://www.toptal.com/developers/gitignore?templates=visualstudiocode,go | ||
|
||
### Go ### | ||
# Binaries for programs and plugins | ||
*.exe | ||
*.exe~ | ||
*.dll | ||
*.so | ||
*.dylib | ||
|
||
# Test binary, built with `go test -c` | ||
*.test | ||
|
||
# Output of the go coverage tool, specifically when used with LiteIDE | ||
*.out | ||
|
||
# Dependency directories (remove the comment below to include it) | ||
# vendor/ | ||
|
||
### Go Patch ### | ||
/vendor/ | ||
/Godeps/ | ||
|
||
### VisualStudioCode ### | ||
.vscode/* | ||
!.vscode/settings.json | ||
!.vscode/tasks.json | ||
!.vscode/launch.json | ||
!.vscode/extensions.json | ||
*.code-workspace | ||
|
||
# Local History for Visual Studio Code | ||
.history/ | ||
|
||
### VisualStudioCode Patch ### | ||
# Ignore all local history of files | ||
.history | ||
.cache | ||
.lib/ | ||
|
||
### Scala ### | ||
*.class | ||
*.log | ||
.ionide | ||
|
||
# End of https://www.toptal.com/developers/gitignore/api/visualstudiocode,go | ||
|
||
# End of https://www.gitignore.io/api/sbt,scala,intellij+all | ||
.vscode/ |
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,20 @@ | ||
run: | ||
tests: false | ||
skip-dirs: | ||
- .dev/ | ||
skip-dirs-use-default: true | ||
output: | ||
format: colored-line-number | ||
print-issued-lines: true | ||
print-linter-name: true | ||
linters: | ||
enable: | ||
- govet | ||
- gofmt | ||
- goimports | ||
- unconvert | ||
- misspell | ||
- interfacer | ||
- maligned | ||
- prealloc | ||
fast: false |
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,27 @@ | ||
before: | ||
hooks: | ||
- go mod download | ||
builds: | ||
- env: | ||
- CGO_ENABLED=0 | ||
- GO111MODULE=on | ||
main: ./ | ||
binary: kube-throttler | ||
goos: | ||
- linux | ||
- darwin | ||
goarch: | ||
- amd64 | ||
- arm64 | ||
flags: | ||
- -a | ||
- -tags | ||
- netgo | ||
- -installsuffix | ||
- netgo | ||
ldflags: | ||
- -s -w -X github.com/everpeace/kube-throttler/cmd.Version={{.Version}} -X github.com/everpeace/kube-throttler/cmd.Revision={{.ShortCommit}} -extldflags "-static" | ||
# changelog will be generated by release drafter | ||
# see .github/release-drafter.yml | ||
changelog: | ||
skip: true |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.