Skip to content

Commit

Permalink
Merge pull request #1505 from Tra5is/proxmox-docs
Browse files Browse the repository at this point in the history
Add Proxmox docs regarding env vars and permissions setup
  • Loading branch information
k8s-ci-robot committed Jul 8, 2024
2 parents 3b1cd44 + 1bb53bd commit 3d200a2
Showing 1 changed file with 36 additions and 2 deletions.
38 changes: 36 additions & 2 deletions docs/book/src/capi/providers/proxmox.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,45 @@ the different operating systems.
|--------------------|-----------------------------------------|
| `ubuntu-2204.json` | The settings for the Ubuntu 22.04 image |

The full list of available environment vars can be found in the `variables` section of `images/capi/packer/proxmox/packer.json`.

Each variable in this section can also be overridden via the `PACKER_FLAGS` environment var.

```bash
export PACKER_FLAGS="--var 'kubernetes_rpm_version=1.29.6' --var 'kubernetes_semver=v1.29.6' --var 'kubernetes_series=v1.29' --var 'kubernetes_deb_version=1.29.6-1.1'"
make build-proxmox-ubuntu-2204
```

If different packages are desired then find the available dep packages [here](https://build.opensuse.org/package/revisions/isv:kubernetes:core:shared:build/kubernetes-cni)
and [here](https://build.opensuse.org/project/show/isv:kubernetes:core:stable).

If using a proxmox API token the format of the PROXMOX_USERNAME and PROXMOX_TOKEN must look like so:

| PROXMOX_USERNAME | PROXMOX_TOKEN |
|-------------------------------|----------------|
| <username>@<realm>!<token_id> | <token secret> |

For example:

| PROXMOX_USERNAME | PROXMOX_TOKEN |
|------------------------|--------------------------------------|
| image-builder@pve!capi | 9db7ce4e-4c7f-46ed-8ab4-3c8e98e88c7e |

Then the user (not token) must be given the following permissions on the path `/` and propagated:

* Datastore.*
* SDN.*
* Sys.AccessNetwork
* Sys.Audit
* VM.*

*We suggest creating a new role, since no built-in PVE roles covers just these.*

### Example

Prior to building images you need to ensure you have set the required environment variables:

```
```bash
export PROXMOX_URL="https://pve.example.com:8006/api2/json"
export PROXMOX_USERNAME=<USERNAME>
export PROXMOX_TOKEN=<TOKEN_ID>
Expand All @@ -44,6 +78,6 @@ export PROXMOX_STORAGE_POOL="local-lvm"

Build ubuntu 2204 template:

```
```bash
make build-proxmox-ubuntu-2204
```

0 comments on commit 3d200a2

Please sign in to comment.