Skip to content

Commit d92322e

Browse files
committed
Merge branch 'main' into feature/tilt
2 parents ed7ab94 + 583de43 commit d92322e

Some content is hidden

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

63 files changed

+397
-379
lines changed

.github/workflows/docker-publish.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,13 @@ name: publish container image
33
on:
44
push:
55
# Publish semver tags as releases.
6-
tags: [ 'v*.*.*' ]
6+
tags: ["v*.*.*"]
77

88
env:
99
REGISTRY: ghcr.io
1010
# github.repository as <account>/<repo>
1111
IMAGE_NAME: ${{ github.repository }}
1212

13-
1413
jobs:
1514
build:
1615
runs-on: ubuntu-latest
@@ -35,3 +34,9 @@ jobs:
3534
# platform = linux/amd64,linux/arm64,linux/s390x,linux/ppc64le
3635
- name: Build and push Docker image
3736
run: "make docker-buildx PLATFORMS=linux/amd64,linux/arm64,linux/s390x,linux/ppc64le IMG=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.ref_name }}"
37+
38+
- name: push with 'latest' tag
39+
run: |
40+
docker pull ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.ref_name }}
41+
docker tag ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.ref_name }} ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
42+
docker push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
# Image URL to use all building/pushing image targets
33
REGISTRY := ghcr.io
4-
PROJECT := sp-yduck/cluster-api-provider-proxmox
4+
PROJECT := k8s-proxmox/cluster-api-provider-proxmox
55
RELEASE_TAG := latest
66
IMG ?= $(REGISTRY)/$(PROJECT):$(RELEASE_TAG)
77
# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
@@ -152,7 +152,7 @@ unit-test-cover: ## Run unit tests and generate coverage report
152152
go tool cover -html=coverage.out -o coverage.html
153153

154154
E2E_DIR = $(shell pwd)/internal/test/e2e
155-
E2E_IMG := ghcr.io/sp-yduck/cluster-api-provider-proxmox:e2e
155+
E2E_IMG := ghcr.io/k8s-proxmox/cluster-api-provider-proxmox:e2e
156156
.PHONY: generate-e2e-templates
157157
generate-e2e-templates: $(KUSTOMIZE) ## Generate cluster-templates for e2e
158158
cp templates/cluster-template* $(E2E_DIR)/data/infrastructure-proxmox/templates

README.md

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,34 @@
11
# cluster-api-provider-proxmox (CAPPX)
2-
[![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/sp-yduck/cluster-api-provider-proxmox?sort=semver)](https://github.com/sp-yduck/cluster-api-provider-proxmox/releases/latest) [![Go Report Card](https://goreportcard.com/badge/github.com/sp-yduck/cluster-api-provider-proxmox)](https://goreportcard.com/report/github.com/sp-yduck/cluster-api-provider-proxmox) [![CI](https://github.com/sp-yduck/cluster-api-provider-proxmox/actions/workflows/ci.yaml/badge.svg)](https://github.com/sp-yduck/cluster-api-provider-proxmox/actions/workflows/ci.yaml) [![GitHub license](https://img.shields.io/github/license/sp-yduck/cluster-api-provider-proxmox)](https://github.com/sp-yduck/cluster-api-provider-proxmox/blob/main/LICENSE)
3-
----
2+
3+
## [![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/k8s-proxmox/cluster-api-provider-proxmox?sort=semver)](https://github.com/k8s-proxmox/cluster-api-provider-proxmox/releases/latest) [![Go Report Card](https://goreportcard.com/badge/github.com/k8s-proxmox/cluster-api-provider-proxmox)](https://goreportcard.com/report/github.com/k8s-proxmox/cluster-api-provider-proxmox) [![CI](https://github.com/k8s-proxmox/cluster-api-provider-proxmox/actions/workflows/ci.yaml/badge.svg)](https://github.com/k8s-proxmox/cluster-api-provider-proxmox/actions/workflows/ci.yaml) [![GitHub license](https://img.shields.io/github/license/k8s-proxmox/cluster-api-provider-proxmox)](https://github.com/k8s-proxmox/cluster-api-provider-proxmox/blob/main/LICENSE)
44

55
cluster-api-provider-proxmox is a Cluster API [infrastructure provider](https://cluster-api.sigs.k8s.io/developer/providers/cluster-infrastructure.html) implementation for [Proxmox VE](https://pve.proxmox.com/wiki/Main_Page).
66

77
## Description
8+
89
cluster-api-provider-proxmox provides only infrastructure controller (`ProxmoxCluster` and `ProxmoxMachine`). To bootstrap your cluster/machine you need to provide [Control Plane provider](https://cluster-api.sigs.k8s.io/developer/architecture/controllers/control-plane.html#crd-contracts) and [Bootstrap provider](https://cluster-api.sigs.k8s.io/developer/providers/bootstrap.html). For example [KubeadmControlPlane](https://github.com/kubernetes-sigs/cluster-api/tree/main/controlplane/kubeadm) and [KubeadmBootstrap](https://github.com/kubernetes-sigs/cluster-api/tree/main/bootstrap/kubeadm).
910

1011
## Quick Start
12+
1113
You’ll need a Kubernetes cluster to run against. You can use [KIND](https://sigs.k8s.io/kind) to get a local cluster for testing, or run against a remote cluster.
1214
**Note:** Your controller will automatically use the current context in your kubeconfig file (i.e. whatever cluster `kubectl cluster-info` shows).
1315

1416
### with KubeadmControlplane/Bootstrap
17+
1518
1. Initialize Management cluster
1619

1720
for more information : https://cluster-api.sigs.k8s.io/user/quick-start.html#initialize-the-management-cluster
1821

1922
```sh
2023
# install cluster-api components
2124
export EXP_CLUSTER_RESOURCE_SET=true
22-
clusterctl init --infrastructure=proxmox:v0.3.3 --config https://raw.githubusercontent.com/sp-yduck/cluster-api-provider-proxmox/main/clusterctl.yaml
25+
clusterctl init --infrastructure=proxmox:v0.3.3 --config https://raw.githubusercontent.com/k8s-proxmox/cluster-api-provider-proxmox/main/clusterctl.yaml
2326
```
24-
**Note:** container images are available at [ghcr.io/sp-yduck/cluster-api-provider-proxmox:\<tag\>](https://github.com/sp-yduck/cluster-api-provider-proxmox/pkgs/container/cluster-api-provider-proxmox)
27+
28+
**Note:** container images are available at [ghcr.io/k8s-proxmox/cluster-api-provider-proxmox:\<tag\>](https://github.com/k8s-proxmox/cluster-api-provider-proxmox/pkgs/container/cluster-api-provider-proxmox)
2529

2630
2. Create your first workload cluster
31+
2732
```sh
2833
# export env variables
2934
export CONTROLPLANE_HOST=X.X.X.X # control-plane vip
@@ -32,7 +37,7 @@ export PROXMOX_PASSWORD=password
3237
export PROXMOX_USER=user@pam
3338

3439
# generate manifests (available flags: --target-namespace, --kubernetes-version, --control-plane-machine-count, --worker-machine-count)
35-
clusterctl generate cluster cappx-test --control-plane-machine-count=3 --infrastructure=proxmox:v0.3.3 --config https://raw.githubusercontent.com/sp-yduck/cluster-api-provider-proxmox/main/clusterctl.yaml > cappx-test.yaml
40+
clusterctl generate cluster cappx-test --control-plane-machine-count=3 --infrastructure=proxmox:v0.3.3 --config https://raw.githubusercontent.com/k8s-proxmox/cluster-api-provider-proxmox/main/clusterctl.yaml > cappx-test.yaml
3641

3742
# inspect and edit
3843
vi cappx-test.yaml
@@ -44,6 +49,7 @@ kubectl apply -f cappx-test.yaml
4449
3. Access your first workload cluster !!
4550

4651
Usually it takes 2~10 mins to complete bootstrapping the nodes.
52+
4753
```sh
4854
# get workload cluster's kubeconfig
4955
clusterctl get kubeconfig cappx-test > kubeconfig.yaml
@@ -53,27 +59,26 @@ kubectl --kubeconfig=kubeconfig.yaml get node
5359
```
5460

5561
4. Tear down your workload cluster
62+
5663
```sh
5764
kubectl delete cluster cappx-test
5865
```
5966

6067
## Fetures
6168

62-
- No need to prepare vm templates. You can specify any vm image in `ProxmoxMachine.Spec.Image`. CAPPX bootstrap your vm from scratch.
63-
64-
- Supports mutiple image format. CAPPX uses VNC websocket for downloading/installing node images so it can support multiple image format not only ISO (Proxmox API can only support ISO)
69+
- No need to prepare vm templates. You can specify any vm image in `ProxmoxMachine.Spec.Image`. CAPPX bootstrap your vm from scratch. (Supports `iso` type of image format.)
6570

6671
- Supports custom cloud-config (user data). CAPPX uses VNC websockert for bootstrapping nodes so it can applies custom cloud-config that can not be achieved by only Proxmox API.
6772

6873
- Flexible vmid/node assigning. You can flexibly assign vmid to your qemu and flexibly schedule qemus to proxmox nodes. For more details please check [qemu-scheduler](./cloud/scheduler/).
6974

7075
### Node Images
7176

72-
CAPPX is compatible with `iso`, `qcow2`, `qed`, `raw`, `vdi`, `vpc`, `vmdk` format of image. You can build your own node image and use it for `ProxmoxMachine`.
77+
CAPPX is compatible with `iso` format of image. You can build your own node image and use it for `ProxmoxMachine`.
7378

7479
CAPPX relies on a few prerequisites which have to be already installed in the used operating system images, e.g. a container runtime, kubelet, kubeadm,.. .
7580

76-
To build your custom node image, you can use [kubernetes-sigs/image-builder](https://github.com/kubernetes-sigs/image-builder) project.
81+
To build your custom node image, you can use [kubernetes-sigs/image-builder](https://github.com/kubernetes-sigs/image-builder) project.
7782

7883
Also there are some available out-of-box images published other communities such as [Metal3](https://github.com/metal3-io). For example https://artifactory.nordix.org/ui/native/metal3/images/. Example MD can be found [metal3-ubuntu2204-k8s127.yaml](examples/machine_deployment/metal3-ubuntu2204-k8s127.yaml).
7984

@@ -91,11 +96,12 @@ CAPPX is tested with `pve-manager/7.4-3/9002ab8a (running kernel: 5.15.102-1-pve
9196
| ---------------------- | :------------------: | :-----------------: |
9297
| CAPPX v1beta1 `(v0.x)` | ? ||
9398

94-
### ControlPlane & Bootstrap provider
99+
### ControlPlane & Bootstrap provider
95100

96101
CAPPX is tested with [KubeadmControlPlane](https://github.com/kubernetes-sigs/cluster-api/tree/main/controlplane/kubeadm) and [KubeadmBootstrap](https://github.com/kubernetes-sigs/cluster-api/tree/main/bootstrap/kubeadm).
97102

98103
## How it works
104+
99105
This project aims to follow the Cluster API [Provider contract](https://cluster-api.sigs.k8s.io/developer/providers/contracts.html).
100106

101107
### ProxmoxCluster
@@ -109,12 +115,15 @@ ProxmoxMachine controller follows the [typical infra-machine logic](https://clus
109115
## Development
110116

111117
### Testing
118+
112119
#### Unit Testing
120+
113121
```sh
114122
make unit-test
115123
```
116124

117125
#### Unit and Integration Testing
126+
118127
```sh
119128
export PROXMOX_URL=https://X.X.X.X:8006/api2/json
120129
export PROXMOX_PASSWORD=password
@@ -124,6 +133,7 @@ make test
124133
```
125134

126135
#### E2E Testing
136+
127137
```sh
128138
export CONTROLPLANE_HOST=X.X.X.X
129139
export PROXMOX_URL=https://X.X.X.X:8006/api2/json
@@ -152,4 +162,3 @@ distributed under the License is distributed on an "AS IS" BASIS,
152162
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
153163
See the License for the specific language governing permissions and
154164
limitations under the License.
155-

api/v1beta1/proxmoxmachine_types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ limitations under the License.
1717
package v1beta1
1818

1919
import (
20-
"github.com/sp-yduck/proxmox-go/api"
20+
"github.com/k8s-proxmox/proxmox-go/api"
2121
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
2222
clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1"
2323
"sigs.k8s.io/cluster-api/errors"

api/v1beta1/type.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"fmt"
55
"strings"
66

7-
"github.com/sp-yduck/proxmox-go/api"
7+
"github.com/k8s-proxmox/proxmox-go/api"
88
)
99

1010
type InstanceStatus string

cloud/cloudinit/user.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"github.com/imdario/mergo"
77
"gopkg.in/yaml.v3"
88

9-
infrav1 "github.com/sp-yduck/cluster-api-provider-proxmox/api/v1beta1"
9+
infrav1 "github.com/k8s-proxmox/cluster-api-provider-proxmox/api/v1beta1"
1010
)
1111

1212
func ParseUserData(content string) (*infrav1.UserData, error) {

cloud/cloudinit/user_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import (
66
. "github.com/onsi/ginkgo/v2"
77
. "github.com/onsi/gomega"
88

9-
infrav1 "github.com/sp-yduck/cluster-api-provider-proxmox/api/v1beta1"
10-
"github.com/sp-yduck/cluster-api-provider-proxmox/cloud/cloudinit"
9+
infrav1 "github.com/k8s-proxmox/cluster-api-provider-proxmox/api/v1beta1"
10+
"github.com/k8s-proxmox/cluster-api-provider-proxmox/cloud/cloudinit"
1111
)
1212

1313
func TestCloudInit(t *testing.T) {

cloud/interfaces.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ package cloud
33
import (
44
"context"
55

6-
"github.com/sp-yduck/proxmox-go/api"
7-
"github.com/sp-yduck/proxmox-go/proxmox"
6+
"github.com/k8s-proxmox/proxmox-go/api"
7+
"github.com/k8s-proxmox/proxmox-go/proxmox"
88
clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1"
99

10-
infrav1 "github.com/sp-yduck/cluster-api-provider-proxmox/api/v1beta1"
11-
"github.com/sp-yduck/cluster-api-provider-proxmox/cloud/scheduler"
10+
infrav1 "github.com/k8s-proxmox/cluster-api-provider-proxmox/api/v1beta1"
11+
"github.com/k8s-proxmox/cluster-api-provider-proxmox/cloud/scheduler"
1212
)
1313

1414
type Reconciler interface {

cloud/providerid/providerid_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
. "github.com/onsi/ginkgo/v2"
77
. "github.com/onsi/gomega"
88

9-
"github.com/sp-yduck/cluster-api-provider-proxmox/cloud/providerid"
9+
"github.com/k8s-proxmox/cluster-api-provider-proxmox/cloud/providerid"
1010
)
1111

1212
func TestProviderID(t *testing.T) {

cloud/scheduler/framework/cycle_state.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package framework
22

33
import (
4-
"github.com/sp-yduck/proxmox-go/api"
5-
"github.com/sp-yduck/proxmox-go/proxmox"
4+
"github.com/k8s-proxmox/proxmox-go/api"
5+
"github.com/k8s-proxmox/proxmox-go/proxmox"
66
)
77

88
type CycleState struct {

0 commit comments

Comments
 (0)