Skip to content

Commit

Permalink
remove unit tests, add curl install + minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Sophie Zhao committed May 17, 2021
1 parent 5a730db commit ddd64fb
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 29 deletions.
13 changes: 9 additions & 4 deletions cmd/aks-periscope/aks-periscope.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,9 @@ func main() {

collectors := []interfaces.Collector{}
containerLogsCollector := collector.NewContainerLogsCollector(exporter)
collectors = append(collectors, containerLogsCollector)
networkOutboundCollector := collector.NewNetworkOutboundCollector(5, exporter)
collectors = append(collectors, networkOutboundCollector)
dnsCollector := collector.NewDNSCollector(exporter)
collectors = append(collectors, dnsCollector)
kubeObjectsCollector := collector.NewKubeObjectsCollector(exporter)
collectors = append(collectors, kubeObjectsCollector)
systemLogsCollector := collector.NewSystemLogsCollector(exporter)
ipTablesCollector := collector.NewIPTablesCollector(exporter)
nodeLogsCollector := collector.NewNodeLogsCollector(exporter)
Expand All @@ -42,8 +38,17 @@ func main() {
helmCollector := collector.NewHelmCollector(exporter)

if strings.EqualFold(clusterType, "connectedCluster") {
collectors = append(collectors, containerLogsCollector)
collectors = append(collectors, dnsCollector)
collectors = append(collectors, helmCollector)
collectors = append(collectors, kubeObjectsCollector)
collectors = append(collectors, networkOutboundCollector)

} else {
collectors = append(collectors, containerLogsCollector)
collectors = append(collectors, dnsCollector)
collectors = append(collectors, kubeObjectsCollector)
collectors = append(collectors, networkOutboundCollector)
collectors = append(collectors, systemLogsCollector)
collectors = append(collectors, ipTablesCollector)
collectors = append(collectors, nodeLogsCollector)
Expand Down
2 changes: 1 addition & 1 deletion deployment/aks-periscope.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ metadata:
name: clustertype-config
namespace: aks-periscope
data:
CLUSTER_TYPE: managedCluster
CLUSTER_TYPE: # <custom flag>
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
Expand Down
7 changes: 6 additions & 1 deletion pkg/collector/helm_collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,12 @@ func (collector *HelmCollector) Collect() error {
return err
}

output, err := utils.RunCommandOnContainer("curl", "-fsSl", "-o", "get_helm.sh", "https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3")
output, err := utils.RunCommandOnContainer("apk", "add", "curl", "openssl", "bash", "--no-cache")
if err != nil {
return err
}

output, err = utils.RunCommandOnContainer("curl", "-fsSl", "-o", "get_helm.sh", "https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3")
if err != nil {
return err
}
Expand Down
23 changes: 0 additions & 23 deletions tests/helm_test.go

This file was deleted.

0 comments on commit ddd64fb

Please sign in to comment.