Compare commits

...

43 Commits

Author SHA1 Message Date
Andrei Kvapil
9ac7938a74 fix watching stoageclasses by etcd-operator
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2024-09-24 20:59:00 +02:00
Andrei Kvapil
cd0be9132a Enable ingress access from within cluster (#352)
Currently ingress have rule to allow access from outside cluster, but
have no rule to access from within cluster.
This PR introduces fix for allow ingress access from any namespace by
default.

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

## Summary by CodeRabbit

- **New Features**
- Introduced a new network policy for managing ingress traffic,
enhancing security and traffic management capabilities.
- The policy is dynamically configured based on the tenant's settings,
allowing for tailored network access.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2024-09-23 12:07:36 +02:00
Andrei Kvapil
0f312d5cd0 Prepare release v0.15.0 (#349)
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>

Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2024-09-16 18:24:07 +02:00
Andrei Kvapil
e3ccfa3d6d Update kafka-operator and disable network policy generation (#348)
- Upgrade strimzi-operator v0.43.0
- Disable network policies generation (we use our own)

Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2024-09-16 17:49:35 +02:00
Andrei Kvapil
0d3b8fc6ff Fix FerretDB backups
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2024-09-15 06:52:21 +02:00
Andrei Kvapil
2a4768a52f Update infromation about backups
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2024-09-15 06:52:21 +02:00
Andrei Kvapil
320fc32f7b Fix HTTP-cache image tag
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2024-09-15 06:52:21 +02:00
Andrei Kvapil
fab5940b12 Fix backups for MariaDB and Postgres
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2024-09-15 06:52:21 +02:00
Andrei Kvapil
4b84798f00 Add backups for ClickHouse
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2024-09-15 06:52:21 +02:00
klinch0
b3ee563e23 bugfix/strimzi-kafka-operator-fix-cluster-dns (#347)
kafka zookeeper error after installation:
```
2024-09-15 02:44:33,289 ERROR Failed to verify hostname: kafka-service-zookeeper-2.kafka-service-zookeeper-nodes.tenant-stage.svc.cozy.local (org.apache.zookeeper.common.ZKTrustManager) [ListenerHandler-/0.0.0.0:3888]
javax.net.ssl.SSLPeerUnverifiedException: Certificate for <kafka-service-zookeeper-2.kafka-service-zookeeper-nodes.tenant-stage.svc.cozy.local> doesn't match any of the subject alternative names: [kafka-service-zookeeper-client, *.kafka-service-zookeeper-nodes.tenant-stage.svc.cluster.local, *.kafka-service-zookeeper-nodes.tenant-stage.svc, kafka-service-zookeeper-2.kafka-service-zookeeper-nodes.tenant-stage.svc, kafka-service-zookeeper-client.tenant-stage.svc.cluster.local, kafka-service-zookeeper-client.tenant-stage.svc, kafka-service-zookeeper-2, kafka-service-zookeeper-2.kafka-service-zookeeper-nodes.tenant-stage.svc.cluster.local, *.kafka-service-zookeeper-client.tenant-stage.svc, kafka-service-zookeeper-client.tenant-stage, *.kafka-service-zookeeper-client.tenant-stage.svc.cluster.local]
```
certs sans by default:
```
klin@asus:~/cozy$ openssl x509 -in zookeeper.crt -text -noout | grep -A1 "Subject Alternative Name"
            X509v3 Subject Alternative Name:
                DNS:kafka-service-zookeeper-0.kafka-service-zookeeper-nodes.tenant-stage.svc.cluster.local, DNS:*.kafka-service-zookeeper-nodes.tenant-stage.svc.cluster.local, DNS:kafka-service-zookeeper-client, DNS:kafka-service-zookeeper-0, DNS:kafka-service-zookeeper-client.tenant-stage.svc.cluster.local, DNS:kafka-service-zookeeper-client.tenant-stage.svc, DNS:kafka-service-zookeeper-client.tenant-stage, DNS:*.kafka-service-zookeeper-nodes.tenant-stage.svc, DNS:*.kafka-service-zookeeper-client.tenant-stage.svc, DNS:kafka-service-zookeeper-0.kafka-service-zookeeper-nodes.tenant-stage.svc, DNS:*.kafka-service-zookeeper-client.tenant-stage.svc.cluster.local
```

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

## Summary by CodeRabbit

- **New Features**
- Introduced a new configuration option for specifying a custom DNS
domain for Kubernetes services within the Kafka operator, enhancing
service discovery and networking capabilities.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-09-15 06:15:43 +02:00
Marian Koreniuk
06e79cd4dd Merge pull request #255 from aenix-io/opencost
Add opencost
2024-09-13 00:38:55 +03:00
Marian Koreniuk
14a8a34ee2 Merge pull request #341 from aenix-io/talos-metal
Talos Linux: Update firmwares and add metal image
2024-09-10 22:47:13 +02:00
Andrei Kvapil
240a82f388 fix Kamaji OOM (#340)
Sometimes Kamaji can be killed due to defult limits let's expand them a
little

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

## Summary by CodeRabbit

- **New Features**
- Introduced resource management configurations for the `kamaji`
service, enhancing control over CPU and memory allocation.
- Added specifications for resource limits and requests to improve
stability and performance in a Kubernetes environment.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2024-09-10 22:43:59 +02:00
Andrei Kvapil
a55630db5d Talos Linux: Update firmwares and add metal image
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2024-09-10 21:06:37 +02:00
Andrei Kvapil
1128d0cb9a Prepare release v0.14.1 (#338)
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>

Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2024-09-06 14:51:52 +02:00
Andrei Kvapil
b537cc0660 fix cilium kubeProxyReplacement (#336)
This PR fixes regression introduced by
https://github.com/aenix-io/cozystack/pull/322

Tenant clusters have `kubeProxyReplacement` disabled, must be enabled
2024-09-06 14:50:36 +02:00
Andrei Kvapil
59a4e0828d RabbitMQ: fix accessing Kubernetes API when netwrok-policies are enabled (#337)
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>

Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2024-09-06 14:50:19 +02:00
George Gaál
1f83838012 fix: better gitignore (#334)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Chores**
- Expanded the `.gitignore` file to include additional user-specific and
generated files, improving version control management.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Signed-off-by: George Gaál <gb12335@gmail.com>
2024-09-05 23:40:07 +02:00
Andrei Kvapil
b40e1b09cb Prepare release v0.14.0 (#333)
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>


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

## Summary by CodeRabbit

- **New Features**
- Upgraded various container images to version `v0.14.0`, enhancing
application performance and potentially introducing new features and bug
fixes.
  
- **Bug Fixes**
- Improved version tracking for packages by updating commit hashes,
enhancing clarity and traceability.

- **Chores**
- Updated configuration files to reflect the new image versions for
components, ensuring the latest updates are utilized across the
application.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2024-09-04 16:23:21 +02:00
Andrei Kvapil
93018c4035 Add passwords generation to ClickHouse (#332)
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>


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

## Summary by CodeRabbit

- **New Features**
- Updated Clickhouse application to version 0.4.0, indicating new
enhancements.
- Improved user credential management by dynamically generating
passwords or using provided ones, enhancing security.
- Introduced a new Kubernetes Role for managing access to services and
secrets, ensuring better control over resource interactions.

- **Bug Fixes**
- Corrected the reference for accessing the storage class value to
ensure proper retrieval.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2024-09-04 15:20:38 +02:00
Andrei Kvapil
b00621ee2a Add passwords generation to postgres (#330)
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>

Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2024-09-04 15:15:24 +02:00
Andrei Kvapil
02a623b17d Update CNPG 1.24.0 (#331) 2024-09-04 15:15:05 +02:00
Andrei Kvapil
def2eb0f42 Add passwords generation to FerretDB (#329)
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>


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

## Summary by CodeRabbit

- **New Features**
- Updated application version from 0.3.0 to 0.4.0, indicating a new
release.
- Introduced a new Kubernetes Role for managing access to
dashboard-related resources, enhancing security.
- Improved user credential management with dynamic password generation
in the initialization script, enhancing security practices.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2024-09-04 15:14:50 +02:00
Andrei Kvapil
aa2f553281 Update mariadb-operator and mysql chart (#328)
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>


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

## Summary by CodeRabbit

- **New Features**
- Enhanced database user management with role definitions for `admin`
and `readonly` users.
- Introduced support for additional environment variables in the MariaDB
operator deployment.
	- Added new RBAC roles for viewing and editing MariaDB resources.

- **Changes**
- Updated configuration structure for database and user management,
shifting from arrays to objects.
- Improved webhook certificate management with revision history control.
	- Updated image repository for the MariaDB operator.

- **Bug Fixes**
- Adjusted permissions in RBAC configuration for better security and
resource management.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2024-09-04 15:14:31 +02:00
Andrei Kvapil
36d88553ce Update RabbitMQ and add configuration for Users and VHosts (#327)
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>


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


- **New Features**
- Updated RabbitMQ chart version to 0.4.0 and application version to
3.13.2.
- Added new configuration options for users and virtual hosts in the
application.
- Introduced a new Kubernetes Role for managing access to secrets and
services.
- Enhanced RabbitMQ configuration for automated user and permission
management.

- **Documentation**
- Improved README with a section on configuration parameters for better
user guidance.

- **Chores**
- Added a new YAML configuration file for comprehensive RabbitMQ cluster
management.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2024-09-04 10:50:54 +02:00
Mr Khachaturov
9e33dc0651 Update seaweedfs.yaml (#325)
Changed tls host to be the same as ingress host

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

## Summary by CodeRabbit

- **New Features**
- Updated the default host value in the SeaweedFS configuration to
support S3-compatible endpoints.
- **Bug Fixes**
- Corrected the hostname configuration to reflect the new service access
method.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-09-02 09:04:07 +02:00
Andrei Kvapil
b8e33d194d Prepare release v0.13.0 (#321)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Enhanced monitoring capabilities for Kubernetes deployments, including
checks for `vmalert`, `vlogs`, and `vmcluster`.

- **Updates**
- Updated container images for `cozystack` and `darkhttpd` to version
`v0.13.0`.
- Version mapping updates for `ferretdb`, `kubernetes`, and
`virtual-machine` packages.
- Updated image tags and digests for Kubeapps components to version
`v0.13.0`.
	- Updated image tag for Kamaji to version `v0.13.0`.
	- Added new pod metadata labels to the `vmalertmanager` configuration.

- **Bug Fixes**
- Improved operational status checks for Kubernetes resources using
JSONPath expressions.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2024-08-31 09:04:40 +02:00
Andrei Kvapil
c79399abb7 cilium node port (#323)
- Prepare release v0.13.0
- Cilium: enable nodePort

Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2024-08-30 18:01:00 +02:00
Andrei Kvapil
005821476c Introduce valuesFiles for various Cilium configurations (#322)
This PR introduces different values files for `cozy-cilium` chart, and
`valuesFiles` for fluxcd.

This might be useful in cases where same chart reused for multiple
configurations

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

## Summary by CodeRabbit

- **New Features**
- Introduced multiple values files for enhanced configuration management
in Cilium deployments.
- Added new YAML configurations for Cilium, allowing for tailored
networking settings in Kubernetes.

- **Bug Fixes**
- Removed deprecated configuration parameters to simplify deployment and
management of Cilium.

- **Documentation**
- Updated Helm templates to support conditional inclusion of values
files, improving flexibility in chart rendering.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2024-08-30 17:27:06 +02:00
Andrei Kvapil
53fae0d3f4 cilium: enable SCTP feature (#320)
This PR enables SCTP support in Cilium.

It is required to use with kube-ovn configuration as it is fixes
`externalTrafficPolicy: Local` issues:

- https://github.com/kubeovn/kube-ovn/issues/4457
2024-08-30 13:52:58 +02:00
Andrei Kvapil
4746d51785 VM: add Talos Linux (#319) 2024-08-30 13:30:39 +02:00
Andrei Kvapil
b7bfc4c4a9 VM: fix Alpine Image (#318)
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2024-08-30 13:28:59 +02:00
Andrei Kvapil
0e7dc14d79 KubeVirt: enable expand disks feature (#317)
- cdi: add ExpandDisks feature
- kubevirt: add ExpandDisks feature
2024-08-30 13:16:15 +02:00
Andrei Kvapil
55282acdba vm: use block volumes to enable live-migration (#316)
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2024-08-30 13:14:46 +02:00
Andrei Kvapil
5efef2eec5 use bridge binding for Kubernetes VMs (#315)
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>


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

## Summary by CodeRabbit

- **New Features**
	- Updated version of the Kubernetes application to 0.10.0.
- Enhanced network configuration for improved pod performance, including
support for live migration.
- Introduced a new network section for better integration with
Kubernetes networking features.

- **Bug Fixes**
- Improved network interface management for better flexibility and
control.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2024-08-30 13:14:33 +02:00
Andrei Kvapil
9b6dd19dc8 Update KubeVirt v1.3.1 (#314) 2024-08-30 12:09:40 +02:00
Andrei Kvapil
dc69adc9e2 Revert "Update KubeVirt v1.3.1" (#313)
Reverts aenix-io/cozystack#311
2024-08-30 12:07:40 +02:00
Andrei Kvapil
9ae098c5e3 Update CDI v1.60.2 (#312) 2024-08-30 12:02:52 +02:00
Andrei Kvapil
697bbd59eb Update KubeVirt v1.3.1 (#311)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Updated version identifiers for the `ferretdb`, `virtual-machine`,
`monitoring`, and `seaweedfs` packages to enhance clarity and
traceability.
	- Added new version entry for `monitoring` version `1.4.0`.

- **Improvements**
- Upgraded the `cozystack` component to a newer image version
(`v0.13.0`), potentially including bug fixes and performance
enhancements.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-08-30 12:02:41 +02:00
Artem Rootman
428284354c Rework VirtualMachine, introduce cloudinit and sshKeys configuration, fix externalPorts (#303)
Add `externalPorts`, `sshKeys` and `cloudInit` options with examples.
Remove `service`, `sshPwauth`, `disableRoot`, `password`, `chpasswdExpire` options

---------

Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
Co-authored-by: Andrei Kvapil <kvapss@gmail.com>
2024-08-30 11:51:04 +02:00
Andrei Kvapil
b908400d59 fix: typo in storageClass (#310) 2024-08-30 09:42:01 +02:00
Andrei Kvapil
cd991bd2dc fix e2e tests (specify namespace) (#309)
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>

Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2024-08-29 17:36:19 +02:00
Andrei Kvapil
e8eb5fd397 Add opencost
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2024-08-05 15:35:56 +02:00
190 changed files with 34486 additions and 28081 deletions

BIN
.DS_Store vendored

Binary file not shown.

77
.gitignore vendored
View File

@@ -1,3 +1,78 @@
_out
.git
.idea
.idea
# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf
# AWS User-specific
.idea/**/aws.xml
# Generated files
.idea/**/contentModel.xml
# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml
# Gradle
.idea/**/gradle.xml
.idea/**/libraries
# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/artifacts
# .idea/compiler.xml
# .idea/jarRepositories.xml
# .idea/modules.xml
# .idea/*.iml
# .idea/modules
# *.iml
# *.ipr
# CMake
cmake-build-*/
# Mongo Explorer plugin
.idea/**/mongoSettings.xml
# File-based project format
*.iws
# IntelliJ
out/
# mpeltonen/sbt-idea plugin
.idea_modules/
# JIRA plugin
atlassian-ide-plugin.xml
# Cursive Clojure plugin
.idea/replstate.xml
# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties
# Editor-based Rest Client
.idea/httpRequests
# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser
.DS_Store
**/.DS_Store

View File

@@ -2,6 +2,9 @@
build:
make -C packages/apps/http-cache image
make -C packages/apps/postgres image
make -C packages/apps/mysql image
make -C packages/apps/clickhouse image
make -C packages/apps/kubernetes image
make -C packages/system/cilium image
make -C packages/system/kubeovn image

View File

@@ -309,8 +309,9 @@ kubectl wait --timeout=5m --for=condition=available -n tenant-root deploy root-i
kubectl wait --timeout=5m --for=jsonpath=.status.readyReplicas=3 -n tenant-root sts etcd
# Wait for Victoria metrics
kubectl wait --timeout=5m --for=condition=available deploy -n tenant-root vmalert-vmalert-longterm vmalert-vmalert-shortterm vminsert-longterm vminsert-shortterm
kubectl wait --timeout=5m --for=jsonpath=.status.readyReplicas=2 -n tenant-root sts vmalertmanager-alertmanager vmselect-longterm vmselect-shortterm vmstorage-longterm vmstorage-shortterm
kubectl wait --timeout=5m --for=jsonpath=.status.updateStatus=operational -n tenant-root vmalert/vmalert-longterm vmalert/vmalert-shortterm vmalertmanager/alertmanager
kubectl wait --timeout=5m --for=jsonpath=.status.status=operational -n tenant-root vlogs/generic
kubectl wait --timeout=5m --for=jsonpath=.status.clusterStatus=operational -n tenant-root vmcluster/shortterm vmcluster/longterm
# Wait for grafana
kubectl wait --timeout=5m --for=condition=ready -n tenant-root clusters.postgresql.cnpg.io grafana-db

View File

@@ -24,24 +24,36 @@ resolved_miss_map=$(
change_commit=$(git --no-pager blame -L"$line",+1 -- "$chart/Chart.yaml" | awk '{print $1}')
if [ "$change_commit" = "00000000" ]; then
# Not commited yet, use previus commit
# Not committed yet, use previous commit
line=$(git show HEAD:"./$chart/Chart.yaml" | awk '/^version:/ {print NR; exit}')
commit=$(git --no-pager blame -L"$line",+1 HEAD -- "$chart/Chart.yaml" | awk '{print $1}')
if [ $(echo $commit | cut -c1) = "^" ]; then
# Previus commit not exists
# Previous commit not exists
commit=$(echo $commit | cut -c2-)
fi
else
# Commited, but version_map wasn't updated
# Committed, but version_map wasn't updated
line=$(git show HEAD:"./$chart/Chart.yaml" | awk '/^version:/ {print NR; exit}')
change_commit=$(git --no-pager blame -L"$line",+1 HEAD -- "$chart/Chart.yaml" | awk '{print $1}')
if [ $(echo $change_commit | cut -c1) = "^" ]; then
# Previus commit not exists
# Previous commit not exists
commit=$(echo $change_commit | cut -c2-)
else
commit=$(git describe --always "$change_commit~1")
fi
fi
# Check if the commit belongs to the main branch
if ! git merge-base --is-ancestor "$commit" main; then
# Find the closest parent commit that belongs to main
commit_in_main=$(git log --pretty=format:"%h" main -- "$chart" | head -n 1)
if [ -n "$commit_in_main" ]; then
commit="$commit_in_main"
else
# No valid commit found in main branch for $chart, skipping..."
continue
fi
fi
fi
echo "$chart $version $commit"
done

View File

@@ -68,7 +68,7 @@ spec:
serviceAccountName: cozystack
containers:
- name: cozystack
image: "ghcr.io/aenix-io/cozystack/cozystack:v0.12.0"
image: "ghcr.io/aenix-io/cozystack/cozystack:v0.15.0"
env:
- name: KUBERNETES_SERVICE_HOST
value: localhost
@@ -87,7 +87,7 @@ spec:
fieldRef:
fieldPath: metadata.name
- name: darkhttpd
image: "ghcr.io/aenix-io/cozystack/cozystack:v0.12.0"
image: "ghcr.io/aenix-io/cozystack/cozystack:v0.15.0"
command:
- /usr/bin/darkhttpd
- /cozystack/assets

View File

@@ -16,7 +16,7 @@ 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.3.0
version: 0.5.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

View File

@@ -1,4 +1,20 @@
CLICKHOUSE_BACKUP_TAG = $(shell awk '$$1 == "version:" {print $$2}' Chart.yaml)
include ../../../scripts/common-envs.mk
include ../../../scripts/package.mk
generate:
readme-generator -v values.yaml -s values.schema.json -r README.md
image:
docker buildx build --platform linux/amd64 --build-arg ARCH=amd64 images/clickhouse-backup \
--provenance false \
--tag $(REGISTRY)/clickhouse-backup:$(call settag,$(CLICKHOUSE_BACKUP_TAG)) \
--cache-from type=registry,ref=$(REGISTRY)/clickhouse-backup:latest \
--cache-to type=inline \
--metadata-file images/clickhouse-backup.json \
--push=$(PUSH) \
--load=$(LOAD)
echo "$(REGISTRY)/clickhouse-backup:$(call settag,$(CLICKHOUSE_BACKUP_TAG))@$$(yq e '."containerimage.digest"' images/clickhouse-backup.json -o json -r)" \
> images/clickhouse-backup.tag
rm -f images/clickhouse-backup.json

View File

@@ -1,5 +1,20 @@
# Managed Clickhouse Service
### How to restore backup:
find snapshot:
```
restic -r s3:s3.example.org/clickhouse-backups/table_name snapshots
```
restore:
```
restic -r s3:s3.example.org/clickhouse-backups/table_name restore latest --target /tmp/
```
more details:
- https://itnext.io/restic-effective-backup-from-stdin-4bc1e8f083c1
## Parameters
### Common parameters
@@ -16,3 +31,16 @@
| Name | Description | Value |
| ------- | ------------------- | ----- |
| `users` | Users configuration | `{}` |
### Backup parameters
| Name | Description | Value |
| ------------------------ | ---------------------------------------------- | ------------------------------------------------------ |
| `backup.enabled` | Enable pereiodic backups | `false` |
| `backup.s3Region` | The AWS S3 region where backups are stored | `us-east-1` |
| `backup.s3Bucket` | The S3 bucket used for storing backups | `s3.example.org/clickhouse-backups` |
| `backup.schedule` | Cron schedule for automated backups | `0 2 * * *` |
| `backup.cleanupStrategy` | The strategy for cleaning up old backups | `--keep-last=3 --keep-daily=3 --keep-within-weekly=1m` |
| `backup.s3AccessKey` | The access key for S3, used for authentication | `oobaiRus9pah8PhohL1ThaeTa4UVa7gu` |
| `backup.s3SecretKey` | The secret key for S3, used for authentication | `ju3eum4dekeich9ahM1te8waeGai0oog` |
| `backup.resticPassword` | The password for Restic backup encryption | `ChaXoveekoh6eigh4siesheeda2quai0` |

View File

@@ -0,0 +1 @@
ghcr.io/aenix-io/cozystack/clickhouse-backup:0.5.0@sha256:dda84420cb8648721299221268a00d72a05c7af5b7fb452619bac727068b9e61

View File

@@ -0,0 +1,2 @@
FROM clickhouse/clickhouse-server:24.8.4-alpine
RUN apk add --no-cache restic uuidgen

View File

@@ -0,0 +1,95 @@
{{- if .Values.backup.enabled }}
{{ $image := .Files.Get "images/backup.json" | fromJson }}
apiVersion: batch/v1
kind: CronJob
metadata:
name: {{ .Release.Name }}-backup
spec:
schedule: "{{ .Values.backup.schedule }}"
concurrencyPolicy: Forbid
successfulJobsHistoryLimit: 3
failedJobsHistoryLimit: 3
jobTemplate:
spec:
backoffLimit: 2
template:
spec:
restartPolicy: OnFailure
template:
metadata:
annotations:
checksum/config: {{ include (print $.Template.BasePath "/backup-script.yaml") . | sha256sum }}
checksum/secret: {{ include (print $.Template.BasePath "/backup-secret.yaml") . | sha256sum }}
spec:
imagePullSecrets:
- name: {{ .Release.Name }}-regsecret
restartPolicy: Never
containers:
- name: clickhouse-backup
image: "{{ $.Files.Get "images/clickhouse-backup.tag" | trim }}"
command:
- /bin/sh
- -x
- /scripts/backup.sh
env:
- name: REPO_PREFIX
value: {{ required "s3Bucket is not specified!" .Values.backup.s3Bucket | quote }}
- name: CLEANUP_STRATEGY
value: {{ required "cleanupPolicy is not specified!" .Values.backup.cleanupStrategy | quote }}
- name: CLICKHOUSE_USER
value: backup
- name: CLICKHOUSE_HOST
value: chi-{{ .Release.Name }}-clickhouse-0-0
- name: CLICKHOUSE_PASSWORD
valueFrom:
secretKeyRef:
name: {{ .Release.Name }}-credentials
key: backup
- name: AWS_ACCESS_KEY_ID
valueFrom:
secretKeyRef:
name: {{ .Release.Name }}-backup
key: s3AccessKey
- name: AWS_SECRET_ACCESS_KEY
valueFrom:
secretKeyRef:
name: {{ .Release.Name }}-backup
key: s3SecretKey
- name: AWS_DEFAULT_REGION
value: {{ .Values.backup.s3Region }}
- name: RESTIC_PASSWORD
valueFrom:
secretKeyRef:
name: {{ .Release.Name }}-backup
key: resticPassword
volumeMounts:
- mountPath: /scripts
name: scripts
- mountPath: /tmp
name: tmp
- mountPath: /.cache
name: cache
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
privileged: false
readOnlyRootFilesystem: true
runAsNonRoot: true
volumes:
- name: scripts
secret:
secretName: {{ .Release.Name }}-backup-script
- name: tmp
emptyDir: {}
- name: cache
emptyDir: {}
securityContext:
runAsNonRoot: true
runAsUser: 9000
runAsGroup: 9000
seccompProfile:
type: RuntimeDefault
{{- end }}

View File

@@ -0,0 +1,55 @@
{{- if .Values.backup.enabled }}
---
apiVersion: v1
kind: Secret
metadata:
name: {{ .Release.Name }}-backup-script
stringData:
backup.sh: |
#!/bin/sh
set -e
set -o pipefail
JOB_ID="job-$(uuidgen|cut -f1 -d-)"
TABLE_LIST=$(clickhouse-client --host "$CLICKHOUSE_HOST" -q 'SHOW TABLES;' | grep -v '^.inner.' || true)
echo DB_LIST=$(echo "$TABLE_LIST" | shuf) # shuffle list
echo "Job ID: $JOB_ID"
echo "Target repo: $REPO_PREFIX"
echo "Cleanup strategy: $CLEANUP_STRATEGY"
echo "Start backup for:"
echo "$TABLE_LIST"
echo
echo "Backup started at `date +%Y-%m-%d\ %H:%M:%S`"
for table in $TABLE_LIST; do
(
set -x
restic -r "s3:${REPO_PREFIX}/$table" cat config >/dev/null 2>&1 || \
restic -r "s3:${REPO_PREFIX}/$table" init --repository-version 2
restic -r "s3:${REPO_PREFIX}/$table" unlock --remove-all >/dev/null 2>&1 || true # no locks, k8s takes care of it
clickhouse-client --host "$CLICKHOUSE_HOST" -q "SHOW CREATE TABLE ${table}" | awk '{gsub(/\\n/, "\n")} {gsub(/\\'\''/, "'\''")} 1' | \
restic -r "s3:${REPO_PREFIX}/$table" backup --tag "$JOB_ID" --tag index --stdin --stdin-filename index.sql
clickhouse-client --host "$CLICKHOUSE_HOST" -q "SELECT * FROM ${table} FORMAT TabSeparated" | \
restic -r "s3:${REPO_PREFIX}/$table" backup --tag "$JOB_ID" --tag data --stdin --stdin-filename data.tsv
restic -r "s3:${REPO_PREFIX}/$table" tag --tag "$JOB_ID" --set "completed"
)
done
echo "Backup finished at `date +%Y-%m-%d\ %H:%M:%S`"
echo
echo "Run cleanup:"
echo
echo "Cleanup started at `date +%Y-%m-%d\ %H:%M:%S`"
for db in $DB_LIST; do
(
set -x
# keep completed snapshots only
restic forget -r "s3:${REPO_PREFIX}/$db" --group-by=tags --keep-tag "completed" --tag index
restic forget -r "s3:${REPO_PREFIX}/$db" --group-by=tags --keep-tag "completed" --tag data
restic forget -r "s3:${REPO_PREFIX}/$db" --group-by=tags $CLEANUP_STRATEGY --tag index
restic forget -r "s3:${REPO_PREFIX}/$db" --group-by=tags $CLEANUP_STRATEGY --tag data
restic prune -r "s3:${REPO_PREFIX}/$db"
)
done
echo "Cleanup finished at `date +%Y-%m-%d\ %H:%M:%S`"
{{- end }}

View File

@@ -0,0 +1,11 @@
{{- if .Values.backup.enabled }}
---
apiVersion: v1
kind: Secret
metadata:
name: {{ .Release.Name }}-backup
stringData:
s3AccessKey: {{ required "s3AccessKey is not specified!" .Values.backup.s3AccessKey }}
s3SecretKey: {{ required "s3SecretKey is not specified!" .Values.backup.s3SecretKey }}
resticPassword: {{ required "resticPassword is not specified!" .Values.backup.resticPassword }}
{{- end }}

View File

@@ -1,3 +1,32 @@
{{- $existingSecret := lookup "v1" "Secret" .Release.Namespace (printf "%s-credentials" .Release.Name) }}
{{- $passwords := dict }}
{{- $users := .Values.users }}
{{- $_ := set $users "backup" dict }}
{{- with (index $existingSecret "data") }}
{{- range $k, $v := . }}
{{- $_ := set $passwords $k (b64dec $v) }}
{{- end }}
{{- end }}
{{- range $user, $u := $users }}
{{- if $u.password }}
{{- $_ := set $passwords $user $u.password }}
{{- else if not (index $passwords $user) }}
{{- $_ := set $passwords $user (randAlphaNum 16) }}
{{- end }}
{{- end }}
apiVersion: v1
kind: Secret
metadata:
name: {{ .Release.Name }}-credentials
stringData:
{{- range $user, $u := .Values.users }}
{{ quote $user }}: {{ quote (index $passwords $user) }}
{{- end }}
---
apiVersion: "clickhouse.altinity.com/v1"
kind: "ClickHouseInstallation"
metadata:
@@ -9,10 +38,10 @@ spec:
dataVolumeClaimTemplate: data-volume-template
{{- end }}
configuration:
{{- with .Values.users }}
{{- with $users }}
users:
{{- range $name, $u := . }}
{{ $name }}/password_sha256_hex: {{ sha256sum $u.password }}
{{ $name }}/password_sha256_hex: {{ sha256sum (index $passwords $name) }}
{{ $name }}/profile: {{ ternary "readonly" "default" (index $u "readonly" | default false) }}
{{ $name }}/networks/ip: ["::/0"]
{{- end }}
@@ -31,7 +60,7 @@ spec:
spec:
accessModes:
- ReadWriteOnce
{{- with .Values.stroageClass }}
{{- with $.Values.storageClass }}
storageClassName: {{ . }}
{{- end }}
resources:

View File

@@ -0,0 +1,19 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: {{ .Release.Name }}-dashboard-resources
rules:
- apiGroups:
- ""
resources:
- services
resourceNames:
- chi-clickhouse-test-clickhouse-0-0
verbs: ["get", "list", "watch"]
- apiGroups:
- ""
resources:
- secrets
resourceNames:
- {{ .Release.Name }}-credentials
verbs: ["get", "list", "watch"]

View File

@@ -21,6 +21,51 @@
"type": "string",
"description": "StorageClass used to store the data",
"default": ""
},
"backup": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean",
"description": "Enable pereiodic backups",
"default": false
},
"s3Region": {
"type": "string",
"description": "The AWS S3 region where backups are stored",
"default": "us-east-1"
},
"s3Bucket": {
"type": "string",
"description": "The S3 bucket used for storing backups",
"default": "s3.example.org/clickhouse-backups"
},
"schedule": {
"type": "string",
"description": "Cron schedule for automated backups",
"default": "0 2 * * *"
},
"cleanupStrategy": {
"type": "string",
"description": "The strategy for cleaning up old backups",
"default": "--keep-last=3 --keep-daily=3 --keep-within-weekly=1m"
},
"s3AccessKey": {
"type": "string",
"description": "The access key for S3, used for authentication",
"default": "oobaiRus9pah8PhohL1ThaeTa4UVa7gu"
},
"s3SecretKey": {
"type": "string",
"description": "The secret key for S3, used for authentication",
"default": "ju3eum4dekeich9ahM1te8waeGai0oog"
},
"resticPassword": {
"type": "string",
"description": "The password for Restic backup encryption",
"default": "ChaXoveekoh6eigh4siesheeda2quai0"
}
}
}
}
}

View File

@@ -22,3 +22,23 @@ storageClass: ""
## password: hackme
##
users: {}
## @section Backup parameters
## @param backup.enabled Enable pereiodic backups
## @param backup.s3Region The AWS S3 region where backups are stored
## @param backup.s3Bucket The S3 bucket used for storing backups
## @param backup.schedule Cron schedule for automated backups
## @param backup.cleanupStrategy The strategy for cleaning up old backups
## @param backup.s3AccessKey The access key for S3, used for authentication
## @param backup.s3SecretKey The secret key for S3, used for authentication
## @param backup.resticPassword The password for Restic backup encryption
backup:
enabled: false
s3Region: us-east-1
s3Bucket: s3.example.org/clickhouse-backups
schedule: "0 2 * * *"
cleanupStrategy: "--keep-last=3 --keep-daily=3 --keep-within-weekly=1m"
s3AccessKey: oobaiRus9pah8PhohL1ThaeTa4UVa7gu
s3SecretKey: ju3eum4dekeich9ahM1te8waeGai0oog
resticPassword: ChaXoveekoh6eigh4siesheeda2quai0

View File

@@ -16,7 +16,7 @@ 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.3.0
version: 0.4.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

View File

@@ -0,0 +1 @@
ghcr.io/aenix-io/cozystack/postgres-backup:0.6.2@sha256:d2015c6dba92293bda652d055e97d1be80e8414c2dc78037c12812d1a2e2cba1

View File

@@ -24,8 +24,8 @@ spec:
spec:
restartPolicy: Never
containers:
- name: mysqldump
image: "{{ index $image "image.name" }}@{{ index $image "containerimage.digest" }}"
- name: pgdump
image: "{{ $.Files.Get "images/postgres-backup.tag" | trim }}"
command:
- /bin/sh
- /scripts/backup.sh

View File

@@ -0,0 +1,19 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: {{ .Release.Name }}-dashboard-resources
rules:
- apiGroups:
- ""
resources:
- services
resourceNames:
- {{ .Release.Name }}
verbs: ["get", "list", "watch"]
- apiGroups:
- ""
resources:
- secrets
resourceNames:
- {{ .Release.Name }}-credentials
verbs: ["get", "list", "watch"]

View File

@@ -1,3 +1,30 @@
{{- $existingSecret := lookup "v1" "Secret" .Release.Namespace (printf "%s-credentials" .Release.Name) }}
{{- $passwords := dict }}
{{- with (index $existingSecret "data") }}
{{- range $k, $v := . }}
{{- $_ := set $passwords $k (b64dec $v) }}
{{- end }}
{{- end }}
{{- range $user, $u := .Values.users }}
{{- if $u.password }}
{{- $_ := set $passwords $user $u.password }}
{{- else if not (index $passwords $user) }}
{{- $_ := set $passwords $user (randAlphaNum 16) }}
{{- end }}
{{- end }}
{{- if .Values.users }}
apiVersion: v1
kind: Secret
metadata:
name: {{ .Release.Name }}-credentials
stringData:
{{- range $user, $u := .Values.users }}
{{ quote $user }}: {{ quote (index $passwords $user) }}
{{- end }}
{{- end }}
---
apiVersion: v1
kind: Secret
@@ -13,7 +40,7 @@ stringData:
{{- range $user, $u := .Values.users }}
SELECT 'CREATE ROLE {{ $user }} LOGIN INHERIT;'
WHERE NOT EXISTS (SELECT FROM pg_catalog.pg_roles WHERE rolname = '{{ $user }}')\gexec
ALTER ROLE {{ $user }} WITH PASSWORD '{{ $u.password }}' LOGIN INHERIT {{ ternary "REPLICATION" "NOREPLICATION" (default false $u.replication) }};
ALTER ROLE {{ $user }} WITH PASSWORD '{{ index $passwords $user }}' LOGIN INHERIT {{ ternary "REPLICATION" "NOREPLICATION" (default false $u.replication) }};
COMMENT ON ROLE {{ $user }} IS 'user managed by helm';
{{- end }}
EOT

View File

@@ -15,7 +15,7 @@ spec:
storage:
size: {{ required ".Values.size is required" .Values.size }}
{{- with .Values.stroageClass }}
{{- with .Values.storageClass }}
storageClass: {{ . }}
{{- end }}

View File

@@ -1,56 +0,0 @@
## @section Common parameters
## @param external Enable external access from outside the cluster
## @param size Persistent Volume size
## @param replicas Number of Postgres replicas
##
external: false
size: 10Gi
replicas: 1
## Configuration for the quorum-based synchronous replication
## @param quorum.minSyncReplicas Minimum number of synchronous replicas that must acknowledge a transaction before it is considered committed.
## @param quorum.maxSyncReplicas Maximum number of synchronous replicas that can acknowledge a transaction (must be lower than the number of instances).
quorum:
minSyncReplicas: 0
maxSyncReplicas: 0
## @section Configuration parameters
## @param users [object] Users configuration
## Example:
## users:
## user1:
## password: strongpassword
## user2:
## password: hackme
##
users:
foo:
password: asd
bar:
password: asd
baz:
password: asd
boo:
password: asd
## @section Backup parameters
## @param backup.enabled Enable pereiodic backups
## @param backup.s3Region The AWS S3 region where backups are stored
## @param backup.s3Bucket The S3 bucket used for storing backups
## @param backup.schedule Cron schedule for automated backups
## @param backup.cleanupStrategy The strategy for cleaning up old backups
## @param backup.s3AccessKey The access key for S3, used for authentication
## @param backup.s3SecretKey The secret key for S3, used for authentication
## @param backup.resticPassword The password for Restic backup encryption
backup:
enabled: false
s3Region: us-east-1
s3Bucket: s3.example.org/postgres-backups
schedule: "0 2 * * *"
cleanupStrategy: "--keep-last=3 --keep-daily=3 --keep-within-weekly=1m"
s3AccessKey: oobaiRus9pah8PhohL1ThaeTa4UVa7gu
s3SecretKey: ju3eum4dekeich9ahM1te8waeGai0oog
resticPassword: ChaXoveekoh6eigh4siesheeda2quai0

View File

@@ -1,6 +1,6 @@
apiVersion: v2
name: http-cache
description: Layer7 load balacner and caching service
description: Layer7 load balancer and caching service
icon: /logos/nginx.svg
# A chart can be either an 'application' or a 'library' chart.
@@ -16,7 +16,7 @@ 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.3.0
version: 0.3.1
# 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

View File

@@ -1,4 +1,4 @@
NGINX_CACHE_TAG = v0.1.0
NGINX_CACHE_TAG = $(shell awk '$$1 == "version:" {print $$2}' Chart.yaml)
include ../../../scripts/common-envs.mk
include ../../../scripts/package.mk
@@ -9,7 +9,6 @@ image-nginx:
docker buildx build --platform linux/amd64 --build-arg ARCH=amd64 images/nginx-cache \
--provenance false \
--tag $(REGISTRY)/nginx-cache:$(call settag,$(NGINX_CACHE_TAG)) \
--tag $(REGISTRY)/nginx-cache:$(call settag,$(NGINX_CACHE_TAG)-$(TAG)) \
--cache-from type=registry,ref=$(REGISTRY)/nginx-cache:latest \
--cache-to type=inline \
--metadata-file images/nginx-cache.json \

View File

@@ -1 +1 @@
ghcr.io/aenix-io/cozystack/nginx-cache:v0.1.0@sha256:556bc8d29ee9e90b3d64d0481dcfc66483d055803315bba3d9ece17c0d97f32b
ghcr.io/aenix-io/cozystack/nginx-cache:0.3.1@sha256:556bc8d29ee9e90b3d64d0481dcfc66483d055803315bba3d9ece17c0d97f32b

View File

@@ -114,7 +114,7 @@ spec:
resources:
requests:
storage: "{{ $.Values.size }}"
{{- with $.Values.stroageClass }}
{{- with $.Values.storageClass }}
storageClassName: {{ . }}
{{- end }}
---

View File

@@ -53,7 +53,7 @@ spec:
{{- with .Values.kafka.size }}
size: {{ . }}
{{- end }}
{{- with .Values.kafka.stroageClass }}
{{- with .Values.kafka.storageClass }}
class: {{ . }}
{{- end }}
deleteClaim: true
@@ -64,7 +64,7 @@ spec:
{{- with .Values.zookeeper.size }}
size: {{ . }}
{{- end }}
{{- with .Values.kafka.stroageClass }}
{{- with .Values.kafka.storageClass }}
class: {{ . }}
{{- end }}
deleteClaim: false

View File

@@ -16,7 +16,7 @@ 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.9.0
version: 0.10.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

View File

@@ -18,6 +18,8 @@ spec:
runStrategy: Always
template:
metadata:
annotations:
kubevirt.io/allow-pod-bridge-network-live-migration: "true"
labels:
{{- range .group.roles }}
node-role.kubernetes.io/{{ . }}: ""
@@ -38,7 +40,9 @@ spec:
disk:
bus: virtio
pciAddress: 0000:08:00.0
networkInterfaceMultiqueue: true
interfaces:
- name: default
bridge: {}
memory:
guest: {{ .group.resources.memory }}
evictionStrategy: External
@@ -49,6 +53,9 @@ spec:
- name: ephemeral
emptyDisk:
capacity: {{ .group.ephemeralStorage | default "20Gi" }}
networks:
- name: default
pod: {}
{{- end }}
---
apiVersion: cluster.x-k8s.io/v1beta1

View File

@@ -31,20 +31,8 @@ spec:
values:
cilium:
tunnel: disabled
autoDirectNodeRoutes: false
bpf:
masquerade: true
cgroup:
autoMount:
enabled: true
hostRoot: /run/cilium/cgroupv2
k8sServiceHost: {{ .Release.Name }}.{{ .Release.Namespace }}.svc
k8sServicePort: 6443
cni:
chainingMode: ~
customConf: false
configMap: ""
routingMode: tunnel
enableIPv4Masquerade: true
ipv4NativeRoutingCIDR: ""

View File

@@ -28,7 +28,7 @@ spec:
upgrade:
remediation:
retries: -1
{{- with .Values.stroageClass }}
{{- with .Values.storageClass }}
values:
storageClass: "{{ . }}"
{{- end }}

View File

@@ -16,7 +16,7 @@ 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.4.0
version: 0.5.1
# 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

View File

@@ -1,4 +1,20 @@
MARIADB_BACKUP_TAG = $(shell awk '$$1 == "version:" {print $$2}' Chart.yaml)
include ../../../scripts/common-envs.mk
include ../../../scripts/package.mk
generate:
readme-generator -v values.yaml -s values.schema.json -r README.md
image:
docker buildx build --platform linux/amd64 --build-arg ARCH=amd64 images/mariadb-backup \
--provenance false \
--tag $(REGISTRY)/mariadb-backup:$(call settag,$(MARIADB_BACKUP_TAG)) \
--cache-from type=registry,ref=$(REGISTRY)/mariadb-backup:latest \
--cache-to type=inline \
--metadata-file images/mariadb-backup.json \
--push=$(PUSH) \
--load=$(LOAD)
echo "$(REGISTRY)/mariadb-backup:$(call settag,$(MARIADB_BACKUP_TAG))@$$(yq e '."containerimage.digest"' images/mariadb-backup.json -o json -r)" \
> images/mariadb-backup.tag
rm -f images/mariadb-backup.json

View File

@@ -79,7 +79,7 @@ more details:
| Name | Description | Value |
| ----------- | ----------------------- | ----- |
| `users` | Users configuration | `{}` |
| `databases` | Databases configuration | `[]` |
| `databases` | Databases configuration | `{}` |
### Backup parameters

View File

@@ -0,0 +1 @@
ghcr.io/aenix-io/cozystack/mariadb-backup:0.5.1@sha256:fa2b3195521cffa55eb6d71a50b875d3c234a45e5dff71b2b9002674175bea93

View File

@@ -0,0 +1,2 @@
FROM alpine:3.20
RUN apk add --no-cache mariadb-client uuidgen restic

View File

@@ -27,7 +27,7 @@ spec:
restartPolicy: Never
containers:
- name: mysqldump
image: "{{ index $image "image.name" }}@{{ index $image "containerimage.digest" }}"
image: "{{ $.Files.Get "images/mariadb-backup.tag" | trim }}"
command:
- /bin/sh
- /scripts/backup.sh

View File

@@ -0,0 +1,20 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: {{ .Release.Name }}-dashboard-resources
rules:
- apiGroups:
- ""
resources:
- services
resourceNames:
- {{ .Release.Name }}-primary
- {{ .Release.Name }}-secondary
verbs: ["get", "list", "watch"]
- apiGroups:
- ""
resources:
- secrets
resourceNames:
- {{ .Release.Name }}-credentials
verbs: ["get", "list", "watch"]

View File

@@ -1,14 +1,47 @@
{{- range $name := .Values.databases }}
{{ $dnsName := replace "_" "-" $name }}
{{- range $name, $db := .Values.databases }}
{{ $dbDNSName := replace "_" "-" $name }}
---
apiVersion: k8s.mariadb.com/v1alpha1
kind: Database
metadata:
name: {{ $.Release.Name }}-{{ $dnsName }}
name: {{ $.Release.Name }}-{{ $dbDNSName }}
spec:
name: {{ $name }}
mariaDbRef:
name: {{ $.Release.Name }}
characterSet: utf8
collate: utf8_general_ci
{{- range $user := $db.roles.admin }}
{{ $userDNSName := replace "_" "-" $user }}
---
apiVersion: k8s.mariadb.com/v1alpha1
kind: Grant
metadata:
name: {{ $.Release.Name }}-{{ $dbDNSName }}-{{ $userDNSName }}
spec:
mariaDbRef:
name: {{ $.Release.Name }}
privileges: ['ALL']
database: {{ $name }}
table: "*"
username: {{ $user }}
grantOption: true
{{- end }}
{{- range $user := $db.roles.readonly }}
{{ $userDNSName := replace "_" "-" $user }}
---
apiVersion: k8s.mariadb.com/v1alpha1
kind: Grant
metadata:
name: {{ $.Release.Name }}-{{ $dbDNSName }}-{{ $userDNSName }}
spec:
mariaDbRef:
name: {{ $.Release.Name }}
privileges: ['SELECT']
database: {{ $name }}
table: "*"
username: {{ $user }}
grantOption: true
{{- end }}
{{- end }}

View File

@@ -4,11 +4,9 @@ kind: MariaDB
metadata:
name: {{ .Release.Name }}
spec:
{{- if (and .Values.users.root .Values.users.root.password) }}
rootPasswordSecretKeyRef:
name: {{ .Release.Name }}
key: root-password
{{- end }}
name: {{ .Release.Name }}-credentials
key: root
image: "mariadb:11.0.2"
@@ -62,7 +60,7 @@ spec:
size: {{ .Values.size }}
resizeInUseVolumes: true
waitForVolumeResize: true
{{- with .Values.stroageClass }}
{{- with .Values.storageClass }}
storageClassName: {{ . }}
{{- end }}

View File

@@ -1,9 +1,31 @@
{{- $existingSecret := lookup "v1" "Secret" .Release.Namespace (printf "%s-credentials" .Release.Name) }}
{{- $passwords := dict }}
{{- with (index $existingSecret "data") }}
{{- range $k, $v := . }}
{{- $_ := set $passwords $k (b64dec $v) }}
{{- end }}
{{- end }}
{{- $usersWithRoot := .Values.users }}
{{- if (and .Values.users.root .Values.users.root.password) }}
{{- $_ := set $usersWithRoot "root" dict }}
{{- end }}
{{- range $user, $u := $usersWithRoot }}
{{- if $u.password }}
{{- $_ := set $passwords $user $u.password }}
{{- else if not (index $passwords $user) }}
{{- $_ := set $passwords $user (randAlphaNum 16) }}
{{- end }}
{{- end }}
---
apiVersion: v1
kind: Secret
metadata:
name: {{ .Release.Name }}
name: {{ .Release.Name }}-credentials
stringData:
{{- range $name, $u := .Values.users }}
{{ $name }}-password: {{ $u.password }}
{{- range $name, $u := $usersWithRoot }}
{{ $name }}: {{ index $passwords $name }}
{{- end }}

View File

@@ -11,21 +11,8 @@ spec:
mariaDbRef:
name: {{ $.Release.Name }}
passwordSecretKeyRef:
name: {{ $.Release.Name }}
key: {{ $name }}-password
name: {{ $.Release.Name }}-credentials
key: {{ $name }}
maxUserConnections: {{ $u.maxUserConnections }}
---
apiVersion: k8s.mariadb.com/v1alpha1
kind: Grant
metadata:
name: {{ $.Release.Name }}-{{ $dnsName }}
spec:
mariaDbRef:
name: {{ $.Release.Name }}
privileges: {{ $u.privileges | toJson }}
database: "*"
table: "*"
username: {{ $name }}
grantOption: true
{{- end }}
{{- end }}

View File

@@ -22,12 +22,6 @@
"description": "StorageClass used to store the data",
"default": ""
},
"databases": {
"type": "array",
"description": "Databases configuration",
"default": [],
"items": {}
},
"backup": {
"type": "object",
"properties": {

View File

@@ -15,27 +15,25 @@ storageClass: ""
## @param users [object] Users configuration
## Example:
## users:
## root:
## password: strongpassword
## user1:
## privileges: ['ALL']
## maxUserConnections: 1000
## password: hackme
## user2:
## privileges: ['SELECT']
## maxUserConnections: 1000
## password: hackme
##
users: {}
## @param databases Databases configuration
## @param databases [object] Databases configuration
## Example:
## databases:
## - wordpress1
## - wordpress2
## - wordpress3
## - wordpress4
databases: []
## myapp1:
## roles:
## admin:
## - user1
## readonly:
## - user2
databases: {}
## @section Backup parameters

View File

@@ -16,7 +16,7 @@ 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.5.0
version: 0.6.2
# 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

View File

@@ -1,4 +1,21 @@
POSTGRES_BACKUP_TAG = $(shell awk '$$1 == "version:" {print $$2}' Chart.yaml)
include ../../../scripts/common-envs.mk
include ../../../scripts/package.mk
generate:
readme-generator -v values.yaml -s values.schema.json -r README.md
image:
docker buildx build --platform linux/amd64 --build-arg ARCH=amd64 images/postgres-backup \
--provenance false \
--tag $(REGISTRY)/postgres-backup:$(call settag,$(POSTGRES_BACKUP_TAG)) \
--cache-from type=registry,ref=$(REGISTRY)/postgres-backup:latest \
--cache-to type=inline \
--metadata-file images/postgres-backup.json \
--push=$(PUSH) \
--load=$(LOAD)
echo "$(REGISTRY)/postgres-backup:$(call settag,$(POSTGRES_BACKUP_TAG))@$$(yq e '."containerimage.digest"' images/postgres-backup.json -o json -r)" \
> images/postgres-backup.tag
cp images/postgres-backup.tag ../ferretdb/images/
rm -f images/postgres-backup.json

View File

@@ -0,0 +1 @@
ghcr.io/aenix-io/cozystack/postgres-backup:0.6.2@sha256:d2015c6dba92293bda652d055e97d1be80e8414c2dc78037c12812d1a2e2cba1

View File

@@ -0,0 +1,2 @@
FROM alpine:3.20
RUN apk add --no-cache postgresql16-client uuidgen restic

View File

@@ -26,8 +26,8 @@ spec:
- name: {{ .Release.Name }}-regsecret
restartPolicy: Never
containers:
- name: mysqldump
image: "{{ index $image "image.name" }}@{{ index $image "containerimage.digest" }}"
- name: pgdump
image: "{{ $.Files.Get "images/postgres-backup.tag" | trim }}"
command:
- /bin/sh
- /scripts/backup.sh

View File

@@ -8,7 +8,14 @@ rules:
resources:
- services
resourceNames:
- postgres-service-r
- postgres-service-ro
- postgres-service-rw
- {{ .Release.Name }}-r
- {{ .Release.Name }}-ro
- {{ .Release.Name }}-rw
verbs: ["get", "list", "watch"]
- apiGroups:
- ""
resources:
- secrets
resourceNames:
- {{ .Release.Name }}-credentials
verbs: ["get", "list", "watch"]

View File

@@ -19,7 +19,7 @@ spec:
storage:
size: {{ required ".Values.size is required" .Values.size }}
{{- with .Values.stroageClass }}
{{- with .Values.storageClass }}
storageClass: {{ . }}
{{- end }}

View File

@@ -1,3 +1,30 @@
{{- $existingSecret := lookup "v1" "Secret" .Release.Namespace (printf "%s-credentials" .Release.Name) }}
{{- $passwords := dict }}
{{- with (index $existingSecret "data") }}
{{- range $k, $v := . }}
{{- $_ := set $passwords $k (b64dec $v) }}
{{- end }}
{{- end }}
{{- range $user, $u := .Values.users }}
{{- if $u.password }}
{{- $_ := set $passwords $user $u.password }}
{{- else if not (index $passwords $user) }}
{{- $_ := set $passwords $user (randAlphaNum 16) }}
{{- end }}
{{- end }}
{{- if .Values.users }}
apiVersion: v1
kind: Secret
metadata:
name: {{ .Release.Name }}-credentials
stringData:
{{- range $user, $u := .Values.users }}
{{ quote $user }}: {{ quote (index $passwords $user) }}
{{- end }}
{{- end }}
---
apiVersion: v1
kind: Secret
@@ -13,7 +40,7 @@ stringData:
{{- range $user, $u := .Values.users }}
SELECT 'CREATE ROLE {{ $user }} LOGIN INHERIT;'
WHERE NOT EXISTS (SELECT FROM pg_catalog.pg_roles WHERE rolname = '{{ $user }}')\gexec
ALTER ROLE {{ $user }} WITH PASSWORD '{{ $u.password }}' LOGIN INHERIT {{ ternary "REPLICATION" "NOREPLICATION" (default false $u.replication) }};
ALTER ROLE {{ $user }} WITH PASSWORD '{{ index $passwords $user }}' LOGIN INHERIT {{ ternary "REPLICATION" "NOREPLICATION" (default false $u.replication) }};
COMMENT ON ROLE {{ $user }} IS 'user managed by helm';
{{- end }}
EOT

View File

@@ -16,10 +16,10 @@ 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.3.0
version: 0.4.1
# 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: "3.12.2"
appVersion: "3.13.2"

View File

@@ -19,3 +19,10 @@ The service utilizes official RabbitMQ operator. This ensures the reliability an
| `size` | Persistent Volume size | `10Gi` |
| `replicas` | Number of RabbitMQ replicas | `3` |
| `storageClass` | StorageClass used to store the data | `""` |
### Configuration parameters
| Name | Description | Value |
| -------- | --------------------------- | ----- |
| `users` | Users configuration | `{}` |
| `vhosts` | Virtual Hosts configuration | `{}` |

View File

@@ -0,0 +1,22 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: {{ .Release.Name }}-dashboard-resources
rules:
- apiGroups:
- ""
resources:
- secrets
resourceNames:
- {{ .Release.Name }}-default-user
{{- range $name, $u := .Values.users }}
- {{ $.Release.Name }}-{{ kebabcase $name }}-credentials
{{- end }}
verbs: ["get", "list", "watch"]
- apiGroups:
- ""
resources:
- services
resourceNames:
- {{ .Release.Name }}
verbs: ["get", "list", "watch"]

View File

@@ -12,8 +12,94 @@ spec:
type: LoadBalancer
{{- end }}
override:
statefulSet:
spec:
template:
metadata:
labels:
policy.cozystack.io/allow-to-apiserver: "true"
persistence:
{{- with .Values.stroageClass }}
{{- with .Values.storageClass }}
storageClassName: {{ . }}
{{- end }}
storage: {{ .Values.size }}
{{- range $user, $u := .Values.users }}
{{- $password := $u.password }}
{{- if not $password }}
{{- with (dig "data" "password" "" (lookup "v1" "Secret" $.Release.Namespace (printf "%s-%s-credentials" $.Release.Name (kebabcase $user)))) }}
{{- $password = b64dec . }}
{{- end }}
{{- end }}
{{- if not $password }}
{{- $password = (randAlphaNum 16) }}
{{- end }}
---
apiVersion: rabbitmq.com/v1beta1
kind: User
metadata:
name: {{ $.Release.Name }}-{{ kebabcase $user }}
annotations:
config: '{{ printf "%s %s" $user $password | sha256sum }}'
spec:
importCredentialsSecret:
name: {{ $.Release.Name }}-{{ $user }}-credentials
rabbitmqClusterReference:
name: {{ $.Release.Name }}
---
apiVersion: v1
kind: Secret
metadata:
name: {{ $.Release.Name }}-{{ kebabcase $user }}-credentials
type: Opaque
stringData:
username: {{ $user }}
password: {{ $password }}
{{- end }}
{{- range $host, $h := .Values.vhosts }}
---
apiVersion: rabbitmq.com/v1beta1
kind: Vhost
metadata:
name: {{ $.Release.Name }}-{{ kebabcase $host }}
spec:
name: {{ $host }}
rabbitmqClusterReference:
name: {{ $.Release.Name }}
{{- range $user := $h.roles.admin }}
---
apiVersion: rabbitmq.com/v1beta1
kind: Permission
metadata:
name: {{ $.Release.Name }}-{{ kebabcase $host }}-{{ kebabcase $user }}
spec:
vhost: "{{ $host }}"
user: "{{ $user }}"
permissions:
write: ".*"
configure: ".*"
read: ".*"
rabbitmqClusterReference:
name: {{ $.Release.Name }}
{{- end }}
{{- range $user := $h.roles.readonly }}
---
apiVersion: rabbitmq.com/v1beta1
kind: Permission
metadata:
name: {{ $.Release.Name }}-{{ kebabcase $host }}-{{ kebabcase $user }}
spec:
vhost: "{{ $host }}"
user: "{{ $user }}"
permissions:
read: ".*"
rabbitmqClusterReference:
name: {{ $.Release.Name }}
{{- end }}
{{- end }}

View File

@@ -21,6 +21,11 @@
"type": "string",
"description": "StorageClass used to store the data",
"default": ""
},
"vhosts": {
"type": "object",
"description": "Virtual Hosts configuration",
"default": {}
}
}
}

View File

@@ -9,3 +9,33 @@ external: false
size: 10Gi
replicas: 3
storageClass: ""
## @section Configuration parameters
## @param users [object] Users configuration
## Example:
## users:
## user1:
## password: strongpassword
## user2:
## password: hackme
## user3:
## password: testtest
##
users: {}
## @param vhosts Virtual Hosts configuration
## Example:
## vhosts:
## myapp:
## roles:
## admin:
## - user1
## - user2
## readonly:
## - user3
## test:
## roles:
## admin:
## - user3
vhosts: {}

View File

@@ -83,6 +83,21 @@ spec:
{{- end }}
{{- end }}
---
{{- if .Values.ingress }}
apiVersion: cilium.io/v2
kind: CiliumClusterwideNetworkPolicy
metadata:
name: {{ include "tenant.name" . }}-ingress-ingress
spec:
endpointSelector:
matchLabels:
"k8s:io.kubernetes.pod.namespace": "{{ include "tenant.name" . }}"
cozystack.io/service: ingress
ingress:
- fromEndpoints:
- {}
{{- end }}
---
{{- if .Values.etcd }}
apiVersion: cilium.io/v2
kind: CiliumClusterwideNetworkPolicy

View File

@@ -2,13 +2,18 @@ bucket 0.1.0 HEAD
clickhouse 0.1.0 ca79f72
clickhouse 0.2.0 7cd7de73
clickhouse 0.2.1 5ca8823
clickhouse 0.3.0 HEAD
clickhouse 0.3.0 b00621e
clickhouse 0.4.0 320fc32
clickhouse 0.5.0 HEAD
ferretdb 0.1.0 4ffa8615
ferretdb 0.1.1 5ca8823
ferretdb 0.2.0 HEAD
ferretdb 0.2.0 adaf603
ferretdb 0.3.0 aa2f553
ferretdb 0.4.0 HEAD
http-cache 0.1.0 a956713
http-cache 0.2.0 5ca8823
http-cache 0.3.0 HEAD
http-cache 0.3.0 fab5940
http-cache 0.3.1 HEAD
kafka 0.1.0 760f86d2
kafka 0.2.0 a2cc83d
kafka 0.2.1 3ac17018
@@ -25,11 +30,14 @@ kubernetes 0.7.0 ceefae03
kubernetes 0.8.0 ac11056e
kubernetes 0.8.1 e54608d8
kubernetes 0.8.2 5ca8823
kubernetes 0.9.0 HEAD
kubernetes 0.9.0 9b6dd19
kubernetes 0.10.0 HEAD
mysql 0.1.0 f642698
mysql 0.2.0 8b975ff0
mysql 0.3.0 5ca8823
mysql 0.4.0 HEAD
mysql 0.4.0 93018c4
mysql 0.5.0 4b84798
mysql 0.5.1 HEAD
nats 0.1.0 5ca8823
nats 0.2.0 HEAD
postgres 0.1.0 f642698
@@ -38,10 +46,14 @@ postgres 0.2.1 4a97e297
postgres 0.3.0 995dea6f
postgres 0.4.0 ec283c33
postgres 0.4.1 5ca8823
postgres 0.5.0 HEAD
postgres 0.5.0 c07c4bbd
postgres 0.6.0 2a4768a
postgres 0.6.2 HEAD
rabbitmq 0.1.0 f642698
rabbitmq 0.2.0 5ca8823
rabbitmq 0.3.0 HEAD
rabbitmq 0.3.0 9e33dc0
rabbitmq 0.4.0 36d8855
rabbitmq 0.4.1 HEAD
redis 0.1.1 f642698
redis 0.2.0 5ca8823
redis 0.3.0 HEAD
@@ -59,7 +71,8 @@ tenant 1.4.0 HEAD
virtual-machine 0.1.4 f2015d6
virtual-machine 0.1.5 7cd7de7
virtual-machine 0.2.0 5ca8823
virtual-machine 0.3.0 HEAD
virtual-machine 0.3.0 b908400
virtual-machine 0.4.0 HEAD
vpn 0.1.0 f642698
vpn 0.2.0 7151424
vpn 0.3.0 HEAD

View File

@@ -17,7 +17,7 @@ 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.3.0
version: 0.4.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

View File

@@ -3,7 +3,8 @@ include ../../../scripts/package.mk
generate:
readme-generator -v values.yaml -s values.schema.json.tmp -r README.md
cat values.schema.json.tmp | \
jq '.properties.image.enum = ["ubuntu", "cirros", "alpine", "fedora"]' | \
jq '.properties.resources.properties.memory["x-display"] = "slider"' \
jq '.properties.image.enum = ["ubuntu", "cirros", "alpine", "fedora", "talos"]' | \
jq '.properties.resources.properties.memory["x-display"] = "slider"' | \
jq '.properties.externalPorts.items.type = "integer"' \
> values.schema.json
rm -f values.schema.json.tmp

View File

@@ -9,51 +9,67 @@ The virtual machine is managed and hosted through KubeVirt, allowing you to harn
- Docs: [KubeVirt User Guide](https://kubevirt.io/user-guide/)
- GitHub: [KubeVirt Repository](https://github.com/kubevirt/kubevirt)
## Accessing virtual machine
You can access the virtual machine using the virtctl tool:
- [KubeVirt User Guide - Virtctl Client Tool](https://kubevirt.io/user-guide/user_workloads/virtctl_client_tool/)
To access the serial console:
```
virtctl console <vm>
```
To access the VM using VNC:
```
virtctl vnc <vm>
```
To SSH into the VM:
```
virtctl ssh <user>@<vm>
```
## Parameters
### Common parameters
| Name | Description | Value |
| ------------------ | ------------------------------------------------------------------------------------------------- | ----------------------------------- |
| `external` | Enable external access from outside the cluster | `false` |
| `running` | Determines if the virtual machine should be running | `true` |
| `image` | The base image for the virtual machine. Allowed values: `ubuntu`, `cirros`, `alpine` and `fedora` | `ubuntu` |
| `storageClass` | StorageClass used to store the data | `replicated` |
| `resources.cpu` | The number of CPU cores allocated to the virtual machine | `1` |
| `resources.memory` | The amount of memory allocated to the virtual machine | `1024M` |
| `resources.disk` | The size of the disk allocated for the virtual machine | `5Gi` |
| `sshPwauth` | Enable password authentication for SSH. If set to `true`, users can log in using a password | `true` |
| `disableRoot` | Disable root login via SSH. If set to `true`, root login will be disabled | `true` |
| `password` | The default password for the virtual machine | `hackme` |
| `chpasswdExpire` | Set whether the password should expire | `false` |
| `sshKeys` | List of SSH public keys for authentication. Can be a single key or a list of keys | `["ssh-rsa ...","ssh-ed25519 ..."]` |
| Name | Description | Value |
| ------------------ | ---------------------------------------------------------------------------------------------------------- | ---------------- |
| `external` | Enable external access from outside the cluster | `false` |
| `externalPorts` | Specify ports to forward from outside the cluster | `[]` |
| `running` | Determines if the virtual machine should be running | `true` |
| `image` | The base image for the virtual machine. Allowed values: `ubuntu`, `cirros`, `alpine`, `fedora` and `talos` | `ubuntu` |
| `storageClass` | StorageClass used to store the data | `replicated` |
| `resources.cpu` | The number of CPU cores allocated to the virtual machine | `1` |
| `resources.memory` | The amount of memory allocated to the virtual machine | `1024M` |
| `resources.disk` | The size of the disk allocated for the virtual machine | `5Gi` |
| `sshKeys` | List of SSH public keys for authentication. Can be a single key or a list of keys. | `[]` |
| `cloudInit` | cloud-init user data config. See cloud-init documentation for more details. | `#cloud-config
` |
You can customize the exposed ports by specifying them under `service.ports` in the `values.yaml` file.
## Example `values.yaml`
## Example virtual machine:
```yaml
external: false
running: true
image: ubuntu
image: fedora
storageClass: replicated
resources:
cpu: 1
memory: 1024M
disk: 5Gi
sshPwauth: true
disableRoot: true
password: hackme
chpasswdExpire: false
sshKeys:
- YOUR_SSH_PUB_KEY_HERE
- ANOTHER_SSH_PUB_KEY_HERE
disk: 10Gi
service:
ports:
- name: http
port: 80
targetPort: 80
- name: https
port: 443
targetPort: 443
sshKeys:
- ssh-rsa ...
cloudInit: |
#cloud-config
user: fedora
password: fedora
chpasswd: { expire: False }
ssh_pwauth: True
```

View File

@@ -0,0 +1,21 @@
{{- if .Values.sshKeys }}
---
apiVersion: v1
kind: Secret
metadata:
name: {{ include "virtual-machine.fullname" $ }}-ssh-keys
stringData:
{{- range $k, $v := .Values.sshKeys }}
key{{ $k }}: {{ quote $v }}
{{- end }}
{{- end }}
{{- if .Values.cloudInit }}
---
apiVersion: v1
kind: Secret
metadata:
name: {{ include "virtual-machine.fullname" . }}-cloud-init
stringData:
userdata: |
{{- .Values.cloudInit | nindent 4 }}
{{- end }}

View File

@@ -8,21 +8,14 @@ metadata:
{{- include "virtual-machine.labels" . | nindent 4 }}
spec:
type: {{ ternary "LoadBalancer" "ClusterIP" .Values.external }}
{{- if .Values.external }}
externalTrafficPolicy: Local
allocateLoadBalancerNodePorts: false
{{- end }}
selector:
{{- include "virtual-machine.labels" . | nindent 4 }}
ports:
- name: ssh
port: 22
targetPort: 22
{{- if .Values.service.ports }}
{{- range .Values.service.ports }}
- name: {{ .name }}
port: {{ .port }}
targetPort: {{ .targetPort }}
{{- end }}
{{- range .Values.externalPorts }}
- name: port-{{ . }}
port: {{ . }}
targetPort: {{ . }}
{{- end }}
{{- end }}

View File

@@ -11,8 +11,9 @@ spec:
name: {{ include "virtual-machine.fullname" . }}
spec:
pvc:
volumeMode: Block
accessModes:
- ReadWriteOnce
- ReadWriteMany
resources:
requests:
storage: {{ .Values.resources.disk | quote }}
@@ -28,7 +29,9 @@ spec:
{{- else if eq .Values.image "fedora" }}
url: https://download.fedoraproject.org/pub/fedora/linux/releases/40/Cloud/x86_64/images/Fedora-Cloud-Base-Generic.x86_64-40-1.14.qcow2
{{- else if eq .Values.image "alpine" }}
url: https://dl-cdn.alpinelinux.org/alpine/v3.20/releases/x86_64/alpine-virt-3.20.2-x86_64.iso
url: https://dl-cdn.alpinelinux.org/alpine/v3.20/releases/cloud/nocloud_alpine-3.20.2-x86_64-bios-tiny-r0.qcow2
{{- else if eq .Values.image "talos" }}
url: https://github.com/siderolabs/talos/releases/download/v1.7.6/nocloud-amd64.raw.xz
{{- end }}
template:
metadata:
@@ -45,34 +48,39 @@ spec:
- disk:
bus: scsi
name: systemdisk
{{- if or .Values.sshKeys .Values.cloudInit }}
- disk:
bus: virtio
name: cloudinitdisk
{{- end }}
interfaces:
- name: default
bridge: {}
machine:
type: ""
resources:
requests:
memory: {{ .Values.resources.memory | quote }}
{{- with .Values.sshKeys }}
accessCredentials:
- sshPublicKey:
source:
secret:
secretName: {{ include "virtual-machine.fullname" $ }}-ssh-keys
propagationMethod:
noCloud: {}
{{- end }}
terminationGracePeriodSeconds: 30
volumes:
- dataVolume:
- name: systemdisk
dataVolume:
name: {{ include "virtual-machine.fullname" . }}
name: systemdisk
- cloudInitNoCloud:
userData: |-
#cloud-config
ssh_pwauth: {{ if .Values.sshPwauth | default false }}True{{ else }}False{{ end }}
disable_root: {{ if .Values.disableRoot | default false }}True{{ else }}False{{ end }}
password: {{ .Values.password }}
chpasswd: { expire: {{ if .Values.chpasswdExpire | default false }}True{{ else }}False{{ end }} }
ssh_authorized_keys:
{{- if .Values.sshKeys }}
{{- $keys := .Values.sshKeys }}
{{- if not (kindIs "slice" $keys) }}
{{- $keys = list $keys }}
{{- end }}
{{- range $keys }}
- {{ . }}
{{- end }}
{{- end }}
name: cloudinitdisk
{{- if or .Values.sshKeys .Values.cloudInit }}
- name: cloudinitdisk
cloudInitNoCloud:
secretRef:
name: {{ include "virtual-machine.fullname" . }}-cloud-init
{{- end }}
networks:
- name: default
pod: {}

View File

@@ -7,6 +7,14 @@
"description": "Enable external access from outside the cluster",
"default": false
},
"externalPorts": {
"type": "array",
"description": "Specify ports to forward from outside the cluster",
"default": "[]",
"items": {
"type": "integer"
}
},
"running": {
"type": "boolean",
"description": "Determines if the virtual machine should be running",
@@ -14,13 +22,14 @@
},
"image": {
"type": "string",
"description": "The base image for the virtual machine. Allowed values: `ubuntu`, `cirros`, `alpine` and `fedora`",
"description": "The base image for the virtual machine. Allowed values: `ubuntu`, `cirros`, `alpine`, `fedora` and `talos`",
"default": "ubuntu",
"enum": [
"ubuntu",
"cirros",
"alpine",
"fedora"
"fedora",
"talos"
]
},
"storageClass": {
@@ -49,36 +58,18 @@
}
}
},
"sshPwauth": {
"type": "boolean",
"description": "Enable password authentication for SSH. If set to `true`, users can log in using a password",
"default": true
},
"disableRoot": {
"type": "boolean",
"description": "Disable root login via SSH. If set to `true`, root login will be disabled",
"default": true
},
"password": {
"type": "string",
"description": "The default password for the virtual machine",
"default": "hackme"
},
"chpasswdExpire": {
"type": "boolean",
"description": "Set whether the password should expire",
"default": false
},
"sshKeys": {
"type": "array",
"description": "List of SSH public keys for authentication. Can be a single key or a list of keys",
"default": [
"ssh-rsa ...",
"ssh-ed25519 ..."
],
"description": "List of SSH public keys for authentication. Can be a single key or a list of keys.",
"default": "[]",
"items": {
"type": "string"
}
},
"cloudInit": {
"type": "string",
"description": "cloud-init user data config. See cloud-init documentation for more details.",
"default": "#cloud-config\n"
}
}
}

View File

@@ -1,19 +1,18 @@
## @section Common parameters
## @param external Enable external access from outside the cluster
## @param externalPorts [array] Specify ports to forward from outside the cluster
## @param running Determines if the virtual machine should be running
## @param image The base image for the virtual machine. Allowed values: `ubuntu`, `cirros`, `alpine` and `fedora`
## @param image The base image for the virtual machine. Allowed values: `ubuntu`, `cirros`, `alpine`, `fedora` and `talos`
## @param storageClass StorageClass used to store the data
## @param resources.cpu The number of CPU cores allocated to the virtual machine
## @param resources.memory The amount of memory allocated to the virtual machine
## @param resources.disk The size of the disk allocated for the virtual machine
## @param sshPwauth Enable password authentication for SSH. If set to `true`, users can log in using a password
## @param disableRoot Disable root login via SSH. If set to `true`, root login will be disabled
## @param password The default password for the virtual machine
## @param chpasswdExpire Set whether the password should expire
## @param sshKeys List of SSH public keys for authentication. Can be a single key or a list of keys
external: false
externalPorts:
- 22
running: true
image: ubuntu
storageClass: replicated
@@ -21,10 +20,24 @@ resources:
cpu: 1
memory: 1024M
disk: 5Gi
sshPwauth: true
disableRoot: true
password: hackme
chpasswdExpire: false
sshKeys:
- ssh-rsa ...
- ssh-ed25519 ...
## @param sshKeys [array] List of SSH public keys for authentication. Can be a single key or a list of keys.
## Example:
## sshKeys:
## - ssh-rsa ...
## - ssh-ed25519 ...
##
sshKeys: []
## @param cloudInit cloud-init user data config. See cloud-init documentation for more details.
## - https://cloudinit.readthedocs.io/en/latest/explanation/format.html
## - https://cloudinit.readthedocs.io/en/latest/reference/examples.html
## Example:
## cloudInit: |
## #cloud-config
## password: ubuntu
## chpasswd: { expire: False }
##
cloudInit: |
#cloud-config

View File

@@ -54,9 +54,9 @@ image-matchbox:
--load=$(LOAD)
rm -f images/matchbox.json
assets: talos-iso talos-nocloud
assets: talos-iso talos-nocloud talos-metal
talos-initramfs talos-kernel talos-installer talos-iso talos-nocloud:
talos-initramfs talos-kernel talos-installer talos-iso talos-nocloud talos-metal:
mkdir -p ../../../_out/assets
cat images/talos/profiles/$(subst talos-,,$@).yaml | \
docker run --rm -i -v /dev:/dev --privileged "ghcr.io/siderolabs/imager:$(TALOS_VERSION)" --tar-to-stdout - | \

View File

@@ -2,7 +2,7 @@
set -e
set -u
PROFILES="initramfs kernel iso installer nocloud"
PROFILES="initramfs kernel iso installer nocloud metal"
FIRMWARES="amd-ucode amdgpu-firmware bnx2-bnx2x i915-ucode intel-ice-firmware intel-ucode qlogic-firmware"
EXTENSIONS="drbd zfs"
@@ -32,10 +32,10 @@ done
for profile in $PROFILES; do
echo "writing profile images/talos/profiles/$profile.yaml"
if [ "$profile" = "nocloud" ]; then
if [ "$profile" = "nocloud" ] || [ "$profile" = "metal" ]; then
image_options="{ diskSize: 1306525696, diskFormat: raw }"
out_format=".xz"
platform="nocloud"
platform="$profile"
kind="image"
else
image_options="{}"

View File

@@ -12,13 +12,13 @@ input:
baseInstaller:
imageRef: ghcr.io/siderolabs/installer:v1.7.6
systemExtensions:
- imageRef: ghcr.io/siderolabs/amd-ucode:20240709
- imageRef: ghcr.io/siderolabs/amdgpu-firmware:20240709
- imageRef: ghcr.io/siderolabs/bnx2-bnx2x:20240709
- imageRef: ghcr.io/siderolabs/i915-ucode:20240709
- imageRef: ghcr.io/siderolabs/intel-ice-firmware:20240709
- imageRef: ghcr.io/siderolabs/intel-ucode:20240531
- imageRef: ghcr.io/siderolabs/qlogic-firmware:20240709
- imageRef: ghcr.io/siderolabs/amd-ucode:20240811
- imageRef: ghcr.io/siderolabs/amdgpu-firmware:20240811
- imageRef: ghcr.io/siderolabs/bnx2-bnx2x:20240811
- imageRef: ghcr.io/siderolabs/i915-ucode:20240811
- imageRef: ghcr.io/siderolabs/intel-ice-firmware:20240811
- imageRef: ghcr.io/siderolabs/intel-ucode:20240813
- imageRef: ghcr.io/siderolabs/qlogic-firmware:20240811
- imageRef: ghcr.io/siderolabs/drbd:9.2.8-v1.7.6
- imageRef: ghcr.io/siderolabs/zfs:2.2.4-v1.7.6
output:

View File

@@ -12,13 +12,13 @@ input:
baseInstaller:
imageRef: ghcr.io/siderolabs/installer:v1.7.6
systemExtensions:
- imageRef: ghcr.io/siderolabs/amd-ucode:20240709
- imageRef: ghcr.io/siderolabs/amdgpu-firmware:20240709
- imageRef: ghcr.io/siderolabs/bnx2-bnx2x:20240709
- imageRef: ghcr.io/siderolabs/i915-ucode:20240709
- imageRef: ghcr.io/siderolabs/intel-ice-firmware:20240709
- imageRef: ghcr.io/siderolabs/intel-ucode:20240531
- imageRef: ghcr.io/siderolabs/qlogic-firmware:20240709
- imageRef: ghcr.io/siderolabs/amd-ucode:20240811
- imageRef: ghcr.io/siderolabs/amdgpu-firmware:20240811
- imageRef: ghcr.io/siderolabs/bnx2-bnx2x:20240811
- imageRef: ghcr.io/siderolabs/i915-ucode:20240811
- imageRef: ghcr.io/siderolabs/intel-ice-firmware:20240811
- imageRef: ghcr.io/siderolabs/intel-ucode:20240813
- imageRef: ghcr.io/siderolabs/qlogic-firmware:20240811
- imageRef: ghcr.io/siderolabs/drbd:9.2.8-v1.7.6
- imageRef: ghcr.io/siderolabs/zfs:2.2.4-v1.7.6
output:

View File

@@ -12,13 +12,13 @@ input:
baseInstaller:
imageRef: ghcr.io/siderolabs/installer:v1.7.6
systemExtensions:
- imageRef: ghcr.io/siderolabs/amd-ucode:20240709
- imageRef: ghcr.io/siderolabs/amdgpu-firmware:20240709
- imageRef: ghcr.io/siderolabs/bnx2-bnx2x:20240709
- imageRef: ghcr.io/siderolabs/i915-ucode:20240709
- imageRef: ghcr.io/siderolabs/intel-ice-firmware:20240709
- imageRef: ghcr.io/siderolabs/intel-ucode:20240531
- imageRef: ghcr.io/siderolabs/qlogic-firmware:20240709
- imageRef: ghcr.io/siderolabs/amd-ucode:20240811
- imageRef: ghcr.io/siderolabs/amdgpu-firmware:20240811
- imageRef: ghcr.io/siderolabs/bnx2-bnx2x:20240811
- imageRef: ghcr.io/siderolabs/i915-ucode:20240811
- imageRef: ghcr.io/siderolabs/intel-ice-firmware:20240811
- imageRef: ghcr.io/siderolabs/intel-ucode:20240813
- imageRef: ghcr.io/siderolabs/qlogic-firmware:20240811
- imageRef: ghcr.io/siderolabs/drbd:9.2.8-v1.7.6
- imageRef: ghcr.io/siderolabs/zfs:2.2.4-v1.7.6
output:

View File

@@ -12,13 +12,13 @@ input:
baseInstaller:
imageRef: ghcr.io/siderolabs/installer:v1.7.6
systemExtensions:
- imageRef: ghcr.io/siderolabs/amd-ucode:20240709
- imageRef: ghcr.io/siderolabs/amdgpu-firmware:20240709
- imageRef: ghcr.io/siderolabs/bnx2-bnx2x:20240709
- imageRef: ghcr.io/siderolabs/i915-ucode:20240709
- imageRef: ghcr.io/siderolabs/intel-ice-firmware:20240709
- imageRef: ghcr.io/siderolabs/intel-ucode:20240531
- imageRef: ghcr.io/siderolabs/qlogic-firmware:20240709
- imageRef: ghcr.io/siderolabs/amd-ucode:20240811
- imageRef: ghcr.io/siderolabs/amdgpu-firmware:20240811
- imageRef: ghcr.io/siderolabs/bnx2-bnx2x:20240811
- imageRef: ghcr.io/siderolabs/i915-ucode:20240811
- imageRef: ghcr.io/siderolabs/intel-ice-firmware:20240811
- imageRef: ghcr.io/siderolabs/intel-ucode:20240813
- imageRef: ghcr.io/siderolabs/qlogic-firmware:20240811
- imageRef: ghcr.io/siderolabs/drbd:9.2.8-v1.7.6
- imageRef: ghcr.io/siderolabs/zfs:2.2.4-v1.7.6
output:

View File

@@ -0,0 +1,27 @@
# this file generated by hack/gen-profiles.sh
# do not edit it
arch: amd64
platform: metal
secureboot: false
version: v1.7.6
input:
kernel:
path: /usr/install/amd64/vmlinuz
initramfs:
path: /usr/install/amd64/initramfs.xz
baseInstaller:
imageRef: ghcr.io/siderolabs/installer:v1.7.6
systemExtensions:
- imageRef: ghcr.io/siderolabs/amd-ucode:20240811
- imageRef: ghcr.io/siderolabs/amdgpu-firmware:20240811
- imageRef: ghcr.io/siderolabs/bnx2-bnx2x:20240811
- imageRef: ghcr.io/siderolabs/i915-ucode:20240811
- imageRef: ghcr.io/siderolabs/intel-ice-firmware:20240811
- imageRef: ghcr.io/siderolabs/intel-ucode:20240813
- imageRef: ghcr.io/siderolabs/qlogic-firmware:20240811
- imageRef: ghcr.io/siderolabs/drbd:9.2.8-v1.7.6
- imageRef: ghcr.io/siderolabs/zfs:2.2.4-v1.7.6
output:
kind: image
imageOptions: { diskSize: 1306525696, diskFormat: raw }
outFormat: .xz

View File

@@ -12,13 +12,13 @@ input:
baseInstaller:
imageRef: ghcr.io/siderolabs/installer:v1.7.6
systemExtensions:
- imageRef: ghcr.io/siderolabs/amd-ucode:20240709
- imageRef: ghcr.io/siderolabs/amdgpu-firmware:20240709
- imageRef: ghcr.io/siderolabs/bnx2-bnx2x:20240709
- imageRef: ghcr.io/siderolabs/i915-ucode:20240709
- imageRef: ghcr.io/siderolabs/intel-ice-firmware:20240709
- imageRef: ghcr.io/siderolabs/intel-ucode:20240531
- imageRef: ghcr.io/siderolabs/qlogic-firmware:20240709
- imageRef: ghcr.io/siderolabs/amd-ucode:20240811
- imageRef: ghcr.io/siderolabs/amdgpu-firmware:20240811
- imageRef: ghcr.io/siderolabs/bnx2-bnx2x:20240811
- imageRef: ghcr.io/siderolabs/i915-ucode:20240811
- imageRef: ghcr.io/siderolabs/intel-ice-firmware:20240811
- imageRef: ghcr.io/siderolabs/intel-ucode:20240813
- imageRef: ghcr.io/siderolabs/qlogic-firmware:20240811
- imageRef: ghcr.io/siderolabs/drbd:9.2.8-v1.7.6
- imageRef: ghcr.io/siderolabs/zfs:2.2.4-v1.7.6
output:

View File

@@ -1,2 +1,2 @@
cozystack:
image: ghcr.io/aenix-io/cozystack/cozystack:v0.12.0@sha256:0917812850fd0359d5ba78fd819c0e4ce6d7c12eed9cd46813e7284064b71d30
image: ghcr.io/aenix-io/cozystack/cozystack:v0.15.0@sha256:aeff26a80f84b4323578e613b3bf03caa842d617ec8d9ca98706867c1e70609f

View File

@@ -20,14 +20,11 @@ releases:
namespace: cozy-cilium
privileged: true
dependsOn: []
valuesFiles:
- values.yaml
- values-talos.yaml
values:
cilium:
bpf:
masquerade: true
cni:
chainingMode: ~
customConf: false
configMap: ""
enableIPv4Masquerade: true
enableIdentityMark: true
ipv4NativeRoutingCIDR: "{{ index $cozyConfig.data "ipv4-pod-cidr" }}"

View File

@@ -20,6 +20,10 @@ releases:
namespace: cozy-cilium
privileged: true
dependsOn: []
valuesFiles:
- values.yaml
- values-talos.yaml
- values-kubeovn.yaml
- name: kubeovn
releaseName: kubeovn

View File

@@ -39,6 +39,10 @@ spec:
kind: HelmRepository
name: cozystack-system
namespace: cozy-system
{{- with $x.valuesFiles }}
valuesFiles:
{{- toYaml $x.valuesFiles | nindent 6 }}
{{- end }}
{{- $values := dict }}
{{- with $x.values }}
{{- $values = merge . $values }}

View File

@@ -10,6 +10,7 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: cozystack-e2e-{{ .Release.Name }}
namespace: cozy-e2e-tests
spec:
replicas: 1
selector:

View File

@@ -1,2 +1,2 @@
e2e:
image: ghcr.io/aenix-io/cozystack/e2e-sandbox:v0.12.0@sha256:be1693c8ce6a9522499f79b1e42b2e08c7ca80405026a095299e5e990a3ab791
image: ghcr.io/aenix-io/cozystack/e2e-sandbox:v0.15.0@sha256:20cc84e4a11db31434881355c070113a7823501a28a6114ca02830b18607ad21

View File

@@ -25,7 +25,7 @@ spec:
resources:
requests:
storage: {{ .Values.size }}
{{- with .Values.stroageClass }}
{{- with .Values.storageClass }}
storageClassName: {{ . }}
{{- end }}
security:

View File

@@ -27,3 +27,6 @@ metadata:
spec:
replicaCount: 2
configSecret: alertmanager
podMetadata:
labels:
policy.cozystack.io/allow-to-apiserver: "true"

View File

@@ -34,7 +34,7 @@ spec:
- name: data1
type: "persistentVolumeClaim"
size: "{{ .Values.size }}"
{{- with .Values.stroageClass }}
{{- with .Values.storageClass }}
storageClass: {{ . }}
{{- end }}
maxVolumes: 0
@@ -50,7 +50,7 @@ spec:
cert-manager.io/cluster-issuer: letsencrypt-prod
tls:
- hosts:
- {{ .Values.host | default (printf "seaweedfs.%s" $host) }}
- {{ .Values.host | default (printf "s3.%s" $host) }}
secretName: {{ .Release.Name }}-s3-ingress-tls
cosi:

View File

@@ -11,6 +11,7 @@ monitoring 1.0.0 f642698
monitoring 1.1.0 15478a88
monitoring 1.2.0 c9e0d63b
monitoring 1.2.1 4471b4ba
monitoring 1.3.0 HEAD
monitoring 1.3.0 6c5cf5b
monitoring 1.4.0 HEAD
seaweedfs 0.1.0 5ca8823
seaweedfs 0.2.0 HEAD

View File

@@ -0,0 +1,18 @@
cilium:
sctp:
enabled: true
autoDirectNodeRoutes: false
bpf:
masquerade: false
cni:
chainingMode: generic-veth
chainingTarget: kube-ovn
customConf: true
configMap: cni-configuration
routingMode: native
enableIPv4Masquerade: false
enableIPv6Masquerade: false
enableIdentityMark: false
enableRuntimeDeviceDetection: true
forceDeviceDetection: true
devices: ovn0

View File

@@ -0,0 +1,7 @@
cilium:
cgroup:
autoMount:
enabled: false
hostRoot: /sys/fs/cgroup
k8sServiceHost: localhost
k8sServicePort: 7445

View File

@@ -1,36 +1,15 @@
cilium:
kubeProxyReplacement: true
hubble:
enabled: false
externalIPs:
enabled: true
autoDirectNodeRoutes: false
kubeProxyReplacement: true
bpf:
masquerade: false
nodePort:
enabled: true
loadBalancer:
algorithm: maglev
cgroup:
autoMount:
enabled: false
hostRoot: /sys/fs/cgroup
ipam:
mode: "kubernetes"
k8sServiceHost: localhost
k8sServicePort: 7445
cni:
chainingMode: generic-veth
customConf: true
configMap: cni-configuration
routingMode: native
enableIPv4Masquerade: false
enableIPv6Masquerade: false
enableIdentityMark: false
enableRuntimeDeviceDetection: true
forceDeviceDetection: true
devices: ovn0
extraEnv:
- name: CILIUM_ENFORCE_DEVICE_DETECTION
value: "true"
image:
repository: ghcr.io/aenix-io/cozystack/cilium
tag: 1.16.1

View File

@@ -33,11 +33,11 @@ kubeapps:
image:
registry: ghcr.io/aenix-io/cozystack
repository: dashboard
tag: v0.12.0
digest: sha256:4818712e9fc9c57cc321512760c3226af564a04e69d4b3ec9229ab91fd39abeb
tag: v0.15.0
digest: "sha256:4818712e9fc9c57cc321512760c3226af564a04e69d4b3ec9229ab91fd39abeb"
kubeappsapis:
image:
registry: ghcr.io/aenix-io/cozystack
repository: kubeapps-apis
tag: v0.12.0
digest: "sha256:5eee4c2207f23a6d5317c08bbedfd71b8b22f733b834cd370f1313fb428a22d0"
tag: v0.15.0
digest: "sha256:70c095c8f7e3ecfa11433a3a2c8f57f6ff5a0053f006939a2c171c180cc50baf"

View File

@@ -73,6 +73,7 @@ rules:
verbs:
- get
- list
- watch
- apiGroups:
- etcd.aenix.io
resources:

View File

@@ -19,3 +19,5 @@
.project
.idea/
*.tmproj
# Unit Tests
tests/

View File

@@ -1,5 +1,5 @@
apiVersion: v2
appVersion: 0.40.0
appVersion: 0.43.0
description: 'Strimzi: Apache Kafka running on Kubernetes'
home: https://strimzi.io/
icon: https://raw.githubusercontent.com/strimzi/strimzi-kafka-operator/main/documentation/logo/strimzi_logo.png
@@ -24,4 +24,4 @@ maintainers:
name: strimzi-kafka-operator
sources:
- https://github.com/strimzi/strimzi-kafka-operator
version: 0.40.0
version: 0.43.0

View File

@@ -9,8 +9,8 @@ Upgrading to Strimzi 0.32 and newer directly from Strimzi 0.22 and earlier is no
Please follow the [documentation](https://strimzi.io/docs/operators/latest/full/deploying.html#assembly-upgrade-str) for more details.
**!!! IMPORTANT !!!**
From Strimzi 0.40 on, we support only Kubernetes 1.23 and newer.
Kubernetes versions 1.21 and 1.22 are no longer supported.
Strimzi 0.43.0 (and any of its patch releases) is the last Strimzi version with support for Kubernetes 1.23 and 1.24.
From Strimzi 0.44.0 on, Strimzi will support only Kubernetes 1.25 and newer.
## Introduction
@@ -21,6 +21,7 @@ cluster using the [Helm](https://helm.sh) package manager.
### Supported Features
* **Manages the Kafka Cluster** - Deploys and manages all of the components of this complex application, including dependencies like Apache ZooKeeper® that are traditionally hard to administer.
* **KRaft support** - Allows running Apache Kafka clusters in the KRaft mode (without ZooKeeper).
* **Includes Kafka Connect** - Allows for configuration of common data sources and sinks to move data into and out of the Kafka cluster.
* **Topic Management** - Creates and manages Kafka Topics within the cluster.
* **User Management** - Creates and manages Kafka Users within the cluster.
@@ -91,11 +92,12 @@ the documentation for more details.
| Parameter | Description | Default |
|---------------------------------------------|---------------------------------------------------------------------------------|------------------------------|
| `replicas` | Number of replicas of the cluster operator | 1 |
| `revisionHistoryLimit` | Number of replicaSet to keep of the operator deployment | 10 |
| `watchNamespaces` | Comma separated list of additional namespaces for the strimzi-operator to watch | [] |
| `watchAnyNamespace` | Watch the whole Kubernetes cluster (all namespaces) | `false` |
| `defaultImageRegistry` | Default image registry for all the images | `quay.io` |
| `defaultImageRepository` | Default image registry for all the images | `strimzi` |
| `defaultImageTag` | Default image tag for all the images except Kafka Bridge | `0.40.0` |
| `defaultImageTag` | Default image tag for all the images except Kafka Bridge | `0.43.0` |
| `image.registry` | Override default Cluster Operator image registry | `nil` |
| `image.repository` | Override default Cluster Operator image repository | `nil` |
| `image.name` | Cluster Operator image name | `cluster-operator` |
@@ -156,16 +158,10 @@ the documentation for more details.
| `kafkaInit.image.name` | Init Kafka image name | `operator` |
| `kafkaInit.image.tag` | Override default Init Kafka image tag | `nil` |
| `kafkaInit.image.digest` | Override Init Kafka image tag with digest | `nil` |
| `tlsSidecarEntityOperator.image.registry` | Override default TLS Sidecar Entity Operator image registry | `nil` |
| `tlsSidecarEntityOperator.image.repository` | Override default TLS Sidecar Entity Operator image repository | `nil` |
| `tlsSidecarEntityOperator.image.name` | TLS Sidecar Entity Operator image name | `kafka` |
| `tlsSidecarEntityOperator.image.tagPrefix` | Override default TLS Sidecar Entity Operator image tag prefix | `nil` |
| `tlsSidecarEntityOperator.image.tag` | Override default TLS Sidecar Entity Operator image tag and ignore suffix | `nil` |
| `tlsSidecarEntityOperator.image.digest` | Override TLS Sidecar Entity Operator image tag with digest | `nil` |
| `kafkaBridge.image.registry` | Override default Kafka Bridge image registry | `quay.io` |
| `kafkaBridge.image.repository` | Override default Kafka Bridge image repository | `strimzi` |
| `kafkaBridge.image.name` | Kafka Bridge image name | `kafka-bridge` |
| `kafkaBridge.image.tag` | Override default Kafka Bridge image tag | `0.28.0` |
| `kafkaBridge.image.tag` | Override default Kafka Bridge image tag | `0.30.0` |
| `kafkaBridge.image.digest` | Override Kafka Bridge image tag with digest | `nil` |
| `kafkaExporter.image.registry` | Override default Kafka Exporter image registry | `nil` |
| `kafkaExporter.image.repository` | Override default Kafka Exporter image repository | `nil` |
@@ -184,9 +180,9 @@ the documentation for more details.
| `kanikoExecutor.image.name` | Kaniko Executor image name | `kaniko-executor` |
| `kanikoExecutor.image.tag` | Override default Kaniko Executor image tag | `nil` |
| `kanikoExecutor.image.digest` | Override Kaniko Executor image tag with digest | `nil` |
| `resources.limits.memory` | Memory constraint for limits | `256Mi` |
| `resources.limits.memory` | Memory constraint for limits | `384Mi` |
| `resources.limits.cpu` | CPU constraint for limits | `1000m` |
| `resources.requests.memory` | Memory constraint for requests | `256Mi` |
| `resources.requests.memory` | Memory constraint for requests | `384Mi` |
| `livenessProbe.initialDelaySeconds` | Liveness probe initial delay in seconds | 10 |
| `livenessProbe.periodSeconds` | Liveness probe period in seconds | 30 |
| `readinessProbe.initialDelaySeconds` | Readiness probe initial delay in seconds | 10 |
@@ -210,6 +206,7 @@ the documentation for more details.
| `mavenBuilder.image.tag` | Override default Maven Builder image tag | `nil` |
| `mavenBuilder.image.digest` | Override Maven Builder image tag with digest | `nil` |
| `logConfiguration` | Override default `log4j.properties` content | `nil` |
| `logLevel` | Override default logging level | `INFO` |
| `dashboards.enable` | Generate configmaps containing the dashboards | `false` |
| `dashboards.label` | How should the dashboards be labeled for the sidecar | `grafana_dashboard` |
| `dashboards.labelValue` | What should the dashboards label value be for the sidecar | `"1"` |

View File

@@ -74,14 +74,25 @@ spec:
items:
type: object
properties:
certificate:
type: string
description: The name of the file certificate in the Secret.
secretName:
type: string
description: The name of the Secret containing the certificate.
certificate:
type: string
description: The name of the file certificate in the secret.
pattern:
type: string
description: "Pattern for the certificate files in the secret. Use the link:https://en.wikipedia.org/wiki/Glob_(programming)[_glob syntax_] for the pattern. All files in the secret that match the pattern are used."
oneOf:
- properties:
certificate: {}
required:
- certificate
- properties:
pattern: {}
required:
- pattern
required:
- certificate
- secretName
description: Trusted certificates for TLS connection.
description: TLS configuration.
@@ -104,26 +115,48 @@ spec:
accessTokenIsJwt:
type: boolean
description: Configure whether access token should be treated as JWT. This should be set to `false` if the authorization server returns opaque tokens. Defaults to `true`.
accessTokenLocation:
type: string
description: Path to the token file containing an access token to be used for authentication.
audience:
type: string
description: "OAuth audience to use when authenticating against the authorization server. Some authorization servers require the audience to be explicitly set. The possible values depend on how the authorization server is configured. By default, `audience` is not specified when performing the token endpoint request."
certificateAndKey:
type: object
properties:
secretName:
type: string
description: The name of the Secret containing the certificate.
certificate:
type: string
description: The name of the file certificate in the Secret.
key:
type: string
description: The name of the private key in the Secret.
secretName:
type: string
description: The name of the Secret containing the certificate.
required:
- secretName
- certificate
- key
- secretName
description: Reference to the `Secret` which holds the certificate and private key pair.
clientAssertion:
type: object
properties:
key:
type: string
description: The key under which the secret value is stored in the Kubernetes Secret.
secretName:
type: string
description: The name of the Kubernetes Secret containing the secret value.
required:
- key
- secretName
description: Link to Kubernetes secret containing the client assertion which was manually configured for the client.
clientAssertionLocation:
type: string
description: Path to the file containing the client assertion to be used for authentication.
clientAssertionType:
type: string
description: "The client assertion type. If not set, and either `clientAssertion` or `clientAssertionLocation` is configured, this value defaults to `urn:ietf:params:oauth:client-assertion-type:jwt-bearer`."
clientId:
type: string
description: OAuth Client ID which the Kafka client can use to authenticate against the OAuth server and use the token endpoint URI.
@@ -164,15 +197,15 @@ spec:
passwordSecret:
type: object
properties:
password:
type: string
description: The name of the key in the Secret under which the password is stored.
secretName:
type: string
description: The name of the Secret containing the password.
password:
type: string
description: The name of the key in the Secret under which the password is stored.
required:
- password
- secretName
- password
description: Reference to the `Secret` which holds the password.
readTimeoutSeconds:
type: integer
@@ -190,6 +223,11 @@ spec:
- key
- secretName
description: Link to Kubernetes Secret containing the refresh token which can be used to obtain access token from the authorization server.
saslExtensions:
additionalProperties:
type: string
type: object
description: SASL extensions parameters.
scope:
type: string
description: OAuth scope to use when authenticating against the authorization server. Some authorization servers require this to be set. The possible values depend on how authorization server is configured. By default `scope` is not specified when doing the token endpoint request.
@@ -198,14 +236,25 @@ spec:
items:
type: object
properties:
certificate:
type: string
description: The name of the file certificate in the Secret.
secretName:
type: string
description: The name of the Secret containing the certificate.
certificate:
type: string
description: The name of the file certificate in the secret.
pattern:
type: string
description: "Pattern for the certificate files in the secret. Use the link:https://en.wikipedia.org/wiki/Glob_(programming)[_glob syntax_] for the pattern. All files in the secret that match the pattern are used."
oneOf:
- properties:
certificate: {}
required:
- certificate
- properties:
pattern: {}
required:
- pattern
required:
- certificate
- secretName
description: Trusted certificates for TLS connection to the OAuth server.
tokenEndpointUri:
@@ -241,23 +290,33 @@ spec:
name:
type: string
limits:
x-kubernetes-preserve-unknown-fields: true
additionalProperties:
anyOf:
- type: integer
- type: string
pattern: "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$"
x-kubernetes-int-or-string: true
type: object
requests:
x-kubernetes-preserve-unknown-fields: true
additionalProperties:
anyOf:
- type: integer
- type: string
pattern: "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$"
x-kubernetes-int-or-string: true
type: object
description: The maximum limits for CPU and memory resources and the requested initial resources.
livenessProbe:
type: object
properties:
failureThreshold:
type: integer
minimum: 1
description: Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1.
initialDelaySeconds:
type: integer
minimum: 0
description: The initial delay before first the health is first checked. Default to 15 seconds. Minimum value is 0.
timeoutSeconds:
type: integer
minimum: 1
description: The timeout for each attempted health check. Default to 5 seconds. Minimum value is 1.
periodSeconds:
type: integer
minimum: 1
@@ -266,22 +325,22 @@ spec:
type: integer
minimum: 1
description: Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness. Minimum value is 1.
timeoutSeconds:
failureThreshold:
type: integer
minimum: 1
description: The timeout for each attempted health check. Default to 5 seconds. Minimum value is 1.
description: Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1.
description: Pod liveness checking.
readinessProbe:
type: object
properties:
failureThreshold:
type: integer
minimum: 1
description: Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1.
initialDelaySeconds:
type: integer
minimum: 0
description: The initial delay before first the health is first checked. Default to 15 seconds. Minimum value is 0.
timeoutSeconds:
type: integer
minimum: 1
description: The timeout for each attempted health check. Default to 5 seconds. Minimum value is 1.
periodSeconds:
type: integer
minimum: 1
@@ -290,10 +349,10 @@ spec:
type: integer
minimum: 1
description: Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness. Minimum value is 1.
timeoutSeconds:
failureThreshold:
type: integer
minimum: 1
description: The timeout for each attempted health check. Default to 5 seconds. Minimum value is 1.
description: Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1.
description: Pod readiness checking.
jvmOptions:
type: object
@@ -303,14 +362,14 @@ spec:
type: string
type: object
description: A map of -XX options to the JVM.
"-Xms":
type: string
pattern: "^[0-9]+[mMgG]?$"
description: -Xms option to to the JVM.
"-Xmx":
type: string
pattern: "^[0-9]+[mMgG]?$"
description: -Xmx option to to the JVM.
"-Xms":
type: string
pattern: "^[0-9]+[mMgG]?$"
description: -Xms option to to the JVM.
gcLoggingEnabled:
type: boolean
description: Specifies whether the Garbage Collection logging is enabled. The default is false.
@@ -386,6 +445,32 @@ spec:
required:
- topologyKey
description: Configuration of the node label which will be used as the `client.rack` consumer configuration.
metricsConfig:
type: object
properties:
type:
type: string
enum:
- jmxPrometheusExporter
description: Metrics type. Only 'jmxPrometheusExporter' supported currently.
valueFrom:
type: object
properties:
configMapKeyRef:
type: object
properties:
key:
type: string
name:
type: string
optional:
type: boolean
description: Reference to the key in the ConfigMap containing the configuration.
description: 'ConfigMap entry where the Prometheus JMX Exporter configuration is stored. '
required:
- type
- valueFrom
description: Metrics configuration.
tracing:
type: object
properties:
@@ -471,6 +556,13 @@ spec:
securityContext:
type: object
properties:
appArmorProfile:
type: object
properties:
localhostProfile:
type: string
type:
type: string
fsGroup:
type: integer
fsGroupChangePolicy:
@@ -873,31 +965,6 @@ spec:
value:
type: string
description: The pod's tolerations.
priorityClassName:
type: string
description: 'The name of the priority class used to assign priority to the pods. '
schedulerName:
type: string
description: "The name of the scheduler used to dispatch this `Pod`. If not specified, the default scheduler will be used."
hostAliases:
type: array
items:
type: object
properties:
hostnames:
type: array
items:
type: string
ip:
type: string
description: The pod's HostAliases. HostAliases is an optional list of hosts and IPs that will be injected into the Pod's hosts file if specified.
tmpDirSizeLimit:
type: string
pattern: "^([0-9.]+)([eEinumkKMGTP]*[-+]?[0-9]*)$"
description: Defines the total amount (for example `1Gi`) of local storage required for temporary EmptyDir volume (`/tmp`). Default value is `5Mi`.
enableServiceLinks:
type: boolean
description: Indicates whether information about services should be injected into Pod's environment variables.
topologySpreadConstraints:
type: array
items:
@@ -940,6 +1007,110 @@ spec:
whenUnsatisfiable:
type: string
description: The pod's topology spread constraints.
priorityClassName:
type: string
description: 'The name of the priority class used to assign priority to the pods. '
schedulerName:
type: string
description: "The name of the scheduler used to dispatch this `Pod`. If not specified, the default scheduler will be used."
hostAliases:
type: array
items:
type: object
properties:
hostnames:
type: array
items:
type: string
ip:
type: string
description: The pod's HostAliases. HostAliases is an optional list of hosts and IPs that will be injected into the Pod's hosts file if specified.
enableServiceLinks:
type: boolean
description: Indicates whether information about services should be injected into Pod's environment variables.
tmpDirSizeLimit:
type: string
pattern: "^([0-9.]+)([eEinumkKMGTP]*[-+]?[0-9]*)$"
description: "Defines the total amount of pod memory allocated for the temporary `EmptyDir` volume `/tmp`. Specify the allocation in memory units, for example, `100Mi` for 100 mebibytes. Default value is `5Mi`. The `/tmp` volume is backed by pod memory, not disk storage, so avoid setting a high value as it consumes pod memory resources."
volumes:
type: array
items:
type: object
properties:
name:
type: string
description: Name to use for the volume. Required.
secret:
type: object
properties:
defaultMode:
type: integer
items:
type: array
items:
type: object
properties:
key:
type: string
mode:
type: integer
path:
type: string
optional:
type: boolean
secretName:
type: string
description: Secret to use populate the volume.
configMap:
type: object
properties:
defaultMode:
type: integer
items:
type: array
items:
type: object
properties:
key:
type: string
mode:
type: integer
path:
type: string
name:
type: string
optional:
type: boolean
description: ConfigMap to use to populate the volume.
emptyDir:
type: object
properties:
medium:
type: string
sizeLimit:
type: object
properties:
amount:
type: string
format:
type: string
description: EmptyDir to use to populate the volume.
persistentVolumeClaim:
type: object
properties:
claimName:
type: string
readOnly:
type: boolean
description: PersistentVolumeClaim object to use to populate the volume.
oneOf:
- properties:
secret: {}
configMap: {}
emptyDir: {}
persistentVolumeClaim: {}
required: []
description: Additional volumes that can be mounted to the pod.
description: Template for Kafka Connect `Pods`.
apiService:
type: object
@@ -1027,6 +1198,13 @@ spec:
properties:
allowPrivilegeEscalation:
type: boolean
appArmorProfile:
type: object
properties:
localhostProfile:
type: string
type:
type: string
capabilities:
type: object
properties:
@@ -1080,6 +1258,26 @@ spec:
runAsUserName:
type: string
description: Security context for the container.
volumeMounts:
type: array
items:
type: object
properties:
mountPath:
type: string
mountPropagation:
type: string
name:
type: string
readOnly:
type: boolean
recursiveReadOnly:
type: string
subPath:
type: string
subPathExpr:
type: string
description: Additional volume mounts which should be applied to the container.
description: Template for the Kafka Connect container.
initContainer:
type: object
@@ -1101,6 +1299,13 @@ spec:
properties:
allowPrivilegeEscalation:
type: boolean
appArmorProfile:
type: object
properties:
localhostProfile:
type: string
type:
type: string
capabilities:
type: object
properties:
@@ -1154,6 +1359,26 @@ spec:
runAsUserName:
type: string
description: Security context for the container.
volumeMounts:
type: array
items:
type: object
properties:
mountPath:
type: string
mountPropagation:
type: string
name:
type: string
readOnly:
type: boolean
recursiveReadOnly:
type: string
subPath:
type: string
subPathExpr:
type: string
description: Additional volume mounts which should be applied to the container.
description: Template for the Kafka init container.
podDisruptionBudget:
type: object
@@ -1241,6 +1466,13 @@ spec:
securityContext:
type: object
properties:
appArmorProfile:
type: object
properties:
localhostProfile:
type: string
type:
type: string
fsGroup:
type: integer
fsGroupChangePolicy:
@@ -1643,31 +1875,6 @@ spec:
value:
type: string
description: The pod's tolerations.
priorityClassName:
type: string
description: 'The name of the priority class used to assign priority to the pods. '
schedulerName:
type: string
description: "The name of the scheduler used to dispatch this `Pod`. If not specified, the default scheduler will be used."
hostAliases:
type: array
items:
type: object
properties:
hostnames:
type: array
items:
type: string
ip:
type: string
description: The pod's HostAliases. HostAliases is an optional list of hosts and IPs that will be injected into the Pod's hosts file if specified.
tmpDirSizeLimit:
type: string
pattern: "^([0-9.]+)([eEinumkKMGTP]*[-+]?[0-9]*)$"
description: Defines the total amount (for example `1Gi`) of local storage required for temporary EmptyDir volume (`/tmp`). Default value is `5Mi`.
enableServiceLinks:
type: boolean
description: Indicates whether information about services should be injected into Pod's environment variables.
topologySpreadConstraints:
type: array
items:
@@ -1710,6 +1917,110 @@ spec:
whenUnsatisfiable:
type: string
description: The pod's topology spread constraints.
priorityClassName:
type: string
description: 'The name of the priority class used to assign priority to the pods. '
schedulerName:
type: string
description: "The name of the scheduler used to dispatch this `Pod`. If not specified, the default scheduler will be used."
hostAliases:
type: array
items:
type: object
properties:
hostnames:
type: array
items:
type: string
ip:
type: string
description: The pod's HostAliases. HostAliases is an optional list of hosts and IPs that will be injected into the Pod's hosts file if specified.
enableServiceLinks:
type: boolean
description: Indicates whether information about services should be injected into Pod's environment variables.
tmpDirSizeLimit:
type: string
pattern: "^([0-9.]+)([eEinumkKMGTP]*[-+]?[0-9]*)$"
description: "Defines the total amount of pod memory allocated for the temporary `EmptyDir` volume `/tmp`. Specify the allocation in memory units, for example, `100Mi` for 100 mebibytes. Default value is `5Mi`. The `/tmp` volume is backed by pod memory, not disk storage, so avoid setting a high value as it consumes pod memory resources."
volumes:
type: array
items:
type: object
properties:
name:
type: string
description: Name to use for the volume. Required.
secret:
type: object
properties:
defaultMode:
type: integer
items:
type: array
items:
type: object
properties:
key:
type: string
mode:
type: integer
path:
type: string
optional:
type: boolean
secretName:
type: string
description: Secret to use populate the volume.
configMap:
type: object
properties:
defaultMode:
type: integer
items:
type: array
items:
type: object
properties:
key:
type: string
mode:
type: integer
path:
type: string
name:
type: string
optional:
type: boolean
description: ConfigMap to use to populate the volume.
emptyDir:
type: object
properties:
medium:
type: string
sizeLimit:
type: object
properties:
amount:
type: string
format:
type: string
description: EmptyDir to use to populate the volume.
persistentVolumeClaim:
type: object
properties:
claimName:
type: string
readOnly:
type: boolean
description: PersistentVolumeClaim object to use to populate the volume.
oneOf:
- properties:
secret: {}
configMap: {}
emptyDir: {}
persistentVolumeClaim: {}
required: []
description: Additional volumes that can be mounted to the pod.
description: Template for Kafka Connect Build `Pods`. The build pod is used only on Kubernetes.
buildContainer:
type: object
@@ -1731,6 +2042,13 @@ spec:
properties:
allowPrivilegeEscalation:
type: boolean
appArmorProfile:
type: object
properties:
localhostProfile:
type: string
type:
type: string
capabilities:
type: object
properties:
@@ -1784,6 +2102,26 @@ spec:
runAsUserName:
type: string
description: Security context for the container.
volumeMounts:
type: array
items:
type: object
properties:
mountPath:
type: string
mountPropagation:
type: string
name:
type: string
readOnly:
type: boolean
recursiveReadOnly:
type: string
subPath:
type: string
subPathExpr:
type: string
description: Additional volume mounts which should be applied to the container.
description: Template for the Kafka Connect Build container. The build container is used only on Kubernetes.
buildConfig:
type: object
@@ -1842,7 +2180,7 @@ spec:
description: Annotations added to the Kubernetes resource.
description: Metadata applied to the resource.
description: Template for Secret of the Kafka Connect Cluster JMX authentication.
description: "Template for Kafka Connect and Kafka Mirror Maker 2 resources. The template allows users to specify how the `Pods`, `Service`, and other services are generated."
description: "Template for Kafka Connect and Kafka MirrorMaker 2 resources. The template allows users to specify how the `Pods`, `Service`, and other services are generated."
externalConfiguration:
type: object
properties:
@@ -1857,16 +2195,6 @@ spec:
valueFrom:
type: object
properties:
configMapKeyRef:
type: object
properties:
key:
type: string
name:
type: string
optional:
type: boolean
description: Reference to a key in a ConfigMap.
secretKeyRef:
type: object
properties:
@@ -1877,6 +2205,16 @@ spec:
optional:
type: boolean
description: Reference to a key in a Secret.
configMapKeyRef:
type: object
properties:
key:
type: string
name:
type: string
optional:
type: boolean
description: Reference to a key in a ConfigMap.
description: Value of the environment variable which will be passed to the Kafka Connect pods. It can be passed either as a reference to Secret or ConfigMap field. The field has to specify exactly one Secret or ConfigMap.
required:
- name
@@ -1887,27 +2225,6 @@ spec:
items:
type: object
properties:
configMap:
type: object
properties:
defaultMode:
type: integer
items:
type: array
items:
type: object
properties:
key:
type: string
mode:
type: integer
path:
type: string
name:
type: string
optional:
type: boolean
description: Reference to a key in a ConfigMap. Exactly one Secret or ConfigMap has to be specified.
name:
type: string
description: Name of the volume which will be added to the Kafka Connect pods.
@@ -1932,6 +2249,27 @@ spec:
secretName:
type: string
description: Reference to a key in a Secret. Exactly one Secret or ConfigMap has to be specified.
configMap:
type: object
properties:
defaultMode:
type: integer
items:
type: array
items:
type: object
properties:
key:
type: string
mode:
type: integer
path:
type: string
name:
type: string
optional:
type: boolean
description: Reference to a key in a ConfigMap. Exactly one Secret or ConfigMap has to be specified.
required:
- name
description: Makes data from a Secret or ConfigMap available in the Kafka Connect pods as volumes.
@@ -1963,23 +2301,6 @@ spec:
- image
- type
description: Configures where should the newly built image be stored. Required.
resources:
type: object
properties:
claims:
type: array
items:
type: object
properties:
name:
type: string
limits:
x-kubernetes-preserve-unknown-fields: true
type: object
requests:
x-kubernetes-preserve-unknown-fields: true
type: object
description: CPU and memory resources to reserve for the build.
plugins:
type: array
items:
@@ -2035,36 +2356,37 @@ spec:
- name
- artifacts
description: List of connector plugins which should be added to the Kafka Connect. Required.
resources:
type: object
properties:
claims:
type: array
items:
type: object
properties:
name:
type: string
limits:
additionalProperties:
anyOf:
- type: integer
- type: string
pattern: "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$"
x-kubernetes-int-or-string: true
type: object
requests:
additionalProperties:
anyOf:
- type: integer
- type: string
pattern: "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$"
x-kubernetes-int-or-string: true
type: object
description: CPU and memory resources to reserve for the build.
required:
- output
- plugins
description: Configures how the Connect container image should be built. Optional.
metricsConfig:
type: object
properties:
type:
type: string
enum:
- jmxPrometheusExporter
description: Metrics type. Only 'jmxPrometheusExporter' supported currently.
valueFrom:
type: object
properties:
configMapKeyRef:
type: object
properties:
key:
type: string
name:
type: string
optional:
type: boolean
description: Reference to the key in the ConfigMap containing the configuration.
description: 'ConfigMap entry where the Prometheus JMX Exporter configuration is stored. '
required:
- type
- valueFrom
description: Metrics configuration.
required:
- bootstrapServers
description: The specification of the Kafka Connect cluster.
@@ -2103,20 +2425,20 @@ spec:
items:
type: object
properties:
class:
type: string
description: The class of the connector plugin.
type:
type: string
description: The type of the connector plugin. The available types are `sink` and `source`.
version:
type: string
description: The version of the connector plugin.
class:
type: string
description: The class of the connector plugin.
description: The list of connector plugins available in this Kafka Connect deployment.
labelSelector:
type: string
description: Label selector for pods providing this resource.
replicas:
type: integer
description: The current number of pods being used to provide this resource.
labelSelector:
type: string
description: Label selector for pods providing this resource.
description: The status of the Kafka Connect cluster.

View File

@@ -58,6 +58,9 @@ spec:
spec:
type: object
properties:
topicName:
type: string
description: The name of the topic. When absent this will default to the metadata.name of the topic. It is recommended to not set this unless the topic name is not a valid Kubernetes resource name.
partitions:
type: integer
minimum: 1
@@ -71,9 +74,6 @@ spec:
x-kubernetes-preserve-unknown-fields: true
type: object
description: The topic configuration.
topicName:
type: string
description: The name of the topic. When absent this will default to the metadata.name of the topic. It is recommended to not set this unless the topic name is not a valid Kubernetes resource name.
description: The specification of the topic.
status:
type: object
@@ -108,6 +108,25 @@ spec:
topicId:
type: string
description: "The topic's id. For a KafkaTopic with the ready condition, this will change only if the topic gets deleted and recreated with the same name."
replicasChange:
type: object
properties:
targetReplicas:
type: integer
description: The target replicas value requested by the user. This may be different from .spec.replicas when a change is ongoing.
state:
type: string
enum:
- pending
- ongoing
description: "Current state of the replicas change operation. This can be `pending`, when the change has been requested, or `ongoing`, when the change has been successfully submitted to Cruise Control."
message:
type: string
description: Message for the user related to the replicas change request. This may contain transient error messages that would disappear on periodic reconciliations.
sessionId:
type: string
description: The session identifier for replicas change requests pertaining to this KafkaTopic resource. This is used by the Topic Operator to track the status of `ongoing` replicas change operations.
description: Replication factor change status.
description: The status of the topic.
- name: v1beta1
served: true
@@ -146,6 +165,9 @@ spec:
spec:
type: object
properties:
topicName:
type: string
description: The name of the topic. When absent this will default to the metadata.name of the topic. It is recommended to not set this unless the topic name is not a valid Kubernetes resource name.
partitions:
type: integer
minimum: 1
@@ -159,9 +181,6 @@ spec:
x-kubernetes-preserve-unknown-fields: true
type: object
description: The topic configuration.
topicName:
type: string
description: The name of the topic. When absent this will default to the metadata.name of the topic. It is recommended to not set this unless the topic name is not a valid Kubernetes resource name.
description: The specification of the topic.
status:
type: object
@@ -196,6 +215,25 @@ spec:
topicId:
type: string
description: "The topic's id. For a KafkaTopic with the ready condition, this will change only if the topic gets deleted and recreated with the same name."
replicasChange:
type: object
properties:
targetReplicas:
type: integer
description: The target replicas value requested by the user. This may be different from .spec.replicas when a change is ongoing.
state:
type: string
enum:
- pending
- ongoing
description: "Current state of the replicas change operation. This can be `pending`, when the change has been requested, or `ongoing`, when the change has been successfully submitted to Cruise Control."
message:
type: string
description: Message for the user related to the replicas change request. This may contain transient error messages that would disappear on periodic reconciliations.
sessionId:
type: string
description: The session identifier for replicas change requests pertaining to this KafkaTopic resource. This is used by the Topic Operator to track the status of `ongoing` replicas change operations.
description: Replication factor change status.
description: The status of the topic.
- name: v1alpha1
served: true
@@ -234,6 +272,9 @@ spec:
spec:
type: object
properties:
topicName:
type: string
description: The name of the topic. When absent this will default to the metadata.name of the topic. It is recommended to not set this unless the topic name is not a valid Kubernetes resource name.
partitions:
type: integer
minimum: 1
@@ -247,9 +288,6 @@ spec:
x-kubernetes-preserve-unknown-fields: true
type: object
description: The topic configuration.
topicName:
type: string
description: The name of the topic. When absent this will default to the metadata.name of the topic. It is recommended to not set this unless the topic name is not a valid Kubernetes resource name.
description: The specification of the topic.
status:
type: object
@@ -284,4 +322,23 @@ spec:
topicId:
type: string
description: "The topic's id. For a KafkaTopic with the ready condition, this will change only if the topic gets deleted and recreated with the same name."
replicasChange:
type: object
properties:
targetReplicas:
type: integer
description: The target replicas value requested by the user. This may be different from .spec.replicas when a change is ongoing.
state:
type: string
enum:
- pending
- ongoing
description: "Current state of the replicas change operation. This can be `pending`, when the change has been requested, or `ongoing`, when the change has been successfully submitted to Cruise Control."
message:
type: string
description: Message for the user related to the replicas change request. This may contain transient error messages that would disappear on periodic reconciliations.
sessionId:
type: string
description: The session identifier for replicas change requests pertaining to this KafkaTopic resource. This is used by the Topic Operator to track the status of `ongoing` replicas change operations.
description: Replication factor change status.
description: The status of the topic.

Some files were not shown because too many files have changed in this diff Show More