Skip to content

Commit

Permalink
Merge pull request #213 from kubefirst/hotwire
Browse files Browse the repository at this point in the history
shifting telemetry to pkg from internal
  • Loading branch information
johndietz authored Oct 21, 2023
2 parents f24cef3 + c407bcf commit 84f0a60
Show file tree
Hide file tree
Showing 24 changed files with 24 additions and 25 deletions.
2 changes: 1 addition & 1 deletion internal/controller/argocd.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import (

argocdapi "github.com/argoproj/argo-cd/v2/pkg/client/clientset/versioned"
awsext "github.com/kubefirst/kubefirst-api/extensions/aws"
"github.com/kubefirst/kubefirst-api/internal/telemetryShim"
"github.com/kubefirst/kubefirst-api/pkg/segment"
"github.com/kubefirst/kubefirst-api/pkg/telemetryShim"
"github.com/kubefirst/runtime/pkg"
"github.com/kubefirst/runtime/pkg/argocd"
"github.com/kubefirst/runtime/pkg/k8s"
Expand Down
2 changes: 1 addition & 1 deletion internal/controller/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ import (
terraformext "github.com/kubefirst/kubefirst-api/extensions/terraform"
vultrext "github.com/kubefirst/kubefirst-api/extensions/vultr"
gitShim "github.com/kubefirst/kubefirst-api/internal/gitShim"
"github.com/kubefirst/kubefirst-api/internal/telemetryShim"
"github.com/kubefirst/kubefirst-api/pkg/providerConfigs"
"github.com/kubefirst/kubefirst-api/pkg/segment"
"github.com/kubefirst/kubefirst-api/pkg/telemetryShim"
pkgtypes "github.com/kubefirst/kubefirst-api/pkg/types"
"github.com/kubefirst/runtime/pkg/k8s"
log "github.com/sirupsen/logrus"
Expand Down
2 changes: 1 addition & 1 deletion internal/controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ import (

"github.com/kubefirst/kubefirst-api/internal/constants"
"github.com/kubefirst/kubefirst-api/internal/db"
"github.com/kubefirst/kubefirst-api/internal/telemetryShim"
"github.com/kubefirst/kubefirst-api/internal/utils"
google "github.com/kubefirst/kubefirst-api/pkg/google"
"github.com/kubefirst/kubefirst-api/pkg/handlers"
"github.com/kubefirst/kubefirst-api/pkg/providerConfigs"
"github.com/kubefirst/kubefirst-api/pkg/segment"
"github.com/kubefirst/kubefirst-api/pkg/telemetryShim"
pkgtypes "github.com/kubefirst/kubefirst-api/pkg/types"
"github.com/kubefirst/runtime/pkg"
runtime "github.com/kubefirst/runtime/pkg"
Expand Down
2 changes: 1 addition & 1 deletion internal/controller/domain.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import (
"fmt"

cloudflare_api "github.com/cloudflare/cloudflare-go"
"github.com/kubefirst/kubefirst-api/internal/telemetryShim"
"github.com/kubefirst/kubefirst-api/pkg/segment"
"github.com/kubefirst/kubefirst-api/pkg/telemetryShim"
"github.com/kubefirst/runtime/pkg/civo"
"github.com/kubefirst/runtime/pkg/digitalocean"
"github.com/kubefirst/runtime/pkg/dns"
Expand Down
2 changes: 1 addition & 1 deletion internal/controller/git.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ import (
terraformext "github.com/kubefirst/kubefirst-api/extensions/terraform"
vultrext "github.com/kubefirst/kubefirst-api/extensions/vultr"
gitShim "github.com/kubefirst/kubefirst-api/internal/gitShim"
"github.com/kubefirst/kubefirst-api/internal/telemetryShim"
"github.com/kubefirst/kubefirst-api/pkg/segment"
"github.com/kubefirst/kubefirst-api/pkg/telemetryShim"
"github.com/kubefirst/runtime/pkg/gitlab"
log "github.com/sirupsen/logrus"
)
Expand Down
2 changes: 1 addition & 1 deletion internal/controller/kbot.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ package controller
import (
"os"

"github.com/kubefirst/kubefirst-api/internal/telemetryShim"
"github.com/kubefirst/kubefirst-api/pkg/segment"
"github.com/kubefirst/kubefirst-api/pkg/telemetryShim"
internalssh "github.com/kubefirst/runtime/pkg/ssh"
log "github.com/sirupsen/logrus"
)
Expand Down
2 changes: 1 addition & 1 deletion internal/controller/repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ import (

"github.com/go-git/go-git/v5"
githttps "github.com/go-git/go-git/v5/plumbing/transport/http"
"github.com/kubefirst/kubefirst-api/internal/telemetryShim"
google "github.com/kubefirst/kubefirst-api/pkg/google"
"github.com/kubefirst/kubefirst-api/pkg/providerConfigs"
"github.com/kubefirst/kubefirst-api/pkg/segment"
"github.com/kubefirst/kubefirst-api/pkg/telemetryShim"
"github.com/kubefirst/runtime/pkg/civo"
"github.com/kubefirst/runtime/pkg/digitalocean"
"github.com/kubefirst/runtime/pkg/gitlab"
Expand Down
2 changes: 1 addition & 1 deletion internal/controller/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import (
"os"
"strings"

"github.com/kubefirst/kubefirst-api/internal/telemetryShim"
"github.com/kubefirst/kubefirst-api/pkg/segment"
"github.com/kubefirst/kubefirst-api/pkg/telemetryShim"
pkgtypes "github.com/kubefirst/kubefirst-api/pkg/types"
"github.com/kubefirst/runtime/pkg/civo"
"github.com/kubefirst/runtime/pkg/digitalocean"
Expand Down
2 changes: 1 addition & 1 deletion internal/controller/users.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ import (
googleext "github.com/kubefirst/kubefirst-api/extensions/google"
terraformext "github.com/kubefirst/kubefirst-api/extensions/terraform"
vultrext "github.com/kubefirst/kubefirst-api/extensions/vultr"
"github.com/kubefirst/kubefirst-api/internal/telemetryShim"
"github.com/kubefirst/kubefirst-api/pkg/segment"
"github.com/kubefirst/kubefirst-api/pkg/telemetryShim"
"github.com/kubefirst/runtime/pkg/k8s"
log "github.com/sirupsen/logrus"
)
Expand Down
2 changes: 1 addition & 1 deletion internal/controller/vault.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ import (
googleext "github.com/kubefirst/kubefirst-api/extensions/google"
terraformext "github.com/kubefirst/kubefirst-api/extensions/terraform"
vultrext "github.com/kubefirst/kubefirst-api/extensions/vultr"
"github.com/kubefirst/kubefirst-api/internal/telemetryShim"
"github.com/kubefirst/kubefirst-api/pkg/segment"
"github.com/kubefirst/kubefirst-api/pkg/telemetryShim"
"github.com/kubefirst/runtime/pkg/k8s"
vault "github.com/kubefirst/runtime/pkg/vault"
log "github.com/sirupsen/logrus"
Expand Down
2 changes: 1 addition & 1 deletion internal/router/api/v1/telemetry.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import (

"github.com/gin-gonic/gin"
"github.com/kubefirst/kubefirst-api/internal/db"
"github.com/kubefirst/kubefirst-api/internal/telemetryShim"
"github.com/kubefirst/kubefirst-api/internal/types"
"github.com/kubefirst/kubefirst-api/pkg/telemetryShim"
log "github.com/sirupsen/logrus"
)

Expand Down
7 changes: 3 additions & 4 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ import (
"github.com/kubefirst/kubefirst-api/docs"
"github.com/kubefirst/kubefirst-api/internal/db"
api "github.com/kubefirst/kubefirst-api/internal/router"
"github.com/kubefirst/kubefirst-api/internal/telemetryShim"
"github.com/kubefirst/kubefirst-api/internal/utils"
"github.com/kubefirst/kubefirst-api/pkg/telemetryShim"
log "github.com/sirupsen/logrus"
)

Expand Down Expand Up @@ -85,13 +85,12 @@ func main() {
log.Fatal(err)
}


if importedCluster.ClusterName != "" {
log.Infof("adding default services for cluster %s", importedCluster.ClusterName)
services.AddDefaultServices(&importedCluster)

// Call default environment create code if we imported a cluster
// execute default environment creation concurrently
// execute default environment creation concurrently
go func() {
log.Infof("adding default environments for cluster %s", importedCluster.ClusterName)
err := environments.CreateDefaultEnvironments(importedCluster)
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion providers/aws/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import (
"github.com/kubefirst/kubefirst-api/internal/controller"
"github.com/kubefirst/kubefirst-api/internal/db"
"github.com/kubefirst/kubefirst-api/internal/services"
"github.com/kubefirst/kubefirst-api/internal/telemetryShim"
"github.com/kubefirst/kubefirst-api/pkg/segment"
"github.com/kubefirst/kubefirst-api/pkg/telemetryShim"
pkgtypes "github.com/kubefirst/kubefirst-api/pkg/types"
awsinternal "github.com/kubefirst/runtime/pkg/aws"
"github.com/kubefirst/runtime/pkg/k8s"
Expand Down
2 changes: 1 addition & 1 deletion providers/aws/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ import (
"github.com/kubefirst/kubefirst-api/internal/constants"
"github.com/kubefirst/kubefirst-api/internal/db"
"github.com/kubefirst/kubefirst-api/internal/errors"
"github.com/kubefirst/kubefirst-api/internal/telemetryShim"
"github.com/kubefirst/kubefirst-api/pkg/providerConfigs"
"github.com/kubefirst/kubefirst-api/pkg/segment"
"github.com/kubefirst/kubefirst-api/pkg/telemetryShim"
pkgtypes "github.com/kubefirst/kubefirst-api/pkg/types"
"github.com/kubefirst/runtime/pkg"
"github.com/kubefirst/runtime/pkg/argocd"
Expand Down
2 changes: 1 addition & 1 deletion providers/civo/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import (
"github.com/kubefirst/kubefirst-api/internal/controller"
"github.com/kubefirst/kubefirst-api/internal/db"
"github.com/kubefirst/kubefirst-api/internal/services"
"github.com/kubefirst/kubefirst-api/internal/telemetryShim"
"github.com/kubefirst/kubefirst-api/pkg/segment"
"github.com/kubefirst/kubefirst-api/pkg/telemetryShim"
pkgtypes "github.com/kubefirst/kubefirst-api/pkg/types"
"github.com/kubefirst/runtime/pkg/k8s"
"github.com/kubefirst/runtime/pkg/ssl"
Expand Down
2 changes: 1 addition & 1 deletion providers/civo/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ import (
"github.com/kubefirst/kubefirst-api/internal/constants"
"github.com/kubefirst/kubefirst-api/internal/db"
"github.com/kubefirst/kubefirst-api/internal/errors"
"github.com/kubefirst/kubefirst-api/internal/telemetryShim"
"github.com/kubefirst/kubefirst-api/pkg/providerConfigs"
"github.com/kubefirst/kubefirst-api/pkg/segment"
"github.com/kubefirst/kubefirst-api/pkg/telemetryShim"
pkgtypes "github.com/kubefirst/kubefirst-api/pkg/types"
"github.com/kubefirst/runtime/pkg"
"github.com/kubefirst/runtime/pkg/argocd"
Expand Down
2 changes: 1 addition & 1 deletion providers/digitalocean/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import (
"github.com/kubefirst/kubefirst-api/internal/controller"
"github.com/kubefirst/kubefirst-api/internal/db"
"github.com/kubefirst/kubefirst-api/internal/services"
"github.com/kubefirst/kubefirst-api/internal/telemetryShim"
"github.com/kubefirst/kubefirst-api/pkg/segment"
"github.com/kubefirst/kubefirst-api/pkg/telemetryShim"
pkgtypes "github.com/kubefirst/kubefirst-api/pkg/types"
"github.com/kubefirst/runtime/pkg/k8s"
"github.com/kubefirst/runtime/pkg/ssl"
Expand Down
2 changes: 1 addition & 1 deletion providers/digitalocean/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ import (
"github.com/kubefirst/kubefirst-api/internal/constants"
"github.com/kubefirst/kubefirst-api/internal/db"
"github.com/kubefirst/kubefirst-api/internal/errors"
"github.com/kubefirst/kubefirst-api/internal/telemetryShim"
"github.com/kubefirst/kubefirst-api/pkg/providerConfigs"
"github.com/kubefirst/kubefirst-api/pkg/segment"
"github.com/kubefirst/kubefirst-api/pkg/telemetryShim"
pkgtypes "github.com/kubefirst/kubefirst-api/pkg/types"
"github.com/kubefirst/runtime/pkg"
"github.com/kubefirst/runtime/pkg/argocd"
Expand Down
2 changes: 1 addition & 1 deletion providers/google/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ import (
"github.com/kubefirst/kubefirst-api/internal/controller"
"github.com/kubefirst/kubefirst-api/internal/db"
"github.com/kubefirst/kubefirst-api/internal/services"
"github.com/kubefirst/kubefirst-api/internal/telemetryShim"
"github.com/kubefirst/kubefirst-api/pkg/google"
"github.com/kubefirst/kubefirst-api/pkg/segment"
"github.com/kubefirst/kubefirst-api/pkg/telemetryShim"
pkgtypes "github.com/kubefirst/kubefirst-api/pkg/types"
"github.com/kubefirst/runtime/pkg/k8s"
log "github.com/sirupsen/logrus"
Expand Down
2 changes: 1 addition & 1 deletion providers/google/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ import (
"github.com/kubefirst/kubefirst-api/internal/constants"
"github.com/kubefirst/kubefirst-api/internal/db"
"github.com/kubefirst/kubefirst-api/internal/errors"
"github.com/kubefirst/kubefirst-api/internal/telemetryShim"
"github.com/kubefirst/kubefirst-api/pkg/google"
"github.com/kubefirst/kubefirst-api/pkg/providerConfigs"
"github.com/kubefirst/kubefirst-api/pkg/segment"
"github.com/kubefirst/kubefirst-api/pkg/telemetryShim"
pkgtypes "github.com/kubefirst/kubefirst-api/pkg/types"
"github.com/kubefirst/runtime/pkg"
"github.com/kubefirst/runtime/pkg/argocd"
Expand Down
2 changes: 1 addition & 1 deletion providers/vultr/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import (
"github.com/kubefirst/kubefirst-api/internal/controller"
"github.com/kubefirst/kubefirst-api/internal/db"
"github.com/kubefirst/kubefirst-api/internal/services"
"github.com/kubefirst/kubefirst-api/internal/telemetryShim"
"github.com/kubefirst/kubefirst-api/pkg/segment"
"github.com/kubefirst/kubefirst-api/pkg/telemetryShim"
pkgtypes "github.com/kubefirst/kubefirst-api/pkg/types"
"github.com/kubefirst/runtime/pkg/k8s"
"github.com/kubefirst/runtime/pkg/ssl"
Expand Down
2 changes: 1 addition & 1 deletion providers/vultr/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ import (
"github.com/kubefirst/kubefirst-api/internal/constants"
"github.com/kubefirst/kubefirst-api/internal/db"
"github.com/kubefirst/kubefirst-api/internal/errors"
"github.com/kubefirst/kubefirst-api/internal/telemetryShim"
"github.com/kubefirst/kubefirst-api/pkg/providerConfigs"
"github.com/kubefirst/kubefirst-api/pkg/segment"
"github.com/kubefirst/kubefirst-api/pkg/telemetryShim"
pkgtypes "github.com/kubefirst/kubefirst-api/pkg/types"
runtime "github.com/kubefirst/runtime/pkg"
"github.com/kubefirst/runtime/pkg/argocd"
Expand Down

0 comments on commit 84f0a60

Please sign in to comment.