Skip to content

Commit

Permalink
fix tag node (use region not zone) (#124)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexei-led authored Oct 31, 2023
1 parent b550647 commit 3739de4
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
15 changes: 15 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# code coverage
.cover
coverage.out

# git repo
.git
Expand All @@ -10,10 +11,24 @@

# binaries
.bin
.run

# examples
examples

# linter
golangci-lint.out

# env customization
.env
.in

# Test binary, build with `go test -c`
*.test
test-report.out

# SonarQube
.scannerwork

# temp
.DS_Store
5 changes: 3 additions & 2 deletions pkg/kipcompute/compute.go
Original file line number Diff line number Diff line change
Expand Up @@ -422,8 +422,9 @@ func AddTagIfMissing(projectID string, instance string, zone string, config *cfg
ip = config.NatIP
}
}
if isAddressReserved(ip, zone[:len(zone)-2], projectID, config) {
addressDetails, err := getAddressDetails(ip, zone, projectID, config)
region := zone[:len(zone)-2]
if isAddressReserved(ip, region, projectID, config) {
addressDetails, err := getAddressDetails(ip, region, projectID, config)
if err != nil {
return
}
Expand Down

0 comments on commit 3739de4

Please sign in to comment.