Skip to content
Merged
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
15 changes: 13 additions & 2 deletions client/collector.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
package client

import (
"errors"

"github.com/pkg/errors"
collectors "github.com/replicatedhq/replicated/gen/go/v1"
"github.com/replicatedhq/replicated/pkg/types"
)
Expand All @@ -14,6 +13,10 @@ func (c *Client) ListCollectors(appID string) ([]types.CollectorInfo, error) {
return nil, err
}

if appType == "kots" {
return nil, errors.New("On a kots application, users must modify the support-bundle.yaml file in the release")
}

shipappCollectors, err := c.ShipClient.ListCollectors(appID, appType)
if err != nil {
return nil, err
Expand Down Expand Up @@ -58,6 +61,14 @@ func (c *Client) UpdateCollectorName(appID string, specID string, name string) (
// func (c *Client) CreateCollector(appID string, name string, yaml string) (*collectors.AppCollectorInfo, error) {
func (c *Client) CreateCollector(appID string, name string, yaml string) (*collectors.AppCollectorInfo, error) {

appType, err := c.GetAppType(appID)
if err != nil {
return nil, err
}

if appType == "kots" {
return nil, errors.New("On a kots application, users must modify the support-bundle.yaml file in the release")
}
return c.ShipClient.CreateCollector(appID, name, yaml)

}
Expand Down