Commit Graph

56 Commits

Author SHA1 Message Date
Dana Hoffman
d78725f866
fix ipallocationpolicy test (#1465) 2018-05-09 16:57:01 -07:00
Dana Hoffman
8907321d60
Roll forward beta scaffolding PR (#1453)
* Revert "Merge pull request #1434 from terraform-providers/paddy_revert_beta"

This reverts commit 118cd71201, reversing
changes made to d59fcbbc59.

* add ConvertSelfLinkToV1 calls to places where beta links are stored
2018-05-09 11:24:40 -07:00
Paddy Carver
f91c62d598 Revert "remove switch statements between api versions for container"
This reverts commit 9c85e57b8c7e84de385995df7ca04dd93e843f5b.
2018-05-04 07:52:42 -07:00
Dana Hoffman
d59fcbbc59
Remove switch statements between api versions for container; clean up dead version code (#1427)
* remove switch statements between api versions for container

* remove dead api version code and move things around
2018-05-03 21:51:54 -07:00
emily
ac64624adc
Add issue_client_certificate to cluster (#1396) 2018-04-27 18:06:26 -07:00
Darren Haken
2b1b668953 #1300 Supporting regional clusters for node pools (#1320)
This PR also switched us to using the beta API in all cases, and that had a side effect which is worth noting, note included here for posterity.

=====
The problem is, we add a GPU, and as per the docs, GKE adds a taint to
the node pool saying "don't schedule here unless you tolerate GPUs",
which is pretty sensible.

Terraform doesn't know about that, because it didn't ask for the taint
to be added. So after apply, on refresh, it sees the state of the world
(1 taint) and the state of the config (0 taints) and wants to set the
world equal to the config. This introduces a diff, which makes the test
fail - tests fail if there's a diff after they run.

Taints are a beta feature, though. :) And since the config doesn't
contain any taints, terraform didn't see any beta features in that node
pool ... so it used to send the request to the v1 API. And since the v1
API didn't return anything about taints (since they're a beta feature),
terraform happily checked the state of the world (0 taints I know about)
vs the config (0 taints), and all was well.

This PR makes every node pool refresh request hit the beta API. So now
terraform finds out about the taints (which were always there) and the
test fails (which it always should have done).

The solution is probably to write a little bit of code which suppresses
the report of the diff of any taint with value 'nvidia.com/gpu', but
only if GPUs are enabled. I think that's something that can be done.
2018-04-24 17:55:21 -07:00
Nathan McKinley
039e82cf6d
Regional cluster update support for additional zones (#1359) 2018-04-19 14:17:38 -07:00
Nathan McKinley
92d98fc8e1
Make sure that additional zones are added-then-removed instead of all at once. (#1354) 2018-04-18 17:29:07 -07:00
ashish-amarnath
f488a6e6bf Add support for regional GKE clusters in google_container_cluster (#1181)
* Add support for regional GKE clusters in google_container_cluster:

* implement operation wait for v1beta1 api
* implement container clusters get for regional clusters
* implement container clusters delete for regional cluster
* implement container clusters update for regional cluster
* simplify logic by using generic 'location' instead of 'zone' and 'region'
* implement a method to generate the update function and refactor
* rebase and fix

* reorder container_operation fns

* cleanup

* add import support and docs

* additional locations cleanup
2018-04-05 14:51:35 -07:00
Michael Parker
b8adcc28fe Updates container_cluster to set enable_legacy_abac to false by default (#1281)
* Updates the default GKE legacy ABAC setting to false

* Updates docs for container_cluster

* Update test comments

* Format fix

* Adds ImportState test step to default legacy ABAC test
2018-04-04 10:58:08 -07:00
emily
360260d8d0
Add project to container cluster import name. (#1282)
* allow import of container cluster by project as well

* update docs for importing container cluster with project

* combine tests
2018-04-03 13:39:28 -07:00
Janos Lenart
1840363c74 Adding private_cluster (#1250)
* Updated google.golang.org/api/container/v1beta1

* Added support for private_cluster and master_ipv4_cidr

This is to implement #1174. See
https://groups.google.com/forum/#!topic/google-cloud-sdk-announce/GGW3SQSANIc

* Added simple test for private_cluster and master_ipv4_cidr

* Review replies

* Added some documentation for private_cluster
2018-03-30 10:10:25 -07:00
Dana Hoffman
42cca119eb add gke taints 2018-03-27 14:55:42 -07:00
Dana Hoffman
685842410e
Add update support for pod security policy (#1195)
* move setid calls back

* Revert "move setid calls back"

This reverts commit 0c7b2dbf92aff33dac8c5beb95568c2bc86dd7de.

* add update support for pod security policy

* update test

* add comment about updates
2018-03-23 11:27:37 -07:00
Dana Hoffman
95f96674a8
add ability to delete the default node pool (#1245) 2018-03-22 17:22:44 -07:00
Dana Hoffman
462c4cebc8
importify gke tests (#1204)
* importify gke tests

* fix typo

* add in missed tests after merge

* remove import-specific tests

* fixes based on tests that failed
2018-03-15 17:08:39 -07:00
Nathan McKinley
e717edb7a6
Add network policy config. (#1200) 2018-03-15 14:50:24 -07:00
Dana Hoffman
fe8ceed1d5
Add support for GKE metadata concealment (#1199)
* add support for gke metadata concealment

* docs for metadata concealment
2018-03-15 13:28:30 -07:00
Dana Hoffman
65147fd23e
Add support for pod security policy (#1192)
* move setid calls back

* add support for pod security policy

* pod security policy docs

* Revert "move setid calls back"

This reverts commit 0c7b2dbf92aff33dac8c5beb95568c2bc86dd7de.

* cleanup

* remove comments about disabling update
2018-03-14 14:00:31 -07:00
Dana Hoffman
9ae7a8ddb0
test fixes (#1185) 2018-03-12 13:18:39 -07:00
Nathan McKinley
58a7ef9d03
Fix incorrect result on Read ignoring most authorized networks. (#1097) 2018-03-01 13:19:18 -08:00
Vincent Roseberry
90b9fa1208
Remove master_auth from test that don't need it (#1049) 2018-02-05 11:15:03 -08:00
Emily Ye
10ef26a905 actually fix container_network_policy diff suppress and add test 2018-02-01 10:25:12 -08:00
Dana Hoffman
92b9984dae
fix gke tests (#977) 2018-01-18 09:51:55 -08:00
Michael Bannister
18534c9e7d Don't recreate container_cluster when maintenance_window changes (#893)
* Don't recreate container_cluster when maintenance_window changes

Fixes #727

* Omit ForceNew when false

Review comments for PR #893

* Move MaintenancePolicy mapping logic into expand/flatten functions

Review comments for PR #893

* Improve acceptance test for maintenance window update/removal

Review comments for PR #893
2017-12-27 12:29:14 -08:00
Vincent Roseberry
9930daa2af
Always use a function to create a test config (#785) 2017-11-27 16:32:00 -08:00
Vincent Roseberry
a9fd5fddcb
Detect changes to cloud storage object when using source field. (#789)
* Detect server or local changes to bucket object when using source field

* Improve tests by removing global err and tf vars

* Address Dana's comments
2017-11-27 16:25:32 -08:00
David Quarles
d57db91143 add support for ip aliasing in google_container_cluster (#654)
* add support for ip aliasing in `google_container_cluster`

* [review] cleanup galore, infer feature enablement from `ip_allocation_policy`

* [review] cleanup, round 2

* add nil check back (when reading ip allocation policy from API)
2017-11-27 18:15:03 -05:00
Sébastien GLON
39f22ef924 [WIP] Add container cluster network policy addon (#630)
* replalce TypeList by TypeSet

* Add network policy

* test improvement

* correct test

* Add cluster network polocy enabled

* Replalce network_policy addons by global network_policy enabled

* Update node_config.go

* Update resource_container_cluster.go

* clean

* clean

* Correct PR

* COrrect PR

* pr

* fix test to use same name

* add more documentation
2017-11-27 15:40:07 -05:00
Michael Bannister
12060f9f3d Add support for maintenance window on google_container_cluster (#670)
* Add support for maintenance window on google_container_cluster (#526)

* Address review comments

- Set ForceNew: true on the schema element daily_maintenance_window
- Correct resource name in acceptance test
- Correct documentation of resource attribute maintenance_policy.0.daily_maintenance_window.0.duration
2017-11-07 15:42:11 -08:00
Dana Hoffman
7f9f7201a8
make setFields a list of regexps (#696) 2017-11-07 11:27:05 -08:00
David Quarles
ca7551c8c5 Add support for master authorized networks in google_container_cluster (#626)
* Add support for master authorized networks in `google_container_cluster`

* [review] remove enabled flag / restructure schema

- remove `google_container_cluster.master_authorized_networks_config.enabled`
- add `display_name` and restructure schema as follows:
    master_authorized_networks_config {
        cidr_blocks {
            cidr_block   = "0.0.0.0/0"
            display_name = "foo"
        }
    }
- amend tests

* [review] add test for validateRFC1918Network, fix acc test
2017-11-02 10:38:20 -07:00
Henry Bell
026d76616d Add support for Kubernetes alpha features (#646)
* Add support for Kubernetes alpha features

* Add tests for support of Kubernetes alpha features

* Fix dodgy copy and paste operations

* Add documentation
2017-10-31 16:38:18 -07:00
David Quarles
1a8f3b8d18 Add support for CPU Platform in google_container_node_pool (#622)
* update container/v1 API

* add support for CPU Platform in `google_container_node_pool`

* fix broken links
2017-10-25 14:08:48 -07:00
Sébastien GLON
1f954e0131 Add sort on google_container_cluster auth_scopes (#506)
* replalce TypeList by TypeSet

* Add migrate function and test

* CORRECT

* remove migrate

* fix tests
2017-10-25 13:41:42 -07:00
Dana Hoffman
7c2bf7f4a7 make addons_config updatable (#597) 2017-10-20 09:47:07 -07:00
Dana Hoffman
62eb5ceedf Allow updating google_container_cluster.monitoring_service (#598) 2017-10-20 09:46:21 -07:00
Joe Selman
4b77dca918 Revert "Revert "Add t.Parallel to all acceptance tests (#558)""
This reverts commit 8ab9d96d25 and revives
the original commit that adds t.Parallel to all acceptance tests. It
turns out test failures were unrelated to this change (rather, they were
related to quota issues).
2017-10-12 15:07:29 -07:00
Dana Hoffman
811530f145 Fix cluster version upgrades (#577)
* wait for running status on a cluster on read

* add min_master_version field

* respond to comments

* add docs

* no node_version on create
2017-10-12 11:21:33 -07:00
Joe Selman
8ab9d96d25 Revert "Add t.Parallel to all acceptance tests (#558)"
This reverts commit 42de44592f. It appears
there might be thread-safety issues as panics have started occuring when
parallism is ramped up. Reverting for now while investigating.
2017-10-10 17:55:34 -07:00
Joe Selman
42de44592f Add t.Parallel to all acceptance tests (#558) 2017-10-10 16:28:00 -07:00
Dana Hoffman
d67bf7b3fc add master_version to container cluster (#538) 2017-10-06 15:48:01 -07:00
Dana Hoffman
bb0ab8e1f6 Merge the schemas and logic for the node pool resource and the node pool field in the cluster to aid in maintainability (#489) 2017-10-03 17:09:34 -07:00
Joe Selman
475ddb1b5b Add kubernetes dashboard addon (#464)
* Update google.golang.org/api/container/v1

* Add support for kubernetes_dashboard addon

* Fix tab/spaces issue in string
2017-10-03 09:29:27 -07:00
Anders Bruun Olsen
67b7b2dd72 Container cluster importable (#391) 2017-09-07 10:31:58 -07:00
Joe Selman
0605638885 Add preemptible as an option to node config (#341)
* Add preemptible as an option to node config

* Check for preemptible in test matching functions

* Move flattenClusterNodeConfig to node_config

* Handle bools properly when comparing in cluster and node pool tests

* Use a supported image_type in cluster tests
2017-09-01 13:02:26 -07:00
Dana Hoffman
07cf281372 allow updating google_container_cluster.logging_service (#343) 2017-08-18 15:29:51 -07:00
Dana Hoffman
4cbc859de3 Add support for resizing a node pool defined in google_container_cluster (#331)
* Add support for resizing a node pool defined in google_container_cluster

* add initial node count back but make it deprecated
2017-08-17 17:51:58 -07:00
Roberto Jung Drebes
5602218586 allow configuring node_config of node_pools specified in container_cluster (#299) 2017-08-11 12:23:17 -07:00
Dana Hoffman
e9e9f835ec Allow upgrading GKE versions and provide better error message handling (#291)
* Better error handling for GKE operations

* Handle GKE version upgrades

* clarify log message
2017-08-08 11:31:12 -07:00