Skip to content

Commit b4b161f

Browse files
committed
fix: KIC to NIC rebranding
1 parent 9b85559 commit b4b161f

File tree

8 files changed

+23
-23
lines changed

8 files changed

+23
-23
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
build:
2-
go build -o cmd/kubectl-kic-supportpkg
2+
go build -o cmd/kubectl-nic-supportpkg
33

44
install: build
5-
sudo cp cmd/kubectl-kic-supportpkg /usr/local/bin
5+
sudo cp cmd/kubectl-nic-supportpkg /usr/local/bin

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# kubectl-kic-supportpkg
1+
# nginx-k8s-supportpkg
22

3-
A kubectl plugin designed to collect diagnostics information on the designated namespaces.
3+
A kubectl plugin designed to collect NIC diagnostics information on the designated namespaces.
44

55
## Features
66

@@ -11,7 +11,7 @@ The plugin collects the following global and namespace-specific information:
1111
- list of pods, events, configmaps, services, deployments, statefulsets, replicasets and leases
1212
- k8s metrics
1313
- helm deployments
14-
- `nginx -T` output from the KIC pods
14+
- `nginx -T` output from the NIC pods
1515

1616
## Installation
1717

@@ -23,15 +23,15 @@ Verify that the plugin is properly found by `kubectl`:
2323
$ kubectl plugin list
2424
The following compatible plugins are available:
2525
26-
/usr/local/bin/kubectl-kic-supportpkg
26+
/usr/local/bin/kubectl-nic-supportpkg
2727
```
2828

2929
## Usage
3030

31-
The plugin is invoked via `kubectl kic supportpkg` and has only one required flag, `-n` or `--namespace`:
31+
The plugin is invoked via `kubectl nic supportpkg` and has only one required flag, `-n` or `--namespace`:
3232

3333
```
34-
$ kubectl kic supportpkg -n default -n nginx-ingress-0
34+
$ kubectl nic supportpkg -n default -n nginx-ingress-0
3535
Running job pod-list... OK
3636
Running job collect-pods-logs... OK
3737
Running job events-list... OK
@@ -47,6 +47,6 @@ Running job nodes-info... OK
4747
Running job metrics-information... OK
4848
Running job helm-info... OK
4949
Running job helm-deployments... OK
50-
Supportpkg successfully generated: kic-supportpkg-1711384966.tar.gz
50+
Supportpkg successfully generated: nic-supportpkg-1711384966.tar.gz
5151
5252
```

cmd/kic-supportpkg.go renamed to cmd/nic-supportpkg.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ package cmd
22

33
import (
44
"fmt"
5-
"github.com/nginxinc/kubectl-kic-supportpkg/pkg/data_collector"
6-
"github.com/nginxinc/kubectl-kic-supportpkg/pkg/jobs"
5+
"github.com/nginxinc/nginx-k8s-supportpkg/pkg/data_collector"
6+
"github.com/nginxinc/nginx-k8s-supportpkg/pkg/jobs"
77
"github.com/spf13/cobra"
88
"os"
99
)
@@ -13,9 +13,9 @@ func Execute() {
1313
var namespaces []string
1414

1515
var rootCmd = &cobra.Command{
16-
Use: "kic-supportpkg",
17-
Short: "kic-supportpkg - a tool to create Ingress Controller diagnostics package",
18-
Long: `kic-supportpkg - a tool to create Ingress Controller diagnostics package`,
16+
Use: "nic-supportpkg",
17+
Short: "nic-supportpkg - a tool to create Ingress Controller diagnostics package",
18+
Long: `nic-supportpkg - a tool to create Ingress Controller diagnostics package`,
1919
Run: func(cmd *cobra.Command, args []string) {
2020

2121
collector, err := data_collector.NewDataCollector(namespaces...)
@@ -46,7 +46,7 @@ func Execute() {
4646

4747
rootCmd.Flags().StringSliceVarP(&namespaces, "namespace", "n", []string{}, "list of namespaces to collect information from")
4848
rootCmd.MarkFlagRequired("namespace")
49-
rootCmd.SetUsageTemplate("Usage: \n kic supportpkg [-n|--namespace] ns1 [-n|--namespace] ns2 ...\n kic supportpkg [-n|--namespace] ns1,ns2 ...\n")
49+
rootCmd.SetUsageTemplate("Usage: \n nic supportpkg [-n|--namespace] ns1 [-n|--namespace] ns2 ...\n nic supportpkg [-n|--namespace] ns1,ns2 ...\n")
5050

5151
if err := rootCmd.Execute(); err != nil {
5252
fmt.Println(err)

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module github.com/nginxinc/kubectl-kic-supportpkg
1+
module github.com/nginxinc/nginx-k8s-supportpkg
22

33
go 1.21.5
44

main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package main
22

33
import (
4-
"github.com/nginxinc/kubectl-kic-supportpkg/cmd"
4+
"github.com/nginxinc/nginx-k8s-supportpkg/cmd"
55
)
66

77
func main() {

pkg/data_collector/data_collector.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,12 @@ type DataCollector struct {
3838

3939
func NewDataCollector(namespaces ...string) (*DataCollector, error) {
4040

41-
tmpDir, err := os.MkdirTemp("", "kic-diag")
41+
tmpDir, err := os.MkdirTemp("", "nic-diag")
4242
if err != nil {
4343
return nil, fmt.Errorf("unable to create temp directory: %s", err)
4444
}
4545

46-
logFile, err := os.OpenFile(filepath.Join(tmpDir, "kic-supportpkg.log"), os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0644)
46+
logFile, err := os.OpenFile(filepath.Join(tmpDir, "nic-supportpkg.log"), os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0644)
4747
if err != nil {
4848
return nil, fmt.Errorf("unable to create log file: %s", err)
4949
}
@@ -86,8 +86,8 @@ func (c *DataCollector) WrapUp() (string, error) {
8686

8787
unixTime := time.Now().Unix()
8888
unixTimeString := strconv.FormatInt(unixTime, 10)
89-
tarballName := fmt.Sprintf("kic-supportpkg-%s.tar.gz", unixTimeString)
90-
tarballRootDirName := fmt.Sprintf("kic-supportpkg-%s", unixTimeString)
89+
tarballName := fmt.Sprintf("nic-supportpkg-%s.tar.gz", unixTimeString)
90+
tarballRootDirName := fmt.Sprintf("nic-supportpkg-%s", unixTimeString)
9191

9292
c.LogFile.Close()
9393

pkg/jobs/job.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"context"
55
"errors"
66
"fmt"
7-
"github.com/nginxinc/kubectl-kic-supportpkg/pkg/data_collector"
7+
"github.com/nginxinc/nginx-k8s-supportpkg/pkg/data_collector"
88
"os"
99
"path"
1010
"time"

pkg/jobs/job_list.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"context"
66
"encoding/json"
77
"fmt"
8-
"github.com/nginxinc/kubectl-kic-supportpkg/pkg/data_collector"
8+
"github.com/nginxinc/nginx-k8s-supportpkg/pkg/data_collector"
99
"io"
1010
corev1 "k8s.io/api/core/v1"
1111
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

0 commit comments

Comments
 (0)