mirror of
https://github.com/outbackdingo/cozystack.git
synced 2026-01-27 10:18:39 +00:00
[apps] [foundationdb] Initial support for FoundationDB operator (#1397)
<!-- Thank you for making a contribution! Here are some tips for you: - Start the PR title with the [label] of Cozystack component: - For system components: [platform], [system], [linstor], [cilium], [kube-ovn], [dashboard], [cluster-api], etc. - For managed apps: [apps], [tenant], [kubernetes], [postgres], [virtual-machine] etc. - For development and maintenance: [tests], [ci], [docs], [maintenance]. - If it's a work in progress, consider creating this PR as a draft. - Don't hesistate to ask for opinion and review in the community chats, even if it's still a draft. - Add the label `backport` if it's a bugfix that needs to be backported to a previous version. --> ## What this PR does This PR adds initial support to begin testing managed FoundationDB instances in Cozystack. Addresses #824 ### Release note <!-- Write a release note: - Explain what has changed internally and for users. - Start with the same [label] as in the PR title - Follow the guidelines at https://github.com/kubernetes/community/blob/master/contributors/guide/release-notes.md. --> ```release-note [apps] Add FoundationDB as a managed app for tenants [foundationdb] Add fdb-kubernetes-operator with v2.13.0 ``` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Added managed FoundationDB app and operator with Helm charts to deploy configurable clusters (storage, resources, backups, monitoring, workload monitor). - **Documentation** - Added comprehensive README, default values, and a JSON Schema for chart configuration and validation. - **Tests** - Added end-to-end test provisioning a FoundationDB cluster, validating rollout, health, monitoring artifacts, security context, storage claims, and cleanup. - **Chores** - Added packaging targets, operator charts and CRDs, API schema registration, versions map entry, and bundle release entries. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
121
hack/e2e-apps/foundationdb.bats
Normal file
121
hack/e2e-apps/foundationdb.bats
Normal file
@@ -0,0 +1,121 @@
|
||||
#!/usr/bin/env bats
|
||||
|
||||
@test "Create DB FoundationDB" {
|
||||
name='test'
|
||||
kubectl apply -f - <<EOF
|
||||
apiVersion: apps.cozystack.io/v1alpha1
|
||||
kind: FoundationDB
|
||||
metadata:
|
||||
name: $name
|
||||
namespace: tenant-test
|
||||
spec:
|
||||
cluster:
|
||||
version: "7.3.63"
|
||||
processCounts:
|
||||
storage: 3
|
||||
stateless: -1
|
||||
cluster_controller: 1
|
||||
redundancyMode: "double"
|
||||
storageEngine: "ssd-2"
|
||||
faultDomain:
|
||||
key: "foundationdb.org/none"
|
||||
valueFrom: "\$FDB_ZONE_ID"
|
||||
storage:
|
||||
size: "1Gi"
|
||||
storageClass: ""
|
||||
resourcesPreset: "small"
|
||||
backup:
|
||||
enabled: false
|
||||
s3:
|
||||
bucket: ""
|
||||
endpoint: ""
|
||||
region: ""
|
||||
credentials:
|
||||
accessKeyId: ""
|
||||
secretAccessKey: ""
|
||||
retentionPolicy: "7d"
|
||||
monitoring:
|
||||
enabled: true
|
||||
customParameters:
|
||||
- "knob_disable_posix_kernel_aio=1"
|
||||
imageType: "unified"
|
||||
automaticReplacements: true
|
||||
EOF
|
||||
sleep 15
|
||||
|
||||
# Wait for HelmRelease to be ready
|
||||
kubectl -n tenant-test wait hr foundationdb-$name --timeout=300s --for=condition=ready
|
||||
|
||||
# Wait for FoundationDBCluster to be created (name has foundationdb- prefix)
|
||||
timeout 300 sh -ec "until kubectl -n tenant-test get foundationdbclusters.apps.foundationdb.org foundationdb-$name; do sleep 15; done"
|
||||
|
||||
# Wait for cluster to become available (initial reconciliation takes time - allow 5 minutes)
|
||||
timeout 300 sh -ec "until kubectl -n tenant-test get foundationdbclusters.apps.foundationdb.org foundationdb-$name -o jsonpath='{.status.databaseConfiguration.usable_regions}' | grep -q '1'; do sleep 30; done"
|
||||
|
||||
# Check that storage processes are running
|
||||
timeout 300 sh -ec "until [ \$(kubectl -n tenant-test get pods -l foundationdb.org/fdb-cluster-name=foundationdb-$name,foundationdb.org/fdb-process-class=storage --field-selector=status.phase=Running --no-headers | wc -l) -eq 3 ]; do sleep 15; done"
|
||||
|
||||
# Check that log processes are running (these are the stateless processes)
|
||||
timeout 300 sh -ec "until [ \$(kubectl -n tenant-test get pods -l foundationdb.org/fdb-cluster-name=foundationdb-$name,foundationdb.org/fdb-process-class=log --field-selector=status.phase=Running --no-headers | wc -l) -ge 1 ]; do sleep 15; done"
|
||||
|
||||
# Check that cluster controller is running
|
||||
timeout 300 sh -ec "until [ \$(kubectl -n tenant-test get pods -l foundationdb.org/fdb-cluster-name=foundationdb-$name,foundationdb.org/fdb-process-class=cluster_controller --field-selector=status.phase=Running --no-headers | wc -l) -eq 1 ]; do sleep 15; done"
|
||||
|
||||
# Check WorkloadMonitor is created and configured
|
||||
timeout 120 sh -ec "until kubectl -n tenant-test get workloadmonitor foundationdb-$name; do sleep 10; done"
|
||||
timeout 60 sh -ec "until kubectl -n tenant-test get workloadmonitor foundationdb-$name -o jsonpath='{.spec.replicas}' | grep -q '3'; do sleep 5; done"
|
||||
|
||||
# Check dashboard resource map is created
|
||||
kubectl -n tenant-test get configmap foundationdb-$name-resourcemap
|
||||
|
||||
# Verify cluster is healthy (check cluster status) - allow extra time for initial setup
|
||||
timeout 300 sh -ec "until kubectl -n tenant-test get foundationdbclusters.apps.foundationdb.org foundationdb-$name -o jsonpath='{.status.health.available}' | grep -q 'true'; do sleep 20; done"
|
||||
|
||||
# Validate status.configured field
|
||||
timeout 60 sh -ec "until kubectl -n tenant-test get foundationdbclusters.apps.foundationdb.org foundationdb-$name -o jsonpath='{.status.configured}' | grep -q 'true'; do sleep 10; done"
|
||||
|
||||
# Validate status.connectionString field exists and contains expected format
|
||||
timeout 60 sh -ec "until kubectl -n tenant-test get foundationdbclusters.apps.foundationdb.org foundationdb-$name -o jsonpath='{.status.connectionString}' | grep -q '@.*\.svc\.cozy\.local'; do sleep 10; done"
|
||||
|
||||
# Validate comprehensive status.databaseConfiguration fields
|
||||
timeout 60 sh -ec "until kubectl -n tenant-test get foundationdbclusters.apps.foundationdb.org foundationdb-$name -o jsonpath='{.status.databaseConfiguration.logs}' | grep -q '3'; do sleep 10; done"
|
||||
timeout 60 sh -ec "until kubectl -n tenant-test get foundationdbclusters.apps.foundationdb.org foundationdb-$name -o jsonpath='{.status.databaseConfiguration.proxies}' | grep -q '3'; do sleep 10; done"
|
||||
timeout 60 sh -ec "until kubectl -n tenant-test get foundationdbclusters.apps.foundationdb.org foundationdb-$name -o jsonpath='{.status.databaseConfiguration.redundancy_mode}' | grep -q 'double'; do sleep 10; done"
|
||||
timeout 60 sh -ec "until kubectl -n tenant-test get foundationdbclusters.apps.foundationdb.org foundationdb-$name -o jsonpath='{.status.databaseConfiguration.resolvers}' | grep -q '1'; do sleep 10; done"
|
||||
timeout 60 sh -ec "until kubectl -n tenant-test get foundationdbclusters.apps.foundationdb.org foundationdb-$name -o jsonpath='{.status.databaseConfiguration.storage_engine}' | grep -q 'ssd-2'; do sleep 10; done"
|
||||
timeout 60 sh -ec "until kubectl -n tenant-test get foundationdbclusters.apps.foundationdb.org foundationdb-$name -o jsonpath='{.status.databaseConfiguration.usable_regions}' | grep -q '1'; do sleep 10; done"
|
||||
|
||||
# Validate status.desiredProcessGroups field
|
||||
timeout 60 sh -ec "until kubectl -n tenant-test get foundationdbclusters.apps.foundationdb.org foundationdb-$name -o jsonpath='{.status.desiredProcessGroups}' | grep -q '^[0-9][0-9]*$'; do sleep 10; done"
|
||||
|
||||
# Validate status.generations.reconciled field
|
||||
timeout 60 sh -ec "until kubectl -n tenant-test get foundationdbclusters.apps.foundationdb.org foundationdb-$name -o jsonpath='{.status.generations.reconciled}' | grep -q '^[0-9][0-9]*$'; do sleep 10; done"
|
||||
|
||||
# Validate status.hasListenIPsForAllPods field
|
||||
timeout 60 sh -ec "until kubectl -n tenant-test get foundationdbclusters.apps.foundationdb.org foundationdb-$name -o jsonpath='{.status.hasListenIPsForAllPods}' | grep -q 'true'; do sleep 10; done"
|
||||
|
||||
# Validate comprehensive status.health fields
|
||||
timeout 60 sh -ec "until kubectl -n tenant-test get foundationdbclusters.apps.foundationdb.org foundationdb-$name -o jsonpath='{.status.health.fullReplication}' | grep -q 'true'; do sleep 10; done"
|
||||
timeout 60 sh -ec "until kubectl -n tenant-test get foundationdbclusters.apps.foundationdb.org foundationdb-$name -o jsonpath='{.status.health.healthy}' | grep -q 'true'; do sleep 10; done"
|
||||
|
||||
# Verify security context is applied correctly (non-root user)
|
||||
storage_pod=$(kubectl -n tenant-test get pods -l foundationdb.org/fdb-cluster-name=foundationdb-$name,foundationdb.org/fdb-process-class=storage --no-headers | head -n1 | awk '{print $1}')
|
||||
kubectl -n tenant-test get pod "$storage_pod" -o jsonpath='{.spec.containers[0].securityContext.runAsUser}' | grep -q '4059'
|
||||
kubectl -n tenant-test get pod "$storage_pod" -o jsonpath='{.spec.containers[0].securityContext.runAsGroup}' | grep -q '4059'
|
||||
|
||||
# Verify volumeClaimTemplate is properly configured in FoundationDBCluster CRD
|
||||
timeout 60 sh -ec "until kubectl -n tenant-test get foundationdbclusters.apps.foundationdb.org foundationdb-$name -o jsonpath='{.spec.processes.general.volumeClaimTemplate.spec.resources.requests.storage}' | grep -q '1Gi'; do sleep 10; done"
|
||||
|
||||
# Verify PVCs are created with correct storage size (1Gi as specified in test)
|
||||
timeout 120 sh -ec "until [ \$(kubectl -n tenant-test get pvc -l foundationdb.org/fdb-cluster-name=foundationdb-$name --no-headers | wc -l) -ge 3 ]; do sleep 10; done"
|
||||
kubectl -n tenant-test get pvc -l foundationdb.org/fdb-cluster-name=foundationdb-$name -o jsonpath='{.items[*].spec.resources.requests.storage}' | grep -q '1Gi'
|
||||
|
||||
# Verify actual PVC storage capacity matches requested size
|
||||
kubectl -n tenant-test get pvc -l foundationdb.org/fdb-cluster-name=foundationdb-$name -o jsonpath='{.items[*].status.capacity.storage}' | grep -q '1Gi'
|
||||
|
||||
# Clean up
|
||||
kubectl -n tenant-test delete foundationdb $name
|
||||
|
||||
# Wait for cleanup to complete
|
||||
timeout 120 sh -ec "while kubectl -n tenant-test get foundationdbclusters.apps.foundationdb.org foundationdb-$name 2>/dev/null; do sleep 10; done"
|
||||
}
|
||||
1
packages/apps/foundationdb/.helmignore
Normal file
1
packages/apps/foundationdb/.helmignore
Normal file
@@ -0,0 +1 @@
|
||||
Makefile
|
||||
25
packages/apps/foundationdb/Chart.yaml
Normal file
25
packages/apps/foundationdb/Chart.yaml
Normal file
@@ -0,0 +1,25 @@
|
||||
apiVersion: v2
|
||||
name: foundationdb
|
||||
description: Managed FoundationDB service
|
||||
icon: /logos/foundationdb.svg
|
||||
|
||||
# A chart can be either an 'application' or a 'library' chart.
|
||||
#
|
||||
# Application charts are a collection of templates that can be packaged into versioned archives
|
||||
# to be deployed.
|
||||
#
|
||||
# Library charts provide useful utilities or functions for the chart developer. They're included as
|
||||
# a dependency of application charts to inject those utilities and functions into the rendering
|
||||
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
|
||||
type: application
|
||||
|
||||
# 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.
|
||||
# Versions are expected to follow Semantic Versioning (https://semver.org/)
|
||||
version: 0.1.0
|
||||
|
||||
# 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
|
||||
# follow Semantic Versioning. They should reflect the version the application is using.
|
||||
# It is recommended to use it with quotes.
|
||||
appVersion: "7.3.63"
|
||||
4
packages/apps/foundationdb/Makefile
Normal file
4
packages/apps/foundationdb/Makefile
Normal file
@@ -0,0 +1,4 @@
|
||||
include ../../../scripts/package.mk
|
||||
|
||||
generate:
|
||||
cozyvalues-gen -v values.yaml -s values.schema.json -r README.md
|
||||
195
packages/apps/foundationdb/README.md
Normal file
195
packages/apps/foundationdb/README.md
Normal file
@@ -0,0 +1,195 @@
|
||||
# FoundationDB
|
||||
|
||||
A managed FoundationDB service for Cozystack.
|
||||
|
||||
## Overview
|
||||
|
||||
FoundationDB is a distributed database designed to handle large volumes of structured data across clusters of commodity servers. It organizes data as an ordered key-value store and employs ACID transactions for all operations.
|
||||
|
||||
This package provides a managed FoundationDB cluster deployment using the FoundationDB Kubernetes Operator.
|
||||
|
||||
## Features
|
||||
|
||||
- **High Availability**: Multi-instance deployment with automatic failover
|
||||
- **ACID Transactions**: Full ACID transaction support across the cluster
|
||||
- **Scalable**: Easily scale storage and compute resources
|
||||
- **Backup Integration**: Optional S3-compatible backup storage
|
||||
- **Monitoring**: Built-in monitoring and alerting through WorkloadMonitor
|
||||
- **Flexible Configuration**: Support for custom FoundationDB parameters
|
||||
|
||||
## Configuration
|
||||
|
||||
### Basic Configuration
|
||||
|
||||
```yaml
|
||||
# Cluster process configuration
|
||||
cluster:
|
||||
version: "7.3.63"
|
||||
processCounts:
|
||||
storage: 3 # Number of storage processes (determines cluster size)
|
||||
stateless: -1 # Automatically calculated
|
||||
cluster_controller: 1
|
||||
faultDomain:
|
||||
key: "kubernetes.io/hostname"
|
||||
valueFrom: "spec.nodeName"
|
||||
```
|
||||
|
||||
### Storage
|
||||
|
||||
```yaml
|
||||
storage:
|
||||
size: "16Gi" # Storage size per instance
|
||||
storageClass: "" # Storage class (optional)
|
||||
```
|
||||
|
||||
### Resources
|
||||
|
||||
```yaml
|
||||
# Use preset sizing
|
||||
resourcesPreset: "medium" # small, medium, large, xlarge, 2xlarge
|
||||
|
||||
# Or custom resource configuration
|
||||
resources:
|
||||
cpu: "2000m"
|
||||
memory: "4Gi"
|
||||
```
|
||||
|
||||
### Backup (Optional)
|
||||
|
||||
```yaml
|
||||
backup:
|
||||
enabled: true
|
||||
s3:
|
||||
bucket: "my-fdb-backups"
|
||||
endpoint: "https://s3.amazonaws.com"
|
||||
region: "us-east-1"
|
||||
credentials:
|
||||
accessKeyId: "AKIA..."
|
||||
secretAccessKey: "..."
|
||||
retentionPolicy: "7d"
|
||||
```
|
||||
|
||||
### Advanced Configuration
|
||||
|
||||
```yaml
|
||||
# Custom FoundationDB parameters
|
||||
customParameters:
|
||||
- "knob_disable_posix_kernel_aio=1"
|
||||
|
||||
# Image type (unified is default and recommended for new deployments)
|
||||
imageType: "unified"
|
||||
|
||||
# Enable automatic pod replacements
|
||||
automaticReplacements: true
|
||||
|
||||
# Security context configuration
|
||||
securityContext:
|
||||
runAsUser: 4059
|
||||
runAsGroup: 4059
|
||||
```
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- FoundationDB Operator must be installed in the cluster
|
||||
- Sufficient storage and compute resources
|
||||
- For backups: S3-compatible storage credentials
|
||||
|
||||
## Deployment
|
||||
|
||||
1. Install the FoundationDB operator (system package)
|
||||
2. Deploy this application package with your desired configuration
|
||||
3. The cluster will be automatically provisioned and configured
|
||||
|
||||
## Monitoring
|
||||
|
||||
This package includes WorkloadMonitor integration for cluster health monitoring and resource tracking. Monitoring can be disabled by setting:
|
||||
|
||||
```yaml
|
||||
monitoring:
|
||||
enabled: false
|
||||
```
|
||||
|
||||
## Security
|
||||
|
||||
- All containers run with restricted security contexts
|
||||
- No privilege escalation allowed
|
||||
- Read-only root filesystem where possible
|
||||
- Custom security context configurations supported
|
||||
|
||||
## Fault Tolerance
|
||||
|
||||
FoundationDB is designed for high availability:
|
||||
- Automatic failure detection and recovery
|
||||
- Data replication across instances
|
||||
- Configurable fault domains for rack/zone awareness
|
||||
- Transaction log redundancy
|
||||
|
||||
The included `WorkloadMonitor` is automatically configured based on the `cluster.redundancyMode` value. It sets the `minReplicas` property on the `WorkloadMonitor` resource to ensure the cluster's health status accurately reflects its fault tolerance level. The number of tolerated failures is as follows:
|
||||
- `single`: 0 failures
|
||||
- `double`: 1 failure
|
||||
- `triple` and datacenter-aware modes: 2 failures
|
||||
|
||||
For example, with the default configuration (`redundancyMode: double` and 3 storage pods), `minReplicas` will be set to 2.
|
||||
|
||||
## Performance Considerations
|
||||
|
||||
- Use SSD storage for better performance
|
||||
- Consider dedicating nodes for storage processes
|
||||
- Monitor cluster metrics for optimization opportunities
|
||||
- Scale storage and stateless processes based on workload
|
||||
|
||||
## Support
|
||||
|
||||
For issues related to FoundationDB itself, refer to the [FoundationDB documentation](https://apple.github.io/foundationdb/).
|
||||
|
||||
For Cozystack-specific issues, consult the Cozystack documentation or support channels.
|
||||
|
||||
## Parameters
|
||||
|
||||
### Common parameters
|
||||
|
||||
| Name | Description | Type | Value |
|
||||
| ------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | ----------- | ------------------------ |
|
||||
| `cluster` | Cluster configuration | `object` | `{}` |
|
||||
| `cluster.processCounts` | Process counts for different roles | `object` | `{}` |
|
||||
| `cluster.processCounts.stateless` | Number of stateless processes (-1 for automatic) | `int` | `-1` |
|
||||
| `cluster.processCounts.storage` | Number of storage processes (determines cluster size) | `int` | `3` |
|
||||
| `cluster.processCounts.cluster_controller` | Number of cluster controller processes | `int` | `1` |
|
||||
| `cluster.version` | Version of FoundationDB to use | `string` | `7.3.63` |
|
||||
| `cluster.redundancyMode` | Database redundancy mode (single, double, triple, three_datacenter, three_datacenter_fallback) | `string` | `double` |
|
||||
| `cluster.storageEngine` | Storage engine (ssd-2, ssd-redwood-v1, ssd-rocksdb-v1, memory) | `string` | `ssd-2` |
|
||||
| `cluster.faultDomain` | Fault domain configuration | `object` | `{}` |
|
||||
| `cluster.faultDomain.key` | Fault domain key | `string` | `kubernetes.io/hostname` |
|
||||
| `cluster.faultDomain.valueFrom` | Fault domain value source | `string` | `spec.nodeName` |
|
||||
| `storage` | Storage configuration | `object` | `{}` |
|
||||
| `storage.size` | Size of persistent volumes for each instance | `quantity` | `16Gi` |
|
||||
| `storage.storageClass` | Storage class (if not set, uses cluster default) | `string` | `""` |
|
||||
| `resources` | Explicit CPU and memory configuration for each FoundationDB instance. When left empty, the preset defined in `resourcesPreset` is applied. | `*object` | `{}` |
|
||||
| `resources.cpu` | CPU available to each instance | `*quantity` | `null` |
|
||||
| `resources.memory` | Memory (RAM) available to each instance | `*quantity` | `null` |
|
||||
| `resourcesPreset` | Default sizing preset used when `resources` is omitted. Allowed values: `small`, `medium`, `large`, `xlarge`, `2xlarge`. | `string` | `medium` |
|
||||
| `backup` | Backup configuration | `object` | `{}` |
|
||||
| `backup.enabled` | Enable backups | `bool` | `false` |
|
||||
| `backup.s3` | S3 configuration for backups | `object` | `{}` |
|
||||
| `backup.s3.bucket` | S3 bucket name | `string` | `""` |
|
||||
| `backup.s3.endpoint` | S3 endpoint URL | `string` | `""` |
|
||||
| `backup.s3.region` | S3 region | `string` | `us-east-1` |
|
||||
| `backup.s3.credentials` | S3 credentials | `object` | `{}` |
|
||||
| `backup.s3.credentials.accessKeyId` | S3 access key ID | `string` | `""` |
|
||||
| `backup.s3.credentials.secretAccessKey` | S3 secret access key | `string` | `""` |
|
||||
| `backup.retentionPolicy` | Retention policy for backups | `string` | `7d` |
|
||||
| `monitoring` | Monitoring configuration | `object` | `{}` |
|
||||
| `monitoring.enabled` | Enable WorkloadMonitor integration | `bool` | `true` |
|
||||
|
||||
|
||||
### FoundationDB configuration
|
||||
|
||||
| Name | Description | Type | Value |
|
||||
| ---------------------------- | ----------------------------------------- | ---------- | --------- |
|
||||
| `customParameters` | Custom parameters to pass to FoundationDB | `[]string` | `[]` |
|
||||
| `imageType` | Container image deployment type | `string` | `unified` |
|
||||
| `securityContext` | Security context for containers | `object` | `{}` |
|
||||
| `securityContext.runAsUser` | User ID to run the container | `int` | `4059` |
|
||||
| `securityContext.runAsGroup` | Group ID to run the container | `int` | `4059` |
|
||||
| `automaticReplacements` | Enable automatic pod replacements | `bool` | `true` |
|
||||
|
||||
1
packages/apps/foundationdb/charts/cozy-lib
Symbolic link
1
packages/apps/foundationdb/charts/cozy-lib
Symbolic link
@@ -0,0 +1 @@
|
||||
../../../library/cozy-lib
|
||||
106
packages/apps/foundationdb/logos/foundationdb.svg
Normal file
106
packages/apps/foundationdb/logos/foundationdb.svg
Normal file
@@ -0,0 +1,106 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
width="144"
|
||||
height="144"
|
||||
viewBox="0 0 144 144"
|
||||
fill="none"
|
||||
version="1.1"
|
||||
id="svg4"
|
||||
sodipodi:docname="foundationdb.svg"
|
||||
inkscape:version="1.4.2 (unknown)"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg">
|
||||
<sodipodi:namedview
|
||||
id="namedview4"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#000000"
|
||||
borderopacity="0.25"
|
||||
inkscape:showpageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pagecheckerboard="0"
|
||||
inkscape:deskcolor="#d1d1d1"
|
||||
inkscape:zoom="6.0902778"
|
||||
inkscape:cx="72"
|
||||
inkscape:cy="72.492588"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1128"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="svg4" />
|
||||
<rect
|
||||
width="144"
|
||||
height="144"
|
||||
rx="24"
|
||||
fill="url(#paint0_linear_fdb)"
|
||||
id="rect1"
|
||||
style="fill:#ffffff" />
|
||||
<!-- FoundationDB Icon (scaled and positioned) -->
|
||||
<!-- FoundationDB Text -->
|
||||
<defs
|
||||
id="defs4">
|
||||
<linearGradient
|
||||
id="paint0_linear_fdb"
|
||||
x1="140"
|
||||
y1="130.5"
|
||||
x2="4"
|
||||
y2="9.49999"
|
||||
gradientUnits="userSpaceOnUse">
|
||||
<stop
|
||||
stop-color="#047BFE"
|
||||
id="stop3" />
|
||||
<stop
|
||||
offset="1"
|
||||
stop-color="#3F9AFB"
|
||||
id="stop4" />
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<g
|
||||
id="g1134"
|
||||
transform="matrix(3.132791,0,0,3.132791,-115.98385,6.9294227)">
|
||||
<g
|
||||
transform="matrix(0.08541251,0,0,0.08541251,8.7615159,9.5962543)"
|
||||
id="g10">
|
||||
<polygon
|
||||
style="fill:#3f9afb"
|
||||
class="st0"
|
||||
points="457.2,150.5 457.2,98.6 561.4,124 561.6,164.8 666.6,150.9 666.3,98.7 845.8,143 846.4,189.9 667.4,165.8 560.6,177.3 457.1,165.4 354.2,177.6 354.1,165.7 "
|
||||
id="polygon4" />
|
||||
|
||||
<path
|
||||
style="fill:#0b70e0"
|
||||
inkscape:connector-curvature="0"
|
||||
class="st1"
|
||||
d="m 666.6,183.2 179.6,18.6 v 46 H 353.8 l -0.5,-12.2 h 103.5 c 0,0 0,-34.2 0,-52.3 34.8,3.4 103.8,10.2 103.8,10.2 v 40.9 h 106 z"
|
||||
id="path6" />
|
||||
|
||||
<path
|
||||
style="fill:#9eccfd"
|
||||
inkscape:connector-curvature="0"
|
||||
class="st2"
|
||||
d="m 561.4,109.1 -0.3,-12.6 c 0,0 68.1,-20.4 103.3,-30.8 0,-16.9 0,-33.2 0,-52.9 61.8,24.8 121.2,48.8 181.2,72.9 0,15 0,29.4 0,45.4 -61.5,-16.9 -121.7,-33.5 -180.2,-49.6 -35.6,9.5 -104,27.6 -104,27.6 z"
|
||||
id="path8" />
|
||||
|
||||
</g>
|
||||
<polygon
|
||||
transform="matrix(0.08541251,0,0,0.08541251,8.7795597,9.6869671)"
|
||||
style="fill:#3f9afb"
|
||||
class="st0"
|
||||
points="666.6,150.9 666.3,98.7 845.8,143 846.4,189.9 667.4,165.8 560.6,177.3 457.1,165.4 354.2,177.6 354.1,165.7 457.2,150.5 457.2,98.6 561.4,124 561.6,164.8 "
|
||||
id="polygon856" />
|
||||
<path
|
||||
style="fill:#0b70e0;stroke-width:0.0854125"
|
||||
inkscape:connector-curvature="0"
|
||||
class="st1"
|
||||
d="m 65.715539,25.334539 15.340087,1.588673 v 3.928975 h -42.05712 l -0.04271,-1.042033 h 8.840195 c 0,0 0,-2.921107 0,-4.467074 2.972356,0.290403 8.865819,0.871208 8.865819,0.871208 v 3.493371 h 9.053726 z"
|
||||
id="path858" />
|
||||
<path
|
||||
style="fill:#9eccfd;stroke-width:0.0854125"
|
||||
inkscape:connector-curvature="0"
|
||||
class="st2"
|
||||
d="m 56.730143,19.005472 -0.02562,-1.076198 c 0,0 5.816592,-1.742415 8.823112,-2.630705 0,-1.443471 0,-2.835695 0,-4.518322 5.278493,2.11823 10.351997,4.168131 15.476747,6.226572 0,1.281188 0,2.511128 0,3.877728 -5.252869,-1.443471 -10.394702,-2.861319 -15.391334,-4.23646 -3.040686,0.811419 -8.882901,2.357385 -8.882901,2.357385 z"
|
||||
id="path860" />
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 3.6 KiB |
47
packages/apps/foundationdb/templates/_resources.tpl
Normal file
47
packages/apps/foundationdb/templates/_resources.tpl
Normal file
@@ -0,0 +1,47 @@
|
||||
{{/*
|
||||
Common resource definitions
|
||||
*/}}
|
||||
{{- define "foundationdb.resources" -}}
|
||||
{{- include "cozy-lib.resources.defaultingSanitize" (list .Values.resources.preset .Values.resources $) }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Common labels
|
||||
*/}}
|
||||
{{- define "foundationdb.labels" -}}
|
||||
helm.sh/chart: {{ include "foundationdb.chart" . }}
|
||||
{{ include "foundationdb.selectorLabels" . }}
|
||||
{{- if .Chart.AppVersion }}
|
||||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
||||
{{- end }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Selector labels
|
||||
*/}}
|
||||
{{- define "foundationdb.selectorLabels" -}}
|
||||
app.kubernetes.io/name: foundationdb
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Chart name and version
|
||||
*/}}
|
||||
{{- define "foundationdb.chart" -}}
|
||||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Calculate minReplicas for WorkloadMonitor based on redundancyMode
|
||||
*/}}
|
||||
{{- define "foundationdb.minReplicas" -}}
|
||||
{{- $replicas := .Values.cluster.processCounts.storage -}}
|
||||
{{- if or (eq .Values.cluster.redundancyMode "triple") (eq .Values.cluster.redundancyMode "three_data_hall") (eq .Values.cluster.redundancyMode "three_datacenter") (eq .Values.cluster.redundancyMode "three_datacenter_fallback") (eq .Values.cluster.redundancyMode "three_data_hall_fallback") }}
|
||||
{{- print (max 1 (sub $replicas 2)) -}}
|
||||
{{- else if eq .Values.cluster.redundancyMode "double" }}
|
||||
{{- print (max 1 (sub $replicas 1)) -}}
|
||||
{{- else }}
|
||||
{{- print $replicas -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
65
packages/apps/foundationdb/templates/backup.yaml
Normal file
65
packages/apps/foundationdb/templates/backup.yaml
Normal file
@@ -0,0 +1,65 @@
|
||||
{{- if .Values.backup.enabled }}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: {{ .Release.Name }}-s3-creds
|
||||
labels:
|
||||
app.kubernetes.io/name: foundationdb
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
type: Opaque
|
||||
data:
|
||||
AWS_ACCESS_KEY_ID: {{ .Values.backup.s3.credentials.accessKeyId | b64enc }}
|
||||
AWS_SECRET_ACCESS_KEY: {{ .Values.backup.s3.credentials.secretAccessKey | b64enc }}
|
||||
|
||||
---
|
||||
apiVersion: apps.foundationdb.org/v1beta2
|
||||
kind: FoundationDBBackup
|
||||
metadata:
|
||||
name: {{ .Release.Name }}-backup
|
||||
labels:
|
||||
app.kubernetes.io/name: foundationdb
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
spec:
|
||||
clusterName: {{ .Release.Name }}
|
||||
|
||||
backupState: Running
|
||||
|
||||
backupDeploymentSpec:
|
||||
podTemplateSpec:
|
||||
spec:
|
||||
containers:
|
||||
- name: foundationdb
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 128Mi
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 128Mi
|
||||
securityContext:
|
||||
runAsUser: 0
|
||||
|
||||
customParameters:
|
||||
- backup_agent_snapshot_mode=0
|
||||
|
||||
snapshotPeriodSeconds: 3600
|
||||
|
||||
blobStoreConfiguration:
|
||||
accountName: {{ .Values.backup.s3.bucket }}
|
||||
bucket: {{ .Values.backup.s3.bucket }}
|
||||
{{- if .Values.backup.s3.endpoint }}
|
||||
endpoint: {{ .Values.backup.s3.endpoint }}
|
||||
{{- end }}
|
||||
credentials:
|
||||
AWS_ACCESS_KEY_ID:
|
||||
secretKeyRef:
|
||||
name: {{ .Release.Name }}-s3-creds
|
||||
key: AWS_ACCESS_KEY_ID
|
||||
AWS_SECRET_ACCESS_KEY:
|
||||
secretKeyRef:
|
||||
name: {{ .Release.Name }}-s3-creds
|
||||
key: AWS_SECRET_ACCESS_KEY
|
||||
{{- end }}
|
||||
98
packages/apps/foundationdb/templates/cluster.yaml
Normal file
98
packages/apps/foundationdb/templates/cluster.yaml
Normal file
@@ -0,0 +1,98 @@
|
||||
{{- $cozyConfig := lookup "v1" "ConfigMap" "cozy-system" "cozystack" | default (dict "data" (dict)) }}
|
||||
{{- $clusterDomain := index $cozyConfig.data "cluster-domain" | default "cozy.local" }}
|
||||
---
|
||||
apiVersion: apps.foundationdb.org/v1beta2
|
||||
kind: FoundationDBCluster
|
||||
metadata:
|
||||
name: {{ .Release.Name }}
|
||||
labels:
|
||||
app.kubernetes.io/name: foundationdb
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
spec:
|
||||
version: {{ .Values.cluster.version | quote }}
|
||||
|
||||
databaseConfiguration:
|
||||
redundancy_mode: {{ .Values.cluster.redundancyMode }}
|
||||
storage_engine: {{ .Values.cluster.storageEngine }}
|
||||
|
||||
processCounts:
|
||||
{{- toYaml .Values.cluster.processCounts | nindent 4 }}
|
||||
|
||||
automationOptions:
|
||||
replacements:
|
||||
enabled: {{ .Values.automaticReplacements }}
|
||||
faultDomain:
|
||||
key: {{ .Values.cluster.faultDomain.key }}
|
||||
{{- if .Values.cluster.faultDomain.valueFrom }}
|
||||
valueFrom: {{ .Values.cluster.faultDomain.valueFrom }}
|
||||
{{- end }}
|
||||
imageType: {{ .Values.imageType }}
|
||||
labels:
|
||||
filterOnOwnerReference: false
|
||||
matchLabels:
|
||||
foundationdb.org/fdb-cluster-name: {{ .Release.Name }}
|
||||
processClassLabels:
|
||||
- foundationdb.org/fdb-process-class
|
||||
processGroupIDLabels:
|
||||
- foundationdb.org/fdb-process-group-id
|
||||
minimumUptimeSecondsForBounce: 60
|
||||
|
||||
processes:
|
||||
general:
|
||||
{{- if .Values.customParameters }}
|
||||
customParameters:
|
||||
{{- range .Values.customParameters }}
|
||||
- {{ . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
podTemplate:
|
||||
metadata:
|
||||
labels:
|
||||
policy.cozystack.io/allow-to-apiserver: "true"
|
||||
spec:
|
||||
serviceAccountName: {{ .Release.Name }}-foundationdb
|
||||
securityContext:
|
||||
fsGroup: {{ .Values.securityContext.runAsGroup }}
|
||||
containers:
|
||||
- name: foundationdb
|
||||
resources: {{- include "cozy-lib.resources.defaultingSanitize" (list .Values.resourcesPreset .Values.resources $) | nindent 16 }}
|
||||
securityContext:
|
||||
{{- toYaml .Values.securityContext | nindent 16 }}
|
||||
- name: foundationdb-kubernetes-sidecar
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 128Mi
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 128Mi
|
||||
securityContext:
|
||||
{{- toYaml .Values.securityContext | nindent 16 }}
|
||||
initContainers:
|
||||
- name: foundationdb-kubernetes-init
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 128Mi
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 128Mi
|
||||
securityContext:
|
||||
{{- toYaml .Values.securityContext | nindent 16 }}
|
||||
volumeClaimTemplate:
|
||||
spec:
|
||||
{{- if .Values.storage.storageClass }}
|
||||
storageClassName: {{ .Values.storage.storageClass }}
|
||||
{{- end }}
|
||||
resources:
|
||||
requests:
|
||||
storage: {{ .Values.storage.size }}
|
||||
|
||||
routing:
|
||||
dnsDomain: {{ $clusterDomain }}
|
||||
defineDNSLocalityFields: true
|
||||
|
||||
sidecarContainer:
|
||||
enableLivenessProbe: true
|
||||
enableReadinessProbe: true
|
||||
@@ -0,0 +1,22 @@
|
||||
{{- if .Values.monitoring.enabled }}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ .Release.Name }}-resourcemap
|
||||
labels:
|
||||
app.kubernetes.io/name: foundationdb
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
app.cozystack.io/type: dashboard-resourcemap
|
||||
data:
|
||||
resources: |
|
||||
- apiVersion: apps.foundationdb.org/v1beta2
|
||||
kind: FoundationDBCluster
|
||||
name: {{ .Release.Name }}
|
||||
{{- if .Values.backup.enabled }}
|
||||
- apiVersion: apps.foundationdb.org/v1beta2
|
||||
kind: FoundationDBBackup
|
||||
name: {{ .Release.Name }}-backup
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
22
packages/apps/foundationdb/templates/role.yaml
Normal file
22
packages/apps/foundationdb/templates/role.yaml
Normal file
@@ -0,0 +1,22 @@
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: Role
|
||||
metadata:
|
||||
name: {{ .Release.Name }}-foundationdb
|
||||
labels:
|
||||
app.kubernetes.io/name: foundationdb
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- pods
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- create
|
||||
- update
|
||||
- patch
|
||||
- delete
|
||||
17
packages/apps/foundationdb/templates/rolebinding.yaml
Normal file
17
packages/apps/foundationdb/templates/rolebinding.yaml
Normal file
@@ -0,0 +1,17 @@
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
name: {{ .Release.Name }}-foundationdb
|
||||
labels:
|
||||
app.kubernetes.io/name: foundationdb
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: Role
|
||||
name: {{ .Release.Name }}-foundationdb
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ .Release.Name }}-foundationdb
|
||||
namespace: {{ .Release.Namespace }}
|
||||
9
packages/apps/foundationdb/templates/serviceaccount.yaml
Normal file
9
packages/apps/foundationdb/templates/serviceaccount.yaml
Normal file
@@ -0,0 +1,9 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: {{ .Release.Name }}-foundationdb
|
||||
labels:
|
||||
app.kubernetes.io/name: foundationdb
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
20
packages/apps/foundationdb/templates/workloadmonitor.yaml
Normal file
20
packages/apps/foundationdb/templates/workloadmonitor.yaml
Normal file
@@ -0,0 +1,20 @@
|
||||
{{- if .Values.monitoring.enabled }}
|
||||
---
|
||||
apiVersion: cozystack.io/v1alpha1
|
||||
kind: WorkloadMonitor
|
||||
metadata:
|
||||
name: {{ .Release.Name }}
|
||||
labels:
|
||||
app.kubernetes.io/name: foundationdb
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
spec:
|
||||
replicas: {{ .Values.cluster.processCounts.storage }}
|
||||
minReplicas: {{ include "foundationdb.minReplicas" . }}
|
||||
kind: foundationdb
|
||||
type: foundationdb
|
||||
selector:
|
||||
foundationdb.org/fdb-cluster-name: {{ .Release.Name }}
|
||||
foundationdb.org/fdb-process-class: storage
|
||||
version: {{ .Chart.Version }}
|
||||
{{- end }}
|
||||
333
packages/apps/foundationdb/values.schema.json
Normal file
333
packages/apps/foundationdb/values.schema.json
Normal file
@@ -0,0 +1,333 @@
|
||||
{
|
||||
"title": "Chart Values",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"automaticReplacements": {
|
||||
"description": "Enable automatic pod replacements",
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"backup": {
|
||||
"description": "Backup configuration",
|
||||
"type": "object",
|
||||
"default": {
|
||||
"enabled": false,
|
||||
"retentionPolicy": "7d",
|
||||
"s3": {
|
||||
"bucket": "",
|
||||
"credentials": {
|
||||
"accessKeyId": "",
|
||||
"secretAccessKey": ""
|
||||
},
|
||||
"endpoint": "",
|
||||
"region": "us-east-1"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"enabled",
|
||||
"retentionPolicy",
|
||||
"s3"
|
||||
],
|
||||
"properties": {
|
||||
"enabled": {
|
||||
"description": "Enable backups",
|
||||
"type": "boolean",
|
||||
"default": false
|
||||
},
|
||||
"retentionPolicy": {
|
||||
"description": "Retention policy for backups",
|
||||
"type": "string",
|
||||
"default": "7d"
|
||||
},
|
||||
"s3": {
|
||||
"description": "S3 configuration for backups",
|
||||
"type": "object",
|
||||
"default": {
|
||||
"bucket": "",
|
||||
"credentials": {
|
||||
"accessKeyId": "",
|
||||
"secretAccessKey": ""
|
||||
},
|
||||
"endpoint": "",
|
||||
"region": "us-east-1"
|
||||
},
|
||||
"required": [
|
||||
"bucket",
|
||||
"credentials",
|
||||
"endpoint",
|
||||
"region"
|
||||
],
|
||||
"properties": {
|
||||
"bucket": {
|
||||
"description": "S3 bucket name",
|
||||
"type": "string"
|
||||
},
|
||||
"credentials": {
|
||||
"description": "S3 credentials",
|
||||
"type": "object",
|
||||
"default": {
|
||||
"accessKeyId": "",
|
||||
"secretAccessKey": ""
|
||||
},
|
||||
"required": [
|
||||
"accessKeyId",
|
||||
"secretAccessKey"
|
||||
],
|
||||
"properties": {
|
||||
"accessKeyId": {
|
||||
"description": "S3 access key ID",
|
||||
"type": "string"
|
||||
},
|
||||
"secretAccessKey": {
|
||||
"description": "S3 secret access key",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"endpoint": {
|
||||
"description": "S3 endpoint URL",
|
||||
"type": "string"
|
||||
},
|
||||
"region": {
|
||||
"description": "S3 region",
|
||||
"type": "string",
|
||||
"default": "us-east-1"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"cluster": {
|
||||
"description": "Cluster configuration",
|
||||
"type": "object",
|
||||
"default": {
|
||||
"faultDomain": {
|
||||
"key": "kubernetes.io/hostname",
|
||||
"valueFrom": "spec.nodeName"
|
||||
},
|
||||
"processCounts": {
|
||||
"cluster_controller": 1,
|
||||
"stateless": -1,
|
||||
"storage": 3
|
||||
},
|
||||
"redundancyMode": "double",
|
||||
"storageEngine": "ssd-2",
|
||||
"version": "7.3.63"
|
||||
},
|
||||
"required": [
|
||||
"faultDomain",
|
||||
"processCounts",
|
||||
"redundancyMode",
|
||||
"storageEngine",
|
||||
"version"
|
||||
],
|
||||
"properties": {
|
||||
"faultDomain": {
|
||||
"description": "Fault domain configuration",
|
||||
"type": "object",
|
||||
"default": {
|
||||
"key": "kubernetes.io/hostname",
|
||||
"valueFrom": "spec.nodeName"
|
||||
},
|
||||
"required": [
|
||||
"key",
|
||||
"valueFrom"
|
||||
],
|
||||
"properties": {
|
||||
"key": {
|
||||
"description": "Fault domain key",
|
||||
"type": "string",
|
||||
"default": "kubernetes.io/hostname"
|
||||
},
|
||||
"valueFrom": {
|
||||
"description": "Fault domain value source",
|
||||
"type": "string",
|
||||
"default": "spec.nodeName"
|
||||
}
|
||||
}
|
||||
},
|
||||
"processCounts": {
|
||||
"description": "Process counts for different roles",
|
||||
"type": "object",
|
||||
"default": {
|
||||
"cluster_controller": 1,
|
||||
"stateless": -1,
|
||||
"storage": 3
|
||||
},
|
||||
"required": [
|
||||
"cluster_controller",
|
||||
"stateless",
|
||||
"storage"
|
||||
],
|
||||
"properties": {
|
||||
"cluster_controller": {
|
||||
"description": "Number of cluster controller processes",
|
||||
"type": "integer",
|
||||
"default": 1
|
||||
},
|
||||
"stateless": {
|
||||
"description": "Number of stateless processes (-1 for automatic)",
|
||||
"type": "integer",
|
||||
"default": -1
|
||||
},
|
||||
"storage": {
|
||||
"description": "Number of storage processes (determines cluster size)",
|
||||
"type": "integer",
|
||||
"default": 3
|
||||
}
|
||||
}
|
||||
},
|
||||
"redundancyMode": {
|
||||
"description": "Database redundancy mode (single, double, triple, three_datacenter, three_datacenter_fallback)",
|
||||
"type": "string",
|
||||
"default": "double"
|
||||
},
|
||||
"storageEngine": {
|
||||
"description": "Storage engine (ssd-2, ssd-redwood-v1, ssd-rocksdb-v1, memory)",
|
||||
"type": "string",
|
||||
"default": "ssd-2"
|
||||
},
|
||||
"version": {
|
||||
"description": "Version of FoundationDB to use",
|
||||
"type": "string",
|
||||
"default": "7.3.63"
|
||||
}
|
||||
}
|
||||
},
|
||||
"customParameters": {
|
||||
"description": "Custom parameters to pass to FoundationDB",
|
||||
"type": "array",
|
||||
"default": [],
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"imageType": {
|
||||
"description": "Container image deployment type",
|
||||
"type": "string",
|
||||
"default": "unified",
|
||||
"enum": [
|
||||
"unified",
|
||||
"split"
|
||||
]
|
||||
},
|
||||
"monitoring": {
|
||||
"description": "Monitoring configuration",
|
||||
"type": "object",
|
||||
"default": {
|
||||
"enabled": true
|
||||
},
|
||||
"required": [
|
||||
"enabled"
|
||||
],
|
||||
"properties": {
|
||||
"enabled": {
|
||||
"description": "Enable WorkloadMonitor integration",
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"resources": {
|
||||
"description": "Explicit CPU and memory configuration for each FoundationDB instance. When left empty, the preset defined in `resourcesPreset` is applied.",
|
||||
"type": "object",
|
||||
"default": {},
|
||||
"properties": {
|
||||
"cpu": {
|
||||
"description": "CPU available to each instance",
|
||||
"pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$",
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "integer"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"x-kubernetes-int-or-string": true
|
||||
},
|
||||
"memory": {
|
||||
"description": "Memory (RAM) available to each instance",
|
||||
"pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$",
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "integer"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"x-kubernetes-int-or-string": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"resourcesPreset": {
|
||||
"description": "Default sizing preset used when `resources` is omitted. Allowed values: `small`, `medium`, `large`, `xlarge`, `2xlarge`.",
|
||||
"type": "string",
|
||||
"default": "medium",
|
||||
"enum": [
|
||||
"small",
|
||||
"medium",
|
||||
"large",
|
||||
"xlarge",
|
||||
"2xlarge"
|
||||
]
|
||||
},
|
||||
"securityContext": {
|
||||
"description": "Security context for containers",
|
||||
"type": "object",
|
||||
"default": {
|
||||
"runAsGroup": 4059,
|
||||
"runAsUser": 4059
|
||||
},
|
||||
"required": [
|
||||
"runAsGroup",
|
||||
"runAsUser"
|
||||
],
|
||||
"properties": {
|
||||
"runAsGroup": {
|
||||
"description": "Group ID to run the container",
|
||||
"type": "integer",
|
||||
"default": 4059
|
||||
},
|
||||
"runAsUser": {
|
||||
"description": "User ID to run the container",
|
||||
"type": "integer",
|
||||
"default": 4059
|
||||
}
|
||||
}
|
||||
},
|
||||
"storage": {
|
||||
"description": "Storage configuration",
|
||||
"type": "object",
|
||||
"default": {
|
||||
"size": "16Gi",
|
||||
"storageClass": ""
|
||||
},
|
||||
"required": [
|
||||
"size",
|
||||
"storageClass"
|
||||
],
|
||||
"properties": {
|
||||
"size": {
|
||||
"description": "Size of persistent volumes for each instance",
|
||||
"default": "16Gi",
|
||||
"pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$",
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "integer"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"x-kubernetes-int-or-string": true
|
||||
},
|
||||
"storageClass": {
|
||||
"description": "Storage class (if not set, uses cluster default)",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
93
packages/apps/foundationdb/values.yaml
Normal file
93
packages/apps/foundationdb/values.yaml
Normal file
@@ -0,0 +1,93 @@
|
||||
# Default values for foundationdb.
|
||||
# This is a YAML-formatted file.
|
||||
# Declare variables to be passed into your templates.
|
||||
|
||||
## @section Common parameters
|
||||
##
|
||||
## @param cluster {cluster} Cluster configuration
|
||||
## @field cluster.processCounts {clusterProcessCounts} Process counts for different roles
|
||||
## @field clusterProcessCounts.stateless {int} Number of stateless processes (-1 for automatic)
|
||||
## @field clusterProcessCounts.storage {int} Number of storage processes (determines cluster size)
|
||||
## @field clusterProcessCounts.cluster_controller {int} Number of cluster controller processes
|
||||
## @field cluster.version {string} Version of FoundationDB to use
|
||||
## @field cluster.redundancyMode {string} Database redundancy mode (single, double, triple, three_datacenter, three_datacenter_fallback)
|
||||
## @field cluster.storageEngine {string} Storage engine (ssd-2, ssd-redwood-v1, ssd-rocksdb-v1, memory)
|
||||
## @field cluster.faultDomain {clusterFaultDomain} Fault domain configuration
|
||||
## @field clusterFaultDomain.key {string} Fault domain key
|
||||
## @field clusterFaultDomain.valueFrom {string} Fault domain value source
|
||||
cluster:
|
||||
processCounts:
|
||||
stateless: -1 # Automatically calculated
|
||||
storage: 3 # Number of storage processes (determines cluster size)
|
||||
cluster_controller: 1
|
||||
|
||||
version: "7.3.63"
|
||||
redundancyMode: "double" # Database redundancy mode
|
||||
storageEngine: "ssd-2" # Storage engine
|
||||
|
||||
faultDomain:
|
||||
key: "kubernetes.io/hostname"
|
||||
valueFrom: "spec.nodeName"
|
||||
|
||||
## @param storage {storage} Storage configuration
|
||||
## @field storage.size {quantity} Size of persistent volumes for each instance
|
||||
## @field storage.storageClass {string} Storage class (if not set, uses cluster default)
|
||||
storage:
|
||||
size: "16Gi"
|
||||
storageClass: ""
|
||||
|
||||
## @param resources {*resources} Explicit CPU and memory configuration for each FoundationDB instance. When left empty, the preset defined in `resourcesPreset` is applied.
|
||||
## @field resources.cpu {*quantity} CPU available to each instance
|
||||
## @field resources.memory {*quantity} Memory (RAM) available to each instance
|
||||
resources: {}
|
||||
# resources:
|
||||
# cpu: 2000m
|
||||
# memory: 4Gi
|
||||
## @param resourcesPreset {string enum:"small,medium,large,xlarge,2xlarge"} Default sizing preset used when `resources` is omitted. Allowed values: `small`, `medium`, `large`, `xlarge`, `2xlarge`.
|
||||
resourcesPreset: "medium"
|
||||
|
||||
## @param backup {backup} Backup configuration
|
||||
## @field backup.enabled {bool} Enable backups
|
||||
## @field backup.s3 {backupS3} S3 configuration for backups
|
||||
## @field backupS3.bucket {string} S3 bucket name
|
||||
## @field backupS3.endpoint {string} S3 endpoint URL
|
||||
## @field backupS3.region {string} S3 region
|
||||
## @field backupS3.credentials {backupS3Credentials} S3 credentials
|
||||
## @field backupS3Credentials.accessKeyId {string} S3 access key ID
|
||||
## @field backupS3Credentials.secretAccessKey {string} S3 secret access key
|
||||
## @field backup.retentionPolicy {string} Retention policy for backups
|
||||
backup:
|
||||
enabled: false
|
||||
s3:
|
||||
bucket: ""
|
||||
endpoint: ""
|
||||
region: "us-east-1"
|
||||
credentials:
|
||||
accessKeyId: ""
|
||||
secretAccessKey: ""
|
||||
retentionPolicy: "7d"
|
||||
|
||||
## @param monitoring {monitoring} Monitoring configuration
|
||||
## @field monitoring.enabled {bool} Enable WorkloadMonitor integration
|
||||
monitoring:
|
||||
enabled: true
|
||||
|
||||
## @section FoundationDB configuration
|
||||
##
|
||||
## @param customParameters {[]string} Custom parameters to pass to FoundationDB
|
||||
customParameters: []
|
||||
# Example:
|
||||
# - knob_disable_posix_kernel_aio=1
|
||||
|
||||
## @param imageType {string enum:"unified,split"} Container image deployment type
|
||||
imageType: "unified"
|
||||
|
||||
## @param securityContext {securityContext} Security context for containers
|
||||
## @field securityContext.runAsUser {int} User ID to run the container
|
||||
## @field securityContext.runAsGroup {int} Group ID to run the container
|
||||
securityContext:
|
||||
runAsUser: 4059
|
||||
runAsGroup: 4059
|
||||
|
||||
## @param automaticReplacements {bool} Enable automatic pod replacements
|
||||
automaticReplacements: true
|
||||
190
packages/apps/versions_map
Normal file
190
packages/apps/versions_map
Normal file
@@ -0,0 +1,190 @@
|
||||
bucket 0.1.0 632224a3
|
||||
bucket 0.2.0 HEAD
|
||||
clickhouse 0.1.0 f7eaab0a
|
||||
clickhouse 0.2.0 53f2365e
|
||||
clickhouse 0.2.1 dfbc210b
|
||||
clickhouse 0.3.0 6c5cf5bf
|
||||
clickhouse 0.4.0 b40e1b09
|
||||
clickhouse 0.5.0 0f312d5c
|
||||
clickhouse 0.6.0 1ec10165
|
||||
clickhouse 0.6.1 c62a83a7
|
||||
clickhouse 0.6.2 8267072d
|
||||
clickhouse 0.7.0 93bdf411
|
||||
clickhouse 0.9.0 6130f43d
|
||||
clickhouse 0.9.2 632224a3
|
||||
clickhouse 0.10.0 6358fd7a
|
||||
clickhouse 0.10.1 4369b031
|
||||
clickhouse 0.11.0 08cb7c0f
|
||||
clickhouse 0.11.1 0e47e1e8
|
||||
clickhouse 0.12.0 c02a3818
|
||||
clickhouse 0.13.0 HEAD
|
||||
ferretdb 0.1.0 e9716091
|
||||
ferretdb 0.1.1 91b0499a
|
||||
ferretdb 0.2.0 6c5cf5bf
|
||||
ferretdb 0.3.0 b8e33d19
|
||||
ferretdb 0.4.0 b40e1b09
|
||||
ferretdb 0.4.1 1ec10165
|
||||
ferretdb 0.4.2 8267072d
|
||||
ferretdb 0.5.0 93bdf411
|
||||
ferretdb 0.6.0 6130f43d
|
||||
ferretdb 0.6.1 632224a3
|
||||
ferretdb 0.7.0 62cb694d
|
||||
ferretdb 0.7.1 4369b031
|
||||
ferretdb 0.8.0 08cb7c0f
|
||||
ferretdb 1.0.0 c02a3818
|
||||
ferretdb 1.1.0 HEAD
|
||||
foundationdb 0.1.0 HEAD
|
||||
http-cache 0.1.0 263e47be
|
||||
http-cache 0.2.0 53f2365e
|
||||
http-cache 0.3.0 6c5cf5bf
|
||||
http-cache 0.3.1 0f312d5c
|
||||
http-cache 0.4.0 93bdf411
|
||||
http-cache 0.5.0 6130f43d
|
||||
http-cache 0.5.1 62cb694d
|
||||
http-cache 0.5.2 4369b031
|
||||
http-cache 0.6.0 08cb7c0f
|
||||
http-cache 0.6.1 c02a3818
|
||||
http-cache 0.7.0 HEAD
|
||||
kafka 0.1.0 f7eaab0a
|
||||
kafka 0.2.0 c0685f43
|
||||
kafka 0.2.1 dfbc210b
|
||||
kafka 0.2.2 e9716091
|
||||
kafka 0.2.3 91b0499a
|
||||
kafka 0.3.0 6c5cf5bf
|
||||
kafka 0.3.1 c62a83a7
|
||||
kafka 0.3.2 93c46161
|
||||
kafka 0.3.3 8267072d
|
||||
kafka 0.4.0 85ec09b8
|
||||
kafka 0.5.0 93bdf411
|
||||
kafka 0.6.0 6130f43d
|
||||
kafka 0.6.1 632224a3
|
||||
kafka 0.7.0 6358fd7a
|
||||
kafka 0.7.1 4369b031
|
||||
kafka 0.8.0 08cb7c0f
|
||||
kafka 0.8.1 HEAD
|
||||
kubernetes 0.24.0 62cb694d
|
||||
kubernetes 0.25.0 70f82667
|
||||
kubernetes 0.25.1 acd4663a
|
||||
kubernetes 0.25.2 08cb7c0f
|
||||
kubernetes 0.26.0 9584e5f5
|
||||
kubernetes 0.26.1 0e47e1e8
|
||||
kubernetes 0.26.2 8ddbe32e
|
||||
kubernetes 0.26.3 c02a3818
|
||||
kubernetes 0.27.0 6cd5e746
|
||||
kubernetes 0.28.0 7f477eec
|
||||
kubernetes 0.29.0 HEAD
|
||||
mysql 0.1.0 263e47be
|
||||
mysql 0.2.0 c24a103f
|
||||
mysql 0.3.0 53f2365e
|
||||
mysql 0.4.0 6c5cf5bf
|
||||
mysql 0.5.0 b40e1b09
|
||||
mysql 0.5.1 0f312d5c
|
||||
mysql 0.5.2 1ec10165
|
||||
mysql 0.5.3 8267072d
|
||||
mysql 0.6.0 93bdf411
|
||||
mysql 0.7.0 6130f43d
|
||||
mysql 0.7.1 632224a3
|
||||
mysql 0.8.0 62cb694d
|
||||
mysql 0.8.1 4369b031
|
||||
mysql 0.9.0 08cb7c0f
|
||||
mysql 0.9.1 c02a3818
|
||||
mysql 0.10.0 HEAD
|
||||
nats 0.1.0 e9716091
|
||||
nats 0.2.0 6c5cf5bf
|
||||
nats 0.3.0 78366f19
|
||||
nats 0.3.1 c62a83a7
|
||||
nats 0.4.0 898374b5
|
||||
nats 0.4.1 8267072d
|
||||
nats 0.5.0 93bdf411
|
||||
nats 0.6.0 6130f43d
|
||||
nats 0.6.1 632224a3
|
||||
nats 0.7.0 62cb694d
|
||||
nats 0.7.1 4369b031
|
||||
nats 0.8.0 08cb7c0f
|
||||
nats 0.8.1 c02a3818
|
||||
nats 0.9.0 HEAD
|
||||
postgres 0.1.0 263e47be
|
||||
postgres 0.2.0 53f2365e
|
||||
postgres 0.2.1 d7cfa53c
|
||||
postgres 0.3.0 dfbc210b
|
||||
postgres 0.4.0 e9716091
|
||||
postgres 0.4.1 91b0499a
|
||||
postgres 0.5.0 6c5cf5bf
|
||||
postgres 0.6.0 b40e1b09
|
||||
postgres 0.6.2 0f312d5c
|
||||
postgres 0.7.0 4b90bf5a
|
||||
postgres 0.7.1 1ec10165
|
||||
postgres 0.8.0 4e68e65c
|
||||
postgres 0.9.0 8267072d
|
||||
postgres 0.10.0 721c12a7
|
||||
postgres 0.10.1 93bdf411
|
||||
postgres 0.11.0 f9f8bb2f
|
||||
postgres 0.12.0 6130f43d
|
||||
postgres 0.12.1 632224a3
|
||||
postgres 0.14.0 62cb694d
|
||||
postgres 0.15.1 4369b031
|
||||
postgres 0.16.0 70f82667
|
||||
postgres 0.17.0 acd4663a
|
||||
postgres 0.17.1 08cb7c0f
|
||||
postgres 0.17.3 c02a3818
|
||||
postgres 0.18.0 HEAD
|
||||
rabbitmq 0.1.0 263e47be
|
||||
rabbitmq 0.2.0 53f2365e
|
||||
rabbitmq 0.3.0 6c5cf5bf
|
||||
rabbitmq 0.4.0 b40e1b09
|
||||
rabbitmq 0.4.1 1128d0cb
|
||||
rabbitmq 0.4.2 4b90bf5a
|
||||
rabbitmq 0.4.3 1ec10165
|
||||
rabbitmq 0.4.4 8267072d
|
||||
rabbitmq 0.5.0 93bdf411
|
||||
rabbitmq 0.6.0 632224a3
|
||||
rabbitmq 0.7.0 62cb694d
|
||||
rabbitmq 0.7.1 4369b031
|
||||
rabbitmq 0.8.0 08cb7c0f
|
||||
rabbitmq 0.8.1 c02a3818
|
||||
rabbitmq 0.9.0 HEAD
|
||||
redis 0.1.1 263e47be
|
||||
redis 0.2.0 53f2365e
|
||||
redis 0.3.0 6c5cf5bf
|
||||
redis 0.3.1 c62a83a7
|
||||
redis 0.4.0 84f3ccc0
|
||||
redis 0.5.0 4e68e65c
|
||||
redis 0.6.0 93bdf411
|
||||
redis 0.7.0 6130f43d
|
||||
redis 0.7.1 632224a3
|
||||
redis 0.8.0 62cb694d
|
||||
redis 0.8.1 4369b031
|
||||
redis 0.9.0 08cb7c0f
|
||||
redis 0.9.1 c02a3818
|
||||
redis 0.10.0 HEAD
|
||||
tcp-balancer 0.1.0 263e47be
|
||||
tcp-balancer 0.2.0 53f2365e
|
||||
tcp-balancer 0.3.0 93bdf411
|
||||
tcp-balancer 0.4.0 6130f43d
|
||||
tcp-balancer 0.4.1 62cb694d
|
||||
tcp-balancer 0.4.2 4369b031
|
||||
tcp-balancer 0.5.0 08cb7c0f
|
||||
tcp-balancer 0.5.1 c02a3818
|
||||
tcp-balancer 0.6.0 HEAD
|
||||
tenant 1.13.0 8f1975d1
|
||||
tenant 1.14.0 HEAD
|
||||
virtual-machine 0.14.0 HEAD
|
||||
vm-disk 0.1.0 d971f2ff
|
||||
vm-disk 0.1.1 6130f43d
|
||||
vm-disk 0.1.2 632224a3
|
||||
vm-disk 0.2.0 4369b031
|
||||
vm-disk 0.3.0 c02a3818
|
||||
vm-disk 0.4.0 HEAD
|
||||
vm-instance 0.12.0 HEAD
|
||||
vpn 0.1.0 263e47be
|
||||
vpn 0.2.0 53f2365e
|
||||
vpn 0.3.0 6c5cf5bf
|
||||
vpn 0.3.1 1ec10165
|
||||
vpn 0.4.0 93bdf411
|
||||
vpn 0.5.0 6130f43d
|
||||
vpn 0.5.1 632224a3
|
||||
vpn 0.6.1 62cb694d
|
||||
vpn 0.6.2 4369b031
|
||||
vpn 0.7.0 08cb7c0f
|
||||
vpn 0.7.1 c02a3818
|
||||
vpn 0.8.0 HEAD
|
||||
@@ -155,6 +155,13 @@ releases:
|
||||
optional: true
|
||||
dependsOn: [cilium,victoria-metrics-operator]
|
||||
|
||||
- name: foundationdb-operator
|
||||
releaseName: foundationdb-operator
|
||||
chart: cozy-foundationdb-operator
|
||||
namespace: cozy-foundationdb-operator
|
||||
optional: true
|
||||
dependsOn: [cilium,cert-manager]
|
||||
|
||||
- name: rabbitmq-operator
|
||||
releaseName: rabbitmq-operator
|
||||
chart: cozy-rabbitmq-operator
|
||||
|
||||
@@ -116,6 +116,13 @@ releases:
|
||||
optional: true
|
||||
dependsOn: [victoria-metrics-operator]
|
||||
|
||||
- name: foundationdb-operator
|
||||
releaseName: foundationdb-operator
|
||||
chart: cozy-foundationdb-operator
|
||||
namespace: cozy-foundationdb-operator
|
||||
optional: true
|
||||
dependsOn: [cert-manager]
|
||||
|
||||
- name: rabbitmq-operator
|
||||
releaseName: rabbitmq-operator
|
||||
chart: cozy-rabbitmq-operator
|
||||
|
||||
@@ -242,6 +242,12 @@ releases:
|
||||
namespace: cozy-clickhouse-operator
|
||||
dependsOn: [cilium,kubeovn,victoria-metrics-operator]
|
||||
|
||||
- name: foundationdb-operator
|
||||
releaseName: foundationdb-operator
|
||||
chart: cozy-foundationdb-operator
|
||||
namespace: cozy-foundationdb-operator
|
||||
dependsOn: [cilium,kubeovn,cert-manager]
|
||||
|
||||
- name: rabbitmq-operator
|
||||
releaseName: rabbitmq-operator
|
||||
chart: cozy-rabbitmq-operator
|
||||
|
||||
@@ -135,6 +135,12 @@ releases:
|
||||
namespace: cozy-clickhouse-operator
|
||||
dependsOn: [victoria-metrics-operator]
|
||||
|
||||
- name: foundationdb-operator
|
||||
releaseName: foundationdb-operator
|
||||
chart: cozy-foundationdb-operator
|
||||
namespace: cozy-foundationdb-operator
|
||||
dependsOn: [cert-manager]
|
||||
|
||||
- name: rabbitmq-operator
|
||||
releaseName: rabbitmq-operator
|
||||
chart: cozy-rabbitmq-operator
|
||||
|
||||
1
packages/system/cozystack-api/openapi-schemas/foundationdb.json
Symbolic link
1
packages/system/cozystack-api/openapi-schemas/foundationdb.json
Symbolic link
@@ -0,0 +1 @@
|
||||
../../../apps/foundationdb/values.schema.json
|
||||
@@ -0,0 +1,527 @@
|
||||
apiVersion: cozystack.io/v1alpha1
|
||||
kind: CozystackResourceDefinition
|
||||
metadata:
|
||||
name: bucket
|
||||
spec:
|
||||
application:
|
||||
kind: Bucket
|
||||
singular: bucket
|
||||
plural: buckets
|
||||
openAPISchema: |
|
||||
{{- .Files.Get "openapi-schemas/bucket.json" | fromJson | toJson | nindent 6 }}
|
||||
release:
|
||||
prefix: bucket-
|
||||
labels:
|
||||
cozystack.io/ui: "true"
|
||||
chart:
|
||||
name: bucket
|
||||
sourceRef:
|
||||
kind: HelmRepository
|
||||
name: cozystack-apps
|
||||
namespace: cozy-public
|
||||
---
|
||||
apiVersion: cozystack.io/v1alpha1
|
||||
kind: CozystackResourceDefinition
|
||||
metadata:
|
||||
name: clickhouse
|
||||
spec:
|
||||
application:
|
||||
kind: ClickHouse
|
||||
singular: clickhouse
|
||||
plural: clickhouses
|
||||
openAPISchema: |
|
||||
{{- .Files.Get "openapi-schemas/clickhouse.json" | fromJson | toJson | nindent 6 }}
|
||||
release:
|
||||
prefix: clickhouse-
|
||||
labels:
|
||||
cozystack.io/ui: "true"
|
||||
chart:
|
||||
name: clickhouse
|
||||
sourceRef:
|
||||
kind: HelmRepository
|
||||
name: cozystack-apps
|
||||
namespace: cozy-public
|
||||
---
|
||||
apiVersion: cozystack.io/v1alpha1
|
||||
kind: CozystackResourceDefinition
|
||||
metadata:
|
||||
name: httpcache
|
||||
spec:
|
||||
application:
|
||||
kind: HTTPCache
|
||||
singular: httpcache
|
||||
plural: httpcaches
|
||||
openAPISchema: |
|
||||
{{- .Files.Get "openapi-schemas/http-cache.json" | fromJson | toJson | nindent 6 }}
|
||||
release:
|
||||
prefix: http-cache-
|
||||
labels:
|
||||
cozystack.io/ui: "true"
|
||||
chart:
|
||||
name: http-cache
|
||||
sourceRef:
|
||||
kind: HelmRepository
|
||||
name: cozystack-apps
|
||||
namespace: cozy-public
|
||||
---
|
||||
apiVersion: cozystack.io/v1alpha1
|
||||
kind: CozystackResourceDefinition
|
||||
metadata:
|
||||
name: nats
|
||||
spec:
|
||||
application:
|
||||
kind: NATS
|
||||
singular: nats
|
||||
plural: natses
|
||||
openAPISchema: |
|
||||
{{- .Files.Get "openapi-schemas/nats.json" | fromJson | toJson | nindent 6 }}
|
||||
release:
|
||||
prefix: nats-
|
||||
labels:
|
||||
cozystack.io/ui: "true"
|
||||
chart:
|
||||
name: nats
|
||||
sourceRef:
|
||||
kind: HelmRepository
|
||||
name: cozystack-apps
|
||||
namespace: cozy-public
|
||||
---
|
||||
apiVersion: cozystack.io/v1alpha1
|
||||
kind: CozystackResourceDefinition
|
||||
metadata:
|
||||
name: tcpbalancer
|
||||
spec:
|
||||
application:
|
||||
kind: TCPBalancer
|
||||
singular: tcpbalancer
|
||||
plural: tcpbalancers
|
||||
openAPISchema: |
|
||||
{{- .Files.Get "openapi-schemas/tcp-balancer.json" | fromJson | toJson | nindent 6 }}
|
||||
release:
|
||||
prefix: tcp-balancer-
|
||||
labels:
|
||||
cozystack.io/ui: "true"
|
||||
chart:
|
||||
name: tcp-balancer
|
||||
sourceRef:
|
||||
kind: HelmRepository
|
||||
name: cozystack-apps
|
||||
namespace: cozy-public
|
||||
---
|
||||
apiVersion: cozystack.io/v1alpha1
|
||||
kind: CozystackResourceDefinition
|
||||
metadata:
|
||||
name: virtualmachine
|
||||
spec:
|
||||
application:
|
||||
kind: VirtualMachine
|
||||
singular: virtualmachine
|
||||
plural: virtualmachines
|
||||
openAPISchema: |
|
||||
{{- .Files.Get "openapi-schemas/virtual-machine.json" | fromJson | toJson | nindent 6 }}
|
||||
release:
|
||||
prefix: virtual-machine-
|
||||
labels:
|
||||
cozystack.io/ui: "true"
|
||||
chart:
|
||||
name: virtual-machine
|
||||
sourceRef:
|
||||
kind: HelmRepository
|
||||
name: cozystack-apps
|
||||
namespace: cozy-public
|
||||
---
|
||||
apiVersion: cozystack.io/v1alpha1
|
||||
kind: CozystackResourceDefinition
|
||||
metadata:
|
||||
name: vpn
|
||||
spec:
|
||||
application:
|
||||
kind: VPN
|
||||
singular: vpn
|
||||
plural: vpns
|
||||
openAPISchema: |
|
||||
{{- .Files.Get "openapi-schemas/vpn.json" | fromJson | toJson | nindent 6 }}
|
||||
release:
|
||||
prefix: vpn-
|
||||
labels:
|
||||
cozystack.io/ui: "true"
|
||||
chart:
|
||||
name: vpn
|
||||
sourceRef:
|
||||
kind: HelmRepository
|
||||
name: cozystack-apps
|
||||
namespace: cozy-public
|
||||
---
|
||||
apiVersion: cozystack.io/v1alpha1
|
||||
kind: CozystackResourceDefinition
|
||||
metadata:
|
||||
name: mysql
|
||||
spec:
|
||||
application:
|
||||
kind: MySQL
|
||||
singular: mysql
|
||||
plural: mysqls
|
||||
openAPISchema: |
|
||||
{{- .Files.Get "openapi-schemas/mysql.json" | fromJson | toJson | nindent 6 }}
|
||||
release:
|
||||
prefix: mysql-
|
||||
labels:
|
||||
cozystack.io/ui: "true"
|
||||
chart:
|
||||
name: mysql
|
||||
sourceRef:
|
||||
kind: HelmRepository
|
||||
name: cozystack-apps
|
||||
namespace: cozy-public
|
||||
---
|
||||
apiVersion: cozystack.io/v1alpha1
|
||||
kind: CozystackResourceDefinition
|
||||
metadata:
|
||||
name: tenant
|
||||
spec:
|
||||
application:
|
||||
kind: Tenant
|
||||
singular: tenant
|
||||
plural: tenants
|
||||
openAPISchema: |
|
||||
{{- .Files.Get "openapi-schemas/tenant.json" | fromJson | toJson | nindent 6 }}
|
||||
release:
|
||||
prefix: tenant-
|
||||
labels:
|
||||
cozystack.io/ui: "true"
|
||||
chart:
|
||||
name: tenant
|
||||
sourceRef:
|
||||
kind: HelmRepository
|
||||
name: cozystack-apps
|
||||
namespace: cozy-public
|
||||
---
|
||||
apiVersion: cozystack.io/v1alpha1
|
||||
kind: CozystackResourceDefinition
|
||||
metadata:
|
||||
name: kubernetes
|
||||
spec:
|
||||
application:
|
||||
kind: Kubernetes
|
||||
singular: kubernetes
|
||||
plural: kuberneteses
|
||||
openAPISchema: |
|
||||
{{- .Files.Get "openapi-schemas/kubernetes.json" | fromJson | toJson | nindent 6 }}
|
||||
release:
|
||||
prefix: kubernetes-
|
||||
labels:
|
||||
cozystack.io/ui: "true"
|
||||
chart:
|
||||
name: kubernetes
|
||||
sourceRef:
|
||||
kind: HelmRepository
|
||||
name: cozystack-apps
|
||||
namespace: cozy-public
|
||||
---
|
||||
apiVersion: cozystack.io/v1alpha1
|
||||
kind: CozystackResourceDefinition
|
||||
metadata:
|
||||
name: redis
|
||||
spec:
|
||||
application:
|
||||
kind: Redis
|
||||
singular: redis
|
||||
plural: redises
|
||||
openAPISchema: |
|
||||
{{- .Files.Get "openapi-schemas/redis.json" | fromJson | toJson | nindent 6 }}
|
||||
release:
|
||||
prefix: redis-
|
||||
labels:
|
||||
cozystack.io/ui: "true"
|
||||
chart:
|
||||
name: redis
|
||||
sourceRef:
|
||||
kind: HelmRepository
|
||||
name: cozystack-apps
|
||||
namespace: cozy-public
|
||||
---
|
||||
apiVersion: cozystack.io/v1alpha1
|
||||
kind: CozystackResourceDefinition
|
||||
metadata:
|
||||
name: rabbitmq
|
||||
spec:
|
||||
application:
|
||||
kind: RabbitMQ
|
||||
singular: rabbitmq
|
||||
plural: rabbitmqs
|
||||
openAPISchema: |
|
||||
{{- .Files.Get "openapi-schemas/rabbitmq.json" | fromJson | toJson | nindent 6 }}
|
||||
release:
|
||||
prefix: rabbitmq-
|
||||
labels:
|
||||
cozystack.io/ui: "true"
|
||||
chart:
|
||||
name: rabbitmq
|
||||
sourceRef:
|
||||
kind: HelmRepository
|
||||
name: cozystack-apps
|
||||
namespace: cozy-public
|
||||
---
|
||||
apiVersion: cozystack.io/v1alpha1
|
||||
kind: CozystackResourceDefinition
|
||||
metadata:
|
||||
name: postgres
|
||||
spec:
|
||||
application:
|
||||
kind: Postgres
|
||||
singular: postgres
|
||||
plural: postgreses
|
||||
openAPISchema: |
|
||||
{{- .Files.Get "openapi-schemas/postgres.json" | fromJson | toJson | nindent 6 }}
|
||||
release:
|
||||
prefix: postgres-
|
||||
labels:
|
||||
cozystack.io/ui: "true"
|
||||
chart:
|
||||
name: postgres
|
||||
sourceRef:
|
||||
kind: HelmRepository
|
||||
name: cozystack-apps
|
||||
namespace: cozy-public
|
||||
---
|
||||
apiVersion: cozystack.io/v1alpha1
|
||||
kind: CozystackResourceDefinition
|
||||
metadata:
|
||||
name: ferretdb
|
||||
spec:
|
||||
application:
|
||||
kind: FerretDB
|
||||
singular: ferretdb
|
||||
plural: ferretdbs
|
||||
openAPISchema: |
|
||||
{{- .Files.Get "openapi-schemas/ferretdb.json" | fromJson | toJson | nindent 6 }}
|
||||
release:
|
||||
prefix: ferretdb-
|
||||
labels:
|
||||
cozystack.io/ui: "true"
|
||||
chart:
|
||||
name: ferretdb
|
||||
sourceRef:
|
||||
kind: HelmRepository
|
||||
name: cozystack-apps
|
||||
namespace: cozy-public
|
||||
---
|
||||
apiVersion: cozystack.io/v1alpha1
|
||||
kind: CozystackResourceDefinition
|
||||
metadata:
|
||||
name: foundationdb
|
||||
spec:
|
||||
application:
|
||||
kind: FoundationDB
|
||||
singular: foundationdb
|
||||
plural: foundationdbs
|
||||
openAPISchema: |
|
||||
{{- .Files.Get "openapi-schemas/foundationdb.json" | fromJson | toJson | nindent 6 }}
|
||||
release:
|
||||
prefix: foundationdb-
|
||||
labels:
|
||||
cozystack.io/ui: "true"
|
||||
chart:
|
||||
name: foundationdb
|
||||
sourceRef:
|
||||
kind: HelmRepository
|
||||
name: cozystack-apps
|
||||
namespace: cozy-public
|
||||
---
|
||||
apiVersion: cozystack.io/v1alpha1
|
||||
kind: CozystackResourceDefinition
|
||||
metadata:
|
||||
name: kafka
|
||||
spec:
|
||||
application:
|
||||
kind: Kafka
|
||||
singular: kafka
|
||||
plural: kafkas
|
||||
openAPISchema: |
|
||||
{{- .Files.Get "openapi-schemas/kafka.json" | fromJson | toJson | nindent 6 }}
|
||||
release:
|
||||
prefix: kafka-
|
||||
labels:
|
||||
cozystack.io/ui: "true"
|
||||
chart:
|
||||
name: kafka
|
||||
sourceRef:
|
||||
kind: HelmRepository
|
||||
name: cozystack-apps
|
||||
namespace: cozy-public
|
||||
---
|
||||
apiVersion: cozystack.io/v1alpha1
|
||||
kind: CozystackResourceDefinition
|
||||
metadata:
|
||||
name: vmdisk
|
||||
spec:
|
||||
application:
|
||||
kind: VMDisk
|
||||
singular: vmdisk
|
||||
plural: vmdisks
|
||||
openAPISchema: |
|
||||
{{- .Files.Get "openapi-schemas/vm-disk.json" | fromJson | toJson | nindent 6 }}
|
||||
release:
|
||||
prefix: vm-disk-
|
||||
labels:
|
||||
cozystack.io/ui: "true"
|
||||
chart:
|
||||
name: vm-disk
|
||||
sourceRef:
|
||||
kind: HelmRepository
|
||||
name: cozystack-apps
|
||||
namespace: cozy-public
|
||||
---
|
||||
apiVersion: cozystack.io/v1alpha1
|
||||
kind: CozystackResourceDefinition
|
||||
metadata:
|
||||
name: vminstance
|
||||
spec:
|
||||
application:
|
||||
kind: VMInstance
|
||||
singular: vminstance
|
||||
plural: vminstances
|
||||
openAPISchema: |
|
||||
{{- .Files.Get "openapi-schemas/vm-instance.json" | fromJson | toJson | nindent 6 }}
|
||||
release:
|
||||
prefix: vm-instance-
|
||||
labels:
|
||||
cozystack.io/ui: "true"
|
||||
chart:
|
||||
name: vm-instance
|
||||
sourceRef:
|
||||
kind: HelmRepository
|
||||
name: cozystack-apps
|
||||
namespace: cozy-public
|
||||
---
|
||||
apiVersion: cozystack.io/v1alpha1
|
||||
kind: CozystackResourceDefinition
|
||||
metadata:
|
||||
name: monitoring
|
||||
spec:
|
||||
application:
|
||||
kind: Monitoring
|
||||
singular: monitoring
|
||||
plural: monitorings
|
||||
openAPISchema: |
|
||||
{{- .Files.Get "openapi-schemas/monitoring.json" | fromJson | toJson | nindent 6 }}
|
||||
release:
|
||||
prefix: ""
|
||||
labels:
|
||||
cozystack.io/ui: "true"
|
||||
chart:
|
||||
name: monitoring
|
||||
sourceRef:
|
||||
kind: HelmRepository
|
||||
name: cozystack-extra
|
||||
namespace: cozy-public
|
||||
---
|
||||
apiVersion: cozystack.io/v1alpha1
|
||||
kind: CozystackResourceDefinition
|
||||
metadata:
|
||||
name: etcd
|
||||
spec:
|
||||
application:
|
||||
kind: Etcd
|
||||
singular: etcd
|
||||
plural: etcds
|
||||
openAPISchema: |
|
||||
{{- .Files.Get "openapi-schemas/etcd.json" | fromJson | toJson | nindent 6 }}
|
||||
release:
|
||||
prefix: ""
|
||||
labels:
|
||||
cozystack.io/ui: "true"
|
||||
chart:
|
||||
name: etcd
|
||||
sourceRef:
|
||||
kind: HelmRepository
|
||||
name: cozystack-extra
|
||||
namespace: cozy-public
|
||||
---
|
||||
apiVersion: cozystack.io/v1alpha1
|
||||
kind: CozystackResourceDefinition
|
||||
metadata:
|
||||
name: ingress
|
||||
spec:
|
||||
application:
|
||||
kind: Ingress
|
||||
singular: ingress
|
||||
plural: ingresses
|
||||
openAPISchema: |
|
||||
{{- .Files.Get "openapi-schemas/ingress.json" | fromJson | toJson | nindent 6 }}
|
||||
release:
|
||||
prefix: ""
|
||||
labels:
|
||||
cozystack.io/ui: "true"
|
||||
chart:
|
||||
name: ingress
|
||||
sourceRef:
|
||||
kind: HelmRepository
|
||||
name: cozystack-extra
|
||||
namespace: cozy-public
|
||||
---
|
||||
apiVersion: cozystack.io/v1alpha1
|
||||
kind: CozystackResourceDefinition
|
||||
metadata:
|
||||
name: seaweedfs
|
||||
spec:
|
||||
application:
|
||||
kind: SeaweedFS
|
||||
singular: seaweedfs
|
||||
plural: seaweedfses
|
||||
openAPISchema: |
|
||||
{{- .Files.Get "openapi-schemas/seaweedfs.json" | fromJson | toJson | nindent 6 }}
|
||||
release:
|
||||
prefix: ""
|
||||
labels:
|
||||
cozystack.io/ui: "true"
|
||||
chart:
|
||||
name: seaweedfs
|
||||
sourceRef:
|
||||
kind: HelmRepository
|
||||
name: cozystack-extra
|
||||
namespace: cozy-public
|
||||
---
|
||||
apiVersion: cozystack.io/v1alpha1
|
||||
kind: CozystackResourceDefinition
|
||||
metadata:
|
||||
name: bootbox
|
||||
spec:
|
||||
application:
|
||||
kind: BootBox
|
||||
singular: bootbox
|
||||
plural: bootboxes
|
||||
openAPISchema: |
|
||||
{{- .Files.Get "openapi-schemas/bootbox.json" | fromJson | toJson | nindent 6 }}
|
||||
release:
|
||||
prefix: ""
|
||||
labels:
|
||||
cozystack.io/ui: "true"
|
||||
chart:
|
||||
name: bootbox
|
||||
sourceRef:
|
||||
kind: HelmRepository
|
||||
name: cozystack-extra
|
||||
namespace: cozy-public
|
||||
---
|
||||
apiVersion: cozystack.io/v1alpha1
|
||||
kind: CozystackResourceDefinition
|
||||
metadata:
|
||||
name: info
|
||||
spec:
|
||||
application:
|
||||
kind: Info
|
||||
singular: info
|
||||
plural: infos
|
||||
openAPISchema: |
|
||||
{{- .Files.Get "openapi-schemas/info.json" | fromJson | toJson | nindent 6 }}
|
||||
release:
|
||||
prefix: ""
|
||||
labels:
|
||||
cozystack.io/ui: "true"
|
||||
chart:
|
||||
name: info
|
||||
sourceRef:
|
||||
kind: HelmRepository
|
||||
name: cozystack-extra
|
||||
namespace: cozy-public
|
||||
1
packages/system/foundationdb-operator/.helmignore
Normal file
1
packages/system/foundationdb-operator/.helmignore
Normal file
@@ -0,0 +1 @@
|
||||
Makefile
|
||||
3
packages/system/foundationdb-operator/Chart.yaml
Normal file
3
packages/system/foundationdb-operator/Chart.yaml
Normal file
@@ -0,0 +1,3 @@
|
||||
apiVersion: v2
|
||||
name: cozy-foundationdb-operator
|
||||
version: 0.0.0 # Placeholder, the actual version will be automatically set during the build process
|
||||
19
packages/system/foundationdb-operator/Makefile
Normal file
19
packages/system/foundationdb-operator/Makefile
Normal file
@@ -0,0 +1,19 @@
|
||||
export NAME=foundationdb-operator
|
||||
export NAMESPACE=cozy-$(NAME)
|
||||
|
||||
include ../../../scripts/package.mk
|
||||
|
||||
update:
|
||||
rm -rf charts
|
||||
git clone --depth 1 --branch v2.13.0 https://github.com/FoundationDB/fdb-kubernetes-operator.git tmp-repo
|
||||
mkdir -p charts
|
||||
cp -r tmp-repo/charts/fdb-operator charts/
|
||||
# Remove symlinked CRDs and replace with actual files
|
||||
rm -f charts/fdb-operator/crds/apps.foundationdb.org_foundationdbbackups.yaml
|
||||
rm -f charts/fdb-operator/crds/apps.foundationdb.org_foundationdbclusters.yaml
|
||||
rm -f charts/fdb-operator/crds/apps.foundationdb.org_foundationdbrestores.yaml
|
||||
cp tmp-repo/config/crd/bases/apps.foundationdb.org_foundationdbbackups.yaml charts/fdb-operator/crds/
|
||||
cp tmp-repo/config/crd/bases/apps.foundationdb.org_foundationdbclusters.yaml charts/fdb-operator/crds/
|
||||
cp tmp-repo/config/crd/bases/apps.foundationdb.org_foundationdbrestores.yaml charts/fdb-operator/crds/
|
||||
rm -rf tmp-repo
|
||||
rm -rf charts/fdb-operator/charts
|
||||
@@ -0,0 +1,23 @@
|
||||
apiVersion: v2
|
||||
name: fdb-operator
|
||||
description: A Helm chart for foundationDB operator
|
||||
home: https://www.foundationdb.org/
|
||||
sources:
|
||||
- https://github.com/FoundationDB/fdb-kubernetes-operator/tree/main/charts/fdb-operator
|
||||
# A chart can be either an 'application' or a 'library' chart.
|
||||
#
|
||||
# Application charts are a collection of templates that can be packaged into versioned archives
|
||||
# to be deployed.
|
||||
#
|
||||
# Library charts provide useful utilities or functions for the chart developer. They're included as
|
||||
# a dependency of application charts to inject those utilities and functions into the rendering
|
||||
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
|
||||
type: application
|
||||
# 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.
|
||||
version: 0.2.0
|
||||
# This is the version number of the application being deployed. This version number should be
|
||||
# incremented each time you make changes to the application.
|
||||
appVersion: v2.13.0
|
||||
maintainers:
|
||||
- name: "foundationdb-ci"
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,100 @@
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.18.0
|
||||
foundationdb.org/release: v2.13.0
|
||||
name: foundationdbrestores.apps.foundationdb.org
|
||||
spec:
|
||||
group: apps.foundationdb.org
|
||||
names:
|
||||
kind: FoundationDBRestore
|
||||
listKind: FoundationDBRestoreList
|
||||
plural: foundationdbrestores
|
||||
shortNames:
|
||||
- fdbrestore
|
||||
singular: foundationdbrestore
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- additionalPrinterColumns:
|
||||
- jsonPath: .metadata.creationTimestamp
|
||||
name: Age
|
||||
type: date
|
||||
- jsonPath: .status.state
|
||||
name: State
|
||||
type: string
|
||||
name: v1beta2
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
properties:
|
||||
apiVersion:
|
||||
type: string
|
||||
kind:
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
properties:
|
||||
blobStoreConfiguration:
|
||||
properties:
|
||||
accountName:
|
||||
maxLength: 100
|
||||
type: string
|
||||
backupName:
|
||||
maxLength: 1024
|
||||
type: string
|
||||
bucket:
|
||||
maxLength: 63
|
||||
minLength: 3
|
||||
type: string
|
||||
urlParameters:
|
||||
items:
|
||||
maxLength: 1024
|
||||
type: string
|
||||
maxItems: 100
|
||||
type: array
|
||||
required:
|
||||
- accountName
|
||||
type: object
|
||||
customParameters:
|
||||
items:
|
||||
maxLength: 100
|
||||
type: string
|
||||
maxItems: 100
|
||||
type: array
|
||||
destinationClusterName:
|
||||
type: string
|
||||
encryptionKeyPath:
|
||||
maxLength: 4096
|
||||
type: string
|
||||
keyRanges:
|
||||
items:
|
||||
properties:
|
||||
end:
|
||||
pattern: ^[A-Za-z0-9\/\\-]+$
|
||||
type: string
|
||||
start:
|
||||
pattern: ^[A-Za-z0-9\/\\-]+$
|
||||
type: string
|
||||
required:
|
||||
- end
|
||||
- start
|
||||
type: object
|
||||
type: array
|
||||
required:
|
||||
- destinationClusterName
|
||||
type: object
|
||||
status:
|
||||
properties:
|
||||
running:
|
||||
type: boolean
|
||||
state:
|
||||
maxLength: 50
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources:
|
||||
status: {}
|
||||
@@ -0,0 +1,6 @@
|
||||
FoundationDB operator has been installed successfully.
|
||||
|
||||
To see the logs of the operator you can use below command
|
||||
kubectl logs deployment/{{ include "fdb-operator.fullname" . }} -n {{ .Release.Namespace }} -f
|
||||
|
||||
Thanks for trying out FoundationDB helm chart.
|
||||
@@ -0,0 +1,60 @@
|
||||
{{/*
|
||||
Expand the name of the chart.
|
||||
*/}}
|
||||
{{- define "fdb-operator.name" -}}
|
||||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create a default fully qualified app name.
|
||||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||
If release name contains chart name it will be used as a full name.
|
||||
*/}}
|
||||
{{- define "fdb-operator.fullname" -}}
|
||||
{{- if .Values.fullnameOverride -}}
|
||||
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
|
||||
{{- else -}}
|
||||
{{- $name := default .Chart.Name .Values.nameOverride -}}
|
||||
{{- if contains $name .Release.Name -}}
|
||||
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create chart name and version as used by the chart label.
|
||||
*/}}
|
||||
{{- define "fdb-operator.chart" -}}
|
||||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Common labels
|
||||
*/}}
|
||||
{{- define "fdb-operator.labels" -}}
|
||||
helm.sh/chart: {{ include "fdb-operator.chart" . }}
|
||||
{{ include "fdb-operator.selectorLabels" . }}
|
||||
app.kubernetes.io/version: {{ .Values.image.tag | trimPrefix "v" | quote }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Selector labels
|
||||
*/}}
|
||||
{{- define "fdb-operator.selectorLabels" -}}
|
||||
app.kubernetes.io/name: {{ include "fdb-operator.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Create the name of the service account
|
||||
*/}}
|
||||
{{- define "fdb-operator.serviceAccountName" -}}
|
||||
{{- if .Values.serviceAccount.create -}}
|
||||
{{ default (include "fdb-operator.fullname" .) .Values.serviceAccount.name }}
|
||||
{{- else -}}
|
||||
{{ default "default" .Values.serviceAccount.name }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,117 @@
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ include "fdb-operator.fullname" . }}
|
||||
labels:
|
||||
{{- include "fdb-operator.labels" . | nindent 4 }}
|
||||
{{- with .Values.annotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- with .Values.replicas }}
|
||||
replicas: {{ . }}
|
||||
{{- end }}
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "fdb-operator.selectorLabels" . | nindent 6 }}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
{{- include "fdb-operator.selectorLabels" . | nindent 8 }}
|
||||
{{- with .Values.podLabels }}
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.podAnnotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
serviceAccountName: {{ include "fdb-operator.serviceAccountName" . }}
|
||||
{{- with .Values.priorityClassName }}
|
||||
priorityClassName: {{ . }}
|
||||
{{- end }}
|
||||
securityContext:
|
||||
{{- toYaml .Values.securityContext | nindent 8 }}
|
||||
terminationGracePeriodSeconds: 10
|
||||
{{- with .Values.imagePullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
initContainers:
|
||||
{{- range $version, $params := .Values.initContainers }}
|
||||
- name: foundationdb-kubernetes-init-{{ $version | replace "." "-" }}
|
||||
image: {{ $params.image.repository }}:{{ $params.image.tag }}
|
||||
imagePullPolicy: {{ $params.image.pullPolicy }}
|
||||
args:
|
||||
- "--copy-library"
|
||||
- "{{ $version }}"
|
||||
- "--copy-binary"
|
||||
- "fdbcli"
|
||||
- "--copy-binary"
|
||||
- "fdbbackup"
|
||||
- "--copy-binary"
|
||||
- "fdbrestore"
|
||||
- "--output-dir"
|
||||
- "/var/output-files"
|
||||
- "--mode"
|
||||
- "init"
|
||||
volumeMounts:
|
||||
- name: fdb-binaries
|
||||
mountPath: /var/output-files
|
||||
resources:
|
||||
{{- toYaml $.Values.initContainersResources | nindent 10 }}
|
||||
securityContext:
|
||||
{{- toYaml $.Values.initContainerSecurityContext | nindent 10 }}
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: manager
|
||||
image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
command:
|
||||
- /manager
|
||||
{{- if not .Values.globalMode.enabled }}
|
||||
env:
|
||||
- name: WATCH_NAMESPACE
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.namespace
|
||||
{{- end }}
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
name: metrics
|
||||
volumeMounts:
|
||||
- name: tmp
|
||||
mountPath: /tmp
|
||||
- name: logs
|
||||
mountPath: /var/log/fdb
|
||||
- name: fdb-binaries
|
||||
mountPath: /usr/bin/fdb
|
||||
securityContext:
|
||||
{{- toYaml .Values.containerSecurityContext | nindent 10 }}
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /metrics
|
||||
port: metrics
|
||||
resources:
|
||||
{{- toYaml .Values.resources | nindent 10 }}
|
||||
{{- with .Values.affinity }}
|
||||
affinity:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.tolerations }}
|
||||
tolerations:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
volumes:
|
||||
- name: tmp
|
||||
emptyDir: {}
|
||||
- name: logs
|
||||
emptyDir: {}
|
||||
- name: fdb-binaries
|
||||
emptyDir: {}
|
||||
@@ -0,0 +1,131 @@
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
{{- if .Values.globalMode.enabled }}
|
||||
kind: ClusterRole
|
||||
{{- else }}
|
||||
kind: Role
|
||||
{{- end }}
|
||||
metadata:
|
||||
name: {{ include "fdb-operator.fullname" . }}
|
||||
labels:
|
||||
{{- include "fdb-operator.labels" . | nindent 4 }}
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- pods
|
||||
- configmaps
|
||||
- persistentvolumeclaims
|
||||
- events
|
||||
verbs:
|
||||
- get
|
||||
- watch
|
||||
- list
|
||||
- create
|
||||
- update
|
||||
- patch
|
||||
- delete
|
||||
- apiGroups:
|
||||
- apps.foundationdb.org
|
||||
resources:
|
||||
- foundationdbclusters
|
||||
- foundationdbbackups
|
||||
- foundationdbrestores
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- create
|
||||
- update
|
||||
- patch
|
||||
- delete
|
||||
- apiGroups:
|
||||
- apps.foundationdb.org
|
||||
resources:
|
||||
- foundationdbclusters/status
|
||||
- foundationdbbackups/status
|
||||
- foundationdbrestores/status
|
||||
verbs:
|
||||
- get
|
||||
- update
|
||||
- patch
|
||||
- apiGroups:
|
||||
- admissionregistration.k8s.io
|
||||
resources:
|
||||
- mutatingwebhookconfigurations
|
||||
- validatingwebhookconfigurations
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- create
|
||||
- update
|
||||
- patch
|
||||
- delete
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- secrets
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- create
|
||||
- update
|
||||
- patch
|
||||
- delete
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- services
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- create
|
||||
- update
|
||||
- patch
|
||||
- delete
|
||||
- apiGroups:
|
||||
- apps
|
||||
resources:
|
||||
- deployments
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- create
|
||||
- update
|
||||
- patch
|
||||
- delete
|
||||
- apiGroups:
|
||||
- coordination.k8s.io
|
||||
resources:
|
||||
- leases
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- create
|
||||
- update
|
||||
- patch
|
||||
- delete
|
||||
{{- if .Values.nodeReadClusterRole }}
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: {{ include "fdb-operator.fullname" . }}-clusterrole
|
||||
labels:
|
||||
{{- include "fdb-operator.labels" . | nindent 4 }}
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- nodes
|
||||
verbs:
|
||||
- get
|
||||
- watch
|
||||
- list
|
||||
{{- end }}
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
{{- if .Values.globalMode.enabled }}
|
||||
kind: ClusterRoleBinding
|
||||
{{- else }}
|
||||
kind: RoleBinding
|
||||
{{- end }}
|
||||
metadata:
|
||||
name: {{ include "fdb-operator.fullname" . }}
|
||||
labels:
|
||||
{{- include "fdb-operator.labels" . | nindent 4 }}
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
{{- if .Values.globalMode.enabled }}
|
||||
kind: ClusterRole
|
||||
{{- else }}
|
||||
kind: Role
|
||||
{{- end }}
|
||||
name: {{ include "fdb-operator.fullname" . }}
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ include "fdb-operator.serviceAccountName" . }}
|
||||
{{- if .Values.globalMode.enabled }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
{{- end }}
|
||||
{{- if .Values.nodeReadClusterRole }}
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: {{ include "fdb-operator.fullname" . }}-clusterrolebinding
|
||||
labels:
|
||||
{{- include "fdb-operator.labels" . | nindent 4 }}
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: {{ include "fdb-operator.fullname" . }}-clusterrole
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ include "fdb-operator.serviceAccountName" . }}
|
||||
{{- if .Values.globalMode.enabled }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,17 @@
|
||||
---
|
||||
{{- if .Values.serviceAccount.create }}
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: {{ include "fdb-operator.serviceAccountName" . }}
|
||||
labels:
|
||||
{{- include "fdb-operator.labels" . | nindent 4 }}
|
||||
{{- with .Values.serviceAccount.annotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- with .Values.serviceAccount.imagePullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- toYaml . | nindent 2 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,70 @@
|
||||
---
|
||||
image:
|
||||
repository: foundationdb/fdb-kubernetes-operator
|
||||
tag: v2.13.0
|
||||
pullPolicy: IfNotPresent
|
||||
initContainers:
|
||||
7.1:
|
||||
image:
|
||||
repository: foundationdb/fdb-kubernetes-monitor
|
||||
tag: 7.1.67
|
||||
pullPolicy: IfNotPresent
|
||||
7.3:
|
||||
image:
|
||||
repository: foundationdb/fdb-kubernetes-monitor
|
||||
tag: 7.3.63
|
||||
pullPolicy: IfNotPresent
|
||||
7.4:
|
||||
image:
|
||||
repository: foundationdb/fdb-kubernetes-monitor
|
||||
tag: 7.4.1
|
||||
pullPolicy: IfNotPresent
|
||||
globalMode:
|
||||
enabled: false
|
||||
replicas: null
|
||||
imagePullSecrets: []
|
||||
annotations: {}
|
||||
podAnnotations: {}
|
||||
podLabels: {}
|
||||
serviceAccount:
|
||||
create: true
|
||||
name: null
|
||||
imagePullSecrets: []
|
||||
annotations: {}
|
||||
priorityClassName: null
|
||||
securityContext:
|
||||
runAsUser: 4059
|
||||
runAsGroup: 4059
|
||||
fsGroup: 4059
|
||||
containerSecurityContext:
|
||||
allowPrivilegeEscalation: false
|
||||
privileged: false
|
||||
capabilities:
|
||||
drop:
|
||||
- all
|
||||
readOnlyRootFilesystem: true
|
||||
nodeSelector: {}
|
||||
affinity: {}
|
||||
tolerations: {}
|
||||
resources:
|
||||
limits:
|
||||
cpu: 500m
|
||||
memory: 256Mi
|
||||
requests:
|
||||
cpu: 500m
|
||||
memory: 256Mi
|
||||
initContainersResources:
|
||||
limits:
|
||||
cpu: 10m
|
||||
memory: 50Mi
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 50Mi
|
||||
initContainerSecurityContext:
|
||||
allowPrivilegeEscalation: false
|
||||
privileged: false
|
||||
capabilities:
|
||||
drop:
|
||||
- all
|
||||
readOnlyRootFilesystem: true
|
||||
nodeReadClusterRole: true
|
||||
4
packages/system/foundationdb-operator/values.yaml
Normal file
4
packages/system/foundationdb-operator/values.yaml
Normal file
@@ -0,0 +1,4 @@
|
||||
fdb-operator:
|
||||
globalMode:
|
||||
enabled: true
|
||||
nodeReadClusterRole: true
|
||||
Reference in New Issue
Block a user