Compare commits

..

10 Commits

Author SHA1 Message Date
kklinch0
39b31ca9e5 fix updateStatus field 2025-04-10 14:28:29 +03:00
kklinch0
db7c591957 fix image tag for victorialogs 2025-04-10 14:04:45 +03:00
kklinch0
5baa48022e fix 2025-04-10 11:58:50 +03:00
Andrei Kvapil
1234872bda Upd: Kube-OVN to v1.13.6 2025-04-10 11:58:50 +03:00
Andrei Kvapil
6afb1aad03 Upd: Cilium to v1.17.2
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2025-04-10 11:58:50 +03:00
Andrei Kvapil
ad8e09bb35 Upd: Kamaji to v0.9.2
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2025-04-10 11:58:50 +03:00
Andrei Kvapil
e8faf193eb Upd: Keycloak-operator to v1.25.0
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2025-04-10 11:58:50 +03:00
Andrei Kvapil
2393e3427c Update Cluster-API operator to v0.18.1
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2025-04-10 11:58:50 +03:00
Andrei Kvapil
ddb237718b Upd: victoria-metrics operator to v0.55.0
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2025-04-10 11:58:50 +03:00
Andrei Kvapil
ae619953fb [tests] Fix e2e tests (dependencies and timeouts)
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2025-04-10 11:58:50 +03:00
60 changed files with 127 additions and 612 deletions

2
.github/CODEOWNERS vendored
View File

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

View File

@@ -51,12 +51,12 @@ jobs:
with:
script: |
const branch = context.payload.pull_request.head.ref;
const match = branch.match(/^release-(\d+\.\d+\.\d+(?:[-\w\.]+)?)$/);
const match = branch.match(/^release-(v\d+\.\d+\.\d+(?:[-\w\.]+)?)$/);
if (!match) {
core.setFailed(`Branch '${branch}' does not match expected format 'release-X.Y.Z[-suffix]'`);
core.setFailed(`Branch '${branch}' does not match expected format 'release-vX.Y.Z[-suffix]'`);
} else {
const tag = `v${match[1]}`;
const tag = match[1];
core.setOutput('tag', tag);
console.log(`✅ Extracted tag: ${tag}`);
}
@@ -68,8 +68,8 @@ jobs:
- name: Create tag on merged commit
run: |
git tag ${{ steps.get_tag.outputs.tag }} ${{ github.sha }} --force
git push origin ${{ steps.get_tag.outputs.tag }} --force
git tag ${{ steps.get_tag.outputs.tag }} ${{ github.sha }}
git push origin ${{ steps.get_tag.outputs.tag }}
- name: Publish draft release
uses: actions/github-script@v7

View File

@@ -1,7 +1,6 @@
name: Versioned Tag
on:
# Trigger on push if it includes a tag like vX.Y.Z
push:
tags:
- 'v*.*.*'
@@ -16,7 +15,6 @@ jobs:
pull-requests: write
steps:
# 1) Check if a non-draft release with this tag already exists
- name: Check if release already exists
id: check_release
uses: actions/github-script@v7
@@ -27,6 +25,7 @@ jobs:
owner: context.repo.owner,
repo: context.repo.repo
});
const existing = releases.data.find(r => r.tag_name === tag && !r.draft);
if (existing) {
core.setOutput('skip', 'true');
@@ -34,39 +33,10 @@ jobs:
core.setOutput('skip', 'false');
}
# If a published release already exists, skip the rest of the workflow
- name: Skip if release already exists
if: steps.check_release.outputs.skip == 'true'
run: echo "Release already exists, skipping workflow."
# 2) Determine the base branch from which the tag was pushed
- name: Get base branch
if: steps.check_release.outputs.skip == 'false'
id: get_base
uses: actions/github-script@v7
with:
script: |
/*
For a push event with a tag, GitHub sets context.payload.base_ref
if the tag was pushed from a branch.
If it's empty, we can't determine the correct base branch and must fail.
*/
const baseRef = context.payload.base_ref;
if (!baseRef) {
core.setFailed(`❌ base_ref is empty. Make sure you push the tag from a branch (e.g. 'git push origin HEAD:refs/tags/vX.Y.Z').`);
return;
}
const shortBranch = baseRef.replace("refs/heads/", "");
const releasePattern = /^release-\d+\.\d+$/;
if (shortBranch !== "main" && !releasePattern.test(shortBranch)) {
core.setFailed(`❌ Tagged commit must belong to branch 'main' or 'release-X.Y'. Got '${shortBranch}'`);
return;
}
core.setOutput('branch', shortBranch);
# 3) Checkout full git history and tags
- name: Checkout code
if: steps.check_release.outputs.skip == 'false'
uses: actions/checkout@v4
@@ -74,7 +44,6 @@ jobs:
fetch-depth: 0
fetch-tags: true
# 4) Login to GitHub Container Registry
- name: Login to GitHub Container Registry
if: steps.check_release.outputs.skip == 'false'
uses: docker/login-action@v3
@@ -83,24 +52,21 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}
registry: ghcr.io
# 5) Build project artifacts
- name: Build
if: steps.check_release.outputs.skip == 'false'
run: make build
# 6) Optionally commit built artifacts to the repository
- name: Commit release artifacts
if: steps.check_release.outputs.skip == 'false'
env:
GIT_AUTHOR_NAME: ${{ github.actor }}
GIT_AUTHOR_EMAIL: ${{ github.actor }}@users.noreply.github.com
run: |
git config user.name "github-actions"
git config user.email "github-actions@github.com"
git config user.name "$GIT_AUTHOR_NAME"
git config user.email "$GIT_AUTHOR_EMAIL"
git add .
git commit -m "Prepare release ${GITHUB_REF#refs/tags/}" -s || echo "No changes to commit"
# 7) Create a release branch like release-X.Y.Z
- name: Create release branch
if: steps.check_release.outputs.skip == 'false'
run: |
@@ -108,48 +74,48 @@ jobs:
git branch -f "$BRANCH_NAME"
git push origin "$BRANCH_NAME" --force
# 8) Create a pull request from release-X.Y.Z to the original base branch
- name: Create pull request if not exists
if: steps.check_release.outputs.skip == 'false'
uses: actions/github-script@v7
with:
script: |
const version = context.ref.replace('refs/tags/v', '');
const base = '${{ steps.get_base.outputs.branch }}';
const head = `release-${version}`;
const branch = `release-${version}`;
const base = 'main';
const prs = await github.rest.pulls.list({
owner: context.repo.owner,
repo: context.repo.repo,
head: `${context.repo.owner}:${head}`,
head: `${context.repo.owner}:${branch}`,
base
});
if (prs.data.length === 0) {
const newPr = await github.rest.pulls.create({
owner: context.repo.owner,
repo: context.repo.repo,
head,
base,
head: branch,
base: base,
title: `Release v${version}`,
body:
`This PR prepares the release \`v${version}\`.\n` +
`(Please merge it before releasing draft)`,
draft: false
});
console.log(`Created pull request #${newPr.data.number} from ${head} to ${base}`);
console.log(`Created pull request #${newPr.data.number} from ${branch} to ${base}`);
await github.rest.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: newPr.data.number,
labels: ['release']
labels: ['release', 'ok-to-test']
});
} else {
console.log(`Pull request already exists from ${head} to ${base}`);
console.log(`Pull request already exists from ${branch} to ${base}`);
}
# 9) Create or reuse an existing draft GitHub release for this tag
- name: Create or reuse draft release
if: steps.check_release.outputs.skip == 'false'
id: create_release
@@ -175,21 +141,19 @@ jobs:
}
core.setOutput('upload_url', release.upload_url);
# 10) Build additional assets for the release (if needed)
- name: Build assets
if: steps.check_release.outputs.skip == 'false'
run: make assets
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# 11) Upload assets to the draft release
- name: Upload assets
if: steps.check_release.outputs.skip == 'false'
run: make upload_assets VERSION=${GITHUB_REF#refs/tags/}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# 12) Run tests
- name: Run tests
- name: Delete pushed tag
if: steps.check_release.outputs.skip == 'false'
run: make test
run: |
git push --delete origin ${GITHUB_REF#refs/tags/}

View File

@@ -3,7 +3,7 @@ repos:
hooks:
- id: gen-versions-map
name: Generate versions map and check for changes
entry: sh -c 'set -x && make -C packages/apps check-version-map && make -C packages/extra check-version-map'
entry: sh -c 'make -C packages/apps check-version-map && make -C packages/extra check-version-map'
language: system
types: [file]
pass_filenames: false

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

@@ -357,5 +357,5 @@ kubectl patch -n cozy-system cm/cozystack --type=merge -p '{"data":{
"oidc-enabled": "true"
}}'
timeout 60 sh -c 'until kubectl get hr -n cozy-keycloak keycloak keycloak-configure keycloak-operator; do sleep 1; done'
timeout 120 sh -c 'until kubectl get hr -n cozy-keycloak keycloak keycloak-configure keycloak-operator; do sleep 1; done'
kubectl wait --timeout=10m --for=condition=ready -n cozy-keycloak hr keycloak keycloak-configure keycloak-operator

View File

@@ -30,7 +30,7 @@ resolved_miss_map=$(
fi
# if commit is not HEAD, check if it's valid
if [ "x$commit" != "xHEAD" ]; then
if [ $commit != "HEAD" ]; then
if [ $(git show "${commit}:./${chart}/Chart.yaml" 2>/dev/null | awk '$1 == "version:" {print $2}') != "${version}" ]; then
echo "Commit $commit for $chart $version is not valid" >&2
exit 1

View File

@@ -116,24 +116,15 @@ func (r *WorkloadMonitorReconciler) reconcileServiceForMonitor(
resources := make(map[string]resource.Quantity)
quantity := resource.MustParse("0")
q := resource.MustParse("0")
for _, ing := range svc.Status.LoadBalancer.Ingress {
if ing.IP != "" {
quantity.Add(resource.MustParse("1"))
q.Add(resource.MustParse("1"))
}
}
var resourceLabel string
if svc.Annotations != nil {
var ok bool
resourceLabel, ok = svc.Annotations["metallb.universe.tf/ip-allocated-from-pool"]
if !ok {
resourceLabel = "default"
}
}
resourceLabel = fmt.Sprintf("%s.ipaddresspool.metallb.io/requests.ipaddresses", resourceLabel)
resources[resourceLabel] = quantity
resources["public-ips"] = q
_, err := ctrl.CreateOrUpdate(ctx, r.Client, workload, func() error {
// Update owner references with the new monitor
@@ -174,12 +165,7 @@ func (r *WorkloadMonitorReconciler) reconcilePVCForMonitor(
resources := make(map[string]resource.Quantity)
for resourceName, resourceQuantity := range pvc.Status.Capacity {
storageClass := "default"
if pvc.Spec.StorageClassName != nil || *pvc.Spec.StorageClassName == "" {
storageClass = *pvc.Spec.StorageClassName
}
resourceLabel := fmt.Sprintf("%s.storageclass.storage.k8s.io/requests.%s", storageClass, resourceName.String())
resources[resourceLabel] = resourceQuantity
resources[resourceName.String()] = resourceQuantity
}
_, err := ctrl.CreateOrUpdate(ctx, r.Client, workload, func() error {

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

View File

@@ -1 +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

@@ -32,9 +32,6 @@ spec:
{{ .Release.Name }}-cilium
{{ .Release.Name }}-csi
{{ .Release.Name }}-cert-manager
{{ .Release.Name }}-cert-manager-crds
{{ .Release.Name }}-vertical-pod-autoscaler
{{ .Release.Name }}-vertical-pod-autoscaler-crds
{{ .Release.Name }}-ingress-nginx
{{ .Release.Name }}-fluxcd-operator
{{ .Release.Name }}-fluxcd
@@ -70,9 +67,6 @@ rules:
- {{ .Release.Name }}-cilium
- {{ .Release.Name }}-csi
- {{ .Release.Name }}-cert-manager
- {{ .Release.Name }}-cert-manager-crds
- {{ .Release.Name }}-vertical-pod-autoscaler
- {{ .Release.Name }}-vertical-pod-autoscaler-crds
- {{ .Release.Name }}-ingress-nginx
- {{ .Release.Name }}-fluxcd-operator
- {{ .Release.Name }}-fluxcd

View File

@@ -38,9 +38,9 @@ spec:
- name: {{ .Release.Name }}
namespace: {{ .Release.Namespace }}
{{- end }}
- name: {{ .Release.Name }}-cozy-victoria-metrics-operator
- name: {{ .Release.Name }}-cilium
namespace: {{ .Release.Namespace }}
- name: {{ .Release.Name }}-vertical-pod-autoscaler-crds
- name: {{ .Release.Name }}-cozy-victoria-metrics-operator
namespace: {{ .Release.Namespace }}
values:
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
coztstack.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,69 +0,0 @@
{{- $myNS := lookup "v1" "Namespace" "" .Release.Namespace }}
{{- $targetTenant := index $myNS.metadata.annotations "namespace.cozystack.io/monitoring" }}
{{- 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
coztstack.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:
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
{{- if .Values.addons.verticalPodAutoscaler.valuesOverride }}
valuesFrom:
- kind: Secret
name: {{ .Release.Name }}-vertical-pod-autoscaler-values-override
valuesKey: values
{{- end }}
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

@@ -70,13 +70,6 @@ addons:
enabled: false
valuesOverride: {}
## VerticalPodAutoscaler
##
verticalPodAutoscaler:
## @param addons.verticalPodAutoscaler.valuesOverride Custom values to override
##
valuesOverride: {}
## @section Kamaji control plane
##
kamajiControlPlane:

View File

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

View File

@@ -1,7 +0,0 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: cozy-tenant-configuration-hash
namespace: {{ include "tenant.name" . }}
data:
cozyTenantConfigurationHash: {{ sha256sum (toJson .Values) | quote }}

View File

@@ -46,4 +46,8 @@ spec:
resources: {}
oncall:
enabled: false
{{- if .Values.ingress }}
dependsOn:
- name: ingress
{{- end }}
{{- end }}

View File

@@ -57,9 +57,7 @@ kubernetes 0.15.1 160e4e2a
kubernetes 0.15.2 8267072d
kubernetes 0.16.0 077045b0
kubernetes 0.17.0 1fbbfcd0
kubernetes 0.17.1 fd240701
kubernetes 0.18.0 721c12a7
kubernetes 0.18.1 HEAD
kubernetes 0.17.1 HEAD
mysql 0.1.0 263e47be
mysql 0.2.0 c24a103f
mysql 0.3.0 53f2365e
@@ -130,7 +128,8 @@ tenant 1.6.8 bc95159a
tenant 1.7.0 24fa7222
tenant 1.8.0 160e4e2a
tenant 1.9.0 728743db
tenant 1.9.1 HEAD
tenant 1.9.1 de19450f
tenant 1.9.2 HEAD
virtual-machine 0.1.4 f2015d65
virtual-machine 0.1.5 263e47be
virtual-machine 0.2.0 c0685f43

View File

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

View File

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

View File

@@ -270,10 +270,7 @@ releases:
{{- end }}
{{- end }}
{{- end }}
frontend:
resourcesPreset: "none"
dashboard:
resourcesPreset: "none"
{{- $cozystackBranding:= lookup "v1" "ConfigMap" "cozy-system" "cozystack-branding" }}
{{- $branding := dig "data" "branding" "" $cozystackBranding }}
{{- if $branding }}

View File

@@ -168,10 +168,7 @@ releases:
{{- end }}
{{- end }}
{{- end }}
frontend:
resourcesPreset: "none"
dashboard:
resourcesPreset: "none"
{{- $cozystackBranding:= lookup "v1" "ConfigMap" "cozy-system" "cozystack-branding" }}
{{- $branding := dig "data" "branding" "" $cozystackBranding }}
{{- if $branding }}

View File

@@ -54,12 +54,6 @@ spec:
namespace: cozy-public
values:
host: "{{ $host }}"
valuesFrom:
- kind: ConfigMap
name: "cozy-system-configuration-hash"
valuesKey: "cozyTenantConfigurationHash"
targetPath: "cozyTenantConfigurationHash"
optional: true
dependsOn:
{{- range $x := $bundle.releases }}
{{- if has $x.name (list "cilium" "kubeovn") }}

View File

@@ -1,14 +0,0 @@
{{- $rootTenantConfiguration := dict "values" .Values }}
{{- $cozyConfig := index (lookup "v1" "ConfigMap" "cozy-system" "cozystack" ) "data" }}
{{- $cozyScheduling := index (lookup "v1" "ConfigMap" "cozy-system" "cozystack-scheduling") "data" }}
{{- $cozyBranding := index (lookup "v1" "ConfigMap" "cozy-system" "cozystack-branding" ) "data" }}
{{- $_ := set $rootTenantConfiguration "config" $cozyConfig }}
{{- $_ := set $rootTenantConfiguration "scheduling" $cozyScheduling }}
{{- $_ := set $rootTenantConfiguration "branding" $cozyBranding }}
apiVersion: v1
kind: ConfigMap
metadata:
name: cozy-system-configuration-hash
namespace: tenant-root
data:
cozyTenantConfigurationHash: {{ sha256sum (toJson $rootTenantConfiguration) | quote }}

View File

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

View File

@@ -2,7 +2,7 @@ NAMESPACE=cozy-e2e-tests
NAME := sandbox
CLEAN := 1
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))/../../..))

View File

@@ -1,2 +1,2 @@
e2e:
image: ghcr.io/cozystack/cozystack/e2e-sandbox:v0.30.2@sha256:31273d6b42dc88c2be2ff9ba64564d1b12e70ae8a5480953341b0d113ac7d4bd
image: ghcr.io/cozystack/cozystack/e2e-sandbox:v0.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: monitoring
description: Monitoring and observability stack
icon: /logos/monitoring.svg
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

@@ -34,8 +34,7 @@ monitoring 1.7.0 2a976afe
monitoring 1.8.0 8c460528
monitoring 1.8.1 8267072d
monitoring 1.9.0 45a7416c
monitoring 1.9.1 fd240701
monitoring 1.9.2 HEAD
monitoring 1.9.1 HEAD
seaweedfs 0.1.0 71514249
seaweedfs 0.2.0 5fb9cfe3
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

@@ -21,9 +21,6 @@ spec:
limits:
cpu: "1"
memory: 1024Mi
requests:
cpu: "10m"
memory: 128Mi
---
apiVersion: operator.cluster.x-k8s.io/v1alpha2
kind: BootstrapProvider

View File

@@ -14,7 +14,7 @@ cilium:
mode: "kubernetes"
image:
repository: ghcr.io/cozystack/cozystack/cilium
tag: 1.17.2
digest: "sha256:bc6a8ec326188960ac36584873e07801bcbc56cb862e2ec8bf87a7926f66abf1"
tag: 1.17.1
digest: "sha256:ac154cd13711444f9fd1a7c6e947f504c769cc654039b93630ccc0479111f2a3"
envoy:
enabled: false

View File

@@ -1,2 +1,2 @@
cozystackAPI:
image: ghcr.io/cozystack/cozystack/cozystack-api:v0.30.2@sha256:7ef370dc8aeac0a6b2a50b7d949f070eb21d267ba0a70e7fc7c1564bfe6d4f83
image: ghcr.io/cozystack/cozystack/cozystack-api:v0.29.1@sha256:3ce1cd4a9c74999b08ee477811bdc048a8b3fc79f214d92db2e81bb3ae0bd516

View File

@@ -1,5 +1,5 @@
cozystackController:
image: ghcr.io/cozystack/cozystack/cozystack-controller:v0.30.2@sha256:5b87a8ea0dcde1671f44532c1ee6db11a5dd922d1a009078ecf6495ec193e52a
image: ghcr.io/cozystack/cozystack/cozystack-controller:v0.29.1@sha256:e06f651a70268d0151c8d475cc1c002a66bb6e60cce7cbe7408403054ed167f7
debug: false
disableTelemetry: false
cozystackVersion: "v0.30.2"
cozystackVersion: "v0.29.1"

View File

@@ -76,7 +76,7 @@ data:
"kubeappsNamespace": {{ .Release.Namespace | quote }},
"helmGlobalNamespace": {{ include "kubeapps.helmGlobalPackagingNamespace" . | quote }},
"carvelGlobalNamespace": {{ .Values.kubeappsapis.pluginConfig.kappController.packages.v1alpha1.globalPackagingNamespace | quote }},
"appVersion": "v0.30.2",
"appVersion": "v0.29.1",
"authProxyEnabled": {{ .Values.authProxy.enabled }},
"oauthLoginURI": {{ .Values.authProxy.oauthLoginURI | quote }},
"oauthLogoutURI": {{ .Values.authProxy.oauthLogoutURI | quote }},

View File

@@ -1,80 +0,0 @@
apiVersion: autoscaling.k8s.io/v1
kind: VerticalPodAutoscaler
metadata:
name: dashboard-internal-dashboard
namespace: cozy-dashboard
spec:
targetRef:
apiVersion: "apps/v1"
kind: Deployment
name: dashboard-internal-dashboard
updatePolicy:
updateMode: "Auto"
resourcePolicy:
containerPolicies:
- containerName: dashboard
controlledResources: ["cpu", "memory"]
minAllowed:
cpu: 50m
memory: 64Mi
maxAllowed:
cpu: 500m
memory: 512Mi
---
apiVersion: autoscaling.k8s.io/v1
kind: VerticalPodAutoscaler
metadata:
name: dashboard-internal-kubeappsapis
namespace: cozy-dashboard
spec:
targetRef:
apiVersion: "apps/v1"
kind: Deployment
name: dashboard-internal-kubeappsapis
updatePolicy:
updateMode: "Auto"
resourcePolicy:
containerPolicies:
- containerName: kubeappsapis
controlledResources: ["cpu", "memory"]
minAllowed:
cpu: 50m
memory: 100Mi
maxAllowed:
cpu: 1000m
memory: 1Gi
---
apiVersion: autoscaling.k8s.io/v1
kind: VerticalPodAutoscaler
metadata:
name: dashboard-vpa
namespace: cozy-dashboard
spec:
targetRef:
apiVersion: "apps/v1"
kind: Deployment
name: dashboard
updatePolicy:
updateMode: "Auto"
resourcePolicy:
containerPolicies:
- containerName: nginx
controlledResources: ["cpu", "memory"]
minAllowed:
cpu: "50m"
memory: "64Mi"
maxAllowed:
cpu: "500m"
memory: "512Mi"
{{- $dashboardKCconfig := lookup "v1" "ConfigMap" "cozy-dashboard" "kubeapps-auth-config" }}
{{- $dashboardKCValues := dig "data" "values.yaml" "" $dashboardKCconfig }}
{{- if $dashboardKCValues }}
- containerName: auth-proxy
controlledResources: ["cpu", "memory"]
minAllowed:
cpu: "50m"
memory: "64Mi"
maxAllowed:
cpu: "500m"
memory: "512Mi"
{{- end }}

View File

@@ -15,19 +15,17 @@ kubeapps:
flux:
enabled: true
dashboard:
resourcesPreset: "none"
image:
registry: ghcr.io/cozystack/cozystack
repository: dashboard
tag: v0.30.2
tag: v0.29.1
digest: "sha256:a83fe4654f547469cfa469a02bda1273c54bca103a41eb007fdb2e18a7a91e93"
kubeappsapis:
resourcesPreset: "none"
image:
registry: ghcr.io/cozystack/cozystack
repository: kubeapps-apis
tag: v0.30.2
digest: "sha256:3b5805b56f2fb9fd25f4aa389cdfbbb28a3f2efb02245c52085a45d1dc62bf92"
tag: v0.29.1
digest: "sha256:8cc327760c33a15022b847d3fa8d22b87891e17a74dc56f50f52cae032a81d8c"
pluginConfig:
flux:
packages:

View File

@@ -3,7 +3,7 @@ kamaji:
deploy: false
image:
pullPolicy: IfNotPresent
tag: v0.30.2@sha256:e04f68e4cc5b023ed39ce2242b32aee51f97235371602239d0c4a9cea97c8d0d
tag: v0.29.1@sha256:8a1c6c6fe8b680aa48e909ad274ccf97bfcae20729f331e10b0d83038ec972cf
repository: ghcr.io/cozystack/cozystack/kamaji
resources:
limits:

View File

@@ -216,7 +216,6 @@ data:
values.yaml: |
kubeapps:
authProxy:
resourcesPreset: "none"
enabled: true
provider: "oidc"
clientID: "kubeapps"

View File

@@ -1,3 +1,3 @@
portSecurity: true
routes: ""
image: ghcr.io/cozystack/cozystack/kubeovn-webhook:v0.30.2@sha256:fa14fa7a0ffa628eb079ddcf6ce41d75b43de92e50f489422f8fb15c4dab2dbf
image: ghcr.io/cozystack/cozystack/kubeovn-webhook:v0.29.1@sha256:03c677712fc07b960cd824fb4595e3919473b483d9a0d76578e2b6a7aba12415

View File

@@ -1,4 +1,4 @@
KUBEOVN_TAG = v1.13.8
KUBEOVN_TAG = v1.13.6
export NAME=kubeovn
export NAMESPACE=cozy-$(NAME)

View File

@@ -15,12 +15,12 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: v1.13.8
version: v1.13.6
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "1.13.8"
appVersion: "1.13.6"
kubeVersion: ">= 1.23.0-0"

View File

@@ -10,7 +10,7 @@ global:
repository: kube-ovn
dpdkRepository: kube-ovn-dpdk
vpcRepository: vpc-nat-gateway
tag: v1.13.8
tag: v1.13.6
support_arm: true
thirdparty: true

View File

@@ -1,10 +1,10 @@
# syntax = docker/dockerfile:experimental
ARG VERSION=v1.13.8
ARG VERSION=v1.13.6
ARG BASE_TAG=$VERSION
FROM golang:1.23-bookworm as builder
ARG TAG=v1.13.8
ARG TAG=v1.13.6
RUN git clone --branch ${TAG} --depth 1 https://github.com/kubeovn/kube-ovn /source
WORKDIR /source

View File

@@ -22,4 +22,4 @@ global:
images:
kubeovn:
repository: kubeovn
tag: v1.13.8@sha256:071a93df2dce484b347bbace75934ca9e1743668bfe6f1161ba307dee204767d
tag: v1.13.3@sha256:4e3a9c1b477f12257f509b2bdfb96d2bcf5fcd935d2e4a787e44ab7833121d72

View File

@@ -1,29 +1,19 @@
{{- if .Values.scrapeRules.etcd.enabled }}
---
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: kube-rbac-proxy
namespace: cozy-monitoring
labels:
app.kubernetes.io/name: etcd
app.kubernetes.io/instance: etcd
app.kubernetes.io/part-of: control-plane
app.kubernetes.io/component: kube-rbac-proxy
app: kube-rbac-proxy
spec:
selector:
matchLabels:
app.kubernetes.io/name: etcd
app.kubernetes.io/instance: etcd
app.kubernetes.io/part-of: control-plane
app.kubernetes.io/component: kube-rbac-proxy
app: kube-rbac-proxy
template:
metadata:
labels:
app.kubernetes.io/name: etcd
app.kubernetes.io/instance: etcd
app.kubernetes.io/part-of: control-plane
app.kubernetes.io/component: kube-rbac-proxy
app: kube-rbac-proxy
spec:
serviceAccountName: kube-rbac-proxy
hostNetwork: true
@@ -48,6 +38,7 @@ spec:
runAsNonRoot: true
---
apiVersion: v1
kind: ServiceAccount
metadata:
@@ -55,6 +46,7 @@ metadata:
namespace: cozy-monitoring
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
@@ -68,6 +60,7 @@ rules:
verbs: ["create"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
@@ -82,6 +75,15 @@ subjects:
namespace: cozy-monitoring
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: vm-scrape
namespace: cozy-monitoring
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
@@ -91,6 +93,7 @@ rules:
verbs: ["get"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
@@ -101,10 +104,21 @@ roleRef:
name: etcd-metrics-reader
subjects:
- kind: ServiceAccount
name: vmagent-vmagent
name: vm-scrape
namespace: cozy-monitoring
---
apiVersion: v1
kind: Secret
type: kubernetes.io/service-account-token
metadata:
name: vm-token
annotations:
kubernetes.io/service-account.name: vm-scrape
---
apiVersion: operator.victoriametrics.com/v1beta1
kind: VMPodScrape
metadata:
@@ -115,11 +129,10 @@ spec:
scheme: https
tlsConfig:
insecureSkipVerify: true
bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token
bearerTokenSecret:
name: vm-token
key: token
selector:
matchLabels:
app.kubernetes.io/name: etcd
app.kubernetes.io/instance: etcd
app.kubernetes.io/part-of: control-plane
app.kubernetes.io/component: kube-rbac-proxy
app: kube-rbac-proxy
{{- end }}

View File

@@ -20,8 +20,12 @@ spec:
additionalScrapeConfigs:
name: additional-scrape-configs
key: prometheus-additional.yaml
resources: {}
configReloaderResources: {}
resources:
limits:
memory: 1024Mi
requests:
cpu: 50m
memory: 768Mi
#statefulMode: true
#statefulStorage:
# volumeClaimTemplate:

View File

@@ -21,12 +21,6 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
const (
CozySystemConfigurationHashConfigMapName = "cozy-system-configuration-hash"
CozyTenantConfigurationHashConfigMapName = "cozy-tenant-configuration-hash"
CozyTenantConfigurationHashKey = "cozyTenantConfigurationHash"
)
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// ApplicationList is a list of Application objects.

View File

@@ -988,18 +988,6 @@ func (r *REST) convertApplicationToHelmRelease(app *appsv1alpha1.Application) (*
},
}
valuesFromConfigMap := appsv1alpha1.CozyTenantConfigurationHashConfigMapName
if helmRelease.Name == "tenant-root" && helmRelease.Namespace == "tenant-root" {
valuesFromConfigMap = appsv1alpha1.CozySystemConfigurationHashConfigMapName
}
helmRelease.Spec.ValuesFrom = []helmv2.ValuesReference{{
Kind: "ConfigMap",
Name: valuesFromConfigMap,
ValuesKey: appsv1alpha1.CozyTenantConfigurationHashKey,
TargetPath: appsv1alpha1.CozyTenantConfigurationHashKey,
Optional: true,
}}
return helmRelease, nil
}

View File

@@ -3,7 +3,7 @@ set -o pipefail
set -e
BUNDLE=$(set -x; kubectl get configmap -n cozy-system cozystack -o 'go-template={{index .data "bundle-name"}}')
VERSION=$(find scripts/migrations -mindepth 1 -maxdepth 1 -type f | sort -V | awk -F/ 'END {print $NF+1}')
VERSION=10
run_migrations() {
if ! kubectl get configmap -n cozy-system cozystack-version; then
@@ -70,7 +70,7 @@ make -C packages/core/platform namespaces-apply
ensure_fluxcd
# Install platform chart
make -C packages/core/platform reconcile
make -C packages/core/platform apply
# Install basic charts
if ! flux_is_ok; then
@@ -93,5 +93,5 @@ done
trap 'exit' INT TERM
while true; do
sleep 60 & wait
make -C packages/core/platform reconcile
make -C packages/core/platform apply
done

View File

@@ -1,15 +0,0 @@
#!/bin/sh
# Migration 10 --> 11
# Force reconcile hr keycloak-configure
if kubectl get helmrelease keycloak-configure -n cozy-keycloak; then
kubectl delete po -l app=source-controller -n cozy-fluxcd
timestamp=$(date --rfc-3339=ns)
kubectl annotate helmrelease keycloak-configure -n cozy-keycloak \
reconcile.fluxcd.io/forceAt="$timestamp" \
reconcile.fluxcd.io/requestedAt="$timestamp" \
--overwrite
fi
# Write version to cozystack-version config
kubectl create configmap -n cozy-system cozystack-version --from-literal=version=11 --dry-run=client -o yaml | kubectl apply -f-

View File

@@ -1,21 +0,0 @@
#!/bin/sh
# Migration 11 --> 12
# Recreate daemonset kube-rbac-proxy
if kubectl get daemonset kube-rbac-proxy -n cozy-monitoring; then
kubectl delete daemonset kube-rbac-proxy --cascade=orphan -n cozy-monitoring
fi
if kubectl get helmrelease monitoring-agents -n cozy-monitoring; then
timestamp=$(date --rfc-3339=ns)
kubectl annotate helmrelease monitoring-agents -n cozy-monitoring \
reconcile.fluxcd.io/forceAt="$timestamp" \
reconcile.fluxcd.io/requestedAt="$timestamp" \
--overwrite
fi
kubectl delete pods -l app.kubernetes.io/component=kube-rbac-proxy -n cozy-monitoring
# Write version to cozystack-version config
kubectl create configmap -n cozy-system cozystack-version --from-literal=version=12 --dry-run=client -o yaml | kubectl apply -f-