From 198b5e62a361eba04232087b470fbfed2a4dac01 Mon Sep 17 00:00:00 2001 From: anil-intelops Date: Sat, 19 Aug 2023 20:28:51 +0530 Subject: [PATCH] minor changes --- capten/agent/pkg/workers/climon.go | 1 - server/pkg/api/server.go | 2 +- server/pkg/store/astra/cluster_store.go | 2 +- server/pkg/store/astra/store.go | 2 -- server/storeconfig/loki.yaml | 2 +- 5 files changed, 3 insertions(+), 6 deletions(-) diff --git a/capten/agent/pkg/workers/climon.go b/capten/agent/pkg/workers/climon.go index 619ef816..b8bb5df3 100644 --- a/capten/agent/pkg/workers/climon.go +++ b/capten/agent/pkg/workers/climon.go @@ -139,7 +139,6 @@ func (c *Climon) SendInstallAppEvent(ctx context.Context, action string, payload return nil, err } - log.Printf("payload : %v", string(payloadJSON)) we, err := c.client.TemporalClient.ExecuteWorkflow(context.Background(), options, DeployWorkflowName, action, json.RawMessage(payloadJSON)) if err != nil { log.Println("error starting workflow", err) diff --git a/server/pkg/api/server.go b/server/pkg/api/server.go index 240aed5d..a0c4c956 100644 --- a/server/pkg/api/server.go +++ b/server/pkg/api/server.go @@ -13,7 +13,7 @@ import ( const ( organizationIDAttribute = "organizationid" - clusterIDAttribute = "organizationid" + clusterIDAttribute = "clusterid" ) type Server struct { diff --git a/server/pkg/store/astra/cluster_store.go b/server/pkg/store/astra/cluster_store.go index c8ec8573..e731bc53 100644 --- a/server/pkg/store/astra/cluster_store.go +++ b/server/pkg/store/astra/cluster_store.go @@ -56,7 +56,7 @@ func (a *AstraServerStore) GetClusterDetails(clusterID string) (*types.ClusterDe q := &pb.Query{ Cql: fmt.Sprintf(getClusterDetailsQuery, a.keyspace, clusterID), } - fmt.Println("Query => ", q) + response, err := a.c.Session().ExecuteQuery(q) if err != nil { return nil, err diff --git a/server/pkg/store/astra/store.go b/server/pkg/store/astra/store.go index 026aee23..b155e963 100644 --- a/server/pkg/store/astra/store.go +++ b/server/pkg/store/astra/store.go @@ -45,8 +45,6 @@ func (a *AstraServerStore) InitializeDb() error { Cql: query, } - fmt.Println(createQuery) - _, err := a.c.Session().ExecuteQuery(createQuery) if err != nil { return fmt.Errorf("failed to initialise db: %w", err) diff --git a/server/storeconfig/loki.yaml b/server/storeconfig/loki.yaml index 33d6244e..e73e25cd 100644 --- a/server/storeconfig/loki.yaml +++ b/server/storeconfig/loki.yaml @@ -28,7 +28,7 @@ OverrideValues: promtail: config: clients: - - url: http://{{ .Release.Name }}:3100/loki/api/v1/push + - url: http://localhost:3100/loki/api/v1/push external_labels: cluster_name: capten-controlplane