Skip to content

Commit

Permalink
refactor: replace info with collector (#6)
Browse files Browse the repository at this point in the history
Signed-off-by: chenk <hen.keinan@gmail.com>

Signed-off-by: chenk <hen.keinan@gmail.com>
  • Loading branch information
chen-keinan authored Dec 25, 2022
1 parent fa8457b commit cb0bb2e
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM alpine:3.16.2

COPY node-info /usr/local/bin/node-info
COPY node-collector /usr/local/bin/node-collector

ENTRYPOINT ["node-info"]
ENTRYPOINT ["node-collector"]
6 changes: 3 additions & 3 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"os"

"github.com/chen-keinan/k8s-node-info/pkg/collector"
"github.com/chen-keinan/k8s-node-collector/pkg/collector"
"github.com/spf13/cobra"
)

Expand All @@ -13,8 +13,8 @@ func init() {
}

var rootCmd = &cobra.Command{
Use: "node-info",
Short: "k8s-Node-Info extract file system info from cluster Node",
Use: "node-collector",
Short: "k8s-node-collector extract file system info from cluster Node",
Long: `A tool which provide a way to extract k8s info which is not accessible via apiserver from node cluster based on pre-define commands`,
RunE: func() func(cmd *cobra.Command, args []string) error {
return func(cmd *cobra.Command, args []string) error {
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/chen-keinan/k8s-node-info
module github.com/chen-keinan/k8s-node-collector

go 1.19

Expand Down
10 changes: 5 additions & 5 deletions job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@
apiVersion: batch/v1
kind: Job
metadata:
name: node-info
name: node-collector
spec:
template:
metadata:
labels:
app: node-info
app: node-collector
spec:
hostPID: true
containers:
- name: node-info
image: chenkeinan/node-info:latest
command: ["node-info"]
- name: node-collector
image: chenkeinan/node-collector:latest
command: ["node-collector"]
volumeMounts:
- name: var-lib-etcd
mountPath: /var/lib/etcd
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package main

import command "github.com/chen-keinan/k8s-node-info/cmd"
import command "github.com/chen-keinan/k8s-node-collector/cmd"

func main() {
command.Execute()
Expand Down
Binary file added node-collector
Binary file not shown.

0 comments on commit cb0bb2e

Please sign in to comment.