Skip to content

Commit

Permalink
fix: remove pennywise (#1948)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mahanmmi authored Nov 12, 2024
1 parent 355ccb6 commit e25f371
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 409 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ require (
github.com/lib/pq v1.10.9
github.com/nats-io/nats.go v1.36.0
github.com/open-policy-agent/opa v0.69.0
github.com/opengovern/og-util v1.1.1
github.com/opengovern/og-util v1.1.2
github.com/opengovern/plugin-aws v0.7.3
github.com/opengovern/plugin-gcp v0.0.0-20241014134959-2c0f222fc07b
github.com/opengovern/plugin-kubernetes-internal v0.18.12
Expand Down
6 changes: 2 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -987,10 +987,8 @@ github.com/opencontainers/image-spec v1.1.0 h1:8SG7/vwALn54lVB/0yZ/MMwhFrPYtpEHQ
github.com/opencontainers/image-spec v1.1.0/go.mod h1:W4s4sFTMaBeK1BQLXbG4AdM2szdn85PY75RI83NrTrM=
github.com/opencontainers/runc v1.2.0 h1:qke7ZVCmJcKrJVY2iHJVC+0kql9uYdkusOPsQOOeBw4=
github.com/opencontainers/runc v1.2.0/go.mod h1:/PXzF0h531HTMsYQnmxXkBD7YaGShm/2zcRB79dksUc=
github.com/opengovern/og-util v1.1.0 h1:bV2XKX8aIpJGC2CR4kh9CU/rJWPQed76gtVXM2zBDXM=
github.com/opengovern/og-util v1.1.0/go.mod h1:dyn8rhmxq59o1jnbgGfmcUvW7iB/eN6OxoTUUx6jEHA=
github.com/opengovern/og-util v1.1.1 h1:SXnPCNuhR9WxxupEa1hCtIOIh2Sy+MF80qVdpoxc58k=
github.com/opengovern/og-util v1.1.1/go.mod h1:dyn8rhmxq59o1jnbgGfmcUvW7iB/eN6OxoTUUx6jEHA=
github.com/opengovern/og-util v1.1.2 h1:o3KE8UBgcNZqHevZfiNC4Ly4Bo9r/T9IKUipinAyB80=
github.com/opengovern/og-util v1.1.2/go.mod h1:dyn8rhmxq59o1jnbgGfmcUvW7iB/eN6OxoTUUx6jEHA=
github.com/opengovern/plugin-aws v0.7.3 h1:76hZOjulNlgn4uaq5lq1/pmGmgJqvX1ZQbgqcQn03gI=
github.com/opengovern/plugin-aws v0.7.3/go.mod h1:zfTMswfCyXZ0gD6SDCsmKg55LseXzeFzOH4jXn2QJVo=
github.com/opengovern/plugin-gcp v0.0.0-20241014134959-2c0f222fc07b h1:4xP98kDpOXUu6RcFJyZN63OeA2I26MLS+dEB9JWYQpY=
Expand Down
2 changes: 1 addition & 1 deletion pkg/analytics/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ func (w *Worker) Run(ctx context.Context) error {
return err
}

if err := steampipe.PopulateOpenGovernancePluginSteampipeConfig(w.config.ElasticSearch, w.config.Steampipe, w.config.PennywiseBaseURL); err != nil {
if err := steampipe.PopulateOpenGovernancePluginSteampipeConfig(w.config.ElasticSearch, w.config.Steampipe); err != nil {
w.logger.Error("failed to populate steampipe config for opengovernance plugin", zap.Error(err))
return err
}
Expand Down
17 changes: 8 additions & 9 deletions pkg/analytics/config/type.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,14 @@ package config
import "github.com/opengovern/og-util/pkg/config"

type WorkerConfig struct {
NATS config.NATS
PostgreSQL config.Postgres
ElasticSearch config.ElasticSearch
Steampipe config.Postgres
Integration config.OpenGovernanceService
Scheduler config.OpenGovernanceService
Inventory config.OpenGovernanceService
EsSink config.OpenGovernanceService
PennywiseBaseURL string `yaml:"pennywise_base_url"`
NATS config.NATS
PostgreSQL config.Postgres
ElasticSearch config.ElasticSearch
Steampipe config.Postgres
Integration config.OpenGovernanceService
Scheduler config.OpenGovernanceService
Inventory config.OpenGovernanceService
EsSink config.OpenGovernanceService

DoTelemetry bool `yaml:"do_telemetry"`
TelemetryWorkspaceID string `yaml:"telemetry_workspace_id"`
Expand Down
3 changes: 1 addition & 2 deletions pkg/compliance/runner/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ type Config struct {
Metadata config.OpenGovernanceService
EsSink config.OpenGovernanceService
Steampipe config.Postgres
PennywiseBaseURL string `yaml:"pennywise_base_url"`
PrometheusPushAddress string
}

Expand Down Expand Up @@ -68,7 +67,7 @@ func NewWorker(
if err != nil {
return nil, err
}
if err := steampipe.PopulateOpenGovernancePluginSteampipeConfig(config.ElasticSearch, config.Steampipe, config.PennywiseBaseURL); err != nil {
if err := steampipe.PopulateOpenGovernancePluginSteampipeConfig(config.ElasticSearch, config.Steampipe); err != nil {
return nil, err
}

Expand Down
3 changes: 1 addition & 2 deletions pkg/inventory/query-runner/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ type Config struct {
Metadata config.OpenGovernanceService
EsSink config.OpenGovernanceService
Steampipe config.Postgres
PennywiseBaseURL string `yaml:"pennywise_base_url"`
PrometheusPushAddress string
}

Expand Down Expand Up @@ -64,7 +63,7 @@ func NewWorker(
return nil, err
}

if err := steampipe.PopulateOpenGovernancePluginSteampipeConfig(config.ElasticSearch, config.Steampipe, config.PennywiseBaseURL); err != nil {
if err := steampipe.PopulateOpenGovernancePluginSteampipeConfig(config.ElasticSearch, config.Steampipe); err != nil {
return nil, err
}

Expand Down
Loading

0 comments on commit e25f371

Please sign in to comment.