Skip to content

Commit eec0511

Browse files
author
Frederic Spiers
committed
Merge commit '9dd4b92' into fspiers/ENT-3334/incremental-sync-batch-1
2 parents db0a0ed + 9dd4b92 commit eec0511

File tree

83 files changed

+2842
-423
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+2842
-423
lines changed

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ body:
5656
- universal
5757
- clusterpirate
5858
- common
59+
- etcd
5960
- ghost
6061
- keycloak
6162
- mariadb
@@ -68,6 +69,7 @@ body:
6869
- redis
6970
- timescaledb
7071
- valkey
72+
- wordpress
7173
- zookeeper
7274
validations:
7375
required: true

.github/ISSUE_TEMPLATE/feature_request.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ body:
4545
- universal
4646
- clusterpirate
4747
- common
48+
- etcd
4849
- ghost
4950
- keycloak
5051
- mariadb
@@ -57,4 +58,5 @@ body:
5758
- redis
5859
- timescaledb
5960
- valkey
61+
- wordpress
6062
- zookeeper

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
- Describe the scope of your change - i.e. what the change does.
55
- Describe any known limitations with your change.
66
- Please run any tests or examples that can exercise your modified code.
7+
- Labels are automatically applied when they are inside the square brackets of your PR title on opening. Examples:
8+
- [redis]: adds `redis` label
9+
- [redis, valkey] Adds `redis` and `valkey` labels
710
811
Thank you for contributing! We will try to test and integrate the change as soon as we can.
912
-->
@@ -23,6 +26,7 @@
2326
### Applicable issues
2427

2528
<!-- Enter any applicable Issues here (You can reference an issue using #) -->
29+
2630
- fixes #
2731

2832
### Additional information
@@ -33,6 +37,6 @@
3337

3438
<!-- [Place an '[X]' (no spaces) in all applicable fields. Please remove unrelated fields.] -->
3539

36-
- [ ] Chart version bumped in `Chart.yaml` according to [semver](http://semver.org/). This is *not necessary* when the changes only affect README.md files.
40+
- [ ] Chart version bumped in `Chart.yaml` according to [semver](http://semver.org/). This is _not necessary_ when the changes only affect README.md files.
3741
- [ ] Variables are documented in the values.yaml and added to the `README.md`
3842
- [ ] Title of the pull request follows this pattern [<name_of_the_chart>] Descriptive title

.github/workflows/auto-label.yaml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,39 @@ name: Auto-label issues
22
on:
33
issues:
44
types: [opened]
5+
pull_request:
6+
types: [opened]
57

68
jobs:
79
label:
810
runs-on: ubuntu-latest
911
permissions:
1012
issues: write
13+
pull-requests: write
1114
steps:
1215
- name: Apply labels
1316
uses: actions/github-script@v7
1417
with:
1518
script: |
16-
const labels = (context.payload.issue.body.split(/### Affected Helm charts/)[1] || "")
19+
let content = "";
20+
if (context.payload.pull_request) {
21+
const parsedTitle = context.payload.pull_request.title.match(/^\[([a-z_-]+(?:, [a-z_-]+)*)\].+$/);
22+
content = parsedTitle ? parsedTitle[1] : "";
23+
} else {
24+
content = context.payload.issue.body.split(/### Affected Helm charts/)[1] || "";
25+
}
26+
const { data } = await github.rest.issues.listLabelsForRepo({
27+
...context.repo,
28+
per_page: 100,
29+
});
30+
const existingLabels = new Set(data.map((label) => label.name));
31+
const labels = content
1732
.trim()
1833
.split(",")
1934
.map((s) => s.trim())
20-
.filter((s) => s && s !== "_No response_");
35+
.filter((s) => s && existingLabels.has(s));
2136
if (labels.length) {
37+
console.log(`Adding ${labels.length} labels: ${labels.join(', ')}`)
2238
await github.rest.issues.addLabels({
2339
...context.repo,
2440
issue_number: context.issue.number,
Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
name: "Check Signed Commits"
2+
3+
on:
4+
pull_request:
5+
types:
6+
- opened
7+
- synchronize
8+
- reopened
9+
branches:
10+
- main
11+
12+
jobs:
13+
check-signed-commits:
14+
runs-on: ubuntu-latest
15+
permissions:
16+
contents: read
17+
pull-requests: write
18+
issues: write
19+
steps:
20+
- name: Checkout repository
21+
uses: actions/checkout@v5.0.0
22+
with:
23+
fetch-depth: 0
24+
ref: ${{ github.event.pull_request.head.sha }}
25+
26+
- name: Configure Git for SSH signature verification
27+
run: |
28+
# Create a temporary allowed signers file (not used for actual verification)
29+
# This allows git to recognize SSH signatures exist without requiring key validation
30+
touch /tmp/allowed_signers
31+
git config --global gpg.ssh.allowedSignersFile /tmp/allowed_signers
32+
# Configure git to recognize SSH signing format
33+
git config --global gpg.format ssh
34+
35+
- name: Check for verified commits
36+
id: check-commits
37+
run: |
38+
# Get all commits in the PR
39+
git fetch origin ${{ github.event.pull_request.base.ref }}
40+
COMMITS=$(git rev-list origin/${{ github.event.pull_request.base.ref }}..${{ github.event.pull_request.head.sha }})
41+
42+
UNSIGNED_COMMITS=""
43+
UNSIGNED_COUNT=0
44+
TOTAL_COUNT=0
45+
46+
for commit in $COMMITS; do
47+
TOTAL_COUNT=$((TOTAL_COUNT + 1))
48+
# Check if commit is signed (GPG or SSH signature)
49+
# %G? returns signature status
50+
# %GF returns the signing key fingerprint (empty if not signed)
51+
SIGNATURE=$(git log -1 --format='%G?' $commit)
52+
FINGERPRINT=$(git log -1 --format='%GF' $commit)
53+
54+
# %G? returns:
55+
# G = good GPG signature
56+
# U = unverified signature (has signature but can't verify - common for SSH)
57+
# B = bad signature
58+
# N = no signature
59+
# E = signature expired
60+
# Y = good signature (expired key)
61+
62+
# A commit is considered SIGNED if it has any signature present
63+
# We check for a fingerprint to confirm a signature exists
64+
# For SSH signatures, %G? will be "U" but %GF will have the fingerprint
65+
66+
if [[ -z "$FINGERPRINT" ]]; then
67+
# No fingerprint means no signature at all
68+
UNSIGNED_COMMITS="${UNSIGNED_COMMITS}${commit}\n"
69+
UNSIGNED_COUNT=$((UNSIGNED_COUNT + 1))
70+
fi
71+
done
72+
73+
echo "total_commits=${TOTAL_COUNT}" >> $GITHUB_OUTPUT
74+
echo "unsigned_commits=${UNSIGNED_COUNT}" >> $GITHUB_OUTPUT
75+
76+
if [ $UNSIGNED_COUNT -gt 0 ]; then
77+
echo "has_unsigned=true" >> $GITHUB_OUTPUT
78+
else
79+
echo "has_unsigned=false" >> $GITHUB_OUTPUT
80+
fi
81+
82+
- name: Check if comment already exists
83+
if: steps.check-commits.outputs.has_unsigned == 'true'
84+
id: check-comment
85+
env:
86+
GH_TOKEN: ${{ github.token }}
87+
run: |
88+
# Check if our bot has already commented on this PR
89+
COMMENT_EXISTS=$(gh api \
90+
-H "Accept: application/vnd.github+json" \
91+
-H "X-GitHub-Api-Version: 2022-11-28" \
92+
"/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/comments" \
93+
| jq -r '.[] | select(.user.login == "github-actions[bot]" and (.body | contains("⚠️ Unsigned Commits Detected"))) | .id' | head -1)
94+
95+
if [ -n "$COMMENT_EXISTS" ]; then
96+
echo "comment_exists=true" >> $GITHUB_OUTPUT
97+
echo "comment_id=${COMMENT_EXISTS}" >> $GITHUB_OUTPUT
98+
else
99+
echo "comment_exists=false" >> $GITHUB_OUTPUT
100+
fi
101+
102+
- name: Post warning comment
103+
if: steps.check-commits.outputs.has_unsigned == 'true' && steps.check-comment.outputs.comment_exists == 'false'
104+
env:
105+
GH_TOKEN: ${{ github.token }}
106+
run: |
107+
cat << 'EOF' | gh pr comment ${{ github.event.pull_request.number }} --repo ${{ github.repository }} -F -
108+
## ⚠️ Unsigned Commits Detected
109+
110+
This pull request contains unsigned commits.
111+
112+
### What does this mean?
113+
114+
Signed commits help ensure the authenticity and traceability of contributions. They allow us to verify that commits actually came from the stated author, even if GitHub accounts are deleted or modified in the future.
115+
116+
### Current Policy (Grace Period)
117+
118+
**This is currently a warning only.** We are in a transition period to give all contributors time to set up commit signing.
119+
120+
After this grace period, **all commits will be required to be signed** before PRs can be merged.
121+
122+
### How to sign your commits
123+
124+
Please see our [Contributing Guide](../blob/main/CONTRIBUTING.md#setting-up-your-development-environment) for detailed instructions on setting up commit signing.
125+
126+
### Resources
127+
128+
- [Contributing Guide: Development Setup](../blob/main/CONTRIBUTING.md#setting-up-your-development-environment)
129+
- [GitHub Docs: About Commit Signature Verification](https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification)
130+
131+
---
132+
133+
_This check will become mandatory in the future. Please start signing your commits now to avoid issues later._
134+
EOF
135+
136+
- name: Success message
137+
if: steps.check-commits.outputs.has_unsigned == 'false'
138+
run: |
139+
echo "✅ All ${{ steps.check-commits.outputs.total_commits }} commits in this PR are signed!"

CONTRIBUTING.md

Lines changed: 48 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,23 @@ Hi there! We are thrilled that you'd like to contribute to this project. It's pe
66

77
- [Code of Conduct](#code-of-conduct)
88
- [How Can I Contribute?](#how-can-i-contribute)
9+
- [Reporting Bugs](#reporting-bugs)
10+
- [Suggesting Enhancements](#suggesting-enhancements)
11+
- [Types of Contributions We're Looking For](#types-of-contributions-were-looking-for)
912
- [Development Setup](#development-setup)
13+
- [Prerequisites](#prerequisites)
14+
- [Setting Up Your Development Environment](#setting-up-your-development-environment)
1015
- [Contributing Guidelines](#contributing-guidelines)
11-
- [Chart Development Standards](#chart-development-standards)
16+
- [Chart Development Standards](#chart-development-standards)
17+
- [Chart Structure](#chart-structure)
18+
- [Documentation Requirements](#documentation-requirements)
19+
- [Versioning](#versioning)
1220
- [Testing](#testing)
21+
- [Running Tests](#running-tests)
22+
- [Test Requirements](#test-requirements)
23+
- [Manual Testing](#manual-testing)
1324
- [Pull Request Process](#pull-request-process)
25+
- [Pull Request Checklist](#pull-request-checklist)
1426

1527
## Code of Conduct
1628

@@ -22,21 +34,21 @@ This project and everyone participating in it is governed by our [Code of Conduc
2234

2335
Before creating bug reports, please check the existing issues as you might find out that you don't need to create one. When you are creating a bug report, please include as many details as possible:
2436

25-
- **Use a clear and descriptive title**
26-
- **Describe the exact steps to reproduce the problem**
27-
- **Provide specific examples to demonstrate the steps**
28-
- **Describe the behavior you observed and what behavior you expected**
29-
- **Include details about your configuration and environment**
37+
- Use a **clear and descriptive title**
38+
- Describe the **exact steps to reproduce** the problem
39+
- Provide **specific examples** to demonstrate the steps
40+
- Describe the **behavior you observed** and what **behavior you expected**
41+
- Include details about **your configuration and environment**
3042

3143
### Suggesting Enhancements
3244

3345
Enhancement suggestions are tracked as GitHub issues. When creating an enhancement suggestion, please include:
3446

35-
- **Use a clear and descriptive title**
36-
- **Provide a step-by-step description of the suggested enhancement**
37-
- **Provide specific examples to demonstrate the steps**
38-
- **Describe the current behavior and explain which behavior you expected to see**
39-
- **Explain why this enhancement would be useful**
47+
- Use a **clear and descriptive title**
48+
- Provide a **step-by-step description** of the suggested enhancement
49+
- Provide **specific examples** to demonstrate the steps
50+
- Describe the **current behavior** and explain which **behavior you expected** to see
51+
- Explain **why this enhancement would be useful**
4052

4153
### Types of Contributions We're Looking For
4254

@@ -52,40 +64,61 @@ Enhancement suggestions are tracked as GitHub issues. When creating an enhanceme
5264
- Kubernetes 1.24+
5365
- Helm 3.2.0+
5466
- [helm-unittest](https://github.com/helm-unittest/helm-unittest) plugin
67+
- Commits verified by signature
5568

5669
### Setting Up Your Development Environment
5770

5871
1. Fork the repository on GitHub
5972
2. Clone your fork locally:
73+
6074
```bash
6175
git clone https://github.com/your-username/helm-charts.git
6276
cd helm-charts
6377
```
6478

6579
3. Install the helm-unittest plugin:
80+
6681
```bash
6782
helm plugin install https://github.com/helm-unittest/helm-unittest
6883
```
6984

85+
4. Make sure to sign your commits
86+
87+
```bash
88+
git config gpg.format ssh
89+
git config user.signingkey <filePath>
90+
git config commit.gpgsign true
91+
git config tag.gpgsign true
92+
```
93+
94+
Replace `<filePath>` with the path to your public ssh key file, e.g. `~/.ssh/id_ed25519.pub`, wich you use to push to GitHub.
95+
Alternatively, a signing ssh key can be used instead.
96+
If you want to sign commits in every repository, not just this one, add the `--global` parameter.
97+
98+
> More information: [GitHub docs](https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification)
99+
70100
## Contributing Guidelines
71101

72102
### Chart Development Standards
73103

74104
All charts in this repository must follow these standards:
75105

76106
#### Security First
107+
77108
- Implement read-only root filesystems where possible
78109
- Drop unnecessary Linux capabilities
79110
- Configure security contexts properly
80111
- Never hardcode credentials
81112

82113
#### Production Ready
114+
83115
- Include comprehensive health checks (liveness, readiness, startup probes)
84116
- Support resource requests and limits
85117
- Provide persistent storage configurations
86118
- Include health check endpoints
87119

88120
#### Highly Configurable
121+
89122
- Provide extensive `values.yaml` with detailed documentation
90123
- Support existing secrets and ConfigMaps
91124
- Offer flexible ingress configurations
@@ -154,6 +187,7 @@ helm unittest charts/your-chart
154187
### Test Requirements
155188

156189
Your tests should cover:
190+
157191
- Template rendering with default values
158192
- Template rendering with custom values
159193
- Required value validation
@@ -181,13 +215,15 @@ kubectl get all -n test
181215
## Pull Request Process
182216

183217
1. **Branch**: Create a feature branch from `main`
218+
184219
```bash
185220
git checkout -b feature/your-chart-improvement
186221
```
187222

188223
2. **Development**: Make your changes following the guidelines above
189224

190225
3. **Testing**: Run all tests and ensure they pass
226+
191227
```bash
192228
./test-all-charts.sh
193229
helm lint ./charts/your-chart
@@ -196,6 +232,7 @@ kubectl get all -n test
196232
4. **Documentation**: Update documentation as needed
197233

198234
5. **Commit**: Use clear, descriptive commit messages
235+
199236
```bash
200237
git commit -m "[chart-name] Add support for custom annotations"
201238
```

charts/common/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
## 1.1.1 (2025-10-09)
44

5-
* [mongodb] feat: add metrics exporter ([#243](https://github.com/CloudPirates-io/helm-charts/pull/243))
5+
* [mongodb] fix: newline between mongo labels and additional labels ([#301](https://github.com/CloudPirates-io/helm-charts/pull/301))

0 commit comments

Comments
 (0)