Skip to content

Commit

Permalink
Merge pull request #24 from nginxinc/areste
Browse files Browse the repository at this point in the history
Fixes for #16 and #21
  • Loading branch information
mrajagopal authored Jul 17, 2024
2 parents edc4529 + 22acd07 commit 198bdd7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
5 changes: 0 additions & 5 deletions pkg/crds/crd.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,6 @@ func GetCRDList() []Crd {
Group: "k8s.nginx.org",
Version: "v1",
},
{
Resource: "cosarara",
Group: "k8s.nginx.org",
Version: "v1",
},
}
return crdList
}
6 changes: 3 additions & 3 deletions pkg/data_collector/data_collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,12 @@ type DataCollector struct {

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

tmpDir, err := os.MkdirTemp("", "nic-diag")
tmpDir, err := os.MkdirTemp("", "-pkg-diag")
if err != nil {
return nil, fmt.Errorf("unable to create temp directory: %s", err)
}

logFile, err := os.OpenFile(filepath.Join(tmpDir, "nic-supportpkg.log"), os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0644)
logFile, err := os.OpenFile(filepath.Join(tmpDir, "supportpkg.log"), os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0644)
if err != nil {
return nil, fmt.Errorf("unable to create log file: %s", err)
}
Expand Down Expand Up @@ -108,7 +108,7 @@ func (c *DataCollector) WrapUp(product string) (string, error) {
unixTime := time.Now().Unix()
unixTimeString := strconv.FormatInt(unixTime, 10)
tarballName := fmt.Sprintf("%s-supportpkg-%s.tar.gz", product, unixTimeString)
tarballRootDirName := fmt.Sprintf("nic-supportpkg-%s", unixTimeString)
tarballRootDirName := fmt.Sprintf("%s-supportpkg-%s", product, unixTimeString)

err := c.LogFile.Close()
if err != nil {
Expand Down

0 comments on commit 198bdd7

Please sign in to comment.