Skip to content

Commit 8c0e4f1

Browse files
jvpasinattoDrFaust92valmiranogueirabogdanjeler-evgkech
authored
K8SPSMDB-1498 Release psmdb 1.22.0 (#774)
* Update PSMDB chart versions for 1.22.0 release * add revisionhistorylimit Signed-off-by: drfaust92 <ilia.lazebnik@gmail.com> * CR comments Signed-off-by: drfaust92 <ilia.lazebnik@gmail.com> * K8SPSMDB-1470: Add CRD sub-chart to enable CRD upgrades (#753) * feat: Add CRD sub-chart for psmdb-operator to enable CRD upgrades - Create psmdb-operator-crds sub-chart with individual CRD templates - Add CRD sub-chart as optional dependency in psmdb-operator Chart.yaml - Add crds.enabled configuration option (default: false for backward compatibility) - Update README with CRD upgrade instructions - Move crds section to end of values.yaml for better organization - Follows Everest pattern for consistency across Percona charts This allows users to: - Upgrade CRDs via helm upgrade (previously not possible) - Install CRDs separately for better lifecycle management - Use with GitOps tools (ArgoCD, FluxCD) that support server-side apply Resolves: K8SPSMDB-1470 * docs: Add documentation for CRD ownership limitation - Add 'Important Limitation' section explaining CRD ownership metadata issue - Add troubleshooting section with exact error messages and solutions - Add warning in operator README about enabling crds.enabled=true with existing CRDs - Provide clear guidance on when and how to take ownership of existing CRDs This helps users understand why enabling crds.enabled=true fails when CRDs were previously installed via the crds/ directory and provides solutions. * chore: Update chart versions to 1.22.0 for release-psmdb-1.22.0 compatibility - Update psmdb-db chart to version 1.22.0 - Update psmdb-operator chart to version 1.22.0 - Update psmdb-operator-crds chart to version 1.22.0 - Update all version references in README files - Update default image tags in values.yaml files * fix: Remove extra blank line in psmdb-operator-crds Chart.yaml * fix: Remove extra blank lines in psmdb-operator-crds values.yaml * fix: Update Chart.lock for psmdb-operator with new CRD chart version * chore: Update app.kubernetes.io/version to v1.22.0 in CRD templates * chore: Add bogdanjeler-ev to psmdb-operator-crds maintainers * fix: Resolve merge conflict in psmdb-operator README.md - Merge revisionHistoryLimit parameter from target branch - Keep maxConcurrentReconciles parameter from feature branch - Remove duplicate podAnnotations entry - Use consistent formatting from target branch * docs: Add bogdanjeler-ev as maintainer to psmdb-operator-crds README * docs: Remove trailing empty lines from psmdb-operator-crds README * fix: Address PR feedback - sync CRDs, remove 'recommended' language, add validation - Sync charts/psmdb-operator/crds/crd.yaml with CRD templates - Remove 'Recommended for Production' language from READMEs (first release) - Add GitHub Action to validate CRD sync on PRs - Add note about default behavior discussion in values.yaml - Ensure CRD files stay in sync for future releases * fix: Remove push trigger from CRD sync check workflow Only run validation on pull requests, not on pushes to main branch. * Add version sync validation to CRD sync check workflow - Validate that psmdb-operator-crds chart version matches operator appVersion - Validate that CRD chart appVersion matches operator appVersion - Validate that dependency version matches CRD chart version - Add clear notes that this rule applies ONLY to psmdb-operator-crds - Other charts (e.g., psmdb-db) can have independent chart versions * Fix CRD sync check: match original format without separators The original crd.yaml file concatenates CRDs directly without '---' separators or newlines between them (format: 'status: {}apiVersion: ...'). - Remove '---' separators when combining templates - Remove trailing newline from each CRD file before concatenating - Handle Windows line endings properly - Update sync instructions to match the correct format * Remove Maintainers section from psmdb-operator-crds README * Fix CRD sync check: remove trailing newline to match original format The original crd.yaml file has no trailing newline at the end. Remove trailing newlines from both files before comparison to ensure they match exactly. * update crds * update maintainers * Add condiotionally revisionHistoryLimit * Fix lint and update CRDs * Fix crd chart test * Fix and simplify CRD sync * K8SPSMDB-1472 pvc auto resize (#763) * K8SPSMDB-1472 pvc auto resize * update the latest cr options * update crds * update crd with new line * Add missing space in comment --------- Co-authored-by: Julio Pasinatto <julio.pasinatto@percona.com> * add minio native example in values.yaml (#765) Signed-off-by: Mayank Shah <mayank.shah@percona.com> Co-authored-by: Julio Pasinatto <julio.pasinatto@percona.com> * K8SPSMDB-1448: add `vault` section (#759) * K8SPSMDB-1448: add `vault` section https://perconadev.atlassian.net/browse/K8SPSMDB-1448 * fix vault template --------- Co-authored-by: Julio Pasinatto <julio.pasinatto@percona.com> * K8SPSMDB-1531: add `hookScript` sections (#758) * K8SPSMDB-1531: add `hookScript` sections https://perconadev.atlassian.net/browse/K8SPSMDB-1531 * remove vim comment --------- Co-authored-by: Julio Pasinatto <julio.pasinatto@percona.com> * K8SPSMDB-1539: add `namespaceOverride` to psmdb operator (#743) https://perconadev.atlassian.net/browse/K8SPSMDB-1539 Co-authored-by: Julio Pasinatto <julio.pasinatto@percona.com> * K8SPSMDB-1418 add ca bundles (#778) * K8SPSMDB-1418 add ca bundles * fix comment spacing * fix more comment spacing --------- Co-authored-by: Julio Pasinatto <julio.pasinatto@percona.com> * update charts and notes * update image versions, cw-rbac and fixes * Add *-operator-crds to exclude list for tests (#801) * K8SPSMDB-1598 Fix replset.arbiter.affinity check (#802) Co-authored-by: Valmira Nogueira Corrêa <valmiranogueira@hotmail.com> * fix: hidden nodes from a replicaset missing serviceAccount option (#768) Co-authored-by: Julio Pasinatto <julio.pasinatto@percona.com> Co-authored-by: Valmira Nogueira Corrêa <valmiranogueira@hotmail.com> * K8SPSMDB-1470: revert dependency between crds and operator charts (#800) * K8SPSMDB-1470: revert dependency between crds and operator charts * Fix description * Extend README --------- Co-authored-by: Valmira Nogueira Corrêa <valmiranogueira@hotmail.com> Co-authored-by: Julio Pasinatto <julio.pasinatto@percona.com> * replace null fields with empty list/dict --------- Signed-off-by: drfaust92 <ilia.lazebnik@gmail.com> Signed-off-by: Mayank Shah <mayank.shah@percona.com> Co-authored-by: drfaust92 <ilia.lazebnik@gmail.com> Co-authored-by: Valmira Nogueira Corrêa <valmiranogueira@hotmail.com> Co-authored-by: bogdanjeler-ev <bogdan.jeler@percona.com> Co-authored-by: George Kechagias <geo.kechagias@gmail.com> Co-authored-by: Mayank Shah <mayankshah1614@gmail.com> Co-authored-by: Andrii Dema <a.dema@jazzserve.com> Co-authored-by: Natalia Marukovich <nmarukovich@gmail.com> Co-authored-by: Eleonora Zinchenko <eleonora.zinchenko@percona.com> Co-authored-by: Gabi Hulea <gabi.hulea@door.com>
1 parent c6d800c commit 8c0e4f1

24 files changed

+27966
-100
lines changed
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
name: PSMDB Operator CRD Sync Check
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- 'charts/psmdb-operator/**'
7+
- 'charts/psmdb-operator-crds/**'
8+
9+
jobs:
10+
check-crd-sync:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v4
15+
16+
- name: Check version sync
17+
run: |
18+
set -e
19+
20+
echo "Checking if chart versions are in sync..."
21+
echo ""
22+
23+
# Extract versions - note: psmdb-operator-crds chart version should match operator appVersion, not chart version
24+
# This rule applies ONLY to psmdb-operator-crds, not to other charts (e.g., psmdb-db can have independent version)
25+
OPERATOR_APP_VERSION=$(grep '^appVersion:' charts/psmdb-operator/Chart.yaml | awk '{print $2}' | tr -d '"')
26+
OPERATOR_CHART_VERSION=$(grep '^version:' charts/psmdb-operator/Chart.yaml | awk '{print $2}' | tr -d '"')
27+
CRD_VERSION=$(grep '^version:' charts/psmdb-operator-crds/Chart.yaml | awk '{print $2}' | tr -d '"')
28+
CRD_APP_VERSION=$(grep '^appVersion:' charts/psmdb-operator-crds/Chart.yaml | awk '{print $2}' | tr -d '"')
29+
30+
echo "Operator chart:"
31+
echo " version: $OPERATOR_CHART_VERSION"
32+
echo " appVersion: $OPERATOR_APP_VERSION"
33+
echo "psmdb-operator-crds chart:"
34+
echo " version: $CRD_VERSION"
35+
echo " appVersion: $CRD_APP_VERSION"
36+
echo "Dependency version: $DEPENDENCY_VERSION"
37+
echo ""
38+
39+
VERSION_SYNC=true
40+
41+
# psmdb-operator-crds chart version should match operator appVersion (CRDs are tied to operator version, not chart version)
42+
# Note: This rule applies ONLY to psmdb-operator-crds, other charts can have independent versions
43+
if [ "$CRD_VERSION" != "$OPERATOR_APP_VERSION" ]; then
44+
echo "✗ psmdb-operator-crds chart version ($CRD_VERSION) does not match operator appVersion ($OPERATOR_APP_VERSION)"
45+
echo " Note: psmdb-operator-crds chart version must match operator appVersion, not operator chart version"
46+
VERSION_SYNC=false
47+
fi
48+
49+
# psmdb-operator-crds appVersion should match operator appVersion
50+
if [ "$CRD_APP_VERSION" != "$OPERATOR_APP_VERSION" ]; then
51+
echo "✗ psmdb-operator-crds chart appVersion ($CRD_APP_VERSION) does not match operator appVersion ($OPERATOR_APP_VERSION)"
52+
VERSION_SYNC=false
53+
fi
54+
55+
56+
if [ "$VERSION_SYNC" = false ]; then
57+
echo ""
58+
echo "Version sync requirements for psmdb-operator-crds (this rule applies ONLY to CRD chart):"
59+
echo " - psmdb-operator-crds chart version = operator appVersion"
60+
echo " - psmdb-operator-crds chart appVersion = operator appVersion"
61+
echo " - Dependency version = psmdb-operator-crds chart version"
62+
echo ""
63+
echo "Note: Other charts (e.g., psmdb-db) can have independent chart versions."
64+
echo ""
65+
echo "Example:"
66+
echo " operator: appVersion=1.30.0, version=1.30.2"
67+
echo " psmdb-operator-crds: appVersion=1.30.0, version=1.30.0"
68+
echo " dependency: version=1.30.0"
69+
exit 1
70+
fi
71+
72+
echo "✓ Chart versions are in sync"
73+
echo ""
74+
75+
- name: Check CRD content sync
76+
run: |
77+
set -e
78+
diff -u \
79+
--label "templates (psmdb-operator-crds)" \
80+
--label "crd.yaml (psmdb-operator)" \
81+
<(sed '/^---$/d' charts/psmdb-operator-crds/templates/*.yaml) \
82+
<(sed '/^---$/d' charts/psmdb-operator/crds/crd.yaml)
83+
84+
echo "✓ CRDs are in sync"
85+

.github/workflows/test.yaml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,14 @@ jobs:
4646
# Only build a kind cluster if there are chart changes to test.
4747
if: steps.list-changed.outputs.changed == 'true'
4848

49-
- name: Run chart-testing (install)
49+
- name: Run db-chart-testing (install)
5050
run: |
5151
echo "Base branch is $GITHUB_BASE_REF"
5252
excluded_charts=("everest")
53+
# Exclude -operator-crds; they are installed in the next step with --take-ownership
54+
while IFS= read -r crd; do [[ -n "$crd" ]] && excluded_charts+=("$crd"); done <<< "$(ct list-changed --config .github/ct.yaml | sed 's:^charts/::' | grep '\-operator-crds$' || true)"
5355
OPERATOR_INSTALL=$(ct list-changed --config .github/ct.yaml | sed -E 's:charts/::' | awk '/(-db|-operator)$/ { sub(/-db$/, "-operator"); print }' | sort -u)
56+
echo "The charts to install: $OPERATOR_INSTALL"
5457
5558
if [ -n "$OPERATOR_INSTALL" ]; then
5659
for operator in $OPERATOR_INSTALL; do
@@ -72,6 +75,7 @@ jobs:
7275
fi
7376
echo "${HELM_ARGS[@]}"
7477
fi
78+
echo "Installing $operator with Helm args: ${HELM_ARGS[@]}"
7579
helm install --namespace default $operator charts/$operator/. --wait --debug "${HELM_ARGS[@]}"
7680
excluded_charts+=($operator)
7781
done
@@ -82,6 +86,16 @@ jobs:
8286
if [ -n "$OPERATOR_INSTALL" ]; then
8387
for operator in $OPERATOR_INSTALL; do helm uninstall --namespace default $operator; done
8488
fi
89+
90+
- name: Run crd-chart-testing (install)
91+
run: |
92+
CRD_INSTALL=$(ct list-changed --config .github/ct.yaml | sed 's:^charts/::' | grep '\-operator-crds$')
93+
if [ -n "$CRD_INSTALL" ]; then
94+
for crd in $CRD_INSTALL; do
95+
helm install --namespace default $crd charts/$crd/. --take-ownership
96+
helm uninstall --namespace default $crd
97+
done
98+
fi
8599
86100
- name: Build chart package
87101
run: |

charts/psmdb-db/Chart.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
apiVersion: v2
2-
appVersion: "1.21.2"
2+
appVersion: "1.22.0"
33
description: A Helm chart for installing Percona Server MongoDB Cluster Databases using the PSMDB Operator.
44
name: psmdb-db
55
home: https://www.percona.com/doc/kubernetes-operator-for-psmongodb/index.html
6-
version: 1.21.2
6+
version: 1.22.0
77
maintainers:
88
- name: nmarukovich
99
email: natalia.marukovich@percona.com
1010
- name: jvpasinatto
1111
email: julio.pasinatto@percona.com
1212
- name: eleo007
1313
email: eleonora.zinchenko@percona.com
14+
- name: valmiranogueira
15+
email: valmira.nogueira@percona.com

0 commit comments

Comments
 (0)