42 Commits

Author SHA1 Message Date
Serge Logvinov
66d2e70230 fix: ha-groups
Proxmox 9 uses HA rules instead of HA groups.
Do not treat it as an error if the HA group (used in Proxmox 8) cannot be retrieved.

Signed-off-by: Serge Logvinov <serge.logvinov@sinextra.dev>
2025-11-14 10:07:43 +07:00
Serge Logvinov
706faa8d08 feat: enhance ha-group handling
Add the group.topology.proxmox.sinextra.dev/ label to improve support for node selector and affinity rules.

Signed-off-by: Serge Logvinov <serge.logvinov@sinextra.dev>
2025-11-12 04:41:46 +07:00
Serge Logvinov
0a31716c17 fix: handle inaccessible nodes
Enhanced instance existence checks to handle inaccessible Proxmox nodes.
Improved test cases for instance existence and metadata retrieval.

Signed-off-by: Serge Logvinov <serge.logvinov@sinextra.dev>
2025-11-11 19:17:08 +07:00
Serge Logvinov
01e3ce854c chore: bump deps
Updated dependencies

Signed-off-by: Serge Logvinov <serge.logvinov@sinextra.dev>
2025-11-10 13:01:34 +07:00
rojanDinc
d2181a88f6 fix: log error when instance metadata retrieval fails
Added error logging in the InstanceMetadata function to capture failures
when retrieving instance information, enhancing debugging capabilities.

Also includes:
- Added error check for metadata retrieval
- Added unit tests for error handling
- Updated to use errors package for error equality

Signed-off-by: rojanDinc <rojand94@gmail.com>
Signed-off-by: Serge Logvinov <serge.logvinov@sinextra.dev>
2025-10-24 05:40:29 +07:00
Serge Logvinov
0cf1a40802 refactor: change proxmox api go module
New proxmox api modules
* luthermonson/go-proxmox
* sergelogvinov/go-proxmox

Signed-off-by: Serge Logvinov <serge.logvinov@sinextra.dev>
2025-09-09 20:09:01 +07:00
Serge Logvinov
27c3e627c4 feat: use proxmox ha-group as zone name
This feature enables live migration without changing any Kubernetes labels.

Signed-off-by: Serge Logvinov <serge.logvinov@sinextra.dev>
2025-09-08 14:09:19 +07:00
Serge Logvinov
229be1432a feat: add extra labels
Add labels:
* topology.proxmox.sinextra.dev/node
* topology.proxmox.sinextra.dev/region

These labels represent the default topology labels.
They make it possible to use different topologies on the Proxmox side.

Signed-off-by: Serge Logvinov <serge.logvinov@sinextra.dev>
2025-09-08 11:47:00 +07:00
Serge Logvinov
b77455af4d refactor: instance metadata
Store all important information in instanceInfo struct.

Signed-off-by: Serge Logvinov <serge.logvinov@sinextra.dev>
2025-09-08 10:34:45 +07:00
3deep5me
8ef4bcea69 feat: add config options token_id_file & token_secret_file
Adds additional config options to read proxmox-cluster credentials from separate files.

Signed-off-by: 3deep5me <manuel.karim5@gmail.com>
2025-08-31 19:28:09 +07:00
Daniel J. Holmes (jaitaiwan)
144b1c74e6 feat: add named errors to cloud config
Changes errors created by cloud config to be standardized so that any
other packages relying on the cloud config can check if the error is of
the same "type".

Signed-off-by: Daniel J. Holmes (jaitaiwan) <dan@jaitaiwan.dev>
2025-08-02 13:05:00 +07:00
Daniel J. Holmes (jaitaiwan)
e1b8e9b419 feat: add new network addressing features
Changes:
- Increase test coverage of config
- Add networking feature config
- Add ability to find node ip addresses via qemu and specify ips that
  should be treated as ExternalIPAddresses

Signed-off-by: Daniel J. Holmes (jaitaiwan) <dan@jaitaiwan.dev>
Signed-off-by: Serge Logvinov <serge.logvinov@sinextra.dev>
2025-07-25 12:35:52 +07:00
Serge Logvinov
a8183c8df4 refactor: split cloud config module
We will split the cloud configuration into two parts:
  the original cloud controller configuration and a separate function for working with multiple Proxmox clusters.

Signed-off-by: Daniel J. Holmes (jaitaiwan) <dan@jaitaiwan.dev>
Signed-off-by: Serge Logvinov <serge.logvinov@sinextra.dev>
2025-07-20 16:04:19 +07:00
Serge Logvinov
60f953d1da chore: bump deps
Updated dependencies

Signed-off-by: Serge Logvinov <serge.logvinov@sinextra.dev>
2025-07-20 13:26:17 +07:00
Daniel J. Holmes (jaitaiwan)
628e7d6500 chore: clearer error message
Error now clearly indicates the reasoning for the error message.
Previously the error message suggested a kubelet flag was not set even
when it may have been.

Signed-off-by: Daniel J. Holmes (jaitaiwan) <dan@jaitaiwan.dev>
2025-06-13 17:02:19 +07:00
Serge Logvinov
efb753c9de fix: cluster vm list
Fix the output to show the current number of VMs.

Signed-off-by: Serge Logvinov <serge.logvinov@sinextra.dev>
2025-05-06 14:32:19 +07:00
Serge Logvinov
5a645a25c3 chore: bump deps
Updated dependencies

Signed-off-by: Serge Logvinov <serge.logvinov@sinextra.dev>
2025-05-05 21:48:48 +07:00
Serge Logvinov
0f0374c2eb feat: custom instance type
Now, we can set a custom instance type using the smbios1[sku] argument

Signed-off-by: Serge Logvinov <serge.logvinov@sinextra.dev>
2025-02-13 18:55:52 +02:00
Serge Logvinov
3a34fb960a fix: find node by name
We will find the node by name more precisely.
Check the UUID and VM name to determine the VM ID.

Signed-off-by: Serge Logvinov <serge.logvinov@sinextra.dev>
2025-02-13 16:59:03 +02:00
Serge Logvinov
ca452ad040 chore: bump deps
Updated dependencies

Signed-off-by: Serge Logvinov <serge.logvinov@sinextra.dev>
2025-01-20 14:43:40 +02:00
Matthias Teich
956a30a463 feat: enable support for capmox
This makes ccm compatible with cluster api and cluster api provider proxmox (capmox)

Signed-off-by: Matthias Teich <matthias.teich@gdata.de>
2025-01-07 17:29:26 +02:00
Serge Logvinov
5ea7b738d3 chore: bump deps
Updated dependencies

Signed-off-by: Serge Logvinov <serge.logvinov@sinextra.dev>
2024-12-01 11:52:25 +02:00
Serge Logvinov
10f3e365d2 fix: instance type
The node might be down when we try to retrieve the instance property.

Signed-off-by: Serge Logvinov <serge.logvinov@sinextra.dev>
2024-09-20 10:15:43 +03:00
Serge Logvinov
5876cd4c7b feat: find node by uuid
In some setups, the Proxmox VM name may differ from the Linux hostname.
To reliably identify a VM within a Proxmox cluster, we can use the system's UUID

Signed-off-by: Serge Logvinov <serge.logvinov@sinextra.dev>
2024-09-14 11:39:03 +03:00
Serge Logvinov
b81ad1406d feat: prometheus metrics
Expose proxmox api calls metrics.

Signed-off-by: Serge Logvinov <serge.logvinov@sinextra.dev>
2024-09-14 11:04:03 +03:00
Serge Logvinov
e31b24cf19 refactor: contextual logging
Migrate to contextual logging.

Signed-off-by: Serge Logvinov <serge.logvinov@sinextra.dev>
2024-09-06 18:42:24 +03:00
Serge Logvinov
47717693b5 chore: bump deps
Updated dependencies

Signed-off-by: Serge Logvinov <serge.logvinov@sinextra.dev>
2024-05-04 10:03:00 +03:00
Serge Logvinov
a752d1056d feat: kubelet dualstack support
Enable cloud Dual-Stack with --node-ip support since Kubernetes 1.29 release.

Signed-off-by: Serge Logvinov <serge.logvinov@sinextra.dev>
2024-02-16 14:49:48 +02:00
Serge Logvinov
de5598648f fix: init provider
proxmox.Init() func does not load in boot time.

Signed-off-by: Serge Logvinov <serge.logvinov@sinextra.dev>
2024-02-15 22:28:21 +02:00
Serge Logvinov
10592d13b4 chore: bump deps
Updated dependencies

Signed-off-by: Serge Logvinov <serge.logvinov@sinextra.dev>
2024-02-15 16:17:44 +02:00
Serge Logvinov
7b73b5f8a2 refactor: move providerID to the package
Parsing and generating magic providerID moved to a separate package.

Signed-off-by: Serge Logvinov <serge.logvinov@sinextra.dev>
2024-02-15 15:57:11 +02:00
Serge Logvinov
ac2f564e43 feat: can use user/password
Some method in Proxmox required root permissions (account).
So we can pass it through cluster config.

Signed-off-by: Serge Logvinov <serge.logvinov@sinextra.dev>
2024-01-03 21:19:20 +02:00
Serge Logvinov
74d8c78099 chore: bump deps
Updated dependencies, and add trivy image check.

Signed-off-by: Serge Logvinov <serge.logvinov@sinextra.dev>
2023-12-14 23:09:24 +02:00
Serge Logvinov
4e641a1df9 chore: bump deps
Update k8s to 0.28.2
2023-09-19 11:16:12 +03:00
Serge Logvinov
f8c32e1e8e test: cloud config
Check cluster config params.
2023-05-08 14:52:21 +03:00
Serge Logvinov
fb962181cf test: more tests
Check second cluster.
2023-05-04 12:19:50 +03:00
Serge Logvinov
b776e54e4f test: mock proxmox api
Test CCM and mock proxmox API.
2023-05-01 16:49:02 +03:00
Serge Logvinov
90b66dc027 test: basic test
Add basic unit tests.
2023-04-30 13:51:59 +03:00
Serge Logvinov
0d89bf5d58 ci: add github checks
Add github actions checks.
2023-04-29 13:32:43 +03:00
Serge Logvinov
cc2dc17de2 refactor: proxmox cloud config
Move Proxmox cluster config to 'cluster' folder.
2023-04-28 16:25:38 +03:00
Serge Logvinov
8212493d9a feat: add controllers
Add cloud-node, cloud-node-lifecycle controllers.
2023-04-09 16:30:12 +03:00
Serge Logvinov
811670e6d5 init provider 2023-04-08 01:07:22 +03:00