Skip to content

Commit f46b612

Browse files
authored
Add containerinfra nodegroup support (terraform-provider-openstack#1364)
* Add containerinfra nodegroup resource Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@cern.ch> * Add containerinfra nodegroup data source Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@cern.ch> * Add containerinfra cluster zero node count support Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@cern.ch> * Add containerinfra nodegroup zero node count support Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@cern.ch> * Add containerinfra nodegroup resize node count support Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@cern.ch> * Fix containerinfra cluster mergelabels behavior When you add mergelabels and you actually add labels, the magnum API will actually return you the complete set of labels under the "labels" key. It means that if you want to add/override a couple of label while setting merge_labels the creation will succeed but then terraform will detect the rest of the labels as changed and will try to rebuid the cluster. This commit instead use the keys labels_{added,skipped,overriden} when merge labels which contains the labels that the user has overriden. Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@cern.ch> * Add containerinfra nodegroup support for mergelabels Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@cern.ch> * Fix container infra nodegroup golangci-lint errors Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@cern.ch> * Fix container infra nodegroup image_id and flavor_id Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@cern.ch> * Fix containerinfra cluster template image/flavor_id Previously the code set image_id and flavor_id which doesn't exist instead of image/flavor. It would be way more meaningful to have argument image_id and flavor_id instead but for backward compatibility let's not do that for now. Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@cern.ch> * Add OS_MAGNUM_IMAGE to containerinfra acceptance tests As fedora atomic is no more available, we remove it from the code and add OS_MAGNUM_IMAGE environment variable so that we can a supported image in the CI later on. Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@cern.ch> * Make container infra cluster aware of default worker nodegroup The node_count returned in magnum for the cluster is the sum of all nodegroup. So once you add a node_count, the correct value is actually the node_count of the default worker node. This commit take the node_count of this default worker node group in priority and if there are any errors it takes the node_count of the cluster instead. Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@cern.ch> * Fix container infra nodegroup acceptance tests Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@cern.ch>
1 parent 9575669 commit f46b612

17 files changed

Lines changed: 1139 additions & 87 deletions

‎go.mod‎

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -3,61 +3,61 @@ module github.com/terraform-provider-openstack/terraform-provider-openstack
33
go 1.17
44

55
require (
6-
github.com/gophercloud/gophercloud v0.24.0
6+
github.com/gophercloud/gophercloud v0.25.0
77
github.com/gophercloud/utils v0.0.0-20220307143606-8e7800759d16
8-
github.com/hashicorp/terraform-plugin-sdk/v2 v2.16.0
8+
github.com/hashicorp/terraform-plugin-sdk/v2 v2.17.0
99
github.com/mitchellh/go-homedir v1.1.0
10-
github.com/stretchr/testify v1.7.1
11-
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c // indirect
10+
github.com/stretchr/testify v1.7.2
1211
gopkg.in/yaml.v2 v2.4.0
1312
)
1413

1514
require (
16-
github.com/agext/levenshtein v1.2.2 // indirect
15+
github.com/agext/levenshtein v1.2.3 // indirect
1716
github.com/apparentlymart/go-cidr v1.1.0 // indirect
1817
github.com/apparentlymart/go-textseg/v13 v13.0.0 // indirect
1918
github.com/davecgh/go-spew v1.1.1 // indirect
20-
github.com/fatih/color v1.7.0 // indirect
19+
github.com/fatih/color v1.13.0 // indirect
2120
github.com/golang/protobuf v1.5.2 // indirect
2221
github.com/google/go-cmp v0.5.8 // indirect
23-
github.com/hashicorp/errwrap v1.0.0 // indirect
22+
github.com/hashicorp/errwrap v1.1.0 // indirect
2423
github.com/hashicorp/go-checkpoint v0.5.0 // indirect
2524
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
2625
github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 // indirect
27-
github.com/hashicorp/go-hclog v1.2.0 // indirect
26+
github.com/hashicorp/go-hclog v1.2.1 // indirect
2827
github.com/hashicorp/go-multierror v1.1.1 // indirect
29-
github.com/hashicorp/go-plugin v1.4.3 // indirect
28+
github.com/hashicorp/go-plugin v1.4.4 // indirect
3029
github.com/hashicorp/go-uuid v1.0.3 // indirect
31-
github.com/hashicorp/go-version v1.4.0 // indirect
30+
github.com/hashicorp/go-version v1.5.0 // indirect
3231
github.com/hashicorp/hc-install v0.3.2 // indirect
3332
github.com/hashicorp/hcl/v2 v2.12.0 // indirect
3433
github.com/hashicorp/logutils v1.0.0 // indirect
3534
github.com/hashicorp/terraform-exec v0.16.1 // indirect
36-
github.com/hashicorp/terraform-json v0.13.0 // indirect
37-
github.com/hashicorp/terraform-plugin-go v0.9.0 // indirect
38-
github.com/hashicorp/terraform-plugin-log v0.4.0 // indirect
39-
github.com/hashicorp/terraform-registry-address v0.0.0-20210412075316-9b2996cce896 // indirect
35+
github.com/hashicorp/terraform-json v0.14.0 // indirect
36+
github.com/hashicorp/terraform-plugin-go v0.9.1 // indirect
37+
github.com/hashicorp/terraform-plugin-log v0.4.1 // indirect
38+
github.com/hashicorp/terraform-registry-address v0.0.0-20220510144317-d78f4a47ae27 // indirect
4039
github.com/hashicorp/terraform-svchost v0.0.0-20200729002733-f050f53b9734 // indirect
41-
github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d // indirect
42-
github.com/mattn/go-colorable v0.1.4 // indirect
43-
github.com/mattn/go-isatty v0.0.10 // indirect
40+
github.com/hashicorp/yamux v0.0.0-20211028200310-0bc27b27de87 // indirect
41+
github.com/mattn/go-colorable v0.1.12 // indirect
42+
github.com/mattn/go-isatty v0.0.14 // indirect
4443
github.com/mitchellh/copystructure v1.2.0 // indirect
4544
github.com/mitchellh/go-testing-interface v1.14.1 // indirect
46-
github.com/mitchellh/go-wordwrap v1.0.0 // indirect
45+
github.com/mitchellh/go-wordwrap v1.0.1 // indirect
4746
github.com/mitchellh/mapstructure v1.5.0 // indirect
4847
github.com/mitchellh/reflectwalk v1.0.2 // indirect
49-
github.com/oklog/run v1.0.0 // indirect
48+
github.com/oklog/run v1.1.0 // indirect
5049
github.com/pmezard/go-difflib v1.0.0 // indirect
5150
github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect
5251
github.com/vmihailenco/msgpack/v4 v4.3.12 // indirect
53-
github.com/vmihailenco/tagparser v0.1.1 // indirect
52+
github.com/vmihailenco/tagparser v0.1.2 // indirect
5453
github.com/zclconf/go-cty v1.10.0 // indirect
55-
golang.org/x/crypto v0.0.0-20211202192323-5770296d904e // indirect
56-
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2 // indirect
57-
golang.org/x/text v0.3.6 // indirect
58-
google.golang.org/appengine v1.6.6 // indirect
59-
google.golang.org/genproto v0.0.0-20200711021454-869866162049 // indirect
60-
google.golang.org/grpc v1.45.0 // indirect
54+
golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e // indirect
55+
golang.org/x/net v0.0.0-20220615171555-694bf12d69de // indirect
56+
golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c // indirect
57+
golang.org/x/text v0.3.7 // indirect
58+
google.golang.org/appengine v1.6.7 // indirect
59+
google.golang.org/genproto v0.0.0-20220615141314-f1464d18c36b // indirect
60+
google.golang.org/grpc v1.47.0 // indirect
6161
google.golang.org/protobuf v1.28.0 // indirect
62-
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c // indirect
62+
gopkg.in/yaml.v3 v3.0.1 // indirect
6363
)

0 commit comments

Comments
 (0)