Compare commits

...

7 Commits

Author SHA1 Message Date
Andrei Kvapil
8bf2e67c4d [tests] Enhance timeouts awaitng for tenant Kubernetes cluster
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2025-05-29 09:00:44 +02:00
Andrei Kvapil
0664370218 [apps] Add topologySpreadConstraints for managed PostgreSQL and tenant Kubernetes clusters. (#995)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Added support for injecting custom topology spread constraints into
virtual machine templates, PostgreSQL clusters, and monitoring
components based on a ConfigMap in the cluster.

- **Chores**
- Updated chart versions for Kubernetes (0.21.0), Postgres (0.12.0), and
Monitoring (1.10.0).
- Updated version mappings for Kubernetes, Postgres, and Monitoring
packages.
- Increased memory allocation for QEMU virtual machine tests from 8 GB
to 14 GB.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-05-28 23:20:11 +02:00
kklinch0
225d103509 [k8s] add topologySpreadConstraints for client k8s cluster
Signed-off-by: kklinch0 <kklinch0@gmail.com>
2025-05-28 23:17:00 +02:00
Andrei Kvapil
0e22e3c12c [virtual-machine] fix: specify ports even for wholeIP mode (#1000)
There is an issue with wholeIP services: internal communication from
pods doesn't work as expected.

Cilium intercepts pod-to-pod traffic, preventing cozy-proxy from
rewriting the source IP in return packets.

This PR allows Cilium to handle specified ports, enabling hairpin
traffic to work correctly at least for these cases.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Bug Fixes**
- Improved service port configuration to ensure explicit port
definitions are respected when using the "WholeIP" method. Now, custom
external ports will not be overridden, providing more accurate and
expected service exposure.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-05-28 20:53:20 +02:00
Andrei Kvapil
7b8e7e40ce [virtual-machine] fix: specify ports even for wholeIP mode
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2025-05-28 20:12:30 +02:00
Nick Volynkin
c941e487fb [docs] Review the tenant Kubernetes cluster docs (#969)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **Documentation**
- Completely overhauled and expanded the Managed Kubernetes Service
guide for Cozystack.
- Added detailed explanations of service architecture, tenant isolation,
and use cases.
- Included step-by-step instructions for accessing tenant clusters and
kubeconfig files.
- Expanded configuration parameters with clear tables and
recommendations.
- Introduced a comprehensive resource reference and improved
descriptions of instance types and series.
- Enhanced configuration schema descriptions for clearer resource
specification and standardized addon settings.
- Updated configuration file comments for improved clarity and
consistency without changing functionality.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-05-28 21:00:06 +07:00
Nick Volynkin
8386e985f2 [docs] Review the tenant Kubernetes cluster docs
Signed-off-by: Nick Volynkin <nick.volynkin@gmail.com>
2025-05-28 15:15:03 +03:00
17 changed files with 270 additions and 174 deletions

View File

@@ -23,7 +23,7 @@ EOF
kubectl wait namespace tenant-test --timeout=20s --for=jsonpath='{.status.phase}'=Active kubectl wait namespace tenant-test --timeout=20s --for=jsonpath='{.status.phase}'=Active
} }
@test "Create a tenant Kubernetes control plane" { @test "Create a tenant Kubernetes cluster" {
kubectl create -f - <<EOF kubectl create -f - <<EOF
apiVersion: apps.cozystack.io/v1alpha1 apiVersion: apps.cozystack.io/v1alpha1
kind: Kubernetes kind: Kubernetes
@@ -90,5 +90,5 @@ EOF
kubectl wait tcp -n tenant-test kubernetes-test --timeout=2m --for=jsonpath='{.status.kubernetesResources.version.status}'=Ready kubectl wait tcp -n tenant-test kubernetes-test --timeout=2m --for=jsonpath='{.status.kubernetesResources.version.status}'=Ready
kubectl wait deploy --timeout=4m --for=condition=available -n tenant-test kubernetes-test kubernetes-test-cluster-autoscaler kubernetes-test-kccm kubernetes-test-kcsi-controller kubectl wait deploy --timeout=4m --for=condition=available -n tenant-test kubernetes-test kubernetes-test-cluster-autoscaler kubernetes-test-kccm kubernetes-test-kcsi-controller
kubectl wait machinedeployment kubernetes-test-md0 -n tenant-test --timeout=1m --for=jsonpath='{.status.replicas}'=2 kubectl wait machinedeployment kubernetes-test-md0 -n tenant-test --timeout=1m --for=jsonpath='{.status.replicas}'=2
kubectl wait machinedeployment kubernetes-test-md0 -n tenant-test --timeout=5m --for=jsonpath='{.status.v1beta2.readyReplicas}'=2 kubectl wait machinedeployment kubernetes-test-md0 -n tenant-test --timeout=8m --for=jsonpath='{.status.v1beta2.readyReplicas}'=2
} }

View File

@@ -11,6 +11,9 @@ spec:
{{- $rawConstraints := get $configMap.data "globalAppTopologySpreadConstraints" }} {{- $rawConstraints := get $configMap.data "globalAppTopologySpreadConstraints" }}
{{- if $rawConstraints }} {{- if $rawConstraints }}
{{- $rawConstraints | fromYaml | toYaml | nindent 2 }} {{- $rawConstraints | fromYaml | toYaml | nindent 2 }}
labelSelector:
matchLabels:
cnpg.io/cluster: {{ .Release.Name }}-postgres
{{- end }} {{- end }}
{{- end }} {{- end }}
minSyncReplicas: {{ .Values.quorum.minSyncReplicas }} minSyncReplicas: {{ .Values.quorum.minSyncReplicas }}

View File

@@ -16,7 +16,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes # This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version. # to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/) # Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.20.1 version: 0.21.0
# This is the version number of the application being deployed. This version number should be # This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to # incremented each time you make changes to the application. Versions are not expected to

View File

@@ -1,77 +1,199 @@
# Managed Kubernetes Service # Managed Kubernetes Service
## Overview ## Managed Kubernetes in Cozystack
The Managed Kubernetes Service offers a streamlined solution for efficiently managing server workloads. Kubernetes has emerged as the industry standard, providing a unified and accessible API, primarily utilizing YAML for configuration. This means that teams can easily understand and work with Kubernetes, streamlining infrastructure management. Whenever you want to deploy a custom containerized application in Cozystack, it's best to deploy it to a managed Kubernetes cluster.
The Kubernetes leverages robust software design patterns, enabling continuous recovery in any scenario through the reconciliation method. Additionally, it ensures seamless scaling across a multitude of servers, addressing the challenges posed by complex and outdated APIs found in traditional virtualization platforms. This managed service eliminates the need for developing custom solutions or modifying source code, saving valuable time and effort. Cozystack deploys and manages Kubernetes-as-a-service as standalone applications within each tenants isolated environment.
In Cozystack, such clusters are named tenant Kubernetes clusters, while the base Cozystack cluster is called a management or root cluster.
Tenant clusters are fully separated from the management cluster and are intended for deploying tenant-specific or customer-developed applications.
## Deployment Details Within a tenant cluster, users can take advantage of LoadBalancer services and easily provision physical volumes as needed.
The control-plane operates within containers, while the worker nodes are deployed as virtual machines, all seamlessly managed by the application.
The managed Kubernetes service deploys a standard Kubernetes cluster utilizing the Cluster API, Kamaji as control-plane provicer and the KubeVirt infrastructure provider. This ensures a consistent and reliable setup for workloads. ## Why Use a Managed Kubernetes Cluster?
Within this cluster, users can take advantage of LoadBalancer services and easily provision physical volumes as needed. The control-plane operates within containers, while the worker nodes are deployed as virtual machines, all seamlessly managed by the application. Kubernetes has emerged as the industry standard, providing a unified and accessible API, primarily utilizing YAML for configuration.
This means that teams can easily understand and work with Kubernetes, streamlining infrastructure management.
- Docs: https://github.com/clastix/kamaji Kubernetes leverages robust software design patterns, enabling continuous recovery in any scenario through the reconciliation method.
- Docs: https://cluster-api.sigs.k8s.io/ Additionally, it ensures seamless scaling across a multitude of servers,
- GitHub: https://github.com/clastix/kamaji addressing the challenges posed by complex and outdated APIs found in traditional virtualization platforms.
- GitHub: https://github.com/kubernetes-sigs/cluster-api-provider-kubevirt This managed service eliminates the need for developing custom solutions or modifying source code, saving valuable time and effort.
- GitHub: https://github.com/kubevirt/csi-driver
The Managed Kubernetes Service in Cozystack offers a streamlined solution for efficiently managing server workloads.
## How-Tos ## Starting Work
How to access to deployed cluster: Once the tenant Kubernetes cluster is ready, you can get a kubeconfig file to work with it.
It can be done via UI or a `kubectl` request:
``` - Open the Cozystack dashboard, switch to your tenant, find and open the application page. Copy one of the config files from the **Secrets** section.
kubectl get secret -n <namespace> kubernetes-<clusterName>-admin-kubeconfig -o go-template='{{ printf "%s\n" (index .data "super-admin.conf" | base64decode) }}' > test - Run the following command (using the management cluster kubeconfig):
```
```bash
kubectl get secret -n tenant-<name> kubernetes-<clusterName>-admin-kubeconfig -o go-template='{{ printf "%s\n" (index .data "admin.conf" | base64decode) }}' > admin.conf
```
There are several kubeconfig options available:
- `admin.conf` — The standard kubeconfig for accessing your new cluster.
You can create additional Kubernetes users using this configuration.
- `admin.svc` — Same token as `admin.conf`, but with the API server address set to the internal service name.
Use it for applications running inside the cluster that need API access.
- `super-admin.conf` — Similar to `admin.conf`, but with extended administrative permissions.
Intended for troubleshooting and cluster maintenance tasks.
- `super-admin.svc` — Same as `super-admin.conf`, but pointing to the internal API server address.
## Implementation Details
A tenant Kubernetes cluster in Cozystack is essentially Kubernetes-in-Kubernetes.
Deploying it involves the following components:
- **Kamaji Control Plane**: [Kamaji](https://kamaji.clastix.io/) is an open-source project that facilitates the deployment
of Kubernetes control planes as pods within a root cluster.
Each control plane pod includes essential components like `kube-apiserver`, `controller-manager`, and `scheduler`,
allowing for efficient multi-tenancy and resource utilization.
- **Etcd Cluster**: A dedicated etcd cluster is deployed using Ænix's [etcd-operator](https://github.com/aenix-io/etcd-operator).
It provides reliable and scalable key-value storage for the Kubernetes control plane.
- **Worker Nodes**: Virtual Machines are provisioned to serve as worker nodes using KubeVirt.
These nodes are configured to join the tenant Kubernetes cluster, enabling the deployment and management of workloads.
- **Cluster API**: Cozystack is using the [Kubernetes Cluster API](https://cluster-api.sigs.k8s.io/) to provision the components of a cluster.
This architecture ensures isolated, scalable, and efficient tenant Kubernetes environments.
See the reference for components utilized in this service:
- [Kamaji Control Plane](https://kamaji.clastix.io)
- [Kamaji — Cluster API](https://kamaji.clastix.io/cluster-api/)
- [github.com/clastix/kamaji](https://github.com/clastix/kamaji)
- [KubeVirt](https://kubevirt.io/)
- [github.com/kubevirt/kubevirt](https://github.com/kubevirt/kubevirt)
- [github.com/aenix-io/etcd-operator](https://github.com/aenix-io/etcd-operator)
- [Kubernetes Cluster API](https://cluster-api.sigs.k8s.io/)
- [github.com/kubernetes-sigs/cluster-api-provider-kubevirt](https://github.com/kubernetes-sigs/cluster-api-provider-kubevirt)
- [github.com/kubevirt/csi-driver](https://github.com/kubevirt/csi-driver)
## Parameters ## Parameters
### Common parameters ### Common Parameters
| Name | Description | Value | | Name | Description | Value |
| ----------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | ------------ | | ----------------------- | ----------------------------------------------------------------------------------------------------------------- | ------------ |
| `host` | The hostname used to access the Kubernetes cluster externally (defaults to using the cluster name as a subdomain for the tenant host). | `""` | | `host` | Hostname used to access the Kubernetes cluster externally. Defaults to `<cluster-name>.<tenant-host>` when empty. | `""` |
| `controlPlane.replicas` | Number of replicas for Kubernetes control-plane components | `2` | | `controlPlane.replicas` | Number of replicas for Kubernetes control-plane components. | `2` |
| `storageClass` | StorageClass used to store user data | `replicated` | | `storageClass` | StorageClass used to store user data. | `replicated` |
| `nodeGroups` | nodeGroups configuration | `{}` | | `nodeGroups` | nodeGroups configuration | `{}` |
### Cluster Addons ### Cluster Addons
| Name | Description | Value | | Name | Description | Value |
| --------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- | | --------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- |
| `addons.certManager.enabled` | Enables the cert-manager | `false` | | `addons.certManager.enabled` | Enable cert-manager, which automatically creates and manages SSL/TLS certificates. | `false` |
| `addons.certManager.valuesOverride` | Custom values to override | `{}` | | `addons.certManager.valuesOverride` | Custom values to override | `{}` |
| `addons.cilium.valuesOverride` | Custom values to override | `{}` | | `addons.cilium.valuesOverride` | Custom values to override | `{}` |
| `addons.gatewayAPI.enabled` | Enables the Gateway API | `false` | | `addons.gatewayAPI.enabled` | Enable the Gateway API | `false` |
| `addons.ingressNginx.enabled` | Enable Ingress-NGINX controller (expect nodes with 'ingress-nginx' role) | `false` | | `addons.ingressNginx.enabled` | Enable the Ingress-NGINX controller (requires nodes labeled with the 'ingress-nginx' role). | `false` |
| `addons.ingressNginx.valuesOverride` | Custom values to override | `{}` | | `addons.ingressNginx.valuesOverride` | Custom values to override | `{}` |
| `addons.ingressNginx.hosts` | List of domain names that should be passed through to the cluster by upper cluster | `[]` | | `addons.ingressNginx.hosts` | List of domain names that the parent cluster should route to this tenant cluster. | `[]` |
| `addons.gpuOperator.enabled` | Enables the gpu-operator | `false` | | `addons.gpuOperator.enabled` | Enable the GPU-operator | `false` |
| `addons.gpuOperator.valuesOverride` | Custom values to override | `{}` | | `addons.gpuOperator.valuesOverride` | Custom values to override | `{}` |
| `addons.fluxcd.enabled` | Enables Flux CD | `false` | | `addons.fluxcd.enabled` | Enable FluxCD | `false` |
| `addons.fluxcd.valuesOverride` | Custom values to override | `{}` | | `addons.fluxcd.valuesOverride` | Custom values to override | `{}` |
| `addons.monitoringAgents.enabled` | Enables MonitoringAgents (fluentbit, vmagents for sending logs and metrics to storage) if tenant monitoring enabled, send to tenant storage, else to root storage | `false` | | `addons.monitoringAgents.enabled` | Enable monitoring agents (Fluent Bit and VMAgents) to send logs and metrics. If tenant monitoring is enabled, data is sent to tenant storage; otherwise, it goes to root storage. | `false` |
| `addons.monitoringAgents.valuesOverride` | Custom values to override | `{}` | | `addons.monitoringAgents.valuesOverride` | Custom values to override | `{}` |
| `addons.verticalPodAutoscaler.valuesOverride` | Custom values to override | `{}` | | `addons.verticalPodAutoscaler.valuesOverride` | Custom values to override | `{}` |
### Kubernetes control plane configuration ### Kubernetes Control Plane Configuration
| Name | Description | Value | | Name | Description | Value |
| -------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- | | -------------------------------------------------- | ---------------------------------------------------------------------------- | ------- |
| `controlPlane.apiServer.resourcesPreset` | Set container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). This is ignored if resources is set (resources is recommended for production). | `small` | | `controlPlane.apiServer.resources` | Explicit CPU/memory resource requests and limits for the API server. | `{}` |
| `controlPlane.apiServer.resources` | Resources | `{}` | | `controlPlane.apiServer.resourcesPreset` | Use a common resources preset when `resources` is not set explicitly. | `small` |
| `controlPlane.controllerManager.resources` | Resources | `{}` | | `controlPlane.controllerManager.resources` | Explicit CPU/memory resource requests and limits for the controller manager. | `{}` |
| `controlPlane.controllerManager.resourcesPreset` | Set container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). This is ignored if resources is set (resources is recommended for production). | `micro` | | `controlPlane.controllerManager.resourcesPreset` | Use a common resources preset when `resources` is not set explicitly. | `micro` |
| `controlPlane.scheduler.resourcesPreset` | Set container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). This is ignored if resources is set (resources is recommended for production). | `micro` | | `controlPlane.scheduler.resources` | Explicit CPU/memory resource requests and limits for the scheduler. | `{}` |
| `controlPlane.scheduler.resources` | Resources | `{}` | | `controlPlane.scheduler.resourcesPreset` | Use a common resources preset when `resources` is not set explicitly. | `micro` |
| `controlPlane.konnectivity.server.resourcesPreset` | Set container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). This is ignored if resources is set (resources is recommended for production). | `micro` | | `controlPlane.konnectivity.server.resources` | Explicit CPU/memory resource requests and limits for the Konnectivity. | `{}` |
| `controlPlane.konnectivity.server.resources` | Resources | `{}` | | `controlPlane.konnectivity.server.resourcesPreset` | Use a common resources preset when `resources` is not set explicitly. | `micro` |
In production environments, it's recommended to set `resources` explicitly.
Example of `controlPlane.*.resources`:
## U Series ```yaml
resources:
limits:
cpu: 4000m
memory: 4Gi
requests:
cpu: 100m
memory: 512Mi
```
Allowed values for `controlPlane.*.resourcesPreset` are `none`, `nano`, `micro`, `small`, `medium`, `large`, `xlarge`, `2xlarge`.
This value is ignored if the corresponding `resources` value is set.
## Resources Reference
### instanceType Resources
The following instanceType resources are provided by Cozystack:
| Name | vCPUs | Memory |
|---------------|-------|--------|
| `cx1.2xlarge` | 8 | 16Gi |
| `cx1.4xlarge` | 16 | 32Gi |
| `cx1.8xlarge` | 32 | 64Gi |
| `cx1.large` | 2 | 4Gi |
| `cx1.medium` | 1 | 2Gi |
| `cx1.xlarge` | 4 | 8Gi |
| `gn1.2xlarge` | 8 | 32Gi |
| `gn1.4xlarge` | 16 | 64Gi |
| `gn1.8xlarge` | 32 | 128Gi |
| `gn1.xlarge` | 4 | 16Gi |
| `m1.2xlarge` | 8 | 64Gi |
| `m1.4xlarge` | 16 | 128Gi |
| `m1.8xlarge` | 32 | 256Gi |
| `m1.large` | 2 | 16Gi |
| `m1.xlarge` | 4 | 32Gi |
| `n1.2xlarge` | 16 | 32Gi |
| `n1.4xlarge` | 32 | 64Gi |
| `n1.8xlarge` | 64 | 128Gi |
| `n1.large` | 4 | 8Gi |
| `n1.medium` | 4 | 4Gi |
| `n1.xlarge` | 8 | 16Gi |
| `o1.2xlarge` | 8 | 32Gi |
| `o1.4xlarge` | 16 | 64Gi |
| `o1.8xlarge` | 32 | 128Gi |
| `o1.large` | 2 | 8Gi |
| `o1.medium` | 1 | 4Gi |
| `o1.micro` | 1 | 1Gi |
| `o1.nano` | 1 | 512Mi |
| `o1.small` | 1 | 2Gi |
| `o1.xlarge` | 4 | 16Gi |
| `rt1.2xlarge` | 8 | 32Gi |
| `rt1.4xlarge` | 16 | 64Gi |
| `rt1.8xlarge` | 32 | 128Gi |
| `rt1.large` | 2 | 8Gi |
| `rt1.medium` | 1 | 4Gi |
| `rt1.micro` | 1 | 1Gi |
| `rt1.small` | 1 | 2Gi |
| `rt1.xlarge` | 4 | 16Gi |
| `u1.2xlarge` | 8 | 32Gi |
| `u1.2xmedium` | 2 | 4Gi |
| `u1.4xlarge` | 16 | 64Gi |
| `u1.8xlarge` | 32 | 128Gi |
| `u1.large` | 2 | 8Gi |
| `u1.medium` | 1 | 4Gi |
| `u1.micro` | 1 | 1Gi |
| `u1.nano` | 1 | 512Mi |
| `u1.small` | 1 | 2Gi |
| `u1.xlarge` | 4 | 16Gi |
### U Series: Universal
The U Series is quite neutral and provides resources for The U Series is quite neutral and provides resources for
general purpose applications. general purpose applications.
@@ -82,7 +204,7 @@ attitude towards workloads.
VMs of instance types will share physical CPU cores on a VMs of instance types will share physical CPU cores on a
time-slice basis with other VMs. time-slice basis with other VMs.
### U Series Characteristics #### U Series Characteristics
Specific characteristics of this series are: Specific characteristics of this series are:
- *Burstable CPU performance* - The workload has a baseline compute - *Burstable CPU performance* - The workload has a baseline compute
@@ -91,14 +213,14 @@ Specific characteristics of this series are:
- *vCPU-To-Memory Ratio (1:4)* - A vCPU-to-Memory ratio of 1:4, for less - *vCPU-To-Memory Ratio (1:4)* - A vCPU-to-Memory ratio of 1:4, for less
noise per node. noise per node.
## O Series ### O Series: Overcommitted
The O Series is based on the U Series, with the only difference The O Series is based on the U Series, with the only difference
being that memory is overcommitted. being that memory is overcommitted.
*O* is the abbreviation for "Overcommitted". *O* is the abbreviation for "Overcommitted".
### UO Series Characteristics #### O Series Characteristics
Specific characteristics of this series are: Specific characteristics of this series are:
- *Burstable CPU performance* - The workload has a baseline compute - *Burstable CPU performance* - The workload has a baseline compute
@@ -109,7 +231,7 @@ Specific characteristics of this series are:
- *vCPU-To-Memory Ratio (1:4)* - A vCPU-to-Memory ratio of 1:4, for less - *vCPU-To-Memory Ratio (1:4)* - A vCPU-to-Memory ratio of 1:4, for less
noise per node. noise per node.
## CX Series ### CX Series: Compute Exclusive
The CX Series provides exclusive compute resources for compute The CX Series provides exclusive compute resources for compute
intensive applications. intensive applications.
@@ -123,7 +245,7 @@ the IO threading from cores dedicated to the workload.
In addition, in this series, the NUMA topology of the used In addition, in this series, the NUMA topology of the used
cores is provided to the VM. cores is provided to the VM.
### CX Series Characteristics #### CX Series Characteristics
Specific characteristics of this series are: Specific characteristics of this series are:
- *Hugepages* - Hugepages are used in order to improve memory - *Hugepages* - Hugepages are used in order to improve memory
@@ -138,14 +260,14 @@ Specific characteristics of this series are:
optimize guest sided cache utilization. optimize guest sided cache utilization.
- *vCPU-To-Memory Ratio (1:2)* - A vCPU-to-Memory ratio of 1:2. - *vCPU-To-Memory Ratio (1:2)* - A vCPU-to-Memory ratio of 1:2.
## M Series ### M Series: Memory
The M Series provides resources for memory intensive The M Series provides resources for memory intensive
applications. applications.
*M* is the abbreviation of "Memory". *M* is the abbreviation of "Memory".
### M Series Characteristics #### M Series Characteristics
Specific characteristics of this series are: Specific characteristics of this series are:
- *Hugepages* - Hugepages are used in order to improve memory - *Hugepages* - Hugepages are used in order to improve memory
@@ -156,7 +278,7 @@ Specific characteristics of this series are:
- *vCPU-To-Memory Ratio (1:8)* - A vCPU-to-Memory ratio of 1:8, for much - *vCPU-To-Memory Ratio (1:8)* - A vCPU-to-Memory ratio of 1:8, for much
less noise per node. less noise per node.
## RT Series ### RT Series: RealTime
The RT Series provides resources for realtime applications, like Oslat. The RT Series provides resources for realtime applications, like Oslat.
@@ -165,7 +287,7 @@ The RT Series provides resources for realtime applications, like Oslat.
This series of instance types requires nodes capable of running This series of instance types requires nodes capable of running
realtime applications. realtime applications.
### RT Series Characteristics #### RT Series Characteristics
Specific characteristics of this series are: Specific characteristics of this series are:
- *Hugepages* - Hugepages are used in order to improve memory - *Hugepages* - Hugepages are used in order to improve memory
@@ -179,57 +301,3 @@ Specific characteristics of this series are:
- *vCPU-To-Memory Ratio (1:4)* - A vCPU-to-Memory ratio of 1:4 starting from - *vCPU-To-Memory Ratio (1:4)* - A vCPU-to-Memory ratio of 1:4 starting from
the medium size. the medium size.
## Resources
The following instancetype resources are provided by Cozystack:
Name | vCPUs | Memory
-----|-------|-------
cx1.2xlarge | 8 | 16Gi
cx1.4xlarge | 16 | 32Gi
cx1.8xlarge | 32 | 64Gi
cx1.large | 2 | 4Gi
cx1.medium | 1 | 2Gi
cx1.xlarge | 4 | 8Gi
gn1.2xlarge | 8 | 32Gi
gn1.4xlarge | 16 | 64Gi
gn1.8xlarge | 32 | 128Gi
gn1.xlarge | 4 | 16Gi
m1.2xlarge | 8 | 64Gi
m1.4xlarge | 16 | 128Gi
m1.8xlarge | 32 | 256Gi
m1.large | 2 | 16Gi
m1.xlarge | 4 | 32Gi
n1.2xlarge | 16 | 32Gi
n1.4xlarge | 32 | 64Gi
n1.8xlarge | 64 | 128Gi
n1.large | 4 | 8Gi
n1.medium | 4 | 4Gi
n1.xlarge | 8 | 16Gi
o1.2xlarge | 8 | 32Gi
o1.4xlarge | 16 | 64Gi
o1.8xlarge | 32 | 128Gi
o1.large | 2 | 8Gi
o1.medium | 1 | 4Gi
o1.micro | 1 | 1Gi
o1.nano | 1 | 512Mi
o1.small | 1 | 2Gi
o1.xlarge | 4 | 16Gi
rt1.2xlarge | 8 | 32Gi
rt1.4xlarge | 16 | 64Gi
rt1.8xlarge | 32 | 128Gi
rt1.large | 2 | 8Gi
rt1.medium | 1 | 4Gi
rt1.micro | 1 | 1Gi
rt1.small | 1 | 2Gi
rt1.xlarge | 4 | 16Gi
u1.2xlarge | 8 | 32Gi
u1.2xmedium | 2 | 4Gi
u1.4xlarge | 16 | 64Gi
u1.8xlarge | 32 | 128Gi
u1.large | 2 | 8Gi
u1.medium | 1 | 4Gi
u1.micro | 1 | 1Gi
u1.nano | 1 | 512Mi
u1.small | 1 | 2Gi
u1.xlarge | 4 | 16Gi

View File

@@ -31,6 +31,16 @@ spec:
{{- end }} {{- end }}
cluster.x-k8s.io/deployment-name: {{ $.Release.Name }}-{{ .groupName }} cluster.x-k8s.io/deployment-name: {{ $.Release.Name }}-{{ .groupName }}
spec: spec:
{{- $configMap := lookup "v1" "ConfigMap" "cozy-system" "cozystack-scheduling" }}
{{- if $configMap }}
{{- $rawConstraints := get $configMap.data "globalAppTopologySpreadConstraints" }}
{{- if $rawConstraints }}
{{- $rawConstraints | fromYaml | toYaml | nindent 10 }}
labelSelector:
matchLabels:
cluster.x-k8s.io/cluster-name: {{ $.Release.Name }}
{{- end }}
{{- end }}
domain: domain:
{{- if and .group.resources .group.resources.cpu }} {{- if and .group.resources .group.resources.cpu }}
cpu: cpu:

View File

@@ -4,7 +4,7 @@
"properties": { "properties": {
"host": { "host": {
"type": "string", "type": "string",
"description": "The hostname used to access the Kubernetes cluster externally (defaults to using the cluster name as a subdomain for the tenant host).", "description": "Hostname used to access the Kubernetes cluster externally. Defaults to `<cluster-name>.<tenant-host>` when empty.",
"default": "" "default": ""
}, },
"controlPlane": { "controlPlane": {
@@ -12,15 +12,20 @@
"properties": { "properties": {
"replicas": { "replicas": {
"type": "number", "type": "number",
"description": "Number of replicas for Kubernetes control-plane components", "description": "Number of replicas for Kubernetes control-plane components.",
"default": 2 "default": 2
}, },
"apiServer": { "apiServer": {
"type": "object", "type": "object",
"properties": { "properties": {
"resources": {
"type": "object",
"description": "Explicit CPU/memory resource requests and limits for the API server.",
"default": {}
},
"resourcesPreset": { "resourcesPreset": {
"type": "string", "type": "string",
"description": "Set container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). This is ignored if resources is set (resources is recommended for production).", "description": "Use a common resources preset when `resources` is not set explicitly.",
"default": "small", "default": "small",
"enum": [ "enum": [
"none", "none",
@@ -32,11 +37,6 @@
"xlarge", "xlarge",
"2xlarge" "2xlarge"
] ]
},
"resources": {
"type": "object",
"description": "Resources",
"default": {}
} }
} }
}, },
@@ -45,12 +45,12 @@
"properties": { "properties": {
"resources": { "resources": {
"type": "object", "type": "object",
"description": "Resources", "description": "Explicit CPU/memory resource requests and limits for the controller manager.",
"default": {} "default": {}
}, },
"resourcesPreset": { "resourcesPreset": {
"type": "string", "type": "string",
"description": "Set container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). This is ignored if resources is set (resources is recommended for production).", "description": "Use a common resources preset when `resources` is not set explicitly.",
"default": "micro", "default": "micro",
"enum": [ "enum": [
"none", "none",
@@ -68,9 +68,14 @@
"scheduler": { "scheduler": {
"type": "object", "type": "object",
"properties": { "properties": {
"resources": {
"type": "object",
"description": "Explicit CPU/memory resource requests and limits for the scheduler.",
"default": {}
},
"resourcesPreset": { "resourcesPreset": {
"type": "string", "type": "string",
"description": "Set container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). This is ignored if resources is set (resources is recommended for production).", "description": "Use a common resources preset when `resources` is not set explicitly.",
"default": "micro", "default": "micro",
"enum": [ "enum": [
"none", "none",
@@ -82,11 +87,6 @@
"xlarge", "xlarge",
"2xlarge" "2xlarge"
] ]
},
"resources": {
"type": "object",
"description": "Resources",
"default": {}
} }
} }
}, },
@@ -96,9 +96,14 @@
"server": { "server": {
"type": "object", "type": "object",
"properties": { "properties": {
"resources": {
"type": "object",
"description": "Explicit CPU/memory resource requests and limits for the Konnectivity.",
"default": {}
},
"resourcesPreset": { "resourcesPreset": {
"type": "string", "type": "string",
"description": "Set container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). This is ignored if resources is set (resources is recommended for production).", "description": "Use a common resources preset when `resources` is not set explicitly.",
"default": "micro", "default": "micro",
"enum": [ "enum": [
"none", "none",
@@ -110,11 +115,6 @@
"xlarge", "xlarge",
"2xlarge" "2xlarge"
] ]
},
"resources": {
"type": "object",
"description": "Resources",
"default": {}
} }
} }
} }
@@ -124,7 +124,7 @@
}, },
"storageClass": { "storageClass": {
"type": "string", "type": "string",
"description": "StorageClass used to store user data", "description": "StorageClass used to store user data.",
"default": "replicated" "default": "replicated"
}, },
"addons": { "addons": {
@@ -135,7 +135,7 @@
"properties": { "properties": {
"enabled": { "enabled": {
"type": "boolean", "type": "boolean",
"description": "Enables the cert-manager", "description": "Enable cert-manager, which automatically creates and manages SSL/TLS certificates.",
"default": false "default": false
}, },
"valuesOverride": { "valuesOverride": {
@@ -160,7 +160,7 @@
"properties": { "properties": {
"enabled": { "enabled": {
"type": "boolean", "type": "boolean",
"description": "Enables the Gateway API", "description": "Enable the Gateway API",
"default": false "default": false
} }
} }
@@ -170,7 +170,7 @@
"properties": { "properties": {
"enabled": { "enabled": {
"type": "boolean", "type": "boolean",
"description": "Enable Ingress-NGINX controller (expect nodes with 'ingress-nginx' role)", "description": "Enable the Ingress-NGINX controller (requires nodes labeled with the 'ingress-nginx' role).",
"default": false "default": false
}, },
"valuesOverride": { "valuesOverride": {
@@ -180,7 +180,7 @@
}, },
"hosts": { "hosts": {
"type": "array", "type": "array",
"description": "List of domain names that should be passed through to the cluster by upper cluster", "description": "List of domain names that the parent cluster should route to this tenant cluster.",
"default": [], "default": [],
"items": {} "items": {}
} }
@@ -191,7 +191,7 @@
"properties": { "properties": {
"enabled": { "enabled": {
"type": "boolean", "type": "boolean",
"description": "Enables the gpu-operator", "description": "Enable the GPU-operator",
"default": false "default": false
}, },
"valuesOverride": { "valuesOverride": {
@@ -206,7 +206,7 @@
"properties": { "properties": {
"enabled": { "enabled": {
"type": "boolean", "type": "boolean",
"description": "Enables Flux CD", "description": "Enable FluxCD",
"default": false "default": false
}, },
"valuesOverride": { "valuesOverride": {
@@ -221,7 +221,7 @@
"properties": { "properties": {
"enabled": { "enabled": {
"type": "boolean", "type": "boolean",
"description": "Enables MonitoringAgents (fluentbit, vmagents for sending logs and metrics to storage) if tenant monitoring enabled, send to tenant storage, else to root storage", "description": "Enable monitoring agents (Fluent Bit and VMAgents) to send logs and metrics. If tenant monitoring is enabled, data is sent to tenant storage; otherwise, it goes to root storage.",
"default": false "default": false
}, },
"valuesOverride": { "valuesOverride": {

View File

@@ -1,8 +1,8 @@
## @section Common parameters ## @section Common Parameters
## @param host The hostname used to access the Kubernetes cluster externally (defaults to using the cluster name as a subdomain for the tenant host). ## @param host Hostname used to access the Kubernetes cluster externally. Defaults to `<cluster-name>.<tenant-host>` when empty.
## @param controlPlane.replicas Number of replicas for Kubernetes control-plane components ## @param controlPlane.replicas Number of replicas for Kubernetes control-plane components.
## @param storageClass StorageClass used to store user data ## @param storageClass StorageClass used to store user data.
## ##
host: "" host: ""
storageClass: replicated storageClass: replicated
@@ -37,7 +37,7 @@ addons:
## Cert-manager: automatically creates and manages SSL/TLS certificate ## Cert-manager: automatically creates and manages SSL/TLS certificate
## ##
certManager: certManager:
## @param addons.certManager.enabled Enables the cert-manager ## @param addons.certManager.enabled Enable cert-manager, which automatically creates and manages SSL/TLS certificates.
## @param addons.certManager.valuesOverride Custom values to override ## @param addons.certManager.valuesOverride Custom values to override
enabled: false enabled: false
valuesOverride: {} valuesOverride: {}
@@ -51,17 +51,17 @@ addons:
## Gateway API ## Gateway API
## ##
gatewayAPI: gatewayAPI:
## @param addons.gatewayAPI.enabled Enables the Gateway API ## @param addons.gatewayAPI.enabled Enable the Gateway API
enabled: false enabled: false
## Ingress-NGINX Controller ## Ingress-NGINX Controller
## ##
ingressNginx: ingressNginx:
## @param addons.ingressNginx.enabled Enable Ingress-NGINX controller (expect nodes with 'ingress-nginx' role) ## @param addons.ingressNginx.enabled Enable the Ingress-NGINX controller (requires nodes labeled with the 'ingress-nginx' role).
## @param addons.ingressNginx.valuesOverride Custom values to override ## @param addons.ingressNginx.valuesOverride Custom values to override
## ##
enabled: false enabled: false
## @param addons.ingressNginx.hosts List of domain names that should be passed through to the cluster by upper cluster ## @param addons.ingressNginx.hosts List of domain names that the parent cluster should route to this tenant cluster.
## e.g: ## e.g:
## hosts: ## hosts:
## - example.org ## - example.org
@@ -73,7 +73,7 @@ addons:
## GPU-operator: NVIDIA GPU Operator ## GPU-operator: NVIDIA GPU Operator
## ##
gpuOperator: gpuOperator:
## @param addons.gpuOperator.enabled Enables the gpu-operator ## @param addons.gpuOperator.enabled Enable the GPU-operator
## @param addons.gpuOperator.valuesOverride Custom values to override ## @param addons.gpuOperator.valuesOverride Custom values to override
enabled: false enabled: false
valuesOverride: {} valuesOverride: {}
@@ -81,7 +81,7 @@ addons:
## Flux CD ## Flux CD
## ##
fluxcd: fluxcd:
## @param addons.fluxcd.enabled Enables Flux CD ## @param addons.fluxcd.enabled Enable FluxCD
## @param addons.fluxcd.valuesOverride Custom values to override ## @param addons.fluxcd.valuesOverride Custom values to override
## ##
enabled: false enabled: false
@@ -90,7 +90,7 @@ addons:
## MonitoringAgents ## MonitoringAgents
## ##
monitoringAgents: monitoringAgents:
## @param addons.monitoringAgents.enabled Enables MonitoringAgents (fluentbit, vmagents for sending logs and metrics to storage) if tenant monitoring enabled, send to tenant storage, else to root storage ## @param addons.monitoringAgents.enabled Enable monitoring agents (Fluent Bit and VMAgents) to send logs and metrics. If tenant monitoring is enabled, data is sent to tenant storage; otherwise, it goes to root storage.
## @param addons.monitoringAgents.valuesOverride Custom values to override ## @param addons.monitoringAgents.valuesOverride Custom values to override
## ##
enabled: false enabled: false
@@ -103,15 +103,15 @@ addons:
## ##
valuesOverride: {} valuesOverride: {}
## @section Kubernetes control plane configuration ## @section Kubernetes Control Plane Configuration
## ##
controlPlane: controlPlane:
replicas: 2 replicas: 2
apiServer: apiServer:
## @param controlPlane.apiServer.resourcesPreset Set container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). This is ignored if resources is set (resources is recommended for production). ## @param controlPlane.apiServer.resources Explicit CPU/memory resource requests and limits for the API server.
## @param controlPlane.apiServer.resources Resources ## @param controlPlane.apiServer.resourcesPreset Use a common resources preset when `resources` is not set explicitly.
## e.g: ## e.g:
## resources: ## resources:
## limits: ## limits:
@@ -125,20 +125,20 @@ controlPlane:
resources: {} resources: {}
controllerManager: controllerManager:
## @param controlPlane.controllerManager.resources Resources ## @param controlPlane.controllerManager.resources Explicit CPU/memory resource requests and limits for the controller manager.
## @param controlPlane.controllerManager.resourcesPreset Set container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). This is ignored if resources is set (resources is recommended for production). ## @param controlPlane.controllerManager.resourcesPreset Use a common resources preset when `resources` is not set explicitly.
resourcesPreset: "micro" resourcesPreset: "micro"
resources: {} resources: {}
scheduler: scheduler:
## @param controlPlane.scheduler.resourcesPreset Set container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). This is ignored if resources is set (resources is recommended for production). ## @param controlPlane.scheduler.resources Explicit CPU/memory resource requests and limits for the scheduler.
## @param controlPlane.scheduler.resources Resources ## @param controlPlane.scheduler.resourcesPreset Use a common resources preset when `resources` is not set explicitly.
resourcesPreset: "micro" resourcesPreset: "micro"
resources: {} resources: {}
konnectivity: konnectivity:
server: server:
## @param controlPlane.konnectivity.server.resourcesPreset Set container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). This is ignored if resources is set (resources is recommended for production). ## @param controlPlane.konnectivity.server.resources Explicit CPU/memory resource requests and limits for the Konnectivity.
## @param controlPlane.konnectivity.server.resources Resources ## @param controlPlane.konnectivity.server.resourcesPreset Use a common resources preset when `resources` is not set explicitly.
resourcesPreset: "micro" resourcesPreset: "micro"
resources: {} resources: {}

View File

@@ -16,7 +16,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes # This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version. # to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/) # Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.11.0 version: 0.12.0
# This is the version number of the application being deployed. This version number should be # This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to # incremented each time you make changes to the application. Versions are not expected to

View File

@@ -17,6 +17,9 @@ spec:
{{- $rawConstraints := get $configMap.data "globalAppTopologySpreadConstraints" }} {{- $rawConstraints := get $configMap.data "globalAppTopologySpreadConstraints" }}
{{- if $rawConstraints }} {{- if $rawConstraints }}
{{- $rawConstraints | fromYaml | toYaml | nindent 2 }} {{- $rawConstraints | fromYaml | toYaml | nindent 2 }}
labelSelector:
matchLabels:
cnpg.io/cluster: {{ .Release.Name }}
{{- end }} {{- end }}
{{- end }} {{- end }}
postgresql: postgresql:

View File

@@ -65,7 +65,8 @@ kubernetes 0.17.1 fd240701
kubernetes 0.18.0 721c12a7 kubernetes 0.18.0 721c12a7
kubernetes 0.19.0 93bdf411 kubernetes 0.19.0 93bdf411
kubernetes 0.20.0 609e7ede kubernetes 0.20.0 609e7ede
kubernetes 0.20.1 HEAD kubernetes 0.20.1 f9f8bb2f
kubernetes 0.21.0 HEAD
mysql 0.1.0 263e47be mysql 0.1.0 263e47be
mysql 0.2.0 c24a103f mysql 0.2.0 c24a103f
mysql 0.3.0 53f2365e mysql 0.3.0 53f2365e
@@ -99,7 +100,8 @@ postgres 0.8.0 4e68e65c
postgres 0.9.0 8267072d postgres 0.9.0 8267072d
postgres 0.10.0 721c12a7 postgres 0.10.0 721c12a7
postgres 0.10.1 93bdf411 postgres 0.10.1 93bdf411
postgres 0.11.0 HEAD postgres 0.11.0 f9f8bb2f
postgres 0.12.0 HEAD
rabbitmq 0.1.0 263e47be rabbitmq 0.1.0 263e47be
rabbitmq 0.2.0 53f2365e rabbitmq 0.2.0 53f2365e
rabbitmq 0.3.0 6c5cf5bf rabbitmq 0.3.0 6c5cf5bf

View File

@@ -17,7 +17,7 @@ spec:
selector: selector:
{{- include "virtual-machine.selectorLabels" . | nindent 4 }} {{- include "virtual-machine.selectorLabels" . | nindent 4 }}
ports: ports:
{{- if eq .Values.externalMethod "WholeIP" }} {{- if and (eq .Values.externalMethod "WholeIP") (not .Values.externalPorts) }}
- port: 65535 - port: 65535
{{- else }} {{- else }}
{{- range .Values.externalPorts }} {{- range .Values.externalPorts }}

View File

@@ -17,7 +17,7 @@ spec:
selector: selector:
{{- include "virtual-machine.selectorLabels" . | nindent 4 }} {{- include "virtual-machine.selectorLabels" . | nindent 4 }}
ports: ports:
{{- if eq .Values.externalMethod "WholeIP" }} {{- if and (eq .Values.externalMethod "WholeIP") (not .Values.externalPorts) }}
- port: 65535 - port: 65535
{{- else }} {{- else }}
{{- range .Values.externalPorts }} {{- range .Values.externalPorts }}

View File

@@ -3,4 +3,4 @@ name: monitoring
description: Monitoring and observability stack description: Monitoring and observability stack
icon: /logos/monitoring.svg icon: /logos/monitoring.svg
type: application type: application
version: 1.9.2 version: 1.10.0

View File

@@ -10,6 +10,9 @@ spec:
{{- $rawConstraints := get $configMap.data "globalAppTopologySpreadConstraints" }} {{- $rawConstraints := get $configMap.data "globalAppTopologySpreadConstraints" }}
{{- if $rawConstraints }} {{- if $rawConstraints }}
{{- $rawConstraints | fromYaml | toYaml | nindent 2 }} {{- $rawConstraints | fromYaml | toYaml | nindent 2 }}
labelSelector:
matchLabels:
cnpg.io/cluster: alerta-db
{{- end }} {{- end }}
{{- end }} {{- end }}
storage: storage:

View File

@@ -11,6 +11,9 @@ spec:
{{- $rawConstraints := get $configMap.data "globalAppTopologySpreadConstraints" }} {{- $rawConstraints := get $configMap.data "globalAppTopologySpreadConstraints" }}
{{- if $rawConstraints }} {{- if $rawConstraints }}
{{- $rawConstraints | fromYaml | toYaml | nindent 2 }} {{- $rawConstraints | fromYaml | toYaml | nindent 2 }}
labelSelector:
matchLabels:
cnpg.io/cluster: grafana-db
{{- end }} {{- end }}
{{- end }} {{- end }}
monitoring: monitoring:

View File

@@ -38,7 +38,8 @@ monitoring 1.8.0 8c460528
monitoring 1.8.1 8267072d monitoring 1.8.1 8267072d
monitoring 1.9.0 45a7416c monitoring 1.9.0 45a7416c
monitoring 1.9.1 fd240701 monitoring 1.9.1 fd240701
monitoring 1.9.2 HEAD monitoring 1.9.2 f9f8bb2f
monitoring 1.10.0 HEAD
seaweedfs 0.1.0 71514249 seaweedfs 0.1.0 71514249
seaweedfs 0.2.0 5fb9cfe3 seaweedfs 0.2.0 5fb9cfe3
seaweedfs 0.2.1 fde4bcfa seaweedfs 0.2.1 fde4bcfa

View File

@@ -11,6 +11,9 @@ spec:
{{- $rawConstraints := get $configMap.data "globalAppTopologySpreadConstraints" }} {{- $rawConstraints := get $configMap.data "globalAppTopologySpreadConstraints" }}
{{- if $rawConstraints }} {{- if $rawConstraints }}
{{- $rawConstraints | fromYaml | toYaml | nindent 2 }} {{- $rawConstraints | fromYaml | toYaml | nindent 2 }}
labelSelector:
matchLabels:
cnpg.io/cluster: keycloak-db
{{- end }} {{- end }}
{{- end }} {{- end }}
monitoring: monitoring: