mirror of
https://github.com/clastix/kamaji.git
synced 2026-03-02 17:50:53 +00:00
Compare commits
9 Commits
v1.0.0
...
edge-24.8.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d4d38c8eaf | ||
|
|
2e17d6b701 | ||
|
|
00356d8c97 | ||
|
|
3b75b23e05 | ||
|
|
a707c618d5 | ||
|
|
84e669316a | ||
|
|
2e235a4e32 | ||
|
|
52c1ee8aba | ||
|
|
b541962163 |
1
.github/workflows/docker-ci.yml
vendored
1
.github/workflows/docker-ci.yml
vendored
@@ -4,6 +4,7 @@ on:
|
||||
push:
|
||||
tags:
|
||||
- "v*"
|
||||
- "edge-*"
|
||||
|
||||
jobs:
|
||||
docker-ci:
|
||||
|
||||
2
Makefile
2
Makefile
@@ -77,7 +77,7 @@ helm: ## Download helm locally if necessary.
|
||||
|
||||
GINKGO = $(shell pwd)/bin/ginkgo
|
||||
ginkgo: ## Download ginkgo locally if necessary.
|
||||
$(call go-install-tool,$(GINKGO),github.com/onsi/ginkgo/v2/ginkgo@v2.6.0)
|
||||
$(call go-install-tool,$(GINKGO),github.com/onsi/ginkgo/v2/ginkgo)
|
||||
|
||||
KIND = $(shell pwd)/bin/kind
|
||||
kind: ## Download kind locally if necessary.
|
||||
|
||||
@@ -122,6 +122,7 @@ Since Kamaji is just focusing on the Control Plane a [Kamaji's Cluster API Contr
|
||||
- YouTube ▶️ [Equinix, Kamaji, and Cluster API](https://www.youtube.com/watch?v=TLBTqROj_wA)
|
||||
- YouTube ▶️ [Rancher & Kamaji: solving multitenancy challenges in the Kubernetes world](https://www.youtube.com/watch?v=VXHNrMmlF8U)
|
||||
- YouTube ▶️ [Enabling Self-Service Kubernetes clusters with Kamaji and Paralus](https://www.youtube.com/watch?v=JWA2LwZazM0)
|
||||
- YouTube ▶️ [Hosted Control Plane on Kubernetes (HPC) with Kamaji and K0mostron by Hervé Leclerc, ALTER WAY](https://www.youtube.com/watch?v=vmRdE2ngn78)
|
||||
|
||||
### 🏷️ Versioning
|
||||
|
||||
@@ -157,4 +158,4 @@ The code is provided as-is with no warranties.
|
||||
If you're looking to run Kamaji in production and would like to learn more, **CLASTIX** can help by offering [Open Source support plans](https://clastix.io/support),
|
||||
as well as providing a comprehensive Enterprise Platform named [CLASTIX Enterprise Platform](https://clastix.cloud/), built on top of the Kamaji and [Capsule](https://capsule.clastix.io/) project (now donated to CNCF as a Sandbox project).
|
||||
|
||||
Feel free to get in touch with the provided [Contact form](https://clastix.io/contact).
|
||||
Feel free to get in touch with the provided [Contact form](https://clastix.io/contact).
|
||||
|
||||
@@ -204,7 +204,7 @@ type KonnectivityServerSpec struct {
|
||||
// The port which Konnectivity server is listening to.
|
||||
Port int32 `json:"port"`
|
||||
// Container image version of the Konnectivity server.
|
||||
// +kubebuilder:default=v0.0.32
|
||||
// +kubebuilder:default=v0.28.6
|
||||
Version string `json:"version,omitempty"`
|
||||
// Container image used by the Konnectivity server.
|
||||
// +kubebuilder:default=registry.k8s.io/kas-network-proxy/proxy-server
|
||||
@@ -219,7 +219,7 @@ type KonnectivityAgentSpec struct {
|
||||
// +kubebuilder:default=registry.k8s.io/kas-network-proxy/proxy-agent
|
||||
Image string `json:"image,omitempty"`
|
||||
// Version for Konnectivity agent.
|
||||
// +kubebuilder:default=v0.0.32
|
||||
// +kubebuilder:default=v0.28.6
|
||||
Version string `json:"version,omitempty"`
|
||||
// Tolerations for the deployed agent.
|
||||
// Can be customized to start the konnectivity-agent even if the nodes are not ready or tainted.
|
||||
@@ -230,9 +230,9 @@ type KonnectivityAgentSpec struct {
|
||||
|
||||
// KonnectivitySpec defines the spec for Konnectivity.
|
||||
type KonnectivitySpec struct {
|
||||
// +kubebuilder:default={version:"v0.0.32",image:"registry.k8s.io/kas-network-proxy/proxy-server",port:8132}
|
||||
// +kubebuilder:default={version:"v0.28.6",image:"registry.k8s.io/kas-network-proxy/proxy-server",port:8132}
|
||||
KonnectivityServerSpec KonnectivityServerSpec `json:"server,omitempty"`
|
||||
// +kubebuilder:default={version:"v0.0.32",image:"registry.k8s.io/kas-network-proxy/proxy-agent"}
|
||||
// +kubebuilder:default={version:"v0.28.6",image:"registry.k8s.io/kas-network-proxy/proxy-agent"}
|
||||
KonnectivityAgentSpec KonnectivityAgentSpec `json:"agent,omitempty"`
|
||||
}
|
||||
|
||||
|
||||
@@ -104,7 +104,7 @@ spec:
|
||||
agent:
|
||||
default:
|
||||
image: registry.k8s.io/kas-network-proxy/proxy-agent
|
||||
version: v0.0.32
|
||||
version: v0.28.6
|
||||
properties:
|
||||
extraArgs:
|
||||
description: |-
|
||||
@@ -165,7 +165,7 @@ spec:
|
||||
type: object
|
||||
type: array
|
||||
version:
|
||||
default: v0.0.32
|
||||
default: v0.28.6
|
||||
description: Version for Konnectivity agent.
|
||||
type: string
|
||||
type: object
|
||||
@@ -173,7 +173,7 @@ spec:
|
||||
default:
|
||||
image: registry.k8s.io/kas-network-proxy/proxy-server
|
||||
port: 8132
|
||||
version: v0.0.32
|
||||
version: v0.28.6
|
||||
properties:
|
||||
extraArgs:
|
||||
description: |-
|
||||
@@ -252,7 +252,7 @@ spec:
|
||||
type: object
|
||||
type: object
|
||||
version:
|
||||
default: v0.0.32
|
||||
default: v0.28.6
|
||||
description: Container image version of the Konnectivity
|
||||
server.
|
||||
type: string
|
||||
|
||||
@@ -61,7 +61,7 @@ spec:
|
||||
- --peer-cert-file=/etc/etcd/pki/peer.pem
|
||||
- --peer-key-file=/etc/etcd/pki/peer-key.pem
|
||||
- --auto-compaction-mode=periodic
|
||||
- --auto-compaction-retention=5m
|
||||
- --auto-compaction-retention= {{ .Values.etcd.compactionInterval }}
|
||||
- --snapshot-count=10000
|
||||
- --quota-backend-bytes=8589934592
|
||||
- --v=8
|
||||
|
||||
@@ -297,7 +297,7 @@ func NewCmd(scheme *runtime.Scheme) *cobra.Command {
|
||||
cmd.Flags().StringVar(&healthProbeBindAddress, "health-probe-bind-address", ":8081", "The address the probe endpoint binds to.")
|
||||
cmd.Flags().BoolVar(&leaderElect, "leader-elect", true, "Enable leader election for controller manager. Enabling this will ensure there is only one active controller manager.")
|
||||
cmd.Flags().StringVar(&tmpDirectory, "tmp-directory", "/tmp/kamaji", "Directory which will be used to work with temporary files.")
|
||||
cmd.Flags().StringVar(&kineImage, "kine-image", "rancher/kine:v0.9.2-amd64", "Container image along with tag to use for the Kine sidecar container (used only if etcd-storage-type is set to one of kine strategies).")
|
||||
cmd.Flags().StringVar(&kineImage, "kine-image", "rancher/kine:v0.11.10-amd64", "Container image along with tag to use for the Kine sidecar container (used only if etcd-storage-type is set to one of kine strategies).")
|
||||
cmd.Flags().StringVar(&datastore, "datastore", "etcd", "The default DataStore that should be used by Kamaji to setup the required storage.")
|
||||
cmd.Flags().StringVar(&migrateJobImage, "migrate-image", fmt.Sprintf("clastix/kamaji:%s", internal.GitTag), "Specify the container image to launch when a TenantControlPlane is migrated to a new datastore.")
|
||||
cmd.Flags().IntVar(&maxConcurrentReconciles, "max-concurrent-tcp-reconciles", 1, "Specify the number of workers for the Tenant Control Plane controller (beware of CPU consumption)")
|
||||
|
||||
@@ -95,7 +95,7 @@ spec:
|
||||
agent:
|
||||
default:
|
||||
image: registry.k8s.io/kas-network-proxy/proxy-agent
|
||||
version: v0.0.32
|
||||
version: v0.28.6
|
||||
properties:
|
||||
extraArgs:
|
||||
description: |-
|
||||
@@ -156,7 +156,7 @@ spec:
|
||||
type: object
|
||||
type: array
|
||||
version:
|
||||
default: v0.0.32
|
||||
default: v0.28.6
|
||||
description: Version for Konnectivity agent.
|
||||
type: string
|
||||
type: object
|
||||
@@ -164,7 +164,7 @@ spec:
|
||||
default:
|
||||
image: registry.k8s.io/kas-network-proxy/proxy-server
|
||||
port: 8132
|
||||
version: v0.0.32
|
||||
version: v0.28.6
|
||||
properties:
|
||||
extraArgs:
|
||||
description: |-
|
||||
@@ -243,7 +243,7 @@ spec:
|
||||
type: object
|
||||
type: object
|
||||
version:
|
||||
default: v0.0.32
|
||||
default: v0.28.6
|
||||
description: Container image version of the Konnectivity
|
||||
server.
|
||||
type: string
|
||||
|
||||
@@ -394,7 +394,7 @@ spec:
|
||||
agent:
|
||||
default:
|
||||
image: registry.k8s.io/kas-network-proxy/proxy-agent
|
||||
version: v0.0.32
|
||||
version: v0.28.6
|
||||
properties:
|
||||
extraArgs:
|
||||
description: |-
|
||||
@@ -454,7 +454,7 @@ spec:
|
||||
type: object
|
||||
type: array
|
||||
version:
|
||||
default: v0.0.32
|
||||
default: v0.28.6
|
||||
description: Version for Konnectivity agent.
|
||||
type: string
|
||||
type: object
|
||||
@@ -462,7 +462,7 @@ spec:
|
||||
default:
|
||||
image: registry.k8s.io/kas-network-proxy/proxy-server
|
||||
port: 8132
|
||||
version: v0.0.32
|
||||
version: v0.28.6
|
||||
properties:
|
||||
extraArgs:
|
||||
description: |-
|
||||
@@ -537,7 +537,7 @@ spec:
|
||||
type: object
|
||||
type: object
|
||||
version:
|
||||
default: v0.0.32
|
||||
default: v0.28.6
|
||||
description: Container image version of the Konnectivity server.
|
||||
type: string
|
||||
required:
|
||||
|
||||
@@ -44,7 +44,7 @@ spec:
|
||||
secretName: mysql-certs
|
||||
containers:
|
||||
- name: kine-tenant
|
||||
image: rancher/kine:v0.9.2-amd64
|
||||
image: rancher/kine:v0.11.10-amd64
|
||||
ports:
|
||||
- containerPort: 2379
|
||||
name: server
|
||||
|
||||
@@ -13509,7 +13509,7 @@ Enables the Konnectivity addon in the Tenant Cluster, required if the worker nod
|
||||
<td>
|
||||
<br/>
|
||||
<br/>
|
||||
<i>Default</i>: map[image:registry.k8s.io/kas-network-proxy/proxy-agent version:v0.0.32]<br/>
|
||||
<i>Default</i>: map[image:registry.k8s.io/kas-network-proxy/proxy-agent version:v0.28.6]<br/>
|
||||
</td>
|
||||
<td>false</td>
|
||||
</tr><tr>
|
||||
@@ -13518,7 +13518,7 @@ Enables the Konnectivity addon in the Tenant Cluster, required if the worker nod
|
||||
<td>
|
||||
<br/>
|
||||
<br/>
|
||||
<i>Default</i>: map[image:registry.k8s.io/kas-network-proxy/proxy-server port:8132 version:v0.0.32]<br/>
|
||||
<i>Default</i>: map[image:registry.k8s.io/kas-network-proxy/proxy-server port:8132 version:v0.28.6]<br/>
|
||||
</td>
|
||||
<td>false</td>
|
||||
</tr></tbody>
|
||||
@@ -13575,7 +13575,7 @@ Can be customized to start the konnectivity-agent even if the nodes are not read
|
||||
<td>
|
||||
Version for Konnectivity agent.<br/>
|
||||
<br/>
|
||||
<i>Default</i>: v0.0.32<br/>
|
||||
<i>Default</i>: v0.28.6<br/>
|
||||
</td>
|
||||
<td>false</td>
|
||||
</tr></tbody>
|
||||
@@ -13704,7 +13704,7 @@ unxpected ways. Only modify if you know what you are doing.<br/>
|
||||
<td>
|
||||
Container image version of the Konnectivity server.<br/>
|
||||
<br/>
|
||||
<i>Default</i>: v0.0.32<br/>
|
||||
<i>Default</i>: v0.28.6<br/>
|
||||
</td>
|
||||
<td>false</td>
|
||||
</tr></tbody>
|
||||
|
||||
@@ -10,7 +10,7 @@ Available flags are the following:
|
||||
| `--health-probe-bind-address` | The address the probe endpoint binds to. | `:8081` |
|
||||
| `--leader-elect` | Enable leader election for controller manager. Enabling this will ensure there is only one active controller manager. | `true` |
|
||||
| `--tmp-directory` | Directory which will be used to work with temporary files. | `/tmp/kamaji` |
|
||||
| `--kine-image` | Container image along with tag to use for the Kine sidecar container (used only if etcd-storage-type is set to one of kine strategies). | `rancher/kine:v0.9.2-amd64` |
|
||||
| `--kine-image` | Container image along with tag to use for the Kine sidecar container (used only if etcd-storage-type is set to one of kine strategies). | `rancher/kine:v0.11.10-amd64` |
|
||||
| `--datastore` | The default DataStore that should be used by Kamaji to setup the required storage. | `etcd` |
|
||||
| `--migrate-image` | Specify the container image to launch when a TenantControlPlane is migrated to a new datastore. | `migrate-image` |
|
||||
| `--max-concurrent-tcp-reconciles` | Specify the number of workers for the Tenant Control Plane controller (beware of CPU consumption). | `1` |
|
||||
|
||||
@@ -1,12 +1,26 @@
|
||||
# Versioning
|
||||
# Releases and Versions
|
||||
|
||||
[Clastix Labs](https://github.com/clastix) organization publishes Kamaji's versions that correspond to specific project milestones and sets of new features. These versions are available in different types of release artifacts.
|
||||
|
||||
## Types of release artifacts
|
||||
|
||||
### Edge Releases
|
||||
|
||||
Edge Release artifacts are published on a monthly basis as part of the open source project. Versioning follows the form `edge-{year}.{month}.{incremental}` where incremental refers to the monthly release. For example, `edge-24.7.1` is the first edge release shipped in July 2024. The full list of edge release artifacts can be found on the Kamaji's GitHub [releases page](https://github.com/clastix/kamaji/releases).
|
||||
|
||||
Edge Release artifacts contain the code in from the main branch at the point in time when they were cut. This means they always have the latest features and fixes, and have undergone automated testing as well as maintainer code review. Edge Releases may involve partial features that are later modified or backed out. They may also involve breaking changes, of course, we do our best to avoid this. Edge Releases are generally considered production ready, and the project will mark specific releases as “_not recommended_” if bugs are discovered after release.
|
||||
|
||||
Using Edge Release artifacts and reporting bugs helps us ensure a rapid pace of development and is a great way to help maintainers. We publish edge release guidance as part of the release notes and strive to always provide production-ready artifacts.
|
||||
|
||||
### Stable Releases
|
||||
|
||||
Stable Release artifacts of Kamaji follow semantic versioning, whereby changes in major version denote large feature additions and possible breaking changes and changes in minor versions denote safe upgrades without breaking changes.
|
||||
|
||||
As of July 2024, [Clastix Labs](https://github.com/clastix) organization does not no longer provide stable release artifacts. Stable Release artefacts are offered on a subscription basis by [CLASTIX](https://clastix.io), the main Kamaji project contributor.
|
||||
|
||||
In Kamaji, there are different components that might require independent versioning and support level:
|
||||
|
||||
| Kamaji | Management Cluster | Tenant Cluster |
|
||||
|--------|--------------------|----------------------|
|
||||
| v0.0 | v1.22+ | [v1.21.0 .. v1.23.5] |
|
||||
| v0.1 | v1.22+ | [v1.21.0 .. v1.25.0] |
|
||||
| v0.2 | v1.22+ | [v1.21.0 .. v1.27.0] |
|
||||
| v0.3.0 | v1.22+ | [v1.21.0 .. v1.27.0] |
|
||||
| v0.3.1 | v1.22+ | [v1.21.0 .. v1.27.3] |
|
||||
| v0.3.2 | v1.22+ | [v1.21.0 .. v1.27.3] |
|
||||
@@ -19,3 +33,4 @@ In Kamaji, there are different components that might require independent version
|
||||
| v0.4.2 | v1.22+ | [v1.21.0 .. v1.29.1] |
|
||||
| v0.5.0 | v1.22+ | [v1.21.0 .. v1.30.0] |
|
||||
| v0.6.0 | v1.22+ | [v1.21.0 .. v1.30.1] |
|
||||
| v1.0.0 | v1.22+ | [v1.21.0 .. v1.30.2] |
|
||||
@@ -23,7 +23,7 @@ type ConnectionEndpoint struct {
|
||||
}
|
||||
|
||||
func (r ConnectionEndpoint) String() string {
|
||||
return fmt.Sprintf("%s:%d", r.Host, r.Port)
|
||||
return net.JoinHostPort(r.Host, strconv.FormatInt(int64(r.Port), 10))
|
||||
}
|
||||
|
||||
type ConnectionConfig struct {
|
||||
|
||||
@@ -30,20 +30,49 @@ func (r *KubernetesIngressResource) ShouldStatusBeUpdated(_ context.Context, tcp
|
||||
case tcp.Spec.ControlPlane.Ingress == nil && tcp.Status.Kubernetes.Ingress == nil:
|
||||
// No update in case of no ingress in spec, neither in status.
|
||||
return false
|
||||
case tcp.Spec.ControlPlane.Ingress != nil && tcp.Status.Kubernetes.Ingress == nil,
|
||||
// Must be updated when TCP is using an Ingress, and status is not tracking it
|
||||
// or
|
||||
// Must be updated when the status is referring to an Ingress, although spec doesn't.
|
||||
tcp.Spec.ControlPlane.Ingress == nil && tcp.Status.Kubernetes.Ingress != nil:
|
||||
case tcp.Spec.ControlPlane.Ingress != nil && tcp.Status.Kubernetes.Ingress == nil, // TCP is using an Ingress, Status not tracking it
|
||||
tcp.Spec.ControlPlane.Ingress == nil && tcp.Status.Kubernetes.Ingress != nil: // Status tracks an Ingress, Spec doesn't
|
||||
return true
|
||||
case len(r.resource.Status.LoadBalancer.Ingress) > 0 && tcp.Status.Kubernetes.Ingress == nil || tcp.Status.Kubernetes.Ingress.LoadBalancer.Ingress == nil:
|
||||
// Must be updated since missing the Ingress status
|
||||
return true
|
||||
case r.resource.Status.LoadBalancer.Ingress[0].IP != tcp.Status.Kubernetes.Ingress.LoadBalancer.Ingress[0].IP:
|
||||
// Must bne updated, Ingress load balancer IP is slightly different
|
||||
case len(tcp.Status.Kubernetes.Ingress.IngressStatus.LoadBalancer.Ingress) != len(r.resource.Status.LoadBalancer.Ingress):
|
||||
// Mismatch count of tracked LoadBalancer Ingress
|
||||
return true
|
||||
default:
|
||||
return tcp.Status.Kubernetes.Ingress.Name != r.resource.GetName() || tcp.Status.Kubernetes.Ingress.Namespace != r.resource.GetNamespace()
|
||||
statusIngress := tcp.Status.Kubernetes.Ingress.IngressStatus.LoadBalancer.Ingress
|
||||
|
||||
for i, ingress := range r.resource.Status.LoadBalancer.Ingress {
|
||||
if ingress.IP != statusIngress[i].IP {
|
||||
return true
|
||||
}
|
||||
|
||||
if len(ingress.Ports) != len(statusIngress[i].Ports) {
|
||||
return true
|
||||
}
|
||||
|
||||
for p, port := range ingress.Ports {
|
||||
if port.Port != statusIngress[i].Ports[p].Port {
|
||||
return true
|
||||
}
|
||||
|
||||
if port.Protocol != statusIngress[i].Ports[p].Protocol {
|
||||
return true
|
||||
}
|
||||
|
||||
if port.Error == nil && statusIngress[i].Ports[p].Error != nil ||
|
||||
port.Error != nil && statusIngress[i].Ports[p].Error == nil {
|
||||
return true
|
||||
}
|
||||
|
||||
if port.Error == nil && statusIngress[i].Ports[p].Error == nil {
|
||||
continue
|
||||
}
|
||||
|
||||
if *port.Error != *statusIngress[i].Ports[p].Error {
|
||||
return true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,8 @@ package resources
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"net"
|
||||
"strconv"
|
||||
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
@@ -53,8 +54,7 @@ func (r *KubernetesServiceResource) UpdateTenantControlPlaneStatus(ctx context.C
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
tenantControlPlane.Status.ControlPlaneEndpoint = fmt.Sprintf("%s:%d", address, tenantControlPlane.Spec.NetworkProfile.Port)
|
||||
tenantControlPlane.Status.ControlPlaneEndpoint = net.JoinHostPort(address, strconv.FormatInt(int64(tenantControlPlane.Spec.NetworkProfile.Port), 10))
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -5,7 +5,8 @@ package resources
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"net"
|
||||
"strconv"
|
||||
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
@@ -74,7 +75,7 @@ func (r *KubeadmConfigResource) getControlPlaneEndpoint(ingress *kamajiv1alpha1.
|
||||
address, port = utilities.GetControlPlaneAddressAndPortFromHostname(ingress.Hostname, port)
|
||||
}
|
||||
|
||||
return fmt.Sprintf("%s:%d", address, port)
|
||||
return net.JoinHostPort(address, strconv.FormatInt(int64(port), 10))
|
||||
}
|
||||
|
||||
func (r *KubeadmConfigResource) mutate(ctx context.Context, tenantControlPlane *kamajiv1alpha1.TenantControlPlane) controllerutil.MutateFn {
|
||||
|
||||
Reference in New Issue
Block a user