Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
radiant-cluster
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
kubernetes
radiant-cluster
Commits
0c2fbcd5
Commit
0c2fbcd5
authored
2 years ago
by
Rob Kooper
Browse files
Options
Downloads
Patches
Plain Diff
add availability zone
parent
0367145e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CHANGELOG.md
+5
-0
5 additions, 0 deletions
CHANGELOG.md
terraform/modules/rke1/nodes.tf
+20
-15
20 additions, 15 deletions
terraform/modules/rke1/nodes.tf
terraform/modules/rke1/variables.tf
+6
-0
6 additions, 0 deletions
terraform/modules/rke1/variables.tf
with
31 additions
and
15 deletions
CHANGELOG.md
+
5
−
0
View file @
0c2fbcd5
...
...
@@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file.
The format is based on
[
Keep a Changelog
](
http://keepachangelog.com/
)
and this project adheres to
[
Semantic Versioning
](
http://semver.org/
)
.
## 1.2.2 - 2022-10-24
### Changed
-
compute nodes in rke1 now set availability zone (default nova), availabilty zone is ignored for existing nodes.
## 1.2.1 - 2022-10-13
### Changed
...
...
This diff is collapsed.
Click to expand it.
terraform/modules/rke1/nodes.tf
+
20
−
15
View file @
0c2fbcd5
locals
{
controlplane
=
[
for
l
in
range
(
var
.
controlplane_count
)
:
var
.
old_hostnames
?
format
(
"%s-controlplane-%d"
,
var
.
cluster_name
,
l
)
:
format
(
"%s-controlplane-%d"
,
var
.
cluster_name
,
l
+
1
)]
worker
=
[
for
l
in
range
(
var
.
worker_count
)
:
var
.
old_hostnames
?
format
(
"%s-worker-%d"
,
var
.
cluster_name
,
l
)
:
format
(
"%s-worker-%02d"
,
var
.
cluster_name
,
l
+
1
)]
controlplane
=
[
for
l
in
range
(
var
.
controlplane_count
)
:
var
.
old_hostnames
?
format
(
"%s-controlplane-%d"
,
var
.
cluster_name
,
l
)
:
format
(
"%s-controlplane-%d"
,
var
.
cluster_name
,
l
+
1
)]
worker
=
[
for
l
in
range
(
var
.
worker_count
)
:
var
.
old_hostnames
?
format
(
"%s-worker-%d"
,
var
.
cluster_name
,
l
)
:
format
(
"%s-worker-%02d"
,
var
.
cluster_name
,
l
+
1
)]
}
# ----------------------------------------------------------------------
# control-plane nodes
# ----------------------------------------------------------------------
resource
"openstack_compute_instance_v2"
"controlplane"
{
count
=
var
.
controlplane_count
name
=
local
.
controlplane
[
count
.
index
]
image_name
=
var
.
os
flavor_name
=
var
.
controlplane_flavor
key_pair
=
openstack_compute_keypair_v2
.
key
.
name
config_drive
=
false
count
=
var
.
controlplane_count
name
=
local
.
controlplane
[
count
.
index
]
image_name
=
var
.
os
availability_zone
=
var
.
openstack_zone
flavor_name
=
var
.
controlplane_flavor
key_pair
=
openstack_compute_keypair_v2
.
key
.
name
config_drive
=
false
depends_on
=
[
openstack_networking_secgroup_rule_v2
.
same_security_group_ingress_tcp
,
...
...
@@ -52,7 +53,8 @@ resource "openstack_compute_instance_v2" "controlplane" {
ignore_changes
=
[
key_pair
,
block_device
,
user_data
user_data
,
availability_zone
]
}
}
...
...
@@ -61,11 +63,13 @@ resource "openstack_compute_instance_v2" "controlplane" {
# worker nodes
# ----------------------------------------------------------------------
resource
"openstack_compute_instance_v2"
"worker"
{
count
=
var
.
worker_count
name
=
local
.
worker
[
count
.
index
]
flavor_name
=
var
.
worker_flavor
key_pair
=
local
.
key
config_drive
=
false
count
=
var
.
worker_count
name
=
local
.
worker
[
count
.
index
]
image_name
=
var
.
os
availability_zone
=
var
.
openstack_zone
flavor_name
=
var
.
worker_flavor
key_pair
=
local
.
key
config_drive
=
false
depends_on
=
[
openstack_networking_secgroup_rule_v2
.
same_security_group_ingress_tcp
...
...
@@ -101,7 +105,8 @@ resource "openstack_compute_instance_v2" "worker" {
ignore_changes
=
[
key_pair
,
block_device
,
user_data
user_data
,
availability_zone
]
}
}
This diff is collapsed.
Click to expand it.
terraform/modules/rke1/variables.tf
+
6
−
0
View file @
0c2fbcd5
...
...
@@ -125,6 +125,12 @@ variable "openstack_ssh_key" {
default
=
""
}
variable
"openstack_zone"
{
type
=
string
description
=
"default zone to use for openstack nodes"
default
=
"nova"
}
# ----------------------------------------------------------------------
# OPENSTACK NODES
# ----------------------------------------------------------------------
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment