8000 [global] add cloud-provider-dvp module by aleksey-su · Pull Request #11649 · deckhouse/deckhouse · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[global] add cloud-provider-dvp module #11649

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 59 commits into from
May 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
13b53d3
[global] add cloud provider DVP
aleksey-su Jan 21, 2025
896f1bf
add hostname label
aleksey-su Jan 29, 2025
b1eb27c
add dvp ccm
aleksey-su Jan 29, 2025
3c7346b
add dvp-common to the werf file
aleksey-su Jan 29, 2025
537c4cf
add deployment
aleksey-su Jan 30, 2025
54f5c54
add virt scheme
aleksey-su Jan 31, 2025
191011c
Cloud provider dvp csi (#12304)
aleksey-su Feb 28, 2025
ffffdba
Cloud provider dvp csi fix
aleksey-su Mar 3, 2025
da59296
Dvp cloud data discoverer (#12401)
aleksey-su Mar 12, 2025
739a506
Cloud provider dvp add static-node (#12464)
aleksey-su Mar 17, 2025
ed902d1
[cloud-provider-dvp] Implement Cluster API Provider DVP (#12223)
mvasl Apr 2, 2025< 8000 /relative-time>
12412cd
Cloud provider dvp ccm lb (#12677)
aleksey-su Apr 4, 2025
efcdcb7
Cloud provider fix sc name in terraform
aleksey-su Apr 7, 2025
87a9c76
Cloud provider fix capdvp vm delition
aleksey-su Apr 9, 2025
6e47303
Cloud provider fix capdvp vm delition
aleksey-su Apr 9, 2025
97e4e5a
Cloud provider fix capdvp vm delition
aleksey-su Apr 9, 2025
0cdb669
Cloud provider fix capdvp vm delition
aleksey-su Apr 11, 2025
65407f9
Cloud provider fix capdvp vm delition
aleksey-su Apr 11, 2025
5c62bb2
Cloud provider fix capdvp vm delition
aleksey-su Apr 14, 2025
dd53804
Cloud provider fix tf
aleksey-su Apr 17, 2025
312f7f3
Cloud provider fix tf
aleksey-su Apr 17, 2025
bb7a64c
generate
aleksey-su Apr 18, 2025
4199f28
cloud data discoverer
aleksey-su Apr 18, 2025
b81626b
Cloud provider dvp instanceclass (#13089)
aleksey-su Apr 21, 2025
c4eb89f
dmt lint fix
aleksey-su Apr 22, 2025
677def8
dmt lint fix
aleksey-su Apr 22, 2025
4ef8efb
dmt lint fix
aleksey-su Apr 22, 2025
4b77dd8
dmt lint fix
aleksey-su Apr 22, 2025
bb8c32f
fix validation
aleksey-su Apr 22, 2025
8d50fac
fix validation
aleksey-su Apr 23, 2025
bbabd7e
fix validation
aleksey-su Apr 23, 2025
4c1f1bc
fix validation
aleksey-su Apr 23, 2025
f5807f3
fix validation
aleksey-su Apr 23, 2025
f10b3fb
fix validation
aleksey-su Apr 23, 2025
467b476
fix validation
aleksey-su Apr 23, 2025
3d05240
add ru docs
aleksey-su Apr 24, 2025
b893750
use opentofu (#13227)
aleksey-su Apr 25, 2025
8de7c45
use opentofu
aleksey-su May 5, 2025
9693450
use opentofu
aleksey-su May 5, 2025
08a5fb3
use opentofu
aleksey-su May 5, 2025
fcad681
use opentofu
aleksey-su May 5, 2025
a729c10
use opentofu
aleksey-su May 5, 2025
962abb3
tests
aleksey-su May 6, 2025
592a361
Fixes for CRDs
prismagod May 6, 2025
35bb709
tests
aleksey-su May 7, 2025
69ac3b2
Update candi/cloud-providers/dvp/openapi/cluster_configuration.yaml
aleksey-su May 7, 2025
3f46f45
Update candi/cloud-providers/dvp/openapi/cluster_configuration.yaml
aleksey-su May 7, 2025
f00690b
Update candi/cloud-providers/dvp/openapi/doc-ru-cluster_configuration…
aleksey-su May 7, 2025
e0d17c0
Update candi/cloud-providers/dvp/openapi/instance_class.yaml
aleksey-su May 7, 2025
68a698c
Update modules/030-cloud-provider-dvp/crds/external/deckhousemachines…
aleksey-su May 7, 2025
ab50eee
Update modules/030-cloud-provider-dvp/openapi/values.yaml
aleksey-su May 7, 2025
ccd86bc
tests
aleksey-su May 7, 2025
f89cd28
Fixes for CRDs after review
prismagod May 12, 2025
e5e3d9e
fix tofu
aleksey-su May 13, 2025
2528317
fix tofu
aleksey-su May 13, 2025
48f29e3
tofu
aleksey-su May 14, 2025
018fbe2
build fix
aleksey-su May 14, 2025
d6d78f2
tofu
aleksey-su May 15, 2025
63f9219
tofu
aleksey-su May 15, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,51 @@ updates:
interval: "daily"
open-pull-requests-limit: 0

- package-ecosystem: "gomod"
directory: "/modules/030-cloud-provider-dvp/images/capdvp-controller-manager/src"
labels:
- "type/dependencies"
- "status/ok-to-test"
schedule:
interval: "daily"
open-pull-requests-limit: 0

- package-ecosystem: "gomod"
directory: "/modules/030-cloud-provider-dvp/images/cloud-controller-manager/src"
labels:
- "type/dependencies"
- "status/ok-to-test"
schedule:
interval: "daily"
open-pull-requests-limit: 0

- package-ecosystem: "gomod"
directory: "/modules/030-cloud-provider-dvp/images/cloud-data-discoverer/src"
labels:
- "type/dependencies"
- "status/ok-to-test"
schedule:
interval: "daily"
open-pull-requests-limit: 0

- package-ecosystem: "gomod"
directory: "/modules/030-cloud-provider-dvp/images/dvp-common"
labels:
- "type/dependencies"
- "status/ok-to-test"
schedule:
interval: "daily"
open-pull-requests-limit: 0

- package-ecosystem: "gomod"
directory: "/modules/030-cloud-provider-dvp/images/dvp-csi-driver/src"
labels:
- "type/dependencies"
- "status/ok-to-test"
schedule:
interval: "daily"
open-pull-requests-limit: 0

- package-ecosystem: "gomod"
directory: "/modules/030-cloud-provider-gcp/images/cloud-data-discoverer/src"
labels:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Copyright 2025 Flant JSC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Copyright 2025 Flant JSC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

output "cloud_discovery_data" {
value = {
"apiVersion" = "deckhouse.io/v1"
"kind" = "DVPCloudDiscoveryData"
"zones" = ["default"]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Copyright 2025 Flant JSC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.


variable "clusterConfiguration" {
type = any
}

variable "providerClusterConfiguration" {
type = any
}

66 changes: 66 additions & 0 deletions candi/cloud-providers/dvp/layouts/standard/master-node/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# Copyright 2025 Flant JSC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

module "root-disk" {
source = "../../../terraform-modules/root-disk/"
prefix = local.prefix
node_group = local.node_group
node_index = local.node_index
namespace = local.namespace
image = local.root_disk_image
size = local.root_disk_size
storage_class = local.root_disk_storage_class
}

module "kubernetes-data-disk" {
source = "../../../terraform-modules/kubernetes-data-disk/"
prefix = local.prefix
node_group = local.node_group
node_index = local.node_index
namespace = local.namespace
storage_class = local.kubernetes_data_disk_storage_class
size = local.kubernetes_data_disk_size
}

module "ipv4-address" {
source = "../../../terraform-modules/ipv4-address/"
namespace = local.namespace
hostname = local.hostname
ipv4_address = local.ipv4_address
}

module "master" {
source = "../../../terraform-modules/master"
prefix = local.prefix
node_group = local.node_group
namespace = local.namespace
node_index = local.node_index
root_disk = module.root-disk
kubernetes_data_disk = module.kubernetes-data-disk
ipv4_address = module.ipv4-address
memory_size = local.memory_size
bootloader = local.bootloader
cpu = local.cpu
ssh_public_key = local.ssh_public_key
hostname = local.hostname
cluster_uuid = local.cluster_uuid
additional_labels = local.additional_labels
additional_annotations = local.additional_annotations
priority_class_name = local.priority_class_name
node_selector = local.node_selector
tolerations = local.tolerations
region = local.region
zone = local.zone
cloud_config = local.user_data
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Copyright 2025 Flant JSC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

output "master_ip_address_for_ssh" {
value = module.master.master_ip_address_for_ssh
}

output "node_internal_ip_address" {
value = module.master.node_internal_ip_address
}

output "kubernetes_data_device_path" {
value = module.master.kubernetes_data_device_path
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
# Copyright 2025 Flant JSC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
variable "clusterConfiguration" {
type = any
}

variable "providerClusterConfiguration" {
type = any
}

variable "nodeIndex" {
type = number
default = 0
}

variable "cloudConfig" {
type = string
default = ""
}

variable "clusterUUID" {
type = string
}


locals {
prefix = var.clusterConfiguration.cloud.prefix
node_index = var.nodeIndex
namespace = var.providerClusterConfiguration.provider.namespace
master_node_group = var.providerClusterConfiguration.masterNodeGroup
instance_class = local.master_node_group.instanceClass


cluster_uuid = var.clusterUUID

root_disk_image = {
kind = local.instance_class.rootDisk.image.kind
name = local.instance_class.rootDisk.image.name
}
root_disk_size = local.instance_class.rootDisk.size
root_disk_storage_class = lookup(local.instance_class.rootDisk, "storageClass", null)

cpu = {
cores = local.instance_class.virtualMachine.cpu.cores
core_fraction = lookup(local.instance_class.virtualMachine.cpu, "coreFraction", "100%")
}
memory_size = local.instance_class.virtualMachine.memory.size
bootloader = lookup(local.instance_class.virtualMachine, "bootloader", null)

ssh_public_key = var.providerClusterConfiguration.sshPublicKey

ipv4_address = lookup(local.instance_class.virtualMachine, "ipAddresses", null) == null ? "Auto" : local.node_index + 1 > length(local.instance_class.virtualMachine.ipAddresses) ? "Auto" : local.instance_class.virtualMachine.ipAddresses[local.node_index]

kubernetes_data_disk_storage_class = lookup(local.instance_class.etcdDisk, "storageClass", null)
kubernetes_data_disk_size = local.instance_class.etcdDisk.size

region = lookup(var.providerClusterConfiguration, "region", "")

actual_zones = lookup(var.providerClusterConfiguration, "zones", [])
zones = lookup(local.master_node_group, "zones", null) != null ? tolist(setintersection(local.actual_zones, local.master_node_group["zones"])) : local.actual_zones
zone = length(local.actual_zones) > 0 ? element(local.zones, var.nodeIndex) : ""

additional_labels = lookup(local.instance_class.virtualMachine, "additionalLabels", {})
additional_annotations = lookup(local.instance_class.virtualMachine, "additionalAnnotations", {})
priority_class_name = lookup(local.instance_class.virtualMachine, "priorityClassName", null)
node_selector = lookup(local.instance_class.virtualMachine, "nodeSelector", {})
tolerations = lookup(local.instance_class.virtualMachine, "tolerations", null)

node_group = "master"
hostname = join("-", [local.prefix, local.node_group, local.node_index])
user_data = var.cloudConfig == "" ? "" : var.cloudConfig
}

55 changes: 55 additions & 0 deletions candi/cloud-providers/dvp/layouts/standard/static-node/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Copyright 2025 Flant JSC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

module "root-disk" {
source = "../../../terraform-modules/root-disk/"
prefix = local.prefix
node_group = local.node_group
node_index = local.node_index
namespace = local.namespace
image = local.root_disk_image
size = local.root_disk_size
storage_class = local.root_disk_storage_class
}

module "ipv4-address" {
source = "../../../terraform-modules/ipv4-address/"
namespace = local.namespace
hostname = local.hostname
ipv4_address = local.ipv4_address
}

module "static-node" {
source = "../../../terraform-modules/static-node/"
prefix = local.prefix
node_group = local.node_group
namespace = local.namespace
node_index = local.node_index
root_disk = module.root-disk
ipv4_address = module.ipv4-address
memory_size = local.memory_size
bootloader = local.bootloader
cpu = local.cpu
ssh_public_key = local.ssh_public_key
hostname = local.hostname
cluster_uuid = local.cluster_uuid
additional_labels = local.additional_labels
additional_annotations = local.additional_annotations
priority_class_name = local.priority_class_name
node_selector = local.node_selector
tolerations = local.tolerations
region = local.region
zone = local.zone
cloud_config = local.user_data
}
7F48
Loading
Loading
0