Skip to content

Commit

Permalink
chore: remove ec2 check
Browse files Browse the repository at this point in the history
  • Loading branch information
adityathebe committed Apr 19, 2024
1 parent 232657c commit 6689c3d
Show file tree
Hide file tree
Showing 15 changed files with 0 additions and 1,357 deletions.
7 changes: 0 additions & 7 deletions api/v1/canary_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ type CanarySpec struct {
Helm []HelmCheck `yaml:"helm,omitempty" json:"helm,omitempty"`
Namespace []NamespaceCheck `yaml:"namespace,omitempty" json:"namespace,omitempty"`
Redis []RedisCheck `yaml:"redis,omitempty" json:"redis,omitempty"`
EC2 []EC2Check `yaml:"ec2,omitempty" json:"ec2,omitempty"`
Prometheus []PrometheusCheck `yaml:"prometheus,omitempty" json:"prometheus,omitempty"`
MongoDB []MongoDBCheck `yaml:"mongodb,omitempty" json:"mongodb,omitempty"`
CloudWatch []CloudWatchCheck `yaml:"cloudwatch,omitempty" json:"cloudwatch,omitempty"`
Expand Down Expand Up @@ -157,9 +156,6 @@ func (spec CanarySpec) GetAllChecks() []external.Check {
for _, check := range spec.Junit {
checks = append(checks, check)
}
for _, check := range spec.EC2 {
checks = append(checks, check)
}
for _, check := range spec.Prometheus {
checks = append(checks, check)
}
Expand Down Expand Up @@ -280,9 +276,6 @@ func (spec CanarySpec) KeepOnly(names ...string) CanarySpec {
spec.Redis = lo.Filter(spec.Redis, func(c RedisCheck, _ int) bool {
return lo.Contains(names, c.GetName())
})
spec.EC2 = lo.Filter(spec.EC2, func(c EC2Check, _ int) bool {
return lo.Contains(names, c.GetName())
})
spec.Prometheus = lo.Filter(spec.Prometheus, func(c PrometheusCheck, _ int) bool {
return lo.Contains(names, c.GetName())
})
Expand Down
29 changes: 0 additions & 29 deletions api/v1/checks.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import (
"github.com/flanksource/duty/models"
"github.com/flanksource/duty/types"
"github.com/samber/lo"
v1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
)

Expand Down Expand Up @@ -1376,33 +1375,6 @@ type DatabaseBackup struct {
DatabaseBackupCheck `yaml:",inline" json:",inline"`
}

/*
[include:aws/aws_config_pass.yaml]
*/
type EC2 struct {
EC2Check `yaml:",inline" json:",inline"`
}

type EC2Check struct {
Description `yaml:",inline" json:",inline"`
connection.AWSConnection `yaml:",inline" json:",inline"`
AMI string `yaml:"ami,omitempty" json:"ami,omitempty"`
UserData string `yaml:"userData,omitempty" json:"userData,omitempty"`
SecurityGroup string `yaml:"securityGroup,omitempty" json:"securityGroup,omitempty"`
KeepAlive bool `yaml:"keepAlive,omitempty" json:"keepAlive,omitempty"`
WaitTime int `yaml:"waitTime,omitempty" json:"waitTime,omitempty"`
TimeOut int `yaml:"timeOut,omitempty" json:"timeOut,omitempty"`
CanaryRef []v1.LocalObjectReference `yaml:"canaryRef,omitempty" json:"canaryRef,omitempty"`
}

func (c EC2Check) GetEndpoint() string {
return c.Region
}

func (c EC2Check) GetType() string {
return "ec2"
}

type AzureDevopsCheck struct {
Description `yaml:",inline" json:",inline"`
Templatable `yaml:",inline" json:",inline"`
Expand Down Expand Up @@ -1465,7 +1437,6 @@ var AllChecks = []external.Check{
DockerPullCheck{},
DockerPushCheck{},
DynatraceCheck{},
EC2Check{},
ElasticsearchCheck{},
ExecCheck{},
FolderCheck{},
Expand Down
45 changes: 0 additions & 45 deletions api/v1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion checks/checker.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ var All = []Checker{
&DatabaseBackupChecker{},
&DNSChecker{},
&DynatraceChecker{},
&EC2Checker{},
&ElasticsearchChecker{},
&ExecChecker{},
&FolderChecker{},
Expand Down
Loading

0 comments on commit 6689c3d

Please sign in to comment.