The owner/helm-charts repository is a fork/mirror of the bjw-s-labs/helm-charts repository. The owner version should closely track the upstream bjw-s-labs version to benefit from bug fixes and improvements, while allowing for customizations specific to the owner organization.
- Upstream (Source):
https://github.com/bjw-s-labs/helm-charts - Fork (Owner):
https://github.com/owner/helm-charts - Remote References:
upstream: Points tobjw-s-labs/helm-charts(fetch-only)origin: Points toowner/helm-charts(your working remote)
If you haven't already configured the upstream remote:
# Add upstream remote (if not already present)
git remote add upstream https://github.com/bjw-s-labs/helm-charts.git
git fetch upstreamThis approach brings in upstream changes while preserving owner customizations.
# Update upstream refs
git fetch upstream
# Create a sync branch
git checkout -b sync/upstream-main
# Merge upstream/main into your current branch
git merge upstream/main --no-edit
# Resolve conflicts if any
# (Owner-specific URLs and references should be preserved)
# Test the changes
# - Run linting: just lint
# - Run tests: just test
# - Validate charts can be built
# Push and create PR for review
git push origin sync/upstream-main
gh pr create --title "chore: Sync upstream bjw-s-labs changes" \
--body "$(cat <<'EOF'
## Summary
Merge recent changes from upstream bjw-s-labs/helm-charts repository.
## Changes Included
- [List key changes from upstream]
## Testing
- [x] Linting passed
- [x] Tests passed
- [x] Charts build successfully
## Conflicts Resolved
If any conflicts were present, they have been resolved while preserving owner customizations.
EOF
)"
# After approval and merge, push to upstream
git checkout main
git pull origin main
git pushThis keeps the commit history cleaner but is riskier with customizations.
git fetch upstream
git checkout -b sync/upstream-rebase
git rebase upstream/main
# Resolve conflicts
# Test thoroughly
git push origin sync/upstream-rebaseWhen merging upstream changes, you may encounter conflicts. Here's how to handle them:
Upstream Format: https://bjw-s-labs.github.io/helm-charts
Owner Format: https://owner.github.io/helm-charts
Action: Keep owner format in Chart.yaml and values.schema.json files
# Keep this:
repository: https://owner.github.io/helm-charts
# Not this:
repository: https://bjw-s-labs.github.io/helm-chartsIf upstream bumps a dependency version and owner has a different version in use:
- Merge upstream version first
- Create a follow-up PR if owner needs different version
- Document the reason in the PR description
Upstream Format:
annotations:
artifacthub.io/changes: |-
- kind: changed
description: |-
Update common library to v4.6.3Owner Strategy:
- Keep upstream changelog entries as-is
- Add owner-specific entries for owner customizations
- Document org migration in entries if applicable
When upstream releases a new version (e.g., common-4.6.3):
-
Fetch the tag:
git fetch upstream refs/tags/common-4.6.3:refs/tags/upstream-common-4.6.3
-
Create owner version of the tag (if owner version is different):
git tag -a common-4.6.3 -m "Release common library v4.6.3 (owner)" <commit-hash> git push origin common-4.6.3
-
Update schema references to point to owner releases:
charts/library/common/values.schema.json- Any schema files referencing the common library
# 1. Fetch upstream
git fetch upstream
# 2. Check what changed
git log --oneline upstream/main..main
# 3. Merge the bug fix
git checkout main
git merge upstream/main
git push origin main# 1. Create feature branch
git checkout -b feature/sync-upstream
# 2. Merge upstream (may have conflicts)
git merge upstream/main
# 3. Resolve conflicts - preserve owner customizations
# For each conflict, decide:
# - Keep owner version (org URLs, specific versions)
# - Take upstream version (bug fixes, features)
# - Combine both (add owner-specific entries to changelog)
# 4. Verify no conflicts remain
git status
# 5. Test thoroughly
git push origin feature/sync-upstream
gh pr create ...# After merging changes to main
git checkout main
git pull
# Create annotated tag
git tag -a common-4.6.3 -m "Release common library v4.6.3"
# Push tag
git push origin common-4.6.3
# Update schema $id references if needed
# - charts/library/common/values.schema.json
# - charts/other/*/schemas/*.schema.jsonAlways test synced changes:
# Run full test suite
just test
# Run linting
just lint
# Build specific charts
helm package charts/library/common
helm package charts/other/app-template
helm package charts/other/multus
# Verify dependency resolution
helm dependency update charts/other/multus
helm dependency update charts/other/app-template- Sync Regularly: Pull upstream changes monthly or quarterly
- Test Thoroughly: Run full test suite after merge
- Document Customizations: Mark owner-specific changes in comments
- Create SemVer Tags: When creating releases, use semantic versioning
- Update Changelogs: Note when syncing major upstream changes
- Preserve Git History: Keep meaningful commit messages
- Review Before Merge: Have someone review conflict resolutions
- Communicate Changes: Update team about significant upstream changes
If the org name changes again (e.g., owner → new-org):
-
Update all repository URLs:
Chart.yamldependenciesvalues.schema.jsonreferences- GitHub Pages URLs
-
Create a dedicated PR for the migration:
git checkout -b chore/org-migration-new-org # Update URLs sed -i 's|owner.github.io|new-org.github.io|g' charts/**/Chart.yaml sed -i 's|owner/helm-charts|new-org/helm-charts|g' charts/**/*.json # Create tags pointing to both old and new org releases git tag -a new-org-common-4.6.3 -m "Release for new-org" git push origin new-org-common-4.6.3
-
Merge to main and plan release
git remote add upstream https://github.com/bjw-s-labs/helm-charts.git
git fetch upstreamgit tag -d common-4.6.3 # Delete local
git push origin :refs/tags/common-4.6.3 # Delete remote
git tag -a common-4.6.3 -m "Message" # Recreate
git push origin common-4.6.3# View all conflicts
git diff --name-only --diff-filter=U
# View specific conflict
git diff charts/library/common/Chart.yaml
# Keep theirs (upstream)
git checkout --theirs charts/library/common/Chart.yaml
# Keep ours (owner)
git checkout --ours charts/library/common/Chart.yaml
# After resolving all
git add .
git commit -m "Resolve merge conflicts"Ensure git tags are created and pushed:
git tag -l # List local tags
git ls-remote origin 'refs/tags/*' # List remote tags
# If tag missing from remote:
git push origin common-4.6.3