From 5e77e5f03af41610895ae26536b937cead6c0ab0 Mon Sep 17 00:00:00 2001 From: Heba Elayoty <31887807+helayoty@users.noreply.github.com> Date: Wed, 22 Mar 2023 14:04:06 -0700 Subject: [PATCH] chore: Remove unused files (#493) Signed-off-by: Heba Elayoty --- pkg/provider/aksCredential.go | 44 ----------------------------------- pkg/provider/example.toml | 8 ------- 2 files changed, 52 deletions(-) delete mode 100644 pkg/provider/aksCredential.go delete mode 100644 pkg/provider/example.toml diff --git a/pkg/provider/aksCredential.go b/pkg/provider/aksCredential.go deleted file mode 100644 index cb7f0963..00000000 --- a/pkg/provider/aksCredential.go +++ /dev/null @@ -1,44 +0,0 @@ -package provider - -import ( - "context" - "encoding/json" - "fmt" - "io/ioutil" - - "github.com/virtual-kubelet/virtual-kubelet/log" -) - -// aksCredential represents the credential file for AKS -type aksCredential struct { - Cloud string `json:"cloud"` - TenantID string `json:"tenantId"` - SubscriptionID string `json:"subscriptionId"` - ClientID string `json:"aadClientId"` - ClientSecret string `json:"aadClientSecret"` - ResourceGroup string `json:"resourceGroup"` - Region string `json:"location"` - VNetName string `json:"vnetName"` - VNetResourceGroup string `json:"vnetResourceGroup"` - UserAssignedIdentityID string `json:"userAssignedIdentityID"` -} - -// NewAKSCredential returns an aksCredential struct from file path -func NewAKSCredential(p string) (*aksCredential, error) { - logger := log.G(context.TODO()).WithField("method", "NewAKSCredential").WithField("file", p) - logger.Debug("Reading AKS credential file") - - b, err := ioutil.ReadFile(p) - if err != nil { - return nil, fmt.Errorf("reading AKS credential file %q failed: %v", p, err) - } - - // Unmarshal the authentication file. - var cred aksCredential - if err := json.Unmarshal(b, &cred); err != nil { - return nil, err - } - - logger.Debug("Load AKS credential file successfully") - return &cred, nil -} diff --git a/pkg/provider/example.toml b/pkg/provider/example.toml deleted file mode 100644 index 02af6ca4..00000000 --- a/pkg/provider/example.toml +++ /dev/null @@ -1,8 +0,0 @@ -# example configuration file for ACI virtual-kubelet - -Region = "westus" -ResourceGroup = "virtual-kubeletrg" -OperatingSystem = "Linux" -CPU = "100" -Memory = "100Gi" -Pods = "50"