Skip to content

Commit

Permalink
add trigger change
Browse files Browse the repository at this point in the history
  • Loading branch information
kolikons committed Oct 6, 2024
1 parent 7204498 commit b7b9f7a
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: actions/setup-go@v2
- uses: actions/setup-go@v5
with:
go-version: 1.17
go-version: 1.18

- run: go mod download

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.17
go-version: 1.18

- name: Import GPG key
id: import_gpg
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ bin/
vendor/

./label-watch
label-watch
*.exe
*.test
*.prof
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ brew install kolikons/tap/label-watch
label-watch --help
Usage of label-watch:
-interval string
(optional) Start application in deamon mode. Supports format: 's', 'm', 'h'.
(optional) Start application in daemon mode. Supports format: 's', 'm', 'h'.
-kubeconfig string
(optional) absolute path to the kubeconfig file
-label string
Expand Down
4 changes: 2 additions & 2 deletions cmd/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ func opts() (c *Command, e error) {
&c.Interval,
"interval",
"",
"(optional) Start application in deamon mode. Supports format: 's', 'm', 'h'.",
"(optional) Start application in daemon mode. Supports format: 's', 'm', 'h'.",
)

// Uses for finding label and conver to node-role. It's requered
// Uses for finding label and convert to node-role. It's required
flag.StringVar(
&c.Label,
"label",
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/kolikons/label-watch

go 1.17
go 1.18

replace k8s.io/client-go => k8s.io/client-go v0.23.4

Expand Down
1 change: 1 addition & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ github.com/Azure/go-autorest/autorest/adal v0.9.13 h1:Mp5hbtOePIzM8pJVRa3YLrWWmZ
github.com/Azure/go-autorest/autorest/adal v0.9.13/go.mod h1:W/MM4U6nLxnIskrw4UwWzlHfGjwUS50aOsc/I3yuU8M=
github.com/Azure/go-autorest/autorest/date v0.3.0 h1:7gUk1U5M/CQbp9WoqinNzJar+8KY+LPI6wiWrP/myHw=
github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74=
github.com/Azure/go-autorest/autorest/mocks v0.4.1 h1:K0laFcLE6VLTOwNgSxaGbUcLPuGXlNkbVvq4cW4nIHk=
github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k=
github.com/Azure/go-autorest/logger v0.2.1 h1:IG7i4p/mDa2Ce4TRyAO8IHnVhAVF3RFU+ZtXWSmf4Tg=
github.com/Azure/go-autorest/logger v0.2.1/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8=
Expand Down
2 changes: 1 addition & 1 deletion pkg/label/label.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ func RunLabel(c *cmd.Command) {
}

if nodePatched == false {
fmt.Printf("Node %s wasn't patched becuase missed Label: %s\n", node.GetName(), l)
fmt.Printf("Node %s wasn't patched because missed Label: %s\n", node.GetName(), l)
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/label/timer.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"golang.org/x/sync/errgroup"
)

// convertTime coverting cmd flags paramst to interval
// Convert time by converting command flags parameters to intervals.
func convertTime(s string) time.Duration {
d, err := time.ParseDuration(s)
if err != nil {
Expand Down Expand Up @@ -65,7 +65,7 @@ func RunTimerLabel(c *cmd.Command) {
}
})

// wait for all errgroup goroutines
// wait for all err group goroutines
err := g.Wait()
if err != nil {
if errors.Is(err, context.Canceled) {
Expand Down

0 comments on commit b7b9f7a

Please sign in to comment.