Skip to content

Commit

Permalink
Merge pull request #581 from danpaul81/fix-gcp
Browse files Browse the repository at this point in the history
update gke versioning
  • Loading branch information
andrewh1978 authored Dec 10, 2024
2 parents 175efe8 + 710c5a1 commit 7575212
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion defaults.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ gcp_region: europe-north1
gcp_zone: b
gcp_type: n1-standard-4
gcp_disks: "pd-standard:50"
gke_version: "1.28.14"
gke_version: "1.30"
#gcp_disks: "pd-standard:20 pd-ssd:30"
#gcp_project: "px-deploy"

Expand Down
2 changes: 1 addition & 1 deletion gcp.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func gcp_container_connect(Auth_Json string) (*container.Service, error) {
return containerService, nil
}

func gcp_get_instances(deployment string, config *Config) ([]string, error) {
func gcp_get_instances(config *Config) ([]string, error) {
var instances []string

computeService, err := gcp_compute_connect(config.Gcp_Auth_Json)
Expand Down
5 changes: 3 additions & 2 deletions px-deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,8 @@ func validate_config(config *Config) []string {
errormsg = append(errormsg, "Invalid GCP zone '"+config.Gcp_Zone+"'")
}

if !regexp.MustCompile(`^[0-9]+\.[0-9]+\.[0-9]+`).MatchString(config.Gke_Version) {
//if !regexp.MustCompile(`^[0-9]+\.[0-9]+\.[0-9]+`).MatchString(config.Gke_Version) {
if !regexp.MustCompile(`^[0-9]+\.[0-9]+`).MatchString(config.Gke_Version) {
errormsg = append(errormsg, "Invalid GKE version '"+config.Gke_Version+"'")
}

Expand Down Expand Up @@ -1299,7 +1300,7 @@ func destroy_deployment(name string, destroyForce bool) {

prepare_predelete(&config, "script", destroyForce)

instances, err := gcp_get_instances(config.Name, &config)
instances, err := gcp_get_instances(&config)
if err != nil {
die("error listing gcp instances")
}
Expand Down
2 changes: 1 addition & 1 deletion terraform/gcp/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = "5.30.0"
version = "6.12.0"
}
local = {
source = "hashicorp/local"
Expand Down

0 comments on commit 7575212

Please sign in to comment.