mirror of
https://github.com/outbackdingo/cozystack.git
synced 2026-02-01 20:08:22 +00:00
Compare commits
40 Commits
kubernetes
...
release-0.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bf04ebad33 | ||
|
|
7eae8cc0df | ||
|
|
4bbae53cda | ||
|
|
1f6f00892d | ||
|
|
bd793dd57e | ||
|
|
b56ac2a4ab | ||
|
|
69c3bff41d | ||
|
|
34991d2cdb | ||
|
|
32c12ae8f7 | ||
|
|
75f9aacecc | ||
|
|
630bd55b1a | ||
|
|
7627b1e47e | ||
|
|
d70cdfd854 | ||
|
|
dfe5b937ac | ||
|
|
cde49eb055 | ||
|
|
77648f1716 | ||
|
|
a9cbed9617 | ||
|
|
05729ebb07 | ||
|
|
baf1bd9bfe | ||
|
|
6f3aa9abbe | ||
|
|
b70df68a5d | ||
|
|
9257dfe230 | ||
|
|
4a72cc4fa6 | ||
|
|
9ca2595bab | ||
|
|
2ba6059dbe | ||
|
|
6f5e307415 | ||
|
|
6c8d1138cd | ||
|
|
2c4bd23f9f | ||
|
|
3445e2d23f | ||
|
|
abddefb1b0 | ||
|
|
f78aefda8f | ||
|
|
ad3684508f | ||
|
|
7ca8ff0e69 | ||
|
|
721c12a758 | ||
|
|
9f63cbbb5a | ||
|
|
e8e911fea1 | ||
|
|
2b23300f25 | ||
|
|
53c5c8223c | ||
|
|
96ea3a5d1f | ||
|
|
159b87d593 |
2
.github/CODEOWNERS
vendored
2
.github/CODEOWNERS
vendored
@@ -1 +1 @@
|
||||
* @kvaps @lllamnyp @klinch0
|
||||
* @kvaps @lllamnyp
|
||||
|
||||
49
.github/workflows/backport.yaml
vendored
Normal file
49
.github/workflows/backport.yaml
vendored
Normal file
@@ -0,0 +1,49 @@
|
||||
name: Automatic Backport
|
||||
|
||||
on:
|
||||
pull_request_target:
|
||||
types: [closed] # fires when PR is closed (merged)
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
pull-requests: write
|
||||
|
||||
jobs:
|
||||
backport:
|
||||
if: |
|
||||
github.event.pull_request.merged == true &&
|
||||
contains(github.event.pull_request.labels.*.name, 'backport')
|
||||
runs-on: [self-hosted]
|
||||
|
||||
steps:
|
||||
# 1. Decide which maintenance branch should receive the back‑port
|
||||
- name: Determine target maintenance branch
|
||||
id: target
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
script: |
|
||||
let rel;
|
||||
try {
|
||||
rel = await github.rest.repos.getLatestRelease({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo
|
||||
});
|
||||
} catch (e) {
|
||||
core.setFailed('No existing releases found; cannot determine backport target.');
|
||||
return;
|
||||
}
|
||||
const [maj, min] = rel.data.tag_name.replace(/^v/, '').split('.');
|
||||
const branch = `release-${maj}.${min}`;
|
||||
core.setOutput('branch', branch);
|
||||
console.log(`Latest release ${rel.data.tag_name}; backporting to ${branch}`);
|
||||
# 2. Checkout (required by backport‑action)
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
# 3. Create the back‑port pull request
|
||||
- name: Create back‑port PR
|
||||
uses: korthout/backport-action@v3
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
label_pattern: '' # don't read labels for targets
|
||||
target_branches: ${{ steps.target.outputs.branch }}
|
||||
100
.github/workflows/pull-requests-release.yaml
vendored
100
.github/workflows/pull-requests-release.yaml
vendored
@@ -39,38 +39,82 @@ jobs:
|
||||
runs-on: [self-hosted]
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
|
||||
if: |
|
||||
github.event.pull_request.merged == true &&
|
||||
contains(github.event.pull_request.labels.*.name, 'release')
|
||||
|
||||
|
||||
steps:
|
||||
# Extract tag from branch name (branch = release-X.Y.Z*)
|
||||
- name: Extract tag from branch name
|
||||
id: get_tag
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
script: |
|
||||
const branch = context.payload.pull_request.head.ref;
|
||||
const match = branch.match(/^release-(\d+\.\d+\.\d+(?:[-\w\.]+)?)$/);
|
||||
|
||||
if (!match) {
|
||||
core.setFailed(`Branch '${branch}' does not match expected format 'release-X.Y.Z[-suffix]'`);
|
||||
} else {
|
||||
const tag = `v${match[1]}`;
|
||||
core.setOutput('tag', tag);
|
||||
console.log(`✅ Extracted tag: ${tag}`);
|
||||
const m = branch.match(/^release-(\d+\.\d+\.\d+(?:[-\w\.]+)?)$/);
|
||||
if (!m) {
|
||||
core.setFailed(`Branch '${branch}' does not match 'release-X.Y.Z[-suffix]'`);
|
||||
return;
|
||||
}
|
||||
|
||||
const tag = `v${m[1]}`;
|
||||
core.setOutput('tag', tag);
|
||||
console.log(`✅ Tag to publish: ${tag}`);
|
||||
|
||||
# Checkout repo & create / push annotated tag
|
||||
- name: Checkout repo
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Create tag on merged commit
|
||||
|
||||
- name: Create tag on merge commit
|
||||
run: |
|
||||
git tag ${{ steps.get_tag.outputs.tag }} ${{ github.sha }} --force
|
||||
git push origin ${{ steps.get_tag.outputs.tag }} --force
|
||||
|
||||
git tag -f ${{ steps.get_tag.outputs.tag }} ${{ github.sha }}
|
||||
git push -f origin ${{ steps.get_tag.outputs.tag }}
|
||||
|
||||
# Get the latest published release
|
||||
- name: Get the latest published release
|
||||
id: latest_release
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
script: |
|
||||
try {
|
||||
const rel = await github.rest.repos.getLatestRelease({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo
|
||||
});
|
||||
core.setOutput('tag', rel.data.tag_name);
|
||||
} catch (_) {
|
||||
core.setOutput('tag', '');
|
||||
}
|
||||
|
||||
# Compare current tag vs latest using semver-utils
|
||||
- name: Semver compare
|
||||
id: semver
|
||||
uses: madhead/semver-utils@v4.3.0
|
||||
with:
|
||||
version: ${{ steps.get_tag.outputs.tag }}
|
||||
compare-to: ${{ steps.latest_release.outputs.tag }}
|
||||
|
||||
# Derive flags: prerelease? make_latest?
|
||||
- name: Calculate publish flags
|
||||
id: flags
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
script: |
|
||||
const tag = '${{ steps.get_tag.outputs.tag }}'; // v0.31.5-rc1
|
||||
const m = tag.match(/^v(\d+\.\d+\.\d+)(-rc\d+)?$/);
|
||||
if (!m) {
|
||||
core.setFailed(`❌ tag '${tag}' must match 'vX.Y.Z' or 'vX.Y.Z-rcN'`);
|
||||
return;
|
||||
}
|
||||
const version = m[1] + (m[2] ?? ''); // 0.31.5‑rc1
|
||||
const isRc = Boolean(m[2]);
|
||||
core.setOutput('is_rc', isRc);
|
||||
const outdated = '${{ steps.semver.outputs.comparison-result }}' === '<';
|
||||
core.setOutput('make_latest', isRc || outdated ? 'false' : 'legacy');
|
||||
|
||||
# Publish draft release with correct flags
|
||||
- name: Publish draft release
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
@@ -78,19 +122,17 @@ jobs:
|
||||
const tag = '${{ steps.get_tag.outputs.tag }}';
|
||||
const releases = await github.rest.repos.listReleases({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo
|
||||
repo: context.repo.repo
|
||||
});
|
||||
|
||||
const release = releases.data.find(r => r.tag_name === tag && r.draft);
|
||||
if (!release) {
|
||||
throw new Error(`Draft release with tag ${tag} not found`);
|
||||
}
|
||||
|
||||
const draft = releases.data.find(r => r.tag_name === tag && r.draft);
|
||||
if (!draft) throw new Error(`Draft release for ${tag} not found`);
|
||||
await github.rest.repos.updateRelease({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
release_id: release.id,
|
||||
draft: false
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
release_id: draft.id,
|
||||
draft: false,
|
||||
prerelease: ${{ steps.flags.outputs.is_rc }},
|
||||
make_latest: '${{ steps.flags.outputs.make_latest }}'
|
||||
});
|
||||
|
||||
console.log(`✅ Published release for ${tag}`);
|
||||
|
||||
console.log(`🚀 Published release for ${tag}`);
|
||||
|
||||
25
.github/workflows/pull-requests.yaml
vendored
25
.github/workflows/pull-requests.yaml
vendored
@@ -12,9 +12,20 @@ jobs:
|
||||
contents: read
|
||||
packages: write
|
||||
|
||||
# ─────────────────────────────────────────────────────────────
|
||||
# Run automatically for internal PRs (same repo).
|
||||
# For external PRs (forks) require the "ok‑to‑test" label.
|
||||
# Never run when the PR carries the "release" label.
|
||||
# ─────────────────────────────────────────────────────────────
|
||||
if: |
|
||||
contains(github.event.pull_request.labels.*.name, 'ok-to-test') &&
|
||||
!contains(github.event.pull_request.labels.*.name, 'release')
|
||||
!contains(github.event.pull_request.labels.*.name, 'release') &&
|
||||
(
|
||||
github.event.pull_request.head.repo.full_name == github.repository ||
|
||||
(
|
||||
github.event.pull_request.head.repo.full_name != github.repository &&
|
||||
contains(github.event.pull_request.labels.*.name, 'ok-to-test')
|
||||
)
|
||||
)
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
@@ -30,10 +41,8 @@ jobs:
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
registry: ghcr.io
|
||||
|
||||
- name: make build
|
||||
run: |
|
||||
make build
|
||||
- name: Build
|
||||
run: make build
|
||||
|
||||
- name: make test
|
||||
run: |
|
||||
make test
|
||||
- name: Test
|
||||
run: make test
|
||||
|
||||
248
.github/workflows/tags.yaml
vendored
248
.github/workflows/tags.yaml
vendored
@@ -1,10 +1,9 @@
|
||||
name: Versioned Tag
|
||||
|
||||
on:
|
||||
# Trigger on push if it includes a tag like vX.Y.Z
|
||||
push:
|
||||
tags:
|
||||
- 'v*.*.*'
|
||||
- 'v*.*.*' # vX.Y.Z or vX.Y.Z-rcN
|
||||
|
||||
jobs:
|
||||
prepare-release:
|
||||
@@ -16,7 +15,7 @@ jobs:
|
||||
pull-requests: write
|
||||
|
||||
steps:
|
||||
# 1) Check if a non-draft release with this tag already exists
|
||||
# Check if a non-draft release with this tag already exists
|
||||
- name: Check if release already exists
|
||||
id: check_release
|
||||
uses: actions/github-script@v7
|
||||
@@ -25,57 +24,67 @@ jobs:
|
||||
const tag = context.ref.replace('refs/tags/', '');
|
||||
const releases = await github.rest.repos.listReleases({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo
|
||||
repo: context.repo.repo
|
||||
});
|
||||
const existing = releases.data.find(r => r.tag_name === tag && !r.draft);
|
||||
if (existing) {
|
||||
core.setOutput('skip', 'true');
|
||||
} else {
|
||||
core.setOutput('skip', 'false');
|
||||
}
|
||||
const exists = releases.data.some(r => r.tag_name === tag && !r.draft);
|
||||
core.setOutput('skip', exists);
|
||||
console.log(exists ? `Release ${tag} already published` : `No published release ${tag}`);
|
||||
|
||||
# If a published release already exists, skip the rest of the workflow
|
||||
- name: Skip if release already exists
|
||||
if: steps.check_release.outputs.skip == 'true'
|
||||
run: echo "Release already exists, skipping workflow."
|
||||
|
||||
# 2) Determine the base branch from which the tag was pushed
|
||||
# Parse tag meta‑data (rc?, maintenance line, etc.)
|
||||
- name: Parse tag
|
||||
if: steps.check_release.outputs.skip == 'false'
|
||||
id: tag
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
script: |
|
||||
const ref = context.ref.replace('refs/tags/', ''); // e.g. v0.31.5-rc1
|
||||
const m = ref.match(/^v(\d+\.\d+\.\d+)(-rc\d+)?$/);
|
||||
if (!m) {
|
||||
core.setFailed(`❌ tag '${ref}' must match 'vX.Y.Z' or 'vX.Y.Z-rcN'`);
|
||||
return;
|
||||
}
|
||||
const version = m[1] + (m[2] ?? ''); // 0.31.5‑rc1
|
||||
const isRc = Boolean(m[2]);
|
||||
const [maj, min] = m[1].split('.');
|
||||
core.setOutput('tag', ref);
|
||||
core.setOutput('version', version);
|
||||
core.setOutput('is_rc', isRc);
|
||||
core.setOutput('line', `${maj}.${min}`); // 0.31
|
||||
|
||||
# Detect base branch (main or release‑X.Y) the tag was pushed from
|
||||
- name: Get base branch
|
||||
if: steps.check_release.outputs.skip == 'false'
|
||||
id: get_base
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
script: |
|
||||
/*
|
||||
For a push event with a tag, GitHub sets context.payload.base_ref
|
||||
if the tag was pushed from a branch.
|
||||
If it's empty, we can't determine the correct base branch and must fail.
|
||||
*/
|
||||
const baseRef = context.payload.base_ref;
|
||||
if (!baseRef) {
|
||||
core.setFailed(`❌ base_ref is empty. Make sure you push the tag from a branch (e.g. 'git push origin HEAD:refs/tags/vX.Y.Z').`);
|
||||
core.setFailed(`❌ base_ref is empty. Push the tag via 'git push origin HEAD:refs/tags/<tag>'.`);
|
||||
return;
|
||||
}
|
||||
|
||||
const shortBranch = baseRef.replace("refs/heads/", "");
|
||||
const releasePattern = /^release-\d+\.\d+$/;
|
||||
if (shortBranch !== "main" && !releasePattern.test(shortBranch)) {
|
||||
core.setFailed(`❌ Tagged commit must belong to branch 'main' or 'release-X.Y'. Got '${shortBranch}'`);
|
||||
const branch = baseRef.replace('refs/heads/', '');
|
||||
const ok = branch === 'main' || /^release-\d+\.\d+$/.test(branch);
|
||||
if (!ok) {
|
||||
core.setFailed(`❌ Tagged commit must belong to 'main' or 'release-X.Y'. Got '${branch}'`);
|
||||
return;
|
||||
}
|
||||
core.setOutput('branch', branch);
|
||||
|
||||
core.setOutput('branch', shortBranch);
|
||||
|
||||
# 3) Checkout full git history and tags
|
||||
# Checkout & login once
|
||||
- name: Checkout code
|
||||
if: steps.check_release.outputs.skip == 'false'
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
fetch-tags: true
|
||||
fetch-tags: true
|
||||
|
||||
# 4) Login to GitHub Container Registry
|
||||
- name: Login to GitHub Container Registry
|
||||
- name: Login to GHCR
|
||||
if: steps.check_release.outputs.skip == 'false'
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
@@ -83,113 +92,160 @@ jobs:
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
registry: ghcr.io
|
||||
|
||||
# 5) Build project artifacts
|
||||
# Build project artifacts
|
||||
- name: Build
|
||||
if: steps.check_release.outputs.skip == 'false'
|
||||
run: make build
|
||||
|
||||
# 6) Optionally commit built artifacts to the repository
|
||||
# Commit built artifacts
|
||||
- name: Commit release artifacts
|
||||
if: steps.check_release.outputs.skip == 'false'
|
||||
env:
|
||||
GIT_AUTHOR_NAME: ${{ github.actor }}
|
||||
GIT_AUTHOR_EMAIL: ${{ github.actor }}@users.noreply.github.com
|
||||
run: |
|
||||
git config user.name "github-actions"
|
||||
git config user.name "github-actions"
|
||||
git config user.email "github-actions@github.com"
|
||||
git add .
|
||||
git commit -m "Prepare release ${GITHUB_REF#refs/tags/}" -s || echo "No changes to commit"
|
||||
git push origin HEAD || true
|
||||
|
||||
# 7) Create a release branch like release-X.Y.Z
|
||||
# Get `latest_version` from latest published release
|
||||
- name: Get latest published release
|
||||
if: steps.check_release.outputs.skip == 'false'
|
||||
id: latest_release
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
script: |
|
||||
try {
|
||||
const rel = await github.rest.repos.getLatestRelease({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo
|
||||
});
|
||||
core.setOutput('tag', rel.data.tag_name);
|
||||
} catch (_) {
|
||||
core.setOutput('tag', '');
|
||||
}
|
||||
|
||||
# Compare tag (A) with latest (B)
|
||||
- name: Semver compare
|
||||
if: steps.check_release.outputs.skip == 'false'
|
||||
id: semver
|
||||
uses: madhead/semver-utils@v4.3.0
|
||||
with:
|
||||
version: ${{ steps.tag.outputs.tag }} # A
|
||||
compare-to: ${{ steps.latest_release.outputs.tag }} # B
|
||||
|
||||
# Create or reuse DRAFT GitHub Release
|
||||
- name: Create / reuse draft release
|
||||
if: steps.check_release.outputs.skip == 'false'
|
||||
id: release
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
script: |
|
||||
const tag = '${{ steps.tag.outputs.tag }}';
|
||||
const isRc = ${{ steps.tag.outputs.is_rc }};
|
||||
const outdated = '${{ steps.semver.outputs.comparison-result }}' === '<';
|
||||
const makeLatest = outdated ? false : 'legacy';
|
||||
const releases = await github.rest.repos.listReleases({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo
|
||||
});
|
||||
let rel = releases.data.find(r => r.tag_name === tag);
|
||||
if (!rel) {
|
||||
rel = await github.rest.repos.createRelease({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
tag_name: tag,
|
||||
name: tag,
|
||||
draft: true,
|
||||
prerelease: isRc,
|
||||
make_latest: makeLatest
|
||||
});
|
||||
console.log(`Draft release created for ${tag}`);
|
||||
} else {
|
||||
console.log(`Re‑using existing release ${tag}`);
|
||||
}
|
||||
core.setOutput('upload_url', rel.upload_url);
|
||||
|
||||
# Build + upload assets (optional)
|
||||
- name: Build & upload assets
|
||||
if: steps.check_release.outputs.skip == 'false'
|
||||
run: |
|
||||
make assets
|
||||
make upload_assets VERSION=${{ steps.tag.outputs.tag }}
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
# Ensure long‑lived maintenance branch release‑X.Y
|
||||
- name: Ensure maintenance branch release‑${{ steps.tag.outputs.line }}
|
||||
if: |
|
||||
steps.check_release.outputs.skip == 'false' &&
|
||||
steps.get_base.outputs.branch == 'main'
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
script: |
|
||||
const branch = `release-${'${{ steps.tag.outputs.line }}'}`;
|
||||
try {
|
||||
await github.rest.repos.getBranch({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
branch
|
||||
});
|
||||
console.log(`Branch '${branch}' already exists`);
|
||||
} catch (_) {
|
||||
await github.git.createRef({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
ref: `refs/heads/${branch}`,
|
||||
sha: context.sha
|
||||
});
|
||||
console.log(`Branch '${branch}' created at ${context.sha}`);
|
||||
}
|
||||
|
||||
# Create release‑X.Y.Z branch and push (force‑update)
|
||||
- name: Create release branch
|
||||
if: steps.check_release.outputs.skip == 'false'
|
||||
run: |
|
||||
BRANCH_NAME="release-${GITHUB_REF#refs/tags/v}"
|
||||
git branch -f "$BRANCH_NAME"
|
||||
git push origin "$BRANCH_NAME" --force
|
||||
BRANCH="release-${GITHUB_REF#refs/tags/v}"
|
||||
git branch -f "$BRANCH"
|
||||
git push -f origin "$BRANCH"
|
||||
|
||||
# 8) Create a pull request from release-X.Y.Z to the original base branch
|
||||
# Create pull request into original base branch (if absent)
|
||||
- name: Create pull request if not exists
|
||||
if: steps.check_release.outputs.skip == 'false'
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
script: |
|
||||
const version = context.ref.replace('refs/tags/v', '');
|
||||
const base = '${{ steps.get_base.outputs.branch }}';
|
||||
const head = `release-${version}`;
|
||||
const base = '${{ steps.get_base.outputs.branch }}';
|
||||
const head = `release-${version}`;
|
||||
|
||||
const prs = await github.rest.pulls.list({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
head: `${context.repo.owner}:${head}`,
|
||||
repo: context.repo.repo,
|
||||
head: `${context.repo.owner}:${head}`,
|
||||
base
|
||||
});
|
||||
|
||||
if (prs.data.length === 0) {
|
||||
const newPr = await github.rest.pulls.create({
|
||||
const pr = await github.rest.pulls.create({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
repo: context.repo.repo,
|
||||
head,
|
||||
base,
|
||||
title: `Release v${version}`,
|
||||
body:
|
||||
`This PR prepares the release \`v${version}\`.\n` +
|
||||
`(Please merge it before releasing draft)`,
|
||||
body: `This PR prepares the release \`v${version}\`.`,
|
||||
draft: false
|
||||
});
|
||||
|
||||
console.log(`Created pull request #${newPr.data.number} from ${head} to ${base}`);
|
||||
await github.rest.issues.addLabels({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
issue_number: newPr.data.number,
|
||||
repo: context.repo.repo,
|
||||
issue_number: pr.data.number,
|
||||
labels: ['release']
|
||||
});
|
||||
console.log(`Created PR #${pr.data.number}`);
|
||||
} else {
|
||||
console.log(`Pull request already exists from ${head} to ${base}`);
|
||||
console.log(`PR already exists from ${head} to ${base}`);
|
||||
}
|
||||
|
||||
# 9) Create or reuse an existing draft GitHub release for this tag
|
||||
- name: Create or reuse draft release
|
||||
if: steps.check_release.outputs.skip == 'false'
|
||||
id: create_release
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
script: |
|
||||
const tag = context.ref.replace('refs/tags/', '');
|
||||
const releases = await github.rest.repos.listReleases({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo
|
||||
});
|
||||
|
||||
let release = releases.data.find(r => r.tag_name === tag);
|
||||
if (!release) {
|
||||
release = await github.rest.repos.createRelease({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
tag_name: tag,
|
||||
name: `${tag}`,
|
||||
draft: true,
|
||||
prerelease: false
|
||||
});
|
||||
}
|
||||
core.setOutput('upload_url', release.upload_url);
|
||||
|
||||
# 10) Build additional assets for the release (if needed)
|
||||
- name: Build assets
|
||||
if: steps.check_release.outputs.skip == 'false'
|
||||
run: make assets
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
# 11) Upload assets to the draft release
|
||||
- name: Upload assets
|
||||
if: steps.check_release.outputs.skip == 'false'
|
||||
run: make upload_assets VERSION=${GITHUB_REF#refs/tags/}
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
# 12) Run tests
|
||||
- name: Run tests
|
||||
# Run tests
|
||||
- name: Test
|
||||
if: steps.check_release.outputs.skip == 'false'
|
||||
run: make test
|
||||
|
||||
1
Makefile
1
Makefile
@@ -20,6 +20,7 @@ build: build-deps
|
||||
make -C packages/system/kubeovn image
|
||||
make -C packages/system/kubeovn-webhook image
|
||||
make -C packages/system/dashboard image
|
||||
make -C packages/system/metallb image
|
||||
make -C packages/system/kamaji image
|
||||
make -C packages/system/bucket image
|
||||
make -C packages/core/testing image
|
||||
|
||||
139
docs/release.md
139
docs/release.md
@@ -1,139 +0,0 @@
|
||||
# Release Workflow
|
||||
|
||||
This section explains how Cozystack builds and releases are made.
|
||||
|
||||
## Regular Releases
|
||||
|
||||
When making regular releases, we take a commit in `main` and decide to make it a release `x.y.0`.
|
||||
In this explanation, we'll use version `v0.42.0` as an example:
|
||||
|
||||
```mermaid
|
||||
gitGraph
|
||||
commit id: "feature"
|
||||
commit id: "feature 2"
|
||||
commit id: "feature 3" tag: "v0.42.0"
|
||||
```
|
||||
|
||||
A regular release sequence starts in the following way:
|
||||
|
||||
1. Maintainer tags a commit in `main` with `v0.42.0` and pushes it to GitHub.
|
||||
2. CI workflow triggers on tag push:
|
||||
1. Creates a draft page for release `v0.42.0`, if it wasn't created before.
|
||||
2. Takes code from tag `v0.42.0`, builds images, and pushes them to ghcr.io.
|
||||
3. Makes a new commit `Prepare release v0.42.0` with updated digests, pushes it to the new branch `release-0.42.0`, and opens a PR to `main`.
|
||||
4. Builds Cozystack release assets from the new commit `Prepare release v0.42.0` and uploads them to the release draft page.
|
||||
3. Maintainer reviews PR, tests build artifacts, and edits changelogs on the release draft page.
|
||||
|
||||
```mermaid
|
||||
gitGraph
|
||||
commit id: "feature"
|
||||
commit id: "feature 2"
|
||||
commit id: "feature 3" tag: "v0.42.0"
|
||||
branch release-0.42.0
|
||||
checkout release-0.42.0
|
||||
commit id: "Prepare release v0.42.0"
|
||||
checkout main
|
||||
merge release-0.42.0 id: "Pull Request"
|
||||
```
|
||||
|
||||
When testing and editing are completed, the sequence goes on.
|
||||
|
||||
4. Maintainer merges the PR. GitHub removes the merged branch `release-0.42.0`.
|
||||
5. CI workflow triggers on merge:
|
||||
1. Moves the tag `v0.42.0` to the newly created merge commit by force-pushing a tag to GitHub.
|
||||
2. Publishes the release page (`draft` → `latest`).
|
||||
6. The maintainer can now announce the release to the community.
|
||||
|
||||
```mermaid
|
||||
gitGraph
|
||||
commit id: "feature"
|
||||
commit id: "feature 2"
|
||||
commit id: "feature 3"
|
||||
branch release-0.42.0
|
||||
checkout release-0.42.0
|
||||
commit id: "Prepare release v0.42.0"
|
||||
checkout main
|
||||
merge release-0.42.0 id: "Release v0.42.0" tag: "v0.42.0"
|
||||
```
|
||||
|
||||
## Patch Releases
|
||||
|
||||
Making a patch release has a lot in common with a regular release, with a couple of differences:
|
||||
|
||||
* A release branch is used instead of `main`
|
||||
* Patch commits are cherry-picked to the release branch.
|
||||
* A pull request is opened against the release branch.
|
||||
|
||||
|
||||
Let's assume that we've released `v0.42.0` and that development is ongoing.
|
||||
We have introduced a couple of new features and some fixes to features that we have released
|
||||
in `v0.42.0`.
|
||||
|
||||
Once problems were found and fixed, a patch release is due.
|
||||
|
||||
```mermaid
|
||||
gitGraph
|
||||
commit id: "Release v0.42.0" tag: "v0.42.0"
|
||||
checkout main
|
||||
commit id: "feature 4"
|
||||
commit id: "patch 1"
|
||||
commit id: "feature 5"
|
||||
commit id: "patch 2"
|
||||
```
|
||||
|
||||
|
||||
1. The maintainer creates a release branch, `release-0.42,` and cherry-picks patch commits from `main` to `release-0.42`.
|
||||
These must be only patches to features that were present in version `v0.42.0`.
|
||||
|
||||
Cherry-picking can be done as soon as each patch is merged into `main`,
|
||||
or directly before the release.
|
||||
|
||||
```mermaid
|
||||
gitGraph
|
||||
commit id: "Release v0.42.0" tag: "v0.42.0"
|
||||
branch release-0.42
|
||||
checkout main
|
||||
commit id: "feature 4"
|
||||
commit id: "patch 1"
|
||||
commit id: "feature 5"
|
||||
commit id: "patch 2"
|
||||
checkout release-0.42
|
||||
cherry-pick id: "patch 1"
|
||||
cherry-pick id: "patch 2"
|
||||
```
|
||||
|
||||
When all relevant patch commits are cherry-picked, the branch is ready for release.
|
||||
|
||||
2. The maintainer tags the `HEAD` commit of branch `release-0.42` as `v0.42.1` and then pushes it to GitHub.
|
||||
3. CI workflow triggers on tag push:
|
||||
1. Creates a draft page for release `v0.42.1`, if it wasn't created before.
|
||||
2. Takes code from tag `v0.42.1`, builds images, and pushes them to ghcr.io.
|
||||
3. Makes a new commit `Prepare release v0.42.1` with updated digests, pushes it to the new branch `release-0.42.1`, and opens a PR to `release-0.42`.
|
||||
4. Builds Cozystack release assets from the new commit `Prepare release v0.42.1` and uploads them to the release draft page.
|
||||
4. Maintainer reviews PR, tests build artifacts, and edits changelogs on the release draft page.
|
||||
|
||||
```mermaid
|
||||
gitGraph
|
||||
commit id: "Release v0.42.0" tag: "v0.42.0"
|
||||
branch release-0.42
|
||||
checkout main
|
||||
commit id: "feature 4"
|
||||
commit id: "patch 1"
|
||||
commit id: "feature 5"
|
||||
commit id: "patch 2"
|
||||
checkout release-0.42
|
||||
cherry-pick id: "patch 1"
|
||||
cherry-pick id: "patch 2" tag: "v0.42.1"
|
||||
branch release-0.42.1
|
||||
commit id: "Prepare release v0.42.1"
|
||||
checkout release-0.42
|
||||
merge release-0.42.1 id: "Pull request"
|
||||
```
|
||||
|
||||
Finally, when release is confirmed, the release sequence goes on.
|
||||
|
||||
5. Maintainer merges the PR. GitHub removes the merged branch `release-0.42.1`.
|
||||
6. CI workflow triggers on merge:
|
||||
1. Moves the tag `v0.42.1` to the newly created merge commit by force-pushing a tag to GitHub.
|
||||
2. Publishes the release page (`draft` → `latest`).
|
||||
7. The maintainer can now announce the release to the community.
|
||||
@@ -60,7 +60,7 @@ done
|
||||
|
||||
# Prepare system drive
|
||||
if [ ! -f nocloud-amd64.raw ]; then
|
||||
wget https://github.com/cozystack/cozystack/releases/latest/download/nocloud-amd64.raw.xz -O nocloud-amd64.raw.xz
|
||||
wget https://github.com/cozystack/cozystack/releases/latest/download/nocloud-amd64.raw.xz -O nocloud-amd64.raw.xz --show-progress --output-file /dev/stdout --progress=dot:giga 2>/dev/null
|
||||
rm -f nocloud-amd64.raw
|
||||
xz --decompress nocloud-amd64.raw.xz
|
||||
fi
|
||||
@@ -234,8 +234,8 @@ sleep 5
|
||||
kubectl get hr -A | awk 'NR>1 {print "kubectl wait --timeout=15m --for=condition=ready -n " $1 " hr/" $2 " &"} END{print "wait"}' | sh -x
|
||||
|
||||
# Wait for Cluster-API providers
|
||||
timeout 30 sh -c 'until kubectl get deploy -n cozy-cluster-api capi-controller-manager capi-kamaji-controller-manager capi-kubeadm-bootstrap-controller-manager capi-operator-cluster-api-operator capk-controller-manager; do sleep 1; done'
|
||||
kubectl wait deploy --timeout=30s --for=condition=available -n cozy-cluster-api capi-controller-manager capi-kamaji-controller-manager capi-kubeadm-bootstrap-controller-manager capi-operator-cluster-api-operator capk-controller-manager
|
||||
timeout 60 sh -c 'until kubectl get deploy -n cozy-cluster-api capi-controller-manager capi-kamaji-controller-manager capi-kubeadm-bootstrap-controller-manager capi-operator-cluster-api-operator capk-controller-manager; do sleep 1; done'
|
||||
kubectl wait deploy --timeout=1m --for=condition=available -n cozy-cluster-api capi-controller-manager capi-kamaji-controller-manager capi-kubeadm-bootstrap-controller-manager capi-operator-cluster-api-operator capk-controller-manager
|
||||
|
||||
# Wait for linstor controller
|
||||
kubectl wait deploy --timeout=5m --for=condition=available -n cozy-linstor linstor-controller
|
||||
@@ -357,5 +357,5 @@ kubectl patch -n cozy-system cm/cozystack --type=merge -p '{"data":{
|
||||
"oidc-enabled": "true"
|
||||
}}'
|
||||
|
||||
timeout 60 sh -c 'until kubectl get hr -n cozy-keycloak keycloak keycloak-configure keycloak-operator; do sleep 1; done'
|
||||
timeout 120 sh -c 'until kubectl get hr -n cozy-keycloak keycloak keycloak-configure keycloak-operator; do sleep 1; done'
|
||||
kubectl wait --timeout=10m --for=condition=ready -n cozy-keycloak hr keycloak keycloak-configure keycloak-operator
|
||||
|
||||
@@ -39,6 +39,15 @@ func (r *WorkloadReconciler) Reconcile(ctx context.Context, req ctrl.Request) (c
|
||||
}
|
||||
|
||||
t := getMonitoredObject(w)
|
||||
|
||||
if t == nil {
|
||||
err = r.Delete(ctx, w)
|
||||
if err != nil {
|
||||
logger.Error(err, "failed to delete workload")
|
||||
}
|
||||
return ctrl.Result{}, err
|
||||
}
|
||||
|
||||
err = r.Get(ctx, types.NamespacedName{Name: t.GetName(), Namespace: t.GetNamespace()}, t)
|
||||
|
||||
// found object, nothing to do
|
||||
@@ -68,20 +77,23 @@ func (r *WorkloadReconciler) SetupWithManager(mgr ctrl.Manager) error {
|
||||
}
|
||||
|
||||
func getMonitoredObject(w *cozyv1alpha1.Workload) client.Object {
|
||||
if strings.HasPrefix(w.Name, "pvc-") {
|
||||
switch {
|
||||
case strings.HasPrefix(w.Name, "pvc-"):
|
||||
obj := &corev1.PersistentVolumeClaim{}
|
||||
obj.Name = strings.TrimPrefix(w.Name, "pvc-")
|
||||
obj.Namespace = w.Namespace
|
||||
return obj
|
||||
}
|
||||
if strings.HasPrefix(w.Name, "svc-") {
|
||||
case strings.HasPrefix(w.Name, "svc-"):
|
||||
obj := &corev1.Service{}
|
||||
obj.Name = strings.TrimPrefix(w.Name, "svc-")
|
||||
obj.Namespace = w.Namespace
|
||||
return obj
|
||||
case strings.HasPrefix(w.Name, "pod-"):
|
||||
obj := &corev1.Pod{}
|
||||
obj.Name = strings.TrimPrefix(w.Name, "pod-")
|
||||
obj.Namespace = w.Namespace
|
||||
return obj
|
||||
}
|
||||
obj := &corev1.Pod{}
|
||||
obj.Name = w.Name
|
||||
obj.Namespace = w.Namespace
|
||||
var obj client.Object
|
||||
return obj
|
||||
}
|
||||
|
||||
26
internal/controller/workload_controller_test.go
Normal file
26
internal/controller/workload_controller_test.go
Normal file
@@ -0,0 +1,26 @@
|
||||
package controller
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
cozyv1alpha1 "github.com/cozystack/cozystack/api/v1alpha1"
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
)
|
||||
|
||||
func TestUnprefixedMonitoredObjectReturnsNil(t *testing.T) {
|
||||
w := &cozyv1alpha1.Workload{}
|
||||
w.Name = "unprefixed-name"
|
||||
obj := getMonitoredObject(w)
|
||||
if obj != nil {
|
||||
t.Errorf(`getMonitoredObject(&Workload{Name: "%s"}) == %v, want nil`, w.Name, obj)
|
||||
}
|
||||
}
|
||||
|
||||
func TestPodMonitoredObject(t *testing.T) {
|
||||
w := &cozyv1alpha1.Workload{}
|
||||
w.Name = "pod-mypod"
|
||||
obj := getMonitoredObject(w)
|
||||
if pod, ok := obj.(*corev1.Pod); !ok || pod.Name != "mypod" {
|
||||
t.Errorf(`getMonitoredObject(&Workload{Name: "%s"}) == %v, want &Pod{Name: "mypod"}`, w.Name, obj)
|
||||
}
|
||||
}
|
||||
@@ -116,24 +116,15 @@ func (r *WorkloadMonitorReconciler) reconcileServiceForMonitor(
|
||||
|
||||
resources := make(map[string]resource.Quantity)
|
||||
|
||||
quantity := resource.MustParse("0")
|
||||
q := resource.MustParse("0")
|
||||
|
||||
for _, ing := range svc.Status.LoadBalancer.Ingress {
|
||||
if ing.IP != "" {
|
||||
quantity.Add(resource.MustParse("1"))
|
||||
q.Add(resource.MustParse("1"))
|
||||
}
|
||||
}
|
||||
|
||||
var resourceLabel string
|
||||
if svc.Annotations != nil {
|
||||
var ok bool
|
||||
resourceLabel, ok = svc.Annotations["metallb.universe.tf/ip-allocated-from-pool"]
|
||||
if !ok {
|
||||
resourceLabel = "default"
|
||||
}
|
||||
}
|
||||
resourceLabel = fmt.Sprintf("%s.ipaddresspool.metallb.io/requests.ipaddresses", resourceLabel)
|
||||
resources[resourceLabel] = quantity
|
||||
resources["public-ips"] = q
|
||||
|
||||
_, err := ctrl.CreateOrUpdate(ctx, r.Client, workload, func() error {
|
||||
// Update owner references with the new monitor
|
||||
@@ -174,12 +165,7 @@ func (r *WorkloadMonitorReconciler) reconcilePVCForMonitor(
|
||||
resources := make(map[string]resource.Quantity)
|
||||
|
||||
for resourceName, resourceQuantity := range pvc.Status.Capacity {
|
||||
storageClass := "default"
|
||||
if pvc.Spec.StorageClassName != nil || *pvc.Spec.StorageClassName == "" {
|
||||
storageClass = *pvc.Spec.StorageClassName
|
||||
}
|
||||
resourceLabel := fmt.Sprintf("%s.storageclass.storage.k8s.io/requests.%s", storageClass, resourceName.String())
|
||||
resources[resourceLabel] = resourceQuantity
|
||||
resources[resourceName.String()] = resourceQuantity
|
||||
}
|
||||
|
||||
_, err := ctrl.CreateOrUpdate(ctx, r.Client, workload, func() error {
|
||||
@@ -212,15 +198,12 @@ func (r *WorkloadMonitorReconciler) reconcilePodForMonitor(
|
||||
) error {
|
||||
logger := log.FromContext(ctx)
|
||||
|
||||
// Combine both init containers and normal containers to sum resources properly
|
||||
combinedContainers := append(pod.Spec.InitContainers, pod.Spec.Containers...)
|
||||
|
||||
// totalResources will store the sum of all container resource limits
|
||||
// totalResources will store the sum of all container resource requests
|
||||
totalResources := make(map[string]resource.Quantity)
|
||||
|
||||
// Iterate over all containers to aggregate their Limits
|
||||
for _, container := range combinedContainers {
|
||||
for name, qty := range container.Resources.Limits {
|
||||
// Iterate over all containers to aggregate their requests
|
||||
for _, container := range pod.Spec.Containers {
|
||||
for name, qty := range container.Resources.Requests {
|
||||
if existing, exists := totalResources[name.String()]; exists {
|
||||
existing.Add(qty)
|
||||
totalResources[name.String()] = existing
|
||||
@@ -249,7 +232,7 @@ func (r *WorkloadMonitorReconciler) reconcilePodForMonitor(
|
||||
|
||||
workload := &cozyv1alpha1.Workload{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Name: pod.Name,
|
||||
Name: fmt.Sprintf("pod-%s", pod.Name),
|
||||
Namespace: pod.Namespace,
|
||||
},
|
||||
}
|
||||
|
||||
3
packages/apps/bucket/README.md
Normal file
3
packages/apps/bucket/README.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# S3 bucket
|
||||
|
||||
## Parameters
|
||||
5
packages/apps/bucket/values.schema.json
Normal file
5
packages/apps/bucket/values.schema.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"title": "Chart Values",
|
||||
"type": "object",
|
||||
"properties": {}
|
||||
}
|
||||
1
packages/apps/bucket/values.yaml
Normal file
1
packages/apps/bucket/values.yaml
Normal file
@@ -0,0 +1 @@
|
||||
{}
|
||||
@@ -1 +1 @@
|
||||
ghcr.io/cozystack/cozystack/postgres-backup:0.10.0@sha256:10179ed56457460d95cd5708db2a00130901255fa30c4dd76c65d2ef5622b61f
|
||||
ghcr.io/cozystack/cozystack/postgres-backup:0.10.1@sha256:10179ed56457460d95cd5708db2a00130901255fa30c4dd76c65d2ef5622b61f
|
||||
|
||||
@@ -1 +1 @@
|
||||
ghcr.io/cozystack/cozystack/nginx-cache:0.4.0@sha256:bef7344da098c4dc400a9e20ffad10ac991df67d09a30026207454abbc91f28b
|
||||
ghcr.io/cozystack/cozystack/nginx-cache:0.4.0@sha256:2e72835a1dcf222038fb5cb343d59f7e60b5c1adf1bf93ca123a8a660e27bcbc
|
||||
|
||||
@@ -27,20 +27,44 @@ How to access to deployed cluster:
|
||||
kubectl get secret -n <namespace> kubernetes-<clusterName>-admin-kubeconfig -o go-template='{{ printf "%s\n" (index .data "super-admin.conf" | base64decode) }}' > test
|
||||
```
|
||||
|
||||
# Series
|
||||
## Parameters
|
||||
|
||||
<!-- source: https://github.com/kubevirt/common-instancetypes/blob/main/README.md -->
|
||||
### Common parameters
|
||||
|
||||
. | U | O | CX | M | RT
|
||||
----------------------------|-----|-----|------|-----|------
|
||||
*Has GPUs* | | | | |
|
||||
*Hugepages* | | | ✓ | ✓ | ✓
|
||||
*Overcommitted Memory* | | ✓ | | |
|
||||
*Dedicated CPU* | | | ✓ | | ✓
|
||||
*Burstable CPU performance* | ✓ | ✓ | | ✓ |
|
||||
*Isolated emulator threads* | | | ✓ | | ✓
|
||||
*vNUMA* | | | ✓ | | ✓
|
||||
*vCPU-To-Memory Ratio* | 1:4 | 1:4 | 1:2 | 1:8 | 1:4
|
||||
| Name | Description | Value |
|
||||
| ----------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | ------------ |
|
||||
| `host` | The hostname used to access the Kubernetes cluster externally (defaults to using the cluster name as a subdomain for the tenant host). | `""` |
|
||||
| `controlPlane.replicas` | Number of replicas for Kubernetes contorl-plane components | `2` |
|
||||
| `storageClass` | StorageClass used to store user data | `replicated` |
|
||||
| `nodeGroups` | nodeGroups configuration | `{}` |
|
||||
|
||||
### Cluster Addons
|
||||
|
||||
| Name | Description | Value |
|
||||
| --------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- |
|
||||
| `addons.certManager.enabled` | Enables the cert-manager | `false` |
|
||||
| `addons.certManager.valuesOverride` | Custom values to override | `{}` |
|
||||
| `addons.ingressNginx.enabled` | Enable Ingress-NGINX controller (expect nodes with 'ingress-nginx' role) | `false` |
|
||||
| `addons.ingressNginx.valuesOverride` | Custom values to override | `{}` |
|
||||
| `addons.ingressNginx.hosts` | List of domain names that should be passed through to the cluster by upper cluster | `[]` |
|
||||
| `addons.fluxcd.enabled` | Enables Flux CD | `false` |
|
||||
| `addons.fluxcd.valuesOverride` | Custom values to override | `{}` |
|
||||
| `addons.monitoringAgents.enabled` | Enables MonitoringAgents (fluentbit, vmagents for sending logs and metrics to storage) if tenant monitoring enabled, send to tenant storage, else to root storage | `false` |
|
||||
| `addons.monitoringAgents.valuesOverride` | Custom values to override | `{}` |
|
||||
| `addons.verticalPodAutoscaler.valuesOverride` | Custom values to override | `{}` |
|
||||
|
||||
### Kamaji control plane
|
||||
|
||||
| Name | Description | Value |
|
||||
| --------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- |
|
||||
| `kamajiControlPlane.apiServer.resources` | Resources | `{}` |
|
||||
| `kamajiControlPlane.apiServer.resourcesPreset` | Set container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). This is ignored if resources is set (resources is recommended for production). | `small` |
|
||||
| `kamajiControlPlane.controllerManager.resources` | Resources | `{}` |
|
||||
| `kamajiControlPlane.controllerManager.resourcesPreset` | Set container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). This is ignored if resources is set (resources is recommended for production). | `micro` |
|
||||
| `kamajiControlPlane.scheduler.resources` | Resources | `{}` |
|
||||
| `kamajiControlPlane.scheduler.resourcesPreset` | Set container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). This is ignored if resources is set (resources is recommended for production). | `micro` |
|
||||
| `kamajiControlPlane.addons.konnectivity.server.resources` | Resources | `{}` |
|
||||
| `kamajiControlPlane.addons.konnectivity.server.resourcesPreset` | Set container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). This is ignored if resources is set (resources is recommended for production). | `micro` |
|
||||
|
||||
|
||||
## U Series
|
||||
|
||||
@@ -1 +1 @@
|
||||
ghcr.io/cozystack/cozystack/cluster-autoscaler:0.18.0@sha256:85371c6aabf5a7fea2214556deac930c600e362f92673464fe2443784e2869c3
|
||||
ghcr.io/cozystack/cozystack/cluster-autoscaler:0.18.1@sha256:85371c6aabf5a7fea2214556deac930c600e362f92673464fe2443784e2869c3
|
||||
|
||||
@@ -1 +1 @@
|
||||
ghcr.io/cozystack/cozystack/kubevirt-cloud-provider:0.18.0@sha256:795d8e1ef4b2b0df2aa1e09d96cd13476ebb545b4bf4b5779b7547a70ef64cf9
|
||||
ghcr.io/cozystack/cozystack/kubevirt-cloud-provider:0.18.1@sha256:af456f75b9bda2ca23e114dcf7f3ba6d4da6a4cf83105c92c9ab2b1ac3615f63
|
||||
|
||||
@@ -1 +1 @@
|
||||
ghcr.io/cozystack/cozystack/kubevirt-csi-driver:0.18.0@sha256:6f9091c3e7e4951c5e43fdafd505705fcc9f1ead290ee3ae42e97e9ec2b87b20
|
||||
ghcr.io/cozystack/cozystack/kubevirt-csi-driver:0.18.1@sha256:5f59b1987bdbd1b7271c4d46552bb0780d60cabfef02c29abb962b06f1386f35
|
||||
|
||||
@@ -1 +1 @@
|
||||
ghcr.io/cozystack/cozystack/ubuntu-container-disk:v1.30.1@sha256:07392e7a87a3d4ef1c86c1b146e6c5de5c2b524aed5a53bf48870dc8a296f99a
|
||||
ghcr.io/cozystack/cozystack/ubuntu-container-disk:v1.30.1@sha256:fb5e09edf7b3fa5849b0c0f3f4ff5657a41fcbd97444704254deafd6b36f0992
|
||||
|
||||
@@ -17,9 +17,6 @@ RUN wget -O image.img https://cloud-images.ubuntu.com/jammy/current/jammy-server
|
||||
|
||||
RUN qemu-img resize image.img 5G \
|
||||
&& eval "$(guestfish --listen --network)" \
|
||||
&& guestfish --remote set-backend direct \
|
||||
&& guestfish --remote set-memsize 2048 \
|
||||
&& guestfish --remote set-smp 4 \
|
||||
&& guestfish --remote add-drive image.img \
|
||||
&& guestfish --remote run \
|
||||
&& guestfish --remote mount /dev/sda1 / \
|
||||
@@ -40,9 +37,6 @@ RUN qemu-img resize image.img 5G \
|
||||
&& guestfish --remote command "sed -i '/SystemdCgroup/ s/=.*/= true/' /etc/containerd/config.toml" \
|
||||
# install kubernetes
|
||||
&& guestfish --remote command "apt-get install -y kubelet kubeadm" \
|
||||
# install nvidia driver
|
||||
&& guestfish --remote command "apt-get install -y nvidia-dkms-570-server-open" \
|
||||
&& guestfish --remote sh "printf 'blacklist %s\n' nvidia nvidia_uvm nvidia_drm nvidia_modeset > /etc/modprobe.d/blacklist-nvidia.conf" \
|
||||
# clean apt cache
|
||||
&& guestfish --remote sh 'apt-get clean && rm -rf /var/lib/apt/lists/*' \
|
||||
# write system configuration
|
||||
|
||||
@@ -90,8 +90,93 @@
|
||||
"default": {}
|
||||
}
|
||||
}
|
||||
},
|
||||
"verticalPodAutoscaler": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"valuesOverride": {
|
||||
"type": "object",
|
||||
"description": "Custom values to override",
|
||||
"default": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"kamajiControlPlane": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"apiServer": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"resources": {
|
||||
"type": "object",
|
||||
"description": "Resources",
|
||||
"default": {}
|
||||
},
|
||||
"resourcesPreset": {
|
||||
"type": "string",
|
||||
"description": "Set container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). This is ignored if resources is set (resources is recommended for production).",
|
||||
"default": "small"
|
||||
}
|
||||
}
|
||||
},
|
||||
"controllerManager": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"resources": {
|
||||
"type": "object",
|
||||
"description": "Resources",
|
||||
"default": {}
|
||||
},
|
||||
"resourcesPreset": {
|
||||
"type": "string",
|
||||
"description": "Set container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). This is ignored if resources is set (resources is recommended for production).",
|
||||
"default": "micro"
|
||||
}
|
||||
}
|
||||
},
|
||||
"scheduler": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"resources": {
|
||||
"type": "object",
|
||||
"description": "Resources",
|
||||
"default": {}
|
||||
},
|
||||
"resourcesPreset": {
|
||||
"type": "string",
|
||||
"description": "Set container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). This is ignored if resources is set (resources is recommended for production).",
|
||||
"default": "micro"
|
||||
}
|
||||
}
|
||||
},
|
||||
"addons": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"konnectivity": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"server": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"resources": {
|
||||
"type": "object",
|
||||
"description": "Resources",
|
||||
"default": {}
|
||||
},
|
||||
"resourcesPreset": {
|
||||
"type": "string",
|
||||
"description": "Set container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). This is ignored if resources is set (resources is recommended for production).",
|
||||
"default": "micro"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -16,7 +16,7 @@ type: application
|
||||
# This is the chart version. This version number should be incremented each time you make changes
|
||||
# to the chart and its templates, including the app version.
|
||||
# Versions are expected to follow Semantic Versioning (https://semver.org/)
|
||||
version: 0.10.0
|
||||
version: 0.10.1
|
||||
|
||||
# This is the version number of the application being deployed. This version number should be
|
||||
# incremented each time you make changes to the application. Versions are not expected to
|
||||
|
||||
@@ -1 +1 @@
|
||||
ghcr.io/cozystack/cozystack/postgres-backup:0.10.0@sha256:10179ed56457460d95cd5708db2a00130901255fa30c4dd76c65d2ef5622b61f
|
||||
ghcr.io/cozystack/cozystack/postgres-backup:0.10.1@sha256:10179ed56457460d95cd5708db2a00130901255fa30c4dd76c65d2ef5622b61f
|
||||
|
||||
@@ -13,9 +13,6 @@ spec:
|
||||
jobTemplate:
|
||||
spec:
|
||||
backoffLimit: 2
|
||||
template:
|
||||
spec:
|
||||
restartPolicy: OnFailure
|
||||
template:
|
||||
metadata:
|
||||
annotations:
|
||||
@@ -24,7 +21,7 @@ spec:
|
||||
spec:
|
||||
imagePullSecrets:
|
||||
- name: {{ .Release.Name }}-regsecret
|
||||
restartPolicy: Never
|
||||
restartPolicy: OnFailure
|
||||
containers:
|
||||
- name: pgdump
|
||||
image: "{{ $.Files.Get "images/postgres-backup.tag" | trim }}"
|
||||
|
||||
@@ -4,4 +4,4 @@ description: Separated tenant namespace
|
||||
icon: /logos/tenant.svg
|
||||
|
||||
type: application
|
||||
version: 1.9.1
|
||||
version: 1.9.2
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: cozy-tenant-configuration-hash
|
||||
namespace: {{ include "tenant.name" . }}
|
||||
data:
|
||||
cozyTenantConfigurationHash: {{ sha256sum (toJson .Values) | quote }}
|
||||
@@ -24,6 +24,7 @@ spec:
|
||||
ingress:
|
||||
- fromEntities:
|
||||
- world
|
||||
- cluster
|
||||
egress:
|
||||
- toEntities:
|
||||
- world
|
||||
|
||||
@@ -89,7 +89,8 @@ postgres 0.7.0 4b90bf5a
|
||||
postgres 0.7.1 1ec10165
|
||||
postgres 0.8.0 4e68e65c
|
||||
postgres 0.9.0 8267072d
|
||||
postgres 0.10.0 HEAD
|
||||
postgres 0.10.0 721c12a7
|
||||
postgres 0.10.1 HEAD
|
||||
rabbitmq 0.1.0 263e47be
|
||||
rabbitmq 0.2.0 53f2365e
|
||||
rabbitmq 0.3.0 6c5cf5bf
|
||||
@@ -130,7 +131,8 @@ tenant 1.6.8 bc95159a
|
||||
tenant 1.7.0 24fa7222
|
||||
tenant 1.8.0 160e4e2a
|
||||
tenant 1.9.0 728743db
|
||||
tenant 1.9.1 HEAD
|
||||
tenant 1.9.1 721c12a7
|
||||
tenant 1.9.2 HEAD
|
||||
virtual-machine 0.1.4 f2015d65
|
||||
virtual-machine 0.1.5 263e47be
|
||||
virtual-machine 0.2.0 c0685f43
|
||||
@@ -143,7 +145,8 @@ virtual-machine 0.7.1 0ab39f20
|
||||
virtual-machine 0.8.0 3fa4dd3a
|
||||
virtual-machine 0.8.1 93c46161
|
||||
virtual-machine 0.8.2 de19450f
|
||||
virtual-machine 0.9.0 HEAD
|
||||
virtual-machine 0.9.0 721c12a7
|
||||
virtual-machine 0.9.1 HEAD
|
||||
vm-disk 0.1.0 d971f2ff
|
||||
vm-disk 0.1.1 HEAD
|
||||
vm-instance 0.1.0 1ec10165
|
||||
@@ -153,7 +156,8 @@ vm-instance 0.4.0 e23286a3
|
||||
vm-instance 0.4.1 0ab39f20
|
||||
vm-instance 0.5.0 3fa4dd3a
|
||||
vm-instance 0.5.1 de19450f
|
||||
vm-instance 0.6.0 HEAD
|
||||
vm-instance 0.6.0 721c12a7
|
||||
vm-instance 0.6.1 HEAD
|
||||
vpn 0.1.0 263e47be
|
||||
vpn 0.2.0 53f2365e
|
||||
vpn 0.3.0 6c5cf5bf
|
||||
|
||||
@@ -17,7 +17,7 @@ type: application
|
||||
# This is the chart version. This version number should be incremented each time you make changes
|
||||
# to the chart and its templates, including the app version.
|
||||
# Versions are expected to follow Semantic Versioning (https://semver.org/)
|
||||
version: 0.9.0
|
||||
version: 0.9.1
|
||||
|
||||
# This is the version number of the application being deployed. This version number should be
|
||||
# incremented each time you make changes to the application. Versions are not expected to
|
||||
|
||||
@@ -74,7 +74,8 @@ spec:
|
||||
{{- if .Values.gpus }}
|
||||
gpus:
|
||||
{{- range $i, $gpu := .Values.gpus }}
|
||||
- deviceName: {{ $gpu.name }}
|
||||
- name: gpu{{ add $i 1 }}
|
||||
deviceName: {{ $gpu.name }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
disks:
|
||||
|
||||
@@ -17,7 +17,7 @@ type: application
|
||||
# This is the chart version. This version number should be incremented each time you make changes
|
||||
# to the chart and its templates, including the app version.
|
||||
# Versions are expected to follow Semantic Versioning (https://semver.org/)
|
||||
version: 0.6.0
|
||||
version: 0.6.1
|
||||
|
||||
# This is the version number of the application being deployed. This version number should be
|
||||
# incremented each time you make changes to the application. Versions are not expected to
|
||||
|
||||
@@ -46,7 +46,8 @@ spec:
|
||||
{{- if .Values.gpus }}
|
||||
gpus:
|
||||
{{- range $i, $gpu := .Values.gpus }}
|
||||
- deviceName: {{ $gpu.name }}
|
||||
- name: gpu{{ add $i 1 }}
|
||||
deviceName: {{ $gpu.name }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
disks:
|
||||
|
||||
@@ -30,8 +30,6 @@ FROM alpine:3.21
|
||||
|
||||
RUN apk add --no-cache make
|
||||
RUN apk add helm kubectl --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community
|
||||
RUN apk add yq
|
||||
RUN apk add coreutils
|
||||
|
||||
COPY scripts /cozystack/scripts
|
||||
COPY --from=builder /src/packages/core /cozystack/packages/core
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
cozystack:
|
||||
image: ghcr.io/cozystack/cozystack/installer:v0.30.2@sha256:59996588b5d59b5593fb34442b2f2ed8ef466d138b229a8d37beb6f70141a690
|
||||
image: ghcr.io/cozystack/cozystack/installer:v0.30.6@sha256:d16944b050f044b4bd95d396b9a2c07933d40a8285dc286a6b989b57a58a3999
|
||||
|
||||
@@ -7,11 +7,7 @@ show:
|
||||
helm template -n $(NAMESPACE) $(NAME) . --dry-run=server $(API_VERSIONS_FLAGS)
|
||||
|
||||
apply:
|
||||
helm template -n $(NAMESPACE) $(NAME) . --dry-run=server $(API_VERSIONS_FLAGS) \
|
||||
| kubectl apply -f-
|
||||
kubectl delete helmreleases.helm.toolkit.fluxcd.io -l cozystack.io/marked-for-deletion=true -A
|
||||
|
||||
reconcile: apply
|
||||
helm template -n $(NAMESPACE) $(NAME) . --dry-run=server $(API_VERSIONS_FLAGS) | kubectl apply -f-
|
||||
|
||||
namespaces-show:
|
||||
helm template -n $(NAMESPACE) $(NAME) . --dry-run=server $(API_VERSIONS_FLAGS) -s templates/namespaces.yaml
|
||||
|
||||
@@ -270,10 +270,7 @@ releases:
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
frontend:
|
||||
resourcesPreset: "none"
|
||||
dashboard:
|
||||
resourcesPreset: "none"
|
||||
{{- $cozystackBranding:= lookup "v1" "ConfigMap" "cozy-system" "cozystack-branding" }}
|
||||
{{- $branding := dig "data" "branding" "" $cozystackBranding }}
|
||||
{{- if $branding }}
|
||||
|
||||
@@ -168,10 +168,7 @@ releases:
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
frontend:
|
||||
resourcesPreset: "none"
|
||||
dashboard:
|
||||
resourcesPreset: "none"
|
||||
{{- $cozystackBranding:= lookup "v1" "ConfigMap" "cozy-system" "cozystack-branding" }}
|
||||
{{- $branding := dig "data" "branding" "" $cozystackBranding }}
|
||||
{{- if $branding }}
|
||||
|
||||
@@ -54,12 +54,6 @@ spec:
|
||||
namespace: cozy-public
|
||||
values:
|
||||
host: "{{ $host }}"
|
||||
valuesFrom:
|
||||
- kind: ConfigMap
|
||||
name: "cozy-system-configuration-hash"
|
||||
valuesKey: "cozyTenantConfigurationHash"
|
||||
targetPath: "cozyTenantConfigurationHash"
|
||||
optional: true
|
||||
dependsOn:
|
||||
{{- range $x := $bundle.releases }}
|
||||
{{- if has $x.name (list "cilium" "kubeovn") }}
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
{{- $rootTenantConfiguration := dict "values" .Values }}
|
||||
{{- $cozyConfig := index (lookup "v1" "ConfigMap" "cozy-system" "cozystack" ) "data" }}
|
||||
{{- $cozyScheduling := index (lookup "v1" "ConfigMap" "cozy-system" "cozystack-scheduling") "data" }}
|
||||
{{- $cozyBranding := index (lookup "v1" "ConfigMap" "cozy-system" "cozystack-branding" ) "data" }}
|
||||
{{- $_ := set $rootTenantConfiguration "config" $cozyConfig }}
|
||||
{{- $_ := set $rootTenantConfiguration "scheduling" $cozyScheduling }}
|
||||
{{- $_ := set $rootTenantConfiguration "branding" $cozyBranding }}
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: cozy-system-configuration-hash
|
||||
namespace: tenant-root
|
||||
data:
|
||||
cozyTenantConfigurationHash: {{ sha256sum (toJson $rootTenantConfiguration) | quote }}
|
||||
@@ -7,23 +7,12 @@
|
||||
|
||||
{{/* collect dependency namespaces from releases */}}
|
||||
{{- range $x := $bundle.releases }}
|
||||
{{- $_ := set $dependencyNamespaces $x.name $x.namespace }}
|
||||
{{- $_ := set $dependencyNamespaces $x.name $x.namespace }}
|
||||
{{- end }}
|
||||
|
||||
{{- range $x := $bundle.releases }}
|
||||
|
||||
{{- $shouldInstall := true }}
|
||||
{{- $shouldDelete := false }}
|
||||
{{- if or (has $x.name $disabledComponents) (and ($x.optional) (not (has $x.name $enabledComponents))) }}
|
||||
{{- $shouldInstall = false }}
|
||||
{{- if $.Capabilities.APIVersions.Has "helm.toolkit.fluxcd.io/v2" }}
|
||||
{{- if lookup "helm.toolkit.fluxcd.io/v2" "HelmRelease" $x.namespace $x.name }}
|
||||
{{- $shouldDelete = true }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- if or $shouldInstall $shouldDelete }}
|
||||
{{- if not (has $x.name $disabledComponents) }}
|
||||
{{- if or (not $x.optional) (and ($x.optional) (has $x.name $enabledComponents)) }}
|
||||
---
|
||||
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||
kind: HelmRelease
|
||||
@@ -33,9 +22,6 @@ metadata:
|
||||
labels:
|
||||
cozystack.io/repository: system
|
||||
cozystack.io/system-app: "true"
|
||||
{{- if $shouldDelete }}
|
||||
cozystack.io/marked-for-deletion: "true"
|
||||
{{- end }}
|
||||
spec:
|
||||
interval: 5m
|
||||
releaseName: {{ $x.releaseName | default $x.name }}
|
||||
@@ -61,10 +47,10 @@ spec:
|
||||
{{- end }}
|
||||
{{- $values := dict }}
|
||||
{{- with $x.values }}
|
||||
{{- $values = merge . $values }}
|
||||
{{- $values = merge . $values }}
|
||||
{{- end }}
|
||||
{{- with index $cozyConfig.data (printf "values-%s" $x.name) }}
|
||||
{{- $values = merge (fromYaml .) $values }}
|
||||
{{- $values = merge (fromYaml .) $values }}
|
||||
{{- end }}
|
||||
{{- with $values }}
|
||||
values:
|
||||
@@ -84,12 +70,13 @@ spec:
|
||||
|
||||
{{- with $x.dependsOn }}
|
||||
dependsOn:
|
||||
{{- range $dep := . }}
|
||||
{{- if not (has $dep $disabledComponents) }}
|
||||
{{- range $dep := . }}
|
||||
{{- if not (has $dep $disabledComponents) }}
|
||||
- name: {{ $dep }}
|
||||
namespace: {{ index $dependencyNamespaces $dep }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
e2e:
|
||||
image: ghcr.io/cozystack/cozystack/e2e-sandbox:v0.30.2@sha256:31273d6b42dc88c2be2ff9ba64564d1b12e70ae8a5480953341b0d113ac7d4bd
|
||||
image: ghcr.io/cozystack/cozystack/e2e-sandbox:v0.30.6@sha256:3e6fe802702a59f495f75415863a8a3b075971e4e6a62dbb0bfd41300e357485
|
||||
|
||||
@@ -1 +1 @@
|
||||
ghcr.io/cozystack/cozystack/matchbox:v0.30.2@sha256:307d382f75f1dcb39820c73b93b2ce576cdb6d58032679bda7d926999c677900
|
||||
ghcr.io/cozystack/cozystack/matchbox:v0.30.6@sha256:5cfcc7501be3088657a77796e3871e896953d0a8b825c301fb56dfa93e93586c
|
||||
|
||||
@@ -1 +1 @@
|
||||
ghcr.io/cozystack/cozystack/grafana:1.9.2@sha256:c63978e1ed0304e8518b31ddee56c4e8115541b997d8efbe1c0a74da57140399
|
||||
ghcr.io/cozystack/cozystack/grafana:1.9.2@sha256:fb48d37f1a9386e0023df9ac067ec2e03953b7b8c9d6abf2d12716e084f846a4
|
||||
|
||||
@@ -1 +1 @@
|
||||
ghcr.io/cozystack/cozystack/s3manager:v0.5.0@sha256:a47d2743d01bff0ce60aa745fdff54f9b7184dff8679b11ab4ecd08ac663012b
|
||||
ghcr.io/cozystack/cozystack/s3manager:v0.5.0@sha256:30fd3277ef61566688a87b34d2d3f401abb205a6fb2547bdd99a7dcf1a3a2e7e
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
cozystackAPI:
|
||||
image: ghcr.io/cozystack/cozystack/cozystack-api:v0.30.2@sha256:7ef370dc8aeac0a6b2a50b7d949f070eb21d267ba0a70e7fc7c1564bfe6d4f83
|
||||
image: ghcr.io/cozystack/cozystack/cozystack-api:v0.30.6@sha256:fc321690bb822498dc7c62818a9cd40d344b3646bbc007a46bbfb06d1c6d0bd7
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
cozystackController:
|
||||
image: ghcr.io/cozystack/cozystack/cozystack-controller:v0.30.2@sha256:5b87a8ea0dcde1671f44532c1ee6db11a5dd922d1a009078ecf6495ec193e52a
|
||||
image: ghcr.io/cozystack/cozystack/cozystack-controller:v0.30.6@sha256:5128ef094e55e082ab514f4026876a78b8903612aa1722acf3fe3c132481d4bb
|
||||
debug: false
|
||||
disableTelemetry: false
|
||||
cozystackVersion: "v0.30.2"
|
||||
cozystackVersion: "v0.30.6"
|
||||
|
||||
@@ -76,7 +76,7 @@ data:
|
||||
"kubeappsNamespace": {{ .Release.Namespace | quote }},
|
||||
"helmGlobalNamespace": {{ include "kubeapps.helmGlobalPackagingNamespace" . | quote }},
|
||||
"carvelGlobalNamespace": {{ .Values.kubeappsapis.pluginConfig.kappController.packages.v1alpha1.globalPackagingNamespace | quote }},
|
||||
"appVersion": "v0.30.2",
|
||||
"appVersion": "v0.30.6",
|
||||
"authProxyEnabled": {{ .Values.authProxy.enabled }},
|
||||
"oauthLoginURI": {{ .Values.authProxy.oauthLoginURI | quote }},
|
||||
"oauthLogoutURI": {{ .Values.authProxy.oauthLogoutURI | quote }},
|
||||
|
||||
@@ -1,80 +0,0 @@
|
||||
apiVersion: autoscaling.k8s.io/v1
|
||||
kind: VerticalPodAutoscaler
|
||||
metadata:
|
||||
name: dashboard-internal-dashboard
|
||||
namespace: cozy-dashboard
|
||||
spec:
|
||||
targetRef:
|
||||
apiVersion: "apps/v1"
|
||||
kind: Deployment
|
||||
name: dashboard-internal-dashboard
|
||||
updatePolicy:
|
||||
updateMode: "Auto"
|
||||
resourcePolicy:
|
||||
containerPolicies:
|
||||
- containerName: dashboard
|
||||
controlledResources: ["cpu", "memory"]
|
||||
minAllowed:
|
||||
cpu: 50m
|
||||
memory: 64Mi
|
||||
maxAllowed:
|
||||
cpu: 500m
|
||||
memory: 512Mi
|
||||
---
|
||||
apiVersion: autoscaling.k8s.io/v1
|
||||
kind: VerticalPodAutoscaler
|
||||
metadata:
|
||||
name: dashboard-internal-kubeappsapis
|
||||
namespace: cozy-dashboard
|
||||
spec:
|
||||
targetRef:
|
||||
apiVersion: "apps/v1"
|
||||
kind: Deployment
|
||||
name: dashboard-internal-kubeappsapis
|
||||
updatePolicy:
|
||||
updateMode: "Auto"
|
||||
resourcePolicy:
|
||||
containerPolicies:
|
||||
- containerName: kubeappsapis
|
||||
controlledResources: ["cpu", "memory"]
|
||||
minAllowed:
|
||||
cpu: 50m
|
||||
memory: 100Mi
|
||||
maxAllowed:
|
||||
cpu: 1000m
|
||||
memory: 1Gi
|
||||
---
|
||||
apiVersion: autoscaling.k8s.io/v1
|
||||
kind: VerticalPodAutoscaler
|
||||
metadata:
|
||||
name: dashboard-vpa
|
||||
namespace: cozy-dashboard
|
||||
spec:
|
||||
targetRef:
|
||||
apiVersion: "apps/v1"
|
||||
kind: Deployment
|
||||
name: dashboard
|
||||
updatePolicy:
|
||||
updateMode: "Auto"
|
||||
resourcePolicy:
|
||||
containerPolicies:
|
||||
- containerName: nginx
|
||||
controlledResources: ["cpu", "memory"]
|
||||
minAllowed:
|
||||
cpu: "50m"
|
||||
memory: "64Mi"
|
||||
maxAllowed:
|
||||
cpu: "500m"
|
||||
memory: "512Mi"
|
||||
{{- $dashboardKCconfig := lookup "v1" "ConfigMap" "cozy-dashboard" "kubeapps-auth-config" }}
|
||||
{{- $dashboardKCValues := dig "data" "values.yaml" "" $dashboardKCconfig }}
|
||||
{{- if $dashboardKCValues }}
|
||||
- containerName: auth-proxy
|
||||
controlledResources: ["cpu", "memory"]
|
||||
minAllowed:
|
||||
cpu: "50m"
|
||||
memory: "64Mi"
|
||||
maxAllowed:
|
||||
cpu: "500m"
|
||||
memory: "512Mi"
|
||||
{{- end }}
|
||||
@@ -15,19 +15,17 @@ kubeapps:
|
||||
flux:
|
||||
enabled: true
|
||||
dashboard:
|
||||
resourcesPreset: "none"
|
||||
image:
|
||||
registry: ghcr.io/cozystack/cozystack
|
||||
repository: dashboard
|
||||
tag: v0.30.2
|
||||
tag: v0.30.6
|
||||
digest: "sha256:a83fe4654f547469cfa469a02bda1273c54bca103a41eb007fdb2e18a7a91e93"
|
||||
kubeappsapis:
|
||||
resourcesPreset: "none"
|
||||
image:
|
||||
registry: ghcr.io/cozystack/cozystack
|
||||
repository: kubeapps-apis
|
||||
tag: v0.30.2
|
||||
digest: "sha256:3b5805b56f2fb9fd25f4aa389cdfbbb28a3f2efb02245c52085a45d1dc62bf92"
|
||||
tag: v0.30.6
|
||||
digest: "sha256:cbb14a3becd0ca847a87fa17211a3348d4f0ff499738a47e1f86c85ce1b72f71"
|
||||
pluginConfig:
|
||||
flux:
|
||||
packages:
|
||||
|
||||
@@ -3,7 +3,7 @@ kamaji:
|
||||
deploy: false
|
||||
image:
|
||||
pullPolicy: IfNotPresent
|
||||
tag: v0.30.2@sha256:e04f68e4cc5b023ed39ce2242b32aee51f97235371602239d0c4a9cea97c8d0d
|
||||
tag: v0.30.6@sha256:3bc9ae6d996fa041b4c5cd951ac99d3bb45884bff87462144ccf3db1c0425a36
|
||||
repository: ghcr.io/cozystack/cozystack/kamaji
|
||||
resources:
|
||||
limits:
|
||||
|
||||
@@ -216,7 +216,6 @@ data:
|
||||
values.yaml: |
|
||||
kubeapps:
|
||||
authProxy:
|
||||
resourcesPreset: "none"
|
||||
enabled: true
|
||||
provider: "oidc"
|
||||
clientID: "kubeapps"
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
portSecurity: true
|
||||
routes: ""
|
||||
image: ghcr.io/cozystack/cozystack/kubeovn-webhook:v0.30.2@sha256:fa14fa7a0ffa628eb079ddcf6ce41d75b43de92e50f489422f8fb15c4dab2dbf
|
||||
image: ghcr.io/cozystack/cozystack/kubeovn-webhook:v0.30.6@sha256:b183c02ca2236f15eadcb0b728696022269de7c9bbf9e594f0b4e38d4f3b163f
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
KUBEOVN_TAG = v1.13.8
|
||||
KUBEOVN_TAG=$(shell awk '$$1 == "version:" {print $$2}' charts/kube-ovn/Chart.yaml)
|
||||
|
||||
export NAME=kubeovn
|
||||
export NAMESPACE=cozy-$(NAME)
|
||||
|
||||
@@ -15,12 +15,12 @@ type: application
|
||||
# This is the chart version. This version number should be incremented each time you make changes
|
||||
# to the chart and its templates, including the app version.
|
||||
# Versions are expected to follow Semantic Versioning (https://semver.org/)
|
||||
version: v1.13.8
|
||||
version: v1.13.11
|
||||
|
||||
# This is the version number of the application being deployed. This version number should be
|
||||
# incremented each time you make changes to the application. Versions are not expected to
|
||||
# follow Semantic Versioning. They should reflect the version the application is using.
|
||||
# It is recommended to use it with quotes.
|
||||
appVersion: "1.13.8"
|
||||
appVersion: "1.13.11"
|
||||
|
||||
kubeVersion: ">= 1.23.0-0"
|
||||
|
||||
@@ -83,6 +83,9 @@ spec:
|
||||
- --node-switch={{ .Values.networking.NODE_SUBNET }}
|
||||
- --node-switch-cidr={{ index $cozyConfig.data "ipv4-join-cidr" }}
|
||||
- --service-cluster-ip-range={{ index $cozyConfig.data "ipv4-svc-cidr" }}
|
||||
{{- if .Values.global.logVerbosity }}
|
||||
- --v={{ .Values.global.logVerbosity }}
|
||||
{{- end }}
|
||||
- --network-type={{- .Values.networking.NETWORK_TYPE }}
|
||||
- --default-provider-name={{ .Values.networking.vlan.PROVIDER_NAME }}
|
||||
- --default-interface-name={{- .Values.networking.vlan.VLAN_INTERFACE_NAME }}
|
||||
|
||||
@@ -35,11 +35,7 @@ spec:
|
||||
command:
|
||||
- sh
|
||||
- -xec
|
||||
- {{ if not .Values.DISABLE_MODULES_MANAGEMENT -}}
|
||||
iptables -V
|
||||
{{- else -}}
|
||||
echo "nothing to do"
|
||||
{{- end }}
|
||||
- iptables -V
|
||||
securityContext:
|
||||
allowPrivilegeEscalation: true
|
||||
capabilities:
|
||||
@@ -93,6 +89,9 @@ spec:
|
||||
- --node-switch={{ .Values.networking.NODE_SUBNET }}
|
||||
- --encap-checksum=true
|
||||
- --service-cluster-ip-range={{ index $cozyConfig.data "ipv4-svc-cidr" }}
|
||||
{{- if .Values.global.logVerbosity }}
|
||||
- --v={{ .Values.global.logVerbosity }}
|
||||
{{- end }}
|
||||
{{- if eq .Values.networking.NETWORK_TYPE "vlan" }}
|
||||
- --iface=
|
||||
{{- else}}
|
||||
@@ -125,9 +124,6 @@ spec:
|
||||
- NET_RAW
|
||||
- SYS_ADMIN
|
||||
- SYS_PTRACE
|
||||
{{- if not .Values.DISABLE_MODULES_MANAGEMENT }}
|
||||
- SYS_MODULE
|
||||
{{- end }}
|
||||
- SYS_NICE
|
||||
env:
|
||||
- name: ENABLE_SSL
|
||||
|
||||
@@ -49,8 +49,9 @@ spec:
|
||||
- -xec
|
||||
- |
|
||||
chown -R nobody: /var/run/ovn /var/log/ovn /etc/openvswitch /var/run/openvswitch /var/log/openvswitch
|
||||
{{- if not .Values.DISABLE_MODULES_MANAGEMENT }}
|
||||
iptables -V
|
||||
{{- if not .Values.DISABLE_MODULES_MANAGEMENT }}
|
||||
/usr/share/openvswitch/scripts/ovs-ctl load-kmod
|
||||
{{- else }}
|
||||
ln -sf /bin/true /usr/local/sbin/modprobe
|
||||
ln -sf /bin/true /usr/local/sbin/modinfo
|
||||
@@ -64,6 +65,9 @@ spec:
|
||||
privileged: true
|
||||
runAsUser: 0
|
||||
volumeMounts:
|
||||
- mountPath: /lib/modules
|
||||
name: host-modules
|
||||
readOnly: true
|
||||
- mountPath: /usr/local/sbin
|
||||
name: usr-local-sbin
|
||||
- mountPath: /var/log/ovn
|
||||
@@ -96,9 +100,7 @@ spec:
|
||||
add:
|
||||
- NET_ADMIN
|
||||
- NET_BIND_SERVICE
|
||||
{{- if not .Values.DISABLE_MODULES_MANAGEMENT }}
|
||||
- SYS_MODULE
|
||||
{{- end }}
|
||||
- NET_RAW
|
||||
- SYS_NICE
|
||||
- SYS_ADMIN
|
||||
env:
|
||||
|
||||
@@ -10,7 +10,7 @@ global:
|
||||
repository: kube-ovn
|
||||
dpdkRepository: kube-ovn-dpdk
|
||||
vpcRepository: vpc-nat-gateway
|
||||
tag: v1.13.8
|
||||
tag: v1.13.11
|
||||
support_arm: true
|
||||
thirdparty: true
|
||||
|
||||
|
||||
@@ -1,54 +1,2 @@
|
||||
# syntax = docker/dockerfile:experimental
|
||||
ARG VERSION=v1.13.8
|
||||
ARG BASE_TAG=$VERSION
|
||||
|
||||
FROM golang:1.23-bookworm as builder
|
||||
|
||||
ARG TAG=v1.13.8
|
||||
RUN git clone --branch ${TAG} --depth 1 https://github.com/kubeovn/kube-ovn /source
|
||||
|
||||
WORKDIR /source
|
||||
|
||||
COPY patches /patches
|
||||
RUN git apply /patches/*.diff
|
||||
RUN make build-go
|
||||
|
||||
WORKDIR /source/dist/images
|
||||
|
||||
# imported from https://github.com/kubeovn/kube-ovn/blob/master/dist/images/Dockerfile
|
||||
FROM kubeovn/kube-ovn-base:$BASE_TAG AS setcap
|
||||
|
||||
COPY --from=builder /source/dist/images/*.sh /kube-ovn/
|
||||
COPY --from=builder /source/dist/images/kubectl-ko /kube-ovn/kubectl-ko
|
||||
COPY --from=builder /source/dist/images/01-kube-ovn.conflist /kube-ovn/01-kube-ovn.conflist
|
||||
|
||||
COPY --from=builder /source/dist/images/kube-ovn /kube-ovn/kube-ovn
|
||||
COPY --from=builder /source/dist/images/kube-ovn-cmd /kube-ovn/kube-ovn-cmd
|
||||
COPY --from=builder /source/dist/images/kube-ovn-daemon /kube-ovn/kube-ovn-daemon
|
||||
COPY --from=builder /source/dist/images/kube-ovn-controller /kube-ovn/kube-ovn-controller
|
||||
RUN ln -s /kube-ovn/kube-ovn-cmd /kube-ovn/kube-ovn-monitor && \
|
||||
ln -s /kube-ovn/kube-ovn-cmd /kube-ovn/kube-ovn-speaker && \
|
||||
ln -s /kube-ovn/kube-ovn-cmd /kube-ovn/kube-ovn-webhook && \
|
||||
ln -s /kube-ovn/kube-ovn-cmd /kube-ovn/kube-ovn-leader-checker && \
|
||||
ln -s /kube-ovn/kube-ovn-cmd /kube-ovn/kube-ovn-ic-controller && \
|
||||
ln -s /kube-ovn/kube-ovn-controller /kube-ovn/kube-ovn-pinger && \
|
||||
setcap CAP_NET_BIND_SERVICE+eip /kube-ovn/kube-ovn-cmd && \
|
||||
setcap CAP_NET_RAW,CAP_NET_BIND_SERVICE+eip /kube-ovn/kube-ovn-controller && \
|
||||
setcap CAP_NET_ADMIN,CAP_NET_RAW,CAP_NET_BIND_SERVICE,CAP_SYS_ADMIN+eip /kube-ovn/kube-ovn-daemon
|
||||
|
||||
FROM kubeovn/kube-ovn-base:$BASE_TAG
|
||||
|
||||
COPY --chmod=0644 --from=builder /source/dist/images/logrotate/* /etc/logrotate.d/
|
||||
COPY --from=builder /source/dist/images/grace_stop_ovn_controller /usr/share/ovn/scripts/grace_stop_ovn_controller
|
||||
|
||||
COPY --from=setcap /kube-ovn /kube-ovn
|
||||
RUN /kube-ovn/iptables-wrapper-installer.sh --no-sanity-check
|
||||
|
||||
WORKDIR /kube-ovn
|
||||
|
||||
# Fix https://github.com/kubeovn/kube-ovn/issues/4526
|
||||
RUN setcap CAP_NET_ADMIN,CAP_NET_BIND_SERVICE,CAP_SYS_ADMIN+eip /usr/lib/openvswitch-switch/ovs-vswitchd \
|
||||
&& setcap CAP_NET_ADMIN,CAP_NET_BIND_SERVICE,CAP_SYS_ADMIN+eip /usr/sbin/xtables-legacy-multi \
|
||||
&& setcap CAP_NET_ADMIN,CAP_NET_BIND_SERVICE,CAP_SYS_ADMIN+eip /usr/sbin/xtables-nft-multi \
|
||||
&& setcap CAP_NET_ADMIN,CAP_NET_RAW,CAP_NET_BIND_SERVICE,CAP_SYS_ADMIN+eip /usr/sbin/ipset \
|
||||
&& setcap CAP_NET_ADMIN,CAP_NET_RAW,CAP_SYS_ADMIN+eip /usr/bin/ip
|
||||
ARG VERSION=v1.13.11
|
||||
FROM kubeovn/kube-ovn:${VERSION}
|
||||
|
||||
@@ -3,7 +3,7 @@ diff --git a/packages/system/kubeovn/charts/kube-ovn/templates/ovncni-ds.yaml b/
|
||||
index d9a9a67..b2e12dd 100644
|
||||
--- a/packages/system/kubeovn/charts/kube-ovn/templates/ovncni-ds.yaml
|
||||
+++ b/packages/system/kubeovn/charts/kube-ovn/templates/ovncni-ds.yaml
|
||||
@@ -51,18 +51,12 @@ spec:
|
||||
@@ -51,18 +51,15 @@ spec:
|
||||
- bash
|
||||
- /kube-ovn/start-cniserver.sh
|
||||
args:
|
||||
@@ -21,6 +21,9 @@ index d9a9a67..b2e12dd 100644
|
||||
- {{ .Values.ipv6.SVC_CIDR }}
|
||||
- {{- end }}
|
||||
+ - --service-cluster-ip-range={{ index $cozyConfig.data "ipv4-svc-cidr" }}
|
||||
+ {{- if .Values.global.logVerbosity }}
|
||||
+ - --v={{ .Values.global.logVerbosity }}
|
||||
+ {{- end }}
|
||||
{{- if eq .Values.networking.NETWORK_TYPE "vlan" }}
|
||||
- --iface=
|
||||
{{- else}}
|
||||
@@ -28,7 +31,7 @@ diff --git a/packages/system/kubeovn/charts/kube-ovn/templates/controller-deploy
|
||||
index 0e69494..756eb7c 100644
|
||||
--- a/packages/system/kubeovn/charts/kube-ovn/templates/controller-deploy.yaml
|
||||
+++ b/packages/system/kubeovn/charts/kube-ovn/templates/controller-deploy.yaml
|
||||
@@ -52,46 +52,19 @@ spec:
|
||||
@@ -52,46 +52,22 @@ spec:
|
||||
image: {{ .Values.global.registry.address }}/{{ .Values.global.images.kubeovn.repository }}:{{ .Values.global.images.kubeovn.tag }}
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
args:
|
||||
@@ -77,6 +80,9 @@ index 0e69494..756eb7c 100644
|
||||
- {{- end }}
|
||||
+ - --node-switch-cidr={{ index $cozyConfig.data "ipv4-join-cidr" }}
|
||||
+ - --service-cluster-ip-range={{ index $cozyConfig.data "ipv4-svc-cidr" }}
|
||||
+ {{- if .Values.global.logVerbosity }}
|
||||
+ - --v={{ .Values.global.logVerbosity }}
|
||||
+ {{- end }}
|
||||
- --network-type={{- .Values.networking.NETWORK_TYPE }}
|
||||
- --default-provider-name={{ .Values.networking.vlan.PROVIDER_NAME }}
|
||||
- --default-interface-name={{- .Values.networking.vlan.VLAN_INTERFACE_NAME }}
|
||||
|
||||
@@ -22,4 +22,4 @@ global:
|
||||
images:
|
||||
kubeovn:
|
||||
repository: kubeovn
|
||||
tag: v1.13.8@sha256:071a93df2dce484b347bbace75934ca9e1743668bfe6f1161ba307dee204767d
|
||||
tag: v1.13.11@sha256:bbae091631c3ac6dbdd346c19187322211a9afe397566f601393a2cb338b5aeb
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
export NAME=metallb
|
||||
export NAMESPACE=cozy-$(NAME)
|
||||
|
||||
include ../../../scripts/common-envs.mk
|
||||
include ../../../scripts/package.mk
|
||||
|
||||
update:
|
||||
@@ -9,3 +10,25 @@ update:
|
||||
helm repo update metallb
|
||||
helm pull metallb/metallb --untar --untardir charts
|
||||
rm -rf charts/metallb/charts/frr-k8s
|
||||
|
||||
image-controller image-speaker:
|
||||
$(eval TARGET := $(subst image-,,$@))
|
||||
$(eval VERSION := $(shell yq '.appVersion' charts/metallb/Chart.yaml))
|
||||
docker buildx build images/metallb \
|
||||
--provenance false \
|
||||
--target $(TARGET) \
|
||||
--build-arg VERSION=$(VERSION) \
|
||||
--tag $(REGISTRY)/metallb-$(TARGET):$(VERSION) \
|
||||
--cache-from type=registry,ref=$(REGISTRY)/metallb-$(TARGET):latest \
|
||||
--cache-to type=inline \
|
||||
--metadata-file images/$(TARGET).json \
|
||||
--push=$(PUSH) \
|
||||
--label "org.opencontainers.image.source=https://github.com/cozystack/cozystack"
|
||||
--load=1
|
||||
REPOSITORY="$(REGISTRY)/metallb-$(TARGET)" \
|
||||
yq -i '.metallb.$(TARGET).image.repository = strenv(REPOSITORY)' values.yaml
|
||||
TAG=$(VERSION)@$$(yq e '."containerimage.digest"' images/$(TARGET).json -o json -r) \
|
||||
yq -i '.metallb.$(TARGET).image.tag = strenv(TAG)' values.yaml
|
||||
rm -f images/$(TARGET).json
|
||||
|
||||
image: image-controller image-speaker
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
dependencies:
|
||||
- name: crds
|
||||
repository: ""
|
||||
version: 0.14.8
|
||||
version: 0.14.9
|
||||
- name: frr-k8s
|
||||
repository: https://metallb.github.io/frr-k8s
|
||||
version: 0.0.14
|
||||
digest: sha256:8dff488902a5b504a491bbd1a9ab0983a877ff214e163ed74106c73c939a9aa3
|
||||
generated: "2024-07-23T15:22:40.589621+03:00"
|
||||
version: 0.0.16
|
||||
digest: sha256:20d9a53af12c82d35168e7524ae337341b2c7cb43e2169545185f750a718466e
|
||||
generated: "2024-12-17T15:39:32.082324414+01:00"
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
apiVersion: v2
|
||||
appVersion: v0.14.8
|
||||
appVersion: v0.14.9
|
||||
dependencies:
|
||||
- condition: crds.enabled
|
||||
name: crds
|
||||
repository: ""
|
||||
version: 0.14.8
|
||||
version: 0.14.9
|
||||
- condition: frrk8s.enabled
|
||||
name: frr-k8s
|
||||
repository: https://metallb.github.io/frr-k8s
|
||||
version: 0.0.14
|
||||
version: 0.0.16
|
||||
description: A network load-balancer implementation for Kubernetes using standard
|
||||
routing protocols
|
||||
home: https://metallb.universe.tf
|
||||
@@ -18,4 +18,4 @@ name: metallb
|
||||
sources:
|
||||
- https://github.com/metallb/metallb
|
||||
type: application
|
||||
version: 0.14.8
|
||||
version: 0.14.9
|
||||
|
||||
@@ -17,7 +17,7 @@ Kubernetes: `>= 1.19.0-0`
|
||||
| Repository | Name | Version |
|
||||
|------------|------|---------|
|
||||
| | crds | 0.0.0 |
|
||||
| https://metallb.github.io/frr-k8s | frr-k8s | 0.0.14 |
|
||||
| https://metallb.github.io/frr-k8s | frr-k8s | 0.0.16 |
|
||||
|
||||
## Values
|
||||
|
||||
@@ -79,17 +79,17 @@ Kubernetes: `>= 1.19.0-0`
|
||||
| prometheus.podMonitor.relabelings | list | `[]` | |
|
||||
| prometheus.prometheusRule.additionalLabels | object | `{}` | |
|
||||
| prometheus.prometheusRule.addressPoolExhausted.enabled | bool | `true` | |
|
||||
| prometheus.prometheusRule.addressPoolExhausted.labels.severity | string | `"alert"` | |
|
||||
| prometheus.prometheusRule.addressPoolExhausted.labels.severity | string | `"critical"` | |
|
||||
| prometheus.prometheusRule.addressPoolUsage.enabled | bool | `true` | |
|
||||
| prometheus.prometheusRule.addressPoolUsage.thresholds[0].labels.severity | string | `"warning"` | |
|
||||
| prometheus.prometheusRule.addressPoolUsage.thresholds[0].percent | int | `75` | |
|
||||
| prometheus.prometheusRule.addressPoolUsage.thresholds[1].labels.severity | string | `"warning"` | |
|
||||
| prometheus.prometheusRule.addressPoolUsage.thresholds[1].percent | int | `85` | |
|
||||
| prometheus.prometheusRule.addressPoolUsage.thresholds[2].labels.severity | string | `"alert"` | |
|
||||
| prometheus.prometheusRule.addressPoolUsage.thresholds[2].labels.severity | string | `"critical"` | |
|
||||
| prometheus.prometheusRule.addressPoolUsage.thresholds[2].percent | int | `95` | |
|
||||
| prometheus.prometheusRule.annotations | object | `{}` | |
|
||||
| prometheus.prometheusRule.bgpSessionDown.enabled | bool | `true` | |
|
||||
| prometheus.prometheusRule.bgpSessionDown.labels.severity | string | `"alert"` | |
|
||||
| prometheus.prometheusRule.bgpSessionDown.labels.severity | string | `"critical"` | |
|
||||
| prometheus.prometheusRule.configNotLoaded.enabled | bool | `true` | |
|
||||
| prometheus.prometheusRule.configNotLoaded.labels.severity | string | `"warning"` | |
|
||||
| prometheus.prometheusRule.enabled | bool | `false` | |
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
apiVersion: v2
|
||||
appVersion: v0.14.8
|
||||
appVersion: v0.14.9
|
||||
description: MetalLB CRDs
|
||||
home: https://metallb.universe.tf
|
||||
icon: https://metallb.universe.tf/images/logo/metallb-white.png
|
||||
@@ -7,4 +7,4 @@ name: crds
|
||||
sources:
|
||||
- https://github.com/metallb/metallb
|
||||
type: application
|
||||
version: 0.14.8
|
||||
version: 0.14.9
|
||||
|
||||
@@ -2,7 +2,7 @@ apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.14.0
|
||||
controller-gen.kubebuilder.io/version: v0.16.3
|
||||
name: bfdprofiles.metallb.io
|
||||
spec:
|
||||
group: metallb.io
|
||||
@@ -123,7 +123,7 @@ apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.14.0
|
||||
controller-gen.kubebuilder.io/version: v0.16.3
|
||||
name: bgpadvertisements.metallb.io
|
||||
spec:
|
||||
group: metallb.io
|
||||
@@ -329,7 +329,7 @@ apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.14.0
|
||||
controller-gen.kubebuilder.io/version: v0.16.3
|
||||
name: bgppeers.metallb.io
|
||||
spec:
|
||||
conversion:
|
||||
@@ -365,6 +365,8 @@ spec:
|
||||
- jsonPath: .spec.ebgpMultiHop
|
||||
name: Multi Hops
|
||||
type: string
|
||||
deprecated: true
|
||||
deprecationWarning: v1beta1 is deprecated, please use v1beta2
|
||||
name: v1beta1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
@@ -526,15 +528,26 @@ spec:
|
||||
default: false
|
||||
description: To set if we want to disable MP BGP that will separate IPv4 and IPv6 route exchanges into distinct BGP sessions.
|
||||
type: boolean
|
||||
dynamicASN:
|
||||
description: |-
|
||||
DynamicASN detects the AS number to use for the remote end of the session
|
||||
without explicitly setting it via the ASN field. Limited to:
|
||||
internal - if the neighbor's ASN is different than MyASN connection is denied.
|
||||
external - if the neighbor's ASN is the same as MyASN the connection is denied.
|
||||
ASN and DynamicASN are mutually exclusive and one of them must be specified.
|
||||
enum:
|
||||
- internal
|
||||
- external
|
||||
type: string
|
||||
ebgpMultiHop:
|
||||
description: To set if the BGPPeer is multi-hops away. Needed for FRR mode only.
|
||||
type: boolean
|
||||
enableGracefulRestart:
|
||||
description: |-
|
||||
EnableGracefulRestart allows BGP peer to continue to forward data packets along
|
||||
known routes while the routing protocol information is being restored.
|
||||
This field is immutable because it requires restart of the BGP session
|
||||
Supported for FRR mode only.
|
||||
EnableGracefulRestart allows BGP peer to continue to forward data packets
|
||||
along known routes while the routing protocol information is being
|
||||
restored. This field is immutable because it requires restart of the BGP
|
||||
session. Supported for FRR mode only.
|
||||
type: boolean
|
||||
x-kubernetes-validations:
|
||||
- message: EnableGracefulRestart cannot be changed after creation
|
||||
@@ -622,7 +635,9 @@ spec:
|
||||
type: object
|
||||
x-kubernetes-map-type: atomic
|
||||
peerASN:
|
||||
description: AS number to expect from the remote end of the session.
|
||||
description: |-
|
||||
AS number to expect from the remote end of the session.
|
||||
ASN and DynamicASN are mutually exclusive and one of them must be specified.
|
||||
format: int32
|
||||
maximum: 4294967295
|
||||
minimum: 0
|
||||
@@ -649,7 +664,6 @@ spec:
|
||||
type: string
|
||||
required:
|
||||
- myASN
|
||||
- peerASN
|
||||
- peerAddress
|
||||
type: object
|
||||
status:
|
||||
@@ -665,7 +679,7 @@ apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.14.0
|
||||
controller-gen.kubebuilder.io/version: v0.16.3
|
||||
name: communities.metallb.io
|
||||
spec:
|
||||
group: metallb.io
|
||||
@@ -730,7 +744,7 @@ apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.14.0
|
||||
controller-gen.kubebuilder.io/version: v0.16.3
|
||||
name: ipaddresspools.metallb.io
|
||||
spec:
|
||||
group: metallb.io
|
||||
@@ -940,7 +954,7 @@ apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.14.0
|
||||
controller-gen.kubebuilder.io/version: v0.16.3
|
||||
name: l2advertisements.metallb.io
|
||||
spec:
|
||||
group: metallb.io
|
||||
@@ -1120,7 +1134,7 @@ apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.14.0
|
||||
controller-gen.kubebuilder.io/version: v0.16.3
|
||||
name: servicel2statuses.metallb.io
|
||||
spec:
|
||||
group: metallb.io
|
||||
|
||||
@@ -84,7 +84,7 @@ spec:
|
||||
- name: METALLB_DEPLOYMENT
|
||||
value: {{ template "metallb.fullname" . }}-controller
|
||||
{{- end }}
|
||||
{{- if .Values.speaker.frr.enabled }}
|
||||
{{- if and .Values.speaker.enabled .Values.speaker.frr.enabled }}
|
||||
- name: METALLB_BGP_TYPE
|
||||
value: frr
|
||||
{{- end }}
|
||||
|
||||
@@ -36,6 +36,7 @@ spec:
|
||||
relabelings:
|
||||
{{- toYaml .Values.prometheus.podMonitor.relabelings | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- if .Values.speaker.enabled }}
|
||||
---
|
||||
apiVersion: monitoring.coreos.com/v1
|
||||
kind: PodMonitor
|
||||
@@ -74,6 +75,7 @@ spec:
|
||||
relabelings:
|
||||
{{- toYaml .Values.prometheus.podMonitor.relabelings | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
---
|
||||
{{- if .Values.prometheus.rbacPrometheus }}
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
|
||||
@@ -19,8 +19,8 @@ spec:
|
||||
{{- if .Values.prometheus.prometheusRule.staleConfig.enabled }}
|
||||
- alert: MetalLBStaleConfig
|
||||
annotations:
|
||||
message: {{`'{{ $labels.job }} - MetalLB {{ $labels.container }} on {{ $labels.pod
|
||||
}} has a stale config for > 1 minute'`}}
|
||||
summary: {{`'Stale config on {{ $labels.pod }}'`}}
|
||||
description: {{`'{{ $labels.job }} - MetalLB {{ $labels.container }} on {{ $labels.pod }} has a stale config for > 1 minute'`}}
|
||||
expr: metallb_k8s_client_config_stale_bool{job=~"{{ template "metallb.fullname" . }}.*"} == 1
|
||||
for: 1m
|
||||
{{- with .Values.prometheus.prometheusRule.staleConfig.labels }}
|
||||
@@ -31,8 +31,8 @@ spec:
|
||||
{{- if .Values.prometheus.prometheusRule.configNotLoaded.enabled }}
|
||||
- alert: MetalLBConfigNotLoaded
|
||||
annotations:
|
||||
message: {{`'{{ $labels.job }} - MetalLB {{ $labels.container }} on {{ $labels.pod
|
||||
}} has not loaded for > 1 minute'`}}
|
||||
summary: {{`'Config on {{ $labels.pod }} has not been loaded'`}}
|
||||
description: {{`'{{ $labels.job }} - MetalLB {{ $labels.container }} on {{ $labels.pod }} has not loaded for > 1 minute'`}}
|
||||
expr: metallb_k8s_client_config_loaded_bool{job=~"{{ template "metallb.fullname" . }}.*"} == 0
|
||||
for: 1m
|
||||
{{- with .Values.prometheus.prometheusRule.configNotLoaded.labels }}
|
||||
@@ -43,8 +43,8 @@ spec:
|
||||
{{- if .Values.prometheus.prometheusRule.addressPoolExhausted.enabled }}
|
||||
- alert: MetalLBAddressPoolExhausted
|
||||
annotations:
|
||||
message: {{`'{{ $labels.job }} - MetalLB {{ $labels.container }} on {{ $labels.pod
|
||||
}} has exhausted address pool {{ $labels.pool }} for > 1 minute'`}}
|
||||
summary: {{`'Exhausted address pool on {{ $labels.pod }}'`}}
|
||||
description: {{`'{{ $labels.job }} - MetalLB {{ $labels.container }} on {{ $labels.pod }} has exhausted address pool {{ $labels.pool }} for > 1 minute'`}}
|
||||
expr: metallb_allocator_addresses_in_use_total >= on(pool) metallb_allocator_addresses_total
|
||||
for: 1m
|
||||
{{- with .Values.prometheus.prometheusRule.addressPoolExhausted.labels }}
|
||||
@@ -57,8 +57,8 @@ spec:
|
||||
{{- range .Values.prometheus.prometheusRule.addressPoolUsage.thresholds }}
|
||||
- alert: MetalLBAddressPoolUsage{{ .percent }}Percent
|
||||
annotations:
|
||||
message: {{`'{{ $labels.job }} - MetalLB {{ $labels.container }} on {{ $labels.pod
|
||||
}} has address pool {{ $labels.pool }} past `}}{{ .percent }}{{`% usage for > 1 minute'`}}
|
||||
summary: {{`'Exhausted address pool on {{ $labels.pod }}'`}}
|
||||
message: {{`'{{ $labels.job }} - MetalLB {{ $labels.container }} on {{ $labels.pod }} has address pool {{ $labels.pool }} past `}}{{ .percent }}{{`% usage for > 1 minute'`}}
|
||||
expr: ( metallb_allocator_addresses_in_use_total / on(pool) metallb_allocator_addresses_total ) * 100 > {{ .percent }}
|
||||
{{- with .labels }}
|
||||
labels:
|
||||
@@ -69,8 +69,8 @@ spec:
|
||||
{{- if .Values.prometheus.prometheusRule.bgpSessionDown.enabled }}
|
||||
- alert: MetalLBBGPSessionDown
|
||||
annotations:
|
||||
message: {{`'{{ $labels.job }} - MetalLB {{ $labels.container }} on {{ $labels.pod
|
||||
}} has BGP session {{ $labels.peer }} down for > 1 minute'`}}
|
||||
summary: {{`'BGP session down on {{ $labels.pod }}'`}}
|
||||
message: {{`'{{ $labels.job }} - MetalLB {{ $labels.container }} on {{ $labels.pod }} has BGP session {{ $labels.peer }} down for > 1 minute'`}}
|
||||
expr: metallb_bgp_session_up{job=~"{{ template "metallb.fullname" . }}.*"} == 0
|
||||
for: 1m
|
||||
{{- with .Values.prometheus.prometheusRule.bgpSessionDown.labels }}
|
||||
|
||||
@@ -19,11 +19,11 @@ rules:
|
||||
resources: ["events"]
|
||||
verbs: ["create", "patch"]
|
||||
- apiGroups: ["admissionregistration.k8s.io"]
|
||||
resources: ["validatingwebhookconfigurations", "mutatingwebhookconfigurations"]
|
||||
resources: ["validatingwebhookconfigurations"]
|
||||
resourceNames: ["metallb-webhook-configuration"]
|
||||
verbs: ["create", "delete", "get", "list", "patch", "update", "watch"]
|
||||
- apiGroups: ["admissionregistration.k8s.io"]
|
||||
resources: ["validatingwebhookconfigurations", "mutatingwebhookconfigurations"]
|
||||
resources: ["validatingwebhookconfigurations"]
|
||||
verbs: ["list", "watch"]
|
||||
- apiGroups: ["apiextensions.k8s.io"]
|
||||
resources: ["customresourcedefinitions"]
|
||||
@@ -41,6 +41,7 @@ rules:
|
||||
resources: ["subjectaccessreviews"]
|
||||
verbs: ["create"]
|
||||
{{- end }}
|
||||
{{- if .Values.speaker.enabled }}
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
@@ -72,7 +73,7 @@ rules:
|
||||
{{- if or .Values.frrk8s.enabled .Values.frrk8s.external }}
|
||||
- apiGroups: ["frrk8s.metallb.io"]
|
||||
resources: ["frrconfigurations"]
|
||||
verbs: ["get", "list", "watch","create","update"]
|
||||
verbs: ["get", "list", "watch","create","update","delete"]
|
||||
{{- end }}
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
@@ -109,6 +110,7 @@ rules:
|
||||
- apiGroups: ["metallb.io"]
|
||||
resources: ["communities"]
|
||||
verbs: ["get", "list", "watch"]
|
||||
{{- end }}
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: Role
|
||||
@@ -117,7 +119,7 @@ metadata:
|
||||
namespace: {{ .Release.Namespace | quote }}
|
||||
labels: {{- include "metallb.labels" . | nindent 4 }}
|
||||
rules:
|
||||
{{- if .Values.speaker.memberlist.enabled }}
|
||||
{{- if and .Values.speaker.enabled .Values.speaker.memberlist.enabled }}
|
||||
- apiGroups: [""]
|
||||
resources: ["secrets"]
|
||||
verbs: ["create", "get", "list", "watch"]
|
||||
@@ -166,6 +168,7 @@ roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: {{ template "metallb.fullname" . }}:controller
|
||||
{{- if .Values.speaker.enabled }}
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
@@ -195,6 +198,7 @@ roleRef:
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ include "metallb.speaker.serviceAccountName" . }}
|
||||
{{- end }}
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: RoleBinding
|
||||
|
||||
@@ -13,7 +13,7 @@ metadata:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .Values.speaker.serviceAccount.create }}
|
||||
{{- if and .Values.speaker.enabled .Values.speaker.serviceAccount.create }}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
{{- if and .Values.prometheus.serviceMonitor.enabled .Values.prometheus.podMonitor.enabled }}
|
||||
{{- fail "prometheus.serviceMonitor.enabled and prometheus.podMonitor.enabled cannot both be set" }}
|
||||
{{- end }}
|
||||
|
||||
{{- if .Values.prometheus.serviceMonitor.enabled }}
|
||||
{{- if .Values.speaker.enabled }}
|
||||
apiVersion: monitoring.coreos.com/v1
|
||||
kind: ServiceMonitor
|
||||
metadata:
|
||||
@@ -89,6 +94,7 @@ spec:
|
||||
{{- end }}
|
||||
sessionAffinity: None
|
||||
type: ClusterIP
|
||||
{{- end }}
|
||||
---
|
||||
apiVersion: monitoring.coreos.com/v1
|
||||
kind: ServiceMonitor
|
||||
@@ -97,7 +103,6 @@ metadata:
|
||||
namespace: {{ .Release.Namespace | quote }}
|
||||
labels:
|
||||
{{- include "metallb.labels" . | nindent 4 }}
|
||||
app.kubernetes.io/component: speaker
|
||||
{{- if .Values.prometheus.serviceMonitor.controller.additionalLabels }}
|
||||
{{ toYaml .Values.prometheus.serviceMonitor.controller.additionalLabels | indent 4 }}
|
||||
{{- end }}
|
||||
|
||||
@@ -42,7 +42,7 @@ prometheus:
|
||||
# certificate to be used.
|
||||
controllerMetricsTLSSecret: ""
|
||||
|
||||
# prometheus doens't have the permission to scrape all namespaces so we give it permission to scrape metallb's one
|
||||
# prometheus doesn't have the permission to scrape all namespaces so we give it permission to scrape metallb's one
|
||||
rbacPrometheus: true
|
||||
|
||||
# the service account used by prometheus
|
||||
@@ -64,7 +64,7 @@ prometheus:
|
||||
# enable support for Prometheus Operator
|
||||
enabled: false
|
||||
|
||||
# optional additionnal labels for podMonitors
|
||||
# optional additional labels for podMonitors
|
||||
additionalLabels: {}
|
||||
|
||||
# optional annotations for podMonitors
|
||||
@@ -143,7 +143,7 @@ prometheus:
|
||||
# enable alertmanager alerts
|
||||
enabled: false
|
||||
|
||||
# optional additionnal labels for prometheusRules
|
||||
# optional additional labels for prometheusRules
|
||||
additionalLabels: {}
|
||||
|
||||
# optional annotations for prometheusRules
|
||||
@@ -165,7 +165,7 @@ prometheus:
|
||||
addressPoolExhausted:
|
||||
enabled: true
|
||||
labels:
|
||||
severity: alert
|
||||
severity: critical
|
||||
|
||||
addressPoolUsage:
|
||||
enabled: true
|
||||
@@ -178,13 +178,13 @@ prometheus:
|
||||
severity: warning
|
||||
- percent: 95
|
||||
labels:
|
||||
severity: alert
|
||||
severity: critical
|
||||
|
||||
# MetalLBBGPSessionDown
|
||||
bgpSessionDown:
|
||||
enabled: true
|
||||
labels:
|
||||
severity: alert
|
||||
severity: critical
|
||||
|
||||
extraAlerts: []
|
||||
|
||||
|
||||
87
packages/system/metallb/images/metallb/Dockerfile
Normal file
87
packages/system/metallb/images/metallb/Dockerfile
Normal file
@@ -0,0 +1,87 @@
|
||||
# syntax=docker/dockerfile:1.2
|
||||
|
||||
FROM --platform=$BUILDPLATFORM docker.io/golang:1.22.7 AS builder
|
||||
|
||||
ARG VERSION
|
||||
ARG GIT_COMMIT=dev
|
||||
ARG GIT_BRANCH=dev
|
||||
ARG TARGETARCH
|
||||
ARG TARGETOS
|
||||
ARG TARGETPLATFORM
|
||||
|
||||
WORKDIR /go/go.universe.tf/metallb
|
||||
|
||||
RUN --mount=type=cache,target=/go/pkg/mod \
|
||||
curl -sSL https://github.com/metallb/metallb/archive/refs/tags/${VERSION}.tar.gz \
|
||||
| tar -xzvf- --strip=1
|
||||
|
||||
RUN curl -sSLO https://github.com/metallb/metallb/pull/2726.diff && \
|
||||
git apply 2726.diff
|
||||
|
||||
RUN --mount=type=cache,target=/go/pkg/mod \
|
||||
--mount=type=cache,target=/root/.cache/go-build \
|
||||
go mod download -x
|
||||
|
||||
RUN case ${TARGETPLATFORM} in \
|
||||
"linux/arm/v6") export VARIANT="6" ;; \
|
||||
"linux/arm/v7") export VARIANT="7" ;; \
|
||||
*) export VARIANT="" ;; \
|
||||
esac && \
|
||||
CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH GOARM=$VARIANT \
|
||||
go build -v -o /build/controller \
|
||||
-ldflags "-X 'go.universe.tf/metallb/internal/version.gitCommit=${GIT_COMMIT}' \
|
||||
-X 'go.universe.tf/metallb/internal/version.gitBranch=${GIT_BRANCH}'" \
|
||||
./controller \
|
||||
&& \
|
||||
CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH GOARM=$VARIANT \
|
||||
go build -v -o /build/frr-metrics \
|
||||
-ldflags "-X 'go.universe.tf/metallb/internal/version.gitCommit=${GIT_COMMIT}' \
|
||||
-X 'go.universe.tf/metallb/internal/version.gitBranch=${GIT_BRANCH}'" \
|
||||
frr-tools/metrics/exporter.go \
|
||||
&& \
|
||||
CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH GOARM=$VARIANT \
|
||||
go build -v -o /build/cp-tool \
|
||||
-ldflags "-X 'go.universe.tf/metallb/internal/version.gitCommit=${GIT_COMMIT}' \
|
||||
-X 'go.universe.tf/metallb/internal/version.gitBranch=${GIT_BRANCH}'" \
|
||||
frr-tools/cp-tool/cp-tool.go \
|
||||
&& \
|
||||
CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH GOARM=$VARIANT \
|
||||
go build -v -o /build/speaker \
|
||||
-ldflags "-X 'go.universe.tf/metallb/internal/version.gitCommit=${GIT_COMMIT}' \
|
||||
-X 'go.universe.tf/metallb/internal/version.gitBranch=${GIT_BRANCH}'" \
|
||||
./speaker
|
||||
|
||||
FROM gcr.io/distroless/static:latest as controller
|
||||
|
||||
COPY --from=builder /build/controller /controller
|
||||
|
||||
LABEL org.opencontainers.image.authors="metallb" \
|
||||
org.opencontainers.image.url="https://github.com/metallb/metallb" \
|
||||
org.opencontainers.image.documentation="https://metallb.universe.tf" \
|
||||
org.opencontainers.image.source="https://github.com/cozystack/cozystack" \
|
||||
org.opencontainers.image.vendor="metallb" \
|
||||
org.opencontainers.image.licenses="Apache-2.0" \
|
||||
org.opencontainers.image.description="Metallb Controller" \
|
||||
org.opencontainers.image.title="controller" \
|
||||
org.opencontainers.image.base.name="gcr.io/distroless/static:latest"
|
||||
|
||||
ENTRYPOINT ["/controller"]
|
||||
|
||||
FROM gcr.io/distroless/static:latest as speaker
|
||||
|
||||
COPY --from=builder /build/cp-tool /cp-tool
|
||||
COPY --from=builder /build/speaker /speaker
|
||||
COPY --from=builder /build/frr-metrics /frr-metrics
|
||||
COPY --from=builder /go/go.universe.tf/metallb/frr-tools/reloader/frr-reloader.sh /frr-reloader.sh
|
||||
|
||||
LABEL org.opencontainers.image.authors="metallb" \
|
||||
org.opencontainers.image.url="https://github.com/metallb/metallb" \
|
||||
org.opencontainers.image.documentation="https://metallb.universe.tf" \
|
||||
org.opencontainers.image.source="https://github.com/cozystack/cozystack" \
|
||||
org.opencontainers.image.vendor="metallb" \
|
||||
org.opencontainers.image.licenses="Apache-2.0" \
|
||||
org.opencontainers.image.description="Metallb speaker" \
|
||||
org.opencontainers.image.title="speaker" \
|
||||
org.opencontainers.image.base.name="gcr.io/distroless/static:latest"
|
||||
|
||||
ENTRYPOINT ["/speaker"]
|
||||
@@ -1,6 +1,11 @@
|
||||
metallb:
|
||||
crds:
|
||||
enabled: true
|
||||
|
||||
#speaker:
|
||||
# tolerateMaster: false
|
||||
controller:
|
||||
image:
|
||||
repository: ghcr.io/cozystack/cozystack/metallb-controller
|
||||
tag: v0.14.9@sha256:9ae0502f353360bdfe1785871789fc4124f528ab2f94a6ead20479d9d322a423
|
||||
speaker:
|
||||
image:
|
||||
repository: ghcr.io/cozystack/cozystack/metallb-speaker
|
||||
tag: v0.14.9@sha256:64ce9f2c8d351df5054a4a92cce1728589e6570dc0749043311cddd0356871c2
|
||||
|
||||
@@ -21,12 +21,6 @@ import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
)
|
||||
|
||||
const (
|
||||
CozySystemConfigurationHashConfigMapName = "cozy-system-configuration-hash"
|
||||
CozyTenantConfigurationHashConfigMapName = "cozy-tenant-configuration-hash"
|
||||
CozyTenantConfigurationHashKey = "cozyTenantConfigurationHash"
|
||||
)
|
||||
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// ApplicationList is a list of Application objects.
|
||||
|
||||
@@ -988,18 +988,6 @@ func (r *REST) convertApplicationToHelmRelease(app *appsv1alpha1.Application) (*
|
||||
},
|
||||
}
|
||||
|
||||
valuesFromConfigMap := appsv1alpha1.CozyTenantConfigurationHashConfigMapName
|
||||
if helmRelease.Name == "tenant-root" && helmRelease.Namespace == "tenant-root" {
|
||||
valuesFromConfigMap = appsv1alpha1.CozySystemConfigurationHashConfigMapName
|
||||
}
|
||||
helmRelease.Spec.ValuesFrom = []helmv2.ValuesReference{{
|
||||
Kind: "ConfigMap",
|
||||
Name: valuesFromConfigMap,
|
||||
ValuesKey: appsv1alpha1.CozyTenantConfigurationHashKey,
|
||||
TargetPath: appsv1alpha1.CozyTenantConfigurationHashKey,
|
||||
Optional: true,
|
||||
}}
|
||||
|
||||
return helmRelease, nil
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ set -o pipefail
|
||||
set -e
|
||||
|
||||
BUNDLE=$(set -x; kubectl get configmap -n cozy-system cozystack -o 'go-template={{index .data "bundle-name"}}')
|
||||
VERSION=$(find scripts/migrations -mindepth 1 -maxdepth 1 -type f | sort -V | awk -F/ 'END {print $NF+1}')
|
||||
VERSION=10
|
||||
|
||||
run_migrations() {
|
||||
if ! kubectl get configmap -n cozy-system cozystack-version; then
|
||||
@@ -70,7 +70,7 @@ make -C packages/core/platform namespaces-apply
|
||||
ensure_fluxcd
|
||||
|
||||
# Install platform chart
|
||||
make -C packages/core/platform reconcile
|
||||
make -C packages/core/platform apply
|
||||
|
||||
# Install basic charts
|
||||
if ! flux_is_ok; then
|
||||
@@ -93,5 +93,5 @@ done
|
||||
trap 'exit' INT TERM
|
||||
while true; do
|
||||
sleep 60 & wait
|
||||
make -C packages/core/platform reconcile
|
||||
make -C packages/core/platform apply
|
||||
done
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
#!/bin/sh
|
||||
# Migration 10 --> 11
|
||||
|
||||
# Force reconcile hr keycloak-configure
|
||||
if kubectl get helmrelease keycloak-configure -n cozy-keycloak; then
|
||||
kubectl delete po -l app=source-controller -n cozy-fluxcd
|
||||
timestamp=$(date --rfc-3339=ns)
|
||||
kubectl annotate helmrelease keycloak-configure -n cozy-keycloak \
|
||||
reconcile.fluxcd.io/forceAt="$timestamp" \
|
||||
reconcile.fluxcd.io/requestedAt="$timestamp" \
|
||||
--overwrite
|
||||
fi
|
||||
|
||||
# Write version to cozystack-version config
|
||||
kubectl create configmap -n cozy-system cozystack-version --from-literal=version=11 --dry-run=client -o yaml | kubectl apply -f-
|
||||
@@ -1,21 +0,0 @@
|
||||
#!/bin/sh
|
||||
# Migration 11 --> 12
|
||||
|
||||
# Recreate daemonset kube-rbac-proxy
|
||||
|
||||
if kubectl get daemonset kube-rbac-proxy -n cozy-monitoring; then
|
||||
kubectl delete daemonset kube-rbac-proxy --cascade=orphan -n cozy-monitoring
|
||||
fi
|
||||
|
||||
if kubectl get helmrelease monitoring-agents -n cozy-monitoring; then
|
||||
timestamp=$(date --rfc-3339=ns)
|
||||
kubectl annotate helmrelease monitoring-agents -n cozy-monitoring \
|
||||
reconcile.fluxcd.io/forceAt="$timestamp" \
|
||||
reconcile.fluxcd.io/requestedAt="$timestamp" \
|
||||
--overwrite
|
||||
fi
|
||||
|
||||
kubectl delete pods -l app.kubernetes.io/component=kube-rbac-proxy -n cozy-monitoring
|
||||
|
||||
# Write version to cozystack-version config
|
||||
kubectl create configmap -n cozy-system cozystack-version --from-literal=version=12 --dry-run=client -o yaml | kubectl apply -f-
|
||||
Reference in New Issue
Block a user