Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:

- name: Cache Go module dependencies
id: cache-go-module-dependencies
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ~/go/pkg/mod
key: go-mod-cache-${{ runner.os }}-${{ env.GO_VERSION }}-${{ hashFiles('go.sum') }}
Expand All @@ -44,7 +44,7 @@ jobs:

- name: Cache licenses
id: cache-licenses
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: .licensei.cache
key: licensei-v1-${{ steps.set-git-refname.outputs.git_refname }}-${{ hashFiles('go.sum') }}
Expand Down Expand Up @@ -89,7 +89,7 @@ jobs:

- name: Cache Go module dependencies
id: cache-go-module-dependencies
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ~/go/pkg/mod
key: go-mod-cache-${{ runner.os }}-${{ env.GO_VERSION }}-${{ hashFiles('go.sum') }}
Expand All @@ -116,7 +116,7 @@ jobs:

- name: Restore Go module dependencies cache
id: cache-go-module-dependencies
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ~/go/pkg/mod
key: go-mod-cache-${{ runner.os }}-${{ env.GO_VERSION }}-${{ hashFiles('go.sum') }}
Expand All @@ -143,7 +143,7 @@ jobs:

- name: Restore Go module dependencies cache
id: cache-go-module-dependencies
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ~/go/pkg/mod
key: go-mod-cache-${{ runner.os }}-${{ env.GO_VERSION }}-${{ hashFiles('go.sum') }}
Expand Down
23 changes: 12 additions & 11 deletions internal/cloudinfo/providers/google/cloudinfo.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@ import (
const svcGke = "gke"

var regionNames = map[string]string{
"asia-east1": "Asia Pacific (Taiwan)",
"asia-east2": "Asia Pacific (Hong Kong)",
"asia-northeast1": "Asia Pacific (Tokyo)",
"asia-northeast2": "Asia Pacific (Osaka)",
"asia-northeast3": "Asia Pacific (Seoul)",
"asia-south1": "Asia Pacific (Mumbai)",
"asia-south2": "Asia Pacific (Delhi)",
"asia-southeast1": "Asia Pacific (Singapore)",
"asia-southeast2": "Asia Pacific (Jakarta)",
"asia-east1": "Asia Pacific (Taiwan)",
"asia-east2": "Asia Pacific (Hong Kong)",
"asia-northeast1": "Asia Pacific (Tokyo)",
"asia-northeast2": "Asia Pacific (Osaka)",
"asia-northeast3": "Asia Pacific (Seoul)",
"asia-south1": "Asia Pacific (Mumbai)",
"asia-south2": "Asia Pacific (Delhi)",
"asia-southeast1": "Asia Pacific (Singapore)",
"asia-southeast2": "Asia Pacific (Jakarta)",

"australia-southeast1": "Asia Pacific (Sydney)",
"australia-southeast2": "Asia Pacific (Melbourne)",
Expand Down Expand Up @@ -257,7 +257,8 @@ func (g *GceInfoer) Initialize() (map[string]map[string]types.Price, error) {
func isSupportedFamily(family string) bool {
return family == "a2" || family == "a3" || family == "c3" || family == "c3d" || family == "c4" ||
family == "e2" || family == "g2" || family == "h3" || family == "n2" || family == "n4" || family == "m3" ||
family == "c4a" || family == "t2a" || family == "n2d" || family == "c2d" || family == "t2d" || family == "z3"
family == "c4a" || family == "t2a" || family == "n2d" || family == "c2d" || family == "t2d" || family == "z3" ||
family == "c4d" || family == "m4" || family == "a4"
}

func (g *GceInfoer) getPrice() (map[string]map[string]map[string]float64, error) {
Expand Down Expand Up @@ -331,7 +332,7 @@ func (g *GceInfoer) getPrice() (map[string]map[string]map[string]float64, error)
}
resMatch := (descSplit[1] == "Instance" && (descSplit[2] == "Ram" || descSplit[2] == "Core")) ||
(descSplit[2] == "Instance" && (descSplit[3] == "Ram" || descSplit[3] == "Core") &&
(descSplit[1] == "Memory-optimized" || descSplit[1] == "Arm" || descSplit[1] == "AMD"))
(descSplit[1] == "Memory-optimized" || descSplit[1] == "Arm" || descSplit[1] == "AMD"))
if !resMatch {
continue
}
Expand Down
Loading