Compare commits

..

1 Commits

Author SHA1 Message Date
Timofei Larkin
94a6cbfe91 Set replicas type to integer
Signed-off-by: Timofei Larkin <lllamnyp@gmail.com>
2025-04-09 13:41:40 +03:00
273 changed files with 10055 additions and 20510 deletions

2
.github/CODEOWNERS vendored
View File

@@ -1 +1 @@
* @kvaps @lllamnyp @klinch0 * @kvaps @lllamnyp

View File

@@ -1,53 +0,0 @@
name: Automatic Backport
on:
pull_request_target:
types: [closed] # fires when PR is closed (merged)
concurrency:
group: backport-${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true
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 backport
- 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 backportaction)
- name: Checkout repository
uses: actions/checkout@v4
# 3. Create the backport pull request
- name: Create backport 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 }}

View File

@@ -1,26 +1,13 @@
name: Pre-Commit Checks name: Pre-Commit Checks
on: on: [push, pull_request]
pull_request_target:
types: [labeled, opened, synchronize, reopened]
paths-ignore:
- '**.md'
concurrency:
group: pre-commit-${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true
jobs: jobs:
pre-commit: pre-commit:
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
steps: steps:
- name: Checkout code (PR branch) - name: Checkout code
uses: actions/checkout@v3 uses: actions/checkout@v3
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
fetch-tags: true
- name: Set up Python - name: Set up Python
uses: actions/setup-python@v4 uses: actions/setup-python@v4

View File

@@ -1,13 +1,9 @@
name: Releasing PR name: Releasing PR
on: on:
pull_request_target: pull_request:
types: [labeled, opened, synchronize, reopened, closed] types: [labeled, opened, synchronize, reopened, closed]
concurrency:
group: pull-requests-release-${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true
jobs: jobs:
verify: verify:
name: Test Release name: Test Release
@@ -16,19 +12,17 @@ jobs:
contents: read contents: read
packages: write packages: write
# Run only when the PR carries the "release" label and not closed.
if: | 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.action != 'closed' github.event.action != 'closed'
steps: steps:
- name: Checkout code (PR branch) - name: Checkout code
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0 fetch-depth: 0
fetch-tags: true fetch-tags: true
- name: Login to GitHub Container Registry - name: Login to GitHub Container Registry
uses: docker/login-action@v3 uses: docker/login-action@v3
@@ -51,106 +45,32 @@ jobs:
contains(github.event.pull_request.labels.*.name, 'release') contains(github.event.pull_request.labels.*.name, 'release')
steps: steps:
# Extract tag from branch name (branch = release-X.Y.Z*)
- name: Extract tag from branch name - name: Extract tag from branch name
id: get_tag id: get_tag
uses: actions/github-script@v7 uses: actions/github-script@v7
with: with:
script: | script: |
const branch = context.payload.pull_request.head.ref; const branch = context.payload.pull_request.head.ref;
const m = branch.match(/^release-(\d+\.\d+\.\d+(?:[-\w\.]+)?)$/); const match = branch.match(/^release-(v\d+\.\d+\.\d+(?:[-\w\.]+)?)$/);
if (!m) {
core.setFailed(`Branch '${branch}' does not match 'release-X.Y.Z[-suffix]'`); if (!match) {
return; core.setFailed(`Branch '${branch}' does not match expected format 'release-vX.Y.Z[-suffix]'`);
} } else {
const tag = `v${m[1]}`; const tag = match[1];
core.setOutput('tag', tag); core.setOutput('tag', tag);
console.log(`✅ Tag to publish: ${tag}`); console.log(`✅ Extracted tag: ${tag}`);
}
# Checkout merged commit (default ref -> merge SHA)
- name: Checkout repo - name: Checkout repo
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
fetch-depth: 0 fetch-depth: 0
- name: Create tag on merge commit - name: Create tag on merged commit
run: | run: |
git tag -f ${{ steps.get_tag.outputs.tag }} ${{ github.sha }} git tag ${{ steps.get_tag.outputs.tag }} ${{ github.sha }}
git push -f origin ${{ steps.get_tag.outputs.tag }} git push origin ${{ steps.get_tag.outputs.tag }}
# Ensure maintenance branch release-X.Y
- name: Ensure maintenance branch release-X.Y
uses: actions/github-script@v7
with:
script: |
const tag = '${{ steps.get_tag.outputs.tag }}'; // e.g. v0.1.3 or v0.1.3-rc3
const match = tag.match(/^v(\d+)\.(\d+)\.\d+(?:[-\w\.]+)?$/);
if (!match) {
core.setFailed(`❌ tag '${tag}' must match 'vX.Y.Z' or 'vX.Y.Z-suffix'`);
return;
}
const line = `${match[1]}.${match[2]}`;
const branch = `release-${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.rest.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}`);
}
# 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.5rc1
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 - name: Publish draft release
uses: actions/github-script@v7 uses: actions/github-script@v7
with: with:
@@ -158,17 +78,19 @@ jobs:
const tag = '${{ steps.get_tag.outputs.tag }}'; const tag = '${{ steps.get_tag.outputs.tag }}';
const releases = await github.rest.repos.listReleases({ const releases = await github.rest.repos.listReleases({
owner: context.repo.owner, owner: context.repo.owner,
repo: context.repo.repo repo: context.repo.repo
});
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: draft.id,
draft: false,
prerelease: ${{ steps.flags.outputs.is_rc }},
make_latest: '${{ steps.flags.outputs.make_latest }}'
}); });
console.log(`🚀 Published release for ${tag}`); const release = releases.data.find(r => r.tag_name === tag && r.draft);
if (!release) {
throw new Error(`Draft release with tag ${tag} not found`);
}
await github.rest.repos.updateRelease({
owner: context.repo.owner,
repo: context.repo.repo,
release_id: release.id,
draft: false
});
console.log(`✅ Published release for ${tag}`);

View File

@@ -1,13 +1,9 @@
name: Pull Request name: Pull Request
on: on:
pull_request_target: pull_request:
types: [labeled, opened, synchronize, reopened] types: [labeled, opened, synchronize, reopened]
concurrency:
group: pull-requests-${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true
jobs: jobs:
e2e: e2e:
name: Build and Test name: Build and Test
@@ -16,18 +12,16 @@ jobs:
contents: read contents: read
packages: write packages: write
# Never run when the PR carries the "release" label.
if: | 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')
steps: steps:
- name: Checkout code (PR branch) - name: Checkout code
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0 fetch-depth: 0
fetch-tags: true fetch-tags: true
- name: Login to GitHub Container Registry - name: Login to GitHub Container Registry
uses: docker/login-action@v3 uses: docker/login-action@v3
@@ -36,8 +30,10 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }} password: ${{ secrets.GITHUB_TOKEN }}
registry: ghcr.io registry: ghcr.io
- name: Build - name: make build
run: make build run: |
make build
- name: Test - name: make test
run: make test run: |
make test

View File

@@ -3,11 +3,7 @@ name: Versioned Tag
on: on:
push: push:
tags: tags:
- 'v*.*.*' # vX.Y.Z or vX.Y.Z-rcN - 'v*.*.*'
concurrency:
group: tags-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs: jobs:
prepare-release: prepare-release:
@@ -19,7 +15,6 @@ jobs:
pull-requests: write pull-requests: write
steps: steps:
# Check if a non-draft release with this tag already exists
- name: Check if release already exists - name: Check if release already exists
id: check_release id: check_release
uses: actions/github-script@v7 uses: actions/github-script@v7
@@ -28,67 +23,28 @@ jobs:
const tag = context.ref.replace('refs/tags/', ''); const tag = context.ref.replace('refs/tags/', '');
const releases = await github.rest.repos.listReleases({ const releases = await github.rest.repos.listReleases({
owner: context.repo.owner, owner: context.repo.owner,
repo: context.repo.repo repo: context.repo.repo
}); });
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 const existing = releases.data.find(r => r.tag_name === tag && !r.draft);
if (existing) {
core.setOutput('skip', 'true');
} else {
core.setOutput('skip', 'false');
}
- name: Skip if release already exists - name: Skip if release already exists
if: steps.check_release.outputs.skip == 'true' if: steps.check_release.outputs.skip == 'true'
run: echo "Release already exists, skipping workflow." run: echo "Release already exists, skipping workflow."
# Parse tag metadata (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.5rc1
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 releaseX.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: |
const baseRef = context.payload.base_ref;
if (!baseRef) {
core.setFailed(`❌ base_ref is empty. Push the tag via 'git push origin HEAD:refs/tags/<tag>'.`);
return;
}
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);
# Checkout & login once
- name: Checkout code - name: Checkout code
if: steps.check_release.outputs.skip == 'false' if: steps.check_release.outputs.skip == 'false'
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
fetch-depth: 0 fetch-depth: 0
fetch-tags: true fetch-tags: true
- name: Login to GHCR - name: Login to GitHub Container Registry
if: steps.check_release.outputs.skip == 'false' if: steps.check_release.outputs.skip == 'false'
uses: docker/login-action@v3 uses: docker/login-action@v3
with: with:
@@ -96,129 +52,108 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }} password: ${{ secrets.GITHUB_TOKEN }}
registry: ghcr.io registry: ghcr.io
# Build project artifacts
- name: Build - name: Build
if: steps.check_release.outputs.skip == 'false' if: steps.check_release.outputs.skip == 'false'
run: make build run: make build
# Commit built artifacts
- name: Commit release artifacts - name: Commit release artifacts
if: steps.check_release.outputs.skip == 'false' if: steps.check_release.outputs.skip == 'false'
env:
GIT_AUTHOR_NAME: ${{ github.actor }}
GIT_AUTHOR_EMAIL: ${{ github.actor }}@users.noreply.github.com
run: | run: |
git config user.name "github-actions" git config user.name "$GIT_AUTHOR_NAME"
git config user.email "github-actions@github.com" git config user.email "$GIT_AUTHOR_EMAIL"
git add . git add .
git commit -m "Prepare release ${GITHUB_REF#refs/tags/}" -s || echo "No changes to commit" git commit -m "Prepare release ${GITHUB_REF#refs/tags/}" -s || echo "No changes to commit"
git push origin HEAD || true
# 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(`Reusing 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 }}
# Create releaseX.Y.Z branch and push (forceupdate)
- name: Create release branch - name: Create release branch
if: steps.check_release.outputs.skip == 'false' if: steps.check_release.outputs.skip == 'false'
run: | run: |
BRANCH="release-${GITHUB_REF#refs/tags/v}" BRANCH_NAME="release-${GITHUB_REF#refs/tags/v}"
git branch -f "$BRANCH" git branch -f "$BRANCH_NAME"
git push -f origin "$BRANCH" git push origin "$BRANCH_NAME" --force
# Create pull request into original base branch (if absent)
- name: Create pull request if not exists - name: Create pull request if not exists
if: steps.check_release.outputs.skip == 'false' if: steps.check_release.outputs.skip == 'false'
uses: actions/github-script@v7 uses: actions/github-script@v7
with: with:
script: | script: |
const version = context.ref.replace('refs/tags/v', ''); const version = context.ref.replace('refs/tags/v', '');
const base = '${{ steps.get_base.outputs.branch }}'; const branch = `release-${version}`;
const head = `release-${version}`; const base = 'main';
const prs = await github.rest.pulls.list({ const prs = await github.rest.pulls.list({
owner: context.repo.owner, owner: context.repo.owner,
repo: context.repo.repo, repo: context.repo.repo,
head: `${context.repo.owner}:${head}`, head: `${context.repo.owner}:${branch}`,
base base
}); });
if (prs.data.length === 0) { if (prs.data.length === 0) {
const pr = await github.rest.pulls.create({ const newPr = await github.rest.pulls.create({
owner: context.repo.owner, owner: context.repo.owner,
repo: context.repo.repo, repo: context.repo.repo,
head, head: branch,
base, base: base,
title: `Release v${version}`, title: `Release v${version}`,
body: `This PR prepares the release \`v${version}\`.`, body:
`This PR prepares the release \`v${version}\`.\n` +
`(Please merge it before releasing draft)`,
draft: false draft: false
}); });
console.log(`Created pull request #${newPr.data.number} from ${branch} to ${base}`);
await github.rest.issues.addLabels({ await github.rest.issues.addLabels({
owner: context.repo.owner, owner: context.repo.owner,
repo: context.repo.repo, repo: context.repo.repo,
issue_number: pr.data.number, issue_number: newPr.data.number,
labels: ['release'] labels: ['release', 'ok-to-test']
}); });
console.log(`Created PR #${pr.data.number}`);
} else { } else {
console.log(`PR already exists from ${head} to ${base}`); console.log(`Pull request already exists from ${branch} to ${base}`);
} }
- 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);
- name: Build assets
if: steps.check_release.outputs.skip == 'false'
run: make assets
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- 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 }}
- name: Delete pushed tag
if: steps.check_release.outputs.skip == 'false'
run: |
git push --delete origin ${GITHUB_REF#refs/tags/}

View File

@@ -6,13 +6,13 @@ As you get started, you are in the best position to give us feedbacks on areas o
* Problems found while setting up the development environment * Problems found while setting up the development environment
* Gaps in our documentation * Gaps in our documentation
* Bugs in our GitHub actions * Bugs in our Github actions
First, though, it is important that you read the [CNCF Code of Conduct](https://github.com/cncf/foundation/blob/master/code-of-conduct.md). First, though, it is important that you read the [code of conduct](CODE_OF_CONDUCT.md).
The guidelines below are a starting point. We don't want to limit your The guidelines below are a starting point. We don't want to limit your
creativity, passion, and initiative. If you think there's a better way, please creativity, passion, and initiative. If you think there's a better way, please
feel free to bring it up in a GitHub discussion, or open a pull request. We're feel free to bring it up in a Github discussion, or open a pull request. We're
certain there are always better ways to do things, we just need to start some certain there are always better ways to do things, we just need to start some
constructive dialogue! constructive dialogue!
@@ -23,9 +23,9 @@ We welcome many types of contributions including:
* New features * New features
* Builds, CI/CD * Builds, CI/CD
* Bug fixes * Bug fixes
* [Documentation](https://GitHub.com/cozystack/cozystack-website/tree/main) * [Documentation](https://github.com/cozystack/cozystack-website/tree/main)
* Issue Triage * Issue Triage
* Answering questions on Slack or GitHub Discussions * Answering questions on Slack or Github Discussions
* Web design * Web design
* Communications / Social Media / Blog Posts * Communications / Social Media / Blog Posts
* Events participation * Events participation
@@ -34,7 +34,7 @@ We welcome many types of contributions including:
## Ask for Help ## Ask for Help
The best way to reach us with a question when contributing is to drop a line in The best way to reach us with a question when contributing is to drop a line in
our [Telegram channel](https://t.me/cozystack), or start a new GitHub discussion. our [Telegram channel](https://t.me/cozystack), or start a new Github discussion.
## Raising Issues ## Raising Issues

View File

@@ -12,21 +12,20 @@
**Cozystack** is a free PaaS platform and framework for building clouds. **Cozystack** is a free PaaS platform and framework for building clouds.
With Cozystack, you can transform a bunch of servers into an intelligent system with a simple REST API for spawning Kubernetes clusters, With Cozystack, you can transform your bunch of servers into an intelligent system with a simple REST API for spawning Kubernetes clusters, Database-as-a-Service, virtual machines, load balancers, HTTP caching services, and other services with ease.
Database-as-a-Service, virtual machines, load balancers, HTTP caching services, and other services with ease.
Use Cozystack to build your own cloud or provide a cost-effective development environment. You can use Cozystack to build your own cloud or to provide a cost-effective development environments.
## Use-Cases ## Use-Cases
* [**Using Cozystack to build a public cloud**](https://cozystack.io/docs/guides/use-cases/public-cloud/) * [**Using Cozystack to build public cloud**](https://cozystack.io/docs/use-cases/public-cloud/)
You can use Cozystack as a backend for a public cloud You can use Cozystack as backend for a public cloud
* [**Using Cozystack to build a private cloud**](https://cozystack.io/docs/guides/use-cases/private-cloud/) * [**Using Cozystack to build private cloud**](https://cozystack.io/docs/use-cases/private-cloud/)
You can use Cozystack as a platform to build a private cloud powered by Infrastructure-as-Code approach You can use Cozystack as platform to build a private cloud powered by Infrastructure-as-Code approach
* [**Using Cozystack as a Kubernetes distribution**](https://cozystack.io/docs/guides/use-cases/kubernetes-distribution/) * [**Using Cozystack as Kubernetes distribution**](https://cozystack.io/docs/use-cases/kubernetes-distribution/)
You can use Cozystack as a Kubernetes distribution for Bare Metal You can use Cozystack as Kubernetes distribution for Bare Metal
## Screenshot ## Screenshot
@@ -34,11 +33,11 @@ You can use Cozystack as a Kubernetes distribution for Bare Metal
## Documentation ## Documentation
The documentation is located on the [cozystack.io](https://cozystack.io) website. The documentation is located on official [cozystack.io](https://cozystack.io) website.
Read the [Getting Started](https://cozystack.io/docs/getting-started/) section for a quick start. Read [Get Started](https://cozystack.io/docs/get-started/) section for a quick start.
If you encounter any difficulties, start with the [troubleshooting guide](https://cozystack.io/docs/operations/troubleshooting/) and work your way through the process that we've outlined. If you encounter any difficulties, start with the [troubleshooting guide](https://cozystack.io/docs/troubleshooting/), and work your way through the process that we've outlined.
## Versioning ## Versioning
@@ -51,15 +50,15 @@ A full list of the available releases is available in the GitHub repository's [R
Contributions are highly appreciated and very welcomed! Contributions are highly appreciated and very welcomed!
In case of bugs, please check if the issue has already been opened by checking the [GitHub Issues](https://github.com/cozystack/cozystack/issues) section. In case of bugs, please, check if the issue has been already opened by checking the [GitHub Issues](https://github.com/cozystack/cozystack/issues) section.
If it isn't, you can open a new one. A detailed report will help us replicate it, assess it, and work on a fix. In case it isn't, you can open a new one: a detailed report will help us to replicate it, assess it, and work on a fix.
You can express your intention to on the fix on your own. You can express your intention in working on the fix on your own.
Commits are used to generate the changelog, and their author will be referenced in it. Commits are used to generate the changelog, and their author will be referenced in it.
If you have **Feature Requests** please use the [Discussion's Feature Request section](https://github.com/cozystack/cozystack/discussions/categories/feature-requests). In case of **Feature Requests** please use the [Discussion's Feature Request section](https://github.com/cozystack/cozystack/discussions/categories/feature-requests).
You are welcome to join our weekly community meetings (just add this events to your [Google Calendar](https://calendar.google.com/calendar?cid=ZTQzZDIxZTVjOWI0NWE5NWYyOGM1ZDY0OWMyY2IxZTFmNDMzZTJlNjUzYjU2ZGJiZGE3NGNhMzA2ZjBkMGY2OEBncm91cC5jYWxlbmRhci5nb29nbGUuY29t) or [iCal](https://calendar.google.com/calendar/ical/e43d21e5c9b45a95f28c5d649c2cb1e1f433e2e653b56dbbda74ca306f0d0f68%40group.calendar.google.com/public/basic.ics)) or [Telegram group](https://t.me/cozystack). You can join our weekly community meetings (just add this events to your [Google Calendar](https://calendar.google.com/calendar?cid=ZTQzZDIxZTVjOWI0NWE5NWYyOGM1ZDY0OWMyY2IxZTFmNDMzZTJlNjUzYjU2ZGJiZGE3NGNhMzA2ZjBkMGY2OEBncm91cC5jYWxlbmRhci5nb29nbGUuY29t) or [iCal](https://calendar.google.com/calendar/ical/e43d21e5c9b45a95f28c5d649c2cb1e1f433e2e653b56dbbda74ca306f0d0f68%40group.calendar.google.com/public/basic.ics)) or [Telegram group](https://t.me/cozystack).
## License ## License

View File

@@ -178,15 +178,6 @@ func main() {
setupLog.Error(err, "unable to create controller", "controller", "WorkloadMonitor") setupLog.Error(err, "unable to create controller", "controller", "WorkloadMonitor")
os.Exit(1) os.Exit(1)
} }
if err = (&controller.WorkloadReconciler{
Client: mgr.GetClient(),
Scheme: mgr.GetScheme(),
}).SetupWithManager(mgr); err != nil {
setupLog.Error(err, "unable to create controller", "controller", "Workload")
os.Exit(1)
}
// +kubebuilder:scaffold:builder // +kubebuilder:scaffold:builder
if err := mgr.AddHealthzCheck("healthz", healthz.Ping); err != nil { if err := mgr.AddHealthzCheck("healthz", healthz.Ping); err != nil {

View File

@@ -626,7 +626,7 @@
"datasource": { "datasource": {
"uid": "${DS_PROMETHEUS}" "uid": "${DS_PROMETHEUS}"
}, },
"expr": "sum(container_memory_working_set_bytes{namespace=\"$namespace\",container!=\"\",pod=~\".*-controller-.*\"}) by (pod)", "expr": "sum(container_memory_working_set_bytes{namespace=\"$namespace\",container!=\"POD\",container!=\"\",pod=~\".*-controller-.*\"}) by (pod)",
"hide": false, "hide": false,
"interval": "", "interval": "",
"legendFormat": "{{pod}}", "legendFormat": "{{pod}}",

View File

@@ -450,7 +450,7 @@
"uid": "$ds_prometheus" "uid": "$ds_prometheus"
}, },
"editorMode": "code", "editorMode": "code",
"expr": "sum(sum by (node) (rate(container_cpu_usage_seconds_total{container!=\"\",node=~\"$node\"}[$__rate_interval])))\n / sum(sum by (node) (avg_over_time(kube_node_status_allocatable{resource=\"cpu\",unit=\"core\",node=~\"$node\"}[$__rate_interval])))", "expr": "sum(sum by (node) (rate(container_cpu_usage_seconds_total{container!=\"POD\",container!=\"\",node=~\"$node\"}[$__rate_interval])))\n / sum(sum by (node) (avg_over_time(kube_node_status_allocatable{resource=\"cpu\",unit=\"core\",node=~\"$node\"}[$__rate_interval])))",
"hide": false, "hide": false,
"legendFormat": "Total", "legendFormat": "Total",
"range": true, "range": true,
@@ -520,7 +520,7 @@
"uid": "$ds_prometheus" "uid": "$ds_prometheus"
}, },
"editorMode": "code", "editorMode": "code",
"expr": "sum(sum by (node) (container_memory_working_set_bytes:without_kmem{container!=\"\",node=~\"$node\"})) / sum(sum by (node) (avg_over_time(kube_node_status_allocatable{resource=\"memory\",unit=\"byte\",node=~\"$node\"}[$__rate_interval])))", "expr": "sum(sum by (node) (container_memory_working_set_bytes:without_kmem{container!=\"POD\",container!=\"\",node=~\"$node\"})) / sum(sum by (node) (avg_over_time(kube_node_status_allocatable{resource=\"memory\",unit=\"byte\",node=~\"$node\"}[$__rate_interval])))",
"hide": false, "hide": false,
"legendFormat": "Total", "legendFormat": "Total",
"range": true, "range": true,
@@ -590,7 +590,7 @@
"uid": "$ds_prometheus" "uid": "$ds_prometheus"
}, },
"editorMode": "code", "editorMode": "code",
"expr": "sum(sum by (node) (rate(container_cpu_usage_seconds_total{container!=\"\",node=~\"$node\"}[$__rate_interval]))) / sum(sum by (node) (avg_over_time(kube_pod_container_resource_requests{resource=\"cpu\",unit=\"core\",node=~\"$node\"}[$__rate_interval])))", "expr": "sum(sum by (node) (rate(container_cpu_usage_seconds_total{container!=\"POD\",container!=\"\",node=~\"$node\"}[$__rate_interval]))) / sum(sum by (node) (avg_over_time(kube_pod_container_resource_requests{resource=\"cpu\",unit=\"core\",node=~\"$node\"}[$__rate_interval])))",
"hide": false, "hide": false,
"legendFormat": "Total", "legendFormat": "Total",
"range": true, "range": true,
@@ -660,7 +660,7 @@
"uid": "$ds_prometheus" "uid": "$ds_prometheus"
}, },
"editorMode": "code", "editorMode": "code",
"expr": "sum(sum by (node) (container_memory_working_set_bytes:without_kmem{container!=\"\",node=~\"$node\"} )) / sum(sum by (node) (avg_over_time(kube_pod_container_resource_requests{resource=\"memory\",node=~\"$node\"}[$__rate_interval])))", "expr": "sum(sum by (node) (container_memory_working_set_bytes:without_kmem{container!=\"POD\",container!=\"\",node=~\"$node\"} )) / sum(sum by (node) (avg_over_time(kube_pod_container_resource_requests{resource=\"memory\",node=~\"$node\"}[$__rate_interval])))",
"hide": false, "hide": false,
"legendFormat": "__auto", "legendFormat": "__auto",
"range": true, "range": true,
@@ -1128,7 +1128,7 @@
"uid": "$ds_prometheus" "uid": "$ds_prometheus"
}, },
"editorMode": "code", "editorMode": "code",
"expr": "sum by (node) (rate(container_cpu_usage_seconds_total{container!=\"\",node=~\"$node\"}[$__rate_interval]) - on (namespace,pod,container,node) group_left avg by (namespace,pod,container, node)(kube_pod_container_resource_requests{resource=\"cpu\",node=~\"$node\"})) * -1 > 0\n", "expr": "sum by (node) (rate(container_cpu_usage_seconds_total{container!=\"POD\",container!=\"\",node=~\"$node\"}[$__rate_interval]) - on (namespace,pod,container,node) group_left avg by (namespace,pod,container, node)(kube_pod_container_resource_requests{resource=\"cpu\",node=~\"$node\"})) * -1 > 0\n",
"format": "time_series", "format": "time_series",
"hide": false, "hide": false,
"intervalFactor": 1, "intervalFactor": 1,
@@ -1143,7 +1143,7 @@
"uid": "$ds_prometheus" "uid": "$ds_prometheus"
}, },
"editorMode": "code", "editorMode": "code",
"expr": "sum(sum by (node) (rate(container_cpu_usage_seconds_total{container!=\"\",node=~\"$node\"}[$__rate_interval]) - on (namespace,pod,container,node) group_left avg by (namespace,pod,container, node)(kube_pod_container_resource_requests{resource=\"cpu\",node=~\"$node\"})) * -1 > 0)", "expr": "sum(sum by (node) (rate(container_cpu_usage_seconds_total{container!=\"POD\",container!=\"\",node=~\"$node\"}[$__rate_interval]) - on (namespace,pod,container,node) group_left avg by (namespace,pod,container, node)(kube_pod_container_resource_requests{resource=\"cpu\",node=~\"$node\"})) * -1 > 0)",
"hide": false, "hide": false,
"legendFormat": "Total", "legendFormat": "Total",
"range": true, "range": true,
@@ -1527,7 +1527,7 @@
"uid": "$ds_prometheus" "uid": "$ds_prometheus"
}, },
"editorMode": "code", "editorMode": "code",
"expr": "(sum by (node) (container_memory_working_set_bytes:without_kmem{container!=\"\",node=~\"$node\"} ) - sum by (node) (kube_pod_container_resource_requests{resource=\"memory\",node=~\"$node\"})) * -1 > 0\n", "expr": "(sum by (node) (container_memory_working_set_bytes:without_kmem{container!=\"POD\",container!=\"\",node=~\"$node\"} ) - sum by (node) (kube_pod_container_resource_requests{resource=\"memory\",node=~\"$node\"})) * -1 > 0\n",
"format": "time_series", "format": "time_series",
"hide": false, "hide": false,
"intervalFactor": 1, "intervalFactor": 1,
@@ -1542,7 +1542,7 @@
"uid": "$ds_prometheus" "uid": "$ds_prometheus"
}, },
"editorMode": "code", "editorMode": "code",
"expr": "sum((sum by (node) (container_memory_working_set_bytes:without_kmem{container!=\"\",node=~\"$node\"} ) - sum by (node) (kube_pod_container_resource_requests{resource=\"memory\",node=~\"$node\"})) * -1 > 0)", "expr": "sum((sum by (node) (container_memory_working_set_bytes:without_kmem{container!=\"POD\",container!=\"\",node=~\"$node\"} ) - sum by (node) (kube_pod_container_resource_requests{resource=\"memory\",node=~\"$node\"})) * -1 > 0)",
"hide": false, "hide": false,
"legendFormat": "Total", "legendFormat": "Total",
"range": true, "range": true,
@@ -1909,7 +1909,7 @@
}, },
"editorMode": "code", "editorMode": "code",
"exemplar": false, "exemplar": false,
"expr": "topk(10, (sum by (namespace,pod,container)((rate(container_cpu_usage_seconds_total{namespace=~\"$namespace\",container!=\"\",node=~\"$node\"}[$__rate_interval])) - on (namespace,pod,container) group_left avg by (namespace,pod,container)(kube_pod_container_resource_requests{resource=\"cpu\",node=~\"$node\"}))) * -1 > 0)\n", "expr": "topk(10, (sum by (namespace,pod,container)((rate(container_cpu_usage_seconds_total{namespace=~\"$namespace\",container!=\"POD\",container!=\"\",node=~\"$node\"}[$__rate_interval])) - on (namespace,pod,container) group_left avg by (namespace,pod,container)(kube_pod_container_resource_requests{resource=\"cpu\",node=~\"$node\"}))) * -1 > 0)\n",
"format": "table", "format": "table",
"instant": true, "instant": true,
"range": false, "range": false,
@@ -2037,7 +2037,7 @@
}, },
"editorMode": "code", "editorMode": "code",
"exemplar": false, "exemplar": false,
"expr": "topk(10, (sum by (namespace,container,pod) (container_memory_working_set_bytes:without_kmem{container!=\"\",namespace=~\"$namespace\",node=~\"$node\"}) - on (namespace,pod,container) avg by (namespace,pod,container)(kube_pod_container_resource_requests{resource=\"memory\",namespace=~\"$namespace\",node=~\"$node\"})) * -1 >0)\n", "expr": "topk(10, (sum by (namespace,container,pod) (container_memory_working_set_bytes:without_kmem{container!=\"POD\",container!=\"\",namespace=~\"$namespace\",node=~\"$node\"}) - on (namespace,pod,container) avg by (namespace,pod,container)(kube_pod_container_resource_requests{resource=\"memory\",namespace=~\"$namespace\",node=~\"$node\"})) * -1 >0)\n",
"format": "table", "format": "table",
"instant": true, "instant": true,
"range": false, "range": false,
@@ -2160,7 +2160,7 @@
}, },
"editorMode": "code", "editorMode": "code",
"exemplar": false, "exemplar": false,
"expr": "topk(10, (sum by (namespace,pod,container)((rate(container_cpu_usage_seconds_total{namespace=~\"$namespace\",container!=\"\",node=~\"$node\"}[$__rate_interval])) - on (namespace,pod,container) group_left avg by (namespace,pod,container)(kube_pod_container_resource_requests{resource=\"cpu\",node=~\"$node\"}))) > 0)\n", "expr": "topk(10, (sum by (namespace,pod,container)((rate(container_cpu_usage_seconds_total{namespace=~\"$namespace\",container!=\"POD\",container!=\"\",node=~\"$node\"}[$__rate_interval])) - on (namespace,pod,container) group_left avg by (namespace,pod,container)(kube_pod_container_resource_requests{resource=\"cpu\",node=~\"$node\"}))) > 0)\n",
"format": "table", "format": "table",
"instant": true, "instant": true,
"range": false, "range": false,
@@ -2288,7 +2288,7 @@
}, },
"editorMode": "code", "editorMode": "code",
"exemplar": false, "exemplar": false,
"expr": "topk(10, (sum by (namespace,container,pod) (container_memory_working_set_bytes:without_kmem{container!=\"\",namespace=~\"$namespace\",node=~\"$node\"}) - on (namespace,pod,container) avg by (namespace,pod,container)(kube_pod_container_resource_requests{resource=\"memory\",namespace=~\"$namespace\",node=~\"$node\"})) >0)\n", "expr": "topk(10, (sum by (namespace,container,pod) (container_memory_working_set_bytes:without_kmem{container!=\"POD\",container!=\"\",namespace=~\"$namespace\",node=~\"$node\"}) - on (namespace,pod,container) avg by (namespace,pod,container)(kube_pod_container_resource_requests{resource=\"memory\",namespace=~\"$namespace\",node=~\"$node\"})) >0)\n",
"format": "table", "format": "table",
"instant": true, "instant": true,
"range": false, "range": false,

View File

@@ -684,7 +684,7 @@
"type": "prometheus", "type": "prometheus",
"uid": "${ds_prometheus}" "uid": "${ds_prometheus}"
}, },
"expr": "(\n sum by (pod) (avg_over_time(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller=\"$controller\", pod=~\"$pod\"}[$__range])) \n * on (pod)\n sum by (pod) (rate(container_cpu_usage_seconds_total{node=~\"$node\", container!=\"\", namespace=\"$namespace\", pod=~\"$pod\"}[$__range]))\n)\nor\nsum by (pod) (avg_over_time(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller=\"$controller\", pod=~\"$pod\"}[$__range]) * 0)", "expr": "(\n sum by (pod) (avg_over_time(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller=\"$controller\", pod=~\"$pod\"}[$__range])) \n * on (pod)\n sum by (pod) (rate(container_cpu_usage_seconds_total{node=~\"$node\", container!=\"POD\", namespace=\"$namespace\", pod=~\"$pod\"}[$__range]))\n)\nor\nsum by (pod) (avg_over_time(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller=\"$controller\", pod=~\"$pod\"}[$__range]) * 0)",
"format": "table", "format": "table",
"hide": false, "hide": false,
"instant": true, "instant": true,
@@ -710,7 +710,7 @@
"type": "prometheus", "type": "prometheus",
"uid": "${ds_prometheus}" "uid": "${ds_prometheus}"
}, },
"expr": "sum by (pod)\n(\n avg_over_time(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller=\"$controller\", pod=~\"$pod\"}[$__range])\n * on (controller_type, controller_name) group_left()\n sum by (controller_type, controller_name) (avg_over_time(vpa_target_recommendation{container!=\"\", namespace=\"$namespace\", resource=\"cpu\"}[$__range]))\n)\nor\nsum by (pod) (avg_over_time(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller=\"$controller\", pod=~\"$pod\"}[$__range]) * 0)", "expr": "sum by (pod)\n(\n avg_over_time(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller=\"$controller\", pod=~\"$pod\"}[$__range])\n * on (controller_type, controller_name) group_left()\n sum by (controller_type, controller_name) (avg_over_time(vpa_target_recommendation{container!=\"POD\", namespace=\"$namespace\", resource=\"cpu\"}[$__range]))\n)\nor\nsum by (pod) (avg_over_time(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller=\"$controller\", pod=~\"$pod\"}[$__range]) * 0)",
"format": "table", "format": "table",
"hide": false, "hide": false,
"instant": true, "instant": true,
@@ -723,7 +723,7 @@
"type": "prometheus", "type": "prometheus",
"uid": "${ds_prometheus}" "uid": "${ds_prometheus}"
}, },
"expr": "(\n sum by (pod) (avg_over_time(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller=\"$controller\", pod=~\"$pod\"}[$__range])) \n * on (pod)\n sum by (pod)\n (\n sum by (namespace, pod) (avg_over_time(kube_pod_container_resource_requests{resource=\"cpu\",unit=\"core\",node=~\"$node\", namespace=\"$namespace\", pod=~\"$pod\"}[$__range]))\n -\n sum by (namespace, pod) (rate(container_cpu_usage_seconds_total{node=~\"$node\", namespace=\"$namespace\", pod=~\"$pod\", container!=\"\"}[$__range]))\n ) > 0\n)\nor\nsum by (pod) (avg_over_time(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller=\"$controller\", pod=~\"$pod\"}[$__range]) * 0)", "expr": "(\n sum by (pod) (avg_over_time(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller=\"$controller\", pod=~\"$pod\"}[$__range])) \n * on (pod)\n sum by (pod)\n (\n sum by (namespace, pod) (avg_over_time(kube_pod_container_resource_requests{resource=\"cpu\",unit=\"core\",node=~\"$node\", namespace=\"$namespace\", pod=~\"$pod\"}[$__range]))\n -\n sum by (namespace, pod) (rate(container_cpu_usage_seconds_total{node=~\"$node\", namespace=\"$namespace\", pod=~\"$pod\", container!=\"POD\"}[$__range]))\n ) > 0\n)\nor\nsum by (pod) (avg_over_time(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller=\"$controller\", pod=~\"$pod\"}[$__range]) * 0)",
"format": "table", "format": "table",
"hide": false, "hide": false,
"instant": true, "instant": true,
@@ -736,7 +736,7 @@
"type": "prometheus", "type": "prometheus",
"uid": "${ds_prometheus}" "uid": "${ds_prometheus}"
}, },
"expr": "(\n sum by (pod) (avg_over_time(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller=\"$controller\", pod=~\"$pod\"}[$__range])) \n * on (pod)\n sum by (pod) \n (\n (\n (\n sum by (namespace, pod) (rate(container_cpu_usage_seconds_total{node=~\"$node\", namespace=\"$namespace\", pod=~\"$pod\"}[$__range]))\n -\n sum by (namespace, pod) (avg_over_time(kube_pod_container_resource_requests{resource=\"cpu\",unit=\"core\",node=~\"$node\", namespace=\"$namespace\", pod=~\"$pod\", container!=\"\"}[$__range]))\n ) or sum by (namespace, pod) (rate(container_cpu_usage_seconds_total{node=~\"$node\", namespace=\"$namespace\", pod=~\"$pod\", container!=\"\"}[$__range]))\n ) > 0\n )\n)\nor\nsum by (pod) (avg_over_time(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller=\"$controller\", pod=~\"$pod\"}[$__range]) * 0)", "expr": "(\n sum by (pod) (avg_over_time(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller=\"$controller\", pod=~\"$pod\"}[$__range])) \n * on (pod)\n sum by (pod) \n (\n (\n (\n sum by (namespace, pod) (rate(container_cpu_usage_seconds_total{node=~\"$node\", namespace=\"$namespace\", pod=~\"$pod\"}[$__range]))\n -\n sum by (namespace, pod) (avg_over_time(kube_pod_container_resource_requests{resource=\"cpu\",unit=\"core\",node=~\"$node\", namespace=\"$namespace\", pod=~\"$pod\", container!=\"POD\"}[$__range]))\n ) or sum by (namespace, pod) (rate(container_cpu_usage_seconds_total{node=~\"$node\", namespace=\"$namespace\", pod=~\"$pod\", container!=\"POD\"}[$__range]))\n ) > 0\n )\n)\nor\nsum by (pod) (avg_over_time(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller=\"$controller\", pod=~\"$pod\"}[$__range]) * 0)",
"format": "table", "format": "table",
"hide": false, "hide": false,
"instant": true, "instant": true,
@@ -762,7 +762,7 @@
"type": "prometheus", "type": "prometheus",
"uid": "${ds_prometheus}" "uid": "${ds_prometheus}"
}, },
"expr": "(\n sum by (pod) (avg_over_time(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller=\"$controller\", pod=~\"$pod\"}[$__range])) \n * on (pod)\n sum by (pod) (avg_over_time(container_memory_working_set_bytes:without_kmem{node=~\"$node\", container!=\"\", namespace=\"$namespace\", pod=~\"$pod\"}[$__range]))\n)\nor\nsum by (pod) (avg_over_time(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller=\"$controller\", pod=~\"$pod\"}[$__range]) * 0)", "expr": "(\n sum by (pod) (avg_over_time(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller=\"$controller\", pod=~\"$pod\"}[$__range])) \n * on (pod)\n sum by (pod) (avg_over_time(container_memory_working_set_bytes:without_kmem{node=~\"$node\", container!=\"POD\", namespace=\"$namespace\", pod=~\"$pod\"}[$__range]))\n)\nor\nsum by (pod) (avg_over_time(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller=\"$controller\", pod=~\"$pod\"}[$__range]) * 0)",
"format": "table", "format": "table",
"instant": true, "instant": true,
"intervalFactor": 1, "intervalFactor": 1,
@@ -786,7 +786,7 @@
"type": "prometheus", "type": "prometheus",
"uid": "${ds_prometheus}" "uid": "${ds_prometheus}"
}, },
"expr": "sum by (pod)\n(\n avg_over_time(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller=\"$controller\", pod=~\"$pod\"}[$__range])\n * on (controller_type, controller_name) group_left()\n sum by (controller_type, controller_name) (avg_over_time(vpa_target_recommendation{container!=\"\", namespace=\"$namespace\", resource=\"memory\"}[$__range]))\n)\nor\nsum by (pod) (avg_over_time(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller=\"$controller\", pod=~\"$pod\"}[$__range]) * 0)", "expr": "sum by (pod)\n(\n avg_over_time(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller=\"$controller\", pod=~\"$pod\"}[$__range])\n * on (controller_type, controller_name) group_left()\n sum by (controller_type, controller_name) (avg_over_time(vpa_target_recommendation{container!=\"POD\", namespace=\"$namespace\", resource=\"memory\"}[$__range]))\n)\nor\nsum by (pod) (avg_over_time(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller=\"$controller\", pod=~\"$pod\"}[$__range]) * 0)",
"format": "table", "format": "table",
"instant": true, "instant": true,
"intervalFactor": 1, "intervalFactor": 1,
@@ -798,7 +798,7 @@
"type": "prometheus", "type": "prometheus",
"uid": "${ds_prometheus}" "uid": "${ds_prometheus}"
}, },
"expr": "(\n sum by (pod) (avg_over_time(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller=\"$controller\", pod=~\"$pod\"}[$__range])) \n * on (pod)\n sum by (pod)\n (\n (\n (\n sum by (namespace, pod) (avg_over_time(kube_pod_container_resource_requests{resource=\"memory\",unit=\"byte\",node=~\"$node\", namespace=\"$namespace\", pod=~\"$pod\"}[$__range]))\n -\n sum by (namespace, pod) (avg_over_time(container_memory_working_set_bytes:without_kmem{node=~\"$node\", namespace=\"$namespace\", pod=~\"$pod\", container!=\"\"}[$__range]))\n ) > 0\n )\n )\n)\nor\nsum by (pod) (avg_over_time(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller=\"$controller\", pod=~\"$pod\"}[$__range]) * 0)", "expr": "(\n sum by (pod) (avg_over_time(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller=\"$controller\", pod=~\"$pod\"}[$__range])) \n * on (pod)\n sum by (pod)\n (\n (\n (\n sum by (namespace, pod) (avg_over_time(kube_pod_container_resource_requests{resource=\"memory\",unit=\"byte\",node=~\"$node\", namespace=\"$namespace\", pod=~\"$pod\"}[$__range]))\n -\n sum by (namespace, pod) (avg_over_time(container_memory_working_set_bytes:without_kmem{node=~\"$node\", namespace=\"$namespace\", pod=~\"$pod\", container!=\"POD\"}[$__range]))\n ) > 0\n )\n )\n)\nor\nsum by (pod) (avg_over_time(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller=\"$controller\", pod=~\"$pod\"}[$__range]) * 0)",
"format": "table", "format": "table",
"instant": true, "instant": true,
"intervalFactor": 1, "intervalFactor": 1,
@@ -810,7 +810,7 @@
"type": "prometheus", "type": "prometheus",
"uid": "${ds_prometheus}" "uid": "${ds_prometheus}"
}, },
"expr": "(\n sum by (pod) (avg_over_time(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller=\"$controller\", pod=~\"$pod\"}[$__range])) \n * on (pod)\n sum by (pod)\n (\n (\n (\n sum by (namespace, pod) (avg_over_time(container_memory_working_set_bytes:without_kmem{node=~\"$node\", namespace=\"$namespace\", pod=~\"$pod\"}[$__range]))\n -\n sum by (namespace, pod) (avg_over_time(kube_pod_container_resource_requests{resource=\"memory\",unit=\"byte\",node=~\"$node\", namespace=\"$namespace\", pod=~\"$pod\", container!=\"\"}[$__range]))\n ) or sum by (namespace, pod) (avg_over_time(container_memory_working_set_bytes:without_kmem{node=~\"$node\", namespace=\"$namespace\", pod=~\"$pod\", container!=\"\"}[$__range]))\n ) > 0\n )\n)\nor\nsum by (pod) (avg_over_time(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller=\"$controller\", pod=~\"$pod\"}[$__range]) * 0)", "expr": "(\n sum by (pod) (avg_over_time(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller=\"$controller\", pod=~\"$pod\"}[$__range])) \n * on (pod)\n sum by (pod)\n (\n (\n (\n sum by (namespace, pod) (avg_over_time(container_memory_working_set_bytes:without_kmem{node=~\"$node\", namespace=\"$namespace\", pod=~\"$pod\"}[$__range]))\n -\n sum by (namespace, pod) (avg_over_time(kube_pod_container_resource_requests{resource=\"memory\",unit=\"byte\",node=~\"$node\", namespace=\"$namespace\", pod=~\"$pod\", container!=\"POD\"}[$__range]))\n ) or sum by (namespace, pod) (avg_over_time(container_memory_working_set_bytes:without_kmem{node=~\"$node\", namespace=\"$namespace\", pod=~\"$pod\", container!=\"POD\"}[$__range]))\n ) > 0\n )\n)\nor\nsum by (pod) (avg_over_time(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller=\"$controller\", pod=~\"$pod\"}[$__range]) * 0)",
"format": "table", "format": "table",
"instant": true, "instant": true,
"intervalFactor": 1, "intervalFactor": 1,
@@ -848,7 +848,7 @@
"type": "prometheus", "type": "prometheus",
"uid": "${ds_prometheus}" "uid": "${ds_prometheus}"
}, },
"expr": "(\n sum by (pod) (avg_over_time(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller=\"$controller\", pod=~\"$pod\"}[$__range])) \n * on (pod)\n sum by (pod) (rate(container_fs_reads_total{node=~\"$node\", container!=\"\", namespace=\"$namespace\", pod=~\"$pod\"}[$__range]))\n)\nor\nsum by (pod) (avg_over_time(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller=\"$controller\", pod=~\"$pod\"}[$__range]) * 0)", "expr": "(\n sum by (pod) (avg_over_time(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller=\"$controller\", pod=~\"$pod\"}[$__range])) \n * on (pod)\n sum by (pod) (rate(container_fs_reads_total{node=~\"$node\", container!=\"POD\", namespace=\"$namespace\", pod=~\"$pod\"}[$__range]))\n)\nor\nsum by (pod) (avg_over_time(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller=\"$controller\", pod=~\"$pod\"}[$__range]) * 0)",
"format": "table", "format": "table",
"instant": true, "instant": true,
"intervalFactor": 1, "intervalFactor": 1,
@@ -860,7 +860,7 @@
"type": "prometheus", "type": "prometheus",
"uid": "${ds_prometheus}" "uid": "${ds_prometheus}"
}, },
"expr": "(\n sum by (pod) (avg_over_time(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller=\"$controller\", pod=~\"$pod\"}[$__range])) \n * on (pod)\n sum by (pod) (rate(container_fs_writes_total{node=~\"$node\", container!=\"\", namespace=\"$namespace\", pod=~\"$pod\"}[$__range]))\n)\nor\nsum by (pod) (avg_over_time(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller=\"$controller\", pod=~\"$pod\"}[$__range]) * 0)", "expr": "(\n sum by (pod) (avg_over_time(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller=\"$controller\", pod=~\"$pod\"}[$__range])) \n * on (pod)\n sum by (pod) (rate(container_fs_writes_total{node=~\"$node\", container!=\"POD\", namespace=\"$namespace\", pod=~\"$pod\"}[$__range]))\n)\nor\nsum by (pod) (avg_over_time(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller=\"$controller\", pod=~\"$pod\"}[$__range]) * 0)",
"format": "table", "format": "table",
"instant": true, "instant": true,
"intervalFactor": 1, "intervalFactor": 1,
@@ -1315,7 +1315,7 @@
"uid": "$ds_prometheus" "uid": "$ds_prometheus"
}, },
"editorMode": "code", "editorMode": "code",
"expr": "sum by(pod) (\n max(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller=\"$controller\", pod=~\"$pod\"}) by(pod)\n * on (pod)\n sum by (pod) (rate(container_cpu_usage_seconds_total{node=~\"$node\", container!=\"\", pod=~\"$pod\", namespace=\"$namespace\"}[$__rate_interval]))\n)", "expr": "sum by(pod) (\n max(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller=\"$controller\", pod=~\"$pod\"}) by(pod)\n * on (pod)\n sum by (pod) (rate(container_cpu_usage_seconds_total{node=~\"$node\", container!=\"POD\", pod=~\"$pod\", namespace=\"$namespace\"}[$__rate_interval]))\n)",
"format": "time_series", "format": "time_series",
"instant": false, "instant": false,
"intervalFactor": 1, "intervalFactor": 1,
@@ -1488,7 +1488,7 @@
"uid": "$ds_prometheus" "uid": "$ds_prometheus"
}, },
"editorMode": "code", "editorMode": "code",
"expr": "sum (\n max(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller=\"$controller\", pod=~\"$pod\"}) by(pod)\n * on (pod)\n sum by (pod) (rate(container_cpu_system_seconds_total{node=~\"$node\", container!=\"\", pod=~\"$pod\", namespace=\"$namespace\"}[$__rate_interval]))\n)", "expr": "sum (\n max(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller=\"$controller\", pod=~\"$pod\"}) by(pod)\n * on (pod)\n sum by (pod) (rate(container_cpu_system_seconds_total{node=~\"$node\", container!=\"POD\", pod=~\"$pod\", namespace=\"$namespace\"}[$__rate_interval]))\n)",
"format": "time_series", "format": "time_series",
"interval": "", "interval": "",
"intervalFactor": 1, "intervalFactor": 1,
@@ -1502,7 +1502,7 @@
"uid": "$ds_prometheus" "uid": "$ds_prometheus"
}, },
"editorMode": "code", "editorMode": "code",
"expr": "sum (\n max(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller=\"$controller\", pod=~\"$pod\"}) by(pod)\n * on (pod)\n sum by (pod) (rate(container_cpu_user_seconds_total{node=~\"$node\", container!=\"\", pod=~\"$pod\", namespace=\"$namespace\"}[$__rate_interval]))\n)", "expr": "sum (\n max(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller=\"$controller\", pod=~\"$pod\"}) by(pod)\n * on (pod)\n sum by (pod) (rate(container_cpu_user_seconds_total{node=~\"$node\", container!=\"POD\", pod=~\"$pod\", namespace=\"$namespace\"}[$__rate_interval]))\n)",
"format": "time_series", "format": "time_series",
"interval": "", "interval": "",
"intervalFactor": 1, "intervalFactor": 1,
@@ -1642,7 +1642,7 @@
"uid": "$ds_prometheus" "uid": "$ds_prometheus"
}, },
"editorMode": "code", "editorMode": "code",
"expr": "sum by (pod)\n (\n max(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller=\"$controller\", pod=~\"$pod\"}) by(pod)\n * on (pod)\n sum by (pod) (\n sum by(namespace, pod, container) (avg_over_time(kube_pod_container_resource_requests{resource=\"cpu\",unit=\"core\",node=~\"$node\", namespace=\"$namespace\", pod=~\"$pod\"}[$__rate_interval]))\n -\n sum by(namespace, pod, container) (rate(container_cpu_usage_seconds_total{node=~\"$node\", container!=\"\", namespace=\"$namespace\", pod=~\"$pod\"}[$__rate_interval]))\n ) > 0\n )", "expr": "sum by (pod)\n (\n max(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller=\"$controller\", pod=~\"$pod\"}) by(pod)\n * on (pod)\n sum by (pod) (\n sum by(namespace, pod, container) (avg_over_time(kube_pod_container_resource_requests{resource=\"cpu\",unit=\"core\",node=~\"$node\", namespace=\"$namespace\", pod=~\"$pod\"}[$__rate_interval]))\n -\n sum by(namespace, pod, container) (rate(container_cpu_usage_seconds_total{node=~\"$node\", container!=\"POD\", namespace=\"$namespace\", pod=~\"$pod\"}[$__rate_interval]))\n ) > 0\n )",
"format": "time_series", "format": "time_series",
"intervalFactor": 1, "intervalFactor": 1,
"legendFormat": "{{ pod }}", "legendFormat": "{{ pod }}",
@@ -1779,7 +1779,7 @@
"uid": "$ds_prometheus" "uid": "$ds_prometheus"
}, },
"editorMode": "code", "editorMode": "code",
"expr": " (\n max(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller=\"$controller\", pod=~\"$pod\"}) by(pod)\n * on (pod)\n sum by (pod) (\n (\n sum by(namespace, pod, container) (rate(container_cpu_usage_seconds_total{node=~\"$node\", namespace=\"$namespace\", pod=~\"$pod\"}[$__rate_interval]))\n -\n sum by(namespace, pod, container) (avg_over_time(kube_pod_container_resource_requests{resource=\"cpu\",unit=\"core\",node=~\"$node\", namespace=\"$namespace\", pod=~\"$pod\", container!=\"\"}[$__rate_interval]))\n )\n or\n sum by(namespace, pod, container) (rate(container_cpu_usage_seconds_total{node=~\"$node\", namespace=\"$namespace\", pod=~\"$pod\"}[$__rate_interval]))\n )\n) > 0", "expr": " (\n max(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller=\"$controller\", pod=~\"$pod\"}) by(pod)\n * on (pod)\n sum by (pod) (\n (\n sum by(namespace, pod, container) (rate(container_cpu_usage_seconds_total{node=~\"$node\", namespace=\"$namespace\", pod=~\"$pod\"}[$__rate_interval]))\n -\n sum by(namespace, pod, container) (avg_over_time(kube_pod_container_resource_requests{resource=\"cpu\",unit=\"core\",node=~\"$node\", namespace=\"$namespace\", pod=~\"$pod\", container!=\"POD\"}[$__rate_interval]))\n )\n or\n sum by(namespace, pod, container) (rate(container_cpu_usage_seconds_total{node=~\"$node\", namespace=\"$namespace\", pod=~\"$pod\"}[$__rate_interval]))\n )\n) > 0",
"format": "time_series", "format": "time_series",
"hide": false, "hide": false,
"intervalFactor": 1, "intervalFactor": 1,
@@ -2095,7 +2095,7 @@
"repeatDirection": "h", "repeatDirection": "h",
"targets": [ "targets": [
{ {
"expr": "sum by(pod) (rate(container_cpu_usage_seconds_total{node=~\"$node\", container!=\"\", pod=\"$pod\", namespace=\"$namespace\"}[$__rate_interval]))", "expr": "sum by(pod) (rate(container_cpu_usage_seconds_total{node=~\"$node\", container!=\"POD\", pod=\"$pod\", namespace=\"$namespace\"}[$__rate_interval]))",
"format": "time_series", "format": "time_series",
"intervalFactor": 1, "intervalFactor": 1,
"legendFormat": "Usage", "legendFormat": "Usage",
@@ -2109,7 +2109,7 @@
"refId": "D" "refId": "D"
}, },
{ {
"expr": "sum by (pod)\n(\n kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller=\"$controller\", pod=~\"$pod\"}\n * on (controller_type, controller_name) group_left()\n sum by (controller_type, controller_name) (avg_over_time(vpa_target_recommendation{container!=\"\", namespace=\"$namespace\", resource=\"cpu\"}[$__rate_interval]))\n)", "expr": "sum by (pod)\n(\n kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller=\"$controller\", pod=~\"$pod\"}\n * on (controller_type, controller_name) group_left()\n sum by (controller_type, controller_name) (avg_over_time(vpa_target_recommendation{container!=\"POD\", namespace=\"$namespace\", resource=\"cpu\"}[$__rate_interval]))\n)",
"format": "time_series", "format": "time_series",
"intervalFactor": 1, "intervalFactor": 1,
"legendFormat": "VPA Target", "legendFormat": "VPA Target",
@@ -2295,7 +2295,7 @@
"type": "prometheus", "type": "prometheus",
"uid": "$ds_prometheus" "uid": "$ds_prometheus"
}, },
"expr": "sum by(pod) (rate(container_cpu_system_seconds_total{node=~\"$node\", container!=\"\", pod=\"$pod\", namespace=\"$namespace\"}[$__rate_interval]))", "expr": "sum by(pod) (rate(container_cpu_system_seconds_total{node=~\"$node\", container!=\"POD\", pod=\"$pod\", namespace=\"$namespace\"}[$__rate_interval]))",
"format": "time_series", "format": "time_series",
"intervalFactor": 1, "intervalFactor": 1,
"legendFormat": "System", "legendFormat": "System",
@@ -2306,7 +2306,7 @@
"type": "prometheus", "type": "prometheus",
"uid": "$ds_prometheus" "uid": "$ds_prometheus"
}, },
"expr": "sum by(pod) (rate(container_cpu_user_seconds_total{node=~\"$node\", container!=\"\", pod=\"$pod\", namespace=\"$namespace\"}[$__rate_interval]))", "expr": "sum by(pod) (rate(container_cpu_user_seconds_total{node=~\"$node\", container!=\"POD\", pod=\"$pod\", namespace=\"$namespace\"}[$__rate_interval]))",
"format": "time_series", "format": "time_series",
"intervalFactor": 1, "intervalFactor": 1,
"legendFormat": "User", "legendFormat": "User",
@@ -2468,7 +2468,7 @@
"uid": "$ds_prometheus" "uid": "$ds_prometheus"
}, },
"editorMode": "code", "editorMode": "code",
"expr": "sum by(pod) (\n max(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller=\"$controller\", pod=~\"$pod\"}) by(pod)\n * on (pod)\n sum by (pod) (avg_over_time(container_memory_working_set_bytes:without_kmem{node=~\"$node\", container!=\"\", pod=~\"$pod\", namespace=\"$namespace\"}[$__rate_interval]))\n)", "expr": "sum by(pod) (\n max(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller=\"$controller\", pod=~\"$pod\"}) by(pod)\n * on (pod)\n sum by (pod) (avg_over_time(container_memory_working_set_bytes:without_kmem{node=~\"$node\", container!=\"POD\", pod=~\"$pod\", namespace=\"$namespace\"}[$__rate_interval]))\n)",
"format": "time_series", "format": "time_series",
"intervalFactor": 1, "intervalFactor": 1,
"legendFormat": "{{ pod }}", "legendFormat": "{{ pod }}",
@@ -2653,7 +2653,7 @@
"uid": "${ds_prometheus}" "uid": "${ds_prometheus}"
}, },
"editorMode": "code", "editorMode": "code",
"expr": "sum (\n max(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller=\"$controller\", pod=~\"$pod\"}) by(pod)\n * on (pod)\n sum by (pod) (avg_over_time(container_memory_rss{node=~\"$node\", namespace=\"$namespace\", pod=~\"$pod\", container!=\"\"}[$__rate_interval]))\n)", "expr": "sum (\n max(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller=\"$controller\", pod=~\"$pod\"}) by(pod)\n * on (pod)\n sum by (pod) (avg_over_time(container_memory_rss{node=~\"$node\", namespace=\"$namespace\", pod=~\"$pod\", container!=\"POD\"}[$__rate_interval]))\n)",
"format": "time_series", "format": "time_series",
"intervalFactor": 1, "intervalFactor": 1,
"legendFormat": "RSS", "legendFormat": "RSS",
@@ -2666,7 +2666,7 @@
"uid": "${ds_prometheus}" "uid": "${ds_prometheus}"
}, },
"editorMode": "code", "editorMode": "code",
"expr": "sum (\n max(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller=\"$controller\", pod=~\"$pod\"}) by(pod)\n * on (pod)\n sum by (pod) (avg_over_time(container_memory_cache{node=~\"$node\", namespace=\"$namespace\", pod=~\"$pod\", container!=\"\"}[$__rate_interval]))\n)", "expr": "sum (\n max(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller=\"$controller\", pod=~\"$pod\"}) by(pod)\n * on (pod)\n sum by (pod) (avg_over_time(container_memory_cache{node=~\"$node\", namespace=\"$namespace\", pod=~\"$pod\", container!=\"POD\"}[$__rate_interval]))\n)",
"format": "time_series", "format": "time_series",
"intervalFactor": 1, "intervalFactor": 1,
"legendFormat": "Cache", "legendFormat": "Cache",
@@ -2679,7 +2679,7 @@
"uid": "${ds_prometheus}" "uid": "${ds_prometheus}"
}, },
"editorMode": "code", "editorMode": "code",
"expr": "sum (\n max(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller=\"$controller\", pod=~\"$pod\"}) by(pod)\n * on (pod)\n sum by (pod) (avg_over_time(container_memory_swap{node=~\"$node\", namespace=\"$namespace\", pod=~\"$pod\", container!=\"\"}[$__rate_interval]))\n)", "expr": "sum (\n max(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller=\"$controller\", pod=~\"$pod\"}) by(pod)\n * on (pod)\n sum by (pod) (avg_over_time(container_memory_swap{node=~\"$node\", namespace=\"$namespace\", pod=~\"$pod\", container!=\"POD\"}[$__rate_interval]))\n)",
"format": "time_series", "format": "time_series",
"intervalFactor": 1, "intervalFactor": 1,
"legendFormat": "Swap", "legendFormat": "Swap",
@@ -2692,7 +2692,7 @@
"uid": "${ds_prometheus}" "uid": "${ds_prometheus}"
}, },
"editorMode": "code", "editorMode": "code",
"expr": "sum (\n max(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller=\"$controller\", pod=~\"$pod\"}) by(pod)\n * on (pod)\n sum by (pod) (avg_over_time(container_memory_working_set_bytes:without_kmem{node=~\"$node\", namespace=\"$namespace\", pod=~\"$pod\", container!=\"\"}[$__rate_interval]))\n)", "expr": "sum (\n max(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller=\"$controller\", pod=~\"$pod\"}) by(pod)\n * on (pod)\n sum by (pod) (avg_over_time(container_memory_working_set_bytes:without_kmem{node=~\"$node\", namespace=\"$namespace\", pod=~\"$pod\", container!=\"POD\"}[$__rate_interval]))\n)",
"format": "time_series", "format": "time_series",
"intervalFactor": 1, "intervalFactor": 1,
"legendFormat": "Working set bytes without kmem", "legendFormat": "Working set bytes without kmem",
@@ -2705,7 +2705,7 @@
"uid": "${ds_prometheus}" "uid": "${ds_prometheus}"
}, },
"editorMode": "code", "editorMode": "code",
"expr": "sum (\n max(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller=\"$controller\", pod=~\"$pod\"}) by(pod)\n * on (pod)\n sum by (pod) (avg_over_time(container_memory:kmem{node=~\"$node\", namespace=\"$namespace\", pod=~\"$pod\", container!=\"\"}[$__rate_interval]))\n)", "expr": "sum (\n max(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller=\"$controller\", pod=~\"$pod\"}) by(pod)\n * on (pod)\n sum by (pod) (avg_over_time(container_memory:kmem{node=~\"$node\", namespace=\"$namespace\", pod=~\"$pod\", container!=\"POD\"}[$__rate_interval]))\n)",
"format": "time_series", "format": "time_series",
"intervalFactor": 1, "intervalFactor": 1,
"legendFormat": "Kmem", "legendFormat": "Kmem",
@@ -2837,7 +2837,7 @@
"type": "prometheus", "type": "prometheus",
"uid": "$ds_prometheus" "uid": "$ds_prometheus"
}, },
"expr": "(\n kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller=\"$controller\", pod=~\"$pod\"}\n * on (pod) group_left()\n sum by (pod)\n (\n (\n sum by (namespace, pod, container) (avg_over_time(kube_pod_container_resource_requests{resource=\"memory\",unit=\"byte\",node=~\"$node\", namespace=\"$namespace\"}[$__rate_interval]))\n -\n sum by (namespace, pod, container) (avg_over_time(container_memory_working_set_bytes:without_kmem{node=~\"$node\", namespace=\"$namespace\", container!=\"\"}[$__rate_interval]))\n ) > 0\n )\n)", "expr": "(\n kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller=\"$controller\", pod=~\"$pod\"}\n * on (pod) group_left()\n sum by (pod)\n (\n (\n sum by (namespace, pod, container) (avg_over_time(kube_pod_container_resource_requests{resource=\"memory\",unit=\"byte\",node=~\"$node\", namespace=\"$namespace\"}[$__rate_interval]))\n -\n sum by (namespace, pod, container) (avg_over_time(container_memory_working_set_bytes:without_kmem{node=~\"$node\", namespace=\"$namespace\", container!=\"POD\"}[$__rate_interval]))\n ) > 0\n )\n)",
"format": "time_series", "format": "time_series",
"intervalFactor": 1, "intervalFactor": 1,
"legendFormat": "{{ pod }}", "legendFormat": "{{ pod }}",
@@ -2974,7 +2974,7 @@
"type": "prometheus", "type": "prometheus",
"uid": "$ds_prometheus" "uid": "$ds_prometheus"
}, },
"expr": "(\n kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller=\"$controller\", pod=~\"$pod\"}\n * on (pod) group_left()\n sum by (pod)\n (\n (\n (\n sum by (namespace, pod, container) (avg_over_time(container_memory_working_set_bytes:without_kmem{node=~\"$node\", namespace=\"$namespace\"}[$__rate_interval]))\n -\n sum by (namespace, pod, container) (avg_over_time(kube_pod_container_resource_requests{resource=\"memory\",unit=\"byte\",node=~\"$node\", namespace=\"$namespace\", container!=\"\"}[$__rate_interval]))\n ) or sum by (namespace, pod, container) (avg_over_time(container_memory_working_set_bytes:without_kmem{node=~\"$node\", namespace=\"$namespace\", container!=\"\"}[$__rate_interval]))\n ) > 0\n )\n)", "expr": "(\n kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller=\"$controller\", pod=~\"$pod\"}\n * on (pod) group_left()\n sum by (pod)\n (\n (\n (\n sum by (namespace, pod, container) (avg_over_time(container_memory_working_set_bytes:without_kmem{node=~\"$node\", namespace=\"$namespace\"}[$__rate_interval]))\n -\n sum by (namespace, pod, container) (avg_over_time(kube_pod_container_resource_requests{resource=\"memory\",unit=\"byte\",node=~\"$node\", namespace=\"$namespace\", container!=\"POD\"}[$__rate_interval]))\n ) or sum by (namespace, pod, container) (avg_over_time(container_memory_working_set_bytes:without_kmem{node=~\"$node\", namespace=\"$namespace\", container!=\"POD\"}[$__rate_interval]))\n ) > 0\n )\n)",
"format": "time_series", "format": "time_series",
"intervalFactor": 1, "intervalFactor": 1,
"legendFormat": "{{ pod }}", "legendFormat": "{{ pod }}",
@@ -3290,56 +3290,56 @@
"repeatDirection": "h", "repeatDirection": "h",
"targets": [ "targets": [
{ {
"expr": "sum by (pod) (avg_over_time(container_memory_rss{node=~\"$node\", namespace=\"$namespace\", pod=~\"$pod\", container!=\"\"}[$__rate_interval]))", "expr": "sum by (pod) (avg_over_time(container_memory_rss{node=~\"$node\", namespace=\"$namespace\", pod=~\"$pod\", container!=\"POD\"}[$__rate_interval]))",
"format": "time_series", "format": "time_series",
"intervalFactor": 1, "intervalFactor": 1,
"legendFormat": "RSS", "legendFormat": "RSS",
"refId": "A" "refId": "A"
}, },
{ {
"expr": "sum by (pod) (avg_over_time(container_memory_cache{node=~\"$node\", namespace=\"$namespace\", pod=~\"$pod\", container!=\"\"}[$__rate_interval]))", "expr": "sum by (pod) (avg_over_time(container_memory_cache{node=~\"$node\", namespace=\"$namespace\", pod=~\"$pod\", container!=\"POD\"}[$__rate_interval]))",
"format": "time_series", "format": "time_series",
"intervalFactor": 1, "intervalFactor": 1,
"legendFormat": "Cache", "legendFormat": "Cache",
"refId": "B" "refId": "B"
}, },
{ {
"expr": "sum by (pod) (avg_over_time(container_memory_swap{node=~\"$node\", namespace=\"$namespace\", pod=~\"$pod\", container!=\"\"}[$__rate_interval]))", "expr": "sum by (pod) (avg_over_time(container_memory_swap{node=~\"$node\", namespace=\"$namespace\", pod=~\"$pod\", container!=\"POD\"}[$__rate_interval]))",
"format": "time_series", "format": "time_series",
"intervalFactor": 1, "intervalFactor": 1,
"legendFormat": "Swap", "legendFormat": "Swap",
"refId": "C" "refId": "C"
}, },
{ {
"expr": "sum by (pod) (avg_over_time(container_memory_working_set_bytes:without_kmem{node=~\"$node\", namespace=\"$namespace\", pod=~\"$pod\", container!=\"\"}[$__rate_interval]))", "expr": "sum by (pod) (avg_over_time(container_memory_working_set_bytes:without_kmem{node=~\"$node\", namespace=\"$namespace\", pod=~\"$pod\", container!=\"POD\"}[$__rate_interval]))",
"format": "time_series", "format": "time_series",
"intervalFactor": 1, "intervalFactor": 1,
"legendFormat": "Working set bytes without kmem", "legendFormat": "Working set bytes without kmem",
"refId": "D" "refId": "D"
}, },
{ {
"expr": "sum by (pod)\n(\n kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller=\"$controller\", pod=~\"$pod\"}\n * on (controller_type, controller_name) group_left()\n sum by (controller_type, controller_name) (avg_over_time(vpa_target_recommendation{namespace=\"$namespace\", container!=\"\", resource=\"memory\"}[$__rate_interval]))\n)", "expr": "sum by (pod)\n(\n kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller=\"$controller\", pod=~\"$pod\"}\n * on (controller_type, controller_name) group_left()\n sum by (controller_type, controller_name) (avg_over_time(vpa_target_recommendation{namespace=\"$namespace\", container!=\"POD\", resource=\"memory\"}[$__rate_interval]))\n)",
"format": "time_series", "format": "time_series",
"intervalFactor": 1, "intervalFactor": 1,
"legendFormat": "VPA Target", "legendFormat": "VPA Target",
"refId": "E" "refId": "E"
}, },
{ {
"expr": "sum by(pod) (avg_over_time(kube_pod_container_resource_limits{resource=\"memory\",unit=\"byte\",node=~\"$node\", namespace=\"$namespace\", pod=~\"$pod\", container!=\"\"}[$__rate_interval]))", "expr": "sum by(pod) (avg_over_time(kube_pod_container_resource_limits{resource=\"memory\",unit=\"byte\",node=~\"$node\", namespace=\"$namespace\", pod=~\"$pod\", container!=\"POD\"}[$__rate_interval]))",
"format": "time_series", "format": "time_series",
"intervalFactor": 1, "intervalFactor": 1,
"legendFormat": "Limits", "legendFormat": "Limits",
"refId": "F" "refId": "F"
}, },
{ {
"expr": "sum by(pod) (avg_over_time(kube_pod_container_resource_requests{resource=\"memory\",unit=\"byte\",node=~\"$node\", namespace=\"$namespace\", pod=~\"$pod\", container!=\"\"}[$__rate_interval]))", "expr": "sum by(pod) (avg_over_time(kube_pod_container_resource_requests{resource=\"memory\",unit=\"byte\",node=~\"$node\", namespace=\"$namespace\", pod=~\"$pod\", container!=\"POD\"}[$__rate_interval]))",
"format": "time_series", "format": "time_series",
"intervalFactor": 1, "intervalFactor": 1,
"legendFormat": "Requests", "legendFormat": "Requests",
"refId": "G" "refId": "G"
}, },
{ {
"expr": "sum by(pod) (avg_over_time(container_memory:kmem{node=~\"$node\", namespace=\"$namespace\", pod=~\"$pod\", container!=\"\"}[$__rate_interval]))", "expr": "sum by(pod) (avg_over_time(container_memory:kmem{node=~\"$node\", namespace=\"$namespace\", pod=~\"$pod\", container!=\"POD\"}[$__rate_interval]))",
"format": "time_series", "format": "time_series",
"intervalFactor": 1, "intervalFactor": 1,
"legendFormat": "Kmem", "legendFormat": "Kmem",
@@ -3834,7 +3834,7 @@
"uid": "$ds_prometheus" "uid": "$ds_prometheus"
}, },
"editorMode": "code", "editorMode": "code",
"expr": "sum by(pod) (\n max(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller=\"$controller\"}) by(pod)\n * on (pod)\n sum by (pod) (rate(container_fs_reads_total{node=~\"$node\", container!=\"\", pod=~\"$pod\", namespace=\"$namespace\"}[$__rate_interval]))\n)", "expr": "sum by(pod) (\n max(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller=\"$controller\"}) by(pod)\n * on (pod)\n sum by (pod) (rate(container_fs_reads_total{node=~\"$node\", container!=\"POD\", pod=~\"$pod\", namespace=\"$namespace\"}[$__rate_interval]))\n)",
"format": "time_series", "format": "time_series",
"intervalFactor": 1, "intervalFactor": 1,
"legendFormat": "{{ pod }}", "legendFormat": "{{ pod }}",
@@ -3972,7 +3972,7 @@
"uid": "$ds_prometheus" "uid": "$ds_prometheus"
}, },
"editorMode": "code", "editorMode": "code",
"expr": "sum by(pod) (\n max(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller=\"$controller\"}) by(pod)\n * on (pod)\n sum by (pod) (rate(container_fs_writes_total{node=~\"$node\", container!=\"\", pod=~\"$pod\", namespace=\"$namespace\"}[$__rate_interval]))\n)", "expr": "sum by(pod) (\n max(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller=\"$controller\"}) by(pod)\n * on (pod)\n sum by (pod) (rate(container_fs_writes_total{node=~\"$node\", container!=\"POD\", pod=~\"$pod\", namespace=\"$namespace\"}[$__rate_interval]))\n)",
"format": "time_series", "format": "time_series",
"intervalFactor": 1, "intervalFactor": 1,
"legendFormat": "{{ pod }}", "legendFormat": "{{ pod }}",

View File

@@ -656,7 +656,7 @@
"type": "prometheus", "type": "prometheus",
"uid": "${ds_prometheus}" "uid": "${ds_prometheus}"
}, },
"expr": "sum by (controller) (avg_over_time(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller_type=~\"$controller_type\", controller=~\"$controller\"}[$__range]) * on (pod) group_left() sum by (pod) (rate(container_cpu_usage_seconds_total{node=~\"$node\", namespace=\"$namespace\", container!=\"\"}[$__range])))\nor\ncount (avg_over_time(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller_type=~\"$controller_type\", controller=~\"$controller\"}[$__range])) by (controller) * 0", "expr": "sum by (controller) (avg_over_time(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller_type=~\"$controller_type\", controller=~\"$controller\"}[$__range]) * on (pod) group_left() sum by (pod) (rate(container_cpu_usage_seconds_total{node=~\"$node\", namespace=\"$namespace\", container!=\"POD\"}[$__range])))\nor\ncount (avg_over_time(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller_type=~\"$controller_type\", controller=~\"$controller\"}[$__range])) by (controller) * 0",
"format": "table", "format": "table",
"instant": true, "instant": true,
"intervalFactor": 1, "intervalFactor": 1,
@@ -680,7 +680,7 @@
"type": "prometheus", "type": "prometheus",
"uid": "${ds_prometheus}" "uid": "${ds_prometheus}"
}, },
"expr": "sum by (controller)\n (\n avg_over_time(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller_type=~\"$controller_type\", controller=~\"$controller\"}[$__range])\n * on (controller_type, controller_name) group_left()\n sum by(controller_type, controller_name) (avg_over_time(vpa_target_recommendation{container!=\"\",namespace=\"$namespace\", resource=\"cpu\"}[$__range]))\n ) \nor\ncount (avg_over_time(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller_type=~\"$controller_type\", controller=~\"$controller\"}[$__range])) by (controller) * 0", "expr": "sum by (controller)\n (\n avg_over_time(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller_type=~\"$controller_type\", controller=~\"$controller\"}[$__range])\n * on (controller_type, controller_name) group_left()\n sum by(controller_type, controller_name) (avg_over_time(vpa_target_recommendation{container!=\"POD\",namespace=\"$namespace\", resource=\"cpu\"}[$__range]))\n ) \nor\ncount (avg_over_time(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller_type=~\"$controller_type\", controller=~\"$controller\"}[$__range])) by (controller) * 0",
"format": "table", "format": "table",
"instant": true, "instant": true,
"intervalFactor": 1, "intervalFactor": 1,
@@ -692,7 +692,7 @@
"type": "prometheus", "type": "prometheus",
"uid": "${ds_prometheus}" "uid": "${ds_prometheus}"
}, },
"expr": "sum by (controller)\n (\n avg_over_time(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller_type=~\"$controller_type\", controller=~\"$controller\"}[$__range])\n * on (namespace, pod) group_left()\n sum by (namespace, pod)\n (\n (\n sum by(namespace, pod, container) (avg_over_time(kube_pod_container_resource_requests{resource=\"cpu\",unit=\"core\",node=~\"$node\", namespace=\"$namespace\"}[$__range]))\n -\n sum by(namespace, pod, container) (rate(container_cpu_usage_seconds_total{node=~\"$node\", container!=\"\", namespace=\"$namespace\"}[$__range]))\n ) > 0\n )\n )\nor\ncount (avg_over_time(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller_type=~\"$controller_type\", controller=~\"$controller\"}[$__range])) by (controller) * 0", "expr": "sum by (controller)\n (\n avg_over_time(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller_type=~\"$controller_type\", controller=~\"$controller\"}[$__range])\n * on (namespace, pod) group_left()\n sum by (namespace, pod)\n (\n (\n sum by(namespace, pod, container) (avg_over_time(kube_pod_container_resource_requests{resource=\"cpu\",unit=\"core\",node=~\"$node\", namespace=\"$namespace\"}[$__range]))\n -\n sum by(namespace, pod, container) (rate(container_cpu_usage_seconds_total{node=~\"$node\", container!=\"POD\", namespace=\"$namespace\"}[$__range]))\n ) > 0\n )\n )\nor\ncount (avg_over_time(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller_type=~\"$controller_type\", controller=~\"$controller\"}[$__range])) by (controller) * 0",
"format": "table", "format": "table",
"instant": true, "instant": true,
"intervalFactor": 1, "intervalFactor": 1,
@@ -704,7 +704,7 @@
"type": "prometheus", "type": "prometheus",
"uid": "${ds_prometheus}" "uid": "${ds_prometheus}"
}, },
"expr": "sum by (controller)\n (\n avg_over_time(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller_type=~\"$controller_type\", controller=~\"$controller\"}[$__range])\n * on (namespace, pod) group_left()\n sum by (namespace, pod)\n (\n (\n (\n sum by(namespace, pod, container) (rate(container_cpu_usage_seconds_total{node=~\"$node\", namespace=\"$namespace\"}[$__range]))\n -\n sum by(namespace, pod, container) (avg_over_time(kube_pod_container_resource_requests{resource=\"cpu\",unit=\"core\",node=~\"$node\", container!=\"\", namespace=\"$namespace\"}[$__range]))\n ) or sum by(namespace, pod, container) (rate(container_cpu_usage_seconds_total{node=~\"$node\", container!=\"\", namespace=\"$namespace\"}[$__range]))\n ) > 0\n )\n )\nor\ncount (avg_over_time(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller_type=~\"$controller_type\", controller=~\"$controller\"}[$__range])) by (controller) * 0", "expr": "sum by (controller)\n (\n avg_over_time(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller_type=~\"$controller_type\", controller=~\"$controller\"}[$__range])\n * on (namespace, pod) group_left()\n sum by (namespace, pod)\n (\n (\n (\n sum by(namespace, pod, container) (rate(container_cpu_usage_seconds_total{node=~\"$node\", namespace=\"$namespace\"}[$__range]))\n -\n sum by(namespace, pod, container) (avg_over_time(kube_pod_container_resource_requests{resource=\"cpu\",unit=\"core\",node=~\"$node\", container!=\"POD\", namespace=\"$namespace\"}[$__range]))\n ) or sum by(namespace, pod, container) (rate(container_cpu_usage_seconds_total{node=~\"$node\", container!=\"POD\", namespace=\"$namespace\"}[$__range]))\n ) > 0\n )\n )\nor\ncount (avg_over_time(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller_type=~\"$controller_type\", controller=~\"$controller\"}[$__range])) by (controller) * 0",
"format": "table", "format": "table",
"instant": true, "instant": true,
"intervalFactor": 1, "intervalFactor": 1,
@@ -728,7 +728,7 @@
"type": "prometheus", "type": "prometheus",
"uid": "${ds_prometheus}" "uid": "${ds_prometheus}"
}, },
"expr": "sum by (controller) (avg_over_time(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller_type=~\"$controller_type\", controller=~\"$controller\"}[$__range]) * on (pod) group_left() sum by (pod) (avg_over_time(container_memory_working_set_bytes:without_kmem{node=~\"$node\", namespace=\"$namespace\", container!=\"\"}[$__range])))\nor\ncount (avg_over_time(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller_type=~\"$controller_type\", controller=~\"$controller\"}[$__range])) by (controller) * 0", "expr": "sum by (controller) (avg_over_time(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller_type=~\"$controller_type\", controller=~\"$controller\"}[$__range]) * on (pod) group_left() sum by (pod) (avg_over_time(container_memory_working_set_bytes:without_kmem{node=~\"$node\", namespace=\"$namespace\", container!=\"POD\"}[$__range])))\nor\ncount (avg_over_time(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller_type=~\"$controller_type\", controller=~\"$controller\"}[$__range])) by (controller) * 0",
"format": "table", "format": "table",
"instant": true, "instant": true,
"intervalFactor": 1, "intervalFactor": 1,
@@ -740,7 +740,7 @@
"type": "prometheus", "type": "prometheus",
"uid": "${ds_prometheus}" "uid": "${ds_prometheus}"
}, },
"expr": "sum by (controller)\n (\n avg_over_time(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller_type=~\"$controller_type\", controller=~\"$controller\"}[$__range])\n * on (pod) group_left()\n sum by (namespace, pod)\n (\n avg_over_time(kube_pod_container_resource_requests{resource=\"memory\",unit=\"byte\",node=~\"$node\", namespace=\"$namespace\", container!=\"\"}[$__range])\n )\n )\n or\n count (avg_over_time(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller_type=~\"$controller_type\", controller=~\"$controller\"}[$__range])) by (controller) * 0", "expr": "sum by (controller)\n (\n avg_over_time(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller_type=~\"$controller_type\", controller=~\"$controller\"}[$__range])\n * on (pod) group_left()\n sum by (namespace, pod)\n (\n avg_over_time(kube_pod_container_resource_requests{resource=\"memory\",unit=\"byte\",node=~\"$node\", namespace=\"$namespace\", container!=\"POD\"}[$__range])\n )\n )\n or\n count (avg_over_time(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller_type=~\"$controller_type\", controller=~\"$controller\"}[$__range])) by (controller) * 0",
"format": "table", "format": "table",
"instant": true, "instant": true,
"intervalFactor": 1, "intervalFactor": 1,
@@ -752,7 +752,7 @@
"type": "prometheus", "type": "prometheus",
"uid": "${ds_prometheus}" "uid": "${ds_prometheus}"
}, },
"expr": "sum by (controller)\n (\n avg_over_time(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller_type=~\"$controller_type\", controller=~\"$controller\"}[$__range])\n * on (controller_type, controller_name) group_left()\n sum by(controller_type, controller_name) (avg_over_time(vpa_target_recommendation{container!=\"\",namespace=\"$namespace\", resource=\"memory\"}[$__range]))\n ) \n or \ncount (avg_over_time(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller_type=~\"$controller_type\", controller=~\"$controller\"}[$__range])) by (controller) * 0", "expr": "sum by (controller)\n (\n avg_over_time(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller_type=~\"$controller_type\", controller=~\"$controller\"}[$__range])\n * on (controller_type, controller_name) group_left()\n sum by(controller_type, controller_name) (avg_over_time(vpa_target_recommendation{container!=\"POD\",namespace=\"$namespace\", resource=\"memory\"}[$__range]))\n ) \n or \ncount (avg_over_time(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller_type=~\"$controller_type\", controller=~\"$controller\"}[$__range])) by (controller) * 0",
"format": "table", "format": "table",
"instant": true, "instant": true,
"intervalFactor": 1, "intervalFactor": 1,
@@ -764,7 +764,7 @@
"type": "prometheus", "type": "prometheus",
"uid": "${ds_prometheus}" "uid": "${ds_prometheus}"
}, },
"expr": "sum by (controller)\n (\n avg_over_time(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller_type=~\"$controller_type\", controller=~\"$controller\"}[$__range])\n * on (namespace, pod) group_left()\n sum by (namespace, pod)\n (\n (\n sum by(namespace, pod, container) (avg_over_time(kube_pod_container_resource_requests{resource=\"memory\",unit=\"byte\",node=~\"$node\", namespace=\"$namespace\"}[$__range]))\n -\n sum by(namespace, pod, container) (avg_over_time(container_memory_working_set_bytes:without_kmem{node=~\"$node\", container!=\"\", namespace=\"$namespace\"}[$__range]))\n ) > 0\n )\n )\nor\ncount (avg_over_time(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller_type=~\"$controller_type\", controller=~\"$controller\"}[$__range])) by (controller) * 0", "expr": "sum by (controller)\n (\n avg_over_time(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller_type=~\"$controller_type\", controller=~\"$controller\"}[$__range])\n * on (namespace, pod) group_left()\n sum by (namespace, pod)\n (\n (\n sum by(namespace, pod, container) (avg_over_time(kube_pod_container_resource_requests{resource=\"memory\",unit=\"byte\",node=~\"$node\", namespace=\"$namespace\"}[$__range]))\n -\n sum by(namespace, pod, container) (avg_over_time(container_memory_working_set_bytes:without_kmem{node=~\"$node\", container!=\"POD\", namespace=\"$namespace\"}[$__range]))\n ) > 0\n )\n )\nor\ncount (avg_over_time(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller_type=~\"$controller_type\", controller=~\"$controller\"}[$__range])) by (controller) * 0",
"format": "table", "format": "table",
"instant": true, "instant": true,
"intervalFactor": 1, "intervalFactor": 1,
@@ -776,7 +776,7 @@
"type": "prometheus", "type": "prometheus",
"uid": "${ds_prometheus}" "uid": "${ds_prometheus}"
}, },
"expr": "sum by (controller)\n (\n avg_over_time(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller_type=~\"$controller_type\", controller=~\"$controller\"}[$__range])\n * on (namespace, pod) group_left()\n sum by (namespace, pod)\n (\n (\n (\n sum by(namespace, pod, container) (avg_over_time(container_memory_working_set_bytes:without_kmem{node=~\"$node\", namespace=\"$namespace\"}[$__range]))\n -\n sum by(namespace, pod, container) (avg_over_time(kube_pod_container_resource_requests{resource=\"memory\",unit=\"byte\",node=~\"$node\", container!=\"\", namespace=\"$namespace\"}[$__range]))\n ) or sum by(namespace, pod, container) (avg_over_time(container_memory_working_set_bytes:without_kmem{node=~\"$node\", container!=\"\", namespace=\"$namespace\"}[$__range]))\n ) > 0\n )\n )\nor\ncount (avg_over_time(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller_type=~\"$controller_type\", controller=~\"$controller\"}[$__range])) by (controller) * 0", "expr": "sum by (controller)\n (\n avg_over_time(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller_type=~\"$controller_type\", controller=~\"$controller\"}[$__range])\n * on (namespace, pod) group_left()\n sum by (namespace, pod)\n (\n (\n (\n sum by(namespace, pod, container) (avg_over_time(container_memory_working_set_bytes:without_kmem{node=~\"$node\", namespace=\"$namespace\"}[$__range]))\n -\n sum by(namespace, pod, container) (avg_over_time(kube_pod_container_resource_requests{resource=\"memory\",unit=\"byte\",node=~\"$node\", container!=\"POD\", namespace=\"$namespace\"}[$__range]))\n ) or sum by(namespace, pod, container) (avg_over_time(container_memory_working_set_bytes:without_kmem{node=~\"$node\", container!=\"POD\", namespace=\"$namespace\"}[$__range]))\n ) > 0\n )\n )\nor\ncount (avg_over_time(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller_type=~\"$controller_type\", controller=~\"$controller\"}[$__range])) by (controller) * 0",
"format": "table", "format": "table",
"instant": true, "instant": true,
"intervalFactor": 1, "intervalFactor": 1,
@@ -814,7 +814,7 @@
"type": "prometheus", "type": "prometheus",
"uid": "${ds_prometheus}" "uid": "${ds_prometheus}"
}, },
"expr": "sum by (controller) (avg_over_time(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller_type=~\"$controller_type\", controller=~\"$controller\"}[$__range]) * on (pod) group_left() sum by (pod) (rate(container_fs_reads_total{node=~\"$node\", container!=\"\", namespace=\"$namespace\"}[$__range])))\nor\ncount (avg_over_time(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller_type=~\"$controller_type\", controller=~\"$controller\"}[$__range])) by (controller) * 0", "expr": "sum by (controller) (avg_over_time(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller_type=~\"$controller_type\", controller=~\"$controller\"}[$__range]) * on (pod) group_left() sum by (pod) (rate(container_fs_reads_total{node=~\"$node\", container!=\"POD\", namespace=\"$namespace\"}[$__range])))\nor\ncount (avg_over_time(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller_type=~\"$controller_type\", controller=~\"$controller\"}[$__range])) by (controller) * 0",
"format": "table", "format": "table",
"instant": true, "instant": true,
"intervalFactor": 1, "intervalFactor": 1,
@@ -826,7 +826,7 @@
"type": "prometheus", "type": "prometheus",
"uid": "${ds_prometheus}" "uid": "${ds_prometheus}"
}, },
"expr": "sum by (controller) (avg_over_time(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller_type=~\"$controller_type\", controller=~\"$controller\"}[$__range]) * on (pod) group_left() sum by (pod) (rate(container_fs_writes_total{node=~\"$node\", container!=\"\", namespace=\"$namespace\"}[$__range])))\nor\ncount (avg_over_time(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller_type=~\"$controller_type\", controller=~\"$controller\"}[$__range])) by (controller) * 0", "expr": "sum by (controller) (avg_over_time(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller_type=~\"$controller_type\", controller=~\"$controller\"}[$__range]) * on (pod) group_left() sum by (pod) (rate(container_fs_writes_total{node=~\"$node\", container!=\"POD\", namespace=\"$namespace\"}[$__range])))\nor\ncount (avg_over_time(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller_type=~\"$controller_type\", controller=~\"$controller\"}[$__range])) by (controller) * 0",
"format": "table", "format": "table",
"instant": true, "instant": true,
"intervalFactor": 1, "intervalFactor": 1,
@@ -877,7 +877,7 @@
"type": "prometheus", "type": "prometheus",
"uid": "${ds_prometheus}" "uid": "${ds_prometheus}"
}, },
"expr": "sum by (controller) (avg_over_time(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller_type=~\"$controller_type\", controller=~\"$controller\"}[$__range]) * on (pod) group_left() sum by (pod) (avg_over_time(container_memory:kmem{node=~\"$node\", namespace=\"$namespace\", container!=\"\"}[$__range])))\nor\ncount (avg_over_time(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller_type=~\"$controller_type\", controller=~\"$controller\"}[$__range])) by (controller) * 0", "expr": "sum by (controller) (avg_over_time(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller_type=~\"$controller_type\", controller=~\"$controller\"}[$__range]) * on (pod) group_left() sum by (pod) (avg_over_time(container_memory:kmem{node=~\"$node\", namespace=\"$namespace\", container!=\"POD\"}[$__range])))\nor\ncount (avg_over_time(kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller_type=~\"$controller_type\", controller=~\"$controller\"}[$__range])) by (controller) * 0",
"format": "table", "format": "table",
"instant": true, "instant": true,
"intervalFactor": 1, "intervalFactor": 1,
@@ -1475,7 +1475,7 @@
"type": "prometheus", "type": "prometheus",
"uid": "$ds_prometheus" "uid": "$ds_prometheus"
}, },
"expr": "sum by (controller) (kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller_type=~\"$controller_type\", controller=~\"$controller\"} * on (pod) group_left() sum by (pod) (rate(container_cpu_usage_seconds_total{node=~\"$node\", namespace=\"$namespace\", container!=\"\"}[$__rate_interval])))", "expr": "sum by (controller) (kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller_type=~\"$controller_type\", controller=~\"$controller\"} * on (pod) group_left() sum by (pod) (rate(container_cpu_usage_seconds_total{node=~\"$node\", namespace=\"$namespace\", container!=\"POD\"}[$__rate_interval])))",
"format": "time_series", "format": "time_series",
"intervalFactor": 1, "intervalFactor": 1,
"legendFormat": "{{ controller }}", "legendFormat": "{{ controller }}",
@@ -1646,7 +1646,7 @@
"type": "prometheus", "type": "prometheus",
"uid": "$ds_prometheus" "uid": "$ds_prometheus"
}, },
"expr": "sum (sum by (controller) (kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller_type=~\"$controller_type\", controller=~\"$controller\"} * on (pod) group_left() sum by (pod) (rate(container_cpu_system_seconds_total{node=~\"$node\", namespace=\"$namespace\", container!=\"\"}[$__rate_interval]))))", "expr": "sum (sum by (controller) (kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller_type=~\"$controller_type\", controller=~\"$controller\"} * on (pod) group_left() sum by (pod) (rate(container_cpu_system_seconds_total{node=~\"$node\", namespace=\"$namespace\", container!=\"POD\"}[$__rate_interval]))))",
"format": "time_series", "format": "time_series",
"intervalFactor": 1, "intervalFactor": 1,
"legendFormat": "System", "legendFormat": "System",
@@ -1657,7 +1657,7 @@
"type": "prometheus", "type": "prometheus",
"uid": "$ds_prometheus" "uid": "$ds_prometheus"
}, },
"expr": "sum (sum by (controller) (kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller_type=~\"$controller_type\", controller=~\"$controller\"} * on (pod) group_left() sum by (pod) (rate(container_cpu_user_seconds_total{node=~\"$node\", namespace=\"$namespace\", container!=\"\"}[$__rate_interval]))))", "expr": "sum (sum by (controller) (kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller_type=~\"$controller_type\", controller=~\"$controller\"} * on (pod) group_left() sum by (pod) (rate(container_cpu_user_seconds_total{node=~\"$node\", namespace=\"$namespace\", container!=\"POD\"}[$__rate_interval]))))",
"format": "time_series", "format": "time_series",
"intervalFactor": 1, "intervalFactor": 1,
"legendFormat": "User", "legendFormat": "User",
@@ -1798,7 +1798,7 @@
"type": "prometheus", "type": "prometheus",
"uid": "$ds_prometheus" "uid": "$ds_prometheus"
}, },
"expr": "sum by (controller)\n (\n kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller_type=~\"$controller_type\", controller=~\"$controller\"}\n * on (namespace, pod) group_left()\n sum by (namespace, pod)\n (\n (\n sum by(namespace, pod, container) (avg_over_time(kube_pod_container_resource_requests{resource=\"cpu\",unit=\"core\",node=~\"$node\", namespace=\"$namespace\"}[$__rate_interval]))\n -\n sum by(namespace, pod, container) (rate(container_cpu_usage_seconds_total{node=~\"$node\", container!=\"\", namespace=\"$namespace\"}[$__rate_interval]))\n ) > 0\n )\n )", "expr": "sum by (controller)\n (\n kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller_type=~\"$controller_type\", controller=~\"$controller\"}\n * on (namespace, pod) group_left()\n sum by (namespace, pod)\n (\n (\n sum by(namespace, pod, container) (avg_over_time(kube_pod_container_resource_requests{resource=\"cpu\",unit=\"core\",node=~\"$node\", namespace=\"$namespace\"}[$__rate_interval]))\n -\n sum by(namespace, pod, container) (rate(container_cpu_usage_seconds_total{node=~\"$node\", container!=\"POD\", namespace=\"$namespace\"}[$__rate_interval]))\n ) > 0\n )\n )",
"format": "time_series", "format": "time_series",
"intervalFactor": 1, "intervalFactor": 1,
"legendFormat": "{{ controller }}", "legendFormat": "{{ controller }}",
@@ -1939,7 +1939,7 @@
"type": "prometheus", "type": "prometheus",
"uid": "$ds_prometheus" "uid": "$ds_prometheus"
}, },
"expr": "sum by (controller)\n (\n kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller_type=~\"$controller_type\", controller=~\"$controller\"}\n * on (namespace, pod) group_left()\n sum by (namespace, pod)\n (\n (\n (\n sum by(namespace, pod, container) (rate(container_cpu_usage_seconds_total{node=~\"$node\", namespace=\"$namespace\"}[$__rate_interval]))\n -\n sum by(namespace, pod, container) (avg_over_time(kube_pod_container_resource_requests{resource=\"cpu\",unit=\"core\",node=~\"$node\", container!=\"\", namespace=\"$namespace\"}[$__rate_interval]))\n ) or sum by(namespace, pod, container) (rate(container_cpu_usage_seconds_total{node=~\"$node\", container!=\"\", namespace=\"$namespace\"}[$__rate_interval]))\n ) > 0\n )\n )", "expr": "sum by (controller)\n (\n kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller_type=~\"$controller_type\", controller=~\"$controller\"}\n * on (namespace, pod) group_left()\n sum by (namespace, pod)\n (\n (\n (\n sum by(namespace, pod, container) (rate(container_cpu_usage_seconds_total{node=~\"$node\", namespace=\"$namespace\"}[$__rate_interval]))\n -\n sum by(namespace, pod, container) (avg_over_time(kube_pod_container_resource_requests{resource=\"cpu\",unit=\"core\",node=~\"$node\", container!=\"POD\", namespace=\"$namespace\"}[$__rate_interval]))\n ) or sum by(namespace, pod, container) (rate(container_cpu_usage_seconds_total{node=~\"$node\", container!=\"POD\", namespace=\"$namespace\"}[$__rate_interval]))\n ) > 0\n )\n )",
"format": "time_series", "format": "time_series",
"instant": false, "instant": false,
"intervalFactor": 1, "intervalFactor": 1,
@@ -2257,28 +2257,28 @@
"repeatDirection": "h", "repeatDirection": "h",
"targets": [ "targets": [
{ {
"expr": "sum by (controller) (kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller=\"$controller\"} * on (pod) group_left() sum by (pod) (rate(container_cpu_usage_seconds_total{node=~\"$node\", namespace=\"$namespace\", container!=\"\"}[$__rate_interval])))", "expr": "sum by (controller) (kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller=\"$controller\"} * on (pod) group_left() sum by (pod) (rate(container_cpu_usage_seconds_total{node=~\"$node\", namespace=\"$namespace\", container!=\"POD\"}[$__rate_interval])))",
"format": "time_series", "format": "time_series",
"intervalFactor": 1, "intervalFactor": 1,
"legendFormat": "Usage", "legendFormat": "Usage",
"refId": "D" "refId": "D"
}, },
{ {
"expr": "sum by (controller)\n (\n kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller=\"$controller\"}\n * on (pod) group_left()\n sum by(pod) (avg_over_time(kube_pod_container_resource_requests{resource=\"cpu\",unit=\"core\",node=~\"$node\", container!=\"\",namespace=\"$namespace\"}[$__rate_interval]))\n )", "expr": "sum by (controller)\n (\n kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller=\"$controller\"}\n * on (pod) group_left()\n sum by(pod) (avg_over_time(kube_pod_container_resource_requests{resource=\"cpu\",unit=\"core\",node=~\"$node\", container!=\"POD\",namespace=\"$namespace\"}[$__rate_interval]))\n )",
"format": "time_series", "format": "time_series",
"intervalFactor": 1, "intervalFactor": 1,
"legendFormat": "Requests", "legendFormat": "Requests",
"refId": "C" "refId": "C"
}, },
{ {
"expr": "sum by (controller)\n (\n kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller=\"$controller\"}\n * on (pod) group_left()\n sum by(pod) (avg_over_time(kube_pod_container_resource_limits{resource=\"cpu\",unit=\"core\",node=~\"$node\", container!=\"\",namespace=\"$namespace\"}[$__rate_interval]))\n )", "expr": "sum by (controller)\n (\n kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller=\"$controller\"}\n * on (pod) group_left()\n sum by(pod) (avg_over_time(kube_pod_container_resource_limits{resource=\"cpu\",unit=\"core\",node=~\"$node\", container!=\"POD\",namespace=\"$namespace\"}[$__rate_interval]))\n )",
"format": "time_series", "format": "time_series",
"intervalFactor": 1, "intervalFactor": 1,
"legendFormat": "Limits", "legendFormat": "Limits",
"refId": "E" "refId": "E"
}, },
{ {
"expr": "sum by (controller)\n (\n kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller=\"$controller\"}\n * on (controller_type, controller_name) group_left()\n sum by(controller_type, controller_name) (avg_over_time(vpa_target_recommendation{container!=\"\",namespace=\"$namespace\", resource=\"cpu\"}[$__rate_interval]))\n )", "expr": "sum by (controller)\n (\n kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller=\"$controller\"}\n * on (controller_type, controller_name) group_left()\n sum by(controller_type, controller_name) (avg_over_time(vpa_target_recommendation{container!=\"POD\",namespace=\"$namespace\", resource=\"cpu\"}[$__rate_interval]))\n )",
"format": "time_series", "format": "time_series",
"intervalFactor": 1, "intervalFactor": 1,
"legendFormat": "VPA Target", "legendFormat": "VPA Target",
@@ -2458,7 +2458,7 @@
"type": "prometheus", "type": "prometheus",
"uid": "$ds_prometheus" "uid": "$ds_prometheus"
}, },
"expr": "sum by (controller) (kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller=\"$controller\"} * on (pod) group_left() sum by (pod) (rate(container_cpu_system_seconds_total{node=~\"$node\", namespace=\"$namespace\", container!=\"\"}[$__rate_interval])))", "expr": "sum by (controller) (kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller=\"$controller\"} * on (pod) group_left() sum by (pod) (rate(container_cpu_system_seconds_total{node=~\"$node\", namespace=\"$namespace\", container!=\"POD\"}[$__rate_interval])))",
"format": "time_series", "format": "time_series",
"interval": "", "interval": "",
"intervalFactor": 1, "intervalFactor": 1,
@@ -2470,7 +2470,7 @@
"type": "prometheus", "type": "prometheus",
"uid": "$ds_prometheus" "uid": "$ds_prometheus"
}, },
"expr": "sum by (controller) (kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller=\"$controller\"} * on (pod) group_left() sum by (pod) (rate(container_cpu_user_seconds_total{node=~\"$node\", namespace=\"$namespace\", container!=\"\"}[$__rate_interval])))", "expr": "sum by (controller) (kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller=\"$controller\"} * on (pod) group_left() sum by (pod) (rate(container_cpu_user_seconds_total{node=~\"$node\", namespace=\"$namespace\", container!=\"POD\"}[$__rate_interval])))",
"format": "time_series", "format": "time_series",
"intervalFactor": 1, "intervalFactor": 1,
"legendFormat": "User", "legendFormat": "User",
@@ -2622,7 +2622,7 @@
"type": "prometheus", "type": "prometheus",
"uid": "$ds_prometheus" "uid": "$ds_prometheus"
}, },
"expr": "sum by (controller)\n (\n kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller_type=~\"$controller_type\", controller=~\"$controller\"}\n * on (pod) group_left()\n sum by (pod) (avg_over_time(container_memory_working_set_bytes:without_kmem{node=~\"$node\", namespace=\"$namespace\", container!=\"\"}[$__rate_interval]))\n )", "expr": "sum by (controller)\n (\n kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller_type=~\"$controller_type\", controller=~\"$controller\"}\n * on (pod) group_left()\n sum by (pod) (avg_over_time(container_memory_working_set_bytes:without_kmem{node=~\"$node\", namespace=\"$namespace\", container!=\"POD\"}[$__rate_interval]))\n )",
"format": "time_series", "format": "time_series",
"intervalFactor": 1, "intervalFactor": 1,
"legendFormat": "{{ controller }}", "legendFormat": "{{ controller }}",
@@ -2799,14 +2799,14 @@
"pluginVersion": "8.5.13", "pluginVersion": "8.5.13",
"targets": [ "targets": [
{ {
"expr": "sum\n (\n kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller_type=~\"$controller_type\", controller=~\"$controller\"}\n * on (pod) group_left()\n sum by (pod) (avg_over_time(container_memory_rss{node=~\"$node\", namespace=\"$namespace\", container!=\"\"}[$__rate_interval]))\n )", "expr": "sum\n (\n kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller_type=~\"$controller_type\", controller=~\"$controller\"}\n * on (pod) group_left()\n sum by (pod) (avg_over_time(container_memory_rss{node=~\"$node\", namespace=\"$namespace\", container!=\"POD\"}[$__rate_interval]))\n )",
"format": "time_series", "format": "time_series",
"intervalFactor": 1, "intervalFactor": 1,
"legendFormat": "RSS", "legendFormat": "RSS",
"refId": "A" "refId": "A"
}, },
{ {
"expr": "sum \n (\n kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller_type=~\"$controller_type\", controller=~\"$controller\"}\n * on (pod) group_left()\n sum by (pod) (avg_over_time(container_memory_cache{node=~\"$node\", namespace=\"$namespace\", container!=\"\"}[$__rate_interval]))\n )", "expr": "sum \n (\n kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller_type=~\"$controller_type\", controller=~\"$controller\"}\n * on (pod) group_left()\n sum by (pod) (avg_over_time(container_memory_cache{node=~\"$node\", namespace=\"$namespace\", container!=\"POD\"}[$__rate_interval]))\n )",
"format": "time_series", "format": "time_series",
"interval": "", "interval": "",
"intervalFactor": 1, "intervalFactor": 1,
@@ -2814,7 +2814,7 @@
"refId": "B" "refId": "B"
}, },
{ {
"expr": "sum \n (\n kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller_type=~\"$controller_type\", controller=~\"$controller\"}\n * on (pod) group_left()\n sum by (pod) (avg_over_time(container_memory_swap{node=~\"$node\", namespace=\"$namespace\", container!=\"\"}[$__rate_interval]))\n )", "expr": "sum \n (\n kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller_type=~\"$controller_type\", controller=~\"$controller\"}\n * on (pod) group_left()\n sum by (pod) (avg_over_time(container_memory_swap{node=~\"$node\", namespace=\"$namespace\", container!=\"POD\"}[$__rate_interval]))\n )",
"format": "time_series", "format": "time_series",
"interval": "", "interval": "",
"intervalFactor": 1, "intervalFactor": 1,
@@ -2822,14 +2822,14 @@
"refId": "C" "refId": "C"
}, },
{ {
"expr": "sum \n (\n kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller_type=~\"$controller_type\", controller=~\"$controller\"}\n * on (pod) group_left()\n sum by (pod) (avg_over_time(container_memory_working_set_bytes:without_kmem{node=~\"$node\", namespace=\"$namespace\", container!=\"\"}[$__rate_interval]))\n )", "expr": "sum \n (\n kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller_type=~\"$controller_type\", controller=~\"$controller\"}\n * on (pod) group_left()\n sum by (pod) (avg_over_time(container_memory_working_set_bytes:without_kmem{node=~\"$node\", namespace=\"$namespace\", container!=\"POD\"}[$__rate_interval]))\n )",
"format": "time_series", "format": "time_series",
"intervalFactor": 1, "intervalFactor": 1,
"legendFormat": "Working set bytes without kmem", "legendFormat": "Working set bytes without kmem",
"refId": "D" "refId": "D"
}, },
{ {
"expr": "sum \n (\n kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller_type=~\"$controller_type\", controller=~\"$controller\"}\n * on (pod) group_left()\n sum by (pod) (avg_over_time(container_memory:kmem{node=~\"$node\", namespace=\"$namespace\", container!=\"\"}[$__rate_interval]))\n )", "expr": "sum \n (\n kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller_type=~\"$controller_type\", controller=~\"$controller\"}\n * on (pod) group_left()\n sum by (pod) (avg_over_time(container_memory:kmem{node=~\"$node\", namespace=\"$namespace\", container!=\"POD\"}[$__rate_interval]))\n )",
"format": "time_series", "format": "time_series",
"intervalFactor": 1, "intervalFactor": 1,
"legendFormat": "Kmem", "legendFormat": "Kmem",
@@ -2955,7 +2955,7 @@
"type": "prometheus", "type": "prometheus",
"uid": "$ds_prometheus" "uid": "$ds_prometheus"
}, },
"expr": "sum by (controller)\n (\n kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller_type=~\"$controller_type\", controller=~\"$controller\"}\n * on (namespace, pod) group_left()\n sum by (namespace, pod)\n (\n (\n sum by(namespace, pod, container) (avg_over_time(kube_pod_container_resource_requests{resource=\"memory\",unit=\"byte\",node=~\"$node\", namespace=\"$namespace\"}[$__rate_interval]))\n -\n sum by(namespace, pod, container) (avg_over_time(container_memory_working_set_bytes:without_kmem{node=~\"$node\", container!=\"\", namespace=\"$namespace\"}[$__rate_interval]))\n ) > 0\n )\n )", "expr": "sum by (controller)\n (\n kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller_type=~\"$controller_type\", controller=~\"$controller\"}\n * on (namespace, pod) group_left()\n sum by (namespace, pod)\n (\n (\n sum by(namespace, pod, container) (avg_over_time(kube_pod_container_resource_requests{resource=\"memory\",unit=\"byte\",node=~\"$node\", namespace=\"$namespace\"}[$__rate_interval]))\n -\n sum by(namespace, pod, container) (avg_over_time(container_memory_working_set_bytes:without_kmem{node=~\"$node\", container!=\"POD\", namespace=\"$namespace\"}[$__rate_interval]))\n ) > 0\n )\n )",
"format": "time_series", "format": "time_series",
"intervalFactor": 1, "intervalFactor": 1,
"legendFormat": "{{ controller }}", "legendFormat": "{{ controller }}",
@@ -3091,7 +3091,7 @@
"type": "prometheus", "type": "prometheus",
"uid": "$ds_prometheus" "uid": "$ds_prometheus"
}, },
"expr": "sum by (controller)\n (\n kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller_type=~\"$controller_type\", controller=~\"$controller\"}\n * on (namespace, pod) group_left()\n sum by (namespace, pod)\n (\n (\n (\n sum by(namespace, pod, container) (avg_over_time(container_memory_working_set_bytes:without_kmem{node=~\"$node\", namespace=\"$namespace\"}[$__rate_interval]))\n -\n sum by(namespace, pod, container) (avg_over_time(kube_pod_container_resource_requests{resource=\"memory\",unit=\"byte\",node=~\"$node\", container!=\"\", namespace=\"$namespace\"}[$__rate_interval]))\n )\n or\n (\n sum by(namespace, pod, container) (avg_over_time(container_memory_working_set_bytes:without_kmem{node=~\"$node\", container!=\"\", namespace=\"$namespace\"}[$__rate_interval]))\n +\n sum by(namespace, pod, container) (avg_over_time(container_memory:kmem{node=~\"$node\", container!=\"\", namespace=\"$namespace\"}[$__rate_interval]))\n )\n ) > 0\n )\n )", "expr": "sum by (controller)\n (\n kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller_type=~\"$controller_type\", controller=~\"$controller\"}\n * on (namespace, pod) group_left()\n sum by (namespace, pod)\n (\n (\n (\n sum by(namespace, pod, container) (avg_over_time(container_memory_working_set_bytes:without_kmem{node=~\"$node\", namespace=\"$namespace\"}[$__rate_interval]))\n -\n sum by(namespace, pod, container) (avg_over_time(kube_pod_container_resource_requests{resource=\"memory\",unit=\"byte\",node=~\"$node\", container!=\"POD\", namespace=\"$namespace\"}[$__rate_interval]))\n )\n or\n (\n sum by(namespace, pod, container) (avg_over_time(container_memory_working_set_bytes:without_kmem{node=~\"$node\", container!=\"POD\", namespace=\"$namespace\"}[$__rate_interval]))\n +\n sum by(namespace, pod, container) (avg_over_time(container_memory:kmem{node=~\"$node\", container!=\"POD\", namespace=\"$namespace\"}[$__rate_interval]))\n )\n ) > 0\n )\n )",
"format": "time_series", "format": "time_series",
"intervalFactor": 1, "intervalFactor": 1,
"legendFormat": "{{ controller }}", "legendFormat": "{{ controller }}",
@@ -3408,14 +3408,14 @@
"repeatDirection": "h", "repeatDirection": "h",
"targets": [ "targets": [
{ {
"expr": "sum \n (\n kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller=\"$controller\"}\n * on (pod) group_left() \n sum by (pod) (avg_over_time(container_memory_rss{node=~\"$node\", namespace=\"$namespace\", container!=\"\"}[$__rate_interval]))\n )", "expr": "sum \n (\n kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller=\"$controller\"}\n * on (pod) group_left() \n sum by (pod) (avg_over_time(container_memory_rss{node=~\"$node\", namespace=\"$namespace\", container!=\"POD\"}[$__rate_interval]))\n )",
"format": "time_series", "format": "time_series",
"intervalFactor": 1, "intervalFactor": 1,
"legendFormat": "RSS", "legendFormat": "RSS",
"refId": "A" "refId": "A"
}, },
{ {
"expr": "sum\n (\n kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller=\"$controller\"} \n * on (pod) group_left() \n sum by (pod) (avg_over_time(container_memory_cache{node=~\"$node\", namespace=\"$namespace\", container!=\"\"}[$__rate_interval]))\n )", "expr": "sum\n (\n kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller=\"$controller\"} \n * on (pod) group_left() \n sum by (pod) (avg_over_time(container_memory_cache{node=~\"$node\", namespace=\"$namespace\", container!=\"POD\"}[$__rate_interval]))\n )",
"format": "time_series", "format": "time_series",
"interval": "", "interval": "",
"intervalFactor": 1, "intervalFactor": 1,
@@ -3423,7 +3423,7 @@
"refId": "B" "refId": "B"
}, },
{ {
"expr": "sum \n (\n kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller=\"$controller\"}\n * on (pod) group_left() \n sum by (pod) (avg_over_time(container_memory_swap{node=~\"$node\", namespace=\"$namespace\", container!=\"\"}[$__rate_interval]))\n )", "expr": "sum \n (\n kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller=\"$controller\"}\n * on (pod) group_left() \n sum by (pod) (avg_over_time(container_memory_swap{node=~\"$node\", namespace=\"$namespace\", container!=\"POD\"}[$__rate_interval]))\n )",
"format": "time_series", "format": "time_series",
"interval": "", "interval": "",
"intervalFactor": 1, "intervalFactor": 1,
@@ -3431,35 +3431,35 @@
"refId": "C" "refId": "C"
}, },
{ {
"expr": "sum \n (\n kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller=\"$controller\"}\n * on (pod) group_left()\n sum by (pod) (avg_over_time(container_memory_working_set_bytes:without_kmem{node=~\"$node\", namespace=\"$namespace\", container!=\"\"}[$__rate_interval]))\n )", "expr": "sum \n (\n kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller=\"$controller\"}\n * on (pod) group_left()\n sum by (pod) (avg_over_time(container_memory_working_set_bytes:without_kmem{node=~\"$node\", namespace=\"$namespace\", container!=\"POD\"}[$__rate_interval]))\n )",
"format": "time_series", "format": "time_series",
"intervalFactor": 1, "intervalFactor": 1,
"legendFormat": "Working set bytes without kmem", "legendFormat": "Working set bytes without kmem",
"refId": "D" "refId": "D"
}, },
{ {
"expr": "sum \n (\n kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller=\"$controller\"}\n * on (pod) group_left()\n sum by(pod) (avg_over_time(kube_pod_container_resource_requests{resource=\"memory\",unit=\"byte\",node=~\"$node\", container!=\"\",namespace=\"$namespace\"}[$__rate_interval]))\n ) ", "expr": "sum \n (\n kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller=\"$controller\"}\n * on (pod) group_left()\n sum by(pod) (avg_over_time(kube_pod_container_resource_requests{resource=\"memory\",unit=\"byte\",node=~\"$node\", container!=\"POD\",namespace=\"$namespace\"}[$__rate_interval]))\n ) ",
"format": "time_series", "format": "time_series",
"intervalFactor": 1, "intervalFactor": 1,
"legendFormat": "Requests", "legendFormat": "Requests",
"refId": "E" "refId": "E"
}, },
{ {
"expr": "sum\n (\n kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller=\"$controller\"} \n * on (pod) group_left() \n sum by(pod) (avg_over_time(kube_pod_container_resource_limits{resource=\"memory\",unit=\"byte\",node=~\"$node\", container!=\"\",namespace=\"$namespace\"}[$__rate_interval]))\n )", "expr": "sum\n (\n kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller=\"$controller\"} \n * on (pod) group_left() \n sum by(pod) (avg_over_time(kube_pod_container_resource_limits{resource=\"memory\",unit=\"byte\",node=~\"$node\", container!=\"POD\",namespace=\"$namespace\"}[$__rate_interval]))\n )",
"format": "time_series", "format": "time_series",
"intervalFactor": 1, "intervalFactor": 1,
"legendFormat": "Limits", "legendFormat": "Limits",
"refId": "F" "refId": "F"
}, },
{ {
"expr": "sum \n (\n kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller=\"$controller\"}\n * on (controller_type, controller_name) group_left()\n sum by(controller_type, controller_name) (avg_over_time(vpa_target_recommendation{container!=\"\",namespace=\"$namespace\", resource=\"memory\"}[$__rate_interval]))\n )", "expr": "sum \n (\n kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller=\"$controller\"}\n * on (controller_type, controller_name) group_left()\n sum by(controller_type, controller_name) (avg_over_time(vpa_target_recommendation{container!=\"POD\",namespace=\"$namespace\", resource=\"memory\"}[$__rate_interval]))\n )",
"format": "time_series", "format": "time_series",
"intervalFactor": 1, "intervalFactor": 1,
"legendFormat": "VPA Target", "legendFormat": "VPA Target",
"refId": "G" "refId": "G"
}, },
{ {
"expr": "sum \n (\n kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller=\"$controller\"}\n * on (pod) group_left()\n sum by (pod) (avg_over_time(container_memory:kmem{node=~\"$node\", namespace=\"$namespace\", container!=\"\"}[$__rate_interval]))\n )", "expr": "sum \n (\n kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller=\"$controller\"}\n * on (pod) group_left()\n sum by (pod) (avg_over_time(container_memory:kmem{node=~\"$node\", namespace=\"$namespace\", container!=\"POD\"}[$__rate_interval]))\n )",
"format": "time_series", "format": "time_series",
"intervalFactor": 1, "intervalFactor": 1,
"legendFormat": "Kmem", "legendFormat": "Kmem",
@@ -3910,7 +3910,7 @@
"type": "prometheus", "type": "prometheus",
"uid": "$ds_prometheus" "uid": "$ds_prometheus"
}, },
"expr": "sum by (controller) (kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller_type=~\"$controller_type\", controller=~\"$controller\"} * on (pod) group_left() sum by (pod) (rate(container_fs_reads_total{node=~\"$node\", container!=\"\", namespace=\"$namespace\"}[$__rate_interval])))", "expr": "sum by (controller) (kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller_type=~\"$controller_type\", controller=~\"$controller\"} * on (pod) group_left() sum by (pod) (rate(container_fs_reads_total{node=~\"$node\", container!=\"POD\", namespace=\"$namespace\"}[$__rate_interval])))",
"format": "time_series", "format": "time_series",
"intervalFactor": 1, "intervalFactor": 1,
"legendFormat": "{{ controller }}", "legendFormat": "{{ controller }}",
@@ -4049,7 +4049,7 @@
"type": "prometheus", "type": "prometheus",
"uid": "$ds_prometheus" "uid": "$ds_prometheus"
}, },
"expr": "sum by (controller) (kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller_type=~\"$controller_type\", controller=~\"$controller\"} * on (pod) group_left() sum by (pod) (rate(container_fs_writes_total{node=~\"$node\", container!=\"\", namespace=\"$namespace\"}[$__rate_interval])))", "expr": "sum by (controller) (kube_controller_pod{node=~\"$node\", namespace=\"$namespace\", controller_type=~\"$controller_type\", controller=~\"$controller\"} * on (pod) group_left() sum by (pod) (rate(container_fs_writes_total{node=~\"$node\", container!=\"POD\", namespace=\"$namespace\"}[$__rate_interval])))",
"format": "time_series", "format": "time_series",
"intervalFactor": 1, "intervalFactor": 1,
"legendFormat": "{{ controller }}", "legendFormat": "{{ controller }}",

View File

@@ -869,7 +869,7 @@
"refId": "A" "refId": "A"
}, },
{ {
"expr": "100 * count by (namespace) (\n sum by (namespace, verticalpodautoscaler) ( \n count by (namespace, controller_name, verticalpodautoscaler) (avg_over_time(vpa_target_recommendation{namespace=~\"$namespace\", container!=\"\"}[$__range]))\n / on (controller_name, namespace) group_left\n count by (namespace, controller_name) (avg_over_time(kube_controller_pod{namespace=~\"$namespace\"}[$__range]))\n )\n) \n/ count by (namespace) (sum by (namespace, controller) (avg_over_time(kube_controller_pod{namespace=~\"$namespace\"}[$__range])))\nor\ncount (avg_over_time(kube_controller_pod{node=~\"$node\", namespace=~\"$namespace\"}[$__range])) by (namespace) * 0", "expr": "100 * count by (namespace) (\n sum by (namespace, verticalpodautoscaler) ( \n count by (namespace, controller_name, verticalpodautoscaler) (avg_over_time(vpa_target_recommendation{namespace=~\"$namespace\", container!=\"POD\"}[$__range]))\n / on (controller_name, namespace) group_left\n count by (namespace, controller_name) (avg_over_time(kube_controller_pod{namespace=~\"$namespace\"}[$__range]))\n )\n) \n/ count by (namespace) (sum by (namespace, controller) (avg_over_time(kube_controller_pod{namespace=~\"$namespace\"}[$__range])))\nor\ncount (avg_over_time(kube_controller_pod{node=~\"$node\", namespace=~\"$namespace\"}[$__range])) by (namespace) * 0",
"format": "table", "format": "table",
"hide": false, "hide": false,
"instant": true, "instant": true,
@@ -878,7 +878,7 @@
"refId": "B" "refId": "B"
}, },
{ {
"expr": "sum by (namespace) (rate(container_cpu_usage_seconds_total{node=~\"$node\", namespace=~\"$namespace\", container!=\"\"}[$__range]))\nor\ncount (avg_over_time(kube_controller_pod{node=~\"$node\", namespace=~\"$namespace\"}[$__range])) by (namespace) * 0", "expr": "sum by (namespace) (rate(container_cpu_usage_seconds_total{node=~\"$node\", namespace=~\"$namespace\", container!=\"POD\"}[$__range]))\nor\ncount (avg_over_time(kube_controller_pod{node=~\"$node\", namespace=~\"$namespace\"}[$__range])) by (namespace) * 0",
"format": "table", "format": "table",
"hide": false, "hide": false,
"instant": true, "instant": true,
@@ -895,7 +895,7 @@
"refId": "D" "refId": "D"
}, },
{ {
"expr": "sum by (namespace)\n (\n (\n sum by(namespace, pod, container) (avg_over_time(kube_pod_container_resource_requests{resource=\"cpu\",unit=\"core\",node=~\"$node\", namespace=~\"$namespace\"}[$__range]))\n -\n sum by(namespace, pod, container) (rate(container_cpu_usage_seconds_total{node=~\"$node\", container!=\"\", namespace=~\"$namespace\"}[$__range]))\n ) > 0\n )\nor count (avg_over_time(kube_controller_pod{node=~\"$node\", namespace=~\"$namespace\"}[$__range])) by (namespace) * 0", "expr": "sum by (namespace)\n (\n (\n sum by(namespace, pod, container) (avg_over_time(kube_pod_container_resource_requests{resource=\"cpu\",unit=\"core\",node=~\"$node\", namespace=~\"$namespace\"}[$__range]))\n -\n sum by(namespace, pod, container) (rate(container_cpu_usage_seconds_total{node=~\"$node\", container!=\"POD\", namespace=~\"$namespace\"}[$__range]))\n ) > 0\n )\nor count (avg_over_time(kube_controller_pod{node=~\"$node\", namespace=~\"$namespace\"}[$__range])) by (namespace) * 0",
"format": "table", "format": "table",
"instant": true, "instant": true,
"intervalFactor": 1, "intervalFactor": 1,
@@ -903,7 +903,7 @@
"refId": "E" "refId": "E"
}, },
{ {
"expr": "sum by (namespace)\n (\n (\n (\n sum by(namespace, pod, container) (rate(container_cpu_usage_seconds_total{node=~\"$node\", container!=\"\", namespace=~\"$namespace\"}[$__range]))\n -\n sum by(namespace, pod, container) (avg_over_time(kube_pod_container_resource_requests{resource=\"cpu\",unit=\"core\",node=~\"$node\", namespace=~\"$namespace\"}[$__range]))\n ) or sum by(namespace, pod, container) (rate(container_cpu_usage_seconds_total{node=~\"$node\", container!=\"\", namespace=~\"$namespace\"}[$__range]))\n )\n > 0\n )\nor count (avg_over_time(kube_controller_pod{node=~\"$node\", namespace=~\"$namespace\"}[$__range])) by (namespace) * 0", "expr": "sum by (namespace)\n (\n (\n (\n sum by(namespace, pod, container) (rate(container_cpu_usage_seconds_total{node=~\"$node\", container!=\"POD\", namespace=~\"$namespace\"}[$__range]))\n -\n sum by(namespace, pod, container) (avg_over_time(kube_pod_container_resource_requests{resource=\"cpu\",unit=\"core\",node=~\"$node\", namespace=~\"$namespace\"}[$__range]))\n ) or sum by(namespace, pod, container) (rate(container_cpu_usage_seconds_total{node=~\"$node\", container!=\"POD\", namespace=~\"$namespace\"}[$__range]))\n )\n > 0\n )\nor count (avg_over_time(kube_controller_pod{node=~\"$node\", namespace=~\"$namespace\"}[$__range])) by (namespace) * 0",
"format": "table", "format": "table",
"instant": true, "instant": true,
"intervalFactor": 1, "intervalFactor": 1,
@@ -919,7 +919,7 @@
"refId": "G" "refId": "G"
}, },
{ {
"expr": "sum by (namespace) (avg_over_time(container_memory_working_set_bytes:without_kmem{node=~\"$node\", namespace=~\"$namespace\", container!=\"\"}[$__range]))\nor\ncount (avg_over_time(kube_controller_pod{node=~\"$node\", namespace=~\"$namespace\"}[$__range])) by (namespace) * 0", "expr": "sum by (namespace) (avg_over_time(container_memory_working_set_bytes:without_kmem{node=~\"$node\", namespace=~\"$namespace\", container!=\"POD\"}[$__range]))\nor\ncount (avg_over_time(kube_controller_pod{node=~\"$node\", namespace=~\"$namespace\"}[$__range])) by (namespace) * 0",
"format": "table", "format": "table",
"instant": true, "instant": true,
"intervalFactor": 1, "intervalFactor": 1,
@@ -935,7 +935,7 @@
"refId": "I" "refId": "I"
}, },
{ {
"expr": "sum by (namespace)\n (\n (\n sum by(namespace, pod, container) (avg_over_time(kube_pod_container_resource_requests{resource=\"memory\",unit=\"byte\",node=~\"$node\", namespace=~\"$namespace\"}[$__range]))\n -\n sum by(namespace, pod, container) (avg_over_time(container_memory_working_set_bytes:without_kmem{node=~\"$node\", container!=\"\", namespace=~\"$namespace\"}[$__range]))\n ) > 0\n )\nor\ncount(avg_over_time(kube_controller_pod{node=~\"$node\", namespace=~\"$namespace\"}[$__range])) by (namespace) * 0", "expr": "sum by (namespace)\n (\n (\n sum by(namespace, pod, container) (avg_over_time(kube_pod_container_resource_requests{resource=\"memory\",unit=\"byte\",node=~\"$node\", namespace=~\"$namespace\"}[$__range]))\n -\n sum by(namespace, pod, container) (avg_over_time(container_memory_working_set_bytes:without_kmem{node=~\"$node\", container!=\"POD\", namespace=~\"$namespace\"}[$__range]))\n ) > 0\n )\nor\ncount(avg_over_time(kube_controller_pod{node=~\"$node\", namespace=~\"$namespace\"}[$__range])) by (namespace) * 0",
"format": "table", "format": "table",
"instant": true, "instant": true,
"intervalFactor": 1, "intervalFactor": 1,
@@ -943,7 +943,7 @@
"refId": "J" "refId": "J"
}, },
{ {
"expr": "sum by (namespace)\n (\n (\n (\n sum by(namespace, pod, container) (avg_over_time(container_memory_working_set_bytes:without_kmem{node=~\"$node\", container!=\"\", namespace=~\"$namespace\"}[$__range]))\n -\n sum by(namespace, pod, container) (avg_over_time(kube_pod_container_resource_requests{resource=\"memory\",unit=\"byte\",node=~\"$node\", namespace=~\"$namespace\"}[$__range]))\n ) or sum by(namespace, pod, container) (avg_over_time(container_memory_working_set_bytes:without_kmem{node=~\"$node\", container!=\"\", namespace=~\"$namespace\"}[$__range]))\n )\n > 0\n )\nor count (avg_over_time(kube_controller_pod{node=~\"$node\", namespace=~\"$namespace\"}[$__range])) by (namespace) * 0", "expr": "sum by (namespace)\n (\n (\n (\n sum by(namespace, pod, container) (avg_over_time(container_memory_working_set_bytes:without_kmem{node=~\"$node\", container!=\"POD\", namespace=~\"$namespace\"}[$__range]))\n -\n sum by(namespace, pod, container) (avg_over_time(kube_pod_container_resource_requests{resource=\"memory\",unit=\"byte\",node=~\"$node\", namespace=~\"$namespace\"}[$__range]))\n ) or sum by(namespace, pod, container) (avg_over_time(container_memory_working_set_bytes:without_kmem{node=~\"$node\", container!=\"POD\", namespace=~\"$namespace\"}[$__range]))\n )\n > 0\n )\nor count (avg_over_time(kube_controller_pod{node=~\"$node\", namespace=~\"$namespace\"}[$__range])) by (namespace) * 0",
"format": "table", "format": "table",
"instant": true, "instant": true,
"intervalFactor": 1, "intervalFactor": 1,
@@ -968,7 +968,7 @@
"refId": "M" "refId": "M"
}, },
{ {
"expr": "sum by (namespace) (rate(container_fs_reads_total{node=~\"$node\", namespace=~\"$namespace\", container!=\"\"}[$__range]))\nor\ncount (avg_over_time(kube_controller_pod{node=~\"$node\", namespace=~\"$namespace\"}[$__range])) by (namespace) * 0", "expr": "sum by (namespace) (rate(container_fs_reads_total{node=~\"$node\", namespace=~\"$namespace\", container!=\"POD\"}[$__range]))\nor\ncount (avg_over_time(kube_controller_pod{node=~\"$node\", namespace=~\"$namespace\"}[$__range])) by (namespace) * 0",
"format": "table", "format": "table",
"hide": false, "hide": false,
"instant": true, "instant": true,
@@ -977,7 +977,7 @@
"refId": "N" "refId": "N"
}, },
{ {
"expr": "sum by (namespace) (rate(container_fs_writes_total{node=~\"$node\", namespace=~\"$namespace\", container!=\"\"}[$__range]))\nor\ncount (avg_over_time(kube_controller_pod{node=~\"$node\", namespace=~\"$namespace\"}[$__range])) by (namespace) * 0", "expr": "sum by (namespace) (rate(container_fs_writes_total{node=~\"$node\", namespace=~\"$namespace\", container!=\"POD\"}[$__range]))\nor\ncount (avg_over_time(kube_controller_pod{node=~\"$node\", namespace=~\"$namespace\"}[$__range])) by (namespace) * 0",
"format": "table", "format": "table",
"hide": false, "hide": false,
"instant": true, "instant": true,
@@ -1449,7 +1449,7 @@
"type": "prometheus", "type": "prometheus",
"uid": "$ds_prometheus" "uid": "$ds_prometheus"
}, },
"expr": "sum by (namespace) (rate(container_cpu_usage_seconds_total{node=~\"$node\", namespace=~\"$namespace\", container!=\"\"}[$__rate_interval]))", "expr": "sum by (namespace) (rate(container_cpu_usage_seconds_total{node=~\"$node\", namespace=~\"$namespace\", container!=\"POD\"}[$__rate_interval]))",
"format": "time_series", "format": "time_series",
"intervalFactor": 1, "intervalFactor": 1,
"legendFormat": "{{ namespace }}", "legendFormat": "{{ namespace }}",
@@ -1616,7 +1616,7 @@
"type": "prometheus", "type": "prometheus",
"uid": "$ds_prometheus" "uid": "$ds_prometheus"
}, },
"expr": "sum (rate(container_cpu_system_seconds_total{node=~\"$node\", namespace=~\"$namespace\", container!=\"\"}[$__rate_interval]))", "expr": "sum (rate(container_cpu_system_seconds_total{node=~\"$node\", namespace=~\"$namespace\", container!=\"POD\"}[$__rate_interval]))",
"format": "time_series", "format": "time_series",
"intervalFactor": 1, "intervalFactor": 1,
"legendFormat": "System", "legendFormat": "System",
@@ -1627,7 +1627,7 @@
"type": "prometheus", "type": "prometheus",
"uid": "$ds_prometheus" "uid": "$ds_prometheus"
}, },
"expr": "sum (rate(container_cpu_user_seconds_total{node=~\"$node\", namespace=~\"$namespace\", container!=\"\"}[$__rate_interval]))", "expr": "sum (rate(container_cpu_user_seconds_total{node=~\"$node\", namespace=~\"$namespace\", container!=\"POD\"}[$__rate_interval]))",
"format": "time_series", "format": "time_series",
"intervalFactor": 1, "intervalFactor": 1,
"legendFormat": "User", "legendFormat": "User",
@@ -1764,7 +1764,7 @@
"type": "prometheus", "type": "prometheus",
"uid": "$ds_prometheus" "uid": "$ds_prometheus"
}, },
"expr": "sum by (namespace)\n (\n (\n sum by(namespace, pod, container) (avg_over_time(kube_pod_container_resource_requests{resource=\"cpu\",unit=\"core\",node=~\"$node\", namespace=~\"$namespace\"}[$__rate_interval]))\n -\n sum by(namespace, pod, container) (rate(container_cpu_usage_seconds_total{node=~\"$node\", container!=\"\", namespace=~\"$namespace\"}[$__rate_interval]))\n ) > 0\n )", "expr": "sum by (namespace)\n (\n (\n sum by(namespace, pod, container) (avg_over_time(kube_pod_container_resource_requests{resource=\"cpu\",unit=\"core\",node=~\"$node\", namespace=~\"$namespace\"}[$__rate_interval]))\n -\n sum by(namespace, pod, container) (rate(container_cpu_usage_seconds_total{node=~\"$node\", container!=\"POD\", namespace=~\"$namespace\"}[$__rate_interval]))\n ) > 0\n )",
"format": "time_series", "format": "time_series",
"intervalFactor": 1, "intervalFactor": 1,
"legendFormat": "{{ namespace }}", "legendFormat": "{{ namespace }}",
@@ -1901,7 +1901,7 @@
"type": "prometheus", "type": "prometheus",
"uid": "$ds_prometheus" "uid": "$ds_prometheus"
}, },
"expr": "sum by (namespace)\n (\n (\n (\n sum by(namespace, pod, container) (rate(container_cpu_usage_seconds_total{node=~\"$node\", container!=\"\", namespace=~\"$namespace\"}[$__rate_interval]))\n -\n sum by(namespace, pod, container) (avg_over_time(kube_pod_container_resource_requests{resource=\"cpu\",unit=\"core\",node=~\"$node\", namespace=~\"$namespace\"}[$__rate_interval]))\n ) or sum by(namespace, pod, container) (rate(container_cpu_usage_seconds_total{node=~\"$node\", container!=\"\", namespace=~\"$namespace\"}[$__rate_interval]))\n )\n > 0\n )", "expr": "sum by (namespace)\n (\n (\n (\n sum by(namespace, pod, container) (rate(container_cpu_usage_seconds_total{node=~\"$node\", container!=\"POD\", namespace=~\"$namespace\"}[$__rate_interval]))\n -\n sum by(namespace, pod, container) (avg_over_time(kube_pod_container_resource_requests{resource=\"cpu\",unit=\"core\",node=~\"$node\", namespace=~\"$namespace\"}[$__rate_interval]))\n ) or sum by(namespace, pod, container) (rate(container_cpu_usage_seconds_total{node=~\"$node\", container!=\"POD\", namespace=~\"$namespace\"}[$__rate_interval]))\n )\n > 0\n )",
"format": "time_series", "format": "time_series",
"intervalFactor": 1, "intervalFactor": 1,
"legendFormat": "{{ namespace }}", "legendFormat": "{{ namespace }}",
@@ -2210,7 +2210,7 @@
"repeatDirection": "h", "repeatDirection": "h",
"targets": [ "targets": [
{ {
"expr": "sum by (namespace) (rate(container_cpu_usage_seconds_total{node=~\"$node\", namespace=\"$namespace\", container!=\"\"}[$__rate_interval]))", "expr": "sum by (namespace) (rate(container_cpu_usage_seconds_total{node=~\"$node\", namespace=\"$namespace\", container!=\"POD\"}[$__rate_interval]))",
"format": "time_series", "format": "time_series",
"interval": "", "interval": "",
"intervalFactor": 1, "intervalFactor": 1,
@@ -2218,21 +2218,21 @@
"refId": "A" "refId": "A"
}, },
{ {
"expr": "sum by (namespace) (avg_over_time(kube_pod_container_resource_requests{resource=\"cpu\",unit=\"core\",node=~\"$node\", container!=\"\", namespace=\"$namespace\"}[$__rate_interval])* on (uid) group_left(phase) kube_pod_status_phase{phase=\"Running\"})", "expr": "sum by (namespace) (avg_over_time(kube_pod_container_resource_requests{resource=\"cpu\",unit=\"core\",node=~\"$node\", container!=\"POD\", namespace=\"$namespace\"}[$__rate_interval])* on (uid) group_left(phase) kube_pod_status_phase{phase=\"Running\"})",
"format": "time_series", "format": "time_series",
"intervalFactor": 1, "intervalFactor": 1,
"legendFormat": "Requests", "legendFormat": "Requests",
"refId": "B" "refId": "B"
}, },
{ {
"expr": "sum by (namespace) (avg_over_time(kube_pod_container_resource_limits{resource=\"cpu\",unit=\"core\",node=~\"$node\", container!=\"\", namespace=\"$namespace\"}[$__rate_interval])* on (uid) group_left(phase) kube_pod_status_phase{phase=\"Running\"})", "expr": "sum by (namespace) (avg_over_time(kube_pod_container_resource_limits{resource=\"cpu\",unit=\"core\",node=~\"$node\", container!=\"POD\", namespace=\"$namespace\"}[$__rate_interval])* on (uid) group_left(phase) kube_pod_status_phase{phase=\"Running\"})",
"format": "time_series", "format": "time_series",
"intervalFactor": 1, "intervalFactor": 1,
"legendFormat": "Limits", "legendFormat": "Limits",
"refId": "C" "refId": "C"
}, },
{ {
"expr": "sum by (namespace) (avg_over_time(vpa_target_recommendation{container!=\"\", namespace=\"$namespace\", resource=\"cpu\"}[$__rate_interval]))", "expr": "sum by (namespace) (avg_over_time(vpa_target_recommendation{container!=\"POD\", namespace=\"$namespace\", resource=\"cpu\"}[$__rate_interval]))",
"format": "time_series", "format": "time_series",
"intervalFactor": 1, "intervalFactor": 1,
"legendFormat": "VPA Target", "legendFormat": "VPA Target",
@@ -2407,7 +2407,7 @@
"type": "prometheus", "type": "prometheus",
"uid": "$ds_prometheus" "uid": "$ds_prometheus"
}, },
"expr": "sum by (namespace) (rate(container_cpu_system_seconds_total{node=~\"$node\", namespace=\"$namespace\", container!=\"\"}[$__rate_interval]))", "expr": "sum by (namespace) (rate(container_cpu_system_seconds_total{node=~\"$node\", namespace=\"$namespace\", container!=\"POD\"}[$__rate_interval]))",
"format": "time_series", "format": "time_series",
"interval": "", "interval": "",
"intervalFactor": 1, "intervalFactor": 1,
@@ -2419,7 +2419,7 @@
"type": "prometheus", "type": "prometheus",
"uid": "$ds_prometheus" "uid": "$ds_prometheus"
}, },
"expr": "sum by (namespace) (rate(container_cpu_user_seconds_total{node=~\"$node\", namespace=\"$namespace\", container!=\"\"}[$__rate_interval]))", "expr": "sum by (namespace) (rate(container_cpu_user_seconds_total{node=~\"$node\", namespace=\"$namespace\", container!=\"POD\"}[$__rate_interval]))",
"format": "time_series", "format": "time_series",
"intervalFactor": 1, "intervalFactor": 1,
"legendFormat": "User", "legendFormat": "User",
@@ -2572,7 +2572,7 @@
"type": "prometheus", "type": "prometheus",
"uid": "$ds_prometheus" "uid": "$ds_prometheus"
}, },
"expr": "sum by (namespace) (avg_over_time(container_memory_working_set_bytes:without_kmem{node=~\"$node\", namespace=~\"$namespace\", container!=\"\"}[$__rate_interval]))", "expr": "sum by (namespace) (avg_over_time(container_memory_working_set_bytes:without_kmem{node=~\"$node\", namespace=~\"$namespace\", container!=\"POD\"}[$__rate_interval]))",
"format": "time_series", "format": "time_series",
"intervalFactor": 1, "intervalFactor": 1,
"legendFormat": "{{ namespace }}", "legendFormat": "{{ namespace }}",
@@ -2754,14 +2754,14 @@
"pluginVersion": "8.5.13", "pluginVersion": "8.5.13",
"targets": [ "targets": [
{ {
"expr": "sum (avg_over_time(container_memory_rss{node=~\"$node\", namespace=~\"$namespace\", container!=\"\"}[$__rate_interval]))", "expr": "sum (avg_over_time(container_memory_rss{node=~\"$node\", namespace=~\"$namespace\", container!=\"POD\"}[$__rate_interval]))",
"format": "time_series", "format": "time_series",
"intervalFactor": 1, "intervalFactor": 1,
"legendFormat": "RSS", "legendFormat": "RSS",
"refId": "A" "refId": "A"
}, },
{ {
"expr": "sum (avg_over_time(container_memory_cache{node=~\"$node\", namespace=~\"$namespace\", container!=\"\"}[$__rate_interval]))", "expr": "sum (avg_over_time(container_memory_cache{node=~\"$node\", namespace=~\"$namespace\", container!=\"POD\"}[$__rate_interval]))",
"format": "time_series", "format": "time_series",
"interval": "", "interval": "",
"intervalFactor": 1, "intervalFactor": 1,
@@ -2769,7 +2769,7 @@
"refId": "B" "refId": "B"
}, },
{ {
"expr": "sum (avg_over_time(container_memory_swap{node=~\"$node\", namespace=~\"$namespace\", container!=\"\"}[$__rate_interval]))", "expr": "sum (avg_over_time(container_memory_swap{node=~\"$node\", namespace=~\"$namespace\", container!=\"POD\"}[$__rate_interval]))",
"format": "time_series", "format": "time_series",
"interval": "", "interval": "",
"intervalFactor": 1, "intervalFactor": 1,
@@ -2777,14 +2777,14 @@
"refId": "C" "refId": "C"
}, },
{ {
"expr": "sum (avg_over_time(container_memory_working_set_bytes:without_kmem{node=~\"$node\", namespace=~\"$namespace\", container!=\"\"}[$__rate_interval]))", "expr": "sum (avg_over_time(container_memory_working_set_bytes:without_kmem{node=~\"$node\", namespace=~\"$namespace\", container!=\"POD\"}[$__rate_interval]))",
"format": "time_series", "format": "time_series",
"intervalFactor": 1, "intervalFactor": 1,
"legendFormat": "Working set bytes without kmem", "legendFormat": "Working set bytes without kmem",
"refId": "D" "refId": "D"
}, },
{ {
"expr": "sum (avg_over_time(container_memory:kmem{node=~\"$node\", namespace=~\"$namespace\", container!=\"\"}[$__rate_interval]))", "expr": "sum (avg_over_time(container_memory:kmem{node=~\"$node\", namespace=~\"$namespace\", container!=\"POD\"}[$__rate_interval]))",
"format": "time_series", "format": "time_series",
"intervalFactor": 1, "intervalFactor": 1,
"legendFormat": "Kmem", "legendFormat": "Kmem",
@@ -2910,7 +2910,7 @@
"type": "prometheus", "type": "prometheus",
"uid": "$ds_prometheus" "uid": "$ds_prometheus"
}, },
"expr": "sum by (namespace)\n (\n (\n sum by(namespace, pod, container) (avg_over_time(kube_pod_container_resource_requests{resource=\"memory\",unit=\"byte\",node=~\"$node\", namespace=~\"$namespace\"}[$__rate_interval]))\n -\n sum by(namespace, pod, container) (avg_over_time(container_memory_working_set_bytes:without_kmem{node=~\"$node\", container!=\"\", namespace=~\"$namespace\"}[$__rate_interval]))\n ) > 0\n )", "expr": "sum by (namespace)\n (\n (\n sum by(namespace, pod, container) (avg_over_time(kube_pod_container_resource_requests{resource=\"memory\",unit=\"byte\",node=~\"$node\", namespace=~\"$namespace\"}[$__rate_interval]))\n -\n sum by(namespace, pod, container) (avg_over_time(container_memory_working_set_bytes:without_kmem{node=~\"$node\", container!=\"POD\", namespace=~\"$namespace\"}[$__rate_interval]))\n ) > 0\n )",
"format": "time_series", "format": "time_series",
"intervalFactor": 1, "intervalFactor": 1,
"legendFormat": "{{ namespace }}", "legendFormat": "{{ namespace }}",
@@ -3046,7 +3046,7 @@
"type": "prometheus", "type": "prometheus",
"uid": "$ds_prometheus" "uid": "$ds_prometheus"
}, },
"expr": "sum by (namespace)\n (\n (\n (\n sum by(namespace, pod, container) (avg_over_time(container_memory_working_set_bytes:without_kmem{node=~\"$node\", container!=\"\", namespace=~\"$namespace\"}[$__rate_interval]))\n -\n sum by(namespace, pod, container) (avg_over_time(kube_pod_container_resource_requests{resource=\"memory\",unit=\"byte\",node=~\"$node\", namespace=~\"$namespace\"}[$__rate_interval]))\n ) or sum by(namespace, pod, container) (avg_over_time(container_memory_working_set_bytes:without_kmem{node=~\"$node\", container!=\"\", namespace=~\"$namespace\"}[$__rate_interval]))\n )\n > 0\n )", "expr": "sum by (namespace)\n (\n (\n (\n sum by(namespace, pod, container) (avg_over_time(container_memory_working_set_bytes:without_kmem{node=~\"$node\", container!=\"POD\", namespace=~\"$namespace\"}[$__rate_interval]))\n -\n sum by(namespace, pod, container) (avg_over_time(kube_pod_container_resource_requests{resource=\"memory\",unit=\"byte\",node=~\"$node\", namespace=~\"$namespace\"}[$__rate_interval]))\n ) or sum by(namespace, pod, container) (avg_over_time(container_memory_working_set_bytes:without_kmem{node=~\"$node\", container!=\"POD\", namespace=~\"$namespace\"}[$__rate_interval]))\n )\n > 0\n )",
"format": "time_series", "format": "time_series",
"intervalFactor": 1, "intervalFactor": 1,
"legendFormat": "{{ namespace }}", "legendFormat": "{{ namespace }}",
@@ -3370,14 +3370,14 @@
"repeatDirection": "h", "repeatDirection": "h",
"targets": [ "targets": [
{ {
"expr": "sum by (namespace) (avg_over_time(container_memory_rss{node=~\"$node\", namespace=\"$namespace\", container!=\"\"}[$__rate_interval]))", "expr": "sum by (namespace) (avg_over_time(container_memory_rss{node=~\"$node\", namespace=\"$namespace\", container!=\"POD\"}[$__rate_interval]))",
"format": "time_series", "format": "time_series",
"intervalFactor": 1, "intervalFactor": 1,
"legendFormat": "RSS", "legendFormat": "RSS",
"refId": "A" "refId": "A"
}, },
{ {
"expr": "sum by (namespace) (avg_over_time(container_memory_cache{node=~\"$node\", namespace=\"$namespace\", container!=\"\"}[$__rate_interval]))", "expr": "sum by (namespace) (avg_over_time(container_memory_cache{node=~\"$node\", namespace=\"$namespace\", container!=\"POD\"}[$__rate_interval]))",
"format": "time_series", "format": "time_series",
"interval": "", "interval": "",
"intervalFactor": 1, "intervalFactor": 1,
@@ -3385,7 +3385,7 @@
"refId": "B" "refId": "B"
}, },
{ {
"expr": "sum by (namespace) (avg_over_time(container_memory_swap{node=~\"$node\", namespace=\"$namespace\", container!=\"\"}[$__rate_interval]))", "expr": "sum by (namespace) (avg_over_time(container_memory_swap{node=~\"$node\", namespace=\"$namespace\", container!=\"POD\"}[$__rate_interval]))",
"format": "time_series", "format": "time_series",
"interval": "", "interval": "",
"intervalFactor": 1, "intervalFactor": 1,
@@ -3393,35 +3393,35 @@
"refId": "C" "refId": "C"
}, },
{ {
"expr": "sum by (namespace) (avg_over_time(container_memory_working_set_bytes:without_kmem{node=~\"$node\", namespace=\"$namespace\", container!=\"\"}[$__rate_interval]))", "expr": "sum by (namespace) (avg_over_time(container_memory_working_set_bytes:without_kmem{node=~\"$node\", namespace=\"$namespace\", container!=\"POD\"}[$__rate_interval]))",
"format": "time_series", "format": "time_series",
"intervalFactor": 1, "intervalFactor": 1,
"legendFormat": "Working set bytes without kmem", "legendFormat": "Working set bytes without kmem",
"refId": "D" "refId": "D"
}, },
{ {
"expr": "sum by(namespace) (avg_over_time(vpa_target_recommendation{container!=\"\",namespace=\"$namespace\", resource=\"memory\"}[$__rate_interval]))", "expr": "sum by(namespace) (avg_over_time(vpa_target_recommendation{container!=\"POD\",namespace=\"$namespace\", resource=\"memory\"}[$__rate_interval]))",
"format": "time_series", "format": "time_series",
"intervalFactor": 1, "intervalFactor": 1,
"legendFormat": "VPA Target", "legendFormat": "VPA Target",
"refId": "E" "refId": "E"
}, },
{ {
"expr": "sum by(namespace) (avg_over_time(kube_pod_container_resource_requests{resource=\"memory\",unit=\"byte\",node=~\"$node\", container!=\"\", namespace=\"$namespace\"}[$__rate_interval]))", "expr": "sum by(namespace) (avg_over_time(kube_pod_container_resource_requests{resource=\"memory\",unit=\"byte\",node=~\"$node\", container!=\"POD\", namespace=\"$namespace\"}[$__rate_interval]))",
"format": "time_series", "format": "time_series",
"intervalFactor": 1, "intervalFactor": 1,
"legendFormat": "Requests", "legendFormat": "Requests",
"refId": "F" "refId": "F"
}, },
{ {
"expr": "sum by(namespace) (avg_over_time(kube_pod_container_resource_limits{resource=\"memory\",unit=\"byte\",node=~\"$node\", container!=\"\", namespace=\"$namespace\"}[$__rate_interval]))", "expr": "sum by(namespace) (avg_over_time(kube_pod_container_resource_limits{resource=\"memory\",unit=\"byte\",node=~\"$node\", container!=\"POD\", namespace=\"$namespace\"}[$__rate_interval]))",
"format": "time_series", "format": "time_series",
"intervalFactor": 1, "intervalFactor": 1,
"legendFormat": "Limits", "legendFormat": "Limits",
"refId": "G" "refId": "G"
}, },
{ {
"expr": "sum by (namespace) (avg_over_time(container_memory:kmem{node=~\"$node\", namespace=\"$namespace\", container!=\"\"}[$__rate_interval]))", "expr": "sum by (namespace) (avg_over_time(container_memory:kmem{node=~\"$node\", namespace=\"$namespace\", container!=\"POD\"}[$__rate_interval]))",
"format": "time_series", "format": "time_series",
"intervalFactor": 1, "intervalFactor": 1,
"legendFormat": "Kmem", "legendFormat": "Kmem",
@@ -3873,7 +3873,7 @@
"type": "prometheus", "type": "prometheus",
"uid": "$ds_prometheus" "uid": "$ds_prometheus"
}, },
"expr": "sum by (namespace) (rate(container_fs_reads_total{node=~\"$node\", namespace=~\"$namespace\", container!=\"\"}[$__rate_interval]))", "expr": "sum by (namespace) (rate(container_fs_reads_total{node=~\"$node\", namespace=~\"$namespace\", container!=\"POD\"}[$__rate_interval]))",
"format": "time_series", "format": "time_series",
"intervalFactor": 1, "intervalFactor": 1,
"legendFormat": "{{ namespace }}", "legendFormat": "{{ namespace }}",
@@ -4008,7 +4008,7 @@
"type": "prometheus", "type": "prometheus",
"uid": "$ds_prometheus" "uid": "$ds_prometheus"
}, },
"expr": "sum by (namespace) (rate(container_fs_writes_total{node=~\"$node\", namespace=~\"$namespace\", container!=\"\"}[$__rate_interval]))", "expr": "sum by (namespace) (rate(container_fs_writes_total{node=~\"$node\", namespace=~\"$namespace\", container!=\"POD\"}[$__rate_interval]))",
"format": "time_series", "format": "time_series",
"intervalFactor": 1, "intervalFactor": 1,
"legendFormat": "{{ namespace }}", "legendFormat": "{{ namespace }}",

View File

@@ -686,7 +686,7 @@
"type": "prometheus", "type": "prometheus",
"uid": "${ds_prometheus}" "uid": "${ds_prometheus}"
}, },
"expr": "sum by (container) (rate(container_cpu_usage_seconds_total{namespace=\"$namespace\", pod=\"$pod\", container!=\"\", container=~\"$container\"}[$__range]))\nor\nsum by (container) (avg_over_time(kube_pod_container_info{namespace=\"$namespace\", pod=\"$pod\", container=~\"$container\"}[$__range]) * 0)", "expr": "sum by (container) (rate(container_cpu_usage_seconds_total{namespace=\"$namespace\", pod=\"$pod\", container!=\"POD\", container=~\"$container\"}[$__range]))\nor\nsum by (container) (avg_over_time(kube_pod_container_info{namespace=\"$namespace\", pod=\"$pod\", container=~\"$container\"}[$__range]) * 0)",
"format": "table", "format": "table",
"hide": false, "hide": false,
"instant": true, "instant": true,
@@ -759,7 +759,7 @@
"type": "prometheus", "type": "prometheus",
"uid": "${ds_prometheus}" "uid": "${ds_prometheus}"
}, },
"expr": "sum by (container) (avg_over_time(container_memory_working_set_bytes:without_kmem{namespace=\"$namespace\", pod=\"$pod\", container!=\"\", container=~\"$container\"}[$__range]))\nor\nsum by (container) (avg_over_time(kube_pod_container_info{namespace=\"$namespace\", pod=\"$pod\", container=~\"$container\"}[$__range]) * 0)", "expr": "sum by (container) (avg_over_time(container_memory_working_set_bytes:without_kmem{namespace=\"$namespace\", pod=\"$pod\", container!=\"POD\", container=~\"$container\"}[$__range]))\nor\nsum by (container) (avg_over_time(kube_pod_container_info{namespace=\"$namespace\", pod=\"$pod\", container=~\"$container\"}[$__range]) * 0)",
"format": "table", "format": "table",
"instant": true, "instant": true,
"intervalFactor": 1, "intervalFactor": 1,
@@ -847,7 +847,7 @@
"type": "prometheus", "type": "prometheus",
"uid": "${ds_prometheus}" "uid": "${ds_prometheus}"
}, },
"expr": "sum by(container) (rate(container_fs_reads_total{namespace=\"$namespace\", pod=\"$pod\", container!=\"\"}[$__range]))", "expr": "sum by(container) (rate(container_fs_reads_total{namespace=\"$namespace\", pod=\"$pod\", container!=\"POD\"}[$__range]))",
"format": "table", "format": "table",
"hide": false, "hide": false,
"instant": true, "instant": true,
@@ -860,7 +860,7 @@
"type": "prometheus", "type": "prometheus",
"uid": "${ds_prometheus}" "uid": "${ds_prometheus}"
}, },
"expr": "sum by(container) (rate(container_fs_writes_total{namespace=\"$namespace\", pod=\"$pod\", container!=\"\"}[$__range]))", "expr": "sum by(container) (rate(container_fs_writes_total{namespace=\"$namespace\", pod=\"$pod\", container!=\"POD\"}[$__range]))",
"format": "table", "format": "table",
"hide": false, "hide": false,
"instant": true, "instant": true,
@@ -899,7 +899,7 @@
"type": "prometheus", "type": "prometheus",
"uid": "${ds_prometheus}" "uid": "${ds_prometheus}"
}, },
"expr": "sum by (container) (avg_over_time(container_memory:kmem{namespace=\"$namespace\", pod=\"$pod\", container!=\"\", container=~\"$container\"}[$__range]))\nor\nsum by (container) (avg_over_time(kube_pod_container_info{namespace=\"$namespace\", pod=\"$pod\", container=~\"$container\"}[$__range]) * 0)", "expr": "sum by (container) (avg_over_time(container_memory:kmem{namespace=\"$namespace\", pod=\"$pod\", container!=\"POD\", container=~\"$container\"}[$__range]))\nor\nsum by (container) (avg_over_time(kube_pod_container_info{namespace=\"$namespace\", pod=\"$pod\", container=~\"$container\"}[$__range]) * 0)",
"format": "table", "format": "table",
"instant": true, "instant": true,
"intervalFactor": 1, "intervalFactor": 1,
@@ -1503,7 +1503,7 @@
"type": "prometheus", "type": "prometheus",
"uid": "$ds_prometheus" "uid": "$ds_prometheus"
}, },
"expr": "sum by(container) (rate(container_cpu_usage_seconds_total{container!=\"\", pod=\"$pod\", namespace=\"$namespace\"}[$__rate_interval]))", "expr": "sum by(container) (rate(container_cpu_usage_seconds_total{container!=\"POD\", pod=\"$pod\", namespace=\"$namespace\"}[$__rate_interval]))",
"format": "time_series", "format": "time_series",
"instant": false, "instant": false,
"intervalFactor": 1, "intervalFactor": 1,
@@ -1669,7 +1669,7 @@
"type": "prometheus", "type": "prometheus",
"uid": "$ds_prometheus" "uid": "$ds_prometheus"
}, },
"expr": "sum by(pod) (rate(container_cpu_system_seconds_total{container!=\"\", pod=\"$pod\", namespace=\"$namespace\"}[$__rate_interval]))", "expr": "sum by(pod) (rate(container_cpu_system_seconds_total{container!=\"POD\", pod=\"$pod\", namespace=\"$namespace\"}[$__rate_interval]))",
"format": "time_series", "format": "time_series",
"instant": false, "instant": false,
"intervalFactor": 1, "intervalFactor": 1,
@@ -1681,7 +1681,7 @@
"type": "prometheus", "type": "prometheus",
"uid": "$ds_prometheus" "uid": "$ds_prometheus"
}, },
"expr": "sum by(pod) (rate(container_cpu_user_seconds_total{container!=\"\", pod=\"$pod\", namespace=\"$namespace\"}[$__rate_interval]))", "expr": "sum by(pod) (rate(container_cpu_user_seconds_total{container!=\"POD\", pod=\"$pod\", namespace=\"$namespace\"}[$__rate_interval]))",
"format": "time_series", "format": "time_series",
"intervalFactor": 1, "intervalFactor": 1,
"legendFormat": "User", "legendFormat": "User",
@@ -1820,7 +1820,7 @@
"type": "prometheus", "type": "prometheus",
"uid": "$ds_prometheus" "uid": "$ds_prometheus"
}, },
"expr": "sum by (namespace, pod, container)\n (\n (\n sum by(namespace, pod, container) (avg_over_time(kube_pod_container_resource_requests{resource=\"cpu\",unit=\"core\",namespace=\"$namespace\", pod=\"$pod\", container=~\"$container\"}[$__rate_interval]))\n -\n sum by(namespace, pod, container) (rate(container_cpu_usage_seconds_total{container!=\"\", namespace=\"$namespace\", pod=\"$pod\", container=~\"$container\"}[$__rate_interval]))\n ) > 0\n )", "expr": "sum by (namespace, pod, container)\n (\n (\n sum by(namespace, pod, container) (avg_over_time(kube_pod_container_resource_requests{resource=\"cpu\",unit=\"core\",namespace=\"$namespace\", pod=\"$pod\", container=~\"$container\"}[$__rate_interval]))\n -\n sum by(namespace, pod, container) (rate(container_cpu_usage_seconds_total{container!=\"POD\", namespace=\"$namespace\", pod=\"$pod\", container=~\"$container\"}[$__rate_interval]))\n ) > 0\n )",
"format": "time_series", "format": "time_series",
"hide": false, "hide": false,
"intervalFactor": 1, "intervalFactor": 1,
@@ -2269,7 +2269,7 @@
"repeatDirection": "h", "repeatDirection": "h",
"targets": [ "targets": [
{ {
"expr": "sum by(container) (rate(container_cpu_usage_seconds_total{namespace=\"$namespace\", pod=\"$pod\", container!=\"\", container=\"$container\"}[$__rate_interval]))", "expr": "sum by(container) (rate(container_cpu_usage_seconds_total{namespace=\"$namespace\", pod=\"$pod\", container!=\"POD\", container=\"$container\"}[$__rate_interval]))",
"format": "time_series", "format": "time_series",
"intervalFactor": 1, "intervalFactor": 1,
"legendFormat": "Usage", "legendFormat": "Usage",
@@ -2476,7 +2476,7 @@
"type": "prometheus", "type": "prometheus",
"uid": "$ds_prometheus" "uid": "$ds_prometheus"
}, },
"expr": "sum by(container) (rate(container_cpu_system_seconds_total{container!=\"\", pod=\"$pod\", namespace=\"$namespace\", container=\"$container\"}[$__rate_interval]))", "expr": "sum by(container) (rate(container_cpu_system_seconds_total{container!=\"POD\", pod=\"$pod\", namespace=\"$namespace\", container=\"$container\"}[$__rate_interval]))",
"format": "time_series", "format": "time_series",
"instant": false, "instant": false,
"intervalFactor": 1, "intervalFactor": 1,
@@ -2488,7 +2488,7 @@
"type": "prometheus", "type": "prometheus",
"uid": "$ds_prometheus" "uid": "$ds_prometheus"
}, },
"expr": "sum by(container) (rate(container_cpu_user_seconds_total{container!=\"\", pod=\"$pod\", namespace=\"$namespace\", container=\"$container\"}[$__rate_interval]))", "expr": "sum by(container) (rate(container_cpu_user_seconds_total{container!=\"POD\", pod=\"$pod\", namespace=\"$namespace\", container=\"$container\"}[$__rate_interval]))",
"format": "time_series", "format": "time_series",
"intervalFactor": 1, "intervalFactor": 1,
"legendFormat": "User", "legendFormat": "User",
@@ -2639,7 +2639,7 @@
"type": "prometheus", "type": "prometheus",
"uid": "$ds_prometheus" "uid": "$ds_prometheus"
}, },
"expr": "sum by(container) (avg_over_time(container_memory_working_set_bytes:without_kmem{container!=\"\", pod=\"$pod\", namespace=\"$namespace\"}[$__rate_interval]))", "expr": "sum by(container) (avg_over_time(container_memory_working_set_bytes:without_kmem{container!=\"POD\", pod=\"$pod\", namespace=\"$namespace\"}[$__rate_interval]))",
"format": "time_series", "format": "time_series",
"instant": false, "instant": false,
"intervalFactor": 1, "intervalFactor": 1,
@@ -2816,7 +2816,7 @@
"pluginVersion": "8.5.13", "pluginVersion": "8.5.13",
"targets": [ "targets": [
{ {
"expr": "sum by(pod) (avg_over_time(container_memory_rss{namespace=\"$namespace\", pod=\"$pod\", container!=\"\"}[$__rate_interval]))", "expr": "sum by(pod) (avg_over_time(container_memory_rss{namespace=\"$namespace\", pod=\"$pod\", container!=\"POD\"}[$__rate_interval]))",
"format": "time_series", "format": "time_series",
"instant": false, "instant": false,
"intervalFactor": 1, "intervalFactor": 1,
@@ -2824,28 +2824,28 @@
"refId": "A" "refId": "A"
}, },
{ {
"expr": "sum by(pod) (avg_over_time(container_memory_cache{namespace=\"$namespace\", pod=\"$pod\", container!=\"\"}[$__rate_interval]))", "expr": "sum by(pod) (avg_over_time(container_memory_cache{namespace=\"$namespace\", pod=\"$pod\", container!=\"POD\"}[$__rate_interval]))",
"format": "time_series", "format": "time_series",
"intervalFactor": 1, "intervalFactor": 1,
"legendFormat": "Cache", "legendFormat": "Cache",
"refId": "B" "refId": "B"
}, },
{ {
"expr": "sum by(pod) (avg_over_time(container_memory_swap{namespace=\"$namespace\", pod=\"$pod\", container!=\"\"}[$__rate_interval]))", "expr": "sum by(pod) (avg_over_time(container_memory_swap{namespace=\"$namespace\", pod=\"$pod\", container!=\"POD\"}[$__rate_interval]))",
"format": "time_series", "format": "time_series",
"intervalFactor": 1, "intervalFactor": 1,
"legendFormat": "Swap", "legendFormat": "Swap",
"refId": "C" "refId": "C"
}, },
{ {
"expr": "sum by(pod) (avg_over_time(container_memory_working_set_bytes:without_kmem{namespace=\"$namespace\", pod=\"$pod\", container!=\"\"}[$__rate_interval]))", "expr": "sum by(pod) (avg_over_time(container_memory_working_set_bytes:without_kmem{namespace=\"$namespace\", pod=\"$pod\", container!=\"POD\"}[$__rate_interval]))",
"format": "time_series", "format": "time_series",
"intervalFactor": 1, "intervalFactor": 1,
"legendFormat": "Working set bytes without kmem", "legendFormat": "Working set bytes without kmem",
"refId": "D" "refId": "D"
}, },
{ {
"expr": "sum by(pod) (avg_over_time(container_memory:kmem{namespace=\"$namespace\", pod=\"$pod\", container!=\"\"}[$__rate_interval]))", "expr": "sum by(pod) (avg_over_time(container_memory:kmem{namespace=\"$namespace\", pod=\"$pod\", container!=\"POD\"}[$__rate_interval]))",
"format": "time_series", "format": "time_series",
"intervalFactor": 1, "intervalFactor": 1,
"legendFormat": "Kmem", "legendFormat": "Kmem",
@@ -2974,7 +2974,7 @@
"type": "prometheus", "type": "prometheus",
"uid": "$ds_prometheus" "uid": "$ds_prometheus"
}, },
"expr": "sum by (container)\n (\n (\n sum by (namespace, pod, container) (avg_over_time(kube_pod_container_resource_requests{resource=\"memory\",unit=\"byte\",namespace=\"$namespace\", pod=\"$pod\", container=~\"$container\"}[$__rate_interval]))\n -\n sum by (namespace, pod, container) (avg_over_time(container_memory_working_set_bytes:without_kmem{namespace=\"$namespace\", pod=\"$pod\", container=~\"$container\", container!=\"\"}[$__rate_interval]))\n ) > 0\n )", "expr": "sum by (container)\n (\n (\n sum by (namespace, pod, container) (avg_over_time(kube_pod_container_resource_requests{resource=\"memory\",unit=\"byte\",namespace=\"$namespace\", pod=\"$pod\", container=~\"$container\"}[$__rate_interval]))\n -\n sum by (namespace, pod, container) (avg_over_time(container_memory_working_set_bytes:without_kmem{namespace=\"$namespace\", pod=\"$pod\", container=~\"$container\", container!=\"POD\"}[$__rate_interval]))\n ) > 0\n )",
"format": "time_series", "format": "time_series",
"hide": false, "hide": false,
"intervalFactor": 1, "intervalFactor": 1,
@@ -3110,7 +3110,7 @@
"type": "prometheus", "type": "prometheus",
"uid": "$ds_prometheus" "uid": "$ds_prometheus"
}, },
"expr": "sum by (container)\n (\n (\n (\n sum by (namespace, pod, container) (avg_over_time(container_memory_working_set_bytes:without_kmem{namespace=\"$namespace\", pod=\"$pod\", container=~\"$container\"}[$__rate_interval]))\n -\n sum by (namespace, pod, container) (avg_over_time(kube_pod_container_resource_requests{resource=\"memory\",unit=\"byte\",namespace=\"$namespace\", pod=\"$pod\", container=~\"$container\", container!=\"\"}[$__rate_interval]))\n ) or sum by (namespace, pod, container) (avg_over_time(container_memory_working_set_bytes:without_kmem{namespace=\"$namespace\", pod=\"$pod\", container=~\"$container\", container!=\"\"}[$__rate_interval]))\n ) > 0\n )", "expr": "sum by (container)\n (\n (\n (\n sum by (namespace, pod, container) (avg_over_time(container_memory_working_set_bytes:without_kmem{namespace=\"$namespace\", pod=\"$pod\", container=~\"$container\"}[$__rate_interval]))\n -\n sum by (namespace, pod, container) (avg_over_time(kube_pod_container_resource_requests{resource=\"memory\",unit=\"byte\",namespace=\"$namespace\", pod=\"$pod\", container=~\"$container\", container!=\"POD\"}[$__rate_interval]))\n ) or sum by (namespace, pod, container) (avg_over_time(container_memory_working_set_bytes:without_kmem{namespace=\"$namespace\", pod=\"$pod\", container=~\"$container\", container!=\"POD\"}[$__rate_interval]))\n ) > 0\n )",
"format": "time_series", "format": "time_series",
"hide": false, "hide": false,
"intervalFactor": 1, "intervalFactor": 1,
@@ -3431,7 +3431,7 @@
"repeatDirection": "h", "repeatDirection": "h",
"targets": [ "targets": [
{ {
"expr": "sum by(container) (avg_over_time(container_memory_rss{namespace=\"$namespace\", pod=\"$pod\", container!=\"\", container=\"$container\"}[$__rate_interval]))", "expr": "sum by(container) (avg_over_time(container_memory_rss{namespace=\"$namespace\", pod=\"$pod\", container!=\"POD\", container=\"$container\"}[$__rate_interval]))",
"format": "time_series", "format": "time_series",
"instant": false, "instant": false,
"intervalFactor": 1, "intervalFactor": 1,
@@ -3439,7 +3439,7 @@
"refId": "A" "refId": "A"
}, },
{ {
"expr": "sum by(container) (avg_over_time(container_memory_cache{namespace=\"$namespace\", pod=\"$pod\", container!=\"\", container=\"$container\"}[$__rate_interval]))", "expr": "sum by(container) (avg_over_time(container_memory_cache{namespace=\"$namespace\", pod=\"$pod\", container!=\"POD\", container=\"$container\"}[$__rate_interval]))",
"format": "time_series", "format": "time_series",
"interval": "", "interval": "",
"intervalFactor": 1, "intervalFactor": 1,
@@ -3447,28 +3447,28 @@
"refId": "B" "refId": "B"
}, },
{ {
"expr": "sum by(container) (avg_over_time(container_memory_swap{namespace=\"$namespace\", pod=\"$pod\", container!=\"\", container=\"$container\"}[$__rate_interval]))", "expr": "sum by(container) (avg_over_time(container_memory_swap{namespace=\"$namespace\", pod=\"$pod\", container!=\"POD\", container=\"$container\"}[$__rate_interval]))",
"format": "time_series", "format": "time_series",
"intervalFactor": 1, "intervalFactor": 1,
"legendFormat": "Swap", "legendFormat": "Swap",
"refId": "C" "refId": "C"
}, },
{ {
"expr": "sum by(container) (avg_over_time(container_memory_working_set_bytes:without_kmem{namespace=\"$namespace\", pod=\"$pod\", container!=\"\", container=\"$container\"}[$__rate_interval]))", "expr": "sum by(container) (avg_over_time(container_memory_working_set_bytes:without_kmem{namespace=\"$namespace\", pod=\"$pod\", container!=\"POD\", container=\"$container\"}[$__rate_interval]))",
"format": "time_series", "format": "time_series",
"intervalFactor": 1, "intervalFactor": 1,
"legendFormat": "Working set bytes without kmem", "legendFormat": "Working set bytes without kmem",
"refId": "D" "refId": "D"
}, },
{ {
"expr": "sum by(container) (avg_over_time(kube_pod_container_resource_limits{resource=\"memory\",unit=\"byte\",namespace=\"$namespace\", pod=\"$pod\", container!=\"\", container=\"$container\"}[$__rate_interval]))", "expr": "sum by(container) (avg_over_time(kube_pod_container_resource_limits{resource=\"memory\",unit=\"byte\",namespace=\"$namespace\", pod=\"$pod\", container!=\"POD\", container=\"$container\"}[$__rate_interval]))",
"format": "time_series", "format": "time_series",
"intervalFactor": 1, "intervalFactor": 1,
"legendFormat": "Limits", "legendFormat": "Limits",
"refId": "E" "refId": "E"
}, },
{ {
"expr": "sum by(container) (avg_over_time(kube_pod_container_resource_requests{resource=\"memory\",unit=\"byte\",namespace=\"$namespace\", pod=\"$pod\", container!=\"\", container=\"$container\"}[$__rate_interval]))", "expr": "sum by(container) (avg_over_time(kube_pod_container_resource_requests{resource=\"memory\",unit=\"byte\",namespace=\"$namespace\", pod=\"$pod\", container!=\"POD\", container=\"$container\"}[$__rate_interval]))",
"format": "time_series", "format": "time_series",
"intervalFactor": 1, "intervalFactor": 1,
"legendFormat": "Requests", "legendFormat": "Requests",
@@ -3482,7 +3482,7 @@
"refId": "G" "refId": "G"
}, },
{ {
"expr": "sum by(container) (avg_over_time(container_memory:kmem{namespace=\"$namespace\", pod=\"$pod\", container!=\"\", container=\"$container\"}[$__rate_interval]))", "expr": "sum by(container) (avg_over_time(container_memory:kmem{namespace=\"$namespace\", pod=\"$pod\", container!=\"POD\", container=\"$container\"}[$__rate_interval]))",
"format": "time_series", "format": "time_series",
"intervalFactor": 1, "intervalFactor": 1,
"legendFormat": "Kmem", "legendFormat": "Kmem",
@@ -3930,7 +3930,7 @@
"type": "prometheus", "type": "prometheus",
"uid": "$ds_prometheus" "uid": "$ds_prometheus"
}, },
"expr": "sum by(container) (rate(container_fs_reads_total{container!=\"\", pod=\"$pod\", namespace=\"$namespace\"}[$__rate_interval]))", "expr": "sum by(container) (rate(container_fs_reads_total{container!=\"POD\", pod=\"$pod\", namespace=\"$namespace\"}[$__rate_interval]))",
"format": "time_series", "format": "time_series",
"intervalFactor": 1, "intervalFactor": 1,
"legendFormat": "{{ container }}", "legendFormat": "{{ container }}",
@@ -4068,7 +4068,7 @@
"type": "prometheus", "type": "prometheus",
"uid": "$ds_prometheus" "uid": "$ds_prometheus"
}, },
"expr": "sum by(container) (rate(container_fs_writes_total{container!=\"\", pod=\"$pod\", namespace=\"$namespace\"}[$__rate_interval]))", "expr": "sum by(container) (rate(container_fs_writes_total{container!=\"POD\", pod=\"$pod\", namespace=\"$namespace\"}[$__rate_interval]))",
"format": "time_series", "format": "time_series",
"intervalFactor": 1, "intervalFactor": 1,
"legendFormat": "{{ container }}", "legendFormat": "{{ container }}",

View File

@@ -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.

View File

@@ -60,7 +60,7 @@ done
# Prepare system drive # Prepare system drive
if [ ! -f nocloud-amd64.raw ]; then if [ ! -f nocloud-amd64.raw ]; then
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 wget https://github.com/cozystack/cozystack/releases/latest/download/nocloud-amd64.raw.xz -O nocloud-amd64.raw.xz
rm -f nocloud-amd64.raw rm -f nocloud-amd64.raw
xz --decompress nocloud-amd64.raw.xz xz --decompress nocloud-amd64.raw.xz
fi fi
@@ -113,11 +113,6 @@ machine:
- usermode_helper=disabled - usermode_helper=disabled
- name: zfs - name: zfs
- name: spl - name: spl
registries:
mirrors:
docker.io:
endpoints:
- https://mirror.gcr.io
files: files:
- content: | - content: |
[plugins] [plugins]
@@ -234,8 +229,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 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 # Wait for Cluster-API providers
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' 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=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 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
# Wait for linstor controller # Wait for linstor controller
kubectl wait deploy --timeout=5m --for=condition=available -n cozy-linstor linstor-controller kubectl wait deploy --timeout=5m --for=condition=available -n cozy-linstor linstor-controller
@@ -318,12 +313,7 @@ kubectl patch -n tenant-root tenants.apps.cozystack.io root --type=merge -p '{"s
timeout 60 sh -c 'until kubectl get hr -n tenant-root etcd ingress monitoring tenant-root; do sleep 1; done' timeout 60 sh -c 'until kubectl get hr -n tenant-root etcd ingress monitoring tenant-root; do sleep 1; done'
# Wait for HelmReleases be installed # Wait for HelmReleases be installed
kubectl wait --timeout=2m --for=condition=ready -n tenant-root hr etcd ingress tenant-root kubectl wait --timeout=2m --for=condition=ready -n tenant-root hr etcd ingress monitoring tenant-root
if ! kubectl wait --timeout=2m --for=condition=ready -n tenant-root hr monitoring; then
flux reconcile hr monitoring -n tenant-root --force
kubectl wait --timeout=2m --for=condition=ready -n tenant-root hr monitoring
fi
kubectl patch -n tenant-root ingresses.apps.cozystack.io ingress --type=merge -p '{"spec":{ kubectl patch -n tenant-root ingresses.apps.cozystack.io ingress --type=merge -p '{"spec":{
"dashboard": true "dashboard": true
@@ -338,7 +328,7 @@ kubectl wait --timeout=5m --for=jsonpath=.status.readyReplicas=3 -n tenant-root
# Wait for Victoria metrics # Wait for Victoria metrics
kubectl wait --timeout=5m --for=jsonpath=.status.updateStatus=operational -n tenant-root vmalert/vmalert-shortterm vmalertmanager/alertmanager kubectl wait --timeout=5m --for=jsonpath=.status.updateStatus=operational -n tenant-root vmalert/vmalert-shortterm vmalertmanager/alertmanager
kubectl wait --timeout=5m --for=jsonpath=.status.updateStatus=operational -n tenant-root vlogs/generic kubectl wait --timeout=5m --for=jsonpath=.status.status=operational -n tenant-root vlogs/generic
kubectl wait --timeout=5m --for=jsonpath=.status.clusterStatus=operational -n tenant-root vmcluster/shortterm vmcluster/longterm kubectl wait --timeout=5m --for=jsonpath=.status.clusterStatus=operational -n tenant-root vmcluster/shortterm vmcluster/longterm
# Wait for grafana # Wait for grafana
@@ -357,5 +347,5 @@ kubectl patch -n cozy-system cm/cozystack --type=merge -p '{"data":{
"oidc-enabled": "true" "oidc-enabled": "true"
}}' }}'
timeout 120 sh -c 'until kubectl get hr -n cozy-keycloak keycloak keycloak-configure keycloak-operator; do sleep 1; done' timeout 60 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 kubectl wait --timeout=10m --for=condition=ready -n cozy-keycloak hr keycloak keycloak-configure keycloak-operator

View File

@@ -19,19 +19,21 @@ fi
miss_map=$(echo "$new_map" | awk 'NR==FNR { nm[$1 " " $2] = $3; next } { if (!($1 " " $2 in nm)) print $1, $2, $3}' - "$file") miss_map=$(echo "$new_map" | awk 'NR==FNR { nm[$1 " " $2] = $3; next } { if (!($1 " " $2 in nm)) print $1, $2, $3}' - "$file")
# search accross all tags sorted by version # search accross all tags sorted by version
search_commits=$(git ls-remote --tags origin | awk -F/ '$3 ~ /v[0-9]+.[0-9]+.[0-9]+/ {print}' | sort -k2,2 -rV | awk '{print $1}') search_commits=$(git ls-remote --tags origin | grep 'refs/tags/v' | sort -k2,2 -rV | awk '{print $1}')
# add latest main commit to search
search_commits="${search_commits} $(git rev-parse "origin/main")"
resolved_miss_map=$( resolved_miss_map=$(
echo "$miss_map" | while read -r chart version commit; do echo "$miss_map" | while read -r chart version commit; do
# if version is found in HEAD, it's HEAD # if version is found in HEAD, it's HEAD
if [ "$(awk '$1 == "version:" {print $2}' ./${chart}/Chart.yaml)" = "${version}" ]; then if grep -q "^version: $version$" ./${chart}/Chart.yaml; then
echo "$chart $version HEAD" echo "$chart $version HEAD"
continue continue
fi fi
# if commit is not HEAD, check if it's valid # if commit is not HEAD, check if it's valid
if [ "$commit" != "HEAD" ]; then if [ $commit != "HEAD" ]; then
if [ "$(git show "${commit}:./${chart}/Chart.yaml" | awk '$1 == "version:" {print $2}')" != "${version}" ]; then if ! git show "${commit}:./${chart}/Chart.yaml" 2>/dev/null | grep -q "^version: $version$"; then
echo "Commit $commit for $chart $version is not valid" >&2 echo "Commit $commit for $chart $version is not valid" >&2
exit 1 exit 1
fi fi
@@ -44,15 +46,15 @@ resolved_miss_map=$(
# if commit is HEAD, but version is not found in HEAD, check all tags # if commit is HEAD, but version is not found in HEAD, check all tags
found_tag="" found_tag=""
for tag in $search_commits; do for tag in $search_commits; do
if [ "$(git show "${tag}:./${chart}/Chart.yaml" | awk '$1 == "version:" {print $2}')" = "${version}" ]; then if git show "${tag}:./${chart}/Chart.yaml" 2>/dev/null | grep -q "^version: $version$"; then
found_tag=$(git rev-parse --short "${tag}") found_tag=$(git rev-parse --short "${tag}")
break break
fi fi
done done
if [ -z "$found_tag" ]; then if [ -z "$found_tag" ]; then
echo "Can't find $chart $version in any version tag, removing it" >&2 echo "Can't find $chart $version in any version tag or in the latest main commit" >&2
continue exit 1
fi fi
echo "$chart $version $found_tag" echo "$chart $version $found_tag"

View File

@@ -7,5 +7,3 @@ gh release upload --clobber $version _out/assets/cozystack-installer.yaml
gh release upload --clobber $version _out/assets/metal-amd64.iso gh release upload --clobber $version _out/assets/metal-amd64.iso
gh release upload --clobber $version _out/assets/metal-amd64.raw.xz gh release upload --clobber $version _out/assets/metal-amd64.raw.xz
gh release upload --clobber $version _out/assets/nocloud-amd64.raw.xz gh release upload --clobber $version _out/assets/nocloud-amd64.raw.xz
gh release upload --clobber $version _out/assets/kernel-amd64
gh release upload --clobber $version _out/assets/initramfs-metal-amd64.xz

View File

@@ -1,87 +0,0 @@
package controller
import (
"context"
"strings"
corev1 "k8s.io/api/core/v1"
apierrors "k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/types"
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/controller-runtime/pkg/log"
cozyv1alpha1 "github.com/cozystack/cozystack/api/v1alpha1"
)
// WorkloadMonitorReconciler reconciles a WorkloadMonitor object
type WorkloadReconciler struct {
client.Client
Scheme *runtime.Scheme
}
func (r *WorkloadReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) {
logger := log.FromContext(ctx)
w := &cozyv1alpha1.Workload{}
err := r.Get(ctx, req.NamespacedName, w)
if err != nil {
if apierrors.IsNotFound(err) {
return ctrl.Result{}, nil
}
logger.Error(err, "Unable to fetch Workload")
return ctrl.Result{}, err
}
// it's being deleted, nothing to handle
if w.DeletionTimestamp != nil {
return ctrl.Result{}, nil
}
t := getMonitoredObject(w)
err = r.Get(ctx, types.NamespacedName{Name: t.GetName(), Namespace: t.GetNamespace()}, t)
// found object, nothing to do
if err == nil {
return ctrl.Result{}, nil
}
// error getting object but not 404 -- requeue
if !apierrors.IsNotFound(err) {
logger.Error(err, "failed to get dependent object", "kind", t.GetObjectKind(), "dependent-object-name", t.GetName())
return ctrl.Result{}, err
}
err = r.Delete(ctx, w)
if err != nil {
logger.Error(err, "failed to delete workload")
}
return ctrl.Result{}, err
}
// SetupWithManager registers our controller with the Manager and sets up watches.
func (r *WorkloadReconciler) SetupWithManager(mgr ctrl.Manager) error {
return ctrl.NewControllerManagedBy(mgr).
// Watch WorkloadMonitor objects
For(&cozyv1alpha1.Workload{}).
Complete(r)
}
func getMonitoredObject(w *cozyv1alpha1.Workload) client.Object {
if 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-") {
obj := &corev1.Service{}
obj.Name = strings.TrimPrefix(w.Name, "svc-")
obj.Namespace = w.Namespace
return obj
}
obj := &corev1.Pod{}
obj.Name = w.Name
obj.Namespace = w.Namespace
return obj
}

View File

@@ -3,7 +3,6 @@ package controller
import ( import (
"context" "context"
"encoding/json" "encoding/json"
"fmt"
"sort" "sort"
apierrors "k8s.io/apimachinery/pkg/api/errors" apierrors "k8s.io/apimachinery/pkg/api/errors"
@@ -34,17 +33,6 @@ type WorkloadMonitorReconciler struct {
// +kubebuilder:rbac:groups=cozystack.io,resources=workloads,verbs=get;list;watch;create;update;patch;delete // +kubebuilder:rbac:groups=cozystack.io,resources=workloads,verbs=get;list;watch;create;update;patch;delete
// +kubebuilder:rbac:groups=cozystack.io,resources=workloads/status,verbs=get;update;patch // +kubebuilder:rbac:groups=cozystack.io,resources=workloads/status,verbs=get;update;patch
// +kubebuilder:rbac:groups=core,resources=pods,verbs=get;list;watch // +kubebuilder:rbac:groups=core,resources=pods,verbs=get;list;watch
// +kubebuilder:rbac:groups=core,resources=persistentvolumeclaims,verbs=get;list;watch
// isServiceReady checks if the service has an external IP bound
func (r *WorkloadMonitorReconciler) isServiceReady(svc *corev1.Service) bool {
return len(svc.Status.LoadBalancer.Ingress) > 0
}
// isPVCReady checks if the PVC is bound
func (r *WorkloadMonitorReconciler) isPVCReady(pvc *corev1.PersistentVolumeClaim) bool {
return pvc.Status.Phase == corev1.ClaimBound
}
// isPodReady checks if the Pod is in the Ready condition. // isPodReady checks if the Pod is in the Ready condition.
func (r *WorkloadMonitorReconciler) isPodReady(pod *corev1.Pod) bool { func (r *WorkloadMonitorReconciler) isPodReady(pod *corev1.Pod) bool {
@@ -100,110 +88,6 @@ func updateOwnerReferences(obj metav1.Object, monitor client.Object) {
obj.SetOwnerReferences(owners) obj.SetOwnerReferences(owners)
} }
// reconcileServiceForMonitor creates or updates a Workload object for the given Service and WorkloadMonitor.
func (r *WorkloadMonitorReconciler) reconcileServiceForMonitor(
ctx context.Context,
monitor *cozyv1alpha1.WorkloadMonitor,
svc corev1.Service,
) error {
logger := log.FromContext(ctx)
workload := &cozyv1alpha1.Workload{
ObjectMeta: metav1.ObjectMeta{
Name: fmt.Sprintf("svc-%s", svc.Name),
Namespace: svc.Namespace,
},
}
resources := make(map[string]resource.Quantity)
quantity := resource.MustParse("0")
for _, ing := range svc.Status.LoadBalancer.Ingress {
if ing.IP != "" {
quantity.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
_, err := ctrl.CreateOrUpdate(ctx, r.Client, workload, func() error {
// Update owner references with the new monitor
updateOwnerReferences(workload.GetObjectMeta(), monitor)
workload.Labels = svc.Labels
// Fill Workload status fields:
workload.Status.Kind = monitor.Spec.Kind
workload.Status.Type = monitor.Spec.Type
workload.Status.Resources = resources
workload.Status.Operational = r.isServiceReady(&svc)
return nil
})
if err != nil {
logger.Error(err, "Failed to CreateOrUpdate Workload", "workload", workload.Name)
return err
}
return nil
}
// reconcilePVCForMonitor creates or updates a Workload object for the given PVC and WorkloadMonitor.
func (r *WorkloadMonitorReconciler) reconcilePVCForMonitor(
ctx context.Context,
monitor *cozyv1alpha1.WorkloadMonitor,
pvc corev1.PersistentVolumeClaim,
) error {
logger := log.FromContext(ctx)
workload := &cozyv1alpha1.Workload{
ObjectMeta: metav1.ObjectMeta{
Name: fmt.Sprintf("pvc-%s", pvc.Name),
Namespace: pvc.Namespace,
},
}
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
}
_, err := ctrl.CreateOrUpdate(ctx, r.Client, workload, func() error {
// Update owner references with the new monitor
updateOwnerReferences(workload.GetObjectMeta(), monitor)
workload.Labels = pvc.Labels
// Fill Workload status fields:
workload.Status.Kind = monitor.Spec.Kind
workload.Status.Type = monitor.Spec.Type
workload.Status.Resources = resources
workload.Status.Operational = r.isPVCReady(&pvc)
return nil
})
if err != nil {
logger.Error(err, "Failed to CreateOrUpdate Workload", "workload", workload.Name)
return err
}
return nil
}
// reconcilePodForMonitor creates or updates a Workload object for the given Pod and WorkloadMonitor. // reconcilePodForMonitor creates or updates a Workload object for the given Pod and WorkloadMonitor.
func (r *WorkloadMonitorReconciler) reconcilePodForMonitor( func (r *WorkloadMonitorReconciler) reconcilePodForMonitor(
ctx context.Context, ctx context.Context,
@@ -321,45 +205,6 @@ func (r *WorkloadMonitorReconciler) Reconcile(ctx context.Context, req ctrl.Requ
} }
} }
pvcList := &corev1.PersistentVolumeClaimList{}
if err := r.List(
ctx,
pvcList,
client.InNamespace(monitor.Namespace),
client.MatchingLabels(monitor.Spec.Selector),
); err != nil {
logger.Error(err, "Unable to list PVCs for WorkloadMonitor", "monitor", monitor.Name)
return ctrl.Result{}, err
}
for _, pvc := range pvcList.Items {
if err := r.reconcilePVCForMonitor(ctx, monitor, pvc); err != nil {
logger.Error(err, "Failed to reconcile Workload for PVC", "PVC", pvc.Name)
continue
}
}
svcList := &corev1.ServiceList{}
if err := r.List(
ctx,
svcList,
client.InNamespace(monitor.Namespace),
client.MatchingLabels(monitor.Spec.Selector),
); err != nil {
logger.Error(err, "Unable to list Services for WorkloadMonitor", "monitor", monitor.Name)
return ctrl.Result{}, err
}
for _, svc := range svcList.Items {
if svc.Spec.Type != corev1.ServiceTypeLoadBalancer {
continue
}
if err := r.reconcileServiceForMonitor(ctx, monitor, svc); err != nil {
logger.Error(err, "Failed to reconcile Workload for Service", "Service", svc.Name)
continue
}
}
// Update WorkloadMonitor status based on observed pods // Update WorkloadMonitor status based on observed pods
monitor.Status.ObservedReplicas = observedReplicas monitor.Status.ObservedReplicas = observedReplicas
monitor.Status.AvailableReplicas = availableReplicas monitor.Status.AvailableReplicas = availableReplicas
@@ -388,51 +233,41 @@ func (r *WorkloadMonitorReconciler) SetupWithManager(mgr ctrl.Manager) error {
// Also watch Pod objects and map them back to WorkloadMonitor if labels match // Also watch Pod objects and map them back to WorkloadMonitor if labels match
Watches( Watches(
&corev1.Pod{}, &corev1.Pod{},
handler.EnqueueRequestsFromMapFunc(mapObjectToMonitor(&corev1.Pod{}, r.Client)), handler.EnqueueRequestsFromMapFunc(func(ctx context.Context, obj client.Object) []reconcile.Request {
). pod, ok := obj.(*corev1.Pod)
// Watch PVCs as well if !ok {
Watches( return nil
&corev1.PersistentVolumeClaim{}, }
handler.EnqueueRequestsFromMapFunc(mapObjectToMonitor(&corev1.PersistentVolumeClaim{}, r.Client)),
var monitorList cozyv1alpha1.WorkloadMonitorList
// List all WorkloadMonitors in the same namespace
if err := r.List(ctx, &monitorList, client.InNamespace(pod.Namespace)); err != nil {
return nil
}
// Match each monitor's selector with the Pod's labels
var requests []reconcile.Request
for _, m := range monitorList.Items {
matches := true
for k, v := range m.Spec.Selector {
if podVal, exists := pod.Labels[k]; !exists || podVal != v {
matches = false
break
}
}
if matches {
requests = append(requests, reconcile.Request{
NamespacedName: types.NamespacedName{
Namespace: m.Namespace,
Name: m.Name,
},
})
}
}
return requests
}),
). ).
// Watch for changes to Workload objects we create (owned by WorkloadMonitor) // Watch for changes to Workload objects we create (owned by WorkloadMonitor)
Owns(&cozyv1alpha1.Workload{}). Owns(&cozyv1alpha1.Workload{}).
Complete(r) Complete(r)
} }
func mapObjectToMonitor[T client.Object](_ T, c client.Client) func(ctx context.Context, obj client.Object) []reconcile.Request {
return func(ctx context.Context, obj client.Object) []reconcile.Request {
concrete, ok := obj.(T)
if !ok {
return nil
}
var monitorList cozyv1alpha1.WorkloadMonitorList
// List all WorkloadMonitors in the same namespace
if err := c.List(ctx, &monitorList, client.InNamespace(concrete.GetNamespace())); err != nil {
return nil
}
labels := concrete.GetLabels()
// Match each monitor's selector with the Pod's labels
var requests []reconcile.Request
for _, m := range monitorList.Items {
matches := true
for k, v := range m.Spec.Selector {
if labelVal, exists := labels[k]; !exists || labelVal != v {
matches = false
break
}
}
if matches {
requests = append(requests, reconcile.Request{
NamespacedName: types.NamespacedName{
Namespace: m.Namespace,
Name: m.Name,
},
})
}
}
return requests
}
}

View File

@@ -1 +1 @@
ghcr.io/cozystack/cozystack/nginx-cache:0.4.0@sha256:bef7344da098c4dc400a9e20ffad10ac991df67d09a30026207454abbc91f28b ghcr.io/cozystack/cozystack/nginx-cache:0.4.0@sha256:0f4d8e6863ed074e90f8a7a8390ccd98dae0220119346aba19e85054bb902e2f

View File

@@ -16,7 +16,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes # 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. # to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/) # Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.19.0 version: 0.17.1
# This is the version number of the application being deployed. This version number should be # 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 # incremented each time you make changes to the application. Versions are not expected to

View File

@@ -1,4 +1,4 @@
KUBERNETES_VERSION = v1.32 UBUNTU_CONTAINER_DISK_TAG = v1.30.1
KUBERNETES_PKG_TAG = $(shell awk '$$1 == "version:" {print $$2}' Chart.yaml) KUBERNETES_PKG_TAG = $(shell awk '$$1 == "version:" {print $$2}' Chart.yaml)
include ../../../scripts/common-envs.mk include ../../../scripts/common-envs.mk
@@ -6,26 +6,21 @@ include ../../../scripts/package.mk
generate: generate:
readme-generator -v values.yaml -s values.schema.json -r README.md readme-generator -v values.yaml -s values.schema.json -r README.md
yq -o json -i '.properties.controlPlane.properties.apiServer.properties.resourcesPreset.enum = ["none","nano","micro","small","medium","large","xlarge","2xlarge"]' values.schema.json
yq -o json -i '.properties.controlPlane.properties.controllerManager.properties.resourcesPreset.enum = ["none","nano","micro","small","medium","large","xlarge","2xlarge"]' values.schema.json
yq -o json -i '.properties.controlPlane.properties.scheduler.properties.resourcesPreset.enum = ["none","nano","micro","small","medium","large","xlarge","2xlarge"]' values.schema.json
yq -o json -i '.properties.controlPlane.properties.konnectivity.properties.server.properties.resourcesPreset.enum = ["none","nano","micro","small","medium","large","xlarge","2xlarge"]' values.schema.json
image: image-ubuntu-container-disk image-kubevirt-cloud-provider image-kubevirt-csi-driver image-cluster-autoscaler image: image-ubuntu-container-disk image-kubevirt-cloud-provider image-kubevirt-csi-driver image-cluster-autoscaler
image-ubuntu-container-disk: image-ubuntu-container-disk:
docker buildx build --platform linux/amd64 --build-arg ARCH=amd64 images/ubuntu-container-disk \ docker buildx build --platform linux/amd64 --build-arg ARCH=amd64 images/ubuntu-container-disk \
--provenance false \ --provenance false \
--build-arg KUBERNETES_VERSION=${KUBERNETES_VERSION} \ --tag $(REGISTRY)/ubuntu-container-disk:$(call settag,$(UBUNTU_CONTAINER_DISK_TAG)) \
--tag $(REGISTRY)/ubuntu-container-disk:$(call settag,$(KUBERNETES_VERSION)) \ --tag $(REGISTRY)/ubuntu-container-disk:$(call settag,$(UBUNTU_CONTAINER_DISK_TAG)-$(TAG)) \
--tag $(REGISTRY)/ubuntu-container-disk:$(call settag,$(KUBERNETES_VERSION)-$(TAG)) \
--cache-from type=registry,ref=$(REGISTRY)/ubuntu-container-disk:latest \ --cache-from type=registry,ref=$(REGISTRY)/ubuntu-container-disk:latest \
--cache-to type=inline \ --cache-to type=inline \
--metadata-file images/ubuntu-container-disk.json \ --metadata-file images/ubuntu-container-disk.json \
--push=$(PUSH) \ --push=$(PUSH) \
--label "org.opencontainers.image.source=https://github.com/cozystack/cozystack" \ --label "org.opencontainers.image.source=https://github.com/cozystack/cozystack" \
--load=$(LOAD) --load=$(LOAD)
echo "$(REGISTRY)/ubuntu-container-disk:$(call settag,$(KUBERNETES_VERSION))@$$(yq e '."containerimage.digest"' images/ubuntu-container-disk.json -o json -r)" \ echo "$(REGISTRY)/ubuntu-container-disk:$(call settag,$(UBUNTU_CONTAINER_DISK_TAG))@$$(yq e '."containerimage.digest"' images/ubuntu-container-disk.json -o json -r)" \
> images/ubuntu-container-disk.tag > images/ubuntu-container-disk.tag
rm -f images/ubuntu-container-disk.json rm -f images/ubuntu-container-disk.json

View File

@@ -27,46 +27,20 @@ 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 kubectl get secret -n <namespace> kubernetes-<clusterName>-admin-kubeconfig -o go-template='{{ printf "%s\n" (index .data "super-admin.conf" | base64decode) }}' > test
``` ```
## Parameters # Series
### Common parameters <!-- source: https://github.com/kubevirt/common-instancetypes/blob/main/README.md -->
| Name | Description | Value | . | U | O | CX | M | RT
| ----------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | ------------ | ----------------------------|-----|-----|------|-----|------
| `host` | The hostname used to access the Kubernetes cluster externally (defaults to using the cluster name as a subdomain for the tenant host). | `""` | *Has GPUs* | | | | |
| `controlPlane.replicas` | Number of replicas for Kubernetes control-plane components | `2` | *Hugepages* | | | | ✓ | ✓
| `storageClass` | StorageClass used to store user data | `replicated` | *Overcommitted Memory* | | | | |
| `nodeGroups` | nodeGroups configuration | `{}` | *Dedicated CPU* | | | | | ✓
*Burstable CPU performance* | ✓ | ✓ | | ✓ |
### Cluster Addons *Isolated emulator threads* | | | ✓ | | ✓
*vNUMA* | | | ✓ | | ✓
| Name | Description | Value | *vCPU-To-Memory Ratio* | 1:4 | 1:4 | 1:2 | 1:8 | 1:4
| --------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- |
| `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.gpuOperator.enabled` | Enables the gpu-operator | `false` |
| `addons.gpuOperator.valuesOverride` | Custom values to override | `{}` |
| `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 | `{}` |
### Kubernetes control plane configuration
| Name | Description | Value |
| -------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- |
| `controlPlane.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` |
| `controlPlane.apiServer.resources` | Resources | `{}` |
| `controlPlane.controllerManager.resources` | Resources | `{}` |
| `controlPlane.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` |
| `controlPlane.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` |
| `controlPlane.scheduler.resources` | Resources | `{}` |
| `controlPlane.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` |
| `controlPlane.konnectivity.server.resources` | Resources | `{}` |
## U Series ## U Series

View File

@@ -1 +1 @@
ghcr.io/cozystack/cozystack/cluster-autoscaler:0.18.0@sha256:85371c6aabf5a7fea2214556deac930c600e362f92673464fe2443784e2869c3 ghcr.io/cozystack/cozystack/cluster-autoscaler:0.17.0@sha256:85371c6aabf5a7fea2214556deac930c600e362f92673464fe2443784e2869c3

View File

@@ -1 +1 @@
ghcr.io/cozystack/cozystack/kubevirt-cloud-provider:0.18.0@sha256:795d8e1ef4b2b0df2aa1e09d96cd13476ebb545b4bf4b5779b7547a70ef64cf9 ghcr.io/cozystack/cozystack/kubevirt-cloud-provider:0.17.0@sha256:53f4734109799da8b27f35a3b1afdb4746b5992f1d7b9d1c132ea6242cdd8cf0

View File

@@ -1 +1 @@
ghcr.io/cozystack/cozystack/kubevirt-csi-driver:0.18.0@sha256:6f9091c3e7e4951c5e43fdafd505705fcc9f1ead290ee3ae42e97e9ec2b87b20 ghcr.io/cozystack/cozystack/kubevirt-csi-driver:0.17.0@sha256:1a6605d3bff6342e12bcc257e852a4f89e97e8af6d3d259930ec07c7ad5f001d

View File

@@ -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:d842de4637ea6188999464f133c89f63a3bd13f1cb202c10f1f8c0c1c3c3dbd4

View File

@@ -1,4 +1,3 @@
# TODO: Here we use ubuntu:22.04, as guestfish has some network issues running in ubuntu:24.04
FROM ubuntu:22.04 as guestfish FROM ubuntu:22.04 as guestfish
ARG DEBIAN_FRONTEND=noninteractive ARG DEBIAN_FRONTEND=noninteractive
@@ -6,7 +5,6 @@ RUN apt-get update \
&& apt-get -y install \ && apt-get -y install \
libguestfs-tools \ libguestfs-tools \
linux-image-generic \ linux-image-generic \
wget \
make \ make \
bash-completion \ bash-completion \
&& apt-get clean && apt-get clean
@@ -15,10 +13,7 @@ WORKDIR /build
FROM guestfish as builder FROM guestfish as builder
# noble is a code name for the Ubuntu 24.04 LTS release RUN wget -O image.img https://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-amd64.img
RUN wget -O image.img https://cloud-images.ubuntu.com/noble/current/noble-server-cloudimg-amd64.img --show-progress --output-file /dev/stdout --progress=dot:giga 2>/dev/null
ARG KUBERNETES_VERSION
RUN qemu-img resize image.img 5G \ RUN qemu-img resize image.img 5G \
&& eval "$(guestfish --listen --network)" \ && eval "$(guestfish --listen --network)" \
@@ -31,8 +26,8 @@ RUN qemu-img resize image.img 5G \
&& guestfish --remote sh "curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg" \ && guestfish --remote sh "curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg" \
&& guestfish --remote sh 'echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list' \ && guestfish --remote sh 'echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list' \
# kubernetes repo # kubernetes repo
&& guestfish --remote sh "curl -fsSL https://pkgs.k8s.io/core:/stable:/${KUBERNETES_VERSION}/deb/Release.key | gpg --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg" \ && guestfish --remote sh "curl -fsSL https://pkgs.k8s.io/core:/stable:/v1.30/deb/Release.key | gpg --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg" \
&& guestfish --remote sh "echo 'deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/${KUBERNETES_VERSION}/deb/ /' | tee /etc/apt/sources.list.d/kubernetes.list" \ && guestfish --remote sh "echo 'deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/v1.30/deb/ /' | tee /etc/apt/sources.list.d/kubernetes.list" \
# install containerd # install containerd
&& guestfish --remote command "apt-get update -y" \ && guestfish --remote command "apt-get update -y" \
&& guestfish --remote command "apt-get install -y containerd.io" \ && guestfish --remote command "apt-get install -y containerd.io" \

View File

@@ -39,13 +39,6 @@ spec:
sockets: 1 sockets: 1
{{- end }} {{- end }}
devices: devices:
{{- if .group.gpus }}
gpus:
{{- range $i, $gpu := .group.gpus }}
- name: gpu{{ add $i 1 }}
deviceName: {{ $gpu.name }}
{{- end }}
{{- end }}
disks: disks:
- name: system - name: system
disk: disk:
@@ -110,22 +103,22 @@ metadata:
kamaji.clastix.io/kubeconfig-secret-key: "super-admin.svc" kamaji.clastix.io/kubeconfig-secret-key: "super-admin.svc"
spec: spec:
apiServer: apiServer:
{{- if .Values.controlPlane.apiServer.resources }} {{- if .Values.kamajiControlPlane.apiServer.resources }}
resources: {{- toYaml .Values.controlPlane.apiServer.resources | nindent 6 }} resources: {{- toYaml .Values.kamajiControlPlane.apiServer.resources | nindent 6 }}
{{- else if ne .Values.controlPlane.apiServer.resourcesPreset "none" }} {{- else if ne .Values.kamajiControlPlane.apiServer.resourcesPreset "none" }}
resources: {{- include "resources.preset" (dict "type" .Values.controlPlane.apiServer.resourcesPreset "Release" .Release) | nindent 6 }} resources: {{- include "resources.preset" (dict "type" .Values.kamajiControlPlane.apiServer.resourcesPreset "Release" .Release) | nindent 6 }}
{{- end }} {{- end }}
controllerManager: controllerManager:
{{- if .Values.controlPlane.controllerManager.resources }} {{- if .Values.kamajiControlPlane.controllerManager.resources }}
resources: {{- toYaml .Values.controlPlane.controllerManager.resources | nindent 6 }} resources: {{- toYaml .Values.kamajiControlPlane.controllerManager.resources | nindent 6 }}
{{- else if ne .Values.controlPlane.controllerManager.resourcesPreset "none" }} {{- else if ne .Values.kamajiControlPlane.controllerManager.resourcesPreset "none" }}
resources: {{- include "resources.preset" (dict "type" .Values.controlPlane.controllerManager.resourcesPreset "Release" .Release) | nindent 6 }} resources: {{- include "resources.preset" (dict "type" .Values.kamajiControlPlane.controllerManager.resourcesPreset "Release" .Release) | nindent 6 }}
{{- end }} {{- end }}
scheduler: scheduler:
{{- if .Values.controlPlane.scheduler.resources }} {{- if .Values.kamajiControlPlane.scheduler.resources }}
resources: {{- toYaml .Values.controlPlane.scheduler.resources | nindent 6 }} resources: {{- toYaml .Values.kamajiControlPlane.scheduler.resources | nindent 6 }}
{{- else if ne .Values.controlPlane.scheduler.resourcesPreset "none" }} {{- else if ne .Values.kamajiControlPlane.scheduler.resourcesPreset "none" }}
resources: {{- include "resources.preset" (dict "type" .Values.controlPlane.scheduler.resourcesPreset "Release" .Release) | nindent 6 }} resources: {{- include "resources.preset" (dict "type" .Values.kamajiControlPlane.scheduler.resourcesPreset "Release" .Release) | nindent 6 }}
{{- end }} {{- end }}
dataStoreName: "{{ $etcd }}" dataStoreName: "{{ $etcd }}"
addons: addons:
@@ -135,10 +128,10 @@ spec:
konnectivity: konnectivity:
server: server:
port: 8132 port: 8132
{{- if .Values.controlPlane.konnectivity.server.resources }} {{- if .Values.kamajiControlPlane.addons.konnectivity.server.resources }}
resources: {{- toYaml .Values.controlPlane.konnectivity.server.resources | nindent 10 }} resources: {{- toYaml .Values.kamajiControlPlane.addons.konnectivity.server.resources | nindent 10 }}
{{- else if ne .Values.controlPlane.konnectivity.server.resourcesPreset "none" }} {{- else if ne .Values.kamajiControlPlane.addons.konnectivity.server.resourcesPreset "none" }}
resources: {{- include "resources.preset" (dict "type" .Values.controlPlane.konnectivity.server.resourcesPreset "Release" .Release) | nindent 10 }} resources: {{- include "resources.preset" (dict "type" .Values.kamajiControlPlane.addons.konnectivity.server.resourcesPreset "Release" .Release) | nindent 10 }}
{{- end }} {{- end }}
kubelet: kubelet:
cgroupfs: systemd cgroupfs: systemd
@@ -283,7 +276,7 @@ spec:
kind: KubevirtMachineTemplate kind: KubevirtMachineTemplate
name: {{ $.Release.Name }}-{{ $groupName }}-{{ $kubevirtmachinetemplateHash }} name: {{ $.Release.Name }}-{{ $groupName }}-{{ $kubevirtmachinetemplateHash }}
namespace: {{ $.Release.Namespace }} namespace: {{ $.Release.Namespace }}
version: v1.32.3 version: v1.30.1
--- ---
apiVersion: cluster.x-k8s.io/v1beta1 apiVersion: cluster.x-k8s.io/v1beta1
kind: MachineHealthCheck kind: MachineHealthCheck

View File

@@ -4,7 +4,7 @@ metadata:
name: {{ .Release.Name }}-cert-manager-crds name: {{ .Release.Name }}-cert-manager-crds
labels: labels:
cozystack.io/repository: system cozystack.io/repository: system
cozystack.io/target-cluster-name: {{ .Release.Name }} coztstack.io/target-cluster-name: {{ .Release.Name }}
spec: spec:
interval: 5m interval: 5m
releaseName: cert-manager-crds releaseName: cert-manager-crds

View File

@@ -5,7 +5,7 @@ metadata:
name: {{ .Release.Name }}-cert-manager name: {{ .Release.Name }}-cert-manager
labels: labels:
cozystack.io/repository: system cozystack.io/repository: system
cozystack.io/target-cluster-name: {{ .Release.Name }} coztstack.io/target-cluster-name: {{ .Release.Name }}
spec: spec:
interval: 5m interval: 5m
releaseName: cert-manager releaseName: cert-manager
@@ -30,9 +30,11 @@ spec:
upgrade: upgrade:
remediation: remediation:
retries: -1 retries: -1
{{- with .Values.addons.certManager.valuesOverride }} {{- if .Values.addons.certManager.valuesOverride }}
values: valuesFrom:
{{- toYaml . | nindent 4 }} - kind: Secret
name: {{ .Release.Name }}-cert-manager-values-override
valuesKey: values
{{- end }} {{- end }}
dependsOn: dependsOn:
@@ -45,3 +47,13 @@ spec:
- name: {{ .Release.Name }}-cert-manager-crds - name: {{ .Release.Name }}-cert-manager-crds
namespace: {{ .Release.Namespace }} namespace: {{ .Release.Namespace }}
{{- end }} {{- end }}
{{- if .Values.addons.certManager.valuesOverride }}
---
apiVersion: v1
kind: Secret
metadata:
name: {{ .Release.Name }}-cert-manager-values-override
stringData:
values: |
{{- toYaml .Values.addons.certManager.valuesOverride | nindent 4 }}
{{- end }}

View File

@@ -4,7 +4,7 @@ metadata:
name: {{ .Release.Name }}-cilium name: {{ .Release.Name }}-cilium
labels: labels:
cozystack.io/repository: system cozystack.io/repository: system
cozystack.io/target-cluster-name: {{ .Release.Name }} coztstack.io/target-cluster-name: {{ .Release.Name }}
spec: spec:
interval: 5m interval: 5m
releaseName: cilium releaseName: cilium

View File

@@ -4,7 +4,7 @@ metadata:
name: {{ .Release.Name }}-csi name: {{ .Release.Name }}-csi
labels: labels:
cozystack.io/repository: system cozystack.io/repository: system
cozystack.io/target-cluster-name: {{ .Release.Name }} coztstack.io/target-cluster-name: {{ .Release.Name }}
spec: spec:
interval: 5m interval: 5m
releaseName: csi releaseName: csi

View File

@@ -20,7 +20,7 @@ spec:
effect: "NoSchedule" effect: "NoSchedule"
containers: containers:
- name: kubectl - name: kubectl
image: docker.io/clastix/kubectl:v1.32 image: docker.io/clastix/kubectl:v1.30.1
command: command:
- /bin/sh - /bin/sh
- -c - -c
@@ -32,13 +32,9 @@ spec:
{{ .Release.Name }}-cilium {{ .Release.Name }}-cilium
{{ .Release.Name }}-csi {{ .Release.Name }}-csi
{{ .Release.Name }}-cert-manager {{ .Release.Name }}-cert-manager
{{ .Release.Name }}-cert-manager-crds
{{ .Release.Name }}-vertical-pod-autoscaler
{{ .Release.Name }}-vertical-pod-autoscaler-crds
{{ .Release.Name }}-ingress-nginx {{ .Release.Name }}-ingress-nginx
{{ .Release.Name }}-fluxcd-operator {{ .Release.Name }}-fluxcd-operator
{{ .Release.Name }}-fluxcd {{ .Release.Name }}-fluxcd
{{ .Release.Name }}-gpu-operator
-p '{"spec": {"suspend": true}}' -p '{"spec": {"suspend": true}}'
--type=merge --field-manager=flux-client-side-apply || true --type=merge --field-manager=flux-client-side-apply || true
--- ---
@@ -71,13 +67,9 @@ rules:
- {{ .Release.Name }}-cilium - {{ .Release.Name }}-cilium
- {{ .Release.Name }}-csi - {{ .Release.Name }}-csi
- {{ .Release.Name }}-cert-manager - {{ .Release.Name }}-cert-manager
- {{ .Release.Name }}-cert-manager-crds
- {{ .Release.Name }}-vertical-pod-autoscaler
- {{ .Release.Name }}-vertical-pod-autoscaler-crds
- {{ .Release.Name }}-ingress-nginx - {{ .Release.Name }}-ingress-nginx
- {{ .Release.Name }}-fluxcd-operator - {{ .Release.Name }}-fluxcd-operator
- {{ .Release.Name }}-fluxcd - {{ .Release.Name }}-fluxcd
- {{ .Release.Name }}-gpu-operator
--- ---
apiVersion: rbac.authorization.k8s.io/v1 apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding kind: RoleBinding

View File

@@ -5,7 +5,7 @@ metadata:
name: {{ .Release.Name }}-fluxcd-operator name: {{ .Release.Name }}-fluxcd-operator
labels: labels:
cozystack.io/repository: system cozystack.io/repository: system
cozystack.io/target-cluster-name: {{ .Release.Name }} coztstack.io/target-cluster-name: {{ .Release.Name }}
spec: spec:
interval: 5m interval: 5m
releaseName: fluxcd-operator releaseName: fluxcd-operator
@@ -49,7 +49,7 @@ metadata:
name: {{ .Release.Name }}-fluxcd name: {{ .Release.Name }}-fluxcd
labels: labels:
cozystack.io/repository: system cozystack.io/repository: system
cozystack.io/target-cluster-name: {{ .Release.Name }} coztstack.io/target-cluster-name: {{ .Release.Name }}
spec: spec:
interval: 5m interval: 5m
releaseName: fluxcd releaseName: fluxcd
@@ -73,9 +73,11 @@ spec:
upgrade: upgrade:
remediation: remediation:
retries: -1 retries: -1
{{- with .Values.addons.fluxcd.valuesOverride }} {{- if .Values.addons.fluxcd.valuesOverride }}
values: valuesFrom:
{{- toYaml . | nindent 4 }} - kind: Secret
name: {{ .Release.Name }}-fluxcd-values-override
valuesKey: values
{{- end }} {{- end }}
dependsOn: dependsOn:
{{- if lookup "helm.toolkit.fluxcd.io/v2" "HelmRelease" .Release.Namespace .Release.Name }} {{- if lookup "helm.toolkit.fluxcd.io/v2" "HelmRelease" .Release.Namespace .Release.Name }}
@@ -87,3 +89,14 @@ spec:
- name: {{ .Release.Name }}-fluxcd-operator - name: {{ .Release.Name }}-fluxcd-operator
namespace: {{ .Release.Namespace }} namespace: {{ .Release.Namespace }}
{{- end }} {{- end }}
{{- if .Values.addons.fluxcd.valuesOverride }}
---
apiVersion: v1
kind: Secret
metadata:
name: {{ .Release.Name }}-fluxcd-values-override
stringData:
values: |
{{- toYaml .Values.addons.fluxcd.valuesOverride | nindent 4 }}
{{- end }}

View File

@@ -1,45 +0,0 @@
{{- if .Values.addons.gpuOperator.enabled }}
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
name: {{ .Release.Name }}-gpu-operator
labels:
cozystack.io/repository: system
cozystack.io/target-cluster-name: {{ .Release.Name }}
spec:
interval: 5m
releaseName: gpu-operator
chart:
spec:
chart: cozy-gpu-operator
reconcileStrategy: Revision
sourceRef:
kind: HelmRepository
name: cozystack-system
namespace: cozy-system
kubeConfig:
secretRef:
name: {{ .Release.Name }}-admin-kubeconfig
key: super-admin.svc
targetNamespace: cozy-gpu-operator
storageNamespace: cozy-gpu-operator
install:
createNamespace: true
remediation:
retries: -1
upgrade:
remediation:
retries: -1
{{- with .Values.addons.gpuOperator.valuesOverride }}
values:
{{- toYaml . | nindent 4 }}
{{- end }}
dependsOn:
{{- if lookup "helm.toolkit.fluxcd.io/v2" "HelmRelease" .Release.Namespace .Release.Name }}
- name: {{ .Release.Name }}
namespace: {{ .Release.Namespace }}
{{- end }}
- name: {{ .Release.Name }}-cilium
namespace: {{ .Release.Namespace }}
{{- end }}

View File

@@ -1,15 +1,3 @@
{{- define "cozystack.defaultIngressValues" -}}
ingress-nginx:
fullnameOverride: ingress-nginx
controller:
kind: DaemonSet
hostNetwork: true
service:
enabled: false
nodeSelector:
node-role.kubernetes.io/ingress-nginx: ""
{{- end }}
{{- if .Values.addons.ingressNginx.enabled }} {{- if .Values.addons.ingressNginx.enabled }}
apiVersion: helm.toolkit.fluxcd.io/v2 apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease kind: HelmRelease
@@ -17,7 +5,7 @@ metadata:
name: {{ .Release.Name }}-ingress-nginx name: {{ .Release.Name }}-ingress-nginx
labels: labels:
cozystack.io/repository: system cozystack.io/repository: system
cozystack.io/target-cluster-name: {{ .Release.Name }} coztstack.io/target-cluster-name: {{ .Release.Name }}
spec: spec:
interval: 5m interval: 5m
releaseName: ingress-nginx releaseName: ingress-nginx
@@ -43,7 +31,21 @@ spec:
remediation: remediation:
retries: -1 retries: -1
values: values:
{{- toYaml (deepCopy .Values.addons.ingressNginx.valuesOverride | mergeOverwrite (fromYaml (include "cozystack.defaultIngressValues" .))) | nindent 4 }} ingress-nginx:
fullnameOverride: ingress-nginx
controller:
kind: DaemonSet
hostNetwork: true
service:
enabled: false
nodeSelector:
node-role.kubernetes.io/ingress-nginx: ""
{{- if .Values.addons.ingressNginx.valuesOverride }}
valuesFrom:
- kind: Secret
name: {{ .Release.Name }}-ingress-nginx-values-override
valuesKey: values
{{- end }}
dependsOn: dependsOn:
{{- if lookup "helm.toolkit.fluxcd.io/v2" "HelmRelease" .Release.Namespace .Release.Name }} {{- if lookup "helm.toolkit.fluxcd.io/v2" "HelmRelease" .Release.Namespace .Release.Name }}
- name: {{ .Release.Name }} - name: {{ .Release.Name }}
@@ -52,3 +54,14 @@ spec:
- name: {{ .Release.Name }}-cilium - name: {{ .Release.Name }}-cilium
namespace: {{ .Release.Namespace }} namespace: {{ .Release.Namespace }}
{{- end }} {{- end }}
{{- if .Values.addons.ingressNginx.valuesOverride }}
---
apiVersion: v1
kind: Secret
metadata:
name: {{ .Release.Name }}-ingress-nginx-values-override
stringData:
values: |
{{- toYaml .Values.addons.ingressNginx.valuesOverride | nindent 4 }}
{{- end }}

View File

@@ -7,7 +7,7 @@ metadata:
name: {{ .Release.Name }}-monitoring-agents name: {{ .Release.Name }}-monitoring-agents
labels: labels:
cozystack.io/repository: system cozystack.io/repository: system
cozystack.io/target-cluster-name: {{ .Release.Name }} coztstack.io/target-cluster-name: {{ .Release.Name }}
spec: spec:
interval: 5m interval: 5m
releaseName: cozy-monitoring-agents releaseName: cozy-monitoring-agents
@@ -38,9 +38,9 @@ spec:
- name: {{ .Release.Name }} - name: {{ .Release.Name }}
namespace: {{ .Release.Namespace }} namespace: {{ .Release.Namespace }}
{{- end }} {{- end }}
- name: {{ .Release.Name }}-cozy-victoria-metrics-operator - name: {{ .Release.Name }}-cilium
namespace: {{ .Release.Namespace }} namespace: {{ .Release.Namespace }}
- name: {{ .Release.Name }}-vertical-pod-autoscaler-crds - name: {{ .Release.Name }}-cozy-victoria-metrics-operator
namespace: {{ .Release.Namespace }} namespace: {{ .Release.Namespace }}
values: values:
vmagent: vmagent:

View File

@@ -1,41 +0,0 @@
{{- if .Values.addons.monitoringAgents.enabled }}
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
name: {{ .Release.Name }}-vertical-pod-autoscaler-crds
labels:
cozystack.io/repository: system
cozystack.io/target-cluster-name: {{ .Release.Name }}
spec:
interval: 5m
releaseName: vertical-pod-autoscaler-crds
chart:
spec:
chart: cozy-vertical-pod-autoscaler-crds
reconcileStrategy: Revision
sourceRef:
kind: HelmRepository
name: cozystack-system
namespace: cozy-system
kubeConfig:
secretRef:
name: {{ .Release.Name }}-admin-kubeconfig
key: super-admin.svc
targetNamespace: cozy-vertical-pod-autoscaler-crds
storageNamespace: cozy-vertical-pod-autoscaler-crds
install:
createNamespace: true
remediation:
retries: -1
upgrade:
remediation:
retries: -1
dependsOn:
{{- if lookup "helm.toolkit.fluxcd.io/v2" "HelmRelease" .Release.Namespace .Release.Name }}
- name: {{ .Release.Name }}
namespace: {{ .Release.Namespace }}
{{- end }}
- name: {{ .Release.Name }}-cilium
namespace: {{ .Release.Namespace }}
{{- end }}

View File

@@ -1,67 +0,0 @@
{{- define "cozystack.defaultVPAValues" -}}
{{- $myNS := lookup "v1" "Namespace" "" .Release.Namespace }}
{{- $targetTenant := index $myNS.metadata.annotations "namespace.cozystack.io/monitoring" }}
vertical-pod-autoscaler:
recommender:
extraArgs:
container-name-label: container
container-namespace-label: namespace
container-pod-name-label: pod
storage: prometheus
memory-saver: true
pod-label-prefix: label_
metric-for-pod-labels: kube_pod_labels{job="kube-state-metrics", tenant="{{ .Release.Namespace }}", cluster="{{ .Release.Name }}"}[8d]
pod-name-label: pod
pod-namespace-label: namespace
prometheus-address: http://vmselect-shortterm.{{ $targetTenant }}.svc.cozy.local:8481/select/0/prometheus/
prometheus-cadvisor-job-name: cadvisor
resources:
limits:
memory: 1600Mi
requests:
cpu: 100m
memory: 1600Mi
{{- end }}
{{- if .Values.addons.monitoringAgents.enabled }}
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
name: {{ .Release.Name }}-vertical-pod-autoscaler
labels:
cozystack.io/repository: system
cozystack.io/target-cluster-name: {{ .Release.Name }}
spec:
interval: 5m
releaseName: vertical-pod-autoscaler
chart:
spec:
chart: cozy-vertical-pod-autoscaler
reconcileStrategy: Revision
sourceRef:
kind: HelmRepository
name: cozystack-system
namespace: cozy-system
kubeConfig:
secretRef:
name: {{ .Release.Name }}-admin-kubeconfig
key: super-admin.svc
targetNamespace: cozy-vertical-pod-autoscaler
storageNamespace: cozy-vertical-pod-autoscaler
install:
createNamespace: true
remediation:
retries: -1
upgrade:
remediation:
retries: -1
values:
{{- toYaml (deepCopy .Values.addons.verticalPodAutoscaler.valuesOverride | mergeOverwrite (fromYaml (include "cozystack.defaultVPAValues" .))) | nindent 4 }}
dependsOn:
{{- if lookup "helm.toolkit.fluxcd.io/v2" "HelmRelease" .Release.Namespace .Release.Name }}
- name: {{ .Release.Name }}
namespace: {{ .Release.Namespace }}
{{- end }}
- name: {{ .Release.Name }}-monitoring-agents
namespace: {{ .Release.Namespace }}
{{- end }}

View File

@@ -5,7 +5,7 @@ metadata:
name: {{ .Release.Name }}-cozy-victoria-metrics-operator name: {{ .Release.Name }}-cozy-victoria-metrics-operator
labels: labels:
cozystack.io/repository: system cozystack.io/repository: system
cozystack.io/target-cluster-name: {{ .Release.Name }} coztstack.io/target-cluster-name: {{ .Release.Name }}
spec: spec:
interval: 5m interval: 5m
releaseName: cozy-victoria-metrics-operator releaseName: cozy-victoria-metrics-operator

View File

@@ -1,227 +1,97 @@
{ {
"title": "Chart Values", "title": "Chart Values",
"type": "object", "type": "object",
"properties": { "properties": {
"host": { "host": {
"type": "string", "type": "string",
"description": "The hostname used to access the Kubernetes cluster externally (defaults to using the cluster name as a subdomain for the tenant host).", "description": "The hostname used to access the Kubernetes cluster externally (defaults to using the cluster name as a subdomain for the tenant host).",
"default": "" "default": ""
},
"controlPlane": {
"type": "object",
"properties": {
"replicas": {
"type": "number",
"description": "Number of replicas for Kubernetes control-plane components",
"default": 2
}, },
"apiServer": { "controlPlane": {
"type": "object", "type": "object",
"properties": { "properties": {
"resourcesPreset": { "replicas": {
"type": "string", "type": "number",
"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).", "description": "Number of replicas for Kubernetes contorl-plane components",
"default": "small", "default": 2
"enum": [ }
"none", }
"nano", },
"micro", "storageClass": {
"small", "type": "string",
"medium", "description": "StorageClass used to store user data",
"large", "default": "replicated"
"xlarge", },
"2xlarge" "addons": {
] "type": "object",
}, "properties": {
"resources": { "certManager": {
"type": "object", "type": "object",
"description": "Resources", "properties": {
"default": {} "enabled": {
} "type": "boolean",
} "description": "Enables the cert-manager",
}, "default": false
"controllerManager": { },
"type": "object", "valuesOverride": {
"properties": { "type": "object",
"resources": { "description": "Custom values to override",
"type": "object", "default": {}
"description": "Resources", }
"default": {} }
}, },
"resourcesPreset": { "ingressNginx": {
"type": "string", "type": "object",
"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).", "properties": {
"default": "micro", "enabled": {
"enum": [ "type": "boolean",
"none", "description": "Enable Ingress-NGINX controller (expect nodes with 'ingress-nginx' role)",
"nano", "default": false
"micro", },
"small", "valuesOverride": {
"medium", "type": "object",
"large", "description": "Custom values to override",
"xlarge", "default": {}
"2xlarge" },
] "hosts": {
} "type": "array",
} "description": "List of domain names that should be passed through to the cluster by upper cluster",
}, "default": [],
"scheduler": { "items": {}
"type": "object", }
"properties": { }
"resourcesPreset": { },
"type": "string", "fluxcd": {
"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).", "type": "object",
"default": "micro", "properties": {
"enum": [ "enabled": {
"none", "type": "boolean",
"nano", "description": "Enables Flux CD",
"micro", "default": false
"small", },
"medium", "valuesOverride": {
"large", "type": "object",
"xlarge", "description": "Custom values to override",
"2xlarge" "default": {}
] }
}, }
"resources": { },
"type": "object", "monitoringAgents": {
"description": "Resources", "type": "object",
"default": {} "properties": {
} "enabled": {
} "type": "boolean",
}, "description": "Enables MonitoringAgents (fluentbit, vmagents for sending logs and metrics to storage) if tenant monitoring enabled, send to tenant storage, else to root storage",
"konnectivity": { "default": false
"type": "object", },
"properties": { "valuesOverride": {
"server": { "type": "object",
"type": "object", "description": "Custom values to override",
"properties": { "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",
"enum": [
"none",
"nano",
"micro",
"small",
"medium",
"large",
"xlarge",
"2xlarge"
]
},
"resources": {
"type": "object",
"description": "Resources",
"default": {}
} }
}
} }
}
} }
}
},
"storageClass": {
"type": "string",
"description": "StorageClass used to store user data",
"default": "replicated"
},
"addons": {
"type": "object",
"properties": {
"certManager": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean",
"description": "Enables the cert-manager",
"default": false
},
"valuesOverride": {
"type": "object",
"description": "Custom values to override",
"default": {}
}
}
},
"ingressNginx": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean",
"description": "Enable Ingress-NGINX controller (expect nodes with 'ingress-nginx' role)",
"default": false
},
"valuesOverride": {
"type": "object",
"description": "Custom values to override",
"default": {}
},
"hosts": {
"type": "array",
"description": "List of domain names that should be passed through to the cluster by upper cluster",
"default": [],
"items": {}
}
}
},
"gpuOperator": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean",
"description": "Enables the gpu-operator",
"default": false
},
"valuesOverride": {
"type": "object",
"description": "Custom values to override",
"default": {}
}
}
},
"fluxcd": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean",
"description": "Enables Flux CD",
"default": false
},
"valuesOverride": {
"type": "object",
"description": "Custom values to override",
"default": {}
}
}
},
"monitoringAgents": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean",
"description": "Enables MonitoringAgents (fluentbit, vmagents for sending logs and metrics to storage) if tenant monitoring enabled, send to tenant storage, else to root storage",
"default": false
},
"valuesOverride": {
"type": "object",
"description": "Custom values to override",
"default": {}
}
}
},
"verticalPodAutoscaler": {
"type": "object",
"properties": {
"valuesOverride": {
"type": "object",
"description": "Custom values to override",
"default": {}
}
}
}
}
} }
}
} }

View File

@@ -1,10 +1,12 @@
## @section Common parameters ## @section Common parameters
## @param host The hostname used to access the Kubernetes cluster externally (defaults to using the cluster name as a subdomain for the tenant host). ## @param host The hostname used to access the Kubernetes cluster externally (defaults to using the cluster name as a subdomain for the tenant host).
## @param controlPlane.replicas Number of replicas for Kubernetes control-plane components ## @param controlPlane.replicas Number of replicas for Kubernetes contorl-plane components
## @param storageClass StorageClass used to store user data ## @param storageClass StorageClass used to store user data
## ##
host: "" host: ""
controlPlane:
replicas: 2
storageClass: replicated storageClass: replicated
## @param nodeGroups [object] nodeGroups configuration ## @param nodeGroups [object] nodeGroups configuration
@@ -22,14 +24,6 @@ nodeGroups:
cpu: "" cpu: ""
memory: "" memory: ""
## List of GPUs to attach (WARN: NVIDIA driver requires at least 4 GiB of RAM)
## e.g:
## instanceType: "u1.xlarge"
## gpus:
## - name: nvidia.com/AD102GL_L40S
gpus: []
## @section Cluster Addons ## @section Cluster Addons
## ##
addons: addons:
@@ -58,14 +52,6 @@ addons:
hosts: [] hosts: []
valuesOverride: {} valuesOverride: {}
## GPU-operator: NVIDIA GPU Operator
##
gpuOperator:
## @param addons.gpuOperator.enabled Enables the gpu-operator
## @param addons.gpuOperator.valuesOverride Custom values to override
enabled: false
valuesOverride: {}
## Flux CD ## Flux CD
## ##
fluxcd: fluxcd:
@@ -84,49 +70,62 @@ addons:
enabled: false enabled: false
valuesOverride: {} valuesOverride: {}
## VerticalPodAutoscaler ## @section Kamaji control plane
##
verticalPodAutoscaler:
## @param addons.verticalPodAutoscaler.valuesOverride Custom values to override
##
valuesOverride: {}
## @section Kubernetes control plane configuration
## ##
kamajiControlPlane:
controlPlane:
replicas: 2
apiServer: apiServer:
## @param controlPlane.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). ## @param kamajiControlPlane.apiServer.resources Resources
## @param controlPlane.apiServer.resources Resources
## e.g:
## resources:
## limits:
## cpu: 4000m
## memory: 4Gi
## requests:
## cpu: 100m
## memory: 512Mi
##
resourcesPreset: "small"
resources: {} resources: {}
# resources:
# limits:
# cpu: 4000m
# memory: 4Gi
# requests:
# cpu: 100m
# memory: 512Mi
## @param 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).
resourcesPreset: "small"
controllerManager: controllerManager:
## @param controlPlane.controllerManager.resources Resources ## @param kamajiControlPlane.controllerManager.resources Resources
## @param controlPlane.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).
resourcesPreset: "micro"
resources: {} resources: {}
# resources:
# limits:
# cpu: 4000m
# memory: 4Gi
# requests:
# cpu: 100m
# memory: 512Mi
## @param 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).
resourcesPreset: "micro"
scheduler: scheduler:
## @param controlPlane.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). ## @param kamajiControlPlane.scheduler.resources Resources
## @param controlPlane.scheduler.resources Resources
resourcesPreset: "micro"
resources: {} resources: {}
# resources:
# limits:
# cpu: 4000m
# memory: 4Gi
# requests:
# cpu: 100m
# memory: 512Mi
## @param 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).
resourcesPreset: "micro"
addons:
konnectivity:
server:
## @param kamajiControlPlane.addons.konnectivity.server.resources Resources
resources: {}
# resources:
# limits:
# cpu: 4000m
# memory: 4Gi
# requests:
# cpu: 100m
# memory: 512Mi
## @param 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).
resourcesPreset: "micro"
konnectivity:
server:
## @param controlPlane.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).
## @param controlPlane.konnectivity.server.resources Resources
resourcesPreset: "micro"
resources: {}

View File

@@ -16,7 +16,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes # 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. # to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/) # Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.10.1 version: 0.10.0
# This is the version number of the application being deployed. This version number should be # 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 # incremented each time you make changes to the application. Versions are not expected to

View File

@@ -13,6 +13,9 @@ spec:
jobTemplate: jobTemplate:
spec: spec:
backoffLimit: 2 backoffLimit: 2
template:
spec:
restartPolicy: OnFailure
template: template:
metadata: metadata:
annotations: annotations:
@@ -21,7 +24,7 @@ spec:
spec: spec:
imagePullSecrets: imagePullSecrets:
- name: {{ .Release.Name }}-regsecret - name: {{ .Release.Name }}-regsecret
restartPolicy: OnFailure restartPolicy: Never
containers: containers:
- name: pgdump - name: pgdump
image: "{{ $.Files.Get "images/postgres-backup.tag" | trim }}" image: "{{ $.Files.Get "images/postgres-backup.tag" | trim }}"

View File

@@ -4,4 +4,4 @@ description: Separated tenant namespace
icon: /logos/tenant.svg icon: /logos/tenant.svg
type: application type: application
version: 1.9.2 version: 1.9.1

View File

@@ -24,7 +24,6 @@ spec:
ingress: ingress:
- fromEntities: - fromEntities:
- world - world
- cluster
egress: egress:
- toEntities: - toEntities:
- world - world

View File

@@ -57,9 +57,7 @@ kubernetes 0.15.1 160e4e2a
kubernetes 0.15.2 8267072d kubernetes 0.15.2 8267072d
kubernetes 0.16.0 077045b0 kubernetes 0.16.0 077045b0
kubernetes 0.17.0 1fbbfcd0 kubernetes 0.17.0 1fbbfcd0
kubernetes 0.17.1 fd240701 kubernetes 0.17.1 HEAD
kubernetes 0.18.0 721c12a7
kubernetes 0.19.0 HEAD
mysql 0.1.0 263e47be mysql 0.1.0 263e47be
mysql 0.2.0 c24a103f mysql 0.2.0 c24a103f
mysql 0.3.0 53f2365e mysql 0.3.0 53f2365e
@@ -89,8 +87,7 @@ postgres 0.7.0 4b90bf5a
postgres 0.7.1 1ec10165 postgres 0.7.1 1ec10165
postgres 0.8.0 4e68e65c postgres 0.8.0 4e68e65c
postgres 0.9.0 8267072d postgres 0.9.0 8267072d
postgres 0.10.0 721c12a7 postgres 0.10.0 HEAD
postgres 0.10.1 HEAD
rabbitmq 0.1.0 263e47be rabbitmq 0.1.0 263e47be
rabbitmq 0.2.0 53f2365e rabbitmq 0.2.0 53f2365e
rabbitmq 0.3.0 6c5cf5bf rabbitmq 0.3.0 6c5cf5bf
@@ -131,8 +128,7 @@ tenant 1.6.8 bc95159a
tenant 1.7.0 24fa7222 tenant 1.7.0 24fa7222
tenant 1.8.0 160e4e2a tenant 1.8.0 160e4e2a
tenant 1.9.0 728743db tenant 1.9.0 728743db
tenant 1.9.1 721c12a7 tenant 1.9.1 HEAD
tenant 1.9.2 HEAD
virtual-machine 0.1.4 f2015d65 virtual-machine 0.1.4 f2015d65
virtual-machine 0.1.5 263e47be virtual-machine 0.1.5 263e47be
virtual-machine 0.2.0 c0685f43 virtual-machine 0.2.0 c0685f43
@@ -144,9 +140,7 @@ virtual-machine 0.7.0 e23286a3
virtual-machine 0.7.1 0ab39f20 virtual-machine 0.7.1 0ab39f20
virtual-machine 0.8.0 3fa4dd3a virtual-machine 0.8.0 3fa4dd3a
virtual-machine 0.8.1 93c46161 virtual-machine 0.8.1 93c46161
virtual-machine 0.8.2 de19450f virtual-machine 0.8.2 HEAD
virtual-machine 0.9.0 721c12a7
virtual-machine 0.9.1 HEAD
vm-disk 0.1.0 d971f2ff vm-disk 0.1.0 d971f2ff
vm-disk 0.1.1 HEAD vm-disk 0.1.1 HEAD
vm-instance 0.1.0 1ec10165 vm-instance 0.1.0 1ec10165
@@ -155,9 +149,7 @@ vm-instance 0.3.0 4e68e65c
vm-instance 0.4.0 e23286a3 vm-instance 0.4.0 e23286a3
vm-instance 0.4.1 0ab39f20 vm-instance 0.4.1 0ab39f20
vm-instance 0.5.0 3fa4dd3a vm-instance 0.5.0 3fa4dd3a
vm-instance 0.5.1 de19450f vm-instance 0.5.1 HEAD
vm-instance 0.6.0 721c12a7
vm-instance 0.6.1 HEAD
vpn 0.1.0 263e47be vpn 0.1.0 263e47be
vpn 0.2.0 53f2365e vpn 0.2.0 53f2365e
vpn 0.3.0 6c5cf5bf vpn 0.3.0 6c5cf5bf

View File

@@ -17,10 +17,10 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes # 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. # to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/) # Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.9.1 version: 0.8.2
# This is the version number of the application being deployed. This version number should be # 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 # 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. # follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes. # It is recommended to use it with quotes.
appVersion: 0.9.0 appVersion: "0.8.2"

View File

@@ -2,7 +2,6 @@ include ../../../scripts/package.mk
generate: generate:
readme-generator -v values.yaml -s values.schema.json -r README.md readme-generator -v values.yaml -s values.schema.json -r README.md
yq -o json -i '.properties.gpus.items.type = "object" | .properties.gpus.default = []' values.schema.json
INSTANCE_TYPES=$$(yq e '.metadata.name' -o=json -r ../../system/kubevirt-instancetypes/templates/instancetypes.yaml | yq 'split(" ") | . + [""]' -o json) \ INSTANCE_TYPES=$$(yq e '.metadata.name' -o=json -r ../../system/kubevirt-instancetypes/templates/instancetypes.yaml | yq 'split(" ") | . + [""]' -o json) \
&& yq -i -o json ".properties.instanceType.optional=true | .properties.instanceType.enum = $${INSTANCE_TYPES}" values.schema.json && yq -i -o json ".properties.instanceType.optional=true | .properties.instanceType.enum = $${INSTANCE_TYPES}" values.schema.json
PREFERENCES=$$(yq e '.metadata.name' -o=json -r ../../system/kubevirt-instancetypes/templates/preferences.yaml | yq 'split(" ") | . + [""]' -o json) \ PREFERENCES=$$(yq e '.metadata.name' -o=json -r ../../system/kubevirt-instancetypes/templates/preferences.yaml | yq 'split(" ") | . + [""]' -o json) \

View File

@@ -36,23 +36,22 @@ virtctl ssh <user>@<vm>
### Common parameters ### Common parameters
| Name | Description | Value | | Name | Description | Value |
| ------------------------- | ---------------------------------------------------------------------------------------------------------- | ------------ | | ------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------- |
| `external` | Enable external access from outside the cluster | `false` | | `external` | Enable external access from outside the cluster | `false` |
| `externalMethod` | specify method to passthrough the traffic to the virtual machine. Allowed values: `WholeIP` and `PortList` | `WholeIP` | | `externalMethod` | specify method to passthrough the traffic to the virtual machine. Allowed values: `WholeIP` and `PortList` | `WholeIP` |
| `externalPorts` | Specify ports to forward from outside the cluster | `[]` | | `externalPorts` | Specify ports to forward from outside the cluster | `[]` |
| `running` | Determines if the virtual machine should be running | `true` | | `running` | Determines if the virtual machine should be running | `true` |
| `instanceType` | Virtual Machine instance type | `u1.medium` | | `instanceType` | Virtual Machine instance type | `u1.medium` |
| `instanceProfile` | Virtual Machine preferences profile | `ubuntu` | | `instanceProfile` | Virtual Machine prefferences profile | `ubuntu` |
| `systemDisk.image` | The base image for the virtual machine. Allowed values: `ubuntu`, `cirros`, `alpine`, `fedora` and `talos` | `ubuntu` | | `systemDisk.image` | The base image for the virtual machine. Allowed values: `ubuntu`, `cirros`, `alpine`, `fedora` and `talos` | `ubuntu` |
| `systemDisk.storage` | The size of the disk allocated for the virtual machine | `5Gi` | | `systemDisk.storage` | The size of the disk allocated for the virtual machine | `5Gi` |
| `systemDisk.storageClass` | StorageClass used to store the data | `replicated` | | `systemDisk.storageClass` | StorageClass used to store the data | `replicated` |
| `gpus` | List of GPUs to attach | `[]` | | `resources.cpu` | The number of CPU cores allocated to the virtual machine | `""` |
| `resources.cpu` | The number of CPU cores allocated to the virtual machine | `""` | | `resources.memory` | The amount of memory allocated to the virtual machine | `""` |
| `resources.memory` | The amount of memory allocated to the virtual machine | `""` | | `sshKeys` | List of SSH public keys for authentication. Can be a single key or a list of keys. | `[]` |
| `sshKeys` | List of SSH public keys for authentication. Can be a single key or a list of keys. | `[]` | | `cloudInit` | cloud-init user data config. See cloud-init documentation for more details. | `#cloud-config
| `cloudInit` | cloud-init user data config. See cloud-init documentation for more details. | `""` | ` |
| `cloudInitSeed` | A seed string to generate an SMBIOS UUID for the VM. | `""` |
## U Series ## U Series

View File

@@ -49,23 +49,3 @@ Selector labels
app.kubernetes.io/name: {{ include "virtual-machine.name" . }} app.kubernetes.io/name: {{ include "virtual-machine.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }} {{- end }}
{{/*
Generate a stable UUID for cloud-init re-initialization upon upgrade.
*/}}
{{- define "virtual-machine.stableUuid" -}}
{{- $source := printf "%s-%s-%s" .Release.Namespace (include "virtual-machine.fullname" .) .Values.cloudInitSeed }}
{{- $hash := sha256sum $source }}
{{- $uuid := printf "%s-%s-4%s-9%s-%s" (substr 0 8 $hash) (substr 8 12 $hash) (substr 13 16 $hash) (substr 17 20 $hash) (substr 20 32 $hash) }}
{{- if eq .Values.cloudInitSeed "" }}
{{- /* Try to save previous uuid to not trigger full cloud-init again if user decided to remove the seed. */}}
{{- $vmResource := lookup "kubevirt.io/v1" "VirtualMachine" .Release.Namespace (include "virtual-machine.fullname" .) -}}
{{- if $vmResource }}
{{- $existingUuid := $vmResource | dig "spec" "template" "spec" "domain" "firmware" "uuid" "" }}
{{- if $existingUuid }}
{{- $uuid = $existingUuid }}
{{- end }}
{{- end }}
{{- end }}
{{- $uuid }}
{{- end }}

View File

@@ -68,16 +68,7 @@ spec:
requests: requests:
memory: {{ .Values.resources.memory | quote }} memory: {{ .Values.resources.memory | quote }}
{{- end }} {{- end }}
firmware:
uuid: {{ include "virtual-machine.stableUuid" . }}
devices: devices:
{{- if .Values.gpus }}
gpus:
{{- range $i, $gpu := .Values.gpus }}
- name: gpu{{ add $i 1 }}
deviceName: {{ $gpu.name }}
{{- end }}
{{- end }}
disks: disks:
- disk: - disk:
bus: scsi bus: scsi
@@ -99,7 +90,6 @@ spec:
secret: secret:
secretName: {{ include "virtual-machine.fullname" $ }}-ssh-keys secretName: {{ include "virtual-machine.fullname" $ }}-ssh-keys
propagationMethod: propagationMethod:
# keys will be injected into metadata part of cloud-init disk
noCloud: {} noCloud: {}
{{- end }} {{- end }}
terminationGracePeriodSeconds: 30 terminationGracePeriodSeconds: 30
@@ -110,14 +100,8 @@ spec:
{{- if or .Values.sshKeys .Values.cloudInit }} {{- if or .Values.sshKeys .Values.cloudInit }}
- name: cloudinitdisk - name: cloudinitdisk
cloudInitNoCloud: cloudInitNoCloud:
{{- if .Values.cloudInit }}
secretRef: secretRef:
name: {{ include "virtual-machine.fullname" . }}-cloud-init name: {{ include "virtual-machine.fullname" . }}-cloud-init
{{- else }}
userData: |
#cloud-config
final_message: Cloud-init user-data was left blank intentionally.
{{- end }}
{{- end }} {{- end }}
networks: networks:
- name: default - name: default

View File

@@ -88,7 +88,7 @@
}, },
"instanceProfile": { "instanceProfile": {
"type": "string", "type": "string",
"description": "Virtual Machine preferences profile", "description": "Virtual Machine prefferences profile",
"default": "ubuntu", "default": "ubuntu",
"optional": true, "optional": true,
"enum": [ "enum": [
@@ -164,14 +164,6 @@
} }
} }
}, },
"gpus": {
"type": "array",
"description": "List of GPUs to attach",
"default": [],
"items": {
"type": "object"
}
},
"resources": { "resources": {
"type": "object", "type": "object",
"properties": { "properties": {
@@ -198,12 +190,7 @@
"cloudInit": { "cloudInit": {
"type": "string", "type": "string",
"description": "cloud-init user data config. See cloud-init documentation for more details.", "description": "cloud-init user data config. See cloud-init documentation for more details.",
"default": "" "default": "#cloud-config\n"
},
"cloudInitSeed": {
"type": "string",
"description": "A seed string to generate an SMBIOS UUID for the VM.",
"default": ""
} }
} }
} }

View File

@@ -12,7 +12,7 @@ externalPorts:
running: true running: true
## @param instanceType Virtual Machine instance type ## @param instanceType Virtual Machine instance type
## @param instanceProfile Virtual Machine preferences profile ## @param instanceProfile Virtual Machine prefferences profile
## ##
instanceType: "u1.medium" instanceType: "u1.medium"
instanceProfile: ubuntu instanceProfile: ubuntu
@@ -26,12 +26,6 @@ systemDisk:
storage: 5Gi storage: 5Gi
storageClass: replicated storageClass: replicated
## @param gpus [array] List of GPUs to attach
## Example:
## gpus:
## - name: nvidia.com/GA102GL_A10
gpus: []
## @param resources.cpu The number of CPU cores allocated to the virtual machine ## @param resources.cpu The number of CPU cores allocated to the virtual machine
## @param resources.memory The amount of memory allocated to the virtual machine ## @param resources.memory The amount of memory allocated to the virtual machine
resources: resources:
@@ -55,13 +49,5 @@ sshKeys: []
## password: ubuntu ## password: ubuntu
## chpasswd: { expire: False } ## chpasswd: { expire: False }
## ##
cloudInit: "" cloudInit: |
#cloud-config
## @param cloudInitSeed A seed string to generate an SMBIOS UUID for the VM.
cloudInitSeed: ""
## Change it to any new value to force a full cloud-init reconfiguration. Change it when you want to apply
## to an existing VM settings that are usually written only once, like new SSH keys or new network configuration.
## An empty value does nothing (and the existing UUID is not reverted). Please note that changing this value
## does not trigger a VM restart. You must perform the restart separately.
## Example:
## cloudInitSeed: "upd1"

View File

@@ -17,10 +17,10 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes # 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. # to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/) # Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.6.1 version: 0.5.1
# This is the version number of the application being deployed. This version number should be # 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 # 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. # follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes. # It is recommended to use it with quotes.
appVersion: 0.6.0 appVersion: "0.5.1"

View File

@@ -3,7 +3,6 @@ include ../../../scripts/package.mk
generate: generate:
readme-generator -v values.yaml -s values.schema.json -r README.md readme-generator -v values.yaml -s values.schema.json -r README.md
yq -o json -i '.properties.disks.items.type = "object" | .properties.disks.default = []' values.schema.json yq -o json -i '.properties.disks.items.type = "object" | .properties.disks.default = []' values.schema.json
yq -o json -i '.properties.gpus.items.type = "object" | .properties.gpus.default = []' values.schema.json
INSTANCE_TYPES=$$(yq e '.metadata.name' -o=json -r ../../system/kubevirt-instancetypes/templates/instancetypes.yaml | yq 'split(" ") | . + [""]' -o json) \ INSTANCE_TYPES=$$(yq e '.metadata.name' -o=json -r ../../system/kubevirt-instancetypes/templates/instancetypes.yaml | yq 'split(" ") | . + [""]' -o json) \
&& yq -i -o json ".properties.instanceType.optional=true | .properties.instanceType.enum = $${INSTANCE_TYPES}" values.schema.json && yq -i -o json ".properties.instanceType.optional=true | .properties.instanceType.enum = $${INSTANCE_TYPES}" values.schema.json
PREFERENCES=$$(yq e '.metadata.name' -o=json -r ../../system/kubevirt-instancetypes/templates/preferences.yaml | yq 'split(" ") | . + [""]' -o json) \ PREFERENCES=$$(yq e '.metadata.name' -o=json -r ../../system/kubevirt-instancetypes/templates/preferences.yaml | yq 'split(" ") | . + [""]' -o json) \

View File

@@ -36,21 +36,20 @@ virtctl ssh <user>@<vm>
### Common parameters ### Common parameters
| Name | Description | Value | | Name | Description | Value |
| ------------------ | ---------------------------------------------------------------------------------------------------------- | ----------- | | ------------------ | ---------------------------------------------------------------------------------------------------------- | ---------------- |
| `external` | Enable external access from outside the cluster | `false` | | `external` | Enable external access from outside the cluster | `false` |
| `externalMethod` | specify method to passthrough the traffic to the virtual machine. Allowed values: `WholeIP` and `PortList` | `WholeIP` | | `externalMethod` | specify method to passthrough the traffic to the virtual machine. Allowed values: `WholeIP` and `PortList` | `WholeIP` |
| `externalPorts` | Specify ports to forward from outside the cluster | `[]` | | `externalPorts` | Specify ports to forward from outside the cluster | `[]` |
| `running` | Determines if the virtual machine should be running | `true` | | `running` | Determines if the virtual machine should be running | `true` |
| `instanceType` | Virtual Machine instance type | `u1.medium` | | `instanceType` | Virtual Machine instance type | `u1.medium` |
| `instanceProfile` | Virtual Machine preferences profile | `ubuntu` | | `instanceProfile` | Virtual Machine prefferences profile | `ubuntu` |
| `disks` | List of disks to attach | `[]` | | `disks` | List of disks to attach | `[]` |
| `gpus` | List of GPUs to attach | `[]` | | `resources.cpu` | The number of CPU cores allocated to the virtual machine | `""` |
| `resources.cpu` | The number of CPU cores allocated to the virtual machine | `""` | | `resources.memory` | The amount of memory allocated to the virtual machine | `""` |
| `resources.memory` | The amount of memory allocated to the virtual machine | `""` | | `sshKeys` | List of SSH public keys for authentication. Can be a single key or a list of keys. | `[]` |
| `sshKeys` | List of SSH public keys for authentication. Can be a single key or a list of keys. | `[]` | | `cloudInit` | cloud-init user data config. See cloud-init documentation for more details. | `#cloud-config
| `cloudInit` | cloud-init user data config. See cloud-init documentation for more details. | `""` | ` |
| `cloudInitSeed` | A seed string to generate an SMBIOS UUID for the VM. | `""` |
## U Series ## U Series

View File

@@ -49,23 +49,3 @@ Selector labels
app.kubernetes.io/name: {{ include "virtual-machine.name" . }} app.kubernetes.io/name: {{ include "virtual-machine.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }} {{- end }}
{{/*
Generate a stable UUID for cloud-init re-initialization upon upgrade.
*/}}
{{- define "virtual-machine.stableUuid" -}}
{{- $source := printf "%s-%s-%s" .Release.Namespace (include "virtual-machine.fullname" .) .Values.cloudInitSeed }}
{{- $hash := sha256sum $source }}
{{- $uuid := printf "%s-%s-4%s-9%s-%s" (substr 0 8 $hash) (substr 8 12 $hash) (substr 13 16 $hash) (substr 17 20 $hash) (substr 20 32 $hash) }}
{{- if eq .Values.cloudInitSeed "" }}
{{- /* Try to save previous uuid to not trigger full cloud-init again if user decided to remove the seed. */}}
{{- $vmResource := lookup "kubevirt.io/v1" "VirtualMachine" .Release.Namespace (include "virtual-machine.fullname" .) -}}
{{- if $vmResource }}
{{- $existingUuid := $vmResource | dig "spec" "template" "spec" "domain" "firmware" "uuid" "" }}
{{- if $existingUuid }}
{{- $uuid = $existingUuid }}
{{- end }}
{{- end }}
{{- end }}
{{- $uuid }}
{{- end }}

View File

@@ -22,5 +22,5 @@ spec:
kind: virtual-machine kind: virtual-machine
type: virtual-machine type: virtual-machine
selector: selector:
{{- include "virtual-machine.selectorLabels" . | nindent 4 }} vm.kubevirt.io/name: {{ $.Release.Name }}
version: {{ $.Chart.Version }} version: {{ $.Chart.Version }}

View File

@@ -1,8 +1,8 @@
{{- if and .Values.instanceType (not (lookup "instancetype.kubevirt.io/v1beta1" "VirtualMachineClusterInstancetype" "" .Values.instanceType)) }} {{- if and .Values.instanceType (not (lookup "instancetype.kubevirt.io/v1beta1" "VirtualMachineClusterInstancetype" "" .Values.instanceType)) }}
{{- fail (printf "Specified instanceType does not exist in the cluster: %s" .Values.instanceType) }} {{- fail (printf "Specified instancetype not exists in cluster: %s" .Values.instanceType) }}
{{- end }} {{- end }}
{{- if and .Values.instanceProfile (not (lookup "instancetype.kubevirt.io/v1beta1" "VirtualMachineClusterPreference" "" .Values.instanceProfile)) }} {{- if and .Values.instanceProfile (not (lookup "instancetype.kubevirt.io/v1beta1" "VirtualMachineClusterPreference" "" .Values.instanceProfile)) }}
{{- fail (printf "Specified instanceProfile does not exist in the cluster: %s" .Values.instanceProfile) }} {{- fail (printf "Specified profile not exists in cluster: %s" .Values.instanceProfile) }}
{{- end }} {{- end }}
apiVersion: kubevirt.io/v1 apiVersion: kubevirt.io/v1
@@ -40,20 +40,11 @@ spec:
requests: requests:
memory: {{ .Values.resources.memory | quote }} memory: {{ .Values.resources.memory | quote }}
{{- end }} {{- end }}
firmware:
uuid: {{ include "virtual-machine.stableUuid" . }}
devices: devices:
{{- if .Values.gpus }}
gpus:
{{- range $i, $gpu := .Values.gpus }}
- name: gpu{{ add $i 1 }}
deviceName: {{ $gpu.name }}
{{- end }}
{{- end }}
disks: disks:
{{- range $i, $disk := .Values.disks }} {{- range $i, $disk := .Values.disks }}
- name: disk-{{ $disk.name }} - name: disk-{{ .name }}
{{- $disk := lookup "cdi.kubevirt.io/v1beta1" "DataVolume" $.Release.Namespace (printf "vm-disk-%s" $disk.name) }} {{- $disk := lookup "cdi.kubevirt.io/v1beta1" "DataVolume" $.Release.Namespace (printf "vm-disk-%s" .name) }}
{{- if $disk }} {{- if $disk }}
{{- if and (hasKey $disk.metadata.annotations "vm-disk.cozystack.io/optical") (eq (index $disk.metadata.annotations "vm-disk.cozystack.io/optical") "true") }} {{- if and (hasKey $disk.metadata.annotations "vm-disk.cozystack.io/optical") (eq (index $disk.metadata.annotations "vm-disk.cozystack.io/optical") "true") }}
cdrom: {} cdrom: {}
@@ -84,7 +75,6 @@ spec:
secret: secret:
secretName: {{ include "virtual-machine.fullname" $ }}-ssh-keys secretName: {{ include "virtual-machine.fullname" $ }}-ssh-keys
propagationMethod: propagationMethod:
# keys will be injected into metadata part of cloud-init disk
noCloud: {} noCloud: {}
{{- end }} {{- end }}
terminationGracePeriodSeconds: 30 terminationGracePeriodSeconds: 30
@@ -97,14 +87,8 @@ spec:
{{- if or .Values.sshKeys .Values.cloudInit }} {{- if or .Values.sshKeys .Values.cloudInit }}
- name: cloudinitdisk - name: cloudinitdisk
cloudInitNoCloud: cloudInitNoCloud:
{{- if .Values.cloudInit }}
secretRef: secretRef:
name: {{ include "virtual-machine.fullname" . }}-cloud-init name: {{ include "virtual-machine.fullname" . }}-cloud-init
{{- else }}
userData: |
#cloud-config
final_message: Cloud-init user-data was left blank intentionally.
{{- end }}
{{- end }} {{- end }}
networks: networks:
- name: default - name: default

View File

@@ -88,7 +88,7 @@
}, },
"instanceProfile": { "instanceProfile": {
"type": "string", "type": "string",
"description": "Virtual Machine preferences profile", "description": "Virtual Machine prefferences profile",
"default": "ubuntu", "default": "ubuntu",
"optional": true, "optional": true,
"enum": [ "enum": [
@@ -145,14 +145,6 @@
"type": "object" "type": "object"
} }
}, },
"gpus": {
"type": "array",
"description": "List of GPUs to attach",
"default": [],
"items": {
"type": "object"
}
},
"resources": { "resources": {
"type": "object", "type": "object",
"properties": { "properties": {
@@ -179,12 +171,7 @@
"cloudInit": { "cloudInit": {
"type": "string", "type": "string",
"description": "cloud-init user data config. See cloud-init documentation for more details.", "description": "cloud-init user data config. See cloud-init documentation for more details.",
"default": "" "default": "#cloud-config\n"
},
"cloudInitSeed": {
"type": "string",
"description": "A seed string to generate an SMBIOS UUID for the VM.",
"default": ""
} }
} }
} }

View File

@@ -12,7 +12,7 @@ externalPorts:
running: true running: true
## @param instanceType Virtual Machine instance type ## @param instanceType Virtual Machine instance type
## @param instanceProfile Virtual Machine preferences profile ## @param instanceProfile Virtual Machine prefferences profile
## ##
instanceType: "u1.medium" instanceType: "u1.medium"
instanceProfile: ubuntu instanceProfile: ubuntu
@@ -24,12 +24,6 @@ instanceProfile: ubuntu
## - name: example-data ## - name: example-data
disks: [] disks: []
## @param gpus [array] List of GPUs to attach
## Example:
## gpus:
## - name: nvidia.com/GA102GL_A10
gpus: []
## @param resources.cpu The number of CPU cores allocated to the virtual machine ## @param resources.cpu The number of CPU cores allocated to the virtual machine
## @param resources.memory The amount of memory allocated to the virtual machine ## @param resources.memory The amount of memory allocated to the virtual machine
resources: resources:
@@ -53,13 +47,5 @@ sshKeys: []
## password: ubuntu ## password: ubuntu
## chpasswd: { expire: False } ## chpasswd: { expire: False }
## ##
cloudInit: "" cloudInit: |
#cloud-config
## @param cloudInitSeed A seed string to generate an SMBIOS UUID for the VM.
cloudInitSeed: ""
## Change it to any new value to force a full cloud-init reconfiguration. Change it when you want to apply
## to an existing VM settings that are usually written only once, like new SSH keys or new network configuration.
## An empty value does nothing (and the existing UUID is not reverted). Please note that changing this value
## does not trigger a VM restart. You must perform the restart separately.
## Example:
## cloudInitSeed: "upd1"

View File

@@ -59,7 +59,7 @@ image-matchbox:
> ../../extra/bootbox/images/matchbox.tag > ../../extra/bootbox/images/matchbox.tag
rm -f images/matchbox.json rm -f images/matchbox.json
assets: talos-iso talos-nocloud talos-metal talos-kernel talos-initramfs assets: talos-iso talos-nocloud talos-metal
talos-initramfs talos-kernel talos-installer talos-iso talos-nocloud talos-metal: talos-initramfs talos-kernel talos-installer talos-iso talos-nocloud talos-metal:
mkdir -p ../../../_out/assets mkdir -p ../../../_out/assets

View File

@@ -30,8 +30,6 @@ FROM alpine:3.21
RUN apk add --no-cache make RUN apk add --no-cache make
RUN apk add helm kubectl --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community 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 scripts /cozystack/scripts
COPY --from=builder /src/packages/core /cozystack/packages/core COPY --from=builder /src/packages/core /cozystack/packages/core

View File

@@ -1,2 +1,2 @@
cozystack: cozystack:
image: ghcr.io/cozystack/cozystack/installer:v0.30.2@sha256:59996588b5d59b5593fb34442b2f2ed8ef466d138b229a8d37beb6f70141a690 image: ghcr.io/cozystack/cozystack/installer:v0.29.1@sha256:d63b1cc791ca75d53a7270940189d1401bbeb08f0d54d8ae29dae0ab8a6ef230

View File

@@ -7,11 +7,7 @@ show:
helm template -n $(NAMESPACE) $(NAME) . --dry-run=server $(API_VERSIONS_FLAGS) helm template -n $(NAMESPACE) $(NAME) . --dry-run=server $(API_VERSIONS_FLAGS)
apply: apply:
helm template -n $(NAMESPACE) $(NAME) . --dry-run=server $(API_VERSIONS_FLAGS) \ helm template -n $(NAMESPACE) $(NAME) . --dry-run=server $(API_VERSIONS_FLAGS) | kubectl apply -f-
| kubectl apply -f-
kubectl delete helmreleases.helm.toolkit.fluxcd.io -l cozystack.io/marked-for-deletion=true -A
reconcile: apply
namespaces-show: namespaces-show:
helm template -n $(NAMESPACE) $(NAME) . --dry-run=server $(API_VERSIONS_FLAGS) -s templates/namespaces.yaml helm template -n $(NAMESPACE) $(NAME) . --dry-run=server $(API_VERSIONS_FLAGS) -s templates/namespaces.yaml

View File

@@ -116,7 +116,7 @@ releases:
chart: cozy-monitoring-agents chart: cozy-monitoring-agents
namespace: cozy-monitoring namespace: cozy-monitoring
privileged: true privileged: true
dependsOn: [victoria-metrics-operator, vertical-pod-autoscaler-crds] dependsOn: [cilium,kubeovn,victoria-metrics-operator]
values: values:
scrapeRules: scrapeRules:
etcd: etcd:
@@ -153,17 +153,6 @@ releases:
namespace: cozy-kubevirt-cdi namespace: cozy-kubevirt-cdi
dependsOn: [cilium,kubeovn,kubevirt-cdi-operator] dependsOn: [cilium,kubeovn,kubevirt-cdi-operator]
- name: gpu-operator
releaseName: gpu-operator
chart: cozy-gpu-operator
namespace: cozy-gpu-operator
privileged: true
optional: true
dependsOn: [cilium,kubeovn]
valuesFiles:
- values.yaml
- values-talos.yaml
- name: metallb - name: metallb
releaseName: metallb releaseName: metallb
chart: cozy-metallb chart: cozy-metallb
@@ -270,10 +259,7 @@ releases:
{{- end }} {{- end }}
{{- end }} {{- end }}
{{- end }} {{- end }}
frontend:
resourcesPreset: "none"
dashboard: dashboard:
resourcesPreset: "none"
{{- $cozystackBranding:= lookup "v1" "ConfigMap" "cozy-system" "cozystack-branding" }} {{- $cozystackBranding:= lookup "v1" "ConfigMap" "cozy-system" "cozystack-branding" }}
{{- $branding := dig "data" "branding" "" $cozystackBranding }} {{- $branding := dig "data" "branding" "" $cozystackBranding }}
{{- if $branding }} {{- if $branding }}
@@ -402,13 +388,6 @@ releases:
privileged: true privileged: true
dependsOn: [monitoring-agents] dependsOn: [monitoring-agents]
- name: vertical-pod-autoscaler-crds
releaseName: vertical-pod-autoscaler-crds
chart: cozy-vertical-pod-autoscaler-crds
namespace: cozy-vertical-pod-autoscaler
privileged: true
dependsOn: [cilium, kubeovn]
- name: reloader - name: reloader
releaseName: reloader releaseName: reloader
chart: cozy-reloader chart: cozy-reloader

View File

@@ -69,7 +69,7 @@ releases:
chart: cozy-monitoring-agents chart: cozy-monitoring-agents
namespace: cozy-monitoring namespace: cozy-monitoring
privileged: true privileged: true
dependsOn: [victoria-metrics-operator, vertical-pod-autoscaler-crds] dependsOn: [victoria-metrics-operator]
values: values:
scrapeRules: scrapeRules:
etcd: etcd:
@@ -168,10 +168,7 @@ releases:
{{- end }} {{- end }}
{{- end }} {{- end }}
{{- end }} {{- end }}
frontend:
resourcesPreset: "none"
dashboard: dashboard:
resourcesPreset: "none"
{{- $cozystackBranding:= lookup "v1" "ConfigMap" "cozy-system" "cozystack-branding" }} {{- $cozystackBranding:= lookup "v1" "ConfigMap" "cozy-system" "cozystack-branding" }}
{{- $branding := dig "data" "branding" "" $cozystackBranding }} {{- $branding := dig "data" "branding" "" $cozystackBranding }}
{{- if $branding }} {{- if $branding }}
@@ -257,10 +254,3 @@ releases:
namespace: cozy-vertical-pod-autoscaler namespace: cozy-vertical-pod-autoscaler
privileged: true privileged: true
dependsOn: [monitoring-agents] dependsOn: [monitoring-agents]
- name: vertical-pod-autoscaler-crds
releaseName: vertical-pod-autoscaler-crds
chart: cozy-vertical-pod-autoscaler-crds
namespace: cozy-vertical-pod-autoscaler
privileged: true
dependsOn: [cilium, kubeovn]

View File

@@ -7,23 +7,12 @@
{{/* collect dependency namespaces from releases */}} {{/* collect dependency namespaces from releases */}}
{{- range $x := $bundle.releases }} {{- range $x := $bundle.releases }}
{{- $_ := set $dependencyNamespaces $x.name $x.namespace }} {{- $_ := set $dependencyNamespaces $x.name $x.namespace }}
{{- end }} {{- end }}
{{- range $x := $bundle.releases }} {{- range $x := $bundle.releases }}
{{- if not (has $x.name $disabledComponents) }}
{{- $shouldInstall := true }} {{- if or (not $x.optional) (and ($x.optional) (has $x.name $enabledComponents)) }}
{{- $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 }}
--- ---
apiVersion: helm.toolkit.fluxcd.io/v2 apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease kind: HelmRelease
@@ -33,9 +22,6 @@ metadata:
labels: labels:
cozystack.io/repository: system cozystack.io/repository: system
cozystack.io/system-app: "true" cozystack.io/system-app: "true"
{{- if $shouldDelete }}
cozystack.io/marked-for-deletion: "true"
{{- end }}
spec: spec:
interval: 5m interval: 5m
releaseName: {{ $x.releaseName | default $x.name }} releaseName: {{ $x.releaseName | default $x.name }}
@@ -61,10 +47,10 @@ spec:
{{- end }} {{- end }}
{{- $values := dict }} {{- $values := dict }}
{{- with $x.values }} {{- with $x.values }}
{{- $values = merge . $values }} {{- $values = merge . $values }}
{{- end }} {{- end }}
{{- with index $cozyConfig.data (printf "values-%s" $x.name) }} {{- with index $cozyConfig.data (printf "values-%s" $x.name) }}
{{- $values = merge (fromYaml .) $values }} {{- $values = merge (fromYaml .) $values }}
{{- end }} {{- end }}
{{- with $values }} {{- with $values }}
values: values:
@@ -84,12 +70,13 @@ spec:
{{- with $x.dependsOn }} {{- with $x.dependsOn }}
dependsOn: dependsOn:
{{- range $dep := . }} {{- range $dep := . }}
{{- if not (has $dep $disabledComponents) }} {{- if not (has $dep $disabledComponents) }}
- name: {{ $dep }} - name: {{ $dep }}
namespace: {{ index $dependencyNamespaces $dep }} namespace: {{ index $dependencyNamespaces $dep }}
{{- end }} {{- end }}
{{- end }} {{- end }}
{{- end }} {{- end }}
{{- end }} {{- end }}
{{- end }} {{- end }}
{{- end }}

View File

@@ -2,7 +2,7 @@ NAMESPACE=cozy-e2e-tests
NAME := sandbox NAME := sandbox
CLEAN := 1 CLEAN := 1
TESTING_APPS := $(shell find ../../apps -maxdepth 1 -mindepth 1 -type d | awk -F/ '{print $$NF}') TESTING_APPS := $(shell find ../../apps -maxdepth 1 -mindepth 1 -type d | awk -F/ '{print $$NF}')
SANDBOX_NAME := cozy-e2e-sandbox-$(shell echo "$$(hostname):$$(pwd)" | sha256sum | cut -c -6) SANDBOX_NAME := cozy-e2e-sandbox
ROOT_DIR = $(dir $(abspath $(firstword $(MAKEFILE_LIST))/../../..)) ROOT_DIR = $(dir $(abspath $(firstword $(MAKEFILE_LIST))/../../..))

View File

@@ -14,4 +14,3 @@ RUN curl -LO "https://dl.k8s.io/release/v${KUBECTL_VERSION}/bin/linux/amd64/kube
&& mv kubectl /usr/local/bin/kubectl && mv kubectl /usr/local/bin/kubectl
RUN curl -sSL https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash -s - --version "v${HELM_VERSION}" RUN curl -sSL https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash -s - --version "v${HELM_VERSION}"
RUN wget https://github.com/mikefarah/yq/releases/download/v4.44.3/yq_linux_amd64 -O /usr/local/bin/yq && chmod +x /usr/local/bin/yq RUN wget https://github.com/mikefarah/yq/releases/download/v4.44.3/yq_linux_amd64 -O /usr/local/bin/yq && chmod +x /usr/local/bin/yq
RUN curl -s https://fluxcd.io/install.sh | bash

View File

@@ -1,2 +1,2 @@
e2e: e2e:
image: ghcr.io/cozystack/cozystack/e2e-sandbox:v0.30.2@sha256:31273d6b42dc88c2be2ff9ba64564d1b12e70ae8a5480953341b0d113ac7d4bd image: ghcr.io/cozystack/cozystack/e2e-sandbox:v0.29.1@sha256:f239dc2d06dfe43fb3192531e994bdb10414d42d56d8659b10951bb4fe434f80

View File

@@ -1 +1 @@
ghcr.io/cozystack/cozystack/matchbox:v0.30.2@sha256:307d382f75f1dcb39820c73b93b2ce576cdb6d58032679bda7d926999c677900 ghcr.io/cozystack/cozystack/matchbox:v0.29.1@sha256:f0c1d531af04ffde003755df2b6fb2fef9ba0d8355aa55d728de523c623b08a0

View File

@@ -3,4 +3,4 @@ name: ingress
description: NGINX Ingress Controller description: NGINX Ingress Controller
icon: /logos/ingress-nginx.svg icon: /logos/ingress-nginx.svg
type: application type: application
version: 1.5.0 version: 1.4.0

View File

@@ -4,13 +4,12 @@
### Common parameters ### Common parameters
| Name | Description | Value | | Name | Description | Value |
| ----------------- | ----------------------------------------------------------------- | ------- | | ---------------- | ----------------------------------------------------------------- | ------- |
| `replicas` | Number of ingress-nginx replicas | `2` | | `replicas` | Number of ingress-nginx replicas | `2` |
| `externalIPs` | List of externalIPs for service. | `[]` | | `externalIPs` | List of externalIPs for service. | `[]` |
| `whitelist` | List of client networks | `[]` | | `whitelist` | List of client networks | `[]` |
| `clouflareProxy` | Restoring original visitor IPs when Cloudflare proxied is enabled | `false` | | `clouflareProxy` | Restoring original visitor IPs when Cloudflare proxied is enabled | `false` |
| `dashboard` | Should ingress serve Cozystack service dashboard | `false` | | `dashboard` | Should ingress serve Cozystack service dashboard | `false` |
| `cdiUploadProxy` | Should ingress serve CDI upload proxy | `false` | | `cdiUploadProxy` | Should ingress serve CDI upload proxy | `false` |
| `virtExportProxy` | Should ingress serve KubeVirt export proxy | `false` |

View File

@@ -3,7 +3,7 @@
"type": "object", "type": "object",
"properties": { "properties": {
"replicas": { "replicas": {
"type": "number", "type": "integer",
"description": "Number of ingress-nginx replicas", "description": "Number of ingress-nginx replicas",
"default": 2 "default": 2
}, },
@@ -35,11 +35,6 @@
"type": "boolean", "type": "boolean",
"description": "Should ingress serve CDI upload proxy", "description": "Should ingress serve CDI upload proxy",
"default": false "default": false
},
"virtExportProxy": {
"type": "boolean",
"description": "Should ingress serve KubeVirt export proxy",
"default": false
} }
} }
} }

View File

@@ -30,6 +30,3 @@ dashboard: false
## @param cdiUploadProxy Should ingress serve CDI upload proxy ## @param cdiUploadProxy Should ingress serve CDI upload proxy
cdiUploadProxy: false cdiUploadProxy: false
## @param virtExportProxy Should ingress serve KubeVirt export proxy
virtExportProxy: false

View File

@@ -1,37 +0,0 @@
{{- $cozyConfig := lookup "v1" "ConfigMap" "cozy-system" "cozystack" }}
{{- $issuerType := (index $cozyConfig.data "clusterissuer") | default "http01" }}
{{- $myNS := lookup "v1" "Namespace" "" .Release.Namespace }}
{{- $host := index $myNS.metadata.annotations "namespace.cozystack.io/host" }}
{{- if .Values.virtExportProxy }}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
annotations:
nginx.ingress.kubernetes.io/backend-protocol: HTTPS
cert-manager.io/cluster-issuer: letsencrypt-prod
{{- if eq $issuerType "cloudflare" }}
{{- else }}
acme.cert-manager.io/http01-ingress-class: {{ .Release.Namespace }}
{{- end }}
name: virt-exportproxy-{{ .Release.Namespace }}
namespace: cozy-kubevirt
spec:
ingressClassName: {{ .Release.Namespace }}
rules:
- host: virt-exportproxy.{{ $host }}
http:
paths:
- backend:
service:
name: virt-exportproxy
port:
number: 443
path: /
pathType: ImplementationSpecific
tls:
- hosts:
virt-exportproxy.{{ $host }}
secretName: virt-exportproxy-{{ .Release.Namespace }}-tls
{{- end }}

View File

@@ -3,4 +3,4 @@ name: monitoring
description: Monitoring and observability stack description: Monitoring and observability stack
icon: /logos/monitoring.svg icon: /logos/monitoring.svg
type: application type: application
version: 1.9.2 version: 1.9.1

View File

@@ -1 +1 @@
ghcr.io/cozystack/cozystack/grafana:1.9.2@sha256:c63978e1ed0304e8518b31ddee56c4e8115541b997d8efbe1c0a74da57140399 ghcr.io/cozystack/cozystack/grafana:1.9.1@sha256:24382d445bf7a39ed988ef4dc7a0d9f084db891fcb5f42fd2e64622710b9457e

View File

@@ -4,8 +4,6 @@ kind: VLogs
metadata: metadata:
name: {{ .name }} name: {{ .name }}
spec: spec:
image:
tag: v1.17.0-victorialogs
storage: storage:
resources: resources:
requests: requests:

View File

@@ -16,8 +16,7 @@ ingress 1.0.0 d7cfa53c
ingress 1.1.0 5bbc488e ingress 1.1.0 5bbc488e
ingress 1.2.0 28fca4ef ingress 1.2.0 28fca4ef
ingress 1.3.0 fde4bcfa ingress 1.3.0 fde4bcfa
ingress 1.4.0 fd240701 ingress 1.4.0 HEAD
ingress 1.5.0 HEAD
monitoring 1.0.0 d7cfa53c monitoring 1.0.0 d7cfa53c
monitoring 1.1.0 25221fdc monitoring 1.1.0 25221fdc
monitoring 1.2.0 f81be075 monitoring 1.2.0 f81be075
@@ -35,8 +34,7 @@ monitoring 1.7.0 2a976afe
monitoring 1.8.0 8c460528 monitoring 1.8.0 8c460528
monitoring 1.8.1 8267072d monitoring 1.8.1 8267072d
monitoring 1.9.0 45a7416c monitoring 1.9.0 45a7416c
monitoring 1.9.1 fd240701 monitoring 1.9.1 HEAD
monitoring 1.9.2 HEAD
seaweedfs 0.1.0 71514249 seaweedfs 0.1.0 71514249
seaweedfs 0.2.0 5fb9cfe3 seaweedfs 0.2.0 5fb9cfe3
seaweedfs 0.2.1 fde4bcfa seaweedfs 0.2.1 fde4bcfa

View File

@@ -1 +1 @@
ghcr.io/cozystack/cozystack/s3manager:v0.5.0@sha256:a47d2743d01bff0ce60aa745fdff54f9b7184dff8679b11ab4ecd08ac663012b ghcr.io/cozystack/cozystack/s3manager:v0.5.0@sha256:6e0a47fb639b27181848d38575577a3cc145486828f50d5fb899e167a3b46c84

View File

@@ -1,6 +1,6 @@
apiVersion: v2 apiVersion: v2
appVersion: 0.19.0 appVersion: 0.17.0
description: Cluster API Operator description: Cluster API Operator
name: cluster-api-operator name: cluster-api-operator
type: application type: application
version: 0.19.0 version: 0.17.0

View File

@@ -1,17 +1,33 @@
# Addon provider # Addon provider
{{- range $name, $addon := $.Values.addon }} {{- if .Values.addon }}
{{- $addonNamespace := default ( printf "%s-%s" $name "addon-system" ) (get $addon "namespace") }} {{- $addons := split ";" .Values.addon }}
{{- $addonName := $name }} {{- $addonNamespace := "" }}
{{- $addonVersion := get $addon "version" }} {{- $addonName := "" }}
{{- $addonVersion := "" }}
{{- range $addon := $addons }}
{{- $addonArgs := split ":" $addon }}
{{- $addonArgsLen := len $addonArgs }}
{{- if eq $addonArgsLen 3 }}
{{- $addonNamespace = $addonArgs._0 }}
{{- $addonName = $addonArgs._1 }}
{{- $addonVersion = $addonArgs._2 }}
{{- else if eq $addonArgsLen 2 }}
{{- $addonNamespace = print $addonArgs._0 "-addon-system" }}
{{- $addonName = $addonArgs._0 }}
{{- $addonVersion = $addonArgs._1 }}
{{- else if eq $addonArgsLen 1 }}
{{- $addonNamespace = print $addonArgs._0 "-addon-system" }}
{{- $addonName = $addonArgs._0 }}
{{- else }}
{{- fail "addon provider argument should have the following format helm:v1.0.0 or mynamespace:helm:v1.0.0" }}
{{- end }}
--- ---
apiVersion: v1 apiVersion: v1
kind: Namespace kind: Namespace
metadata: metadata:
annotations: annotations:
{{- if $.Values.enableHelmHook }}
"helm.sh/hook": "post-install,post-upgrade" "helm.sh/hook": "post-install,post-upgrade"
"helm.sh/hook-weight": "1" "helm.sh/hook-weight": "1"
{{- end }}
"argocd.argoproj.io/sync-wave": "1" "argocd.argoproj.io/sync-wave": "1"
name: {{ $addonNamespace }} name: {{ $addonNamespace }}
--- ---
@@ -21,10 +37,8 @@ metadata:
name: {{ $addonName }} name: {{ $addonName }}
namespace: {{ $addonNamespace }} namespace: {{ $addonNamespace }}
annotations: annotations:
{{- if $.Values.enableHelmHook }}
"helm.sh/hook": "post-install,post-upgrade" "helm.sh/hook": "post-install,post-upgrade"
"helm.sh/hook-weight": "2" "helm.sh/hook-weight": "2"
{{- end }}
"argocd.argoproj.io/sync-wave": "2" "argocd.argoproj.io/sync-wave": "2"
{{- if or $addonVersion $.Values.secretName }} {{- if or $addonVersion $.Values.secretName }}
spec: spec:
@@ -38,24 +52,5 @@ spec:
{{- if $.Values.secretNamespace }} {{- if $.Values.secretNamespace }}
secretNamespace: {{ $.Values.secretNamespace }} secretNamespace: {{ $.Values.secretNamespace }}
{{- end }} {{- end }}
{{- if $addon.manifestPatches }}
manifestPatches: {{ toYaml $addon.manifestPatches | nindent 4 }}
{{- end }} {{- end }}
{{- if $addon.additionalManifests }}
additionalManifests:
name: {{ $addon.additionalManifests.name }}
{{- if $addon.additionalManifests.namespace }}
namespace: {{ $addon.additionalManifests.namespace }}
{{- end }} {{/* if $addon.additionalManifests.namespace */}}
{{- end }} {{- end }}
{{- if $addon.additionalManifests }}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ $addon.additionalManifests.name }}
namespace: {{ default $addonNamespace $addon.additionalManifests.namespace }}
data:
manifests: {{- toYaml $addon.additionalManifests.manifests | nindent 4 }}
{{- end }}
{{- end }} {{/* range $name, $addon := .Values.addon */}}

View File

@@ -1,18 +1,33 @@
# Bootstrap provider # Bootstrap provider
{{- range $name, $bootstrap := $.Values.bootstrap }} {{- if .Values.bootstrap }}
{{- $bootstrapNamespace := default ( printf "%s-%s" $name "bootstrap-system" ) (get $bootstrap "namespace") }} {{- $bootstraps := split ";" .Values.bootstrap }}
{{- $bootstrapName := $name }} {{- $bootstrapNamespace := "" }}
{{- $bootstrapVersion := get $bootstrap "version" }} {{- $bootstrapName := "" }}
{{- $bootstrapVersion := "" }}
{{- range $bootstrap := $bootstraps }}
{{- $bootstrapArgs := split ":" $bootstrap }}
{{- $bootstrapArgsLen := len $bootstrapArgs }}
{{- if eq $bootstrapArgsLen 3 }}
{{- $bootstrapNamespace = $bootstrapArgs._0 }}
{{- $bootstrapName = $bootstrapArgs._1 }}
{{- $bootstrapVersion = $bootstrapArgs._2 }}
{{- else if eq $bootstrapArgsLen 2 }}
{{- $bootstrapNamespace = print $bootstrapArgs._0 "-bootstrap-system" }}
{{- $bootstrapName = $bootstrapArgs._0 }}
{{- $bootstrapVersion = $bootstrapArgs._1 }}
{{- else if eq $bootstrapArgsLen 1 }}
{{- $bootstrapNamespace = print $bootstrapArgs._0 "-bootstrap-system" }}
{{- $bootstrapName = $bootstrapArgs._0 }}
{{- else }}
{{- fail "bootstrap provider argument should have the following format kubeadm:v1.0.0 or mynamespace:kubeadm:v1.0.0" }}
{{- end }}
--- ---
apiVersion: v1 apiVersion: v1
kind: Namespace kind: Namespace
metadata: metadata:
annotations: annotations:
{{- if $.Values.enableHelmHook }}
"helm.sh/hook": "post-install,post-upgrade" "helm.sh/hook": "post-install,post-upgrade"
"helm.sh/hook-weight": "1" "helm.sh/hook-weight": "1"
{{- end }}
"argocd.argoproj.io/sync-wave": "1"
name: {{ $bootstrapNamespace }} name: {{ $bootstrapNamespace }}
--- ---
apiVersion: operator.cluster.x-k8s.io/v1alpha2 apiVersion: operator.cluster.x-k8s.io/v1alpha2
@@ -21,11 +36,8 @@ metadata:
name: {{ $bootstrapName }} name: {{ $bootstrapName }}
namespace: {{ $bootstrapNamespace }} namespace: {{ $bootstrapNamespace }}
annotations: annotations:
{{- if $.Values.enableHelmHook }}
"helm.sh/hook": "post-install,post-upgrade" "helm.sh/hook": "post-install,post-upgrade"
"helm.sh/hook-weight": "2" "helm.sh/hook-weight": "2"
{{- end }}
"argocd.argoproj.io/sync-wave": "2"
{{- if or $bootstrapVersion $.Values.configSecret.name }} {{- if or $bootstrapVersion $.Values.configSecret.name }}
spec: spec:
{{- end}} {{- end}}
@@ -39,24 +51,5 @@ spec:
namespace: {{ $.Values.configSecret.namespace }} namespace: {{ $.Values.configSecret.namespace }}
{{- end }} {{- end }}
{{- end }} {{- end }}
{{- if $bootstrap.manifestPatches }}
manifestPatches: {{ toYaml $bootstrap.manifestPatches | nindent 4 }}
{{- end }} {{- end }}
{{- if $bootstrap.additionalManifests }}
additionalManifests:
name: {{ $bootstrap.additionalManifests.name }}
{{- if $bootstrap.additionalManifests.namespace }}
namespace: {{ $bootstrap.additionalManifests.namespace }}
{{- end }} {{/* if $bootstrap.additionalManifests.namespace */}}
{{- end }} {{- end }}
{{- if $bootstrap.additionalManifests }}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ $bootstrap.additionalManifests.name }}
namespace: {{ default $bootstrapNamespace $bootstrap.additionalManifests.namespace }}
data:
manifests: {{- toYaml $bootstrap.additionalManifests.manifests | nindent 4 }}
{{- end }}
{{- end }} {{/* range $name, $bootstrap := .Values.bootstrap */}}

View File

@@ -1,18 +1,33 @@
# Control plane provider # Control plane provider
{{- range $name, $controlPlane := $.Values.controlPlane }} {{- if .Values.controlPlane }}
{{- $controlPlaneNamespace := default ( printf "%s-%s" $name "control-plane-system" ) (get $controlPlane "namespace") }} {{- $controlPlanes := split ";" .Values.controlPlane }}
{{- $controlPlaneName := $name }} {{- $controlPlaneNamespace := "" }}
{{- $controlPlaneVersion := get $controlPlane "version" }} {{- $controlPlaneName := "" }}
{{- $controlPlaneVersion := "" }}
{{- range $controlPlane := $controlPlanes }}
{{- $controlPlaneArgs := split ":" $controlPlane }}
{{- $controlPlaneArgsLen := len $controlPlaneArgs }}
{{- if eq $controlPlaneArgsLen 3 }}
{{- $controlPlaneNamespace = $controlPlaneArgs._0 }}
{{- $controlPlaneName = $controlPlaneArgs._1 }}
{{- $controlPlaneVersion = $controlPlaneArgs._2 }}
{{- else if eq $controlPlaneArgsLen 2 }}
{{- $controlPlaneNamespace = print $controlPlaneArgs._0 "-control-plane-system" }}
{{- $controlPlaneName = $controlPlaneArgs._0 }}
{{- $controlPlaneVersion = $controlPlaneArgs._1 }}
{{- else if eq $controlPlaneArgsLen 1 }}
{{- $controlPlaneNamespace = print $controlPlaneArgs._0 "-control-plane-system" }}
{{- $controlPlaneName = $controlPlaneArgs._0 }}
{{- else }}
{{- fail "controlplane provider argument should have the following format kubeadm:v1.0.0 or mynamespace:kubeadm:v1.0.0" }}
{{- end }}
--- ---
apiVersion: v1 apiVersion: v1
kind: Namespace kind: Namespace
metadata: metadata:
annotations: annotations:
{{- if $.Values.enableHelmHook }}
"helm.sh/hook": "post-install,post-upgrade" "helm.sh/hook": "post-install,post-upgrade"
"helm.sh/hook-weight": "1" "helm.sh/hook-weight": "1"
{{- end }}
"argocd.argoproj.io/sync-wave": "1"
name: {{ $controlPlaneNamespace }} name: {{ $controlPlaneNamespace }}
--- ---
apiVersion: operator.cluster.x-k8s.io/v1alpha2 apiVersion: operator.cluster.x-k8s.io/v1alpha2
@@ -21,11 +36,8 @@ metadata:
name: {{ $controlPlaneName }} name: {{ $controlPlaneName }}
namespace: {{ $controlPlaneNamespace }} namespace: {{ $controlPlaneNamespace }}
annotations: annotations:
{{- if $.Values.enableHelmHook }}
"helm.sh/hook": "post-install,post-upgrade" "helm.sh/hook": "post-install,post-upgrade"
"helm.sh/hook-weight": "2" "helm.sh/hook-weight": "2"
{{- end }}
"argocd.argoproj.io/sync-wave": "2"
{{- if or $controlPlaneVersion $.Values.configSecret.name $.Values.manager }} {{- if or $controlPlaneVersion $.Values.configSecret.name $.Values.manager }}
spec: spec:
{{- end}} {{- end}}
@@ -52,24 +64,5 @@ spec:
namespace: {{ $.Values.configSecret.namespace }} namespace: {{ $.Values.configSecret.namespace }}
{{- end }} {{- end }}
{{- end }} {{- end }}
{{- if $controlPlane.manifestPatches }}
manifestPatches: {{ toYaml $controlPlane.manifestPatches | nindent 4 }}
{{- end }} {{- end }}
{{- if $controlPlane.additionalManifests }}
additionalManifests:
name: {{ $controlPlane.additionalManifests.name }}
{{- if $controlPlane.additionalManifests.namespace }}
namespace: {{ $controlPlane.additionalManifests.namespace }}
{{- end }} {{/* if $controlPlane.additionalManifests.namespace */}}
{{- end }} {{- end }}
{{- if $controlPlane.additionalManifests }}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ $controlPlane.additionalManifests.name }}
namespace: {{ default $controlPlaneNamespace $controlPlane.additionalManifests.namespace }}
data:
manifests: {{- toYaml $controlPlane.additionalManifests.manifests | nindent 4 }}
{{- end }}
{{- end }} {{/* range $name, $controlPlane := .Values.controlPlane */}}

View File

@@ -1,4 +1,4 @@
{{- if or .Values.addon .Values.bootstrap .Values.controlPlane .Values.infrastructure .Values.ipam }} {{- if or .Values.addon .Values.bootstrap .Values.controlPlane .Values.infrastructure }}
# Deploy core components if not specified # Deploy core components if not specified
{{- if not .Values.core }} {{- if not .Values.core }}
--- ---
@@ -6,11 +6,8 @@ apiVersion: v1
kind: Namespace kind: Namespace
metadata: metadata:
annotations: annotations:
{{- if $.Values.enableHelmHook }}
"helm.sh/hook": "post-install,post-upgrade" "helm.sh/hook": "post-install,post-upgrade"
"helm.sh/hook-weight": "1" "helm.sh/hook-weight": "1"
{{- end }}
"argocd.argoproj.io/sync-wave": "1"
name: capi-system name: capi-system
--- ---
apiVersion: operator.cluster.x-k8s.io/v1alpha2 apiVersion: operator.cluster.x-k8s.io/v1alpha2
@@ -19,11 +16,8 @@ metadata:
name: cluster-api name: cluster-api
namespace: capi-system namespace: capi-system
annotations: annotations:
{{- if $.Values.enableHelmHook }}
"helm.sh/hook": "post-install,post-upgrade" "helm.sh/hook": "post-install,post-upgrade"
"helm.sh/hook-weight": "2" "helm.sh/hook-weight": "2"
{{- end }}
"argocd.argoproj.io/sync-wave": "2"
{{- with .Values.configSecret }} {{- with .Values.configSecret }}
spec: spec:
configSecret: configSecret:
@@ -34,3 +28,4 @@ spec:
{{- end }} {{- end }}
{{- end }} {{- end }}
{{- end }} {{- end }}

View File

@@ -1,18 +1,32 @@
# Core provider # Core provider
{{- range $name, $core := $.Values.core }} {{- if .Values.core }}
{{- $coreNamespace := default "capi-system" (get $core "namespace") }} {{- $coreArgs := split ":" .Values.core }}
{{- $coreName := $name }} {{- $coreArgsLen := len $coreArgs }}
{{- $coreVersion := get $core "version" }} {{- $coreVersion := "" }}
{{- $coreNamespace := "" }}
{{- $coreName := "" }}
{{- $coreVersion := "" }}
{{- if eq $coreArgsLen 3 }}
{{- $coreNamespace = $coreArgs._0 }}
{{- $coreName = $coreArgs._1 }}
{{- $coreVersion = $coreArgs._2 }}
{{- else if eq $coreArgsLen 2 }}
{{- $coreNamespace = "capi-system" }}
{{- $coreName = $coreArgs._0 }}
{{- $coreVersion = $coreArgs._1 }}
{{- else if eq $coreArgsLen 1 }}
{{- $coreNamespace = "capi-system" }}
{{- $coreName = $coreArgs._0 }}
{{- else }}
{{- fail "core provider argument should have the following format cluster-api:v1.0.0 or mynamespace:cluster-api:v1.0.0" }}
{{- end }}
--- ---
apiVersion: v1 apiVersion: v1
kind: Namespace kind: Namespace
metadata: metadata:
annotations: annotations:
{{- if $.Values.enableHelmHook }}
"helm.sh/hook": "post-install,post-upgrade" "helm.sh/hook": "post-install,post-upgrade"
"helm.sh/hook-weight": "1" "helm.sh/hook-weight": "1"
{{- end }}
"argocd.argoproj.io/sync-wave": "1"
name: {{ $coreNamespace }} name: {{ $coreNamespace }}
--- ---
apiVersion: operator.cluster.x-k8s.io/v1alpha2 apiVersion: operator.cluster.x-k8s.io/v1alpha2
@@ -21,10 +35,8 @@ metadata:
name: {{ $coreName }} name: {{ $coreName }}
namespace: {{ $coreNamespace }} namespace: {{ $coreNamespace }}
annotations: annotations:
{{- if $.Values.enableHelmHook }}
"helm.sh/hook": "post-install,post-upgrade" "helm.sh/hook": "post-install,post-upgrade"
"helm.sh/hook-weight": "2" "helm.sh/hook-weight": "2"
{{- end }}
"argocd.argoproj.io/sync-wave": "2" "argocd.argoproj.io/sync-wave": "2"
{{- if or $coreVersion $.Values.configSecret.name $.Values.manager }} {{- if or $coreVersion $.Values.configSecret.name $.Values.manager }}
spec: spec:
@@ -33,8 +45,8 @@ spec:
version: {{ $coreVersion }} version: {{ $coreVersion }}
{{- end }} {{- end }}
{{- if $.Values.manager }} {{- if $.Values.manager }}
{{- if and $.Values.manager.featureGates $.Values.manager.featureGates.core }}
manager: manager:
{{- if and $.Values.manager.featureGates $.Values.manager.featureGates.core }}
featureGates: featureGates:
{{- range $key, $value := $.Values.manager.featureGates.core }} {{- range $key, $value := $.Values.manager.featureGates.core }}
{{ $key }}: {{ $value }} {{ $key }}: {{ $value }}
@@ -48,24 +60,4 @@ spec:
namespace: {{ $.Values.configSecret.namespace }} namespace: {{ $.Values.configSecret.namespace }}
{{- end }} {{- end }}
{{- end }} {{- end }}
{{- if $core.manifestPatches }}
manifestPatches: {{ toYaml $core.manifestPatches | nindent 4 }}
{{- end }} {{- end }}
{{- if $core.additionalManifests }}
additionalManifests:
name: {{ $core.additionalManifests.name }}
{{- if $core.additionalManifests.namespace }}
namespace: {{ $core.additionalManifests.namespace }}
{{- end }}
{{- end }}
{{- if $core.additionalManifests }}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ $core.additionalManifests.name }}
namespace: {{ default $coreNamespace $core.additionalManifests.namespace }}
data:
manifests: {{- toYaml $core.additionalManifests.manifests | nindent 4 }}
{{- end }}
{{- end }} {{/* range $name, $core := .Values.core */}}

View File

@@ -7,10 +7,8 @@ apiVersion: v1
kind: Namespace kind: Namespace
metadata: metadata:
annotations: annotations:
{{- if $.Values.enableHelmHook }}
"helm.sh/hook": "post-install,post-upgrade" "helm.sh/hook": "post-install,post-upgrade"
"helm.sh/hook-weight": "1" "helm.sh/hook-weight": "1"
{{- end }}
"argocd.argoproj.io/sync-wave": "1" "argocd.argoproj.io/sync-wave": "1"
name: capi-kubeadm-bootstrap-system name: capi-kubeadm-bootstrap-system
--- ---
@@ -20,10 +18,8 @@ metadata:
name: kubeadm name: kubeadm
namespace: capi-kubeadm-bootstrap-system namespace: capi-kubeadm-bootstrap-system
annotations: annotations:
{{- if $.Values.enableHelmHook }}
"helm.sh/hook": "post-install,post-upgrade" "helm.sh/hook": "post-install,post-upgrade"
"helm.sh/hook-weight": "2" "helm.sh/hook-weight": "2"
{{- end }}
"argocd.argoproj.io/sync-wave": "2" "argocd.argoproj.io/sync-wave": "2"
{{- with .Values.configSecret }} {{- with .Values.configSecret }}
spec: spec:
@@ -41,10 +37,8 @@ apiVersion: v1
kind: Namespace kind: Namespace
metadata: metadata:
annotations: annotations:
{{- if $.Values.enableHelmHook }}
"helm.sh/hook": "post-install,post-upgrade" "helm.sh/hook": "post-install,post-upgrade"
"helm.sh/hook-weight": "1" "helm.sh/hook-weight": "1"
{{- end }}
"argocd.argoproj.io/sync-wave": "1" "argocd.argoproj.io/sync-wave": "1"
name: capi-kubeadm-control-plane-system name: capi-kubeadm-control-plane-system
--- ---
@@ -54,16 +48,14 @@ metadata:
name: kubeadm name: kubeadm
namespace: capi-kubeadm-control-plane-system namespace: capi-kubeadm-control-plane-system
annotations: annotations:
{{- if $.Values.enableHelmHook }}
"helm.sh/hook": "post-install,post-upgrade" "helm.sh/hook": "post-install,post-upgrade"
"helm.sh/hook-weight": "2" "helm.sh/hook-weight": "2"
{{- end }}
"argocd.argoproj.io/sync-wave": "2" "argocd.argoproj.io/sync-wave": "2"
{{- with .Values.configSecret }} {{- with .Values.configSecret }}
spec: spec:
{{- if $.Values.manager }} {{- if $.Values.manager }}
{{- if and $.Values.manager.featureGates $.Values.manager.featureGates.kubeadm }}
manager: manager:
{{- if and $.Values.manager.featureGates $.Values.manager.featureGates.kubeadm }}
featureGates: featureGates:
{{- range $key, $value := $.Values.manager.featureGates.kubeadm }} {{- range $key, $value := $.Values.manager.featureGates.kubeadm }}
{{ $key }}: {{ $value }} {{ $key }}: {{ $value }}

View File

@@ -1,17 +1,33 @@
# Infrastructure providers # Infrastructure providers
{{- range $name, $infra := $.Values.infrastructure }} {{- if .Values.infrastructure }}
{{- $infrastructureNamespace := default ( printf "%s-%s" $name "infrastructure-system" ) (get $infra "namespace") }} {{- $infrastructures := split ";" .Values.infrastructure }}
{{- $infrastructureName := $name }} {{- $infrastructureNamespace := "" }}
{{- $infrastructureVersion := get $infra "version" }} {{- $infrastructureName := "" }}
{{- $infrastructureVersion := "" }}
{{- range $infrastructure := $infrastructures }}
{{- $infrastructureArgs := split ":" $infrastructure }}
{{- $infrastructureArgsLen := len $infrastructureArgs }}
{{- if eq $infrastructureArgsLen 3 }}
{{- $infrastructureNamespace = $infrastructureArgs._0 }}
{{- $infrastructureName = $infrastructureArgs._1 }}
{{- $infrastructureVersion = $infrastructureArgs._2 }}
{{- else if eq $infrastructureArgsLen 2 }}
{{- $infrastructureNamespace = print $infrastructureArgs._0 "-infrastructure-system" }}
{{- $infrastructureName = $infrastructureArgs._0 }}
{{- $infrastructureVersion = $infrastructureArgs._1 }}
{{- else if eq $infrastructureArgsLen 1 }}
{{- $infrastructureNamespace = print $infrastructureArgs._0 "-infrastructure-system" }}
{{- $infrastructureName = $infrastructureArgs._0 }}
{{- else }}
{{- fail "infrastructure provider argument should have the following format aws:v1.0.0 or mynamespace:aws:v1.0.0" }}
{{- end }}
--- ---
apiVersion: v1 apiVersion: v1
kind: Namespace kind: Namespace
metadata: metadata:
annotations: annotations:
{{- if $.Values.enableHelmHook }}
"helm.sh/hook": "post-install,post-upgrade" "helm.sh/hook": "post-install,post-upgrade"
"helm.sh/hook-weight": "1" "helm.sh/hook-weight": "1"
{{- end }}
"argocd.argoproj.io/sync-wave": "1" "argocd.argoproj.io/sync-wave": "1"
name: {{ $infrastructureNamespace }} name: {{ $infrastructureNamespace }}
--- ---
@@ -21,10 +37,8 @@ metadata:
name: {{ $infrastructureName }} name: {{ $infrastructureName }}
namespace: {{ $infrastructureNamespace }} namespace: {{ $infrastructureNamespace }}
annotations: annotations:
{{- if $.Values.enableHelmHook }}
"helm.sh/hook": "post-install,post-upgrade" "helm.sh/hook": "post-install,post-upgrade"
"helm.sh/hook-weight": "2" "helm.sh/hook-weight": "2"
{{- end }}
"argocd.argoproj.io/sync-wave": "2" "argocd.argoproj.io/sync-wave": "2"
{{- if or $infrastructureVersion $.Values.configSecret.name $.Values.manager $.Values.additionalDeployments }} {{- if or $infrastructureVersion $.Values.configSecret.name $.Values.manager $.Values.additionalDeployments }}
spec: spec:
@@ -33,8 +47,8 @@ spec:
version: {{ $infrastructureVersion }} version: {{ $infrastructureVersion }}
{{- end }} {{- end }}
{{- if $.Values.manager }} {{- if $.Values.manager }}
{{- if and (kindIs "map" $.Values.manager.featureGates) (hasKey $.Values.manager.featureGates $infrastructureName) }}
manager: manager:
{{- if and (kindIs "map" $.Values.manager.featureGates) (hasKey $.Values.manager.featureGates $infrastructureName) }}
{{- range $key, $value := $.Values.manager.featureGates }} {{- range $key, $value := $.Values.manager.featureGates }}
{{- if eq $key $infrastructureName }} {{- if eq $key $infrastructureName }}
featureGates: featureGates:
@@ -65,24 +79,5 @@ spec:
{{- if $.Values.additionalDeployments }} {{- if $.Values.additionalDeployments }}
additionalDeployments: {{ toYaml $.Values.additionalDeployments | nindent 4 }} additionalDeployments: {{ toYaml $.Values.additionalDeployments | nindent 4 }}
{{- end }} {{- end }}
{{- if $infra.manifestPatches }}
manifestPatches: {{- toYaml $infra.manifestPatches | nindent 4 }}
{{- end }} {{/* if $infra.manifestPatches */}}
{{- if $infra.additionalManifests }}
additionalManifests:
name: {{ $infra.additionalManifests.name }}
{{- if $infra.additionalManifests.namespace }}
namespace: {{ $infra.additionalManifests.namespace }}
{{- end }} {{/* if $infra.additionalManifests.namespace */}}
{{- end }} {{/* if $infra.additionalManifests */}}
{{- if $infra.additionalManifests }}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ $infra.additionalManifests.name }}
namespace: {{ default $infrastructureNamespace $infra.additionalManifests.namespace }}
data:
manifests: {{- toYaml $infra.additionalManifests.manifests | nindent 4 }}
{{- end }} {{- end }}
{{- end }} {{/* range $name, $infra := .Values.infrastructure */}} {{- end }}

View File

@@ -1,17 +1,33 @@
# IPAM providers # IPAM providers
{{- range $name, $ipam := $.Values.ipam }} {{- if .Values.ipam }}
{{- $ipamNamespace := default ( printf "%s-%s" $name "ipam-system" ) (get $ipam "namespace") }} {{- $ipams := split ";" .Values.ipam }}
{{- $ipamName := $name }} {{- $ipamNamespace := "" }}
{{- $ipamVersion := get $ipam "version" }} {{- $ipamName := "" }}
{{- $ipamVersion := "" }}
{{- range $ipam := $ipams }}
{{- $ipamArgs := split ":" $ipam }}
{{- $ipamArgsLen := len $ipamArgs }}
{{- if eq $ipamArgsLen 3 }}
{{- $ipamNamespace = $ipamArgs._0 }}
{{- $ipamName = $ipamArgs._1 }}
{{- $ipamVersion = $ipamArgs._2 }}
{{- else if eq $ipamArgsLen 2 }}
{{- $ipamNamespace = print $ipamArgs._0 "-ipam-system" }}
{{- $ipamName = $ipamArgs._0 }}
{{- $ipamVersion = $ipamArgs._1 }}
{{- else if eq $ipamArgsLen 1 }}
{{- $ipamNamespace = print $ipamArgs._0 "-ipam-system" }}
{{- $ipamName = $ipamArgs._0 }}
{{- else }}
{{- fail "ipam provider argument should have the following format in-cluster:v1.0.0 or mynamespace:in-cluster:v1.0.0" }}
{{- end }}
--- ---
apiVersion: v1 apiVersion: v1
kind: Namespace kind: Namespace
metadata: metadata:
annotations: annotations:
{{- if $.Values.enableHelmHook }}
"helm.sh/hook": "post-install,post-upgrade" "helm.sh/hook": "post-install,post-upgrade"
"helm.sh/hook-weight": "1" "helm.sh/hook-weight": "1"
{{- end }}
"argocd.argoproj.io/sync-wave": "1" "argocd.argoproj.io/sync-wave": "1"
name: {{ $ipamNamespace }} name: {{ $ipamNamespace }}
--- ---
@@ -21,10 +37,8 @@ metadata:
name: {{ $ipamName }} name: {{ $ipamName }}
namespace: {{ $ipamNamespace }} namespace: {{ $ipamNamespace }}
annotations: annotations:
{{- if $.Values.enableHelmHook }}
"helm.sh/hook": "post-install,post-upgrade" "helm.sh/hook": "post-install,post-upgrade"
"helm.sh/hook-weight": "2" "helm.sh/hook-weight": "2"
{{- end }}
"argocd.argoproj.io/sync-wave": "2" "argocd.argoproj.io/sync-wave": "2"
{{- if or $ipamVersion $.Values.configSecret.name $.Values.manager $.Values.additionalDeployments }} {{- if or $ipamVersion $.Values.configSecret.name $.Values.manager $.Values.additionalDeployments }}
spec: spec:
@@ -33,8 +47,8 @@ spec:
version: {{ $ipamVersion }} version: {{ $ipamVersion }}
{{- end }} {{- end }}
{{- if $.Values.manager }} {{- if $.Values.manager }}
{{- if and (kindIs "map" $.Values.manager.featureGates) (hasKey $.Values.manager.featureGates $ipamName) }}
manager: manager:
{{- if and (kindIs "map" $.Values.manager.featureGates) (hasKey $.Values.manager.featureGates $ipamName) }}
{{- range $key, $value := $.Values.manager.featureGates }} {{- range $key, $value := $.Values.manager.featureGates }}
{{- if eq $key $ipamName }} {{- if eq $key $ipamName }}
featureGates: featureGates:
@@ -52,27 +66,8 @@ spec:
namespace: {{ $.Values.configSecret.namespace }} namespace: {{ $.Values.configSecret.namespace }}
{{- end }} {{- end }}
{{- end }} {{- end }}
{{- if $ipam.manifestPatches }}
manifestPatches: {{ toYaml $ipam.manifestPatches | nindent 4 }}
{{- end }}
{{- if $.Values.additionalDeployments }} {{- if $.Values.additionalDeployments }}
additionalDeployments: {{ toYaml $.Values.additionalDeployments | nindent 4 }} additionalDeployments: {{ toYaml $.Values.additionalDeployments | nindent 4 }}
{{- end }} {{- end }}
{{- if $ipam.additionalManifests }}
additionalManifests:
name: {{ $ipam.additionalManifests.name }}
{{- if $ipam.additionalManifests.namespace }}
namespace: {{ $ipam.additionalManifests.namespace }}
{{- end }} {{/* if $ipam.additionalManifests.namespace */}}
{{- end }} {{- end }}
{{- if $ipam.additionalManifests }}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ $ipam.additionalManifests.name }}
namespace: {{ default $ipamNamespace $ipam.additionalManifests.namespace }}
data:
manifests: {{- toYaml $ipam.additionalManifests.manifests | nindent 4 }}
{{- end }} {{- end }}
{{- end }} {{/* range $name, $ipam := .Values.ipam */}}

View File

@@ -1305,13 +1305,6 @@ spec:
description: Manager defines the properties that can be enabled description: Manager defines the properties that can be enabled
on the controller manager for the additional provider deployment. on the controller manager for the additional provider deployment.
properties: properties:
additionalArgs:
additionalProperties:
type: string
description: |-
AdditionalArgs is a map of additional options that will be passed
in as container args to the provider's controller manager.
type: object
cacheNamespace: cacheNamespace:
description: |- description: |-
CacheNamespace if specified restricts the manager's cache to watch objects in CacheNamespace if specified restricts the manager's cache to watch objects in
@@ -2843,13 +2836,6 @@ spec:
description: Manager defines the properties that can be enabled on description: Manager defines the properties that can be enabled on
the controller manager for the provider. the controller manager for the provider.
properties: properties:
additionalArgs:
additionalProperties:
type: string
description: |-
AdditionalArgs is a map of additional options that will be passed
in as container args to the provider's controller manager.
type: object
cacheNamespace: cacheNamespace:
description: |- description: |-
CacheNamespace if specified restricts the manager's cache to watch objects in CacheNamespace if specified restricts the manager's cache to watch objects in
@@ -3062,32 +3048,27 @@ spec:
properties: properties:
lastTransitionTime: lastTransitionTime:
description: |- description: |-
lastTransitionTime is the last time the condition transitioned from one status to another. Last time the condition transitioned from one status to another.
This should be when the underlying condition changed. If that is not known, then using the time when This should be when the underlying condition changed. If that is not known, then using the time when
the API field changed is acceptable. the API field changed is acceptable.
format: date-time format: date-time
type: string type: string
message: message:
description: |- description: |-
message is a human readable message indicating details about the transition. A human readable message indicating details about the transition.
This field may be empty. This field may be empty.
maxLength: 10240
minLength: 1
type: string type: string
reason: reason:
description: |- description: |-
reason is the reason for the condition's last transition in CamelCase. The reason for the condition's last transition in CamelCase.
The specific API may choose whether or not this field is considered a guaranteed API. The specific API may choose whether or not this field is considered a guaranteed API.
This field may be empty. This field may be empty.
maxLength: 256
minLength: 1
type: string type: string
severity: severity:
description: |- description: |-
severity provides an explicit classification of Reason code, so the users or machines can immediately severity provides an explicit classification of Reason code, so the users or machines can immediately
understand the current situation and act accordingly. understand the current situation and act accordingly.
The Severity field MUST be set only when Status=False. The Severity field MUST be set only when Status=False.
maxLength: 32
type: string type: string
status: status:
description: status of the condition, one of True, False, Unknown. description: status of the condition, one of True, False, Unknown.
@@ -3097,8 +3078,6 @@ spec:
type of condition in CamelCase or in foo.example.com/CamelCase. type of condition in CamelCase or in foo.example.com/CamelCase.
Many .condition.type values are consistent across resources like Available, but because arbitrary conditions Many .condition.type values are consistent across resources like Available, but because arbitrary conditions
can be useful (see .node.status.conditions), the ability to deconflict is important. can be useful (see .node.status.conditions), the ability to deconflict is important.
maxLength: 256
minLength: 1
type: string type: string
required: required:
- lastTransitionTime - lastTransitionTime
@@ -4732,32 +4711,27 @@ spec:
properties: properties:
lastTransitionTime: lastTransitionTime:
description: |- description: |-
lastTransitionTime is the last time the condition transitioned from one status to another. Last time the condition transitioned from one status to another.
This should be when the underlying condition changed. If that is not known, then using the time when This should be when the underlying condition changed. If that is not known, then using the time when
the API field changed is acceptable. the API field changed is acceptable.
format: date-time format: date-time
type: string type: string
message: message:
description: |- description: |-
message is a human readable message indicating details about the transition. A human readable message indicating details about the transition.
This field may be empty. This field may be empty.
maxLength: 10240
minLength: 1
type: string type: string
reason: reason:
description: |- description: |-
reason is the reason for the condition's last transition in CamelCase. The reason for the condition's last transition in CamelCase.
The specific API may choose whether or not this field is considered a guaranteed API. The specific API may choose whether or not this field is considered a guaranteed API.
This field may be empty. This field may be empty.
maxLength: 256
minLength: 1
type: string type: string
severity: severity:
description: |- description: |-
severity provides an explicit classification of Reason code, so the users or machines can immediately severity provides an explicit classification of Reason code, so the users or machines can immediately
understand the current situation and act accordingly. understand the current situation and act accordingly.
The Severity field MUST be set only when Status=False. The Severity field MUST be set only when Status=False.
maxLength: 32
type: string type: string
status: status:
description: status of the condition, one of True, False, Unknown. description: status of the condition, one of True, False, Unknown.
@@ -4767,8 +4741,6 @@ spec:
type of condition in CamelCase or in foo.example.com/CamelCase. type of condition in CamelCase or in foo.example.com/CamelCase.
Many .condition.type values are consistent across resources like Available, but because arbitrary conditions Many .condition.type values are consistent across resources like Available, but because arbitrary conditions
can be useful (see .node.status.conditions), the ability to deconflict is important. can be useful (see .node.status.conditions), the ability to deconflict is important.
maxLength: 256
minLength: 1
type: string type: string
required: required:
- lastTransitionTime - lastTransitionTime
@@ -6071,13 +6043,6 @@ spec:
description: Manager defines the properties that can be enabled description: Manager defines the properties that can be enabled
on the controller manager for the additional provider deployment. on the controller manager for the additional provider deployment.
properties: properties:
additionalArgs:
additionalProperties:
type: string
description: |-
AdditionalArgs is a map of additional options that will be passed
in as container args to the provider's controller manager.
type: object
cacheNamespace: cacheNamespace:
description: |- description: |-
CacheNamespace if specified restricts the manager's cache to watch objects in CacheNamespace if specified restricts the manager's cache to watch objects in
@@ -7609,13 +7574,6 @@ spec:
description: Manager defines the properties that can be enabled on description: Manager defines the properties that can be enabled on
the controller manager for the provider. the controller manager for the provider.
properties: properties:
additionalArgs:
additionalProperties:
type: string
description: |-
AdditionalArgs is a map of additional options that will be passed
in as container args to the provider's controller manager.
type: object
cacheNamespace: cacheNamespace:
description: |- description: |-
CacheNamespace if specified restricts the manager's cache to watch objects in CacheNamespace if specified restricts the manager's cache to watch objects in
@@ -7828,32 +7786,27 @@ spec:
properties: properties:
lastTransitionTime: lastTransitionTime:
description: |- description: |-
lastTransitionTime is the last time the condition transitioned from one status to another. Last time the condition transitioned from one status to another.
This should be when the underlying condition changed. If that is not known, then using the time when This should be when the underlying condition changed. If that is not known, then using the time when
the API field changed is acceptable. the API field changed is acceptable.
format: date-time format: date-time
type: string type: string
message: message:
description: |- description: |-
message is a human readable message indicating details about the transition. A human readable message indicating details about the transition.
This field may be empty. This field may be empty.
maxLength: 10240
minLength: 1
type: string type: string
reason: reason:
description: |- description: |-
reason is the reason for the condition's last transition in CamelCase. The reason for the condition's last transition in CamelCase.
The specific API may choose whether or not this field is considered a guaranteed API. The specific API may choose whether or not this field is considered a guaranteed API.
This field may be empty. This field may be empty.
maxLength: 256
minLength: 1
type: string type: string
severity: severity:
description: |- description: |-
severity provides an explicit classification of Reason code, so the users or machines can immediately severity provides an explicit classification of Reason code, so the users or machines can immediately
understand the current situation and act accordingly. understand the current situation and act accordingly.
The Severity field MUST be set only when Status=False. The Severity field MUST be set only when Status=False.
maxLength: 32
type: string type: string
status: status:
description: status of the condition, one of True, False, Unknown. description: status of the condition, one of True, False, Unknown.
@@ -7863,8 +7816,6 @@ spec:
type of condition in CamelCase or in foo.example.com/CamelCase. type of condition in CamelCase or in foo.example.com/CamelCase.
Many .condition.type values are consistent across resources like Available, but because arbitrary conditions Many .condition.type values are consistent across resources like Available, but because arbitrary conditions
can be useful (see .node.status.conditions), the ability to deconflict is important. can be useful (see .node.status.conditions), the ability to deconflict is important.
maxLength: 256
minLength: 1
type: string type: string
required: required:
- lastTransitionTime - lastTransitionTime
@@ -9499,32 +9450,27 @@ spec:
properties: properties:
lastTransitionTime: lastTransitionTime:
description: |- description: |-
lastTransitionTime is the last time the condition transitioned from one status to another. Last time the condition transitioned from one status to another.
This should be when the underlying condition changed. If that is not known, then using the time when This should be when the underlying condition changed. If that is not known, then using the time when
the API field changed is acceptable. the API field changed is acceptable.
format: date-time format: date-time
type: string type: string
message: message:
description: |- description: |-
message is a human readable message indicating details about the transition. A human readable message indicating details about the transition.
This field may be empty. This field may be empty.
maxLength: 10240
minLength: 1
type: string type: string
reason: reason:
description: |- description: |-
reason is the reason for the condition's last transition in CamelCase. The reason for the condition's last transition in CamelCase.
The specific API may choose whether or not this field is considered a guaranteed API. The specific API may choose whether or not this field is considered a guaranteed API.
This field may be empty. This field may be empty.
maxLength: 256
minLength: 1
type: string type: string
severity: severity:
description: |- description: |-
severity provides an explicit classification of Reason code, so the users or machines can immediately severity provides an explicit classification of Reason code, so the users or machines can immediately
understand the current situation and act accordingly. understand the current situation and act accordingly.
The Severity field MUST be set only when Status=False. The Severity field MUST be set only when Status=False.
maxLength: 32
type: string type: string
status: status:
description: status of the condition, one of True, False, Unknown. description: status of the condition, one of True, False, Unknown.
@@ -9534,8 +9480,6 @@ spec:
type of condition in CamelCase or in foo.example.com/CamelCase. type of condition in CamelCase or in foo.example.com/CamelCase.
Many .condition.type values are consistent across resources like Available, but because arbitrary conditions Many .condition.type values are consistent across resources like Available, but because arbitrary conditions
can be useful (see .node.status.conditions), the ability to deconflict is important. can be useful (see .node.status.conditions), the ability to deconflict is important.
maxLength: 256
minLength: 1
type: string type: string
required: required:
- lastTransitionTime - lastTransitionTime
@@ -10839,13 +10783,6 @@ spec:
description: Manager defines the properties that can be enabled description: Manager defines the properties that can be enabled
on the controller manager for the additional provider deployment. on the controller manager for the additional provider deployment.
properties: properties:
additionalArgs:
additionalProperties:
type: string
description: |-
AdditionalArgs is a map of additional options that will be passed
in as container args to the provider's controller manager.
type: object
cacheNamespace: cacheNamespace:
description: |- description: |-
CacheNamespace if specified restricts the manager's cache to watch objects in CacheNamespace if specified restricts the manager's cache to watch objects in
@@ -12377,13 +12314,6 @@ spec:
description: Manager defines the properties that can be enabled on description: Manager defines the properties that can be enabled on
the controller manager for the provider. the controller manager for the provider.
properties: properties:
additionalArgs:
additionalProperties:
type: string
description: |-
AdditionalArgs is a map of additional options that will be passed
in as container args to the provider's controller manager.
type: object
cacheNamespace: cacheNamespace:
description: |- description: |-
CacheNamespace if specified restricts the manager's cache to watch objects in CacheNamespace if specified restricts the manager's cache to watch objects in
@@ -12597,32 +12527,27 @@ spec:
properties: properties:
lastTransitionTime: lastTransitionTime:
description: |- description: |-
lastTransitionTime is the last time the condition transitioned from one status to another. Last time the condition transitioned from one status to another.
This should be when the underlying condition changed. If that is not known, then using the time when This should be when the underlying condition changed. If that is not known, then using the time when
the API field changed is acceptable. the API field changed is acceptable.
format: date-time format: date-time
type: string type: string
message: message:
description: |- description: |-
message is a human readable message indicating details about the transition. A human readable message indicating details about the transition.
This field may be empty. This field may be empty.
maxLength: 10240
minLength: 1
type: string type: string
reason: reason:
description: |- description: |-
reason is the reason for the condition's last transition in CamelCase. The reason for the condition's last transition in CamelCase.
The specific API may choose whether or not this field is considered a guaranteed API. The specific API may choose whether or not this field is considered a guaranteed API.
This field may be empty. This field may be empty.
maxLength: 256
minLength: 1
type: string type: string
severity: severity:
description: |- description: |-
severity provides an explicit classification of Reason code, so the users or machines can immediately severity provides an explicit classification of Reason code, so the users or machines can immediately
understand the current situation and act accordingly. understand the current situation and act accordingly.
The Severity field MUST be set only when Status=False. The Severity field MUST be set only when Status=False.
maxLength: 32
type: string type: string
status: status:
description: status of the condition, one of True, False, Unknown. description: status of the condition, one of True, False, Unknown.
@@ -12632,8 +12557,6 @@ spec:
type of condition in CamelCase or in foo.example.com/CamelCase. type of condition in CamelCase or in foo.example.com/CamelCase.
Many .condition.type values are consistent across resources like Available, but because arbitrary conditions Many .condition.type values are consistent across resources like Available, but because arbitrary conditions
can be useful (see .node.status.conditions), the ability to deconflict is important. can be useful (see .node.status.conditions), the ability to deconflict is important.
maxLength: 256
minLength: 1
type: string type: string
required: required:
- lastTransitionTime - lastTransitionTime
@@ -14267,32 +14190,27 @@ spec:
properties: properties:
lastTransitionTime: lastTransitionTime:
description: |- description: |-
lastTransitionTime is the last time the condition transitioned from one status to another. Last time the condition transitioned from one status to another.
This should be when the underlying condition changed. If that is not known, then using the time when This should be when the underlying condition changed. If that is not known, then using the time when
the API field changed is acceptable. the API field changed is acceptable.
format: date-time format: date-time
type: string type: string
message: message:
description: |- description: |-
message is a human readable message indicating details about the transition. A human readable message indicating details about the transition.
This field may be empty. This field may be empty.
maxLength: 10240
minLength: 1
type: string type: string
reason: reason:
description: |- description: |-
reason is the reason for the condition's last transition in CamelCase. The reason for the condition's last transition in CamelCase.
The specific API may choose whether or not this field is considered a guaranteed API. The specific API may choose whether or not this field is considered a guaranteed API.
This field may be empty. This field may be empty.
maxLength: 256
minLength: 1
type: string type: string
severity: severity:
description: |- description: |-
severity provides an explicit classification of Reason code, so the users or machines can immediately severity provides an explicit classification of Reason code, so the users or machines can immediately
understand the current situation and act accordingly. understand the current situation and act accordingly.
The Severity field MUST be set only when Status=False. The Severity field MUST be set only when Status=False.
maxLength: 32
type: string type: string
status: status:
description: status of the condition, one of True, False, Unknown. description: status of the condition, one of True, False, Unknown.
@@ -14302,8 +14220,6 @@ spec:
type of condition in CamelCase or in foo.example.com/CamelCase. type of condition in CamelCase or in foo.example.com/CamelCase.
Many .condition.type values are consistent across resources like Available, but because arbitrary conditions Many .condition.type values are consistent across resources like Available, but because arbitrary conditions
can be useful (see .node.status.conditions), the ability to deconflict is important. can be useful (see .node.status.conditions), the ability to deconflict is important.
maxLength: 256
minLength: 1
type: string type: string
required: required:
- lastTransitionTime - lastTransitionTime
@@ -15606,13 +15522,6 @@ spec:
description: Manager defines the properties that can be enabled description: Manager defines the properties that can be enabled
on the controller manager for the additional provider deployment. on the controller manager for the additional provider deployment.
properties: properties:
additionalArgs:
additionalProperties:
type: string
description: |-
AdditionalArgs is a map of additional options that will be passed
in as container args to the provider's controller manager.
type: object
cacheNamespace: cacheNamespace:
description: |- description: |-
CacheNamespace if specified restricts the manager's cache to watch objects in CacheNamespace if specified restricts the manager's cache to watch objects in
@@ -17144,13 +17053,6 @@ spec:
description: Manager defines the properties that can be enabled on description: Manager defines the properties that can be enabled on
the controller manager for the provider. the controller manager for the provider.
properties: properties:
additionalArgs:
additionalProperties:
type: string
description: |-
AdditionalArgs is a map of additional options that will be passed
in as container args to the provider's controller manager.
type: object
cacheNamespace: cacheNamespace:
description: |- description: |-
CacheNamespace if specified restricts the manager's cache to watch objects in CacheNamespace if specified restricts the manager's cache to watch objects in
@@ -17363,32 +17265,27 @@ spec:
properties: properties:
lastTransitionTime: lastTransitionTime:
description: |- description: |-
lastTransitionTime is the last time the condition transitioned from one status to another. Last time the condition transitioned from one status to another.
This should be when the underlying condition changed. If that is not known, then using the time when This should be when the underlying condition changed. If that is not known, then using the time when
the API field changed is acceptable. the API field changed is acceptable.
format: date-time format: date-time
type: string type: string
message: message:
description: |- description: |-
message is a human readable message indicating details about the transition. A human readable message indicating details about the transition.
This field may be empty. This field may be empty.
maxLength: 10240
minLength: 1
type: string type: string
reason: reason:
description: |- description: |-
reason is the reason for the condition's last transition in CamelCase. The reason for the condition's last transition in CamelCase.
The specific API may choose whether or not this field is considered a guaranteed API. The specific API may choose whether or not this field is considered a guaranteed API.
This field may be empty. This field may be empty.
maxLength: 256
minLength: 1
type: string type: string
severity: severity:
description: |- description: |-
severity provides an explicit classification of Reason code, so the users or machines can immediately severity provides an explicit classification of Reason code, so the users or machines can immediately
understand the current situation and act accordingly. understand the current situation and act accordingly.
The Severity field MUST be set only when Status=False. The Severity field MUST be set only when Status=False.
maxLength: 32
type: string type: string
status: status:
description: status of the condition, one of True, False, Unknown. description: status of the condition, one of True, False, Unknown.
@@ -17398,8 +17295,6 @@ spec:
type of condition in CamelCase or in foo.example.com/CamelCase. type of condition in CamelCase or in foo.example.com/CamelCase.
Many .condition.type values are consistent across resources like Available, but because arbitrary conditions Many .condition.type values are consistent across resources like Available, but because arbitrary conditions
can be useful (see .node.status.conditions), the ability to deconflict is important. can be useful (see .node.status.conditions), the ability to deconflict is important.
maxLength: 256
minLength: 1
type: string type: string
required: required:
- lastTransitionTime - lastTransitionTime
@@ -19034,32 +18929,27 @@ spec:
properties: properties:
lastTransitionTime: lastTransitionTime:
description: |- description: |-
lastTransitionTime is the last time the condition transitioned from one status to another. Last time the condition transitioned from one status to another.
This should be when the underlying condition changed. If that is not known, then using the time when This should be when the underlying condition changed. If that is not known, then using the time when
the API field changed is acceptable. the API field changed is acceptable.
format: date-time format: date-time
type: string type: string
message: message:
description: |- description: |-
message is a human readable message indicating details about the transition. A human readable message indicating details about the transition.
This field may be empty. This field may be empty.
maxLength: 10240
minLength: 1
type: string type: string
reason: reason:
description: |- description: |-
reason is the reason for the condition's last transition in CamelCase. The reason for the condition's last transition in CamelCase.
The specific API may choose whether or not this field is considered a guaranteed API. The specific API may choose whether or not this field is considered a guaranteed API.
This field may be empty. This field may be empty.
maxLength: 256
minLength: 1
type: string type: string
severity: severity:
description: |- description: |-
severity provides an explicit classification of Reason code, so the users or machines can immediately severity provides an explicit classification of Reason code, so the users or machines can immediately
understand the current situation and act accordingly. understand the current situation and act accordingly.
The Severity field MUST be set only when Status=False. The Severity field MUST be set only when Status=False.
maxLength: 32
type: string type: string
status: status:
description: status of the condition, one of True, False, Unknown. description: status of the condition, one of True, False, Unknown.
@@ -19069,8 +18959,6 @@ spec:
type of condition in CamelCase or in foo.example.com/CamelCase. type of condition in CamelCase or in foo.example.com/CamelCase.
Many .condition.type values are consistent across resources like Available, but because arbitrary conditions Many .condition.type values are consistent across resources like Available, but because arbitrary conditions
can be useful (see .node.status.conditions), the ability to deconflict is important. can be useful (see .node.status.conditions), the ability to deconflict is important.
maxLength: 256
minLength: 1
type: string type: string
required: required:
- lastTransitionTime - lastTransitionTime
@@ -20374,13 +20262,6 @@ spec:
description: Manager defines the properties that can be enabled description: Manager defines the properties that can be enabled
on the controller manager for the additional provider deployment. on the controller manager for the additional provider deployment.
properties: properties:
additionalArgs:
additionalProperties:
type: string
description: |-
AdditionalArgs is a map of additional options that will be passed
in as container args to the provider's controller manager.
type: object
cacheNamespace: cacheNamespace:
description: |- description: |-
CacheNamespace if specified restricts the manager's cache to watch objects in CacheNamespace if specified restricts the manager's cache to watch objects in
@@ -21912,13 +21793,6 @@ spec:
description: Manager defines the properties that can be enabled on description: Manager defines the properties that can be enabled on
the controller manager for the provider. the controller manager for the provider.
properties: properties:
additionalArgs:
additionalProperties:
type: string
description: |-
AdditionalArgs is a map of additional options that will be passed
in as container args to the provider's controller manager.
type: object
cacheNamespace: cacheNamespace:
description: |- description: |-
CacheNamespace if specified restricts the manager's cache to watch objects in CacheNamespace if specified restricts the manager's cache to watch objects in
@@ -22132,32 +22006,27 @@ spec:
properties: properties:
lastTransitionTime: lastTransitionTime:
description: |- description: |-
lastTransitionTime is the last time the condition transitioned from one status to another. Last time the condition transitioned from one status to another.
This should be when the underlying condition changed. If that is not known, then using the time when This should be when the underlying condition changed. If that is not known, then using the time when
the API field changed is acceptable. the API field changed is acceptable.
format: date-time format: date-time
type: string type: string
message: message:
description: |- description: |-
message is a human readable message indicating details about the transition. A human readable message indicating details about the transition.
This field may be empty. This field may be empty.
maxLength: 10240
minLength: 1
type: string type: string
reason: reason:
description: |- description: |-
reason is the reason for the condition's last transition in CamelCase. The reason for the condition's last transition in CamelCase.
The specific API may choose whether or not this field is considered a guaranteed API. The specific API may choose whether or not this field is considered a guaranteed API.
This field may be empty. This field may be empty.
maxLength: 256
minLength: 1
type: string type: string
severity: severity:
description: |- description: |-
severity provides an explicit classification of Reason code, so the users or machines can immediately severity provides an explicit classification of Reason code, so the users or machines can immediately
understand the current situation and act accordingly. understand the current situation and act accordingly.
The Severity field MUST be set only when Status=False. The Severity field MUST be set only when Status=False.
maxLength: 32
type: string type: string
status: status:
description: status of the condition, one of True, False, Unknown. description: status of the condition, one of True, False, Unknown.
@@ -22167,8 +22036,6 @@ spec:
type of condition in CamelCase or in foo.example.com/CamelCase. type of condition in CamelCase or in foo.example.com/CamelCase.
Many .condition.type values are consistent across resources like Available, but because arbitrary conditions Many .condition.type values are consistent across resources like Available, but because arbitrary conditions
can be useful (see .node.status.conditions), the ability to deconflict is important. can be useful (see .node.status.conditions), the ability to deconflict is important.
maxLength: 256
minLength: 1
type: string type: string
required: required:
- lastTransitionTime - lastTransitionTime
@@ -23504,13 +23371,6 @@ spec:
description: Manager defines the properties that can be enabled description: Manager defines the properties that can be enabled
on the controller manager for the additional provider deployment. on the controller manager for the additional provider deployment.
properties: properties:
additionalArgs:
additionalProperties:
type: string
description: |-
AdditionalArgs is a map of additional options that will be passed
in as container args to the provider's controller manager.
type: object
cacheNamespace: cacheNamespace:
description: |- description: |-
CacheNamespace if specified restricts the manager's cache to watch objects in CacheNamespace if specified restricts the manager's cache to watch objects in
@@ -25042,13 +24902,6 @@ spec:
description: Manager defines the properties that can be enabled on description: Manager defines the properties that can be enabled on
the controller manager for the provider. the controller manager for the provider.
properties: properties:
additionalArgs:
additionalProperties:
type: string
description: |-
AdditionalArgs is a map of additional options that will be passed
in as container args to the provider's controller manager.
type: object
cacheNamespace: cacheNamespace:
description: |- description: |-
CacheNamespace if specified restricts the manager's cache to watch objects in CacheNamespace if specified restricts the manager's cache to watch objects in
@@ -25261,32 +25114,27 @@ spec:
properties: properties:
lastTransitionTime: lastTransitionTime:
description: |- description: |-
lastTransitionTime is the last time the condition transitioned from one status to another. Last time the condition transitioned from one status to another.
This should be when the underlying condition changed. If that is not known, then using the time when This should be when the underlying condition changed. If that is not known, then using the time when
the API field changed is acceptable. the API field changed is acceptable.
format: date-time format: date-time
type: string type: string
message: message:
description: |- description: |-
message is a human readable message indicating details about the transition. A human readable message indicating details about the transition.
This field may be empty. This field may be empty.
maxLength: 10240
minLength: 1
type: string type: string
reason: reason:
description: |- description: |-
reason is the reason for the condition's last transition in CamelCase. The reason for the condition's last transition in CamelCase.
The specific API may choose whether or not this field is considered a guaranteed API. The specific API may choose whether or not this field is considered a guaranteed API.
This field may be empty. This field may be empty.
maxLength: 256
minLength: 1
type: string type: string
severity: severity:
description: |- description: |-
severity provides an explicit classification of Reason code, so the users or machines can immediately severity provides an explicit classification of Reason code, so the users or machines can immediately
understand the current situation and act accordingly. understand the current situation and act accordingly.
The Severity field MUST be set only when Status=False. The Severity field MUST be set only when Status=False.
maxLength: 32
type: string type: string
status: status:
description: status of the condition, one of True, False, Unknown. description: status of the condition, one of True, False, Unknown.
@@ -25296,8 +25144,6 @@ spec:
type of condition in CamelCase or in foo.example.com/CamelCase. type of condition in CamelCase or in foo.example.com/CamelCase.
Many .condition.type values are consistent across resources like Available, but because arbitrary conditions Many .condition.type values are consistent across resources like Available, but because arbitrary conditions
can be useful (see .node.status.conditions), the ability to deconflict is important. can be useful (see .node.status.conditions), the ability to deconflict is important.
maxLength: 256
minLength: 1
type: string type: string
required: required:
- lastTransitionTime - lastTransitionTime
@@ -26635,13 +26481,6 @@ spec:
description: Manager defines the properties that can be enabled description: Manager defines the properties that can be enabled
on the controller manager for the additional provider deployment. on the controller manager for the additional provider deployment.
properties: properties:
additionalArgs:
additionalProperties:
type: string
description: |-
AdditionalArgs is a map of additional options that will be passed
in as container args to the provider's controller manager.
type: object
cacheNamespace: cacheNamespace:
description: |- description: |-
CacheNamespace if specified restricts the manager's cache to watch objects in CacheNamespace if specified restricts the manager's cache to watch objects in
@@ -28173,13 +28012,6 @@ spec:
description: Manager defines the properties that can be enabled on description: Manager defines the properties that can be enabled on
the controller manager for the provider. the controller manager for the provider.
properties: properties:
additionalArgs:
additionalProperties:
type: string
description: |-
AdditionalArgs is a map of additional options that will be passed
in as container args to the provider's controller manager.
type: object
cacheNamespace: cacheNamespace:
description: |- description: |-
CacheNamespace if specified restricts the manager's cache to watch objects in CacheNamespace if specified restricts the manager's cache to watch objects in
@@ -28393,32 +28225,27 @@ spec:
properties: properties:
lastTransitionTime: lastTransitionTime:
description: |- description: |-
lastTransitionTime is the last time the condition transitioned from one status to another. Last time the condition transitioned from one status to another.
This should be when the underlying condition changed. If that is not known, then using the time when This should be when the underlying condition changed. If that is not known, then using the time when
the API field changed is acceptable. the API field changed is acceptable.
format: date-time format: date-time
type: string type: string
message: message:
description: |- description: |-
message is a human readable message indicating details about the transition. A human readable message indicating details about the transition.
This field may be empty. This field may be empty.
maxLength: 10240
minLength: 1
type: string type: string
reason: reason:
description: |- description: |-
reason is the reason for the condition's last transition in CamelCase. The reason for the condition's last transition in CamelCase.
The specific API may choose whether or not this field is considered a guaranteed API. The specific API may choose whether or not this field is considered a guaranteed API.
This field may be empty. This field may be empty.
maxLength: 256
minLength: 1
type: string type: string
severity: severity:
description: |- description: |-
severity provides an explicit classification of Reason code, so the users or machines can immediately severity provides an explicit classification of Reason code, so the users or machines can immediately
understand the current situation and act accordingly. understand the current situation and act accordingly.
The Severity field MUST be set only when Status=False. The Severity field MUST be set only when Status=False.
maxLength: 32
type: string type: string
status: status:
description: status of the condition, one of True, False, Unknown. description: status of the condition, one of True, False, Unknown.
@@ -28428,8 +28255,6 @@ spec:
type of condition in CamelCase or in foo.example.com/CamelCase. type of condition in CamelCase or in foo.example.com/CamelCase.
Many .condition.type values are consistent across resources like Available, but because arbitrary conditions Many .condition.type values are consistent across resources like Available, but because arbitrary conditions
can be useful (see .node.status.conditions), the ability to deconflict is important. can be useful (see .node.status.conditions), the ability to deconflict is important.
maxLength: 256
minLength: 1
type: string type: string
required: required:
- lastTransitionTime - lastTransitionTime

View File

@@ -1,47 +0,0 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"core": {
"oneOf": [
{ "type": "object" },
{ "type": "null" }
]
},
"bootstrap": {
"type": "object",
"oneOf": [
{ "type": "object" },
{ "type": "null" }
]
},
"controlPlane": {
"type": "object",
"oneOf": [
{ "type": "object" },
{ "type": "null" }
]
},
"infrastructure": {
"type": "object",
"oneOf": [
{ "type": "object" },
{ "type": "null" }
]
},
"addon": {
"type": "object",
"oneOf": [
{ "type": "object" },
{ "type": "null" }
]
},
"ipam": {
"type": "object",
"oneOf": [
{ "type": "object" },
{ "type": "null" }
]
}
}
}

View File

@@ -1,30 +1,12 @@
--- ---
# --- # ---
# Cluster API provider options # Cluster API provider options
core: {} core: ""
# cluster-api: {} # Name, required bootstrap: ""
# namespace: "" # Optional controlPlane: ""
# version: "" # Optional infrastructure: ""
bootstrap: {} ipam: ""
# kubeadm: {} # Name, required addon: ""
# namespace: "" # Optional
# version: "" # Optional
controlPlane: {}
# kubeadm: {} # Name, required
# namespace: "" # Optional
# version: "" # Optional
infrastructure: {}
# docker: {} # Name, required
# namespace: "" # Optional
# version: "" # Optional
addon: {}
# helm: {} # Name, required
# namespace: "" # Optional
# version: "" # Optional
ipam: {}
# in-cluster: {} # Name, required
# namespace: "" # Optional
# version: "" # Optional
manager.featureGates: {} manager.featureGates: {}
fetchConfig: {} fetchConfig: {}
# --- # ---
@@ -39,7 +21,7 @@ leaderElection:
image: image:
manager: manager:
repository: registry.k8s.io/capi-operator/cluster-api-operator repository: registry.k8s.io/capi-operator/cluster-api-operator
tag: v0.19.0 tag: v0.17.0
pullPolicy: IfNotPresent pullPolicy: IfNotPresent
env: env:
manager: [] manager: []
@@ -87,4 +69,3 @@ volumeMounts:
- mountPath: /tmp/k8s-webhook-server/serving-certs - mountPath: /tmp/k8s-webhook-server/serving-certs
name: cert name: cert
readOnly: true readOnly: true
enableHelmHook: true

View File

@@ -5,7 +5,7 @@ metadata:
name: cluster-api name: cluster-api
spec: spec:
# https://github.com/kubernetes-sigs/cluster-api # https://github.com/kubernetes-sigs/cluster-api
version: v1.10.0 version: v1.9.5
--- ---
apiVersion: operator.cluster.x-k8s.io/v1alpha2 apiVersion: operator.cluster.x-k8s.io/v1alpha2
kind: ControlPlaneProvider kind: ControlPlaneProvider
@@ -13,7 +13,7 @@ metadata:
name: kamaji name: kamaji
spec: spec:
# https://github.com/clastix/cluster-api-control-plane-provider-kamaji # https://github.com/clastix/cluster-api-control-plane-provider-kamaji
version: v0.14.2 version: v0.14.1
deployment: deployment:
containers: containers:
- name: manager - name: manager
@@ -21,9 +21,6 @@ spec:
limits: limits:
cpu: "1" cpu: "1"
memory: 1024Mi memory: 1024Mi
requests:
cpu: "10m"
memory: 128Mi
--- ---
apiVersion: operator.cluster.x-k8s.io/v1alpha2 apiVersion: operator.cluster.x-k8s.io/v1alpha2
kind: BootstrapProvider kind: BootstrapProvider
@@ -31,7 +28,7 @@ metadata:
name: kubeadm name: kubeadm
spec: spec:
# https://github.com/kubernetes-sigs/cluster-api # https://github.com/kubernetes-sigs/cluster-api
version: v1.10.0 version: v1.9.5
--- ---
apiVersion: operator.cluster.x-k8s.io/v1alpha2 apiVersion: operator.cluster.x-k8s.io/v1alpha2
kind: InfrastructureProvider kind: InfrastructureProvider
@@ -39,4 +36,4 @@ metadata:
name: kubevirt name: kubevirt
spec: spec:
# https://github.com/kubernetes-sigs/cluster-api-provider-kubevirt # https://github.com/kubernetes-sigs/cluster-api-provider-kubevirt
version: v0.1.10 version: v0.1.9

View File

@@ -79,7 +79,7 @@ annotations:
Pod IP Pool\n description: |\n CiliumPodIPPool defines an IP pool that can Pod IP Pool\n description: |\n CiliumPodIPPool defines an IP pool that can
be used for pooled IPAM (i.e. the multi-pool IPAM mode).\n" be used for pooled IPAM (i.e. the multi-pool IPAM mode).\n"
apiVersion: v2 apiVersion: v2
appVersion: 1.17.3 appVersion: 1.17.1
description: eBPF-based Networking, Security, and Observability description: eBPF-based Networking, Security, and Observability
home: https://cilium.io/ home: https://cilium.io/
icon: https://cdn.jsdelivr.net/gh/cilium/cilium@main/Documentation/images/logo-solo.svg icon: https://cdn.jsdelivr.net/gh/cilium/cilium@main/Documentation/images/logo-solo.svg
@@ -95,4 +95,4 @@ kubeVersion: '>= 1.21.0-0'
name: cilium name: cilium
sources: sources:
- https://github.com/cilium/cilium - https://github.com/cilium/cilium
version: 1.17.3 version: 1.17.1

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