Skip to content

Commit

Permalink
Merge branch 'master' into feature/beta-cluster
Browse files Browse the repository at this point in the history
  • Loading branch information
morgante authored Jun 19, 2019
2 parents 26c520d + 88eb7b0 commit 2d2e4fe
Show file tree
Hide file tree
Showing 11 changed files with 17 additions and 58 deletions.
10 changes: 10 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.git
.terraform
.terraform.d
.kitchen
terraform.tfstate.d
test/fixtures/*/.terraform
test/fixtures/*/terraform.tfstate.d
examples/.kitchen
examples/*/.terraform
examples/*/terraform.tfstate.d
12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ docker_run:
-e SERVICE_ACCOUNT_JSON \
-e CLOUDSDK_AUTH_CREDENTIAL_FILE_OVERRIDE=${CREDENTIALS_PATH} \
-e GOOGLE_APPLICATION_CREDENTIALS=${CREDENTIALS_PATH} \
-v $(CURDIR):/cft/workdir \
-v "$(CURDIR)":/cft/workdir \
${DOCKER_IMAGE_KITCHEN_TERRAFORM}:${DOCKER_TAG_KITCHEN_TERRAFORM} \
/bin/bash -c "source test/ci_integration.sh && setup_environment && exec /bin/bash"

Expand All @@ -139,7 +139,7 @@ docker_create: docker_build_kitchen_terraform
-e SERVICE_ACCOUNT_JSON \
-e CLOUDSDK_AUTH_CREDENTIAL_FILE_OVERRIDE=${CREDENTIALS_PATH} \
-e GOOGLE_APPLICATION_CREDENTIALS=${CREDENTIALS_PATH} \
-v $(CURDIR):/cft/workdir \
-v "$(CURDIR)":/cft/workdir \
${DOCKER_IMAGE_KITCHEN_TERRAFORM}:${DOCKER_TAG_KITCHEN_TERRAFORM} \
/bin/bash -c "source test/ci_integration.sh && setup_environment && kitchen create"

Expand All @@ -153,7 +153,7 @@ docker_converge:
-e SERVICE_ACCOUNT_JSON \
-e CLOUDSDK_AUTH_CREDENTIAL_FILE_OVERRIDE=${CREDENTIALS_PATH} \
-e GOOGLE_APPLICATION_CREDENTIALS=${CREDENTIALS_PATH} \
-v $(CURDIR):/cft/workdir \
-v "$(CURDIR)":/cft/workdir \
${DOCKER_IMAGE_KITCHEN_TERRAFORM}:${DOCKER_TAG_KITCHEN_TERRAFORM} \
/bin/bash -c "source test/ci_integration.sh && setup_environment && kitchen converge && kitchen converge"

Expand All @@ -167,7 +167,7 @@ docker_verify:
-e SERVICE_ACCOUNT_JSON \
-e CLOUDSDK_AUTH_CREDENTIAL_FILE_OVERRIDE=${CREDENTIALS_PATH} \
-e GOOGLE_APPLICATION_CREDENTIALS=${CREDENTIALS_PATH} \
-v $(CURDIR):/cft/workdir \
-v "$(CURDIR)":/cft/workdir \
${DOCKER_IMAGE_KITCHEN_TERRAFORM}:${DOCKER_TAG_KITCHEN_TERRAFORM} \
/bin/bash -c "source test/ci_integration.sh && setup_environment && kitchen verify"

Expand All @@ -181,7 +181,7 @@ docker_destroy:
-e SERVICE_ACCOUNT_JSON \
-e CLOUDSDK_AUTH_CREDENTIAL_FILE_OVERRIDE=${CREDENTIALS_PATH} \
-e GOOGLE_APPLICATION_CREDENTIALS=${CREDENTIALS_PATH} \
-v $(CURDIR):/cft/workdir \
-v "$(CURDIR)":/cft/workdir \
${DOCKER_IMAGE_KITCHEN_TERRAFORM}:${DOCKER_TAG_KITCHEN_TERRAFORM} \
/bin/bash -c "source test/ci_integration.sh && setup_environment && kitchen destroy"

Expand All @@ -193,6 +193,6 @@ test_integration_docker:
-e REGION \
-e ZONES \
-e SERVICE_ACCOUNT_JSON \
-v $(CURDIR):/cft/workdir \
-v "$(CURDIR)":/cft/workdir \
${DOCKER_IMAGE_KITCHEN_TERRAFORM}:${DOCKER_TAG_KITCHEN_TERRAFORM} \
/bin/bash -c "test/ci_integration.sh"
5 changes: 0 additions & 5 deletions autogen/cluster_regional.tf
Original file line number Diff line number Diff line change
Expand Up @@ -163,11 +163,6 @@ resource "google_container_node_pool" "pools" {
"${concat(var.node_pools_oauth_scopes["all"],
var.node_pools_oauth_scopes[lookup(var.node_pools[count.index], "name")])}",
]

guest_accelerator {
type = "${lookup(var.node_pools[count.index], "accelerator_type", "")}"
count = "${lookup(var.node_pools[count.index], "accelerator_count", 0)}"
}
}

lifecycle {
Expand Down
5 changes: 0 additions & 5 deletions autogen/cluster_zonal.tf
Original file line number Diff line number Diff line change
Expand Up @@ -163,11 +163,6 @@ resource "google_container_node_pool" "zonal_pools" {
"${concat(var.node_pools_oauth_scopes["all"],
var.node_pools_oauth_scopes[lookup(var.node_pools[count.index], "name")])}",
]

guest_accelerator {
type = "${lookup(var.node_pools[count.index], "accelerator_type", "")}"
count = "${lookup(var.node_pools[count.index], "accelerator_count", 0)}"
}
}

lifecycle {
Expand Down
5 changes: 0 additions & 5 deletions cluster_regional.tf
Original file line number Diff line number Diff line change
Expand Up @@ -144,11 +144,6 @@ resource "google_container_node_pool" "pools" {
"${concat(var.node_pools_oauth_scopes["all"],
var.node_pools_oauth_scopes[lookup(var.node_pools[count.index], "name")])}",
]

guest_accelerator {
type = "${lookup(var.node_pools[count.index], "accelerator_type", "")}"
count = "${lookup(var.node_pools[count.index], "accelerator_count", 0)}"
}
}

lifecycle {
Expand Down
5 changes: 0 additions & 5 deletions cluster_zonal.tf
Original file line number Diff line number Diff line change
Expand Up @@ -144,11 +144,6 @@ resource "google_container_node_pool" "zonal_pools" {
"${concat(var.node_pools_oauth_scopes["all"],
var.node_pools_oauth_scopes[lookup(var.node_pools[count.index], "name")])}",
]

guest_accelerator {
type = "${lookup(var.node_pools[count.index], "accelerator_type", "")}"
count = "${lookup(var.node_pools[count.index], "accelerator_count", 0)}"
}
}

lifecycle {
Expand Down
2 changes: 0 additions & 2 deletions examples/node_pool/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@ module "gke" {
max_count = 2
disk_size_gb = 30
disk_type = "pd-standard"
accelerator_count = 1
accelerator_type = "nvidia-tesla-p4"
image_type = "COS"
auto_repair = false
service_account = "${var.compute_engine_service_account}"
Expand Down
5 changes: 0 additions & 5 deletions modules/private-cluster/cluster_regional.tf
Original file line number Diff line number Diff line change
Expand Up @@ -152,11 +152,6 @@ resource "google_container_node_pool" "pools" {
"${concat(var.node_pools_oauth_scopes["all"],
var.node_pools_oauth_scopes[lookup(var.node_pools[count.index], "name")])}",
]

guest_accelerator {
type = "${lookup(var.node_pools[count.index], "accelerator_type", "")}"
count = "${lookup(var.node_pools[count.index], "accelerator_count", 0)}"
}
}

lifecycle {
Expand Down
5 changes: 0 additions & 5 deletions modules/private-cluster/cluster_zonal.tf
Original file line number Diff line number Diff line change
Expand Up @@ -152,11 +152,6 @@ resource "google_container_node_pool" "zonal_pools" {
"${concat(var.node_pools_oauth_scopes["all"],
var.node_pools_oauth_scopes[lookup(var.node_pools[count.index], "name")])}",
]

guest_accelerator {
type = "${lookup(var.node_pools[count.index], "accelerator_type", "")}"
count = "${lookup(var.node_pools[count.index], "accelerator_count", 0)}"
}
}

lifecycle {
Expand Down
14 changes: 0 additions & 14 deletions test/integration/node_pool/controls/gcloud.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
location = attribute('location')
cluster_name = attribute('cluster_name')

expected_accelerators_count = "1"
expected_accelerators_type = "nvidia-tesla-p4"

control "gcloud" do
title "Google Compute Engine GKE configuration"
Expand Down Expand Up @@ -204,18 +202,6 @@
)
end

it "has the expected accelerators" do
expect(data['nodePools']).to include(
including(
"name" => "pool-02",
"config" => including(
"accelerators" => [{"acceleratorCount" => expected_accelerators_count,
"acceleratorType" => expected_accelerators_type}],
),
)
)
end

it "has the expected disk size" do
expect(data['nodePools']).to include(
including(
Expand Down
7 changes: 1 addition & 6 deletions test/integration/node_pool/controls/kubectl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,7 @@
effect: "PreferNoSchedule",
key: "all-pools-example",
value: "true",
},
{
effect: "NoSchedule",
key: "nvidia.com/gpu",
value: "present",
},
}
])
end
end
Expand Down

0 comments on commit 2d2e4fe

Please sign in to comment.