Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to go 1.19 #94

Merged
merged 3 commits into from
Sep 15, 2023
Merged
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
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
FROM --platform=$BUILDPLATFORM golang:1.17-alpine AS builder
FROM --platform=$BUILDPLATFORM golang:1.19-alpine AS builder
ARG TARGETOS TARGETARCH

WORKDIR /go/src/github.com/keikoproj/governor
COPY . .
RUN apk update && apk add --no-cache build-base make git ca-certificates && update-ca-certificates
ADD https://storage.googleapis.com/kubernetes-release/release/v1.12.3/bin/linux/amd64/kubectl /usr/local/bin/kubectl
ADD https://storage.googleapis.com/kubernetes-release/release/v1.25.12/bin/linux/amd64/kubectl /usr/local/bin/kubectl
RUN chmod 777 /usr/local/bin/kubectl
RUN make build

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/keikoproj/governor

go 1.17
go 1.19

require (
github.com/Pallinder/go-randomdata v1.1.0
Expand Down
1,171 changes: 0 additions & 1,171 deletions go.sum

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pkg/reaper/common/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ package common
type MetricsAPI interface {
// Set Metric value on metric
SetMetricValue(metricName string, tags map[string]string, value float64) error
}
}
2 changes: 1 addition & 1 deletion pkg/reaper/common/prom_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ func TestAPIs(t *testing.T) {

err := api.SetMetricValue("abc", tags, 50)
assert.Nil(t, err)
}
}
2 changes: 1 addition & 1 deletion pkg/reaper/nodereaper/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ func getNodeAgeMinutes(n *v1.Node) int {
}

func getNodeRegion(n *v1.Node) string {
var regionName = ""
var regionName = ""
labels := n.GetLabels()
if labels != nil {
regionName = labels["topology.kubernetes.io/region"]
Expand Down
19 changes: 9 additions & 10 deletions pkg/reaper/nodereaper/nodereaper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1335,13 +1335,13 @@ func TestIgnoreFailure(t *testing.T) {
},
Nodes: []FakeNode{
{
nodeName: "ip-10-10-10-10.us-west-2.compute.local",
state: "NotReady",
nodeName: "ip-10-10-10-10.us-west-2.compute.local",
state: "NotReady",
ageMinutes: 43200,
},
{
nodeName: "ip-10-10-10-11.us-west-2.compute.local",
state: "Unknown",
nodeName: "ip-10-10-10-11.us-west-2.compute.local",
state: "Unknown",
ageMinutes: 43200,
},
{
Expand All @@ -1363,11 +1363,11 @@ func TestIgnoreFailure(t *testing.T) {
kind: "Node",
},
},
FakeReaper: reaper,
ExpectedUnready: 3,
ExpectedOldReapable: 3,
ExpectedDrainable: 0,
ExpectedDrained: 0,
FakeReaper: reaper,
ExpectedUnready: 3,
ExpectedOldReapable: 3,
ExpectedDrainable: 0,
ExpectedDrained: 0,
}
testCase.Run(t, false)
}
Expand Down Expand Up @@ -1727,7 +1727,6 @@ func TestRegionDetection(t *testing.T) {
}
}


func TestSkipLabelReaper(t *testing.T) {
reaper := newFakeReaperContext()
reaper.ReapUnknown = true
Expand Down
2 changes: 1 addition & 1 deletion pkg/reaper/pdbreaper/pdbreaper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -649,4 +649,4 @@ func TestWithPushgateway(t *testing.T) {
ExpectedReapedBudgets: 0,
}
testCase.Run(t)
}
}
Loading