Documentation ¶
Index ¶
- func NewAKSFetcher(cfg AKSFetcherConfig) (common.Fetcher, error)
- func NewEKSFetcher(cfg EKSFetcherConfig) (common.Fetcher, error)
- func NewGKEFetcher(cfg GKEFetcherConfig) (common.Fetcher, error)
- type AKSFetcherConfig
- type EKSClientGetter
- type EKSFetcherConfig
- type GKEFetcherConfig
- type KubeAppFetcher
- type KubeAppsFetcherConfig
- type ProtoChecker
- type ProtocolChecker
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAKSFetcher ¶
func NewAKSFetcher(cfg AKSFetcherConfig) (common.Fetcher, error)
NewAKSFetcher creates a new AKS fetcher configuration.
func NewEKSFetcher ¶
func NewEKSFetcher(cfg EKSFetcherConfig) (common.Fetcher, error)
NewEKSFetcher creates a new EKS fetcher configuration.
func NewGKEFetcher ¶
func NewGKEFetcher(cfg GKEFetcherConfig) (common.Fetcher, error)
NewGKEFetcher creates a new GKE fetcher configuration.
Types ¶
type AKSFetcherConfig ¶
type AKSFetcherConfig struct { // Client is the Azure AKS client. Client azure.AKSClient // Regions are the regions where the clusters should be located. Regions []string // ResourceGroups are the Azure resource groups the clusters must belong to. ResourceGroups []string // FilterLabels are the filter criteria. FilterLabels types.Labels // Log is the logger. Log logrus.FieldLogger }
AKSFetcherConfig configures the AKS fetcher.
func (*AKSFetcherConfig) CheckAndSetDefaults ¶
func (c *AKSFetcherConfig) CheckAndSetDefaults() error
CheckAndSetDefaults validates and sets the defaults values.
type EKSClientGetter ¶
type EKSClientGetter interface { // GetAWSEKSClient returns AWS EKS client for the specified region. GetAWSEKSClient(ctx context.Context, region string, opts ...cloud.AWSAssumeRoleOptionFn) (eksiface.EKSAPI, error) }
EKSClientGetter is an interface for getting an EKS client.
type EKSFetcherConfig ¶
type EKSFetcherConfig struct { // EKSClientGetter retrieves an EKS client. EKSClientGetter EKSClientGetter // AssumeRole provides a role ARN and ExternalID to assume an AWS role // when fetching clusters. AssumeRole types.AssumeRole // Region is the region where the clusters should be located. Region string // FilterLabels are the filter criteria. FilterLabels types.Labels // Log is the logger. Log logrus.FieldLogger }
EKSFetcherConfig configures the EKS fetcher.
func (*EKSFetcherConfig) CheckAndSetDefaults ¶
func (c *EKSFetcherConfig) CheckAndSetDefaults() error
CheckAndSetDefaults validates and sets the defaults values.
type GKEFetcherConfig ¶
type GKEFetcherConfig struct { // Client is the GCP GKE client. Client gcp.GKEClient // ProjectID is the projectID the cluster should belong to. ProjectID string // Location is the GCP's location where the clusters should be located. // Wildcard "*" is supported. Location string // FilterLabels are the filter criteria. FilterLabels types.Labels // Log is the logger. Log logrus.FieldLogger }
GKEFetcherConfig configures the GKE fetcher.
func (*GKEFetcherConfig) CheckAndSetDefaults ¶
func (c *GKEFetcherConfig) CheckAndSetDefaults() error
CheckAndSetDefaults validates and sets the defaults values.
type KubeAppFetcher ¶
type KubeAppFetcher struct {
KubeAppsFetcherConfig
}
KubeAppFetcher fetches app resources from Kubernetes services
func NewKubeAppsFetcher ¶
func NewKubeAppsFetcher(cfg KubeAppsFetcherConfig) (*KubeAppFetcher, error)
NewKubeAppsFetcher creates new Kubernetes app fetcher
func (*KubeAppFetcher) Cloud ¶
func (f *KubeAppFetcher) Cloud() string
func (*KubeAppFetcher) FetcherType ¶
func (f *KubeAppFetcher) FetcherType() string
func (*KubeAppFetcher) Get ¶
func (f *KubeAppFetcher) Get(ctx context.Context) (types.ResourcesWithLabels, error)
Get fetches Kubernetes apps from the cluster
func (*KubeAppFetcher) ResourceType ¶
func (f *KubeAppFetcher) ResourceType() string
func (*KubeAppFetcher) String ¶
func (f *KubeAppFetcher) String() string
type KubeAppsFetcherConfig ¶
type KubeAppsFetcherConfig struct { // Name of the kubernetes cluster ClusterName string // KubernetesClient is a client for Kubernetes API KubernetesClient kubernetes.Interface // FilterLabels are the filter criteria. FilterLabels types.Labels // Namespaces are the kubernetes namespaces in which to discover services Namespaces []string // Log is a logger to use Log logrus.FieldLogger // ProtocolChecker inspects port to find your whether they are HTTP/HTTPS or not. ProtocolChecker ProtocolChecker }
KubeAppsFetcherConfig configures KubeAppFetcher
func (*KubeAppsFetcherConfig) CheckAndSetDefaults ¶
func (k *KubeAppsFetcherConfig) CheckAndSetDefaults() error
CheckAndSetDefaults validates and sets the defaults values.
type ProtoChecker ¶
type ProtoChecker struct { InsecureSkipVerify bool // contains filtered or unexported fields }
func NewProtoChecker ¶
func NewProtoChecker(insecureSkipVerify bool) *ProtoChecker
func (*ProtoChecker) CheckProtocol ¶
func (p *ProtoChecker) CheckProtocol(uri string) string
type ProtocolChecker ¶
ProtocolChecker is an interface used to check what protocol uri serves