Skip to content

Commit e0f16a4

Browse files
authored
Merge pull request #13 from planetlabs/planetify
Add license headers, and update import path
2 parents abf028a + 63a0a4e commit e0f16a4

File tree

15 files changed

+199
-7
lines changed

15 files changed

+199
-7
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ FROM golang:1.10-alpine3.8 AS build
22

33
RUN apk update && apk add git
44

5-
WORKDIR /go/src/github.com/negz/draino
5+
WORKDIR /go/src/github.com/planetlabs/draino
66
COPY . .
77

88
RUN go get -u github.com/Masterminds/glide

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# draino [![Docker Pulls](https://img.shields.io/docker/pulls/negz/draino.svg)](https://hub.docker.com/r/negz/draino/) [![Godoc](https://img.shields.io/badge/godoc-reference-blue.svg)](https://godoc.org/github.com/negz/draino) [![Travis](https://img.shields.io/travis/com/negz/draino.svg?maxAge=300)](https://travis-ci.com/negz/draino/) [![Codecov](https://img.shields.io/codecov/c/github/negz/draino.svg?maxAge=3600)](https://codecov.io/gh/negz/draino/)
1+
# draino [![Docker Pulls](https://img.shields.io/docker/pulls/negz/draino.svg)](https://hub.docker.com/r/negz/draino/) [![Godoc](https://img.shields.io/badge/godoc-reference-blue.svg)](https://godoc.org/github.com/planetlabs/draino) [![Travis](https://img.shields.io/travis/com/negz/draino.svg?maxAge=300)](https://travis-ci.com/negz/draino/) [![Codecov](https://img.shields.io/codecov/c/github/negz/draino.svg?maxAge=3600)](https://codecov.io/gh/negz/draino/)
22
Draino automatically drains Kubernetes nodes based on labels and node
33
conditions. Nodes that match _all_ of the supplied labels and _any_ of the
44
supplied node conditions will be cordoned immediately and drained after a

cmd/draino/draino.go

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/*
2+
Copyright 2018 Planet Labs Inc.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
13+
implied. See the License for the specific language governing permissions
14+
and limitations under the License.
15+
*/
16+
117
package main
218

319
import (
@@ -18,7 +34,7 @@ import (
1834
client "k8s.io/client-go/kubernetes"
1935
"k8s.io/client-go/tools/cache"
2036

21-
"github.com/negz/draino/internal/kubernetes"
37+
"github.com/planetlabs/draino/internal/kubernetes"
2238
)
2339

2440
// TODO(negz): Use leader election? We don't really want more than one draino

glide.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package: github.com/negz/draino
1+
package: github.com/planetlabs/draino
22
import:
33
- package: github.com/julienschmidt/httprouter
44
version: v1.1

internal/kubernetes/drainer.go

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/*
2+
Copyright 2018 Planet Labs Inc.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
13+
implied. See the License for the specific language governing permissions
14+
and limitations under the License.
15+
*/
16+
117
package kubernetes
218

319
import (

internal/kubernetes/drainer_test.go

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/*
2+
Copyright 2018 Planet Labs Inc.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
13+
implied. See the License for the specific language governing permissions
14+
and limitations under the License.
15+
*/
16+
117
package kubernetes
218

319
import (

internal/kubernetes/eventhandler.go

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/*
2+
Copyright 2018 Planet Labs Inc.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
13+
implied. See the License for the specific language governing permissions
14+
and limitations under the License.
15+
*/
16+
117
package kubernetes
218

319
import (
@@ -69,9 +85,9 @@ func WithDrainBuffer(d time.Duration) DrainingResourceEventHandlerOption {
6985
// NewDrainingResourceEventHandler returns a new DrainingResourceEventHandler.
7086
func NewDrainingResourceEventHandler(d CordonDrainer, e record.EventRecorder, ho ...DrainingResourceEventHandlerOption) *DrainingResourceEventHandler {
7187
h := &DrainingResourceEventHandler{
72-
l: zap.NewNop(),
73-
d: d,
74-
e: e,
88+
l: zap.NewNop(),
89+
d: d,
90+
e: e,
7591
lastDrainScheduledFor: time.Now(),
7692
buffer: DefaultDrainBuffer,
7793
}

internal/kubernetes/eventhandler_test.go

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/*
2+
Copyright 2018 Planet Labs Inc.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
13+
implied. See the License for the specific language governing permissions
14+
and limitations under the License.
15+
*/
16+
117
package kubernetes
218

319
import (

internal/kubernetes/nodefilters.go

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/*
2+
Copyright 2018 Planet Labs Inc.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
13+
implied. See the License for the specific language governing permissions
14+
and limitations under the License.
15+
*/
16+
117
package kubernetes
218

319
import (

internal/kubernetes/nodefilters_test.go

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/*
2+
Copyright 2018 Planet Labs Inc.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
13+
implied. See the License for the specific language governing permissions
14+
and limitations under the License.
15+
*/
16+
117
package kubernetes
218

319
import (

0 commit comments

Comments
 (0)