Skip to content

Commit d151858

Browse files
nahsienjenjenjerenovate[bot]fluencebotmikevoronov
authored
chore: Merge stage to testnet (#111)
* chore: Correct path for kubeconfig (#67) Correct name for kubeconfig * chore: fixed ccp-worker version (#68) fixed ccp-worker version * chore: Add release-please for terraform modules (#73) * lightmare chart -> 0.1.1 (#75) * chore: Separate module releases (#77) Separate releases * chore: Bump module version in examples (#81) Bump version * chore: Fix path in extra-files version bump (#82) F * chore: Correct version bump in examples (#86) Correct version bump in examples * chore(deps): update hashicorp/vault-action action to v3.1.0 (#66) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore(main): release terraform-module-spectrum 0.1.0 (#89) * chore(main): release terraform-module-talos 0.1.0 (#88) Co-authored-by: Anatolios Laskaris <github_me@nahsi.dev> * chore(main): release terraform-module-k3s 0.1.0 (#87) Co-authored-by: Anatolios Laskaris <github_me@nahsi.dev> * chore(deps): update helm release kubernetes-dashboard to v7.10.1 (#70) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * feat: Update talos to version 1.9.1 and add selinux workaround (#90) Update talos to version 1.9.1 and add selinux workaround * feat!: talos multinode initial support (#72) * Update * Fix instance type * Fix name * F * chore: Actually login to docker registry (#92) Actually login to docker registry * chore: Fix kubeconfig missing (#93) * chore: Fix kubeconfig * fix: kubeconfig creation waits for bootstrap (#94) Kubeconfig depends on bootstrap * chore(main): release terraform-module-talos 0.2.0 (#91) * chore: Bump kubevirt cdi (#96) Bump kubevirt cdi * feat: Setup system metrics collection (host, k8s, cilium, kubevirt) (#95) * fix: Bump talos version to 1.9.2 (#98) * chore(main): release terraform-module-spectrum 0.1.1 (#99) * chore(main): release terraform-module-talos 0.2.1 (#100) Co-authored-by: Anatolios Laskaris <github_me@nahsi.dev> * fix: Disable creation of service monitor for now (#102) * Disable cilium metrics for now * Disable kubevirt metrics for now * chore(main): release terraform-module-spectrum 0.1.1 (#101) * chore: Fix dependency on service-monitor and collect metrics from kube-scheduler and kube-controller (#103) * chore: Disable eip on ephemeral instance (#108) Disable eip on ephemeral instance * chore: Test metrics push (#107) * feat: update ccp-cu-worker to 0.16.1 (#109) update ccp-cu-worker to 0.16.1 * chore(deps): update dependency rancher/local-path-provisioner to v0.0.31 (#105) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --------- Co-authored-by: Enje Shakirova <166139731+enjenjenje@users.noreply.github.com> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: fluencebot <116741523+fluencebot@users.noreply.github.com> Co-authored-by: Mike Voronov <michail.vms@gmail.com>
1 parent 1f63d8f commit d151858

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+24347
-131
lines changed

.github/release-please/config.json

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,22 @@
33
"bump-minor-pre-major": true,
44
"bump-patch-for-minor-pre-major": true,
55
"initial-version": "0.1.0",
6+
"separate-pull-requests": true,
67
"packages": {
78
"terraform-modules/spectrum": {
8-
"component": "terraform-module-spectrum"
9+
"component": "terraform-module-spectrum",
10+
"extra-files": [
11+
"/examples/k3s/spectrum.tf",
12+
"/examples/talos/spectrum.tf"
13+
]
914
},
1015
"terraform-modules/k3s": {
11-
"component": "terraform-module-k3s"
16+
"component": "terraform-module-k3s",
17+
"extra-files": ["/examples/k3s/main.tf"]
1218
},
1319
"terraform-modules/talos": {
14-
"component": "terraform-module-talos"
20+
"component": "terraform-module-talos",
21+
"extra-files": ["/examples/talos/main.tf"]
1522
}
1623
}
1724
}
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
1-
{}
1+
{
2+
"terraform-modules/talos": "0.2.1",
3+
"terraform-modules/spectrum": "0.1.1",
4+
"terraform-modules/k3s": "0.1.0"
5+
}

.github/workflows/terraform.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
ref: ${{ inputs.command == 'destroy' && 'main' || inputs.branch }}
4646

4747
- name: Get Vault token
48-
uses: hashicorp/vault-action@v3.0.0
48+
uses: hashicorp/vault-action@v3.1.0
4949
with:
5050
url: "https://vault.fluence.dev"
5151
path: jwt/github
@@ -108,7 +108,7 @@ jobs:
108108
run: |
109109
case ${{ inputs.command }} in
110110
create)
111-
terraform apply -target module.talos.kubeconfig.path -auto-approve
111+
terraform apply -target module.talos.local_sensitive_file.kubeconfig -auto-approve
112112
terraform apply -auto-approve
113113
;;
114114
destroy)

ephemeral/instance.tf

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,12 @@ resource "digitalocean_ssh_key" "spectrum" {
1212
}
1313

1414
data "digitalocean_image" "talos" {
15-
name = "talos-v1.8.4"
15+
name = "talos-v1.9.2"
1616
}
1717

18-
resource "digitalocean_droplet" "talos" {
19-
name = "rnd-${local.prefix}-spectrum-cp"
18+
resource "digitalocean_droplet" "cp" {
19+
count = 1
20+
name = "rnd-${local.prefix}-spectrum-cp-${count.index}"
2021
size = "s-8vcpu-16gb"
2122
image = data.digitalocean_image.talos.id
2223
region = "fra1"
@@ -30,8 +31,3 @@ resource "digitalocean_droplet" "talos" {
3031
local.prefix,
3132
]
3233
}
33-
34-
resource "digitalocean_reserved_ip" "l2" {
35-
droplet_id = digitalocean_droplet.talos.id
36-
region = digitalocean_droplet.talos.region
37-
}

ephemeral/main.tf

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,18 @@ data "vault_generic_secret" "docker" {
1313
module "talos" {
1414
source = "../terraform-modules/talos"
1515
cluster_name = local.prefix
16-
server_ip = digitalocean_droplet.talos.ipv4_address
1716

18-
config_patches = [
19-
file("${path.root}/config_patch.yml"),
17+
control_planes = [
18+
{
19+
name = "cp-0"
20+
server_ip = digitalocean_droplet.cp[0].ipv4_address
21+
config_patches = [
22+
templatefile("${path.root}/patches/registry.yml", {
23+
docker_username = data.vault_generic_secret.docker.data.username,
24+
docker_password = data.vault_generic_secret.docker.data.password
25+
})
26+
]
27+
},
2028
]
2129
}
2230

@@ -36,7 +44,6 @@ module "spectrum" {
3644
DOTOKEN = base64encode(data.vault_generic_secret.spectrum.data.token)
3745
DOMAIN = "${local.prefix}.fluence.dev"
3846
PREFIX = local.prefix
39-
LOADBALANCER_IP = digitalocean_droplet.talos.ipv4_address
40-
L2_IP = digitalocean_reserved_ip.l2.ip_address
47+
LOADBALANCER_IP = digitalocean_droplet.cp[0].ipv4_address
4148
}
4249
}
File renamed without changes.

examples/k3s/main.tf

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,9 @@
11
module "k3s" {
2-
source = "github.com/fluencelabs/spectrum//terraform-modules/k3s"
2+
source = "git::https://github.com/fluencelabs/spectrum.git//terraform-modules/k3s?ref=terraform-module-k3s-v0.1.0" # x-release-please-version
33
kubeconfigs_location = "${path.root}/secrets"
44
server_name = local.server_name
55
server_ip_address = local.server_ip_address
66
ssh_key = local.ssh_key
77
ssh_user = local.ssh_user
88
ssh_port = local.ssh_port
99
}
10-
11-
provider "helm" {
12-
kubernetes {
13-
config_path = module.k3s.kubeconfig_file
14-
}
15-
}
16-
17-
module "spectrum" {
18-
depends_on = [module.k3s]
19-
source = "github.com/fluencelabs/spectrum//terraform-modules/spectrum"
20-
cluster_flavour = "k3s"
21-
}

examples/k3s/spectrum.tf

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
provider "helm" {
2+
kubernetes {
3+
config_path = module.k3s.kubeconfig_file
4+
}
5+
}
6+
7+
module "spectrum" {
8+
depends_on = [module.k3s]
9+
source = "git::https://github.com/fluencelabs/spectrum.git//terraform-modules/spectrum?ref=terraform-module-spectrum-v0.1.1" # x-release-please-version
10+
cluster_flavour = "k3s"
11+
}

examples/talos/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
## Server customization
44

5-
In talos machine is configured from a single configuration file in yaml format. Talos terraform module allows to specify overlays of the main configuration file maintained by cloudless labs [here](https://github.com/fluencelabs/spectrum/blob/main/terraform-modules/talos/templates/controlplane_patch.yml) with `config_pathes` option.
5+
In talos machine is configured from a single configuration file in yaml format. Talos terraform module allows to specify overlays of the main configuration file maintained by cloudless labs [here](https://github.com/fluencelabs/spectrum/blob/main/terraform-modules/talos/base_config.yml) with `config_pathes` option.
66

7-
You can configure server specific things like layout of disks or network configuration. Checkout [talos documentation](https://www.talos.dev/v1.9/reference/configuration/v1alpha1/config/) and see `config_patch.yml` for an example of a `bond` interface configuration.
7+
You can configure server specific things like layout of disks or network configuration. Checkout [talos documentation](https://www.talos.dev/v1.9/reference/configuration/v1alpha1/config/) and see [`cp-0.yml`](https://github.com/fluencelabs/blob/main/examples/talos/patches/cp-0.yml) for an example of a `bond` interface configuration.
88

99
## Terraform state
1010

examples/talos/main.tf

Lines changed: 12 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -21,27 +21,17 @@ provider "helm" {
2121
}
2222

2323
module "talos" {
24-
source = "git::https://github.com/fluencelabs/spectrum.git//terraform-modules/talos?ref=main"
25-
cluster_name = var.cluster_name
26-
server_ip = var.server_ip
27-
# config_patches = [
28-
# file("${path.root}/config_patch.yml"),
29-
# ]
30-
}
31-
32-
module "spectrum" {
33-
depends_on = [module.talos]
34-
source = "git::https://github.com/fluencelabs/spectrum.git//terraform-modules/spectrum?ref=main"
35-
network = "main"
36-
cluster = "default"
37-
}
38-
39-
variable "server_ip" {
40-
type = string
41-
description = "IP at which server is accessible"
42-
}
24+
source = "git::https://github.com/fluencelabs/spectrum.git//terraform-modules/talos?ref=terraform-module-talos-v0.2.1" # x-release-please-version
25+
cluster_name = "my-cluster"
4326

44-
variable "cluster_name" {
45-
type = string
46-
description = "Name used in k8s and talos to distinguish between clusters"
27+
control_planes = [
28+
{
29+
name = "cp-0"
30+
server_ip = "1.2.3.4"
31+
config_patches = [
32+
file("${path.root}/patches/base.yml"),
33+
file("${path.root}/patches/cp-0.yml"),
34+
]
35+
},
36+
]
4737
}

0 commit comments

Comments
 (0)