Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync 0.14.1 to integration proxmox #343

Merged
merged 61 commits into from
Sep 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
e8eb5fd
Add opencost
kvaps Aug 5, 2024
c56e576
fix network-policies (#272)
kvaps Aug 12, 2024
2f0373d
Update LINSTOR v1.28 (#276)
kvaps Aug 12, 2024
94c688f
SeaweedFS (#131)
kvaps Aug 12, 2024
40fd96d
Update dashboard icons (#274)
kvaps Aug 12, 2024
bbdec9b
Update Cilium v1.16 (#277)
kvaps Aug 12, 2024
dd1d912
Update Talos Linux v1.7.6 (#279)
kvaps Aug 12, 2024
7151424
Prepare release v0.11.0 (#280)
kvaps Aug 12, 2024
a2bcf10
Update VPN (#287)
kvaps Aug 16, 2024
a120ce7
DX: Use generic Makefile for packages (#288)
kvaps Aug 16, 2024
4471b4b
Fix vmrules to process memory metrics (#289)
kvaps Aug 16, 2024
b3d4c9c
fix CSI label for tenant Kubernetes clusters (#291)
kvaps Aug 19, 2024
3b67f1f
Update Virtual Machine Chart Configuration and Documentation (#292)
artemrootman Aug 19, 2024
9be774a
Add e2e testing sandbox (#295)
kvaps Aug 20, 2024
5ca8823
Fix e2e tests (#296)
kvaps Aug 20, 2024
c07c4bb
Introduce stroageClass option for all applications (#290)
kvaps Aug 20, 2024
14d54bc
Update README.md (#298)
tym83 Aug 20, 2024
7106051
Add opportunity to override values for tenant Kubernetes clusters (#297)
kvaps Aug 21, 2024
fcccfd4
Update cilium v1.16.1 (#300)
kvaps Aug 21, 2024
9357ad4
Prepare release v0.12.0 (#301)
kvaps Aug 21, 2024
6c5cf5b
Prepare release v0.12.0 (#302)
kvaps Aug 21, 2024
adaf603
Add fluent-bit and VictoriaLogs (#305)
kvaps Aug 29, 2024
5b631a6
Update FerretDB v1.24.0 (#307)
kvaps Aug 29, 2024
cd991bd
fix e2e tests (specify namespace) (#309)
kvaps Aug 29, 2024
b908400
fix: typo in storageClass (#310)
kvaps Aug 30, 2024
4282843
Rework VirtualMachine, introduce cloudinit and sshKeys configuration,…
artemrootman Aug 30, 2024
697bbd5
Update KubeVirt v1.3.1 (#311)
kvaps Aug 30, 2024
9ae098c
Update CDI v1.60.2 (#312)
kvaps Aug 30, 2024
dc69adc
Revert "Update KubeVirt v1.3.1" (#313)
kvaps Aug 30, 2024
9b6dd19
Update KubeVirt v1.3.1 (#314)
kvaps Aug 30, 2024
5efef2e
use bridge binding for Kubernetes VMs (#315)
kvaps Aug 30, 2024
55282ac
vm: use block volumes to enable live-migration (#316)
kvaps Aug 30, 2024
0e7dc14
KubeVirt: enable expand disks feature (#317)
kvaps Aug 30, 2024
b7bfc4c
VM: fix Alpine Image (#318)
kvaps Aug 30, 2024
4746d51
VM: add Talos Linux (#319)
kvaps Aug 30, 2024
53fae0d
cilium: enable SCTP feature (#320)
kvaps Aug 30, 2024
0058214
Introduce valuesFiles for various Cilium configurations (#322)
kvaps Aug 30, 2024
c79399a
cilium node port (#323)
kvaps Aug 30, 2024
b8e33d1
Prepare release v0.13.0 (#321)
kvaps Aug 31, 2024
9e33dc0
Update seaweedfs.yaml (#325)
mrkhachaturov Sep 2, 2024
36d8855
Update RabbitMQ and add configuration for Users and VHosts (#327)
kvaps Sep 4, 2024
aa2f553
Update mariadb-operator and mysql chart (#328)
kvaps Sep 4, 2024
def2eb0
Add passwords generation to FerretDB (#329)
kvaps Sep 4, 2024
02a623b
Update CNPG 1.24.0 (#331)
kvaps Sep 4, 2024
b00621e
Add passwords generation to postgres (#330)
kvaps Sep 4, 2024
93018c4
Add passwords generation to ClickHouse (#332)
kvaps Sep 4, 2024
b40e1b0
Prepare release v0.14.0 (#333)
kvaps Sep 4, 2024
1f83838
fix: better gitignore (#334)
gecube Sep 5, 2024
59a4e08
RabbitMQ: fix accessing Kubernetes API when netwrok-policies are enab…
kvaps Sep 6, 2024
b537cc0
fix cilium kubeProxyReplacement (#336)
kvaps Sep 6, 2024
1128d0c
Prepare release v0.14.1 (#338)
kvaps Sep 6, 2024
a55630d
Talos Linux: Update firmwares and add metal image
kvaps Sep 10, 2024
240a82f
fix Kamaji OOM (#340)
kvaps Sep 10, 2024
14a8a34
Merge pull request #341 from aenix-io/talos-metal
themoriarti Sep 10, 2024
06e79cd
Merge pull request #255 from aenix-io/opencost
themoriarti Sep 12, 2024
b3ee563
bugfix/strimzi-kafka-operator-fix-cluster-dns (#347)
klinch0 Sep 15, 2024
4b84798
Add backups for ClickHouse
kvaps Sep 12, 2024
fab5940
Fix backups for MariaDB and Postgres
kvaps Sep 12, 2024
320fc32
Fix HTTP-cache image tag
kvaps Sep 12, 2024
2a4768a
Update infromation about backups
kvaps Sep 12, 2024
0d3b8fc
Fix FerretDB backups
kvaps Sep 12, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
77 changes: 76 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -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
9 changes: 9 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,15 @@

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
make -C packages/system/dashboard image
make -C packages/system/kamaji image
make -C packages/core/testing image
make -C packages/core/installer image
make manifests

Expand All @@ -26,3 +30,8 @@ repos:

assets:
make -C packages/core/installer/ assets

test:
make -C packages/core/testing apply
make -C packages/core/testing test
make -C packages/core/testing delete
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ Commits are used to generate the changelog, and their author will be referenced

In case of **Feature Requests** please use the [Discussion's Feature Request section](https://github.com/aenix-io/cozystack/discussions/categories/feature-requests).

You can join our weekly community meetings (just add this events to your [Google Calendar](https://calendar.google.com/calendar?cid=ZTQzZDIxZTVjOWI0NWE5NWYyOGM1ZDY0OWMyY2IxZTFmNDMzZTJlNjUzYjU2ZGJiZGE3NGNhMzA2ZjBkMGY2OEBncm91cC5jYWxlbmRhci5nb29nbGUuY29t) or [iCal](https://calendar.google.com/calendar/ical/e43d21e5c9b45a95f28c5d649c2cb1e1f433e2e653b56dbbda74ca306f0d0f68%40group.calendar.google.com/public/basic.ics)) or [Telegram group](https://t.me/cozystack).

## License

Cozystack is licensed under Apache 2.0.
Expand Down
18 changes: 12 additions & 6 deletions hack/e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ ip link add cozy-br0 type bridge
ip link set cozy-br0 up
ip addr add 192.168.123.1/24 dev cozy-br0

# Enable forward & masquerading
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -s 192.168.123.0/24 -j MASQUERADE
# Enable masquerading
iptables -t nat -D POSTROUTING -s 192.168.123.0/24 ! -d 192.168.123.0/24 -j MASQUERADE 2>/dev/null || true
iptables -t nat -A POSTROUTING -s 192.168.123.0/24 ! -d 192.168.123.0/24 -j MASQUERADE

rm -rf srv1 srv2 srv3
mkdir -p srv1 srv2 srv3
Expand Down Expand Up @@ -287,7 +287,8 @@ kubectl patch -n tenant-root hr/tenant-root --type=merge -p '{"spec":{ "values":
"host": "example.org",
"ingress": true,
"monitoring": true,
"etcd": true
"etcd": true,
"isolated": true
}}}'

# Wait for HelmRelease be created
Expand All @@ -296,6 +297,10 @@ timeout 60 sh -c 'until kubectl get hr -n tenant-root etcd ingress monitoring te
# Wait for HelmReleases be installed
kubectl wait --timeout=2m --for=condition=ready -n tenant-root hr etcd ingress monitoring tenant-root

kubectl patch -n tenant-root hr/ingress --type=merge -p '{"spec":{ "values":{
"dashboard": true
}}}'

# Wait for nginx-ingress-controller
timeout 60 sh -c 'until kubectl get deploy -n tenant-root root-ingress-controller; do sleep 1; done'
kubectl wait --timeout=5m --for=condition=available -n tenant-root deploy root-ingress-controller
Expand All @@ -304,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 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
Expand Down
20 changes: 16 additions & 4 deletions hack/gen_versions_map.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions manifests/cozystack-installer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ spec:
serviceAccountName: cozystack
containers:
- name: cozystack
image: "ghcr.io/aenix-io/cozystack/cozystack:v0.10.1"
image: "ghcr.io/aenix-io/cozystack/cozystack:v0.14.1"
env:
- name: KUBERNETES_SERVICE_HOST
value: localhost
Expand All @@ -87,7 +87,7 @@ spec:
fieldRef:
fieldPath: metadata.name
- name: darkhttpd
image: "ghcr.io/aenix-io/cozystack/cozystack:v0.10.1"
image: "ghcr.io/aenix-io/cozystack/cozystack:v0.14.1"
command:
- /usr/bin/darkhttpd
- /cozystack/assets
Expand Down
25 changes: 25 additions & 0 deletions packages/apps/bucket/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
apiVersion: v2
name: bucket
description: S3 compatible storage
icon: /logos/bucket.svg

# A chart can be either an 'application' or a 'library' chart.
#
# Application charts are a collection of templates that can be packaged into versioned archives
# to be deployed.
#
# Library charts provide useful utilities or functions for the chart developer. They're included as
# a dependency of application charts to inject those utilities and functions into the rendering
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
type: application

# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "0.1.0"
4 changes: 4 additions & 0 deletions packages/apps/bucket/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
include ../../../scripts/package.mk

generate:
readme-generator -v values.yaml -s values.schema.json -r README.md
12 changes: 12 additions & 0 deletions packages/apps/bucket/logos/bucket.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions packages/apps/bucket/templates/bucketclaim.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{{- $myNS := lookup "v1" "Namespace" "" .Release.Namespace }}
{{- $seaweedfs := index $myNS.metadata.annotations "namespace.cozystack.io/seaweedfs" }}
apiVersion: objectstorage.k8s.io/v1alpha1
kind: BucketClaim
metadata:
name: {{ .Release.Name }}
spec:
bucketClassName: {{ $seaweedfs }}
protocols:
- s3
---
apiVersion: objectstorage.k8s.io/v1alpha1
kind: BucketAccess
metadata:
name: {{ .Release.Name }}
spec:
bucketAccessClassName: {{ $seaweedfs }}
bucketClaimName: {{ .Release.Name }}
credentialsSecretName: {{ .Release.Name }}
protocol: s3
12 changes: 12 additions & 0 deletions packages/apps/bucket/templates/dashboard-resourcemap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: {{ .Release.Name }}-dashboard-resources
rules:
- apiGroups:
- ""
resources:
- secrets
resourceNames:
- {{ .Release.Name }}
verbs: ["get", "list", "watch"]
2 changes: 1 addition & 1 deletion packages/apps/clickhouse/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.2.1
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
Expand Down
18 changes: 18 additions & 0 deletions packages/apps/clickhouse/Makefile
Original file line number Diff line number Diff line change
@@ -1,2 +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
39 changes: 34 additions & 5 deletions packages/apps/clickhouse/README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,46 @@
# 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

| Name | Description | Value |
| ---------- | ----------------------------- | ------ |
| `size` | Persistent Volume size | `10Gi` |
| `shards` | Number of Clickhouse replicas | `1` |
| `replicas` | Number of Clickhouse shards | `2` |
| Name | Description | Value |
| -------------- | ----------------------------------- | ------ |
| `size` | Persistent Volume size | `10Gi` |
| `shards` | Number of Clickhouse replicas | `1` |
| `replicas` | Number of Clickhouse shards | `2` |
| `storageClass` | StorageClass used to store the data | `""` |

### Configuration parameters

| 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` |
1 change: 1 addition & 0 deletions packages/apps/clickhouse/images/clickhouse-backup.tag
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ghcr.io/aenix-io/cozystack/clickhouse-backup:latest@sha256:dda84420cb8648721299221268a00d72a05c7af5b7fb452619bac727068b9e61
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
FROM clickhouse/clickhouse-server:24.8.4-alpine
RUN apk add --no-cache restic uuidgen
12 changes: 11 additions & 1 deletion packages/apps/clickhouse/logos/clickhouse.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading