mirror of
https://github.com/cozystack/cozystack.git
synced 2026-03-03 21:48:57 +00:00
Compare commits
106 Commits
fix-lists
...
release-0.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4568432d74 | ||
|
|
820024ff97 | ||
|
|
9bef5a8840 | ||
|
|
63ff4dbc5c | ||
|
|
6cbe6d9fd1 | ||
|
|
5495fde0e3 | ||
|
|
c7cb1ba97c | ||
|
|
4dfb3086a1 | ||
|
|
3dbd069e18 | ||
|
|
4e3c5f4759 | ||
|
|
a435db3bb2 | ||
|
|
e6d8dc2446 | ||
|
|
2857a6e725 | ||
|
|
e04e21ebab | ||
|
|
106f4b8edc | ||
|
|
26da347de8 | ||
|
|
dd2798dbda | ||
|
|
fb5b4da2b2 | ||
|
|
540e1c6e0d | ||
|
|
1dd8e00e17 | ||
|
|
79165ca2f9 | ||
|
|
a8bd179f0d | ||
|
|
1491535b35 | ||
|
|
290c6be04b | ||
|
|
03328dc4e4 | ||
|
|
9311a9e547 | ||
|
|
548b2c0ed3 | ||
|
|
202ff3433e | ||
|
|
891195018f | ||
|
|
d53861837f | ||
|
|
f1a75ab864 | ||
|
|
2110534e63 | ||
|
|
2e22a6579e | ||
|
|
35907dd474 | ||
|
|
af56c105c2 | ||
|
|
30e5b71e3f | ||
|
|
c7f478fc7d | ||
|
|
d53506ae2a | ||
|
|
8bc62d4c71 | ||
|
|
0b27f634c0 | ||
|
|
9d1fb4ccf2 | ||
|
|
27efd3ad5e | ||
|
|
7b20e3f4cc | ||
|
|
5d354a07d6 | ||
|
|
aa8062c41c | ||
|
|
9ceb59e74c | ||
|
|
0df528a89d | ||
|
|
d70197c825 | ||
|
|
f2f8da0be1 | ||
|
|
094ee6da55 | ||
|
|
f256575fce | ||
|
|
d1ad38dd01 | ||
|
|
bc1fed4079 | ||
|
|
0b29ffefe0 | ||
|
|
c72a9333e9 | ||
|
|
d46cccda71 | ||
|
|
b5b12d0684 | ||
|
|
8283714930 | ||
|
|
aa428457db | ||
|
|
975011e04e | ||
|
|
0d88aa394a | ||
|
|
ec1a150d2c | ||
|
|
cbc6cd2567 | ||
|
|
fb7e39eaab | ||
|
|
9cc348733f | ||
|
|
00e0f45de3 | ||
|
|
b5c264de7d | ||
|
|
4ff60e4539 | ||
|
|
294458e7c4 | ||
|
|
42cb0e6974 | ||
|
|
73bf0e5f7e | ||
|
|
f512061a1c | ||
|
|
12db4fc520 | ||
|
|
91ddbb06ef | ||
|
|
7d2250be4d | ||
|
|
a070573af9 | ||
|
|
492aef93f5 | ||
|
|
23e6cf735a | ||
|
|
c5b1177149 | ||
|
|
84133ef2d3 | ||
|
|
1c9ae2bec5 | ||
|
|
bdff61eaed | ||
|
|
3d4ad39bce | ||
|
|
f2f575b450 | ||
|
|
aba4d2c977 | ||
|
|
e4021bbf57 | ||
|
|
ef8612e882 | ||
|
|
32b58dec5f | ||
|
|
1bafb7fb4f | ||
|
|
bc61d13ad3 | ||
|
|
972548cab4 | ||
|
|
bb8d07d384 | ||
|
|
6fdc9b0bad | ||
|
|
9c040cd42f | ||
|
|
5414d37376 | ||
|
|
a9818a7ce7 | ||
|
|
1651d94291 | ||
|
|
2b4afde373 | ||
|
|
a5c9bfabee | ||
|
|
143832c0b4 | ||
|
|
298206efc7 | ||
|
|
c81b222cf6 | ||
|
|
9d6af84449 | ||
|
|
7ddd9cf4a8 | ||
|
|
a861814c24 | ||
|
|
d65d293fbc |
3
.github/workflows/pull-requests.yaml
vendored
3
.github/workflows/pull-requests.yaml
vendored
@@ -33,6 +33,9 @@ jobs:
|
||||
fetch-depth: 0
|
||||
fetch-tags: true
|
||||
|
||||
- name: Run unit tests
|
||||
run: make unit-tests
|
||||
|
||||
- name: Set up Docker config
|
||||
run: |
|
||||
if [ -d ~/.docker ]; then
|
||||
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,4 +1,5 @@
|
||||
_out
|
||||
_repos
|
||||
.git
|
||||
.idea
|
||||
.vscode
|
||||
|
||||
38
AGENTS.md
Normal file
38
AGENTS.md
Normal file
@@ -0,0 +1,38 @@
|
||||
# AI Agents Overview
|
||||
|
||||
This file provides structured guidance for AI coding assistants and agents
|
||||
working with the **Cozystack** project.
|
||||
|
||||
## Agent Documentation
|
||||
|
||||
| Agent | Purpose |
|
||||
|-------|---------|
|
||||
| [overview.md](./docs/agents/overview.md) | Project structure and conventions |
|
||||
| [contributing.md](./docs/agents/contributing.md) | Commits, pull requests, and git workflow |
|
||||
| [changelog.md](./docs/agents/changelog.md) | Changelog generation instructions |
|
||||
| [releasing.md](./docs/agents/releasing.md) | Release process and workflow |
|
||||
|
||||
## Project Overview
|
||||
|
||||
**Cozystack** is a Kubernetes-based platform for building cloud infrastructure with managed services (databases, VMs, K8s clusters), multi-tenancy, and GitOps delivery.
|
||||
|
||||
## Quick Reference
|
||||
|
||||
### Code Structure
|
||||
- `packages/core/` - Core platform charts (installer, platform)
|
||||
- `packages/system/` - System components (CSI, CNI, operators)
|
||||
- `packages/apps/` - User-facing applications in catalog
|
||||
- `packages/extra/` - Tenant-specific modules
|
||||
- `cmd/`, `internal/`, `pkg/` - Go code
|
||||
- `api/` - Kubernetes CRDs
|
||||
|
||||
### Conventions
|
||||
- **Helm Charts**: Umbrella pattern, vendored upstream charts in `charts/`
|
||||
- **Go Code**: Controller-runtime patterns, kubebuilder style
|
||||
- **Git Commits**: `[component] Description` format with `--signoff`
|
||||
|
||||
### What NOT to Do
|
||||
- ❌ Edit `/vendor/`, `zz_generated.*.go`, upstream charts directly
|
||||
- ❌ Modify `go.mod`/`go.sum` manually (use `go get`)
|
||||
- ❌ Force push to main/master
|
||||
- ❌ Commit built artifacts from `_out`
|
||||
7
Makefile
7
Makefile
@@ -1,4 +1,4 @@
|
||||
.PHONY: manifests repos assets
|
||||
.PHONY: manifests repos assets unit-tests helm-unit-tests
|
||||
|
||||
build-deps:
|
||||
@command -V find docker skopeo jq gh helm > /dev/null
|
||||
@@ -46,6 +46,11 @@ test:
|
||||
make -C packages/core/testing apply
|
||||
make -C packages/core/testing test
|
||||
|
||||
unit-tests: helm-unit-tests
|
||||
|
||||
helm-unit-tests:
|
||||
hack/helm-unit-tests.sh
|
||||
|
||||
prepare-env:
|
||||
make -C packages/core/testing apply
|
||||
make -C packages/core/testing prepare-cluster
|
||||
|
||||
666
docs/agents/changelog.md
Normal file
666
docs/agents/changelog.md
Normal file
@@ -0,0 +1,666 @@
|
||||
# Changelog Generation Instructions
|
||||
|
||||
This file contains detailed instructions for AI-powered IDE on how to generate changelogs for Cozystack releases.
|
||||
|
||||
## When to use these instructions
|
||||
|
||||
Follow these instructions when the user explicitly asks to generate a changelog.
|
||||
|
||||
## Required Tools
|
||||
|
||||
Before generating changelogs, ensure you have access to `gh` (GitHub CLI) tool, which is used to fetch commit and PR author information. The GitHub CLI is used to correctly identify PR authors from commits and pull requests.
|
||||
|
||||
## Changelog Generation Process
|
||||
|
||||
When the user asks to generate a changelog, follow these steps in the specified order:
|
||||
|
||||
**CHECKLIST - All actions that must be completed:**
|
||||
- [ ] Step 1: Update information from remote (git fetch)
|
||||
- [ ] Step 2: Check current branch (must be main)
|
||||
- [ ] Step 3: Determine release type and previous version (minor vs patch release)
|
||||
- [ ] Step 4: Determine versions and analyze existing changelogs
|
||||
- [ ] Step 5: Get the list of commits for the release period
|
||||
- [ ] Step 6: Check additional repositories (website is REQUIRED, optional repos if tags exist)
|
||||
- [ ] **MANDATORY**: Check website repository for documentation changes WITH authors and PR links via GitHub CLI
|
||||
- [ ] **MANDATORY**: Check ALL optional repositories (talm, boot-to-talos, cozypkg, cozy-proxy) for tags during release period
|
||||
- [ ] **MANDATORY**: For ALL commits from additional repos, get GitHub username via CLI, prioritizing PR author over commit author.
|
||||
- [ ] Step 7: Analyze commits (extract PR numbers, authors, user impact)
|
||||
- [ ] **MANDATORY**: For EVERY PR in main repo, get PR author via `gh pr view <PR_NUMBER> --json author --jq .author.login` (do NOT skip this step)
|
||||
- [ ] **MANDATORY**: Extract PR numbers from commit messages, then use `gh pr view` for each PR to get the PR author. Do NOT use commit author. Only for commits without PR numbers (rare), fall back to `gh api repos/cozystack/cozystack/commits/<hash> --jq '.author.login'`
|
||||
- [ ] Step 8: Form new changelog (structure, format, generate contributors list)
|
||||
- [ ] Step 9: Verify completeness and save
|
||||
|
||||
### 1. Updating information from remote
|
||||
|
||||
```bash
|
||||
git fetch --tags --force --prune
|
||||
```
|
||||
|
||||
This is necessary to get up-to-date information about tags and commits from the remote repository.
|
||||
|
||||
### 2. Checking current branch
|
||||
|
||||
Make sure we are on the `main` branch:
|
||||
|
||||
```bash
|
||||
git branch --show-current
|
||||
```
|
||||
|
||||
### 3. Determining release type and previous version
|
||||
|
||||
**Important**: Determine if you're generating a changelog for a **minor release** (vX.Y.0) or a **patch release** (vX.Y.Z where Z > 0).
|
||||
|
||||
**For minor releases (vX.Y.0):**
|
||||
- Each minor version lives and evolves in its own branch (`release-X.Y`)
|
||||
- You MUST compare with the **previous minor version** (v(X-1).Y.0), not the last patch release
|
||||
- This ensures you capture all changes from the entire minor version cycle, including all patch releases
|
||||
- Example: For v0.38.0, compare with v0.37.0 (not v0.37.8)
|
||||
- Run a separate cycle to check the diff with the zero version of the previous minor release
|
||||
|
||||
**For patch releases (vX.Y.Z where Z > 0):**
|
||||
- Compare with the previous patch version (vX.Y.(Z-1))
|
||||
- Example: For v0.37.2, compare with v0.37.1
|
||||
|
||||
### 4. Determining versions and analyzing existing changelogs
|
||||
|
||||
**Determine the last published version:**
|
||||
1. Get the list of version tags:
|
||||
```bash
|
||||
git tag -l 'v[0-9]*.[0-9]*.[0-9]*' | sort -V
|
||||
```
|
||||
|
||||
2. Get the last tag:
|
||||
```bash
|
||||
git tag -l 'v[0-9]*.[0-9]*.[0-9]*' | sort -V | tail -1
|
||||
```
|
||||
|
||||
3. Compare tags with existing changelog files in `docs/changelogs/` to determine the last published version (the newest file `vX.Y.Z.md`)
|
||||
|
||||
**Study existing changelog format:**
|
||||
- Review recent changelog files to understand the format and structure
|
||||
- Pay attention to:
|
||||
- **Feature Highlights format** (for minor releases): Use `## Feature Highlights` with `### Feature Name` subsections containing detailed descriptions (2-4 paragraphs each). See v0.35.0 and v0.36.0 for examples.
|
||||
- Section structure (Major Features and Improvements, Security, Fixes, Dependencies, etc.)
|
||||
- PR link format (e.g., `[**@username**](https://github.com/username) in #1234`)
|
||||
- Change description style
|
||||
- Presence of Breaking changes sections, etc.
|
||||
|
||||
### 5. Getting the list of commits
|
||||
|
||||
**Important**: Determine if you're generating a changelog for a **minor release** (vX.Y.0) or a **patch release** (vX.Y.Z where Z > 0).
|
||||
|
||||
**For patch releases (vX.Y.Z where Z > 0):**
|
||||
Get the list of commits starting from the previous patch version to HEAD:
|
||||
|
||||
**⚠️ CRITICAL: Do NOT use --first-parent flag! It will skip merge commits including backports!**
|
||||
|
||||
```bash
|
||||
# Get all commits including merge commits (backports)
|
||||
git log <previous_version>..HEAD --pretty=format:"%h - %s (%an, %ar)"
|
||||
```
|
||||
|
||||
For example, if generating changelog for `v0.37.2`:
|
||||
```bash
|
||||
git log v0.37.1..HEAD --pretty=format:"%h - %s (%an, %ar)"
|
||||
```
|
||||
|
||||
**⚠️ IMPORTANT: Check for backports:**
|
||||
- Look for commits with "[Backport release-X.Y]" in the commit message
|
||||
- For backport PRs, find the original PR number mentioned in the backport commit message or PR description
|
||||
- Use the original PR author (not the backport PR author) when creating changelog entries
|
||||
- Include both the original PR number and backport PR number in the changelog entry (e.g., `#1606, #1609`)
|
||||
|
||||
**For minor releases (vX.Y.0):**
|
||||
Minor releases must include **all changes** from patch releases of the previous minor version. Get commits from the previous minor release:
|
||||
|
||||
**⚠️ CRITICAL: Do NOT use --first-parent flag! It will skip merge commits including backports!**
|
||||
|
||||
```bash
|
||||
# For v0.38.0, get all commits since v0.37.0 (including all patch releases v0.37.1, v0.37.2, etc.)
|
||||
git log v<previous_minor_version>..HEAD --pretty=format:"%h - %s (%an, %ar)"
|
||||
```
|
||||
|
||||
For example, if generating changelog for `v0.38.0`:
|
||||
```bash
|
||||
git log v0.37.0..HEAD --pretty=format:"%h - %s (%an, %ar)"
|
||||
```
|
||||
|
||||
This will include all commits from v0.37.1, v0.37.2, v0.37.3, etc., up to v0.38.0.
|
||||
|
||||
**⚠️ IMPORTANT: Always check merge commits:**
|
||||
- Merge commits may contain backports that need to be included
|
||||
- Check all commits in the range, including merge commits
|
||||
- For backports, always find and reference the original PR
|
||||
|
||||
### 6. Analyzing additional repositories
|
||||
|
||||
**⚠️ CRITICAL: This step is MANDATORY and must NOT be skipped!**
|
||||
|
||||
Cozystack release may include changes from related repositories. Check and include commits from these repositories if tags were released during the release period:
|
||||
|
||||
**Required repositories:**
|
||||
- **Documentation**: [https://github.com/cozystack/website](https://github.com/cozystack/website)
|
||||
- **MANDATORY**: Always check this repository for documentation changes during the release period
|
||||
- **MANDATORY**: Get GitHub username for EVERY commit. Extract PR number from commit message, then use `gh pr view <PR_NUMBER> --repo cozystack/website --json author --jq .author.login` to get PR author. Only if no PR number, fall back to `gh api repos/cozystack/website/commits/<hash> --jq '.author.login'`
|
||||
|
||||
**Optional repositories (MUST check ALL of them for tags during release period):**
|
||||
- [https://github.com/cozystack/talm](https://github.com/cozystack/talm)
|
||||
- [https://github.com/cozystack/boot-to-talos](https://github.com/cozystack/boot-to-talos)
|
||||
- [https://github.com/cozystack/cozypkg](https://github.com/cozystack/cozypkg)
|
||||
- [https://github.com/cozystack/cozy-proxy](https://github.com/cozystack/cozy-proxy)
|
||||
|
||||
**⚠️ IMPORTANT**: You MUST check ALL optional repositories for tags created during the release period. Do NOT skip this step even if you think there might not be any tags. Use the process below to verify.
|
||||
|
||||
**Process for each repository:**
|
||||
|
||||
1. **Get release period dates:**
|
||||
```bash
|
||||
# Get dates for the release period
|
||||
cd /path/to/cozystack
|
||||
RELEASE_START=$(git log -1 --format=%ai v<previous_version>)
|
||||
RELEASE_END=$(git log -1 --format=%ai HEAD)
|
||||
```
|
||||
|
||||
2. **Check for commits in website repository (always required):**
|
||||
```bash
|
||||
# Ensure website repository is cloned and up-to-date
|
||||
mkdir -p _repos
|
||||
if [ ! -d "_repos/website" ]; then
|
||||
cd _repos && git clone https://github.com/cozystack/website.git && cd ..
|
||||
fi
|
||||
cd _repos/website
|
||||
git fetch --all --tags --force
|
||||
git checkout main 2>/dev/null || git checkout master
|
||||
git pull
|
||||
|
||||
# Get commits between release dates (with some buffer)
|
||||
git log --since="$RELEASE_START" --until="$RELEASE_END" --format="%H|%s|%an" | while IFS='|' read -r commit_hash subject author_name; do
|
||||
# Extract PR number from commit message
|
||||
PR_NUMBER=$(git log -1 --format="%B" "$commit_hash" | grep -oE '#[0-9]+' | head -1 | tr -d '#')
|
||||
|
||||
# ALWAYS use PR author if PR number found, not commit author
|
||||
if [ -n "$PR_NUMBER" ]; then
|
||||
GITHUB_USERNAME=$(gh pr view "$PR_NUMBER" --repo cozystack/website --json author --jq '.author.login // empty' 2>/dev/null)
|
||||
echo "$commit_hash|$subject|$author_name|$GITHUB_USERNAME|cozystack/website#$PR_NUMBER"
|
||||
else
|
||||
# Only fallback to commit author if no PR number found (rare)
|
||||
GITHUB_USERNAME=$(gh api repos/cozystack/website/commits/$commit_hash --jq '.author.login // empty')
|
||||
echo "$commit_hash|$subject|$author_name|$GITHUB_USERNAME|cozystack/website@${commit_hash:0:7}"
|
||||
fi
|
||||
done
|
||||
|
||||
# Look for documentation updates, new pages, or significant content changes
|
||||
# Include these in the "Documentation" section of the changelog WITH authors and PR links
|
||||
```
|
||||
|
||||
3. **For optional repositories, check if tags exist during release period:**
|
||||
|
||||
**⚠️ MANDATORY: You MUST check ALL optional repositories (talm, boot-to-talos, cozypkg, cozy-proxy). Do NOT skip any repository!**
|
||||
|
||||
**Use the helper script:**
|
||||
```bash
|
||||
# Get release period dates
|
||||
RELEASE_START=$(git log -1 --format=%ai v<previous_version>)
|
||||
RELEASE_END=$(git log -1 --format=%ai HEAD)
|
||||
|
||||
# Run the script to check all optional repositories
|
||||
./docs/changelogs/hack/check-optional-repos.sh "$RELEASE_START" "$RELEASE_END"
|
||||
```
|
||||
|
||||
The script will:
|
||||
- Check ALL optional repositories (talm, boot-to-talos, cozypkg, cozy-proxy)
|
||||
- Look for tags created during the release period
|
||||
- Get commits between tags (if tags exist) or by date range (if no tags)
|
||||
- Extract PR numbers from commit messages
|
||||
- For EVERY commit with PR number, get PR author via CLI: `gh pr view <PR_NUMBER> --repo cozystack/<repo> --json author --jq .author.login` (ALWAYS use PR author, not commit author)
|
||||
- For commits without PR numbers (rare), fallback to: `gh api repos/cozystack/<repo>/commits/<hash> --jq '.author.login'`
|
||||
- Output results in format: `commit_hash|subject|author_name|github_username|cozystack/repo#PR_NUMBER` or `cozystack/repo@commit_hash`
|
||||
|
||||
4. **Extract PR numbers and authors using GitHub CLI:**
|
||||
- **ALWAYS use PR author, not commit author** for commits from additional repositories
|
||||
- For each commit, extract PR number from commit message first: Extract `#123` pattern from commit message
|
||||
- If PR number found, use `gh pr view <PR_NUMBER> --repo cozystack/<repo> --json author --jq .author.login` to get PR author (the person who wrote the code)
|
||||
- Only if no PR number found (rare), fallback to commit author: `gh api repos/cozystack/<repo>/commits/<hash> --jq '.author.login'`
|
||||
- **Prefer PR numbers**: Use format `cozystack/website#123` if PR number found in commit message
|
||||
- **Fallback to commit hash**: Use format `cozystack/website@abc1234` if no PR number
|
||||
- **ALWAYS include author**: Every entry from additional repositories MUST include author in format `([**@username**](https://github.com/username) in cozystack/repo#123)`
|
||||
- Determine user impact and categorize appropriately
|
||||
- Format entries with repository prefix: `[website]`, `[talm]`, etc.
|
||||
|
||||
**Example entry format for additional repositories:**
|
||||
```markdown
|
||||
# If PR number found in commit message (REQUIRED format):
|
||||
* **[website] Update installation documentation**: Improved installation guide with new examples ([**@username**](https://github.com/username) in cozystack/website#123).
|
||||
|
||||
# If no PR number (fallback, use commit hash):
|
||||
* **[website] Update installation documentation**: Improved installation guide with new examples ([**@username**](https://github.com/username) in cozystack/website@abc1234).
|
||||
|
||||
# For optional repositories:
|
||||
* **[talm] Add new feature**: Description of the change ([**@username**](https://github.com/username) in cozystack/talm#456).
|
||||
```
|
||||
|
||||
**CRITICAL**:
|
||||
- **ALWAYS include author** for every entry from additional repositories
|
||||
- **ALWAYS include PR link or commit hash** for every entry
|
||||
- Never add entries without author and PR/commit reference
|
||||
- **ALWAYS use PR author, not commit author**: Extract PR number from commit message, then use `gh pr view <PR_NUMBER> --repo cozystack/<repo> --json author --jq .author.login` to get the PR author (the person who wrote the code)
|
||||
- Only if no PR number found (rare), fallback to commit author: `gh api repos/cozystack/<repo>/commits/<hash> --jq '.author.login'`
|
||||
- The commit author (especially for squash/merge commits) is usually the person who merged the PR, not the person who wrote the code
|
||||
|
||||
### 7. Analyzing commits and PRs
|
||||
|
||||
**⚠️ CRITICAL: You MUST get the author from PR, not from commit! Always use `gh pr view` to get the PR author. Do NOT use commit author!**
|
||||
|
||||
**Get all PR numbers from commits:**
|
||||
**⚠️ CRITICAL: Do NOT use --no-merges flag! It will skip merge commits including backports!**
|
||||
|
||||
```bash
|
||||
# Extract all PR numbers from commit messages in the release range (including merge commits)
|
||||
git log <previous_version>..<new_version> --format="%s%n%b" | grep -oE '#[0-9]+' | sort -u | tr -d '#'
|
||||
```
|
||||
|
||||
**⚠️ IMPORTANT: Handle backports correctly:**
|
||||
- Backport PRs have format: `[Backport release-X.Y] <original title> (#BACKPORT_PR_NUMBER)`
|
||||
- The backport commit message or PR description usually mentions the original PR number
|
||||
- For backport entries in changelog, use the original PR author (not the backport PR author)
|
||||
- Include both original and backport PR numbers in the changelog entry (e.g., `#1606, #1609`)
|
||||
- To find original PR from backport: Check the backport PR description or commit message for "Backport of #ORIGINAL_PR"
|
||||
|
||||
**For each PR number, get the author:**
|
||||
|
||||
**CRITICAL**: The commit author (especially for squash/merge commits) is usually the person who merged the PR (or GitHub bot), NOT the person who wrote the code. **ALWAYS use the PR author**, not the commit author.
|
||||
|
||||
**⚠️ MANDATORY: ALWAYS use `gh pr view` to get the PR author. Do NOT use commit author!**
|
||||
|
||||
**ALWAYS use GitHub CLI** to get the PR author:
|
||||
|
||||
```bash
|
||||
# Usage: Get PR author - MANDATORY for EVERY PR
|
||||
# Loop through ALL PR numbers and get PR author (including backports)
|
||||
git log <previous_version>..<new_version> --format="%s%n%b" | grep -oE '#[0-9]+' | sort -u | tr -d '#' | while read PR_NUMBER; do
|
||||
# Check if this is a backport PR
|
||||
BACKPORT_INFO=$(gh pr view "$PR_NUMBER" --json body --jq '.body' 2>/dev/null | grep -i "backport of #" || echo "")
|
||||
if [ -n "$BACKPORT_INFO" ]; then
|
||||
# Extract original PR number from backport description
|
||||
ORIGINAL_PR=$(echo "$BACKPORT_INFO" | grep -oE 'backport of #([0-9]+)' | grep -oE '[0-9]+' | head -1)
|
||||
if [ -n "$ORIGINAL_PR" ]; then
|
||||
# Use original PR author
|
||||
GITHUB_USERNAME=$(gh pr view "$ORIGINAL_PR" --json author --jq '.author.login // empty')
|
||||
PR_TITLE=$(gh pr view "$ORIGINAL_PR" --json title --jq '.title // empty')
|
||||
echo "$PR_NUMBER|$ORIGINAL_PR|$GITHUB_USERNAME|$PR_TITLE|BACKPORT"
|
||||
else
|
||||
# Fallback to backport PR author if original not found
|
||||
GITHUB_USERNAME=$(gh pr view "$PR_NUMBER" --json author --jq '.author.login // empty')
|
||||
PR_TITLE=$(gh pr view "$PR_NUMBER" --json title --jq '.title // empty')
|
||||
echo "$PR_NUMBER||$GITHUB_USERNAME|$PR_TITLE|BACKPORT"
|
||||
fi
|
||||
else
|
||||
# Regular PR
|
||||
GITHUB_USERNAME=$(gh pr view "$PR_NUMBER" --json author --jq '.author.login // empty')
|
||||
PR_TITLE=$(gh pr view "$PR_NUMBER" --json title --jq '.title // empty')
|
||||
echo "$PR_NUMBER||$GITHUB_USERNAME|$PR_TITLE|REGULAR"
|
||||
fi
|
||||
done
|
||||
```
|
||||
|
||||
**⚠️ IMPORTANT**: You must run this for EVERY PR in the release period. Do NOT skip any PRs or assume the GitHub username based on the git author name.
|
||||
|
||||
**CRITICAL**: Always use `gh pr view <PR_NUMBER> --json author --jq .author.login` to get the PR author. This correctly identifies the person who wrote the code, not the person who merged it (which is especially important for squash merges).
|
||||
|
||||
**Why this matters**: Using the wrong author in changelogs gives incorrect credit and can confuse contributors. The merge/squash commit is created by the person who clicks "Merge" in GitHub, not the PR author.
|
||||
|
||||
**For commits without PR numbers (rare):**
|
||||
- Only if a commit has no PR number, fall back to commit author: `gh api repos/cozystack/cozystack/commits/<hash> --jq '.author.login'`
|
||||
- But this should be very rare - most commits should have PR numbers
|
||||
|
||||
**Extract PR number from commit messages:**
|
||||
- Check commit message subject (`%s`) and body (`%b`) for PR references: `#1234` or `(#1234)`
|
||||
- **Primary method**: Extract from commit message format `(#PR_NUMBER)` or `in #PR_NUMBER` or `Merge pull request #1234`
|
||||
- Use regex: `grep -oE '#[0-9]+'` to find all PR numbers
|
||||
|
||||
**⚠️ CRITICAL: Verify PR numbers match commit messages!**
|
||||
- Always verify that the PR number in the changelog matches the PR number in the commit message
|
||||
- Common mistake: Using wrong PR number (e.g., #1614 instead of #1617) when multiple similar commits exist
|
||||
- To verify: Check the actual commit message: `git log <commit_hash> -1 --format="%s%n%b" | grep -oE '#[0-9]+'`
|
||||
- If multiple PR numbers appear in a commit, use the one that matches the PR title/description
|
||||
- For merge commits, check the merged branch commits, not just the merge commit message
|
||||
|
||||
3. **Understand the change:**
|
||||
```bash
|
||||
# Get PR details (preferred method)
|
||||
gh pr view <PR_NUMBER> --json title,body,url
|
||||
|
||||
# Or get commit details if no PR number
|
||||
git show <commit_hash> --stat
|
||||
git show <commit_hash>
|
||||
```
|
||||
- Review PR description and changed files
|
||||
- Understand functionality added/changed/fixed
|
||||
- **Determine user impact**: What can users do now? What problems are fixed? What improvements do users experience?
|
||||
|
||||
4. **For release branches (backports):**
|
||||
- If commit is from `release-X.Y` branch, check if it's a backport
|
||||
- Find original commit in `main` to get correct PR number:
|
||||
```bash
|
||||
git log origin/main --grep="<part of commit message>" --oneline
|
||||
```
|
||||
|
||||
### 8. Forming a new changelog
|
||||
|
||||
Create a new changelog file in the format matching previous versions:
|
||||
|
||||
1. **Determine the release type:**
|
||||
- **Minor release (vX.Y.0)** - use full format with **Feature Highlights** section. **Must include all changes from patch releases of the previous minor version** (e.g., v0.38.0 should include changes from v0.37.1, v0.37.2, v0.37.3, etc.)
|
||||
- **Patch release (vX.Y.Z, where Z > 0)** - use more compact format, includes only changes since the previous patch release
|
||||
|
||||
**Feature Highlights format for minor releases:**
|
||||
- Use section header: `## Feature Highlights`
|
||||
- Include 3-6 major features as subsections with `### Feature Name` headers
|
||||
- Each feature subsection should contain:
|
||||
- **Detailed description** (2-4 paragraphs) explaining:
|
||||
- What the feature is and what problem it solves
|
||||
- How it works and what users can do with it
|
||||
- How to use it (if applicable)
|
||||
- Benefits and impact for users
|
||||
- **Links to documentation** when available (use markdown links)
|
||||
- **Code examples or configuration snippets** if helpful
|
||||
- Focus on user value and practical implications, not just technical details
|
||||
- Each feature should be substantial enough to warrant its own subsection
|
||||
- Order features by importance/impact (most important first)
|
||||
- Example format:
|
||||
```markdown
|
||||
## Feature Highlights
|
||||
|
||||
### Feature Name
|
||||
|
||||
Detailed description paragraph explaining what the feature is...
|
||||
|
||||
Another paragraph explaining how it works and what users can do...
|
||||
|
||||
Learn more in the [documentation](https://cozystack.io/docs/...).
|
||||
```
|
||||
|
||||
**Important for minor releases**: After collecting all commits, **systematically verify** that all PRs from patch releases are included:
|
||||
```bash
|
||||
# Extract all PR numbers from patch release changelogs
|
||||
grep -h "#[0-9]\+" docs/changelogs/v<previous_minor>.*.md | sort -u
|
||||
|
||||
# Extract all PR numbers from the new minor release changelog
|
||||
grep -h "#[0-9]\+" docs/changelogs/v<new_minor>.0.md | sort -u
|
||||
|
||||
# Compare and identify missing PRs
|
||||
# Ensure every PR from patch releases appears in the minor release changelog
|
||||
```
|
||||
|
||||
2. **Structure changes by categories:**
|
||||
|
||||
**For minor releases (vX.Y.0):**
|
||||
- **Feature Highlights** (required) - see format above
|
||||
- **Major Features and Improvements** - detailed list of all major features and improvements
|
||||
- **Improvements (minor)** - smaller improvements and enhancements
|
||||
- **Bug fixes** - all bug fixes
|
||||
- **Security** - security-related changes
|
||||
- **Dependencies & version updates** - dependency updates
|
||||
- **System Configuration** - system-level configuration changes
|
||||
- **Development, Testing, and CI/CD** - development and testing improvements
|
||||
- **Documentation** (include changes from website repository here - **MUST include authors and PR links for all entries**)
|
||||
- **Breaking changes & upgrade notes** (if any)
|
||||
- **Refactors & chores** (if any)
|
||||
|
||||
**For patch releases (vX.Y.Z where Z > 0):**
|
||||
- **Features and Improvements** - new features and improvements
|
||||
- **Fixes** - bug fixes
|
||||
- **Security** - security-related changes
|
||||
- **Dependencies** - dependency updates
|
||||
- **System Configuration** - system-level configuration changes
|
||||
- **Development, Testing, and CI/CD** - development and testing improvements
|
||||
- **Documentation** (include changes from website repository here - **MUST include authors and PR links for all entries**)
|
||||
- **Migration and Upgrades** (if applicable)
|
||||
|
||||
**Note**: When including changes from additional repositories, group them logically with main repository changes, or create separate subsections if there are many changes from a specific repository.
|
||||
|
||||
3. **Entry format:**
|
||||
- Use the format: `* **Brief description**: detailed description ([**@username**](https://github.com/username) in #PR_NUMBER)`
|
||||
- **CRITICAL - Get authorship correctly**:
|
||||
- **ALWAYS use PR author, not commit author**: Extract PR number from commit message, then use `gh pr view` to get the PR author. The commit author (especially for squash/merge commits) is usually the person who merged the PR (or GitHub bot), NOT the person who wrote the code.
|
||||
```bash
|
||||
# Get PR author from GitHub CLI (correct method)
|
||||
# Step 1: Extract PR number from commit message
|
||||
PR_NUMBER=$(git log <commit_hash> -1 --format="%s%n%b" | grep -oE '#[0-9]+' | head -1 | tr -d '#')
|
||||
|
||||
# Step 2: Get PR author (the person who wrote the code)
|
||||
if [ -n "$PR_NUMBER" ]; then
|
||||
GITHUB_USERNAME=$(gh pr view "$PR_NUMBER" --json author --jq '.author.login')
|
||||
else
|
||||
# Only fallback to commit author if no PR number found (rare)
|
||||
GITHUB_USERNAME=$(gh api repos/cozystack/cozystack/commits/<commit_hash> --jq '.author.login')
|
||||
fi
|
||||
```
|
||||
**Example**: For PR #1507, the squash commit has author "kvaps" (who merged), but the PR author is "lllamnyp" (who wrote the code). Using `gh pr view 1507 --json author --jq .author.login` correctly returns "lllamnyp".
|
||||
- **For regular commits**: Use the commit author directly:
|
||||
```bash
|
||||
git log <commit_hash> -1 --format="%an|%ae"
|
||||
```
|
||||
- **Validation**: Before adding to changelog, verify the author by checking:
|
||||
- For merge commits: Compare merge commit author vs PR author (they should be different)
|
||||
- Check existing changelogs for author name to GitHub username mappings
|
||||
- Verify with: `git log <merge_commit>^1..<merge_commit>^2 --format="%an" --no-merges`
|
||||
- **Map author name to GitHub username**: Check existing changelogs for author name mappings, or extract from PR links in commit messages
|
||||
- **Always include user impact**: Each entry must explain how the change affects users
|
||||
- For new features: explain what users can now do
|
||||
- For bug fixes: explain what problem is solved for users
|
||||
- For improvements: explain what users will experience better
|
||||
- For breaking changes: clearly state what users need to do
|
||||
- Group related changes
|
||||
- Use bold font for important components/modules
|
||||
- Focus on user value, not just technical details
|
||||
|
||||
4. **Add a link to the full changelog:**
|
||||
|
||||
**For patch releases (vX.Y.Z where Z > 0):**
|
||||
```markdown
|
||||
**Full Changelog**: https://github.com/cozystack/cozystack/compare/v<previous_patch_version>...v<new_version>
|
||||
```
|
||||
Example: For v0.37.2, use `v0.37.1...v0.37.2`
|
||||
|
||||
**For minor releases (vX.Y.0):**
|
||||
```markdown
|
||||
**Full Changelog**: https://github.com/cozystack/cozystack/compare/v<previous_minor_version>...v<new_version>
|
||||
```
|
||||
Example: For v0.38.0, use `v0.37.0...v0.38.0` (NOT `v0.37.8...v0.38.0`)
|
||||
|
||||
**Important**: Minor releases must reference the previous minor release (vX.Y.0), not the last patch release, to include all changes from the entire minor version cycle.
|
||||
|
||||
5. **Generate contributors list:**
|
||||
|
||||
**⚠️ SIMPLIFIED APPROACH: Extract contributors from the generated changelog itself!**
|
||||
|
||||
Since you've already generated the changelog with all PR authors correctly identified, simply extract GitHub usernames from the changelog entries:
|
||||
|
||||
```bash
|
||||
# Extract all GitHub usernames from the current release changelog
|
||||
# This method is simpler and more reliable than extracting from git history
|
||||
|
||||
# For patch releases: extract from the current changelog file
|
||||
grep -oE '\[@[a-zA-Z0-9_-]+\]' docs/changelogs/v<version>.md | \
|
||||
sed 's/\[@/@/' | sed 's/\]//' | \
|
||||
sort -u
|
||||
|
||||
# For minor releases: extract from the current changelog file
|
||||
grep -oE '\[@[a-zA-Z0-9_-]+\]' docs/changelogs/v<version>.md | \
|
||||
sed 's/\[@/@/' | sed 's/\]//' | \
|
||||
sort -u
|
||||
```
|
||||
|
||||
**Get all previous contributors (to identify new ones):**
|
||||
```bash
|
||||
# Extract GitHub usernames from all previous changelogs
|
||||
grep -hE '\[@[a-zA-Z0-9_-]+\]' docs/changelogs/v*.md | \
|
||||
grep -oE '@[a-zA-Z0-9_-]+' | \
|
||||
sort -u > /tmp/previous_contributors.txt
|
||||
```
|
||||
|
||||
**Identify new contributors (first-time contributors):**
|
||||
```bash
|
||||
# Get current release contributors from the changelog
|
||||
grep -oE '@[a-zA-Z0-9_-]+' docs/changelogs/v<version>.md | \
|
||||
sort -u > /tmp/current_contributors.txt
|
||||
|
||||
# Get all previous contributors
|
||||
grep -hE '@[a-zA-Z0-9_-]+' docs/changelogs/v*.md | \
|
||||
grep -oE '@[a-zA-Z0-9_-]+' | \
|
||||
sort -u > /tmp/all_previous_contributors.txt
|
||||
|
||||
# Find new contributors (those in current but not in previous)
|
||||
comm -23 <(sort /tmp/current_contributors.txt) <(sort /tmp/all_previous_contributors.txt)
|
||||
```
|
||||
|
||||
**Why this approach is better:**
|
||||
- ✅ Uses the already-verified PR authors from the changelog (no need to query GitHub API again)
|
||||
- ✅ Automatically handles backports correctly (original PR authors are already in the changelog)
|
||||
- ✅ Simpler and faster (no git log parsing or API calls)
|
||||
- ✅ More reliable (matches exactly what's in the changelog)
|
||||
- ✅ Works for both patch and minor releases
|
||||
|
||||
**Add contributors section to changelog:**
|
||||
|
||||
Place the contributors section at the end of the changelog, before the "Full Changelog" link:
|
||||
```markdown
|
||||
## Contributors
|
||||
|
||||
We'd like to thank all contributors who made this release possible:
|
||||
|
||||
* [**@username1**](https://github.com/username1)
|
||||
* [**@username2**](https://github.com/username2)
|
||||
* [**@username3**](https://github.com/username3)
|
||||
* ...
|
||||
|
||||
### New Contributors
|
||||
|
||||
We're excited to welcome our first-time contributors:
|
||||
|
||||
* [**@newuser1**](https://github.com/newuser1) - First contribution!
|
||||
* [**@newuser2**](https://github.com/newuser2) - First contribution!
|
||||
```
|
||||
|
||||
**Formatting guidelines:**
|
||||
- List contributors in alphabetical order by GitHub username
|
||||
- Use the format: `* [**@username**](https://github.com/username)`
|
||||
- For new contributors, add " - First contribution!" note
|
||||
- If GitHub username cannot be determined, you can skip that contributor or use their git author name
|
||||
|
||||
**When to include:**
|
||||
- **For patch releases**: Contributors section is optional, but can be included for significant releases
|
||||
- **For minor releases (vX.Y.0)**: Contributors section is required - you must generate and include the contributors list
|
||||
- Always verify GitHub usernames by checking commit messages, PR links in changelog entries, or by examining PR details
|
||||
|
||||
6. **Add a comment with a link to the GitHub release:**
|
||||
```markdown
|
||||
<!--
|
||||
https://github.com/cozystack/cozystack/releases/tag/v<new_version>
|
||||
-->
|
||||
```
|
||||
|
||||
### 9. Verification and saving
|
||||
|
||||
**Before saving, verify completeness:**
|
||||
|
||||
**For ALL releases:**
|
||||
- [ ] Step 5 completed: **ALL commits included** (including merge commits and backports) - do not skip any commits
|
||||
- [ ] Step 5 completed: **Backports identified and handled correctly** - original PR author used, both original and backport PR numbers included
|
||||
- [ ] Step 6 completed: Website repository checked for documentation changes WITH authors and PR links via GitHub CLI
|
||||
- [ ] Step 6 completed: **ALL** optional repositories (talm, boot-to-talos, cozypkg, cozy-proxy) checked for tags during release period
|
||||
- [ ] Step 6 completed: For ALL commits from additional repos, GitHub username obtained via GitHub CLI (not skipped). For commits with PR numbers, PR author used via `gh pr view` (not commit author)
|
||||
- [ ] Step 7 completed: For EVERY PR in main repo (including backports), PR author obtained via `gh pr view <PR_NUMBER> --json author --jq .author.login` (not skipped or assumed). Commit author NOT used - always use PR author
|
||||
- [ ] Step 7 completed: **Backports verified** - for each backport PR, original PR found and original PR author used in changelog
|
||||
- [ ] Step 8 completed: Contributors list generated
|
||||
- [ ] All commits from main repository included (including merge commits)
|
||||
- [ ] User impact described for each change
|
||||
- [ ] Format matches existing changelogs
|
||||
|
||||
**For patch releases:**
|
||||
- [ ] All commits from the release period are included (including merge commits with backports)
|
||||
- [ ] PR numbers match commit messages
|
||||
- [ ] Backports are properly identified and linked to original PRs
|
||||
|
||||
**For minor releases (vX.Y.0):**
|
||||
- [ ] All changes from patch releases (vX.Y.1, vX.Y.2, etc.) are included
|
||||
- [ ] Contributors section is present and complete
|
||||
- [ ] Full Changelog link references previous minor version (vX.Y.0), not last patch
|
||||
- [ ] Verify all PRs from patch releases are included:
|
||||
```bash
|
||||
# Extract and compare PR numbers
|
||||
PATCH_PRS=$(grep -hE "#[0-9]+" docs/changelogs/v<previous_minor>.*.md | grep -oE "#[0-9]+" | sort -u)
|
||||
MINOR_PRS=$(grep -hE "#[0-9]+" docs/changelogs/v<new_minor>.0.md | grep -oE "#[0-9]+" | sort -u)
|
||||
MISSING=$(comm -23 <(echo "$PATCH_PRS") <(echo "$MINOR_PRS"))
|
||||
|
||||
if [ -n "$MISSING" ]; then
|
||||
echo "Missing PRs from patch releases:"
|
||||
echo "$MISSING"
|
||||
# For each missing PR, check if it's a backport and verify change is included by description
|
||||
fi
|
||||
```
|
||||
|
||||
**Only proceed to save after all checkboxes are verified!**
|
||||
|
||||
**Save the changelog:**
|
||||
Save the changelog to file `docs/changelogs/v<version>.md` according to the version for which the changelog is being generated.
|
||||
|
||||
### Important notes
|
||||
|
||||
- **After fetch with --force** local tags are up-to-date, use them for work
|
||||
- **For release branches** always check original commits in `main` to get correct PR numbers
|
||||
- **Preserve the format** of existing changelog files
|
||||
- **Group related changes** logically
|
||||
- **Be accurate** in describing changes, based on actual commit diffs
|
||||
- **Check for PR numbers** and commit authors
|
||||
- **CRITICAL - Get authorship from PR, not from commit**:
|
||||
- **ALWAYS use PR author**: Extract PR number from commit message, then use `gh pr view <PR_NUMBER> --json author --jq .author.login` to get the PR author
|
||||
- Do NOT use commit author - the commit author (especially for squash/merge commits) is usually the person who merged the PR, not the person who wrote the code
|
||||
- For commits without PR numbers (rare), fall back to commit author: `gh api repos/cozystack/cozystack/commits/<commit_hash> --jq '.author.login'`
|
||||
- **Workflow**: Extract PR numbers from commits → Use `gh pr view` for each PR → Get PR author (the person who wrote the code)
|
||||
- Example: For PR #1507, the commit author is `@kvaps` (who merged), but `gh pr view 1507 --json author --jq .author.login` correctly returns `@lllamnyp` (who wrote the code)
|
||||
- Check existing changelogs for author name to GitHub username mappings
|
||||
- **Validation**: Before adding to changelog, always verify the author using `gh pr view` - never use commit author for PRs
|
||||
- **MANDATORY**: Always describe user impact: Every changelog entry must explain how the change affects end users, not just what was changed technically. Focus on user value and practical implications.
|
||||
|
||||
**Required steps:**
|
||||
|
||||
- **Additional repositories (Step 6) - MANDATORY**:
|
||||
- **⚠️ CRITICAL**: Always check the **website** repository for documentation changes during the release period. This is a required step and MUST NOT be skipped.
|
||||
- **⚠️ CRITICAL**: You MUST check ALL optional repositories (talm, boot-to-talos, cozypkg, cozy-proxy) for tags during the release period. Do NOT skip any repository even if you think there might not be tags.
|
||||
- **CRITICAL**: For ALL entries from additional repositories (website and optional), you MUST:
|
||||
- **MANDATORY**: Extract PR number from commit message first
|
||||
- **MANDATORY**: For commits with PR numbers, ALWAYS use `gh pr view <PR_NUMBER> --repo cozystack/<repo> --json author --jq .author.login` to get PR author (not commit author)
|
||||
- **MANDATORY**: Only for commits without PR numbers (rare), fallback to: `gh api repos/cozystack/<repo>/commits/<hash> --jq '.author.login'`
|
||||
- **MANDATORY**: Do NOT skip getting GitHub username via CLI - do this for EVERY commit
|
||||
- **MANDATORY**: Do NOT use commit author for PRs - always use PR author
|
||||
- Include PR link or commit hash reference
|
||||
- Format: `* **[repo] Description**: details ([**@username**](https://github.com/username) in cozystack/repo#123)`
|
||||
- For **optional repositories** (talm, boot-to-talos, cozypkg, cozy-proxy), you MUST check ALL of them for tags during the release period. Use the loop provided in Step 6 to check each repository systematically.
|
||||
- When including changes from additional repositories, use the format: `[repo-name] Description` and link to the repository's PR/issue if available
|
||||
- **Prefer PR numbers over commit hashes**: For commits from additional repositories, extract PR number from commit message using GitHub API. Use PR format (`cozystack/website#123`) instead of commit hash (`cozystack/website@abc1234`) when available
|
||||
- **Never add entries without author and PR/commit reference**: Every entry from additional repositories must have both author and link
|
||||
- Group changes from additional repositories with main repository changes, or create separate subsections if there are many changes from a specific repository
|
||||
|
||||
- **PR author verification (Step 7) - MANDATORY**:
|
||||
- **⚠️ CRITICAL**: You MUST get the author from PR using `gh pr view`, NOT from commit
|
||||
- **⚠️ CRITICAL**: Extract PR numbers from commit messages, then use `gh pr view <PR_NUMBER> --json author --jq .author.login` for each PR
|
||||
- **⚠️ CRITICAL**: Do NOT use commit author - commit author is usually the person who merged, not the person who wrote the code
|
||||
- **⚠️ CRITICAL**: Do NOT skip this step for any PR, even if the author seems obvious
|
||||
- For commits without PR numbers (rare), fall back to: `gh api repos/cozystack/cozystack/commits/<hash> --jq '.author.login'`
|
||||
- This ensures correct attribution and prevents errors in changelog entries (especially important for squash/merge commits)
|
||||
|
||||
- **Contributors list (Step 8)**:
|
||||
- For minor releases (vX.Y.0): You must generate a list of all contributors and identify first-time contributors.
|
||||
- For patch releases: Contributors section is optional, but recommended for significant releases
|
||||
- Extract GitHub usernames from PR links in commit messages or changelog entries
|
||||
- This helps recognize community contributions and welcome new contributors
|
||||
- **Minor releases (vX.Y.0)**:
|
||||
- Must include **all changes** from patch releases of the previous minor version (e.g., v0.38.0 includes all changes from v0.37.1, v0.37.2, v0.37.3, etc.)
|
||||
- The "Full Changelog" link must reference the previous minor release (v0.37.0...v0.38.0), NOT the last patch release (v0.37.8...v0.38.0)
|
||||
- This ensures users can see the complete set of changes for the entire minor version cycle
|
||||
- **Verification step**: After creating the changelog, extract all PR numbers from patch release changelogs and verify they all appear in the minor release changelog to prevent missing entries
|
||||
- **Backport handling**: Patch releases may contain backports with different PR numbers (e.g., #1624 in patch release vs #1622 in main). For minor releases, use original PR numbers from main when available, but verify that all changes from patch releases are included regardless of PR number differences
|
||||
- **Content verification**: Don't rely solely on PR number matching - verify that change descriptions from patch releases appear in the minor release changelog, as backports may have different PR numbers
|
||||
|
||||
190
docs/agents/contributing.md
Normal file
190
docs/agents/contributing.md
Normal file
@@ -0,0 +1,190 @@
|
||||
# Instructions for AI Agents
|
||||
|
||||
Guidelines for AI agents contributing to Cozystack.
|
||||
|
||||
## Checklist for Creating a Pull Request
|
||||
|
||||
- [ ] Changes are made and tested
|
||||
- [ ] Commit message uses correct `[component]` prefix
|
||||
- [ ] Commit is signed off with `--signoff`
|
||||
- [ ] Branch is rebased on `upstream/main` (no extra commits)
|
||||
- [ ] PR body includes description and release note
|
||||
- [ ] PR is pushed and created with `gh pr create`
|
||||
|
||||
## How to Commit and Create Pull Requests
|
||||
|
||||
### 1. Make Your Changes
|
||||
|
||||
Edit the necessary files in the codebase.
|
||||
|
||||
### 2. Commit with Proper Format
|
||||
|
||||
Use the `[component]` prefix and `--signoff` flag:
|
||||
|
||||
```bash
|
||||
git commit --signoff -m "[component] Brief description of changes"
|
||||
```
|
||||
|
||||
**Component prefixes:**
|
||||
- System: `[dashboard]`, `[platform]`, `[cilium]`, `[kube-ovn]`, `[linstor]`, `[fluxcd]`, `[cluster-api]`
|
||||
- Apps: `[postgres]`, `[mysql]`, `[redis]`, `[kafka]`, `[clickhouse]`, `[virtual-machine]`, `[kubernetes]`
|
||||
- Other: `[tests]`, `[ci]`, `[docs]`, `[maintenance]`
|
||||
|
||||
**Examples:**
|
||||
```bash
|
||||
git commit --signoff -m "[dashboard] Add config hash annotations to restart pods on config changes"
|
||||
git commit --signoff -m "[postgres] Update operator to version 1.2.3"
|
||||
git commit --signoff -m "[docs] Add installation guide"
|
||||
```
|
||||
|
||||
### 3. Rebase on upstream/main (if needed)
|
||||
|
||||
If your branch has extra commits, clean it up:
|
||||
|
||||
```bash
|
||||
# Fetch latest
|
||||
git fetch upstream
|
||||
|
||||
# Create clean branch from upstream/main
|
||||
git checkout -b my-feature upstream/main
|
||||
|
||||
# Cherry-pick only your commit
|
||||
git cherry-pick <your-commit-hash>
|
||||
|
||||
# Force push to your branch
|
||||
git push -f origin my-feature:my-branch-name
|
||||
```
|
||||
|
||||
### 4. Push Your Branch
|
||||
|
||||
```bash
|
||||
git push origin <branch-name>
|
||||
```
|
||||
|
||||
### 5. Create Pull Request
|
||||
|
||||
Write the PR body to a temporary file:
|
||||
|
||||
```bash
|
||||
cat > /tmp/pr_body.md << 'EOF'
|
||||
## What this PR does
|
||||
|
||||
Brief description of the changes.
|
||||
|
||||
Changes:
|
||||
- Change 1
|
||||
- Change 2
|
||||
|
||||
### Release note
|
||||
|
||||
```release-note
|
||||
[component] Description for changelog
|
||||
```
|
||||
EOF
|
||||
```
|
||||
|
||||
Create the PR:
|
||||
|
||||
```bash
|
||||
gh pr create --title "[component] Brief description" --body-file /tmp/pr_body.md
|
||||
```
|
||||
|
||||
Clean up:
|
||||
|
||||
```bash
|
||||
rm /tmp/pr_body.md
|
||||
```
|
||||
|
||||
## Addressing AI Bot Reviewer Comments
|
||||
|
||||
When the user asks to fix comments from AI bot reviewers (like Qodo, Copilot, etc.):
|
||||
|
||||
### 1. Get PR Comments
|
||||
|
||||
View all comments on the pull request:
|
||||
|
||||
```bash
|
||||
gh pr view <PR-number> --comments
|
||||
```
|
||||
|
||||
Or for the current branch:
|
||||
|
||||
```bash
|
||||
gh pr view --comments
|
||||
```
|
||||
|
||||
### 2. Review Each Comment Carefully
|
||||
|
||||
**Important**: Do NOT blindly apply all suggestions. Each comment should be evaluated:
|
||||
|
||||
- **Consider context** - Does the suggestion make sense for this specific case?
|
||||
- **Check project conventions** - Does it align with Cozystack patterns?
|
||||
- **Evaluate impact** - Will this improve code quality or introduce issues?
|
||||
- **Question validity** - AI bots can be wrong or miss context
|
||||
|
||||
**When to apply:**
|
||||
- ✅ Legitimate bugs or security issues
|
||||
- ✅ Clear improvements to code quality
|
||||
- ✅ Better error handling or edge cases
|
||||
- ✅ Conformance to project conventions
|
||||
|
||||
**When to skip:**
|
||||
- ❌ Stylistic preferences that don't match project style
|
||||
- ❌ Over-engineering simple code
|
||||
- ❌ Changes that break existing patterns
|
||||
- ❌ Suggestions that show misunderstanding of the code
|
||||
|
||||
### 3. Apply Valid Fixes
|
||||
|
||||
Make changes addressing the valid comments. Use your judgment.
|
||||
|
||||
### 4. Leave Changes Uncommitted
|
||||
|
||||
**Critical**: Do NOT commit or push the changes automatically.
|
||||
|
||||
Leave the changes in the working directory so the user can:
|
||||
- Review the fixes
|
||||
- Decide whether to commit them
|
||||
- Make additional adjustments if needed
|
||||
|
||||
```bash
|
||||
# After making changes, show status but DON'T commit
|
||||
git status
|
||||
git diff
|
||||
```
|
||||
|
||||
The user will commit and push when ready.
|
||||
|
||||
### Example Workflow
|
||||
|
||||
```bash
|
||||
# Get PR comments
|
||||
gh pr view 1234 --comments
|
||||
|
||||
# Review comments and identify valid ones
|
||||
# Make necessary changes to address valid comments
|
||||
# ... edit files ...
|
||||
|
||||
# Show what was changed (but don't commit)
|
||||
git status
|
||||
git diff
|
||||
|
||||
# Tell the user what was fixed and what was skipped
|
||||
```
|
||||
|
||||
## Git Permissions
|
||||
|
||||
Request these permissions when needed:
|
||||
- `git_write` - For commit, rebase, cherry-pick, branch operations
|
||||
- `network` - For push, fetch, pull operations
|
||||
|
||||
## Common Issues
|
||||
|
||||
**PR has extra commits?**
|
||||
→ Rebase on `upstream/main` and cherry-pick only your commits
|
||||
|
||||
**Wrong commit message?**
|
||||
→ `git commit --amend --signoff -m "[correct] message"` then `git push -f`
|
||||
|
||||
**Need to update PR?**
|
||||
→ `gh pr edit <number> --body "new description"`
|
||||
115
docs/agents/overview.md
Normal file
115
docs/agents/overview.md
Normal file
@@ -0,0 +1,115 @@
|
||||
# Cozystack Project Overview
|
||||
|
||||
This document provides detailed information about Cozystack project structure and conventions for AI agents.
|
||||
|
||||
## About Cozystack
|
||||
|
||||
Cozystack is an open-source Kubernetes-based platform and framework for building cloud infrastructure. It provides:
|
||||
|
||||
- **Managed Services**: Databases, VMs, Kubernetes clusters, object storage, and more
|
||||
- **Multi-tenancy**: Full isolation and self-service for tenants
|
||||
- **GitOps-driven**: FluxCD-based continuous delivery
|
||||
- **Modular Architecture**: Extensible with custom packages and services
|
||||
- **Developer Experience**: Simplified local development with cozypkg tool
|
||||
|
||||
The platform exposes infrastructure services via the Kubernetes API with ready-made configs, built-in monitoring, and alerts.
|
||||
|
||||
## Code Layout
|
||||
|
||||
```
|
||||
.
|
||||
├── packages/ # Main directory for cozystack packages
|
||||
│ ├── core/ # Core platform logic charts (installer, platform)
|
||||
│ ├── system/ # System charts (CSI, CNI, operators, etc.)
|
||||
│ ├── apps/ # User-facing charts shown in dashboard catalog
|
||||
│ └── extra/ # Tenant-specific modules, singleton charts which are used as dependencies
|
||||
├── dashboards/ # Grafana dashboards for monitoring
|
||||
├── hack/ # Helper scripts for local development
|
||||
│ └── e2e-apps/ # End-to-end application tests
|
||||
├── scripts/ # Scripts used by cozystack container
|
||||
│ └── migrations/ # Version migration scripts
|
||||
├── docs/ # Documentation
|
||||
│ ├── agents/ # AI agent instructions
|
||||
│ └── changelogs/ # Release changelogs
|
||||
├── cmd/ # Go command entry points
|
||||
│ ├── cozystack-api/
|
||||
│ ├── cozystack-controller/
|
||||
│ └── cozystack-assets-server/
|
||||
├── internal/ # Internal Go packages
|
||||
│ ├── controller/ # Controller implementations
|
||||
│ └── lineagecontrollerwebhook/
|
||||
├── pkg/ # Public Go packages
|
||||
│ ├── apis/
|
||||
│ ├── apiserver/
|
||||
│ └── registry/
|
||||
└── api/ # Kubernetes API definitions (CRDs)
|
||||
└── v1alpha1/
|
||||
```
|
||||
|
||||
## Package Structure
|
||||
|
||||
Every package is a Helm chart following the umbrella chart pattern:
|
||||
|
||||
```
|
||||
packages/<category>/<package-name>/
|
||||
├── Chart.yaml # Chart definition and parameter docs
|
||||
├── Makefile # Development workflow targets
|
||||
├── charts/ # Vendored upstream charts
|
||||
├── images/ # Dockerfiles and image build context
|
||||
├── patches/ # Optional upstream chart patches
|
||||
├── templates/ # Additional manifests
|
||||
├── templates/dashboard-resourcemap.yaml # Dashboard resource mapping
|
||||
├── values.yaml # Override values for upstream
|
||||
└── values.schema.json # JSON schema for validation and UI
|
||||
```
|
||||
|
||||
## Conventions
|
||||
|
||||
### Helm Charts
|
||||
- Follow **umbrella chart** pattern for system components
|
||||
- Include upstream charts in `charts/` directory (vendored, not referenced)
|
||||
- Override configuration in root `values.yaml`
|
||||
- Use `values.schema.json` for input validation and dashboard UI rendering
|
||||
|
||||
### Go Code
|
||||
- Follow standard **Go conventions** and idioms
|
||||
- Use **controller-runtime** patterns for Kubernetes controllers
|
||||
- Prefer **kubebuilder** for API definitions and controllers
|
||||
- Add proper error handling and structured logging
|
||||
|
||||
### Git Commits
|
||||
- Use format: `[component] Description`
|
||||
- Always use `--signoff` flag
|
||||
- Reference PR numbers when available
|
||||
- Keep commits atomic and focused
|
||||
- Follow conventional commit format for changelogs
|
||||
|
||||
### Documentation
|
||||
|
||||
Documentation is organized as follows:
|
||||
- `docs/` - General documentation
|
||||
- `docs/agents/` - Instructions for AI agents
|
||||
- `docs/changelogs/` - Release changelogs
|
||||
- Main website: https://github.com/cozystack/website
|
||||
|
||||
## Things Agents Should Not Do
|
||||
|
||||
### Never Edit These
|
||||
- Do not modify files in `/vendor/` (Go dependencies)
|
||||
- Do not edit generated files: `zz_generated.*.go`
|
||||
- Do not change `go.mod`/`go.sum` manually (use `go get`)
|
||||
- Do not edit upstream charts in `packages/*/charts/` directly (use patches)
|
||||
- Do not modify image digests in `values.yaml` (generated by build)
|
||||
|
||||
### Version Control
|
||||
- Do not commit built artifacts from `_out`
|
||||
- Do not commit test artifacts or temporary files
|
||||
|
||||
### Git Operations
|
||||
- Do not force push to main/master
|
||||
- Do not update git config
|
||||
- Do not perform destructive operations without explicit request
|
||||
|
||||
### Core Components
|
||||
- Do not modify `packages/core/platform/` without understanding migration impact
|
||||
|
||||
29
docs/agents/releasing.md
Normal file
29
docs/agents/releasing.md
Normal file
@@ -0,0 +1,29 @@
|
||||
# Release Process
|
||||
|
||||
This document provides instructions for AI agents on how to handle release-related tasks.
|
||||
|
||||
## When to Use
|
||||
|
||||
Follow these instructions when the user asks to:
|
||||
- Create a new release
|
||||
- Prepare a release
|
||||
- Tag a release
|
||||
- Perform release-related tasks
|
||||
|
||||
## Instructions
|
||||
|
||||
For detailed release process instructions, follow the steps documented in:
|
||||
|
||||
**[docs/release.md](../release.md)**
|
||||
|
||||
## Quick Reference
|
||||
|
||||
The release process typically involves:
|
||||
1. Preparing the release branch
|
||||
2. Generating changelog
|
||||
3. Updating version numbers
|
||||
4. Creating git tags
|
||||
5. Building and publishing artifacts
|
||||
|
||||
All detailed steps are documented in `docs/release.md`.
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
# Changes after v0.37.0
|
||||
|
||||
* [lineage] Break webhook out into a separate daemonset. Reduce unnecessary webhook calls by marking handled resources and excluding them from consideration by the webhook's object selector (@lllamnyp in #1515).
|
||||
31
docs/changelogs/v0.37.1.md
Normal file
31
docs/changelogs/v0.37.1.md
Normal file
@@ -0,0 +1,31 @@
|
||||
|
||||
<!--
|
||||
https://github.com/cozystack/cozystack/releases/tag/v0.37.1
|
||||
-->
|
||||
|
||||
## Features and Improvements
|
||||
|
||||
* **[api] Efficient listing of TenantNamespaces**: Optimized TenantNamespace listing by replacing per-namespace SubjectAccessReview calls with group-based rolebinding checks, significantly reducing API latency and improving performance ([**@lllamnyp**](https://github.com/lllamnyp) in #1507).
|
||||
|
||||
## Fixes
|
||||
|
||||
* **[api] Fix RBAC for listing of TenantNamespaces and handle system:masters**: Fixed regression in TenantNamespace listing RBAC and added proper handling for system:masters group to ensure correct authorization ([**@kvaps**](https://github.com/kvaps) in #1511).
|
||||
* **[dashboard] Fix logout**: Fixed dashboard logout functionality to properly clear session and redirect users ([**@kvaps**](https://github.com/kvaps) in #1510).
|
||||
* **[installer] Add additional check to wait for lineage-webhook**: Added additional readiness check to ensure lineage-webhook is fully ready before proceeding with installation, improving upgrade reliability ([**@kvaps**](https://github.com/kvaps) in #1506).
|
||||
|
||||
## Development, Testing, and CI/CD
|
||||
|
||||
* **[tests] Make Kubernetes tests POSIX-compatible**: Replaced bash-specific constructs with POSIX-compliant code, ensuring tests work reliably with /bin/sh and improving compatibility across different shell environments ([**@IvanHunters**](https://github.com/IvanHunters) in #1509).
|
||||
|
||||
## Documentation
|
||||
|
||||
* **[website] Update troubleshooting documentation**: Updated Kubernetes installation troubleshooting guide with additional information and fixes ([**@lb0o**](https://github.com/lb0o) in cozystack/website@82beddd).
|
||||
* **[website] Add LLDPD disabling documentation**: Added minimal patch documentation for disabling lldpd based on official LLDPD usage guide ([**@lb0o**](https://github.com/lb0o) in cozystack/website@7ec5d7b).
|
||||
* **[website] Fix typo in utility command**: Fixed typo in utility command documentation ([**@lb0o**](https://github.com/lb0o) in cozystack/website@6c76cb5).
|
||||
* **[website] Update backup and recovery docs**: Updated backup and recovery documentation with latest information ([**@kvaps**](https://github.com/kvaps) in cozystack/website@2781aa5).
|
||||
* **[website] Add Troubleshooting checklist**: Added troubleshooting checklist to help users diagnose and resolve common issues ([**@kvaps**](https://github.com/kvaps) in cozystack/website@59fc304).
|
||||
|
||||
---
|
||||
|
||||
**Full Changelog**: [v0.37.0...v0.37.1](https://github.com/cozystack/cozystack/compare/v0.37.0...v0.37.1)
|
||||
|
||||
21
docs/changelogs/v0.37.2.md
Normal file
21
docs/changelogs/v0.37.2.md
Normal file
@@ -0,0 +1,21 @@
|
||||
|
||||
<!--
|
||||
https://github.com/cozystack/cozystack/releases/tag/v0.37.2
|
||||
-->
|
||||
|
||||
## Features and Improvements
|
||||
|
||||
* **[lineage] Separate webhook from cozy controller**: Separated the lineage-controller-webhook from cozystack-controller into a separate daemonset component deployed on all control-plane nodes, reducing API server latency and improving performance by decreasing outgoing API calls. Introduced internal label to track resources already handled by the webhook ([**@lllamnyp**](https://github.com/lllamnyp) in #1515).
|
||||
|
||||
## Fixes
|
||||
|
||||
* **[api] Fix listing tenantnamespaces for non-oidc users**: Fixed TenantNamespace listing functionality for users not using OIDC authentication, ensuring proper namespace visibility for all authentication methods ([**@kvaps**](https://github.com/kvaps) in #1517, #1519).
|
||||
|
||||
## Migration and Upgrades
|
||||
|
||||
* **[platform] Better migration for 0.36.2->0.37.2+**: Improved migration script for users upgrading directly from 0.36.2 to 0.37.2+, ensuring the new lineage webhook daemonset is properly deployed and fixing a bug where webhook readiness was not appropriately verified during migration ([**@lllamnyp**](https://github.com/lllamnyp) in #1521, #1522).
|
||||
|
||||
---
|
||||
|
||||
**Full Changelog**: [v0.37.1...v0.37.2](https://github.com/cozystack/cozystack/compare/v0.37.1...v0.37.2)
|
||||
|
||||
45
docs/changelogs/v0.37.3.md
Normal file
45
docs/changelogs/v0.37.3.md
Normal file
@@ -0,0 +1,45 @@
|
||||
|
||||
<!--
|
||||
https://github.com/cozystack/cozystack/releases/tag/v0.37.3
|
||||
-->
|
||||
|
||||
## Features and Improvements
|
||||
|
||||
* **[apps] Make VM service user facing**: Virtual machine services are now marked as user-facing, improving service discovery and visibility in the dashboard ([**@lllamnyp**](https://github.com/lllamnyp) in #1523).
|
||||
* **[seaweedfs] Allow users to discover their buckets**: Users can now discover and list their S3 buckets in SeaweedFS, improving usability and bucket management ([**@kvaps**](https://github.com/kvaps) in #1528).
|
||||
* **[seaweedfs] Update SeaweedFS v3.99 and deploy S3 as stacked service**: Updated SeaweedFS to version 3.99 and deployed S3 gateway as a stacked service for better integration and performance ([**@kvaps**](https://github.com/kvaps) in #1562).
|
||||
* **[dashboard] Show service LB IP**: Fixed JSON path issue to correctly display Service LoadBalancer IPs in the dashboard table view, improving visibility of service endpoints ([**@lllamnyp**](https://github.com/lllamnyp) in #1524).
|
||||
* **[dashboard] Update openapi-ui v1.0.3 + fixes**: Updated OpenAPI UI to version 1.0.3 with various fixes and improvements ([**@kvaps**](https://github.com/kvaps) in #1564).
|
||||
* **[kubernetes] Use controlPlane.replicas field**: Fixed managed Kubernetes app to properly use the `controlPlane.replicas` field instead of hardcoding the value, allowing users to configure control plane replica count ([**@lllamnyp**](https://github.com/lllamnyp) in #1556).
|
||||
* **[monitoring] add settings alert for slack**: Added Slack integration configuration for Alerta alerts, enabling notifications to Slack channels ([**@scooby87**](https://github.com/scooby87) in #1545).
|
||||
|
||||
## Fixes
|
||||
|
||||
* **[lineage] Check for nil chart in HelmRelease**: Added nil check to prevent crashes when lineage webhook encounters HelmReleases using `chartRef` instead of `chart`, improving stability ([**@lllamnyp**](https://github.com/lllamnyp) in #1525).
|
||||
* **[kamaji] Respect 3rd party labels**: Applied patch to Kamaji controller to respect third-party labels, preventing reconciliation loops between lineage webhook and Kamaji controller ([**@lllamnyp**](https://github.com/lllamnyp) in #1531, #1534).
|
||||
* **[redis-operator] Build patched operator in-tree**: Moved Redis operator build into Cozystack organization and patched it to prevent overwriting third-party labels on owned resources ([**@lllamnyp**](https://github.com/lllamnyp) in #1547).
|
||||
* **[mariadb-operator] Add post-delete job to remove PVCs**: Added post-delete job to automatically remove PersistentVolumeClaims when MariaDB instances are deleted, preventing orphaned storage resources ([**@IvanHunters**](https://github.com/IvanHunters) in #1553).
|
||||
* **[velero] Set defaultItemOperationTimeout=24h**: Set default item operation timeout to 24 hours for Velero backups, preventing timeouts on large backup operations ([**@kvaps**](https://github.com/kvaps) in #1542).
|
||||
|
||||
## Dependencies
|
||||
|
||||
* **Update LINSTOR v1.32.3**: Updated LINSTOR to version 1.32.3 with latest features and bug fixes ([**@kvaps**](https://github.com/kvaps) in #1565).
|
||||
|
||||
## System Configuration
|
||||
|
||||
* **[system] kube-ovn: turn off enableLb**: Disabled load balancer functionality in Kube-OVN configuration ([**@nbykov0**](https://github.com/nbykov0) in #1548).
|
||||
|
||||
## Documentation
|
||||
|
||||
* **[website] Update LINSTOR documentation**: Updated LINSTOR guide and set failmode=continue for ZFS configurations ([**@kvaps**](https://github.com/kvaps) in cozystack/website@033804e).
|
||||
* **[website] Update managed apps reference**: Updated managed applications reference documentation ([**@kvaps**](https://github.com/kvaps) in cozystack/website@b886a74).
|
||||
* **[website] Update external apps documentation**: Updated documentation for external applications ([**@kvaps**](https://github.com/kvaps) in cozystack/website@565dad9).
|
||||
* **[website] Add naming conventions**: Added naming conventions documentation ([**@kvaps**](https://github.com/kvaps) in cozystack/website@b227abb).
|
||||
* **[website] Update golden image documentation**: Updated documentation for creating golden images for virtual machines ([**@kvaps**](https://github.com/kvaps) in cozystack/website@34c2f3a, cozystack/website@ef65593).
|
||||
* **[website] Fix documentation formatting**: Fixed alerts, infoboxes, tabs styles and main page formatting ([**@kvaps**](https://github.com/kvaps) in cozystack/website@e992e97, cozystack/website@b2c4dee).
|
||||
* **[website] Fix typo in blog article**: Fixed typo in blog article ([**@kvaps**](https://github.com/kvaps) in cozystack/website@0a4bbf3).
|
||||
|
||||
---
|
||||
|
||||
**Full Changelog**: [v0.37.2...v0.37.3](https://github.com/cozystack/cozystack/compare/v0.37.2...v0.37.3)
|
||||
|
||||
29
docs/changelogs/v0.37.4.md
Normal file
29
docs/changelogs/v0.37.4.md
Normal file
@@ -0,0 +1,29 @@
|
||||
|
||||
<!--
|
||||
https://github.com/cozystack/cozystack/releases/tag/v0.37.4
|
||||
-->
|
||||
|
||||
## Features and Improvements
|
||||
|
||||
* **[tenant] Allow listing workloads**: Enabled listing of workloads for tenants, improving visibility and management of tenant resources ([**@kvaps**](https://github.com/kvaps) in #1576, #1577).
|
||||
|
||||
## Fixes
|
||||
|
||||
* **[seaweedfs] Fix migration to v3.99**: Fixed migration issues when upgrading SeaweedFS to version 3.99, ensuring smooth upgrades ([**@kvaps**](https://github.com/kvaps) in #1572, #1575).
|
||||
* **[nats] Merge container spec, not podTemplate**: Fixed NATS configuration to properly merge container specifications instead of podTemplate, ensuring correct container configuration ([**@lllamnyp**](https://github.com/lllamnyp) in #1571, #1574).
|
||||
|
||||
## Development, Testing, and CI/CD
|
||||
|
||||
* **[e2e] Increase Kubernetes connection timeouts**: Increased connection and request timeouts in E2E tests when communicating with Kubernetes API, improving test stability under high load and slow cluster response conditions ([**@IvanHunters**](https://github.com/IvanHunters) in #1570, #1573).
|
||||
|
||||
## Documentation
|
||||
|
||||
* **[website] Optimize website for mobile devices**: Improved website layout and responsiveness for mobile devices ([**@kvaps**](https://github.com/kvaps) in cozystack/website@3ab2338).
|
||||
* **[website] Add OpenAPI UI**: Added OpenAPI UI documentation and integration ([**@kvaps**](https://github.com/kvaps) in cozystack/website@b1c1668).
|
||||
* **[website] Update Cozystack video in hero banner**: Updated hero banner with new Cozystack video ([**@kvaps**](https://github.com/kvaps) in cozystack/website@e351137).
|
||||
* **[website] Add screenshots carousel**: Added screenshots carousel to showcase Cozystack features ([**@kvaps**](https://github.com/kvaps) in cozystack/website@8422bd0).
|
||||
|
||||
---
|
||||
|
||||
**Full Changelog**: [v0.37.3...v0.37.4](https://github.com/cozystack/cozystack/compare/v0.37.3...v0.37.4)
|
||||
|
||||
28
docs/changelogs/v0.37.5.md
Normal file
28
docs/changelogs/v0.37.5.md
Normal file
@@ -0,0 +1,28 @@
|
||||
|
||||
<!--
|
||||
https://github.com/cozystack/cozystack/releases/tag/v0.37.5
|
||||
-->
|
||||
|
||||
## Features and Improvements
|
||||
|
||||
* **[dashboard-controller] Move badges generation logic to internal dashboard component**: Moved badges generation logic to internal dashboard component for better code organization and maintainability ([**@kvaps**](https://github.com/kvaps) in #1567).
|
||||
|
||||
## Security
|
||||
|
||||
* **[redis] Bump Redis image version for security fixes**: Updated Redis image version to include latest security fixes, improving cluster security ([**@IvanHunters**](https://github.com/IvanHunters) in #1580).
|
||||
* **[flux] Close Flux Operator ports to external access**: Removed hostPort and hostNetwork from Flux Operator Deployment, ensuring ports 8080 and 8081 are only accessible within the cluster, preventing external exposure and improving security ([**@IvanHunters**](https://github.com/IvanHunters) in #1581).
|
||||
* **[ingress] Enforce HTTPS-only for API**: Added force-ssl-redirect annotation to default API Ingress, ensuring all HTTP traffic is redirected to HTTPS, preventing unencrypted external access and improving security ([**@IvanHunters**](https://github.com/IvanHunters) in #1582, #1585).
|
||||
|
||||
## Fixes
|
||||
|
||||
* **[nats] Fixes for NATS App Helm chart, fix template issues with config.merge**: Fixed template issues in NATS Helm chart related to config.merge value, ensuring correct configuration ([**@insignia96**](https://github.com/insignia96) in #1583, #1591).
|
||||
* **[kubevirt] Fix: kubevirt metrics rule**: Fixed KubeVirt metrics rule configuration ([**@kvaps**](https://github.com/kvaps) in #1584, #1588).
|
||||
|
||||
## System Configuration
|
||||
|
||||
* **[core] rm talos lldp extension**: Removed Talos LLDP extension from core configuration ([**@nbykov0**](https://github.com/nbykov0) in #1586).
|
||||
|
||||
---
|
||||
|
||||
**Full Changelog**: [v0.37.4...v0.37.5](https://github.com/cozystack/cozystack/compare/v0.37.4...v0.37.5)
|
||||
|
||||
30
docs/changelogs/v0.37.6.md
Normal file
30
docs/changelogs/v0.37.6.md
Normal file
@@ -0,0 +1,30 @@
|
||||
|
||||
<!--
|
||||
https://github.com/cozystack/cozystack/releases/tag/v0.37.6
|
||||
-->
|
||||
|
||||
## Features and Improvements
|
||||
|
||||
* **[api] Use shared informer cache**: Optimized API server by using shared informer cache, reducing API server load and improving performance ([**@lllamnyp**](https://github.com/lllamnyp) in #1539).
|
||||
* **[dashboard] sync with upstream & enhancements**: Synchronized dashboard with upstream and added various enhancements ([**@kvaps**](https://github.com/kvaps) in #1603).
|
||||
* **[cozystack-api][dashboard] Fix filtering for application services/ingresses/secrets**: Fixed filtering functionality for application services, ingresses, and secrets in both API and dashboard ([**@kvaps**](https://github.com/kvaps) in #1612).
|
||||
|
||||
## Fixes
|
||||
|
||||
* **[controller] Remove crdmem, handle DaemonSet**: Removed crdmem and improved DaemonSet handling in controller ([**@lllamnyp**](https://github.com/lllamnyp) in #1555).
|
||||
* **[dashboard] Revert reconciler removal**: Reverted reconciler removal to restore proper dashboard functionality ([**@lllamnyp**](https://github.com/lllamnyp) in #1559).
|
||||
* **[dashboard-controller] Fix static resources reconciliation and showing secrets**: Fixed static resources reconciliation and improved secret display in dashboard controller ([**@kvaps**](https://github.com/kvaps) in #1605).
|
||||
* **[api,lineage] Ensure node-local traffic**: Ensured node-local traffic handling for API and lineage components ([**@lllamnyp**](https://github.com/lllamnyp) in #1606).
|
||||
* **[virtual-machine] Revert per-vm network policies**: Reverted per-VM network policies to previous behavior ([**@lllamnyp**](https://github.com/lllamnyp) in #1611).
|
||||
* **[cozy-lib] Fix: handling resources=nil**: Fixed handling of nil resources in cozy-lib templates ([**@kvaps**](https://github.com/kvaps) in #1607).
|
||||
* **[nats] Use dig function to check for existing secret and prevent nil indexing**: Fixed NATS app chart to use dig function for checking existing secrets and prevent nil indexing errors ([**@kvaps**](https://github.com/kvaps) in #1609, #1610).
|
||||
|
||||
## Development, Testing, and CI/CD
|
||||
|
||||
* **[cozystack-controller] improve API tests**: Improved API tests for cozystack-controller ([**@lllamnyp**](https://github.com/lllamnyp) in #1599).
|
||||
* **[kubernetes] Helm hooks for cleanup**: Added Helm hooks for cleanup operations in Kubernetes app ([**@lllamnyp**](https://github.com/lllamnyp) in #1616).
|
||||
|
||||
---
|
||||
|
||||
**Full Changelog**: [v0.37.5...v0.37.6](https://github.com/cozystack/cozystack/compare/v0.37.5...v0.37.6)
|
||||
|
||||
18
docs/changelogs/v0.37.7.md
Normal file
18
docs/changelogs/v0.37.7.md
Normal file
@@ -0,0 +1,18 @@
|
||||
|
||||
<!--
|
||||
https://github.com/cozystack/cozystack/releases/tag/v0.37.7
|
||||
-->
|
||||
|
||||
## Fixes
|
||||
|
||||
* **[kubernetes] Cleanup loadbalancer services**: Added cleanup functionality for load balancer services in Kubernetes app ([**@lllamnyp**](https://github.com/lllamnyp) in #1622).
|
||||
* **[rbac] Fix permissions for high-privilege users**: Fixed RBAC permissions for high-privilege users, ensuring proper access control ([**@lllamnyp**](https://github.com/lllamnyp) in #1624).
|
||||
|
||||
## System Configuration
|
||||
|
||||
* **[system] kubeovn: increase limits**: Increased resource limits for Kube-OVN components to improve stability and performance ([**@nbykov0**](https://github.com/nbykov0) in #1629).
|
||||
|
||||
---
|
||||
|
||||
**Full Changelog**: [v0.37.6...v0.37.7](https://github.com/cozystack/cozystack/compare/v0.37.6...v0.37.7)
|
||||
|
||||
19
docs/changelogs/v0.37.8.md
Normal file
19
docs/changelogs/v0.37.8.md
Normal file
@@ -0,0 +1,19 @@
|
||||
|
||||
<!--
|
||||
https://github.com/cozystack/cozystack/releases/tag/v0.37.8
|
||||
-->
|
||||
|
||||
## Fixes
|
||||
|
||||
* **[cozy-lib] Fix malformed ResourceQuota rendering for LoadBalancer services**: Fixed malformed ResourceQuota rendering for LoadBalancer services in cozy-lib templates ([**@IvanHunters**](https://github.com/IvanHunters) in #1642).
|
||||
* **[extra] ingress: rm spaces from external ip list**: Removed spaces from external IP list in ingress configuration, fixing formatting issues ([**@nbykov0**](https://github.com/nbykov0) in #1652).
|
||||
* **scripts: fix 20 migration**: Fixed migration script #20 to ensure proper execution during upgrades ([**@nbykov0**](https://github.com/nbykov0) in #1653).
|
||||
|
||||
## System Configuration
|
||||
|
||||
* **Increase strimzi memory limit**: Increased memory limit for Strimzi Kafka operator to improve stability and performance ([**@nbykov0**](https://github.com/nbykov0) in #1651).
|
||||
|
||||
---
|
||||
|
||||
**Full Changelog**: [v0.37.7...v0.37.8](https://github.com/cozystack/cozystack/compare/v0.37.7...v0.37.8)
|
||||
|
||||
19
docs/changelogs/v0.37.9.md
Normal file
19
docs/changelogs/v0.37.9.md
Normal file
@@ -0,0 +1,19 @@
|
||||
|
||||
<!--
|
||||
https://github.com/cozystack/cozystack/releases/tag/v0.37.9
|
||||
-->
|
||||
|
||||
## Improvements
|
||||
|
||||
* **[seaweedfs] Extended CA certificate duration to reduce disruptive CA rotations**: Extended CA certificate duration to reduce disruptive CA rotations. ([**@IvanHunters**](https://github.com/IvanHunters) in #1657, #1666).
|
||||
* **[dashboard] Add config hash annotations to restart pods on config changes**: Added config hash annotations to restart pods when configuration changes, ensuring pods are automatically restarted when their configuration is updated ([**@kvaps**](https://github.com/kvaps) in #1662, #1665).
|
||||
|
||||
## Fixes
|
||||
|
||||
* **[tenant][kubernetes] Introduce better cleanup logic**: Improved cleanup logic for tenant Kubernetes resources, ensuring proper resource cleanup when tenants are deleted or updated ([**@kvaps**](https://github.com/kvaps) in #1661).
|
||||
* **[dashboard] Fix loading arrays in forms when editing existing objects**: Fixed issue where arrays in forms were not loading correctly when editing existing objects in the dashboard ([**@kvaps**](https://github.com/kvaps)).
|
||||
|
||||
---
|
||||
|
||||
**Full Changelog**: [v0.37.8...v0.37.9](https://github.com/cozystack/cozystack/compare/v0.37.8...v0.37.9)
|
||||
|
||||
235
docs/changelogs/v0.38.0.md
Normal file
235
docs/changelogs/v0.38.0.md
Normal file
@@ -0,0 +1,235 @@
|
||||
# Cozystack v0.38 — "VPC & Enhanced Networking"
|
||||
|
||||
This release introduces **Virtual Private Cloud (VPC)** support, enabling advanced networking capabilities for tenant applications. We've also added VNC console support in the dashboard, made Kubernetes worker versions configurable, and delivered numerous improvements and fixes across the platform.
|
||||
|
||||
### Virtual Private Cloud (VPC) Networking
|
||||
|
||||
Cozystack v0.38.0 introduces Virtual Private Cloud (VPC) support, enabling platform administrators to create isolated network segments for tenant applications. VPCs provide network isolation and allow fine-grained control over network topology, subnets, and routing. Each VPC can contain multiple subnets, and administrators can configure subnet details including IP ranges, gateway settings, and DNS configuration.
|
||||
|
||||
The VPC feature integrates seamlessly with the Cozystack dashboard, allowing users to view and manage VPCs and their subnets through an intuitive interface. Subnet details are exposed in the dashboard as tables, making it easy to understand network configuration at a glance. VPC configuration is stored in ConfigMaps with predictable naming, ensuring reliable access to subnet information.
|
||||
|
||||
This feature is particularly valuable for multi-tenant environments where network isolation is critical, and for applications that require specific network configurations or routing rules.
|
||||
|
||||
### VNC Console for Virtual Machines
|
||||
|
||||
The Cozystack dashboard now includes a built-in VNC console for virtual machines, enabling users to access VM console directly from the web interface without requiring external tools. This feature provides immediate access to virtual machine consoles for troubleshooting, configuration, and maintenance tasks. The VNC console integration streamlines VM management workflows and improves the user experience by keeping all VM operations within the Cozystack dashboard.
|
||||
|
||||
## Highlights
|
||||
|
||||
* **Virtual Private Cloud (VPC)**: New VPC system module enables advanced networking with Multus CNI, subnet management, and network isolation for tenant applications ([**@nbykov0**](https://github.com/nbykov0) in #1543; [**@lllamnyp**](https://github.com/lllamnyp) in #1587, #1590, #1600, #1621, #1638).
|
||||
* **VNC Console in Dashboard**: Users can now access virtual machine consoles directly from the dashboard, improving VM management experience ([**@kvaps**](https://github.com/kvaps) in #1627).
|
||||
* **Configurable Kubernetes Worker Versions**: Platform administrators can now configure Kubernetes worker node versions independently, providing more flexibility in cluster management ([**@lllamnyp**](https://github.com/lllamnyp) in #1619).
|
||||
* **Security Enhancements**: Multiple security improvements including HTTPS-only enforcement for API, closed Flux Operator ports, and Redis security updates ([**@IvanHunters**](https://github.com/IvanHunters) in #1580, #1581, #1582).
|
||||
* **Cozy-lib Improvements**: Enhanced flatten function with better ResourceQuota handling and nil resource support ([**@lllamnyp**](https://github.com/lllamnyp) in #1647; [**@IvanHunters**](https://github.com/IvanHunters) in #1642; [**@kvaps**](https://github.com/kvaps) in #1607).
|
||||
|
||||
---
|
||||
|
||||
## New features
|
||||
|
||||
### VPC (Virtual Private Cloud)
|
||||
|
||||
* **[system] Add VPC**: Introduced Virtual Private Cloud system module with Multus CNI integration, enabling advanced networking capabilities for tenant applications ([**@nbykov0**](https://github.com/nbykov0) in #1543).
|
||||
* **[vpc] Install Multus by default**: Multus CNI is now installed by default when VPC is enabled, providing multi-network interface support ([**@lllamnyp**](https://github.com/lllamnyp) in #1587).
|
||||
* **[vpc] Give predictable name to subnet configmap**: Subnet configuration maps now use predictable naming for better management and debugging ([**@lllamnyp**](https://github.com/lllamnyp) in #1590).
|
||||
* **[vpc] Entry per subnet in the subnets configmap**: Each subnet now has its own entry in the subnets configmap, improving subnet organization and management ([**@lllamnyp**](https://github.com/lllamnyp) in #1600).
|
||||
* **[vpc,dashboard] Print subnet details as table**: Subnet details are now displayed as a table in the dashboard, improving visibility and management ([**@lllamnyp**](https://github.com/lllamnyp) in #1621).
|
||||
* **[apps] Add VPC app**: Added VPC application for tenant use, enabling users to create and manage VPCs ([**@nbykov0**](https://github.com/nbykov0) in #1543).
|
||||
|
||||
### Dashboard
|
||||
|
||||
* **[dashboard] Introduce VNC console**: Added VNC console support in the dashboard, allowing users to access virtual machine consoles directly from the web interface ([**@kvaps**](https://github.com/kvaps) in #1627).
|
||||
* **[dashboard] sync with upstream & enhancements**: Synchronized dashboard with upstream project and added various enhancements ([**@kvaps**](https://github.com/kvaps) in #1603).
|
||||
* **[dashboard] Migrate patches to upstream project**: Migrated dashboard patches to upstream project for better maintainability ([**@kvaps**](https://github.com/kvaps) in #1569).
|
||||
|
||||
### Kubernetes
|
||||
|
||||
* **[kubernetes] Make worker version configurable**: Platform administrators can now configure Kubernetes worker node versions independently from control plane versions, providing more flexibility ([**@lllamnyp**](https://github.com/lllamnyp) in #1619).
|
||||
* **[kubernetes] Use controlPlane.replicas field**: Fixed managed Kubernetes app to properly use the `controlPlane.replicas` field instead of hardcoding the value ([**@lllamnyp**](https://github.com/lllamnyp) in #1556).
|
||||
* **[kubernetes] Helm hooks for cleanup**: Added Helm hooks for cleanup operations in Kubernetes app ([**@lllamnyp**](https://github.com/lllamnyp) in #1606).
|
||||
|
||||
### API & Platform
|
||||
|
||||
* **[api] Efficient listing of TenantNamespaces**: Optimized TenantNamespace listing by replacing per-namespace SubjectAccessReview calls with group-based rolebinding checks, significantly reducing API latency ([**@lllamnyp**](https://github.com/lllamnyp) in #1507).
|
||||
* **[api] Use shared informer cache**: Optimized API server by using shared informer cache, reducing API server load and improving performance ([**@lllamnyp**](https://github.com/lllamnyp) in #1539).
|
||||
* **[api] Fix representation of dynamic list kinds**: Fixed API representation of dynamic list kinds for better compatibility ([**@lllamnyp**](https://github.com/lllamnyp) in #1630).
|
||||
* **[api] Delete previous instance when changing type**: API now properly deletes previous instance when changing application type ([**@lllamnyp**](https://github.com/lllamnyp) in #1579).
|
||||
|
||||
### Applications
|
||||
|
||||
* **[tenant] Allow listing workloads**: Enabled listing of workloads for tenants, improving visibility and management of tenant resources ([**@kvaps**](https://github.com/kvaps) in #1576).
|
||||
* **[apps] Make VM service user facing**: Virtual machine services are now marked as user-facing, improving service discovery and visibility in the dashboard ([**@lllamnyp**](https://github.com/lllamnyp) in #1523).
|
||||
* **[foundationdb] Upgrade FDB app for latest Cozy**: Upgraded FoundationDB application for compatibility with latest Cozystack version ([**@lllamnyp**](https://github.com/lllamnyp) in #1505).
|
||||
|
||||
### Storage & Backups
|
||||
|
||||
* **[seaweedfs] Update SeaweedFS v3.99 and deploy S3 as stacked service**: Updated SeaweedFS to version 3.99 and deployed S3 gateway as a stacked service for better integration and performance ([**@kvaps**](https://github.com/kvaps) in #1562).
|
||||
* **[seaweedfs] Allow users to discover their buckets**: Users can now discover and list their S3 buckets in SeaweedFS, improving usability and bucket management ([**@kvaps**](https://github.com/kvaps) in #1528).
|
||||
* **[velero] Set defaultItemOperationTimeout=24h**: Set default item operation timeout to 24 hours for Velero backups, preventing timeouts on large backup operations ([**@kvaps**](https://github.com/kvaps) in #1542).
|
||||
|
||||
### Monitoring & Operations
|
||||
|
||||
* **[monitoring] add settings alert for slack**: Added Slack integration configuration for Alerta alerts, enabling notifications to Slack channels ([**@scooby87**](https://github.com/scooby87) in #1545).
|
||||
|
||||
---
|
||||
|
||||
## Improvements (minor)
|
||||
|
||||
* **[lineage] Separate webhook from cozy controller**: Separated the lineage-controller-webhook from cozystack-controller into a separate daemonset component deployed on all control-plane nodes, reducing API server latency ([**@lllamnyp**](https://github.com/lllamnyp) in #1515).
|
||||
* **[dashboard] Show service LB IP**: Fixed JSON path issue to correctly display Service LoadBalancer IPs in the dashboard table view ([**@lllamnyp**](https://github.com/lllamnyp) in #1524).
|
||||
* **[dashboard] Update openapi-ui v1.0.3 + fixes**: Updated OpenAPI UI to version 1.0.3 with various fixes and improvements ([**@kvaps**](https://github.com/kvaps) in #1564).
|
||||
* **[dashboard-controller] Move badges generation logic to internal dashboard component**: Moved badges generation logic to internal dashboard component for better code organization ([**@kvaps**](https://github.com/kvaps) in #1567).
|
||||
* **[bucket] Expose bucket name in secrets**: Bucket names are now exposed in secrets for better integration with applications ([**@lllamnyp**](https://github.com/lllamnyp) in #1518).
|
||||
* **[platform] Better migration for 0.36.2->0.37.2+**: Improved migration script for users upgrading directly from 0.36.2 to 0.37.2+ ([**@lllamnyp**](https://github.com/lllamnyp) in #1521).
|
||||
* **[cozy-lib] Improve flatten function**: Improved flatten function in cozy-lib with better handling of complex resource structures ([**@lllamnyp**](https://github.com/lllamnyp) in #1647).
|
||||
* **[dx] JSDoc compatible syntax for values.yaml**: Added JSDoc compatible syntax for values.yaml documentation ([**@kvaps**](https://github.com/kvaps) in #1536).
|
||||
* **[system] Tune kubevirt rollout and eviction settings**: Tuned KubeVirt rollout and eviction settings for better stability ([**@nbykov0**](https://github.com/nbykov0) in #1544).
|
||||
* **[system] multus: update to the latest version**: Updated Multus CNI to the latest version ([**@nbykov0**](https://github.com/nbykov0) in #1628).
|
||||
* **[system] kubeovn: increase limits**: Increased resource limits for Kube-OVN components to improve stability and performance ([**@nbykov0**](https://github.com/nbykov0) in #1629).
|
||||
* **[linstor] Update Piraeus Operator to v2.10.1 to enable RWX support**: Updated Piraeus Operator to v2.10.1, enabling ReadWriteMany (RWX) volume support ([**@kvaps**](https://github.com/kvaps) in #1650).
|
||||
* **[ci,dx] Bump MariaDB operator version**: Bumped MariaDB operator version for latest features and bug fixes ([**@IvanHunters**](https://github.com/IvanHunters) in #1646).
|
||||
|
||||
---
|
||||
|
||||
## Bug fixes
|
||||
|
||||
* **[api] Fix RBAC for listing of TenantNamespaces and handle system:masters**: Fixed regression in TenantNamespace listing RBAC and added proper handling for system:masters group ([**@kvaps**](https://github.com/kvaps) in #1511).
|
||||
* **[api] Fix listing tenantnamespaces for non-oidc users**: Fixed TenantNamespace listing functionality for users not using OIDC authentication ([**@kvaps**](https://github.com/kvaps) in #1517).
|
||||
* **[dashboard] Fix logout**: Fixed dashboard logout functionality to properly clear session and redirect users ([**@kvaps**](https://github.com/kvaps) in #1510).
|
||||
* **[installer] Add additional check to wait for lineage-webhook**: Added additional readiness check to ensure lineage-webhook is fully ready before proceeding with installation ([**@kvaps**](https://github.com/kvaps) in #1506).
|
||||
* **[lineage] Check for nil chart in HelmRelease**: Added nil check to prevent crashes when lineage webhook encounters HelmReleases using `chartRef` instead of `chart` ([**@lllamnyp**](https://github.com/lllamnyp) in #1525).
|
||||
* **[kamaji] Respect 3rd party labels**: Applied patch to Kamaji controller to respect third-party labels, preventing reconciliation loops ([**@lllamnyp**](https://github.com/lllamnyp) in #1531).
|
||||
* **[redis-operator] Build patched operator in-tree**: Moved Redis operator build into Cozystack organization and patched it to prevent overwriting third-party labels ([**@lllamnyp**](https://github.com/lllamnyp) in #1547).
|
||||
* **[mariadb-operator] Add post-delete job to remove PVCs**: Added post-delete job to automatically remove PersistentVolumeClaims when MariaDB instances are deleted ([**@IvanHunters**](https://github.com/IvanHunters) in #1553).
|
||||
* **[seaweedfs] Fix migration to v3.99**: Fixed migration issues when upgrading SeaweedFS to version 3.99 ([**@kvaps**](https://github.com/kvaps) in #1572).
|
||||
* **[nats] Merge container spec, not podTemplate**: Fixed NATS configuration to properly merge container specifications instead of podTemplate ([**@lllamnyp**](https://github.com/lllamnyp) in #1571).
|
||||
* **[nats] Fixes for NATS App Helm chart, fix template issues with config.merge**: Fixed template issues in NATS Helm chart related to config.merge value ([**@insignia96**](https://github.com/insignia96) in #1583).
|
||||
* **[nats] Fix NATS app chart to use existing secret credentials when present**: Fixed NATS app chart to use existing secret credentials when present, preventing credential regeneration ([**@insignia96**](https://github.com/insignia96) in #1599).
|
||||
* **[kubevirt] Fix: kubevirt metrics rule**: Fixed KubeVirt metrics rule configuration ([**@kvaps**](https://github.com/kvaps) in #1584).
|
||||
* **[controller] Remove crdmem, handle DaemonSet**: Removed crdmem and improved DaemonSet handling in controller ([**@lllamnyp**](https://github.com/lllamnyp) in #1555).
|
||||
* **[dashboard] Revert reconciler removal**: Reverted reconciler removal to restore proper dashboard functionality ([**@lllamnyp**](https://github.com/lllamnyp) in #1559).
|
||||
* **[dashboard-controller] Fix static resources reconciliation and showing secrets**: Fixed static resources reconciliation and improved secret display in dashboard controller ([**@kvaps**](https://github.com/kvaps) in #1615).
|
||||
* **[cozystack-api][dashboard] Fix filtering for application services/ingresses/secrets**: Fixed filtering functionality for application services, ingresses, and secrets in both API and dashboard ([**@kvaps**](https://github.com/kvaps) in #1612).
|
||||
* **[virtual-machine] Revert per-vm network policies**: Reverted per-VM network policies to previous behavior ([**@kvaps**](https://github.com/kvaps) in #1611).
|
||||
* **[cozy-lib] Fix: handling resources=nil**: Fixed handling of nil resources in cozy-lib templates ([**@kvaps**](https://github.com/kvaps) in #1607).
|
||||
* **[cozy-lib] Fix malformed ResourceQuota rendering for LoadBalancer services**: Fixed malformed ResourceQuota rendering for LoadBalancer services in cozy-lib templates ([**@IvanHunters**](https://github.com/IvanHunters) in #1642).
|
||||
* **[kubernetes] Cleanup loadbalancer services**: Added cleanup functionality for load balancer services in Kubernetes app ([**@lllamnyp**](https://github.com/lllamnyp) in #1631).
|
||||
* **[rbac] Fix permissions for high-privilege users**: Fixed RBAC permissions for high-privilege users, ensuring proper access control ([**@lllamnyp**](https://github.com/lllamnyp) in #1622).
|
||||
* **[vpc] Fix access to subnet details configmap**: Fixed access to subnet details configmap in VPC functionality ([**@lllamnyp**](https://github.com/lllamnyp) in #1638).
|
||||
* **[api,lineage] Ensure node-local traffic**: Ensured node-local traffic handling for API and lineage components ([**@lllamnyp**](https://github.com/lllamnyp) in #1554).
|
||||
* **[extra] ingress: rm spaces from external ip list**: Removed spaces from external IP list in ingress configuration, fixing formatting issues ([**@nbykov0**](https://github.com/nbykov0) in #1652).
|
||||
* **scripts: fix 20 migration**: Fixed migration script #20 to ensure proper execution during upgrades ([**@nbykov0**](https://github.com/nbykov0) in #1653).
|
||||
|
||||
---
|
||||
|
||||
## Security
|
||||
|
||||
* **[redis] Bump Redis image version for security fixes**: Updated Redis image version to include latest security fixes, improving cluster security ([**@IvanHunters**](https://github.com/IvanHunters) in #1580).
|
||||
* **[flux] Close Flux Operator ports to external access**: Removed hostPort and hostNetwork from Flux Operator Deployment, ensuring ports 8080 and 8081 are only accessible within the cluster ([**@IvanHunters**](https://github.com/IvanHunters) in #1581).
|
||||
* **[ingress] Enforce HTTPS-only for API**: Added force-ssl-redirect annotation to default API Ingress, ensuring all HTTP traffic is redirected to HTTPS ([**@IvanHunters**](https://github.com/IvanHunters) in #1582).
|
||||
|
||||
---
|
||||
|
||||
## Dependencies & version updates
|
||||
|
||||
* **Update LINSTOR v1.32.3**: Updated LINSTOR to version 1.32.3 with latest features and bug fixes ([**@kvaps**](https://github.com/kvaps) in #1565).
|
||||
* **Update Talos Linux v1.11.3**: Updated Talos Linux to version 1.11.3 ([**@kvaps**](https://github.com/kvaps) in #1527).
|
||||
* **Update Kube-OVN v1.14.11**: Updated Kube-OVN to version 1.14.11 ([**@kvaps**](https://github.com/kvaps) in #1514).
|
||||
* **[linstor] Update Piraeus Operator to v2.10.1**: Updated Piraeus Operator to v2.10.1 to enable RWX support ([**@kvaps**](https://github.com/kvaps) in #1650).
|
||||
* **[system] multus: update to the latest version**: Updated Multus CNI to the latest version ([**@nbykov0**](https://github.com/nbykov0) in #1628).
|
||||
* **[ci,dx] Bump MariaDB operator version**: Bumped MariaDB operator version ([**@IvanHunters**](https://github.com/IvanHunters) in #1646).
|
||||
* **Increase strimzi memory limit**: Increased memory limit for Strimzi Kafka operator to improve stability and performance ([**@nbykov0**](https://github.com/nbykov0) in #1651).
|
||||
|
||||
---
|
||||
|
||||
## System Configuration
|
||||
|
||||
* **[system] kube-ovn: turn off enableLb**: Disabled load balancer functionality in Kube-OVN configuration ([**@nbykov0**](https://github.com/nbykov0) in #1548).
|
||||
* **[core] rm talos lldp extension**: Removed Talos LLDP extension from core configuration ([**@nbykov0**](https://github.com/nbykov0) in #1586).
|
||||
|
||||
---
|
||||
|
||||
## Development, Testing, and CI/CD
|
||||
|
||||
* **[tests] Make Kubernetes tests POSIX-compatible**: Replaced bash-specific constructs with POSIX-compliant code, ensuring tests work reliably with /bin/sh ([**@IvanHunters**](https://github.com/IvanHunters) in #1509).
|
||||
* **[ferretdb] fix tests**: Fixed FerretDB tests to ensure proper execution ([**@IvanHunters**](https://github.com/IvanHunters) in #1540).
|
||||
* **[e2e] Increase Kubernetes connection timeouts**: Increased connection and request timeouts in E2E tests when communicating with Kubernetes API ([**@IvanHunters**](https://github.com/IvanHunters) in #1570).
|
||||
* **[cozystack-controller] improve API tests**: Improved API tests for cozystack-controller ([**@kvaps**](https://github.com/kvaps) in #1617).
|
||||
* **[ci] Fix build from external forks**: Fixed build process to work correctly from external forks ([**@kvaps**](https://github.com/kvaps) in #1530).
|
||||
* **[ci,dx] Add unit tests for cozy-lib**: Added unit tests for cozy-lib to improve code quality and reliability ([**@lllamnyp**](https://github.com/lllamnyp) in #1643).
|
||||
|
||||
---
|
||||
|
||||
## Documentation
|
||||
|
||||
* **[website] Add VPC page**: Added VPC documentation page explaining VPC features and usage ([**@nbykov0**](https://github.com/nbykov0) in cozystack/website@9ccac78).
|
||||
* **[website] Add VPC to auto-update list**: Added VPC to auto-update list in documentation ([**@nbykov0**](https://github.com/nbykov0) in cozystack/website@ca2bce6).
|
||||
* **[website] Update dashboard part in OIDC configuration doc**: Updated OIDC configuration documentation with dashboard information ([**@nbykov0**](https://github.com/nbykov0) in cozystack/website@6c44b93).
|
||||
* **[website] Update storage requirements**: Updated storage requirements documentation ([**@nbykov0**](https://github.com/nbykov0) in cozystack/website@cac3af6).
|
||||
* **[website] Add System Resource Planning Recommendations**: Added system resource planning recommendations documentation ([**@kvaps**](https://github.com/kvaps) in cozystack/website@c877c2a).
|
||||
* **[website] Optimize website for mobile devices**: Improved website layout and responsiveness for mobile devices ([**@kvaps**](https://github.com/kvaps) in cozystack/website@3ab2338).
|
||||
* **[website] Add OpenAPI UI**: Added OpenAPI UI documentation and integration ([**@kvaps**](https://github.com/kvaps) in cozystack/website@b1c1668).
|
||||
* **[website] Update Cozystack video in hero banner**: Updated hero banner with new Cozystack video ([**@kvaps**](https://github.com/kvaps) in cozystack/website@e351137).
|
||||
* **[website] Add screenshots carousel**: Added screenshots carousel to showcase Cozystack features ([**@kvaps**](https://github.com/kvaps) in cozystack/website@8422bd0).
|
||||
* **[website] Update LINSTOR documentation**: Updated LINSTOR guide and set failmode=continue for ZFS configurations ([**@kvaps**](https://github.com/kvaps) in cozystack/website@033804e).
|
||||
* **[website] Update managed apps reference**: Updated managed applications reference documentation ([**@kvaps**](https://github.com/kvaps) in cozystack/website@b886a74, cozystack/website@41c1849, cozystack/website@0ab71fd).
|
||||
* **[website] Update external apps documentation**: Updated documentation for external applications ([**@kvaps**](https://github.com/kvaps) in cozystack/website@565dad9).
|
||||
* **[website] Add naming conventions**: Added naming conventions documentation ([**@kvaps**](https://github.com/kvaps) in cozystack/website@b227abb).
|
||||
* **[website] Update golden image documentation**: Updated documentation for creating golden images for virtual machines ([**@kvaps**](https://github.com/kvaps) in cozystack/website@34c2f3a, cozystack/website@ef65593).
|
||||
* **[website] Fix documentation formatting**: Fixed alerts, infoboxes, tabs styles and main page formatting ([**@kvaps**](https://github.com/kvaps) in cozystack/website@e992e97, cozystack/website@b2c4dee).
|
||||
* **[website] Fix typo in blog article**: Fixed typo in blog article ([**@kvaps**](https://github.com/kvaps) in cozystack/website@0a4bbf3).
|
||||
* **[apps] vpc: more docs**: Added more VPC documentation ([**@nbykov0**](https://github.com/nbykov0) in #1594).
|
||||
* **[apps] vpc: fix typo in README**: Fixed typo in VPC README ([**@nbykov0**](https://github.com/nbykov0) in #1637).
|
||||
|
||||
---
|
||||
|
||||
## Additional Repositories
|
||||
|
||||
### boot-to-talos
|
||||
|
||||
* **[boot-to-talos] Introduce boot/install mode**: Introduced boot/install mode in boot-to-talos tool ([**@kvaps**](https://github.com/kvaps) in cozystack/boot-to-talos#5).
|
||||
|
||||
### cozypkg
|
||||
|
||||
* **[cozypkg] Handle valuesFiles from cozypkg.cozystack.io/values-files annotation**: Added support for handling valuesFiles from annotation in cozypkg ([**@kvaps**](https://github.com/kvaps) in cozystack/cozypkg#8).
|
||||
|
||||
---
|
||||
|
||||
## Refactors & chores
|
||||
|
||||
* **[dashboard] Migrate patches to upstream project**: Migrated dashboard patches to upstream project for better maintainability ([**@kvaps**](https://github.com/kvaps) in #1569).
|
||||
* **Update CODEOWNERS**: Updated CODEOWNERS file ([**@nbykov0**](https://github.com/nbykov0) in #1537).
|
||||
* **Add QOSI to ADOPTERS.md**: Added QOSI to adopters list ([**@tabu-a**](https://github.com/tabu-a) in #1589).
|
||||
|
||||
---
|
||||
|
||||
## Breaking changes & upgrade notes
|
||||
|
||||
No breaking changes in this release.
|
||||
|
||||
---
|
||||
|
||||
## Contributors
|
||||
|
||||
We'd like to thank all contributors who made this release possible:
|
||||
|
||||
* [**@IvanHunters**](https://github.com/IvanHunters)
|
||||
* [**@insignia96**](https://github.com/insignia96)
|
||||
* [**@kvaps**](https://github.com/kvaps)
|
||||
* [**@lllamnyp**](https://github.com/lllamnyp)
|
||||
* [**@nbykov0**](https://github.com/nbykov0)
|
||||
* [**@scooby87**](https://github.com/scooby87)
|
||||
* [**@tabu-a**](https://github.com/tabu-a)
|
||||
|
||||
### New Contributors
|
||||
|
||||
We're excited to welcome our first-time contributors:
|
||||
|
||||
* [**@tabu-a**](https://github.com/tabu-a) - First contribution!
|
||||
|
||||
---
|
||||
|
||||
**Full Changelog**: [v0.37.0...v0.38.0](https://github.com/cozystack/cozystack/compare/v0.37.0...v0.38.0)
|
||||
|
||||
<!--
|
||||
https://github.com/cozystack/cozystack/releases/tag/v0.38.0
|
||||
-->
|
||||
19
docs/changelogs/v0.38.1.md
Normal file
19
docs/changelogs/v0.38.1.md
Normal file
@@ -0,0 +1,19 @@
|
||||
|
||||
<!--
|
||||
https://github.com/cozystack/cozystack/releases/tag/v0.38.1
|
||||
-->
|
||||
|
||||
## Improvements
|
||||
|
||||
* **[seaweedfs] Extended CA certificate duration to reduce disruptive CA rotations**: Extended CA certificate duration to reduce disruptive CA rotations. ([**@IvanHunters**](https://github.com/IvanHunters) in #1657, #1666).
|
||||
* **[dashboard] Add config hash annotations to restart pods on config changes**: Added config hash annotations to restart pods when configuration changes, ensuring pods are automatically restarted when their configuration is updated ([**@kvaps**](https://github.com/kvaps) in #1662, #1665).
|
||||
|
||||
## Fixes
|
||||
|
||||
* **[tenant][kubernetes] Introduce better cleanup logic**: Improved cleanup logic for tenant Kubernetes resources, ensuring proper resource cleanup when tenants are deleted or updated ([**@kvaps**](https://github.com/kvaps) in #1661).
|
||||
* **[dashboard] Fix loading arrays in forms when editing existing objects**: Fixed issue where arrays in forms were not loading correctly when editing existing objects in the dashboard ([**@kvaps**](https://github.com/kvaps)).
|
||||
|
||||
---
|
||||
|
||||
**Full Changelog**: [v0.38.0...v0.38.1](https://github.com/cozystack/cozystack/compare/v0.38.0...v0.38.1)
|
||||
|
||||
11
go.mod
11
go.mod
@@ -6,11 +6,15 @@ go 1.23.0
|
||||
|
||||
require (
|
||||
github.com/fluxcd/helm-controller/api v1.1.0
|
||||
github.com/go-logr/logr v1.4.2
|
||||
github.com/go-logr/zapr v1.3.0
|
||||
github.com/google/gofuzz v1.2.0
|
||||
github.com/onsi/ginkgo/v2 v2.19.0
|
||||
github.com/onsi/gomega v1.33.1
|
||||
github.com/prometheus/client_golang v1.19.1
|
||||
github.com/spf13/cobra v1.8.1
|
||||
github.com/stretchr/testify v1.9.0
|
||||
go.uber.org/zap v1.27.0
|
||||
gopkg.in/yaml.v2 v2.4.0
|
||||
k8s.io/api v0.31.2
|
||||
k8s.io/apiextensions-apiserver v0.31.2
|
||||
@@ -44,9 +48,7 @@ require (
|
||||
github.com/fluxcd/pkg/apis/meta v1.6.1 // indirect
|
||||
github.com/fsnotify/fsnotify v1.7.0 // indirect
|
||||
github.com/fxamacker/cbor/v2 v2.7.0 // indirect
|
||||
github.com/go-logr/logr v1.4.2 // indirect
|
||||
github.com/go-logr/stdr v1.2.2 // indirect
|
||||
github.com/go-logr/zapr v1.3.0 // indirect
|
||||
github.com/go-openapi/jsonpointer v0.21.0 // indirect
|
||||
github.com/go-openapi/jsonreference v0.20.2 // indirect
|
||||
github.com/go-openapi/swag v0.23.0 // indirect
|
||||
@@ -74,7 +76,6 @@ require (
|
||||
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect
|
||||
github.com/pkg/errors v0.9.1 // indirect
|
||||
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
|
||||
github.com/prometheus/client_golang v1.19.1 // indirect
|
||||
github.com/prometheus/client_model v0.6.1 // indirect
|
||||
github.com/prometheus/common v0.55.0 // indirect
|
||||
github.com/prometheus/procfs v0.15.1 // indirect
|
||||
@@ -94,7 +95,6 @@ require (
|
||||
go.opentelemetry.io/otel/trace v1.28.0 // indirect
|
||||
go.opentelemetry.io/proto/otlp v1.3.1 // indirect
|
||||
go.uber.org/multierr v1.11.0 // indirect
|
||||
go.uber.org/zap v1.27.0 // indirect
|
||||
golang.org/x/crypto v0.31.0 // indirect
|
||||
golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 // indirect
|
||||
golang.org/x/net v0.33.0 // indirect
|
||||
@@ -119,3 +119,6 @@ require (
|
||||
sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3 // indirect
|
||||
sigs.k8s.io/yaml v1.4.0 // indirect
|
||||
)
|
||||
|
||||
// See: issues.k8s.io/135537
|
||||
replace k8s.io/apimachinery => github.com/cozystack/apimachinery v0.0.0-20251201201312-18e522a87614
|
||||
|
||||
4
go.sum
4
go.sum
@@ -18,6 +18,8 @@ github.com/coreos/go-semver v0.3.1 h1:yi21YpKnrx1gt5R+la8n5WgS0kCrsPp33dmEyHReZr
|
||||
github.com/coreos/go-semver v0.3.1/go.mod h1:irMmmIw/7yzSRPWryHsK7EYSg09caPQL03VsM8rvUec=
|
||||
github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8iXXhfZs=
|
||||
github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
|
||||
github.com/cozystack/apimachinery v0.0.0-20251201201312-18e522a87614 h1:jH9elECUvhiIs3IMv3oS5k1JgCLVsSK6oU4dmq5gyW8=
|
||||
github.com/cozystack/apimachinery v0.0.0-20251201201312-18e522a87614/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo=
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
|
||||
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
@@ -291,8 +293,6 @@ k8s.io/api v0.31.2 h1:3wLBbL5Uom/8Zy98GRPXpJ254nEFpl+hwndmk9RwmL0=
|
||||
k8s.io/api v0.31.2/go.mod h1:bWmGvrGPssSK1ljmLzd3pwCQ9MgoTsRCuK35u6SygUk=
|
||||
k8s.io/apiextensions-apiserver v0.31.2 h1:W8EwUb8+WXBLu56ser5IudT2cOho0gAKeTOnywBLxd0=
|
||||
k8s.io/apiextensions-apiserver v0.31.2/go.mod h1:i+Geh+nGCJEGiCGR3MlBDkS7koHIIKWVfWeRFiOsUcM=
|
||||
k8s.io/apimachinery v0.31.2 h1:i4vUt2hPK56W6mlT7Ry+AO8eEsyxMD1U44NR22CLTYw=
|
||||
k8s.io/apimachinery v0.31.2/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo=
|
||||
k8s.io/apiserver v0.31.2 h1:VUzOEUGRCDi6kX1OyQ801m4A7AUPglpsmGvdsekmcI4=
|
||||
k8s.io/apiserver v0.31.2/go.mod h1:o3nKZR7lPlJqkU5I3Ove+Zx3JuoFjQobGX1Gctw6XuE=
|
||||
k8s.io/client-go v0.31.2 h1:Y2F4dxU5d3AQj+ybwSMqQnpZH9F30//1ObxOKlTI9yc=
|
||||
|
||||
145
hack/check-optional-repos.sh
Executable file
145
hack/check-optional-repos.sh
Executable file
@@ -0,0 +1,145 @@
|
||||
#!/bin/bash
|
||||
###############################################################################
|
||||
# check-optional-repos.sh - Check optional repositories for tags and commits #
|
||||
# during a release period #
|
||||
###############################################################################
|
||||
set -eu
|
||||
|
||||
# Function to ensure repository is cloned and up-to-date
|
||||
update_repo() {
|
||||
local repo_name=$1
|
||||
local repo_url="https://github.com/cozystack/${repo_name}.git"
|
||||
|
||||
mkdir -p _repos
|
||||
cd _repos
|
||||
|
||||
if [ -d "$repo_name" ]; then
|
||||
cd "$repo_name"
|
||||
git fetch --all --tags --force
|
||||
git checkout main 2>/dev/null || git checkout master
|
||||
git pull
|
||||
else
|
||||
git clone "$repo_url"
|
||||
cd "$repo_name"
|
||||
fi
|
||||
|
||||
cd ../..
|
||||
}
|
||||
|
||||
# Check if required parameters are provided
|
||||
if [ $# -lt 2 ]; then
|
||||
echo "Usage: $0 <RELEASE_START> <RELEASE_END>"
|
||||
echo "Example: $0 '2025-10-10 12:27:31 +0400' '2025-10-13 16:04:33 +0200'"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
RELEASE_START="$1"
|
||||
RELEASE_END="$2"
|
||||
|
||||
# Get the script directory to return to it later
|
||||
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
||||
COZYSTACK_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
|
||||
|
||||
cd "$COZYSTACK_ROOT"
|
||||
|
||||
echo "Checking optional repositories for tags and commits between:"
|
||||
echo " Start: $RELEASE_START"
|
||||
echo " End: $RELEASE_END"
|
||||
echo ""
|
||||
|
||||
# Loop through ALL optional repositories
|
||||
for repo_name in talm boot-to-talos cozypkg cozy-proxy; do
|
||||
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
||||
echo "Checking repository: $repo_name"
|
||||
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
||||
|
||||
# Update/clone repository
|
||||
update_repo "$repo_name"
|
||||
|
||||
cd "_repos/$repo_name"
|
||||
REPO_NAME=$(basename "$(pwd)")
|
||||
git fetch --all --tags --force
|
||||
|
||||
# Check for tags matching release version pattern or created during release period
|
||||
TAGS=$(git for-each-ref --format='%(refname:short) %(creatordate)' refs/tags 2>/dev/null | \
|
||||
awk -v start="$RELEASE_START" -v end="$RELEASE_END" '$2 >= start && $2 <= end {print $1}' || true)
|
||||
|
||||
if [ -n "$TAGS" ]; then
|
||||
echo "Found tags in $repo_name: $TAGS"
|
||||
PREV_TAG=$(echo "$TAGS" | head -1)
|
||||
NEW_TAG=$(echo "$TAGS" | tail -1)
|
||||
|
||||
echo ""
|
||||
echo "Commits between $PREV_TAG and $NEW_TAG:"
|
||||
# Include merge commits to capture backports
|
||||
git log "$PREV_TAG..$NEW_TAG" --format="%H|%s|%an" 2>/dev/null | while IFS='|' read -r commit_hash subject author_name; do
|
||||
if [ -z "$commit_hash" ]; then
|
||||
continue
|
||||
fi
|
||||
|
||||
# Get PR number from commit message
|
||||
COMMIT_MSG=$(git log -1 --format=%B "$commit_hash" 2>/dev/null || echo "")
|
||||
PR_NUMBER=$(echo "$COMMIT_MSG" | grep -oE '#[0-9]+' | head -1 | tr -d '#' || echo "")
|
||||
|
||||
# Get author: prioritize PR author, fallback to commit author
|
||||
GITHUB_USERNAME=""
|
||||
if [ -n "$PR_NUMBER" ]; then
|
||||
GITHUB_USERNAME=$(gh pr view "$PR_NUMBER" --repo "cozystack/$REPO_NAME" --json author --jq '.author.login // empty' 2>/dev/null || echo "")
|
||||
fi
|
||||
if [ -z "$GITHUB_USERNAME" ]; then
|
||||
GITHUB_USERNAME=$(gh api "repos/cozystack/$REPO_NAME/commits/$commit_hash" --jq '.author.login // empty' 2>/dev/null || echo "")
|
||||
fi
|
||||
|
||||
if [ -n "$PR_NUMBER" ]; then
|
||||
echo " $commit_hash|$subject|$author_name|$GITHUB_USERNAME|cozystack/$REPO_NAME#$PR_NUMBER"
|
||||
else
|
||||
echo " $commit_hash|$subject|$author_name|$GITHUB_USERNAME|cozystack/$REPO_NAME@${commit_hash:0:7}"
|
||||
fi
|
||||
done
|
||||
else
|
||||
echo "No tags found in $repo_name during release period"
|
||||
|
||||
# Check for commits by dates if no exact version tags
|
||||
# Include merge commits to capture backports
|
||||
COMMITS=$(git log --since="$RELEASE_START" --until="$RELEASE_END" --format="%H|%s|%an" 2>/dev/null || true)
|
||||
|
||||
if [ -n "$COMMITS" ]; then
|
||||
echo ""
|
||||
echo "Commits found by date range:"
|
||||
echo "$COMMITS" | while IFS='|' read -r commit_hash subject author_name; do
|
||||
if [ -z "$commit_hash" ]; then
|
||||
continue
|
||||
fi
|
||||
|
||||
# Get PR number from commit message
|
||||
COMMIT_MSG=$(git log -1 --format=%B "$commit_hash" 2>/dev/null || echo "")
|
||||
PR_NUMBER=$(echo "$COMMIT_MSG" | grep -oE '#[0-9]+' | head -1 | tr -d '#' || echo "")
|
||||
|
||||
# Get author: prioritize PR author, fallback to commit author
|
||||
GITHUB_USERNAME=""
|
||||
if [ -n "$PR_NUMBER" ]; then
|
||||
GITHUB_USERNAME=$(gh pr view "$PR_NUMBER" --repo "cozystack/$REPO_NAME" --json author --jq '.author.login // empty' 2>/dev/null || echo "")
|
||||
fi
|
||||
if [ -z "$GITHUB_USERNAME" ]; then
|
||||
GITHUB_USERNAME=$(gh api "repos/cozystack/$REPO_NAME/commits/$commit_hash" --jq '.author.login // empty' 2>/dev/null || echo "")
|
||||
fi
|
||||
|
||||
if [ -n "$PR_NUMBER" ]; then
|
||||
echo " $commit_hash|$subject|$author_name|$GITHUB_USERNAME|cozystack/$REPO_NAME#$PR_NUMBER"
|
||||
else
|
||||
echo " $commit_hash|$subject|$author_name|$GITHUB_USERNAME|cozystack/$REPO_NAME@${commit_hash:0:7}"
|
||||
fi
|
||||
done
|
||||
else
|
||||
echo "No commits found in $repo_name during release period"
|
||||
fi
|
||||
fi
|
||||
|
||||
echo ""
|
||||
cd "$COZYSTACK_ROOT"
|
||||
done
|
||||
|
||||
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
||||
echo "Finished checking all optional repositories"
|
||||
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
||||
|
||||
@@ -72,7 +72,7 @@ EOF
|
||||
kubectl wait --for=condition=TenantControlPlaneCreated kamajicontrolplane -n tenant-test kubernetes-${test_name} --timeout=4m
|
||||
|
||||
# Wait for Kubernetes resources to be ready (timeout after 2 minutes)
|
||||
kubectl wait tcp -n tenant-test kubernetes-${test_name} --timeout=2m --for=jsonpath='{.status.kubernetesResources.version.status}'=Ready
|
||||
kubectl wait tcp -n tenant-test kubernetes-${test_name} --timeout=5m --for=jsonpath='{.status.kubernetesResources.version.status}'=Ready
|
||||
|
||||
# Wait for all required deployments to be available (timeout after 4 minutes)
|
||||
kubectl wait deploy --timeout=4m --for=condition=available -n tenant-test kubernetes-${test_name} kubernetes-${test_name}-cluster-autoscaler kubernetes-${test_name}-kccm kubernetes-${test_name}-kcsi-controller
|
||||
@@ -80,58 +80,41 @@ EOF
|
||||
# Wait for the machine deployment to scale to 2 replicas (timeout after 1 minute)
|
||||
kubectl wait machinedeployment kubernetes-${test_name}-md0 -n tenant-test --timeout=1m --for=jsonpath='{.status.replicas}'=2
|
||||
# Get the admin kubeconfig and save it to a file
|
||||
kubectl get secret kubernetes-${test_name}-admin-kubeconfig -ojsonpath='{.data.super-admin\.conf}' -n tenant-test | base64 -d > tenantkubeconfig
|
||||
kubectl get secret kubernetes-${test_name}-admin-kubeconfig -ojsonpath='{.data.super-admin\.conf}' -n tenant-test | base64 -d > tenantkubeconfig-${test_name}
|
||||
|
||||
# Update the kubeconfig to use localhost for the API server
|
||||
yq -i ".clusters[0].cluster.server = \"https://localhost:${port}\"" tenantkubeconfig
|
||||
yq -i ".clusters[0].cluster.server = \"https://localhost:${port}\"" tenantkubeconfig-${test_name}
|
||||
|
||||
|
||||
# Set up port forwarding to the Kubernetes API server for a 200 second timeout
|
||||
bash -c 'timeout 300s kubectl port-forward service/kubernetes-'"${test_name}"' -n tenant-test '"${port}"':6443 > /dev/null 2>&1 &'
|
||||
bash -c 'timeout 500s kubectl port-forward service/kubernetes-'"${test_name}"' -n tenant-test '"${port}"':6443 > /dev/null 2>&1 &'
|
||||
# Verify the Kubernetes version matches what we expect (retry for up to 20 seconds)
|
||||
timeout 20 sh -ec 'until kubectl --kubeconfig tenantkubeconfig version 2>/dev/null | grep -Fq "Server Version: ${k8s_version}"; do sleep 5; done'
|
||||
timeout 20 sh -ec 'until kubectl --kubeconfig tenantkubeconfig-'"${test_name}"' version 2>/dev/null | grep -Fq "Server Version: ${k8s_version}"; do sleep 5; done'
|
||||
|
||||
# Wait for the nodes to be ready (timeout after 2 minutes)
|
||||
timeout 3m bash -c '
|
||||
until [ "$(kubectl --kubeconfig tenantkubeconfig get nodes -o jsonpath="{.items[*].metadata.name}" | wc -w)" -eq 2 ]; do
|
||||
until [ "$(kubectl --kubeconfig tenantkubeconfig-'"${test_name}"' get nodes -o jsonpath="{.items[*].metadata.name}" | wc -w)" -eq 2 ]; do
|
||||
sleep 2
|
||||
done
|
||||
'
|
||||
# Verify the nodes are ready
|
||||
kubectl --kubeconfig tenantkubeconfig wait node --all --timeout=2m --for=condition=Ready
|
||||
kubectl --kubeconfig tenantkubeconfig get nodes -o wide
|
||||
kubectl --kubeconfig tenantkubeconfig-${test_name} wait node --all --timeout=2m --for=condition=Ready
|
||||
kubectl --kubeconfig tenantkubeconfig-${test_name} get nodes -o wide
|
||||
|
||||
# Verify the kubelet version matches what we expect
|
||||
versions=$(kubectl --kubeconfig tenantkubeconfig get nodes -o jsonpath='{.items[*].status.nodeInfo.kubeletVersion}')
|
||||
versions=$(kubectl --kubeconfig "tenantkubeconfig-${test_name}" \
|
||||
get nodes -o jsonpath='{.items[*].status.nodeInfo.kubeletVersion}')
|
||||
|
||||
node_ok=true
|
||||
|
||||
case "$k8s_version" in
|
||||
v1.32*)
|
||||
echo "⚠️ TODO: Temporary stub — allowing nodes with v1.33 while k8s_version is v1.32"
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
for v in $versions; do
|
||||
case "$k8s_version" in
|
||||
v1.32|v1.32.*)
|
||||
case "$v" in
|
||||
v1.32 | v1.32.* | v1.32-* | v1.33 | v1.33.* | v1.33-*)
|
||||
;;
|
||||
*)
|
||||
node_ok=false
|
||||
break
|
||||
;;
|
||||
esac
|
||||
case "$v" in
|
||||
"${k8s_version}" | "${k8s_version}".* | "${k8s_version}"-*)
|
||||
# acceptable
|
||||
;;
|
||||
*)
|
||||
case "$v" in
|
||||
"${k8s_version}" | "${k8s_version}".* | "${k8s_version}"-*)
|
||||
;;
|
||||
*)
|
||||
node_ok=false
|
||||
break
|
||||
;;
|
||||
esac
|
||||
node_ok=false
|
||||
break
|
||||
;;
|
||||
esac
|
||||
done
|
||||
@@ -141,6 +124,100 @@ EOF
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
kubectl --kubeconfig tenantkubeconfig-${test_name} apply -f - <<EOF
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: tenant-test
|
||||
EOF
|
||||
|
||||
# Backend 1
|
||||
kubectl apply --kubeconfig tenantkubeconfig-${test_name} -f- <<EOF
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: "${test_name}-backend"
|
||||
namespace: tenant-test
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: backend
|
||||
backend: "${test_name}-backend"
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: backend
|
||||
backend: "${test_name}-backend"
|
||||
spec:
|
||||
containers:
|
||||
- name: nginx
|
||||
image: nginx:alpine
|
||||
ports:
|
||||
- containerPort: 80
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: 80
|
||||
initialDelaySeconds: 2
|
||||
periodSeconds: 2
|
||||
EOF
|
||||
|
||||
# LoadBalancer Service
|
||||
kubectl apply --kubeconfig tenantkubeconfig-${test_name} -f- <<EOF
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: "${test_name}-backend"
|
||||
namespace: tenant-test
|
||||
spec:
|
||||
type: LoadBalancer
|
||||
selector:
|
||||
app: backend
|
||||
backend: "${test_name}-backend"
|
||||
ports:
|
||||
- port: 80
|
||||
targetPort: 80
|
||||
EOF
|
||||
|
||||
# Wait for pods readiness
|
||||
kubectl wait deployment --kubeconfig tenantkubeconfig-${test_name} ${test_name}-backend -n tenant-test --for=condition=Available --timeout=90s
|
||||
|
||||
# Wait for LoadBalancer to be provisioned (IP or hostname)
|
||||
timeout 90 sh -ec "
|
||||
until kubectl get svc ${test_name}-backend --kubeconfig tenantkubeconfig-${test_name} -n tenant-test \
|
||||
-o jsonpath='{.status.loadBalancer.ingress[0]}' | grep -q .; do
|
||||
sleep 5
|
||||
done
|
||||
"
|
||||
|
||||
LB_ADDR=$(
|
||||
kubectl get svc --kubeconfig tenantkubeconfig-${test_name} "${test_name}-backend" \
|
||||
-n tenant-test \
|
||||
-o jsonpath='{.status.loadBalancer.ingress[0].ip}{.status.loadBalancer.ingress[0].hostname}'
|
||||
)
|
||||
|
||||
if [ -z "$LB_ADDR" ]; then
|
||||
echo "LoadBalancer address is empty" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
for i in $(seq 1 20); do
|
||||
echo "Attempt $i"
|
||||
curl --silent --fail "http://${LB_ADDR}" && break
|
||||
sleep 3
|
||||
done
|
||||
|
||||
if [ "$i" -eq 20 ]; then
|
||||
echo "LoadBalancer not reachable" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Cleanup
|
||||
kubectl delete deployment --kubeconfig tenantkubeconfig-${test_name} "${test_name}-backend" -n tenant-test
|
||||
kubectl delete service --kubeconfig tenantkubeconfig-${test_name} "${test_name}-backend" -n tenant-test
|
||||
|
||||
# Wait for all machine deployment replicas to be ready (timeout after 10 minutes)
|
||||
kubectl wait machinedeployment kubernetes-${test_name}-md0 -n tenant-test --timeout=10m --for=jsonpath='{.status.v1beta2.readyReplicas}'=2
|
||||
|
||||
|
||||
@@ -19,3 +19,35 @@
|
||||
curl -sS --fail 'http://localhost:21234/openapi/v2?timeout=32s' -H 'Accept: application/com.github.proto-openapi.spec.v2@v1.0+protobuf' > /dev/null
|
||||
)
|
||||
}
|
||||
|
||||
@test "Test kinds" {
|
||||
val=$(kubectl get --raw /apis/apps.cozystack.io/v1alpha1/tenants | jq -r '.kind')
|
||||
if [ "$val" != "TenantList" ]; then
|
||||
echo "Expected kind to be TenantList, got $val"
|
||||
exit 1
|
||||
fi
|
||||
val=$(kubectl get --raw /apis/apps.cozystack.io/v1alpha1/tenants | jq -r '.items[0].kind')
|
||||
if [ "$val" != "Tenant" ]; then
|
||||
echo "Expected kind to be Tenant, got $val"
|
||||
exit 1
|
||||
fi
|
||||
val=$(kubectl get --raw /apis/apps.cozystack.io/v1alpha1/ingresses | jq -r '.kind')
|
||||
if [ "$val" != "IngressList" ]; then
|
||||
echo "Expected kind to be IngressList, got $val"
|
||||
exit 1
|
||||
fi
|
||||
val=$(kubectl get --raw /apis/apps.cozystack.io/v1alpha1/ingresses | jq -r '.items[0].kind')
|
||||
if [ "$val" != "Ingress" ]; then
|
||||
echo "Expected kind to be Ingress, got $val"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
@test "Create and delete namespace" {
|
||||
kubectl create ns cozy-test-create-and-delete-namespace --dry-run=client -o yaml | kubectl apply -f -
|
||||
if ! kubectl delete ns cozy-test-create-and-delete-namespace; then
|
||||
echo "Failed to delete namespace"
|
||||
kubectl describe ns cozy-test-create-and-delete-namespace
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
59
hack/helm-unit-tests.sh
Executable file
59
hack/helm-unit-tests.sh
Executable file
@@ -0,0 +1,59 @@
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
|
||||
# Script to run unit tests for all Helm charts.
|
||||
# It iterates through directories in packages/apps, packages/extra,
|
||||
# packages/system, and packages/library and runs the 'test' Makefile
|
||||
# target if it exists.
|
||||
|
||||
FAILED_DIRS_FILE="$(mktemp)"
|
||||
trap 'rm -f "$FAILED_DIRS_FILE"' EXIT
|
||||
|
||||
tests_found=0
|
||||
|
||||
check_and_run_test() {
|
||||
dir="$1"
|
||||
makefile="$dir/Makefile"
|
||||
|
||||
if [ ! -f "$makefile" ]; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
if make -C "$dir" -n test >/dev/null 2>&1; then
|
||||
echo "Running tests in $dir"
|
||||
tests_found=$((tests_found + 1))
|
||||
if ! make -C "$dir" test; then
|
||||
printf '%s\n' "$dir" >> "$FAILED_DIRS_FILE"
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
for package_dir in packages/apps packages/extra packages/system packages/library; do
|
||||
if [ ! -d "$package_dir" ]; then
|
||||
echo "Warning: Directory $package_dir does not exist, skipping..." >&2
|
||||
continue
|
||||
fi
|
||||
|
||||
for dir in "$package_dir"/*; do
|
||||
[ -d "$dir" ] || continue
|
||||
check_and_run_test "$dir" || true
|
||||
done
|
||||
done
|
||||
|
||||
if [ "$tests_found" -eq 0 ]; then
|
||||
echo "No directories with 'test' Makefile targets found."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ -s "$FAILED_DIRS_FILE" ]; then
|
||||
echo "ERROR: Tests failed in the following directories:" >&2
|
||||
while IFS= read -r dir; do
|
||||
echo " - $dir" >&2
|
||||
done < "$FAILED_DIRS_FILE"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "All Helm unit tests passed."
|
||||
40
hack/upload-releasenotes.sh
Executable file
40
hack/upload-releasenotes.sh
Executable file
@@ -0,0 +1,40 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ $# -ne 1 ]; then
|
||||
echo "Usage: $0 <version>"
|
||||
echo "Example: 0.37.*"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
VERSION_PATTERN="$1"
|
||||
|
||||
# Collect matching files first
|
||||
FILES=$(find docs/changelogs -name "v${VERSION_PATTERN}.md" 2>/dev/null || true)
|
||||
|
||||
if [ -z "$FILES" ]; then
|
||||
echo "No changelog files found matching pattern: v${VERSION_PATTERN}.md"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Process each file
|
||||
echo "$FILES" | while IFS= read -r file; do
|
||||
if [ -z "$file" ]; then
|
||||
continue
|
||||
fi
|
||||
|
||||
# Extract version from filename safely (basename without extension)
|
||||
version=$(basename "$file" .md)
|
||||
|
||||
if [ -z "$version" ]; then
|
||||
echo "Warning: Could not extract version from file: $file"
|
||||
continue
|
||||
fi
|
||||
|
||||
echo "Uploading release notes for version: $version"
|
||||
|
||||
# Check exit status of gh release edit
|
||||
if ! gh release edit "$version" --notes-file "docs/changelogs/${version}.md"; then
|
||||
echo "Error: Failed to upload release notes for version: $version"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
@@ -105,8 +105,26 @@ func buildMultilineStringSchema(openAPISchema string) (map[string]any, error) {
|
||||
"properties": map[string]any{},
|
||||
}
|
||||
|
||||
// Check if there's a spec property
|
||||
specProp, ok := props["spec"].(map[string]any)
|
||||
if !ok {
|
||||
return map[string]any{}, nil
|
||||
}
|
||||
|
||||
specProps, ok := specProp["properties"].(map[string]any)
|
||||
if !ok {
|
||||
return map[string]any{}, nil
|
||||
}
|
||||
|
||||
// Create spec.properties structure in schema
|
||||
schemaProps := schema["properties"].(map[string]any)
|
||||
specSchema := map[string]any{
|
||||
"properties": map[string]any{},
|
||||
}
|
||||
schemaProps["spec"] = specSchema
|
||||
|
||||
// Process spec properties recursively
|
||||
processSpecProperties(props, schema["properties"].(map[string]any))
|
||||
processSpecProperties(specProps, specSchema["properties"].(map[string]any))
|
||||
|
||||
return schema, nil
|
||||
}
|
||||
|
||||
@@ -9,41 +9,46 @@ func TestBuildMultilineStringSchema(t *testing.T) {
|
||||
// Test OpenAPI schema with various field types
|
||||
openAPISchema := `{
|
||||
"properties": {
|
||||
"simpleString": {
|
||||
"type": "string",
|
||||
"description": "A simple string field"
|
||||
},
|
||||
"stringWithEnum": {
|
||||
"type": "string",
|
||||
"enum": ["option1", "option2"],
|
||||
"description": "String with enum should be skipped"
|
||||
},
|
||||
"numberField": {
|
||||
"type": "number",
|
||||
"description": "Number field should be skipped"
|
||||
},
|
||||
"nestedObject": {
|
||||
"spec": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"nestedString": {
|
||||
"simpleString": {
|
||||
"type": "string",
|
||||
"description": "Nested string should get multilineString"
|
||||
"description": "A simple string field"
|
||||
},
|
||||
"nestedStringWithEnum": {
|
||||
"stringWithEnum": {
|
||||
"type": "string",
|
||||
"enum": ["a", "b"],
|
||||
"description": "Nested string with enum should be skipped"
|
||||
}
|
||||
}
|
||||
},
|
||||
"arrayOfObjects": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"itemString": {
|
||||
"type": "string",
|
||||
"description": "String in array item"
|
||||
"enum": ["option1", "option2"],
|
||||
"description": "String with enum should be skipped"
|
||||
},
|
||||
"numberField": {
|
||||
"type": "number",
|
||||
"description": "Number field should be skipped"
|
||||
},
|
||||
"nestedObject": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"nestedString": {
|
||||
"type": "string",
|
||||
"description": "Nested string should get multilineString"
|
||||
},
|
||||
"nestedStringWithEnum": {
|
||||
"type": "string",
|
||||
"enum": ["a", "b"],
|
||||
"description": "Nested string with enum should be skipped"
|
||||
}
|
||||
}
|
||||
},
|
||||
"arrayOfObjects": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"itemString": {
|
||||
"type": "string",
|
||||
"description": "String in array item"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -70,33 +75,44 @@ func TestBuildMultilineStringSchema(t *testing.T) {
|
||||
t.Fatal("schema.properties is not a map")
|
||||
}
|
||||
|
||||
// Check simpleString
|
||||
simpleString, ok := props["simpleString"].(map[string]any)
|
||||
// Check spec property exists
|
||||
spec, ok := props["spec"].(map[string]any)
|
||||
if !ok {
|
||||
t.Fatal("simpleString not found in properties")
|
||||
t.Fatal("spec not found in properties")
|
||||
}
|
||||
|
||||
specProps, ok := spec["properties"].(map[string]any)
|
||||
if !ok {
|
||||
t.Fatal("spec.properties is not a map")
|
||||
}
|
||||
|
||||
// Check simpleString
|
||||
simpleString, ok := specProps["simpleString"].(map[string]any)
|
||||
if !ok {
|
||||
t.Fatal("simpleString not found in spec.properties")
|
||||
}
|
||||
if simpleString["type"] != "multilineString" {
|
||||
t.Errorf("simpleString should have type multilineString, got %v", simpleString["type"])
|
||||
}
|
||||
|
||||
// Check stringWithEnum should not be present (or should not have multilineString)
|
||||
if stringWithEnum, ok := props["stringWithEnum"].(map[string]any); ok {
|
||||
if stringWithEnum, ok := specProps["stringWithEnum"].(map[string]any); ok {
|
||||
if stringWithEnum["type"] == "multilineString" {
|
||||
t.Error("stringWithEnum should not have multilineString type")
|
||||
}
|
||||
}
|
||||
|
||||
// Check numberField should not be present
|
||||
if numberField, ok := props["numberField"].(map[string]any); ok {
|
||||
if numberField, ok := specProps["numberField"].(map[string]any); ok {
|
||||
if numberField["type"] != nil {
|
||||
t.Error("numberField should not have any type override")
|
||||
}
|
||||
}
|
||||
|
||||
// Check nested object
|
||||
nestedObject, ok := props["nestedObject"].(map[string]any)
|
||||
nestedObject, ok := specProps["nestedObject"].(map[string]any)
|
||||
if !ok {
|
||||
t.Fatal("nestedObject not found in properties")
|
||||
t.Fatal("nestedObject not found in spec.properties")
|
||||
}
|
||||
nestedProps, ok := nestedObject["properties"].(map[string]any)
|
||||
if !ok {
|
||||
@@ -113,9 +129,9 @@ func TestBuildMultilineStringSchema(t *testing.T) {
|
||||
}
|
||||
|
||||
// Check array of objects
|
||||
arrayOfObjects, ok := props["arrayOfObjects"].(map[string]any)
|
||||
arrayOfObjects, ok := specProps["arrayOfObjects"].(map[string]any)
|
||||
if !ok {
|
||||
t.Fatal("arrayOfObjects not found in properties")
|
||||
t.Fatal("arrayOfObjects not found in spec.properties")
|
||||
}
|
||||
items, ok := arrayOfObjects["items"].(map[string]any)
|
||||
if !ok {
|
||||
|
||||
@@ -44,6 +44,9 @@ func (m *Manager) ensureFactory(ctx context.Context, crd *cozyv1alpha1.Cozystack
|
||||
if flags.Secrets {
|
||||
tabs = append(tabs, secretsTab(kind))
|
||||
}
|
||||
if prefix, ok := vncTabPrefix(kind); ok {
|
||||
tabs = append(tabs, vncTab(prefix))
|
||||
}
|
||||
tabs = append(tabs, yamlTab(plural))
|
||||
|
||||
// Use unified factory creation
|
||||
@@ -150,6 +153,27 @@ func detailsTab(kind, endpoint, schemaJSON string, keysOrder [][]string) map[str
|
||||
}),
|
||||
paramsList,
|
||||
}
|
||||
if kind == "VirtualPrivateCloud" {
|
||||
rightColStack = append(rightColStack,
|
||||
antdFlexVertical("vpc-subnets-block", 4, []any{
|
||||
antdText("vpc-subnets-label", true, "Subnets", nil),
|
||||
map[string]any{
|
||||
"type": "EnrichedTable",
|
||||
"data": map[string]any{
|
||||
"id": "vpc-subnets-table",
|
||||
"baseprefix": "/openapi-ui",
|
||||
"clusterNamePartOfUrl": "{2}",
|
||||
"customizationId": "virtualprivatecloud-subnets",
|
||||
"fetchUrl": "/api/clusters/{2}/k8s/api/v1/namespaces/{3}/configmaps",
|
||||
"fieldSelector": map[string]any{
|
||||
"metadata.name": "virtualprivatecloud-{6}-subnets",
|
||||
},
|
||||
"pathToItems": []any{"items"},
|
||||
},
|
||||
},
|
||||
}),
|
||||
)
|
||||
}
|
||||
|
||||
return map[string]any{
|
||||
"key": "details",
|
||||
@@ -331,6 +355,36 @@ func yamlTab(plural string) map[string]any {
|
||||
}
|
||||
}
|
||||
|
||||
func vncTabPrefix(kind string) (string, bool) {
|
||||
switch kind {
|
||||
case "VirtualMachine":
|
||||
return "virtual-machine", true
|
||||
case "VMInstance":
|
||||
return "vm-instance", true
|
||||
default:
|
||||
return "", false
|
||||
}
|
||||
}
|
||||
|
||||
func vncTab(prefix string) map[string]any {
|
||||
return map[string]any{
|
||||
"key": "vnc",
|
||||
"label": "VNC",
|
||||
"children": []any{
|
||||
map[string]any{
|
||||
"type": "VMVNC",
|
||||
"data": map[string]any{
|
||||
"id": "vm-vnc",
|
||||
"cluster": "{2}",
|
||||
"namespace": "{reqsJsonPath[0]['.metadata.namespace']['-']}",
|
||||
"substractHeight": float64(400),
|
||||
"vmName": fmt.Sprintf("%s-{reqsJsonPath[0]['.metadata.name']['-']}", prefix),
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
// ---------------- OpenAPI → Right column ----------------
|
||||
|
||||
func buildOpenAPIParamsBlocks(schemaJSON string, keysOrder [][]string) []any {
|
||||
|
||||
@@ -182,6 +182,13 @@ func CreateAllCustomColumnsOverrides() []*dashboardv1alpha1.CustomColumnsOverrid
|
||||
createTimestampColumn("Created", ".metadata.creationTimestamp"),
|
||||
}),
|
||||
|
||||
// Virtual private cloud subnets
|
||||
createCustomColumnsOverride("virtualprivatecloud-subnets", []any{
|
||||
createFlatMapColumn("Data", ".data"),
|
||||
createStringColumn("Subnet Parameters", "_flatMapData_Key"),
|
||||
createStringColumn("Values", "_flatMapData_Value"),
|
||||
}),
|
||||
|
||||
// Factory ingress details rules
|
||||
createCustomColumnsOverride("factory-kube-ingress-details-rules", []any{
|
||||
createStringColumn("Host", ".host"),
|
||||
|
||||
@@ -1 +1 @@
|
||||
ghcr.io/cozystack/cozystack/nginx-cache:0.0.0@sha256:50ac1581e3100bd6c477a71161cb455a341ffaf9e5e2f6086802e4e25271e8af
|
||||
ghcr.io/cozystack/cozystack/nginx-cache:0.0.0@sha256:31ebc09cfa11d8b438d2bbb32fa61b133aaf4b48b1a1282c9e59b5c127af61c1
|
||||
|
||||
@@ -1 +1 @@
|
||||
ghcr.io/cozystack/cozystack/cluster-autoscaler:0.0.0@sha256:2d39989846c3579dd020b9f6c77e6e314cc81aa344eaac0f6d633e723c17196d
|
||||
ghcr.io/cozystack/cozystack/cluster-autoscaler:0.0.0@sha256:372ad087ae96bd0cd642e2b0855ec7ffb1369d6cf4f0b92204725557c11bc0ff
|
||||
|
||||
@@ -1 +1 @@
|
||||
ghcr.io/cozystack/cozystack/kubevirt-cloud-provider:0.0.0@sha256:5335c044313b69ee13b30ca4941687e509005e55f4ae25723861edbf2fbd6dd2
|
||||
ghcr.io/cozystack/cozystack/kubevirt-cloud-provider:0.0.0@sha256:feb5df18d485939114fa3792dd46d09be1faa3e826adf2f1d6c8f7d46455d017
|
||||
|
||||
@@ -1 +1 @@
|
||||
ghcr.io/cozystack/cozystack/kubevirt-csi-driver:0.0.0@sha256:c8b08084a86251cdd18e237de89b695bca0e4f7eb1f1f6ddc2b903b4d74ea5ff
|
||||
ghcr.io/cozystack/cozystack/kubevirt-csi-driver:0.0.0@sha256:b42c6af641ee0eadb7e0a42e368021b4759f443cb7b71b7e745a64f0fc8b752e
|
||||
|
||||
@@ -1 +1 @@
|
||||
ghcr.io/cozystack/cozystack/ubuntu-container-disk:v1.33@sha256:a09724a7f95283f9130b3da2a89d81c4c6051c6edf0392a81b6fc90f404b76b6
|
||||
ghcr.io/cozystack/cozystack/ubuntu-container-disk:v1.33@sha256:d25e567bc8b17b596e050f5ff410e36112c7966e33f4b372c752e7350bacc894
|
||||
|
||||
@@ -182,6 +182,33 @@ metadata:
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
files:
|
||||
- path: /usr/bin/update-k8s.sh
|
||||
owner: root:root
|
||||
permissions: "0755"
|
||||
content: |
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
# Expected to be passed in via preKubeadmCommands
|
||||
: "${KUBELET_VERSION:?KUBELET_VERSION must be set, e.g. v1.31.0}"
|
||||
|
||||
ARCH="$(uname -m)"
|
||||
case "${ARCH}" in
|
||||
x86_64) ARCH=amd64 ;;
|
||||
aarch64) ARCH=arm64 ;;
|
||||
esac
|
||||
|
||||
# Use your internal mirror here for real-world use.
|
||||
BASE_URL="https://dl.k8s.io/release/${KUBELET_VERSION}/bin/linux/${ARCH}"
|
||||
|
||||
echo "Installing kubelet and kubeadm ${KUBELET_VERSION} for ${ARCH}..."
|
||||
curl -fsSL "${BASE_URL}/kubelet" -o /root/kubelet
|
||||
curl -fsSL "${BASE_URL}/kubeadm" -o /root/kubeadm
|
||||
chmod 0755 /root/kubelet
|
||||
chmod 0755 /root/kubeadm
|
||||
if /root/kubelet --version ; then mv /root/kubelet /usr/bin/kubelet ; fi
|
||||
if /root/kubeadm version ; then mv /root/kubeadm /usr/bin/kubeadm ; fi
|
||||
diskSetup:
|
||||
filesystems:
|
||||
- device: /dev/vdb
|
||||
@@ -205,6 +232,7 @@ spec:
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
preKubeadmCommands:
|
||||
- KUBELET_VERSION={{ include "kubernetes.versionMap" $}} /usr/bin/update-k8s.sh || true
|
||||
- sed -i 's|root:x:|root::|' /etc/passwd
|
||||
- systemctl stop containerd.service
|
||||
- mkdir -p /ephemeral/kubelet /ephemeral/containerd
|
||||
|
||||
@@ -1,76 +0,0 @@
|
||||
---
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
annotations:
|
||||
"helm.sh/hook": post-delete
|
||||
"helm.sh/hook-weight": "10"
|
||||
"helm.sh/hook-delete-policy": hook-succeeded,before-hook-creation,hook-failed
|
||||
name: {{ .Release.Name }}-datavolume-cleanup
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
serviceAccountName: {{ .Release.Name }}-datavolume-cleanup
|
||||
restartPolicy: Never
|
||||
tolerations:
|
||||
- key: CriticalAddonsOnly
|
||||
operator: Exists
|
||||
- key: node-role.kubernetes.io/control-plane
|
||||
operator: Exists
|
||||
effect: "NoSchedule"
|
||||
containers:
|
||||
- name: kubectl
|
||||
image: docker.io/clastix/kubectl:v1.32
|
||||
command:
|
||||
- /bin/sh
|
||||
- -c
|
||||
- kubectl -n {{ .Release.Namespace }} delete datavolumes
|
||||
-l "cluster.x-k8s.io/cluster-name={{ .Release.Name }}"
|
||||
--ignore-not-found=true
|
||||
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: {{ .Release.Name }}-datavolume-cleanup
|
||||
annotations:
|
||||
helm.sh/hook: post-delete
|
||||
helm.sh/hook-delete-policy: before-hook-creation,hook-failed,hook-succeeded
|
||||
helm.sh/hook-weight: "0"
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: Role
|
||||
metadata:
|
||||
annotations:
|
||||
"helm.sh/hook": post-delete
|
||||
"helm.sh/hook-delete-policy": hook-succeeded,before-hook-creation,hook-failed
|
||||
"helm.sh/hook-weight": "5"
|
||||
name: {{ .Release.Name }}-datavolume-cleanup
|
||||
rules:
|
||||
- apiGroups:
|
||||
- "cdi.kubevirt.io"
|
||||
resources:
|
||||
- datavolumes
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- delete
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
annotations:
|
||||
"helm.sh/hook": post-delete
|
||||
"helm.sh/hook-delete-policy": hook-succeeded,before-hook-creation,hook-failed
|
||||
"helm.sh/hook-weight": "5"
|
||||
name: {{ .Release.Name }}-datavolume-cleanup
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: Role
|
||||
name: {{ .Release.Name }}-datavolume-cleanup
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ .Release.Name }}-datavolume-cleanup
|
||||
namespace: {{ .Release.Namespace }}
|
||||
|
||||
150
packages/apps/kubernetes/templates/delete.yaml
Normal file
150
packages/apps/kubernetes/templates/delete.yaml
Normal file
@@ -0,0 +1,150 @@
|
||||
---
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
annotations:
|
||||
"helm.sh/hook": pre-delete
|
||||
"helm.sh/hook-weight": "10"
|
||||
"helm.sh/hook-delete-policy": hook-succeeded,before-hook-creation,hook-failed
|
||||
name: {{ .Release.Name }}-cleanup
|
||||
spec:
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
policy.cozystack.io/allow-to-apiserver: "true"
|
||||
spec:
|
||||
serviceAccountName: {{ .Release.Name }}-cleanup
|
||||
restartPolicy: Never
|
||||
tolerations:
|
||||
- key: CriticalAddonsOnly
|
||||
operator: Exists
|
||||
- key: node-role.kubernetes.io/control-plane
|
||||
operator: Exists
|
||||
effect: "NoSchedule"
|
||||
containers:
|
||||
- name: kubectl
|
||||
image: docker.io/clastix/kubectl:v1.32
|
||||
command:
|
||||
- /bin/sh
|
||||
- -c
|
||||
- |
|
||||
set -e
|
||||
echo "Step 1: Suspending all HelmReleases with label cozystack.io/target-cluster-name={{ .Release.Name }}"
|
||||
for hr in $(kubectl -n {{ .Release.Namespace }} get helmreleases.helm.toolkit.fluxcd.io -l "cozystack.io/target-cluster-name={{ .Release.Name }}" -o name 2>/dev/null || true); do
|
||||
if [ -n "$hr" ]; then
|
||||
echo " Suspending $hr"
|
||||
kubectl -n {{ .Release.Namespace }} patch "$hr" \
|
||||
-p '{"spec": {"suspend": true}}' \
|
||||
--type=merge --field-manager=flux-client-side-apply
|
||||
fi
|
||||
done
|
||||
|
||||
echo "Step 2: Deleting HelmReleases with label cozystack.io/target-cluster-name={{ .Release.Name }}"
|
||||
kubectl -n {{ .Release.Namespace }} delete helmreleases.helm.toolkit.fluxcd.io \
|
||||
-l "cozystack.io/target-cluster-name={{ .Release.Name }}" \
|
||||
--ignore-not-found=true --wait=true
|
||||
|
||||
echo "Step 3: Deleting KamajiControlPlane {{ .Release.Name }}"
|
||||
kubectl -n {{ .Release.Namespace }} delete kamajicontrolplanes.controlplane.cluster.x-k8s.io {{ .Release.Name }} \
|
||||
--ignore-not-found=true
|
||||
|
||||
echo "Step 4: Deleting TenantControlPlane {{ .Release.Name }}"
|
||||
kubectl -n {{ .Release.Namespace }} delete tenantcontrolplanes.kamaji.clastix.io {{ .Release.Name }} \
|
||||
--ignore-not-found=true
|
||||
|
||||
echo "Step 5: Cleaning up DataVolumes"
|
||||
kubectl -n {{ .Release.Namespace }} delete datavolumes \
|
||||
-l "cluster.x-k8s.io/cluster-name={{ .Release.Name }}" \
|
||||
--ignore-not-found=true
|
||||
|
||||
echo "Step 6: Cleaning up LoadBalancer Services"
|
||||
kubectl -n {{ .Release.Namespace }} delete services \
|
||||
-l "cluster.x-k8s.io/cluster-name={{ .Release.Name }}" \
|
||||
--field-selector spec.type=LoadBalancer \
|
||||
--ignore-not-found=true
|
||||
|
||||
echo "Cleanup completed successfully"
|
||||
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: {{ .Release.Name }}-cleanup
|
||||
annotations:
|
||||
helm.sh/hook: pre-delete
|
||||
helm.sh/hook-delete-policy: before-hook-creation,hook-failed,hook-succeeded
|
||||
helm.sh/hook-weight: "0"
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: Role
|
||||
metadata:
|
||||
annotations:
|
||||
"helm.sh/hook": pre-delete
|
||||
"helm.sh/hook-delete-policy": hook-succeeded,before-hook-creation,hook-failed
|
||||
"helm.sh/hook-weight": "5"
|
||||
name: {{ .Release.Name }}-cleanup
|
||||
rules:
|
||||
- apiGroups:
|
||||
- "helm.toolkit.fluxcd.io"
|
||||
resources:
|
||||
- helmreleases
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- patch
|
||||
- delete
|
||||
- apiGroups:
|
||||
- "controlplane.cluster.x-k8s.io"
|
||||
resources:
|
||||
- kamajicontrolplanes
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- delete
|
||||
- apiGroups:
|
||||
- "kamaji.clastix.io"
|
||||
resources:
|
||||
- tenantcontrolplanes
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- delete
|
||||
- apiGroups:
|
||||
- "cdi.kubevirt.io"
|
||||
resources:
|
||||
- datavolumes
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- delete
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- services
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- delete
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
annotations:
|
||||
"helm.sh/hook": pre-delete
|
||||
"helm.sh/hook-delete-policy": hook-succeeded,before-hook-creation,hook-failed
|
||||
"helm.sh/hook-weight": "5"
|
||||
name: {{ .Release.Name }}-cleanup
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: Role
|
||||
name: {{ .Release.Name }}-cleanup
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ .Release.Name }}-cleanup
|
||||
namespace: {{ .Release.Namespace }}
|
||||
@@ -1,104 +0,0 @@
|
||||
---
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
annotations:
|
||||
"helm.sh/hook": pre-delete
|
||||
"helm.sh/hook-weight": "10"
|
||||
"helm.sh/hook-delete-policy": hook-succeeded,before-hook-creation,hook-failed
|
||||
name: {{ .Release.Name }}-flux-teardown
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
serviceAccountName: {{ .Release.Name }}-flux-teardown
|
||||
restartPolicy: Never
|
||||
tolerations:
|
||||
- key: CriticalAddonsOnly
|
||||
operator: Exists
|
||||
- key: node-role.kubernetes.io/control-plane
|
||||
operator: Exists
|
||||
effect: "NoSchedule"
|
||||
containers:
|
||||
- name: kubectl
|
||||
image: docker.io/clastix/kubectl:v1.32
|
||||
command:
|
||||
- /bin/sh
|
||||
- -c
|
||||
- >-
|
||||
kubectl
|
||||
--namespace={{ .Release.Namespace }}
|
||||
patch
|
||||
helmrelease
|
||||
{{ .Release.Name }}-cilium
|
||||
{{ .Release.Name }}-gateway-api-crds
|
||||
{{ .Release.Name }}-csi
|
||||
{{ .Release.Name }}-cert-manager
|
||||
{{ .Release.Name }}-cert-manager-crds
|
||||
{{ .Release.Name }}-vertical-pod-autoscaler
|
||||
{{ .Release.Name }}-vertical-pod-autoscaler-crds
|
||||
{{ .Release.Name }}-ingress-nginx
|
||||
{{ .Release.Name }}-fluxcd-operator
|
||||
{{ .Release.Name }}-fluxcd
|
||||
{{ .Release.Name }}-gpu-operator
|
||||
{{ .Release.Name }}-velero
|
||||
{{ .Release.Name }}-coredns
|
||||
-p '{"spec": {"suspend": true}}'
|
||||
--type=merge --field-manager=flux-client-side-apply || true
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: {{ .Release.Name }}-flux-teardown
|
||||
annotations:
|
||||
helm.sh/hook: pre-delete
|
||||
helm.sh/hook-delete-policy: before-hook-creation,hook-failed,hook-succeeded
|
||||
helm.sh/hook-weight: "0"
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: Role
|
||||
metadata:
|
||||
annotations:
|
||||
"helm.sh/hook": pre-install,post-install,pre-delete
|
||||
"helm.sh/hook-delete-policy": hook-succeeded,before-hook-creation,hook-failed
|
||||
"helm.sh/hook-weight": "5"
|
||||
name: {{ .Release.Name }}-flux-teardown
|
||||
rules:
|
||||
- apiGroups:
|
||||
- "helm.toolkit.fluxcd.io"
|
||||
resources:
|
||||
- helmreleases
|
||||
verbs:
|
||||
- get
|
||||
- patch
|
||||
resourceNames:
|
||||
- {{ .Release.Name }}-cilium
|
||||
- {{ .Release.Name }}-csi
|
||||
- {{ .Release.Name }}-cert-manager
|
||||
- {{ .Release.Name }}-cert-manager-crds
|
||||
- {{ .Release.Name }}-gateway-api-crds
|
||||
- {{ .Release.Name }}-vertical-pod-autoscaler
|
||||
- {{ .Release.Name }}-vertical-pod-autoscaler-crds
|
||||
- {{ .Release.Name }}-ingress-nginx
|
||||
- {{ .Release.Name }}-fluxcd-operator
|
||||
- {{ .Release.Name }}-fluxcd
|
||||
- {{ .Release.Name }}-gpu-operator
|
||||
- {{ .Release.Name }}-velero
|
||||
- {{ .Release.Name }}-coredns
|
||||
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
annotations:
|
||||
helm.sh/hook: pre-delete
|
||||
helm.sh/hook-delete-policy: hook-succeeded,before-hook-creation,hook-failed
|
||||
helm.sh/hook-weight: "5"
|
||||
name: {{ .Release.Name }}-flux-teardown
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: Role
|
||||
name: {{ .Release.Name }}-flux-teardown
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ .Release.Name }}-flux-teardown
|
||||
namespace: {{ .Release.Namespace }}
|
||||
@@ -1 +1 @@
|
||||
ghcr.io/cozystack/cozystack/mariadb-backup:0.0.0@sha256:1c0beb1b23a109b0e13727b4c73d2c74830e11cede92858ab20101b66f45a858
|
||||
ghcr.io/cozystack/cozystack/mariadb-backup:0.0.0@sha256:aca403030ff5d831415d72367866fdf291fab73ee2cfddbe4c93c2915a316ab1
|
||||
|
||||
@@ -37,6 +37,10 @@ spec:
|
||||
# automaticFailover: true
|
||||
{{- end }}
|
||||
|
||||
podMetadata:
|
||||
labels:
|
||||
"policy.cozystack.io/allow-to-apiserver": "true"
|
||||
|
||||
metrics:
|
||||
enabled: true
|
||||
exporter:
|
||||
|
||||
85
packages/apps/tenant/templates/cleanup-job.yaml
Normal file
85
packages/apps/tenant/templates/cleanup-job.yaml
Normal file
@@ -0,0 +1,85 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: {{ include "tenant.name" . }}-cleanup
|
||||
namespace: {{ include "tenant.name" . }}
|
||||
annotations:
|
||||
helm.sh/hook: pre-delete
|
||||
helm.sh/hook-delete-policy: before-hook-creation,hook-succeeded
|
||||
helm.sh/hook-weight: "-5"
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: Role
|
||||
metadata:
|
||||
name: {{ include "tenant.name" . }}-cleanup
|
||||
namespace: {{ include "tenant.name" . }}
|
||||
annotations:
|
||||
helm.sh/hook: pre-delete
|
||||
helm.sh/hook-delete-policy: before-hook-creation,hook-succeeded
|
||||
helm.sh/hook-weight: "-5"
|
||||
rules:
|
||||
- apiGroups: ["helm.toolkit.fluxcd.io"]
|
||||
resources: ["helmreleases"]
|
||||
verbs: ["get", "list", "delete"]
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
name: {{ include "tenant.name" . }}-cleanup
|
||||
namespace: {{ include "tenant.name" . }}
|
||||
annotations:
|
||||
helm.sh/hook: pre-delete
|
||||
helm.sh/hook-delete-policy: before-hook-creation,hook-succeeded
|
||||
helm.sh/hook-weight: "-5"
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: Role
|
||||
name: {{ include "tenant.name" . }}-cleanup
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ include "tenant.name" . }}-cleanup
|
||||
namespace: {{ include "tenant.name" . }}
|
||||
---
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
name: {{ include "tenant.name" . }}-cleanup
|
||||
namespace: {{ include "tenant.name" . }}
|
||||
annotations:
|
||||
helm.sh/hook: pre-delete
|
||||
helm.sh/hook-delete-policy: before-hook-creation,hook-succeeded
|
||||
helm.sh/hook-weight: "0"
|
||||
spec:
|
||||
ttlSecondsAfterFinished: 300
|
||||
template:
|
||||
metadata:
|
||||
name: {{ include "tenant.name" . }}-cleanup
|
||||
labels:
|
||||
policy.cozystack.io/allow-to-apiserver: "true"
|
||||
spec:
|
||||
serviceAccountName: {{ include "tenant.name" . }}-cleanup
|
||||
restartPolicy: OnFailure
|
||||
containers:
|
||||
- name: cleanup
|
||||
image: bitnami/kubectl:latest
|
||||
command:
|
||||
- /bin/bash
|
||||
- -c
|
||||
- |
|
||||
set -e
|
||||
NAMESPACE="{{ include "tenant.name" . }}"
|
||||
|
||||
echo "Cleaning up HelmReleases in namespace: $NAMESPACE"
|
||||
|
||||
echo "Deleting Applications"
|
||||
kubectl delete helmreleases.helm.toolkit.fluxcd.io -n "$NAMESPACE" \
|
||||
-l 'cozystack.io/ui=true,internal.cozystack.io/tenantmodule!=true' \
|
||||
--ignore-not-found=true --wait=true
|
||||
|
||||
echo "Deleting Tenant Modules"
|
||||
kubectl delete helmreleases.helm.toolkit.fluxcd.io -n "$NAMESPACE" \
|
||||
-l 'cozystack.io/ui=true,internal.cozystack.io/tenantmodule=true' \
|
||||
--ignore-not-found=true --wait=true
|
||||
|
||||
echo "Cleanup completed successfully"
|
||||
@@ -122,7 +122,7 @@ metadata:
|
||||
name: {{ include "tenant.name" . }}-view
|
||||
namespace: {{ include "tenant.name" . }}
|
||||
subjects:
|
||||
{{ include "cozy-lib.rbac.subjectsForTenant" (list "view" (include "tenant.name" .)) | nindent 2 }}
|
||||
{{ include "cozy-lib.rbac.subjectsForTenantAndAccessLevel" (list "view" (include "tenant.name" .)) | nindent 2 }}
|
||||
roleRef:
|
||||
kind: Role
|
||||
name: {{ include "tenant.name" . }}-view
|
||||
@@ -200,7 +200,7 @@ metadata:
|
||||
name: {{ include "tenant.name" . }}-use
|
||||
namespace: {{ include "tenant.name" . }}
|
||||
subjects:
|
||||
{{ include "cozy-lib.rbac.subjectsForTenant" (list "use" (include "tenant.name" .)) | nindent 2 }}
|
||||
{{ include "cozy-lib.rbac.subjectsForTenantAndAccessLevel" (list "use" (include "tenant.name" .)) | nindent 2 }}
|
||||
roleRef:
|
||||
kind: Role
|
||||
name: {{ include "tenant.name" . }}-use
|
||||
@@ -299,7 +299,7 @@ metadata:
|
||||
name: {{ include "tenant.name" . }}-admin
|
||||
namespace: {{ include "tenant.name" . }}
|
||||
subjects:
|
||||
{{ include "cozy-lib.rbac.subjectsForTenant" (list "admin" (include "tenant.name" .)) | nindent 2 }}
|
||||
{{ include "cozy-lib.rbac.subjectsForTenantAndAccessLevel" (list "admin" (include "tenant.name" .)) | nindent 2 }}
|
||||
roleRef:
|
||||
kind: Role
|
||||
name: {{ include "tenant.name" . }}-admin
|
||||
@@ -373,7 +373,7 @@ metadata:
|
||||
name: {{ include "tenant.name" . }}-super-admin
|
||||
namespace: {{ include "tenant.name" . }}
|
||||
subjects:
|
||||
{{ include "cozy-lib.rbac.subjectsForTenant" (list "super-admin" (include "tenant.name" .) ) | nindent 2 }}
|
||||
{{ include "cozy-lib.rbac.subjectsForTenantAndAccessLevel" (list "super-admin" (include "tenant.name" .) ) | nindent 2 }}
|
||||
roleRef:
|
||||
kind: Role
|
||||
name: {{ include "tenant.name" . }}-super-admin
|
||||
|
||||
@@ -69,3 +69,36 @@ Generate a stable UUID for cloud-init re-initialization upon upgrade.
|
||||
{{- end }}
|
||||
{{- $uuid }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Node Affinity for Windows VMs
|
||||
*/}}
|
||||
{{- define "virtual-machine.nodeAffinity" -}}
|
||||
{{- $configMap := lookup "v1" "ConfigMap" "cozy-system" "cozystack-scheduling" -}}
|
||||
{{- if $configMap -}}
|
||||
{{- $dedicatedNodesForWindowsVMs := get $configMap.data "dedicatedNodesForWindowsVMs" -}}
|
||||
{{- if eq $dedicatedNodesForWindowsVMs "true" -}}
|
||||
{{- $isWindows := hasPrefix "windows" (toString .Values.instanceProfile) -}}
|
||||
affinity:
|
||||
nodeAffinity:
|
||||
{{- if $isWindows }}
|
||||
requiredDuringSchedulingIgnoredDuringExecution:
|
||||
nodeSelectorTerms:
|
||||
- matchExpressions:
|
||||
- key: scheduling.cozystack.io/vm-windows
|
||||
operator: In
|
||||
values:
|
||||
- "true"
|
||||
{{- else }}
|
||||
preferredDuringSchedulingIgnoredDuringExecution:
|
||||
- weight: 100
|
||||
preference:
|
||||
matchExpressions:
|
||||
- key: scheduling.cozystack.io/vm-windows
|
||||
operator: NotIn
|
||||
values:
|
||||
- "true"
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
@@ -27,7 +27,11 @@
|
||||
{{- if and $existingPVC $desiredStorage -}}
|
||||
{{- $currentStorage := $existingPVC.spec.resources.requests.storage | toString -}}
|
||||
{{- if not (eq $currentStorage $desiredStorage) -}}
|
||||
{{- $needResizePVC = true -}}
|
||||
{{- $oldSize := (include "cozy-lib.resources.toFloat" $currentStorage) | float64 -}}
|
||||
{{- $newSize := (include "cozy-lib.resources.toFloat" $desiredStorage) | float64 -}}
|
||||
{{- if gt $newSize $oldSize -}}
|
||||
{{- $needResizePVC = true -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
|
||||
@@ -124,6 +124,8 @@ spec:
|
||||
|
||||
terminationGracePeriodSeconds: 30
|
||||
|
||||
{{- include "virtual-machine.nodeAffinity" . | nindent 6 }}
|
||||
|
||||
volumes:
|
||||
- name: systemdisk
|
||||
dataVolume:
|
||||
|
||||
@@ -1,5 +1,17 @@
|
||||
{{- $existingPVC := lookup "v1" "PersistentVolumeClaim" .Release.Namespace .Release.Name }}
|
||||
{{- if and $existingPVC (ne ($existingPVC.spec.resources.requests.storage | toString) .Values.storage) -}}
|
||||
{{- $shouldResize := false -}}
|
||||
{{- if and $existingPVC .Values.storage -}}
|
||||
{{- $currentStorage := $existingPVC.spec.resources.requests.storage | toString -}}
|
||||
{{- if ne $currentStorage .Values.storage -}}
|
||||
{{- $oldSize := (include "cozy-lib.resources.toFloat" $currentStorage) | float64 -}}
|
||||
{{- $newSize := (include "cozy-lib.resources.toFloat" .Values.storage) | float64 -}}
|
||||
{{- if gt $newSize $oldSize -}}
|
||||
{{- $shouldResize = true -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- if $shouldResize -}}
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
@@ -23,6 +35,7 @@ spec:
|
||||
command: ["sh", "-xec"]
|
||||
args:
|
||||
- |
|
||||
echo "Resizing PVC to {{ .Values.storage }}..."
|
||||
kubectl patch pvc {{ .Release.Name }} -p '{"spec":{"resources":{"requests":{"storage":"{{ .Values.storage }}"}}}}'
|
||||
---
|
||||
apiVersion: v1
|
||||
|
||||
@@ -69,3 +69,36 @@ Generate a stable UUID for cloud-init re-initialization upon upgrade.
|
||||
{{- end }}
|
||||
{{- $uuid }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Node Affinity for Windows VMs
|
||||
*/}}
|
||||
{{- define "virtual-machine.nodeAffinity" -}}
|
||||
{{- $configMap := lookup "v1" "ConfigMap" "cozy-system" "cozystack-scheduling" -}}
|
||||
{{- if $configMap -}}
|
||||
{{- $dedicatedNodesForWindowsVMs := get $configMap.data "dedicatedNodesForWindowsVMs" -}}
|
||||
{{- if eq $dedicatedNodesForWindowsVMs "true" -}}
|
||||
{{- $isWindows := hasPrefix "windows" (toString .Values.instanceProfile) -}}
|
||||
affinity:
|
||||
nodeAffinity:
|
||||
{{- if $isWindows }}
|
||||
requiredDuringSchedulingIgnoredDuringExecution:
|
||||
nodeSelectorTerms:
|
||||
- matchExpressions:
|
||||
- key: scheduling.cozystack.io/vm-windows
|
||||
operator: In
|
||||
values:
|
||||
- "true"
|
||||
{{- else }}
|
||||
preferredDuringSchedulingIgnoredDuringExecution:
|
||||
- weight: 100
|
||||
preference:
|
||||
matchExpressions:
|
||||
- key: scheduling.cozystack.io/vm-windows
|
||||
operator: NotIn
|
||||
values:
|
||||
- "true"
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
@@ -95,6 +95,9 @@ spec:
|
||||
noCloud: {}
|
||||
{{- end }}
|
||||
terminationGracePeriodSeconds: 30
|
||||
|
||||
{{- include "virtual-machine.nodeAffinity" . | nindent 6 }}
|
||||
|
||||
volumes:
|
||||
{{- range .Values.disks }}
|
||||
- name: disk-{{ .name }}
|
||||
|
||||
@@ -19,7 +19,7 @@ Subnet name and ip address range must be unique within a VPC.
|
||||
Subnet ip address space must not overlap with the default management network ip address range, subsets of 172.16.0.0/12 are recommended.
|
||||
Currently there are no fail-safe checks, however they are planned for the future.
|
||||
|
||||
Different VPCs may have subnets with ovelapping ip address ranges.
|
||||
Different VPCs may have subnets with overlapping ip address ranges.
|
||||
|
||||
A VM or a pod may be connected to multiple secondary Subnets at once. Each secondary connection will be represented as an additional network interface.
|
||||
|
||||
|
||||
1
packages/apps/vpc/charts/cozy-lib
Symbolic link
1
packages/apps/vpc/charts/cozy-lib
Symbolic link
@@ -0,0 +1 @@
|
||||
../../../library/cozy-lib
|
||||
@@ -60,13 +60,33 @@ kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ $.Release.Name }}-subnets
|
||||
labels:
|
||||
apps.cozystack.io/application.group: apps.cozystack.io
|
||||
apps.cozystack.io/application.kind: VirtualPrivateCloud
|
||||
apps.cozystack.io/application.name: {{ trimPrefix "virtualprivatecloud-" .Release.Name }}
|
||||
cozystack.io/vpcId: {{ $vpcId }}
|
||||
cozystack.io/tenantName: {{ $.Release.Namespace }}
|
||||
data:
|
||||
{{- range $subnetName, $subnetConfig := .Values.subnets }}
|
||||
{{ $subnetName }}: |-
|
||||
subnetName: {{ $subnetName }}
|
||||
subnetId: {{ print "subnet-" (print $.Release.Namespace "/" $vpcId "/" $subnetName | sha256sum | trunc 8) }}
|
||||
subnetCIDR: {{ $subnetConfig.cidr }}
|
||||
{{ $subnetName }}.ID: {{ print "subnet-" (print $.Release.Namespace "/" $vpcId "/" $subnetName | sha256sum | trunc 8) }}
|
||||
{{ $subnetName }}.CIDR: {{ $subnetConfig.cidr }}
|
||||
{{- end }}
|
||||
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
name: "{{ .Release.Name }}-subnets"
|
||||
subjects: {{- include "cozy-lib.rbac.subjectsForTenantAndAccessLevel" (list "view" .Release.Namespace ) | nindent 2 }}
|
||||
roleRef:
|
||||
kind: Role
|
||||
name: "{{ .Release.Name }}-subnets"
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: Role
|
||||
metadata:
|
||||
name: "{{ .Release.Name }}-subnets"
|
||||
rules:
|
||||
- apiGroups: [""]
|
||||
resources: ["configmaps"]
|
||||
verbs: ["get","list","watch"]
|
||||
resourceNames: ["{{ .Release.Name }}-subnets"]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM golang:1.24-alpine as k8s-await-election-builder
|
||||
FROM golang:1.24-alpine AS k8s-await-election-builder
|
||||
|
||||
ARG K8S_AWAIT_ELECTION_GITREPO=https://github.com/LINBIT/k8s-await-election
|
||||
ARG K8S_AWAIT_ELECTION_VERSION=0.4.1
|
||||
@@ -13,7 +13,7 @@ RUN git clone ${K8S_AWAIT_ELECTION_GITREPO} /usr/local/go/k8s-await-election/ \
|
||||
&& make \
|
||||
&& mv ./out/k8s-await-election-${TARGETARCH} /k8s-await-election
|
||||
|
||||
FROM golang:1.24-alpine as builder
|
||||
FROM golang:1.24-alpine AS builder
|
||||
|
||||
ARG TARGETOS
|
||||
ARG TARGETARCH
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
cozystack:
|
||||
image: ghcr.io/cozystack/cozystack/installer:v0.37.0@sha256:256c5a0f0ae2fc3ad6865b9fda74c42945b38a5384240fa29554617185b60556
|
||||
image: ghcr.io/cozystack/cozystack/installer:v0.38.8@sha256:2a82678c2b020047ca3f4baaaa79e1284810fbe5d5ffdc024b242bc9f33df168
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
e2e:
|
||||
image: ghcr.io/cozystack/cozystack/e2e-sandbox:v0.37.0@sha256:10afd0a6c39248ec41d0e59ff1bc6c29bd0075b7cc9a512b01cf603ef39c33ea
|
||||
image: ghcr.io/cozystack/cozystack/e2e-sandbox:v0.38.8@sha256:bc12856b5c2dff2855b26b1a2909d05d07a4c4e2af5f0c36468de09585888573
|
||||
|
||||
@@ -1 +1 @@
|
||||
ghcr.io/cozystack/cozystack/matchbox:v0.37.0@sha256:5cca5f56b755285aefa11b1052fe55e1aa83b25bae34aef80cdb77ff63091044
|
||||
ghcr.io/cozystack/cozystack/matchbox:v0.38.8@sha256:dbce65fee982b7d2b6b7baa9ac862e178f9e153f8918fc0c5c57be03ccfd6730
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{{- $cozyConfig := lookup "v1" "ConfigMap" "cozy-system" "cozystack" }}
|
||||
{{- $exposeIngress := index $cozyConfig.data "expose-ingress" | default "tenant-root" }}
|
||||
{{- $exposeExternalIPs := (index $cozyConfig.data "expose-external-ips") | default "" }}
|
||||
{{- $exposeExternalIPs := (index $cozyConfig.data "expose-external-ips") | default "" | nospace }}
|
||||
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||
kind: HelmRelease
|
||||
metadata:
|
||||
|
||||
@@ -1 +1 @@
|
||||
ghcr.io/cozystack/cozystack/grafana:0.0.0@sha256:c63978e1ed0304e8518b31ddee56c4e8115541b997d8efbe1c0a74da57140399
|
||||
ghcr.io/cozystack/cozystack/grafana:0.0.0@sha256:8ce0cd90c8f614cdabf5a41f8aa50b7dfbd02b31b9a0bd7897927e7f89968e07
|
||||
|
||||
@@ -1 +1 @@
|
||||
ghcr.io/cozystack/cozystack/objectstorage-sidecar:v0.37.0@sha256:f166f09cdc9cdbb758209883819ab8261a3793bc1d7a6b6685efd5a2b2930847
|
||||
ghcr.io/cozystack/cozystack/objectstorage-sidecar:v0.38.8@sha256:2d1833c78c35b697a3634d4b3be9a3218edae95a77583e9e121c10a92e7433ec
|
||||
|
||||
@@ -4,3 +4,5 @@ include ../../../scripts/package.mk
|
||||
generate:
|
||||
cozyvalues-gen -v values.yaml -s values.schema.json -r README.md
|
||||
|
||||
test:
|
||||
$(MAKE) -C ../../tests/cozy-lib-tests/ test
|
||||
|
||||
@@ -174,15 +174,46 @@
|
||||
{{- end }}
|
||||
|
||||
{{- define "cozy-lib.resources.flatten" -}}
|
||||
{{- $out := dict -}}
|
||||
{{- $res := include "cozy-lib.resources.sanitize" . | fromYaml -}}
|
||||
{{- range $section, $values := $res }}
|
||||
{{- range $k, $v := $values }}
|
||||
{{- $key := printf "%s.%s" $section $k }}
|
||||
{{- if ne $key "limits.storage" }}
|
||||
{{- $_ := set $out $key $v }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- $out := dict -}}
|
||||
{{- $res := include "cozy-lib.resources.sanitize" . | fromYaml -}}
|
||||
{{- range $section, $values := $res }}
|
||||
{{- range $k, $v := $values }}
|
||||
{{- with include "cozy-lib.resources.flattenResource" (list $section $k) }}
|
||||
{{- $_ := set $out . $v }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- $out | toYaml }}
|
||||
{{- end }}
|
||||
{{- $out | toYaml }}
|
||||
|
||||
{{/*
|
||||
This is a helper function that takes an argument like `list "limits" "services.loadbalancers"`
|
||||
or `list "limits" "storage"` or `list "requests" "cpu"` and returns "services.loadbalancers",
|
||||
"", and "requests.cpu", respectively, thus transforming them to an acceptable format for k8s
|
||||
ResourceQuotas objects.
|
||||
*/}}
|
||||
{{- define "cozy-lib.resources.flattenResource" }}
|
||||
{{- $rawQuotaKeys := list
|
||||
"pods"
|
||||
"services"
|
||||
"services.loadbalancers"
|
||||
"services.nodeports"
|
||||
"services.clusterip"
|
||||
"configmaps"
|
||||
"secrets"
|
||||
"persistentvolumeclaims"
|
||||
"replicationcontrollers"
|
||||
"resourcequotas"
|
||||
-}}
|
||||
{{- $section := index . 0 }}
|
||||
{{- $type := index . 1 }}
|
||||
{{- $out := "" }}
|
||||
{{- if and (eq $section "limits") (eq $type "storage") }}
|
||||
{{- $out = "" }}
|
||||
{{- else if and (eq $section "limits") (has $type $rawQuotaKeys) }}
|
||||
{{- $out = $type }}
|
||||
{{- else if not (has $type $rawQuotaKeys) }}
|
||||
{{- $out = printf "%s.%s" $section $type }}
|
||||
{{- end }}
|
||||
{{- $out -}}
|
||||
{{- end }}
|
||||
|
||||
@@ -1 +1 @@
|
||||
ghcr.io/cozystack/cozystack/s3manager:v0.5.0@sha256:7348bec610f08bd902c88c9a9f28fdd644727e2728a1e4103f88f0c99febd5e7
|
||||
ghcr.io/cozystack/cozystack/s3manager:v0.5.0@sha256:ecb140d026ed72660306953a7eec140d7ac81e79544d5bbf1aba5f62aa5f8b69
|
||||
|
||||
@@ -18,3 +18,6 @@ cilium:
|
||||
digest: "sha256:81262986a41487bfa3d0465091d3a386def5bd1ab476350bd4af2fdee5846fe6"
|
||||
envoy:
|
||||
enabled: false
|
||||
rollOutCiliumPods: true
|
||||
operator:
|
||||
rollOutPods: true
|
||||
|
||||
@@ -3,3 +3,6 @@ coredns:
|
||||
repository: registry.k8s.io/coredns/coredns
|
||||
tag: v1.12.4
|
||||
replicaCount: 2
|
||||
k8sAppLabelOverride: kube-dns
|
||||
service:
|
||||
name: kube-dns
|
||||
|
||||
1
packages/system/cozystack-api/.gitignore
vendored
Normal file
1
packages/system/cozystack-api/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
apiserver.local.config/
|
||||
@@ -4,6 +4,18 @@ NAMESPACE=cozy-system
|
||||
include ../../../scripts/common-envs.mk
|
||||
include ../../../scripts/package.mk
|
||||
|
||||
run-local:
|
||||
openssl req -nodes -new -x509 -keyout /tmp/ca.key -out /tmp/ca.crt -subj "/CN=kube-ca"
|
||||
openssl req -out /tmp/client.csr -new -newkey rsa:2048 -nodes -keyout /tmp/client.key -subj "/C=US/ST=SomeState/L=L/OU=Dev/CN=development/O=system:masters"
|
||||
openssl x509 -req -days 365 -in /tmp/client.csr -CA /tmp/ca.crt -CAkey /tmp/ca.key -set_serial 01 -sha256 -out /tmp/client.crt
|
||||
openssl req -out /tmp/apiserver.csr -new -newkey rsa:2048 -nodes -keyout /tmp/apiserver.key -subj "/CN=cozystack-api" -config cozystack-api-openssl.cnf
|
||||
openssl x509 -req -days 365 -in /tmp/apiserver.csr -CA /tmp/ca.crt -CAkey /tmp/ca.key -set_serial 01 -sha256 -out /tmp/apiserver.crt -extensions v3_req -extfile cozystack-api-openssl.cnf
|
||||
CGO_ENABLED=0 go build -o /tmp/cozystack-api ../../../cmd/cozystack-api/main.go
|
||||
/tmp/cozystack-api --client-ca-file /tmp/ca.crt --tls-cert-file /tmp/apiserver.crt --tls-private-key-file /tmp/apiserver.key --secure-port 6443 --kubeconfig $(KUBECONFIG) --authorization-kubeconfig $(KUBECONFIG) --authentication-kubeconfig $(KUBECONFIG)
|
||||
|
||||
debug:
|
||||
dlv debug ../../../cmd/cozystack-api/main.go -- --client-ca-file /tmp/ca.crt --tls-cert-file /tmp/apiserver.crt --tls-private-key-file /tmp/apiserver.key --secure-port 6443 --kubeconfig $(KUBECONFIG) --authorization-kubeconfig $(KUBECONFIG) --authentication-kubeconfig $(KUBECONFIG)
|
||||
|
||||
image: image-cozystack-api
|
||||
|
||||
image-cozystack-api:
|
||||
|
||||
13
packages/system/cozystack-api/cozystack-api-openssl.cnf
Normal file
13
packages/system/cozystack-api/cozystack-api-openssl.cnf
Normal file
@@ -0,0 +1,13 @@
|
||||
[ req ]
|
||||
distinguished_name = req_distinguished_name
|
||||
req_extensions = v3_req
|
||||
prompt = no
|
||||
|
||||
[ req_distinguished_name ]
|
||||
CN = cozystack-api
|
||||
|
||||
[ v3_req ]
|
||||
subjectAltName = @alt_names
|
||||
|
||||
[ alt_names ]
|
||||
IP.1 = 127.0.0.1
|
||||
@@ -1,5 +1,5 @@
|
||||
cozystackAPI:
|
||||
image: ghcr.io/cozystack/cozystack/cozystack-api:v0.37.0@sha256:19d89e8afb90ce38ab7e42ecedfc28402f7c0b56f30957db957c5415132ff6ca
|
||||
image: ghcr.io/cozystack/cozystack/cozystack-api:v0.38.8@sha256:51574c6bb61ae31e63193f84daf18c14ceb71580786e262191c4aa0ac44b1519
|
||||
localK8sAPIEndpoint:
|
||||
enabled: true
|
||||
replicas: 2
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
cozystackController:
|
||||
image: ghcr.io/cozystack/cozystack/cozystack-controller:v0.37.0@sha256:845b8e68cbc277c2303080bcd55597e4334610d396dad258ad56fd906530acc3
|
||||
image: ghcr.io/cozystack/cozystack/cozystack-controller:v0.38.8@sha256:6be8fa0a56c0dca71086deddef1b16d23c613b912c7ca379096ca3ad0e50dffb
|
||||
debug: false
|
||||
disableTelemetry: false
|
||||
cozystackVersion: "v0.37.0"
|
||||
cozystackVersion: "v0.38.8"
|
||||
cozystackAPIKind: "DaemonSet"
|
||||
|
||||
@@ -3,7 +3,7 @@ ARG NODE_VERSION=20.18.1
|
||||
FROM node:${NODE_VERSION}-alpine AS builder
|
||||
WORKDIR /src
|
||||
|
||||
ARG COMMIT_REF=ba56271739505284aee569f914fc90e6a9c670da
|
||||
ARG COMMIT_REF=183dc9dcbb0f8a1833dad642c35faa385c71e58d
|
||||
RUN wget -O- https://github.com/PRO-Robotech/openapi-ui-k8s-bff/archive/${COMMIT_REF}.tar.gz | tar xzf - --strip-components=1
|
||||
|
||||
ENV PATH=/src/node_modules/.bin:$PATH
|
||||
|
||||
@@ -5,7 +5,7 @@ ARG NODE_VERSION=20.18.1
|
||||
FROM node:${NODE_VERSION}-alpine AS openapi-k8s-toolkit-builder
|
||||
RUN apk add git
|
||||
WORKDIR /src
|
||||
ARG COMMIT=7bd5380c6c4606640dd3bac68bf9dce469470518
|
||||
ARG COMMIT=cb2f122caafaa2fd5455750213d9e633017ec555
|
||||
RUN wget -O- https://github.com/cozystack/openapi-k8s-toolkit/archive/${COMMIT}.tar.gz | tar -xzvf- --strip-components=1
|
||||
|
||||
COPY openapi-k8s-toolkit/patches /patches
|
||||
@@ -22,7 +22,7 @@ FROM node:${NODE_VERSION}-alpine AS builder
|
||||
#RUN apk add git
|
||||
WORKDIR /src
|
||||
|
||||
ARG COMMIT_REF=0c3629b2ce8545e81f7ece4d65372a188c802dfc
|
||||
ARG COMMIT_REF=3cfbbf2156b6a5e4a1f283a032019530c0c2d37d
|
||||
RUN wget -O- https://github.com/PRO-Robotech/openapi-ui/archive/${COMMIT_REF}.tar.gz | tar xzf - --strip-components=1
|
||||
|
||||
#COPY openapi-ui/patches /patches
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{{- $brandingConfig:= lookup "v1" "ConfigMap" "cozy-system" "cozystack-branding" }}
|
||||
|
||||
{{- $tenantText := "latest" }}
|
||||
{{- $tenantText := "v0.38.8" }}
|
||||
{{- $footerText := "Cozystack" }}
|
||||
{{- $titleText := "Cozystack Dashboard" }}
|
||||
{{- $logoText := "" }}
|
||||
|
||||
@@ -34,6 +34,14 @@ data:
|
||||
}
|
||||
|
||||
location /k8s {
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection $connection_upgrade;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header Host $host;
|
||||
proxy_read_timeout 86400s;
|
||||
proxy_send_timeout 86400s;
|
||||
|
||||
rewrite /k8s/(.*) /$1 break;
|
||||
proxy_pass https://kubernetes.default.svc:443;
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ spec:
|
||||
template:
|
||||
metadata:
|
||||
annotations:
|
||||
checksum/configmap-configurationnginxfile: 258c66b019c8c7f4a5d0a78dfd7bf297ce486b213346fbd2879c466abfc377e0
|
||||
checksum/config: {{ include (print $.Template.BasePath "/nginx-config.yaml") . | sha256sum }}
|
||||
labels:
|
||||
app.kubernetes.io/instance: incloud-web
|
||||
app.kubernetes.io/name: nginx
|
||||
|
||||
@@ -15,7 +15,8 @@ spec:
|
||||
type: RollingUpdate
|
||||
template:
|
||||
metadata:
|
||||
annotations: null
|
||||
annotations:
|
||||
checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
|
||||
labels:
|
||||
app.kubernetes.io/instance: incloud-web
|
||||
app.kubernetes.io/name: web
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
openapiUI:
|
||||
image: ghcr.io/cozystack/cozystack/openapi-ui:latest@sha256:77991f2482c0026d082582b22a8ffb191f3ba6fc948b2f125ef9b1081538f865
|
||||
image: ghcr.io/cozystack/cozystack/openapi-ui:v0.38.8@sha256:54f53571422c50f6aab613031d519a305564e4ec0b456baa23e98b7707ac001b
|
||||
openapiUIK8sBff:
|
||||
image: ghcr.io/cozystack/cozystack/openapi-ui-k8s-bff:latest@sha256:8386f0747266726afb2b30db662092d66b0af0370e3becd8bee9684125fa9cc9
|
||||
image: ghcr.io/cozystack/cozystack/openapi-ui-k8s-bff:v0.38.8@sha256:1f7827a1978bd9c81ac924dd0e78f6a3ce834a9a64af55047e220812bc15a944
|
||||
tokenProxy:
|
||||
image: ghcr.io/cozystack/cozystack/token-proxy:latest@sha256:fad27112617bb17816702571e1f39d0ac3fe5283468d25eb12f79906cdab566b
|
||||
image: ghcr.io/cozystack/cozystack/token-proxy:v0.38.8@sha256:4fc8a11f8a1a81aa0774ae2b1ed2e05d36d0b3ef1e37979cc4994e65114d93ae
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
strimzi-kafka-operator:
|
||||
watchAnyNamespace: true
|
||||
generateNetworkPolicy: false
|
||||
kubernetesServiceDnsDomain: cozy.local
|
||||
kubernetesServiceDnsDomain: cozy.local
|
||||
resources:
|
||||
limits:
|
||||
memory: 512Mi
|
||||
|
||||
@@ -3,7 +3,7 @@ kamaji:
|
||||
deploy: false
|
||||
image:
|
||||
pullPolicy: IfNotPresent
|
||||
tag: v0.37.0@sha256:9f4fd5045ede2909fbaf2572e4138fcbd8921071ecf8f08446257fddd0e6f655
|
||||
tag: v0.38.8@sha256:4588de4380fb70c29c4a762fb19a9bbe210e68bc5ff67035c752c44daf319bfc
|
||||
repository: ghcr.io/cozystack/cozystack/kamaji
|
||||
resources:
|
||||
limits:
|
||||
@@ -13,4 +13,4 @@ kamaji:
|
||||
cpu: 100m
|
||||
memory: 100Mi
|
||||
extraArgs:
|
||||
- --migrate-image=ghcr.io/cozystack/cozystack/kamaji:v0.37.0@sha256:9f4fd5045ede2909fbaf2572e4138fcbd8921071ecf8f08446257fddd0e6f655
|
||||
- --migrate-image=ghcr.io/cozystack/cozystack/kamaji:v0.38.8@sha256:4588de4380fb70c29c4a762fb19a9bbe210e68bc5ff67035c752c44daf319bfc
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
portSecurity: true
|
||||
routes: ""
|
||||
image: ghcr.io/cozystack/cozystack/kubeovn-plunger:v0.37.0@sha256:9950614571ea77a55925eba0839b6b12c8e5a7a30b8858031a8c6050f261af1a
|
||||
image: ghcr.io/cozystack/cozystack/kubeovn-plunger:v0.38.8@sha256:14537e277f6de81ec4fda42b8ffc25b224834b9e3af81ef42b80c50cee6f68ef
|
||||
ovnCentralName: ovn-central
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
portSecurity: true
|
||||
routes: ""
|
||||
image: ghcr.io/cozystack/cozystack/kubeovn-webhook:v0.37.0@sha256:7e63205708e607ce2cedfe2a2cafd323ca51e3ebc71244a21ff6f9016c6c87bc
|
||||
image: ghcr.io/cozystack/cozystack/kubeovn-webhook:v0.38.8@sha256:e6334c29d3aaf0dea766c88e3e05b53ad623d1bb497b3c836e6f76adade45b29
|
||||
|
||||
@@ -44,7 +44,7 @@ kube-ovn:
|
||||
memory: "50Mi"
|
||||
limits:
|
||||
cpu: "1000m"
|
||||
memory: "1Gi"
|
||||
memory: "2Gi"
|
||||
kube-ovn-pinger:
|
||||
requests:
|
||||
cpu: "10m"
|
||||
@@ -65,4 +65,4 @@ global:
|
||||
images:
|
||||
kubeovn:
|
||||
repository: kubeovn
|
||||
tag: v1.14.5@sha256:af10da442a0c6dc7df47a0ef752e2eb5c247bb0b43069fdfcb2aa51511185ea2
|
||||
tag: v1.14.11@sha256:85612c4fb14feb930f04771b0ca377a51344fa5e3e2eb09d95c059aa19c4c8ae
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
storageClass: replicated
|
||||
csiDriver:
|
||||
image: ghcr.io/cozystack/cozystack/kubevirt-csi-driver:0.0.0@sha256:c8b08084a86251cdd18e237de89b695bca0e4f7eb1f1f6ddc2b903b4d74ea5ff
|
||||
image: ghcr.io/cozystack/cozystack/kubevirt-csi-driver:0.0.0@sha256:b42c6af641ee0eadb7e0a42e368021b4759f443cb7b71b7e745a64f0fc8b752e
|
||||
|
||||
@@ -27,7 +27,7 @@ spec:
|
||||
expr: |
|
||||
max_over_time(
|
||||
kubevirt_vmi_info{
|
||||
phase!="Running",
|
||||
phase!="running",
|
||||
exported_namespace=~".+",
|
||||
name=~".+"
|
||||
}[10m]
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
lineageControllerWebhook:
|
||||
image: ghcr.io/cozystack/cozystack/lineage-controller-webhook:v0.37.0@sha256:845b8e68cbc277c2303080bcd55597e4334610d396dad258ad56fd906530acc3
|
||||
image: ghcr.io/cozystack/cozystack/lineage-controller-webhook:v0.38.8@sha256:d2525b2cef34a6eea59d77e2bbca52eb0cd377a526b41643e104873613e7b6a0
|
||||
debug: false
|
||||
localK8sAPIEndpoint:
|
||||
enabled: true
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
dependencies:
|
||||
- name: mariadb-operator-crds
|
||||
repository: file://../mariadb-operator-crds
|
||||
version: 0.38.1
|
||||
digest: sha256:0f2ff90b83955a060f581b7db4a0c746338ae3a50d9766877c346c7f61d74cde
|
||||
generated: "2025-04-15T16:54:07.813989419Z"
|
||||
version: 25.10.2
|
||||
digest: sha256:01b102dbdb92970e38346df382ed3e5cd93d02a3b642029e94320256c9bfad42
|
||||
generated: "2025-10-28T11:29:04.951947063Z"
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
apiVersion: v2
|
||||
appVersion: 0.38.1
|
||||
appVersion: 25.10.2
|
||||
dependencies:
|
||||
- condition: crds.enabled
|
||||
name: mariadb-operator-crds
|
||||
repository: file://../mariadb-operator-crds
|
||||
version: 0.38.1
|
||||
version: 25.10.2
|
||||
description: Run and operate MariaDB in a cloud native way
|
||||
home: https://github.com/mariadb-operator/mariadb-operator
|
||||
icon: https://mariadb-operator.github.io/mariadb-operator/assets/mariadb_profile.svg
|
||||
@@ -21,4 +21,4 @@ maintainers:
|
||||
name: mmontes11
|
||||
name: mariadb-operator
|
||||
type: application
|
||||
version: 0.38.1
|
||||
version: 25.10.2
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
[//]: # (README.md generated by gotmpl. DO NOT EDIT.)
|
||||
|
||||
  
|
||||
  
|
||||
|
||||
Run and operate MariaDB in a cloud native way
|
||||
|
||||
@@ -16,7 +16,7 @@ helm install mariadb-operator-crds mariadb-operator/mariadb-operator-crds
|
||||
helm install mariadb-operator mariadb-operator/mariadb-operator
|
||||
```
|
||||
|
||||
Refer to the [helm documentation](https://github.com/mariadb-operator/mariadb-operator/blob/main/docs/HELM.md) for further detail.
|
||||
Refer to the [helm documentation](https://github.com/mariadb-operator/mariadb-operator/blob/main/docs/helm.md) for further detail.
|
||||
|
||||
## Values
|
||||
|
||||
@@ -60,14 +60,15 @@ Refer to the [helm documentation](https://github.com/mariadb-operator/mariadb-op
|
||||
| certController.tolerations | list | `[]` | Tolerations to add to cert-controller container |
|
||||
| certController.topologySpreadConstraints | list | `[]` | topologySpreadConstraints to add to cert-controller container |
|
||||
| clusterName | string | `"cluster.local"` | Cluster DNS name |
|
||||
| config | object | `{"exporterImage":"prom/mysqld-exporter:v0.15.1","exporterMaxscaleImage":"docker-registry2.mariadb.com/mariadb/maxscale-prometheus-exporter-ubi:v0.0.1","galeraLibPath":"/usr/lib/galera/libgalera_smm.so","mariadbDefaultVersion":"11.4","mariadbImage":"docker-registry1.mariadb.com/library/mariadb:11.4.5","maxscaleImage":"docker-registry2.mariadb.com/mariadb/maxscale:23.08.5"}` | Operator configuration |
|
||||
| config | object | `{"exporterImage":"prom/mysqld-exporter:v0.15.1","exporterMaxscaleImage":"docker-registry2.mariadb.com/mariadb/maxscale-prometheus-exporter-ubi:v0.0.1","galeraLibPath":"/usr/lib/galera/libgalera_smm.so","mariadbDefaultVersion":"11.8","mariadbImage":"docker-registry1.mariadb.com/library/mariadb:11.8.2","mariadbImageName":"docker-registry1.mariadb.com/library/mariadb","maxscaleImage":"docker-registry2.mariadb.com/mariadb/maxscale:23.08.5"}` | Operator configuration |
|
||||
| config.exporterImage | string | `"prom/mysqld-exporter:v0.15.1"` | Default MariaDB exporter image |
|
||||
| config.exporterMaxscaleImage | string | `"docker-registry2.mariadb.com/mariadb/maxscale-prometheus-exporter-ubi:v0.0.1"` | Default MaxScale exporter image |
|
||||
| config.galeraLibPath | string | `"/usr/lib/galera/libgalera_smm.so"` | Galera library path to be used with MariaDB Galera |
|
||||
| config.mariadbDefaultVersion | string | `"11.4"` | Default MariaDB version to be used when unable to infer it via image tag |
|
||||
| config.mariadbImage | string | `"docker-registry1.mariadb.com/library/mariadb:11.4.5"` | Default MariaDB image |
|
||||
| config.mariadbDefaultVersion | string | `"11.8"` | Default MariaDB version to be used when unable to infer it via image tag |
|
||||
| config.mariadbImage | string | `"docker-registry1.mariadb.com/library/mariadb:11.8.2"` | Default MariaDB image |
|
||||
| config.mariadbImageName | string | `"docker-registry1.mariadb.com/library/mariadb"` | Default MariaDB image name |
|
||||
| config.maxscaleImage | string | `"docker-registry2.mariadb.com/mariadb/maxscale:23.08.5"` | Default MaxScale image |
|
||||
| crds | object | `{"enabled":false}` | - CRDs |
|
||||
| crds | object | `{"enabled":false}` | CRDs |
|
||||
| crds.enabled | bool | `false` | Whether the helm chart should create and update the CRDs. It is false by default, which implies that the CRDs must be managed independently with the mariadb-operator-crds helm chart. **WARNING** This should only be set to true during the initial deployment. If this chart manages the CRDs and is later uninstalled, all MariaDB instances will be DELETED. |
|
||||
| currentNamespaceOnly | bool | `false` | Whether the operator should watch CRDs only in its own namespace or not. |
|
||||
| extrArgs | list | `[]` | Extra arguments to be passed to the controller entrypoint |
|
||||
|
||||
@@ -17,6 +17,6 @@ helm install mariadb-operator-crds mariadb-operator/mariadb-operator-crds
|
||||
helm install mariadb-operator mariadb-operator/mariadb-operator
|
||||
```
|
||||
|
||||
Refer to the [helm documentation](https://github.com/mariadb-operator/mariadb-operator/blob/main/docs/HELM.md) for further detail.
|
||||
Refer to the [helm documentation](https://github.com/mariadb-operator/mariadb-operator/blob/main/docs/helm.md) for further detail.
|
||||
|
||||
{{ template "chart.valuesSection" . }}
|
||||
|
||||
@@ -16,4 +16,4 @@ maintainers:
|
||||
name: mmontes11
|
||||
name: mariadb-operator-crds
|
||||
type: application
|
||||
version: 0.38.1
|
||||
version: 25.10.2
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,4 @@
|
||||
mariadb-operator has been successfully deployed! 🦭
|
||||
|
||||
Not sure what to do next? 😅 Check out:
|
||||
https://github.com/mariadb-operator/mariadb-operator/blob/main/docs/QUICKSTART.md
|
||||
https://github.com/mariadb-operator/mariadb-operator/blob/main/docs/quickstart.md
|
||||
|
||||
@@ -51,10 +51,10 @@ rules:
|
||||
- patch
|
||||
- watch
|
||||
- apiGroups:
|
||||
- ""
|
||||
- discovery.k8s.io
|
||||
resources:
|
||||
- endpoints
|
||||
- endpoints/restricted
|
||||
- endpointslices
|
||||
- endpointslices/restricted
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
|
||||
@@ -4,6 +4,7 @@ data:
|
||||
MARIADB_GALERA_LIB_PATH: "{{ .Values.config.galeraLibPath }}"
|
||||
MARIADB_DEFAULT_VERSION: "{{ .Values.config.mariadbDefaultVersion }}"
|
||||
RELATED_IMAGE_MARIADB: "{{ .Values.config.mariadbImage }}"
|
||||
RELATED_IMAGE_MARIADB_NAME: "{{ .Values.config.mariadbImageName }}"
|
||||
RELATED_IMAGE_MAXSCALE: "{{ .Values.config.maxscaleImage }}"
|
||||
RELATED_IMAGE_EXPORTER: "{{ .Values.config.exporterImage }}"
|
||||
RELATED_IMAGE_EXPORTER_MAXSCALE: "{{ .Values.config.exporterMaxscaleImage }}"
|
||||
|
||||
@@ -36,17 +36,6 @@ rules:
|
||||
verbs:
|
||||
- create
|
||||
- patch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- endpoints
|
||||
- endpoints/restricted
|
||||
verbs:
|
||||
- create
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- watch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
@@ -65,6 +54,7 @@ rules:
|
||||
- persistentvolumeclaims
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- deletecollection
|
||||
- list
|
||||
- patch
|
||||
@@ -121,6 +111,7 @@ rules:
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- watch
|
||||
@@ -133,6 +124,17 @@ rules:
|
||||
- list
|
||||
- patch
|
||||
- watch
|
||||
- apiGroups:
|
||||
- discovery.k8s.io
|
||||
resources:
|
||||
- endpointslices
|
||||
- endpointslices/restricted
|
||||
verbs:
|
||||
- create
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- watch
|
||||
- apiGroups:
|
||||
- k8s.mariadb.com
|
||||
resources:
|
||||
@@ -141,7 +143,9 @@ rules:
|
||||
- databases
|
||||
- grants
|
||||
- mariadbs
|
||||
- externalmariadbs
|
||||
- maxscales
|
||||
- physicalbackups
|
||||
- restores
|
||||
- sqljobs
|
||||
- users
|
||||
@@ -161,7 +165,9 @@ rules:
|
||||
- databases/finalizers
|
||||
- grants/finalizers
|
||||
- mariadbs/finalizers
|
||||
- externalmariadbs/finalizers
|
||||
- maxscales/finalizers
|
||||
- physicalbackups/finalizers
|
||||
- restores/finalizers
|
||||
- sqljobs/finalizers
|
||||
- users/finalizers
|
||||
@@ -175,7 +181,9 @@ rules:
|
||||
- databases/status
|
||||
- grants/status
|
||||
- mariadbs/status
|
||||
- externalmariadbs/status
|
||||
- maxscales/status
|
||||
- physicalbackups/status
|
||||
- restores/status
|
||||
- sqljobs/status
|
||||
- users/status
|
||||
@@ -220,6 +228,17 @@ rules:
|
||||
- list
|
||||
- patch
|
||||
- watch
|
||||
- apiGroups:
|
||||
- snapshot.storage.k8s.io
|
||||
resources:
|
||||
- volumesnapshots
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- watch
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: RoleBinding
|
||||
|
||||
@@ -53,17 +53,6 @@ rules:
|
||||
- list
|
||||
- patch
|
||||
- watch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- endpoints
|
||||
- endpoints/restricted
|
||||
verbs:
|
||||
- create
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- watch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
@@ -82,6 +71,7 @@ rules:
|
||||
- persistentvolumeclaims
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- deletecollection
|
||||
- list
|
||||
- patch
|
||||
@@ -150,6 +140,7 @@ rules:
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- watch
|
||||
@@ -162,6 +153,17 @@ rules:
|
||||
- list
|
||||
- patch
|
||||
- watch
|
||||
- apiGroups:
|
||||
- discovery.k8s.io
|
||||
resources:
|
||||
- endpointslices
|
||||
- endpointslices/restricted
|
||||
verbs:
|
||||
- create
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- watch
|
||||
- apiGroups:
|
||||
- k8s.mariadb.com
|
||||
resources:
|
||||
@@ -170,7 +172,9 @@ rules:
|
||||
- databases
|
||||
- grants
|
||||
- mariadbs
|
||||
- externalmariadbs
|
||||
- maxscales
|
||||
- physicalbackups
|
||||
- restores
|
||||
- sqljobs
|
||||
- users
|
||||
@@ -190,7 +194,9 @@ rules:
|
||||
- databases/finalizers
|
||||
- grants/finalizers
|
||||
- mariadbs/finalizers
|
||||
- externalmariadbs/finalizers
|
||||
- maxscales/finalizers
|
||||
- physicalbackups/finalizers
|
||||
- restores/finalizers
|
||||
- sqljobs/finalizers
|
||||
- users/finalizers
|
||||
@@ -204,7 +210,9 @@ rules:
|
||||
- databases/status
|
||||
- grants/status
|
||||
- mariadbs/status
|
||||
- externalmariadbs/status
|
||||
- maxscales/status
|
||||
- physicalbackups/status
|
||||
- restores/status
|
||||
- sqljobs/status
|
||||
- users/status
|
||||
@@ -250,6 +258,17 @@ rules:
|
||||
- list
|
||||
- patch
|
||||
- watch
|
||||
- apiGroups:
|
||||
- snapshot.storage.k8s.io
|
||||
resources:
|
||||
- volumesnapshots
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- watch
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: RoleBinding
|
||||
|
||||
@@ -1,41 +1,5 @@
|
||||
{{ if and (not .Values.currentNamespaceOnly) .Values.webhook.enabled }}
|
||||
{{ $fullName := include "mariadb-operator.fullname" . }}
|
||||
apiVersion: admissionregistration.k8s.io/v1
|
||||
kind: MutatingWebhookConfiguration
|
||||
metadata:
|
||||
name: {{ $fullName }}-webhook
|
||||
labels:
|
||||
{{- include "mariadb-operator-webhook.labels" . | nindent 4 }}
|
||||
annotations:
|
||||
{{- if .Values.webhook.cert.certManager.enabled }}
|
||||
cert-manager.io/inject-ca-from: {{ .Release.Namespace }}/{{ include "mariadb-operator.fullname" . }}-webhook-cert
|
||||
{{- else }}
|
||||
k8s.mariadb.com/webhook: ""
|
||||
{{- end }}
|
||||
{{- with .Values.webhook.annotations }}
|
||||
{{ toYaml . | indent 4 }}
|
||||
{{- end }}
|
||||
webhooks:
|
||||
- admissionReviewVersions:
|
||||
- v1
|
||||
clientConfig:
|
||||
service:
|
||||
name: {{ $fullName }}-webhook
|
||||
namespace: {{ .Release.Namespace }}
|
||||
path: /mutate-k8s-mariadb-com-v1alpha1-mariadb
|
||||
failurePolicy: Fail
|
||||
name: mmariadb-v1alpha1.kb.io
|
||||
rules:
|
||||
- apiGroups:
|
||||
- k8s.mariadb.com
|
||||
apiVersions:
|
||||
- v1alpha1
|
||||
operations:
|
||||
- CREATE
|
||||
- UPDATE
|
||||
resources:
|
||||
- mariadbs
|
||||
sideEffects: None
|
||||
---
|
||||
apiVersion: admissionregistration.k8s.io/v1
|
||||
kind: ValidatingWebhookConfiguration
|
||||
@@ -73,6 +37,26 @@ webhooks:
|
||||
resources:
|
||||
- backups
|
||||
sideEffects: None
|
||||
- admissionReviewVersions:
|
||||
- v1
|
||||
clientConfig:
|
||||
service:
|
||||
name: {{ $fullName }}-webhook
|
||||
namespace: {{ .Release.Namespace }}
|
||||
path: /validate-k8s-mariadb-com-v1alpha1-physicalbackup
|
||||
failurePolicy: Fail
|
||||
name: vphysicalbackup-v1alpha1.kb.io
|
||||
rules:
|
||||
- apiGroups:
|
||||
- k8s.mariadb.com
|
||||
apiVersions:
|
||||
- v1alpha1
|
||||
operations:
|
||||
- CREATE
|
||||
- UPDATE
|
||||
resources:
|
||||
- physicalbackups
|
||||
sideEffects: None
|
||||
- admissionReviewVersions:
|
||||
- v1
|
||||
clientConfig:
|
||||
@@ -233,4 +217,4 @@ webhooks:
|
||||
resources:
|
||||
- users
|
||||
sideEffects: None
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
nameOverride: ""
|
||||
fullnameOverride: ""
|
||||
# --- CRDs
|
||||
# -- CRDs
|
||||
crds:
|
||||
# -- Whether the helm chart should create and update the CRDs. It is false by default, which implies that the CRDs must be
|
||||
# managed independently with the mariadb-operator-crds helm chart.
|
||||
@@ -310,9 +310,11 @@ config:
|
||||
# -- Galera library path to be used with MariaDB Galera
|
||||
galeraLibPath: /usr/lib/galera/libgalera_smm.so
|
||||
# -- Default MariaDB version to be used when unable to infer it via image tag
|
||||
mariadbDefaultVersion: "11.4"
|
||||
mariadbDefaultVersion: "11.8"
|
||||
# -- Default MariaDB image
|
||||
mariadbImage: docker-registry1.mariadb.com/library/mariadb:11.4.5
|
||||
mariadbImage: docker-registry1.mariadb.com/library/mariadb:11.8.2
|
||||
# -- Default MariaDB image name
|
||||
mariadbImageName: docker-registry1.mariadb.com/library/mariadb
|
||||
# -- Default MaxScale image
|
||||
maxscaleImage: docker-registry2.mariadb.com/mariadb/maxscale:23.08.5
|
||||
# -- Default MariaDB exporter image
|
||||
|
||||
@@ -4,8 +4,8 @@ metallb:
|
||||
controller:
|
||||
image:
|
||||
repository: ghcr.io/cozystack/cozystack/metallb-controller
|
||||
tag: v0.15.2@sha256:0e9080234fc8eedab78ad2831fb38df375c383e901a752d72b353c8d13b9605f
|
||||
tag: v0.15.2@sha256:623ce74b5802bff6e29f29478ccab29ce4162a64148be006c69e16cc3207e289
|
||||
speaker:
|
||||
image:
|
||||
repository: ghcr.io/cozystack/cozystack/metallb-speaker
|
||||
tag: v0.15.2@sha256:e14d4c328c3ab91a6eadfeea90da96388503492d165e7e8582f291b1872e53b2
|
||||
tag: v0.15.2@sha256:f264058afd9228452a260ab9c9dd1859404745627a2a38c2ba4671e27f3b3bb2
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: coredns
|
||||
name: coredns-metrics
|
||||
namespace: kube-system
|
||||
labels:
|
||||
app: coredns
|
||||
@@ -19,7 +19,7 @@ spec:
|
||||
apiVersion: operator.victoriametrics.com/v1beta1
|
||||
kind: VMServiceScrape
|
||||
metadata:
|
||||
name: coredns
|
||||
name: coredns-metrics
|
||||
namespace: cozy-monitoring
|
||||
spec:
|
||||
selector:
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user