Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# 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/

# JetBrains project configuration
.idea/
3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

152 changes: 152 additions & 0 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

46 changes: 46 additions & 0 deletions Gopkg.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Gopkg.toml example
#
# Refer to https://golang.github.io/dep/docs/Gopkg.toml.html
# for detailed Gopkg.toml documentation.
#
# required = ["github.com/user/thing/cmd/thing"]
# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"]
#
# [[constraint]]
# name = "github.com/user/project"
# version = "1.0.0"
#
# [[constraint]]
# name = "github.com/user/project2"
# branch = "dev"
# source = "github.com/myfork/project2"
#
# [[override]]
# name = "github.com/x/y"
# version = "2.4.0"
#
# [prune]
# non-go = false
# go-tests = true
# unused-packages = true


[[constraint]]
branch = "master"
name = "github.com/comail/colog"

[[constraint]]
name = "github.com/julienschmidt/httprouter"
version = "1.3.0"

[[constraint]]
branch = "master"
name = "k8s.io/api"

[[constraint]]
name = "k8s.io/kubernetes"
version = "1.16.3"

[prune]
go-tests = true
unused-packages = true
19 changes: 17 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ This is an example of [Kubernetes Scheduler Extender](https://github.com/kuberne

## How to

### 0. checkout the repo
### 0. checkout the repo and make sure you have [`dep` installed](https://golang.github.io/dep/docs/installation.html).

```shell
$ git clone [email protected]:everpeace/k8s-scheduler-extender-example.git
$ cd k8s-scheduler-extender-example
$ git submodule update --init
$ dep ensure
```

### 1. buid a docker image
Expand Down Expand Up @@ -60,6 +60,16 @@ Events:
Normal Started 8s kubelet, minikube Started container
```

## Code changes
@wangchen615 helped
- restructure the code to wrap all shared functions and variables into a package `k8s-scheduler-extender`.
- use `dep` instead of `mod` to manage dependencies

### Use of the package `k8s-scheduler-extender`
```
import "github.com/everpeace/k8s-scheduler-extender-example/k8s_scheduler_extender"
```
The `main.go` is an example extender revised using the above reference.

## License

Expand All @@ -78,3 +88,8 @@ 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.
```


## Used packages
The dependency graph of all packages used can be found below.
![](dep.png)
Binary file added dep.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
41 changes: 0 additions & 41 deletions go.mod

This file was deleted.

Loading