Skip to content

Commit b0bf875

Browse files
committed
feat: initial commit
0 parents  commit b0bf875

21 files changed

+904
-0
lines changed

.github/dependabot.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
version: 2
2+
updates:
3+
4+
- package-ecosystem: "github-actions"
5+
directory: "/"
6+
schedule:
7+
interval: "daily"
8+
time: "07:00"
9+
timezone: "Europe/Berlin"
10+
open-pull-requests-limit: 5
11+
commit-message:
12+
prefix: "chore"
13+
include: "scope"
14+
labels: ["dependencies", "ci"]
15+
16+
- package-ecosystem: "docker"
17+
directory: "/"
18+
schedule:
19+
interval: "daily"
20+
time: "07:10"
21+
timezone: "Europe/Berlin"
22+
labels: ["dependencies", "docker"]
23+
commit-message:
24+
prefix: "chore"
25+
include: "scope"
26+
open-pull-requests-limit: 5

.github/workflows/helm-release.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: Helm Chart Release
2+
3+
on:
4+
release:
5+
types:
6+
- published
7+
8+
permissions:
9+
contents: write
10+
packages: write
11+
12+
jobs:
13+
publish:
14+
if: startsWith(github.event.release.tag_name, 'v')
15+
runs-on: ubuntu-latest
16+
concurrency:
17+
group: helm-release-${{ github.event.release.tag_name }}
18+
cancel-in-progress: true
19+
steps:
20+
- name: Checkout repository
21+
uses: actions/checkout@v6
22+
23+
- name: Set up Helm
24+
uses: azure/setup-helm@v4
25+
with:
26+
version: v3.13.3
27+
28+
- name: Sync chart version with release tag
29+
run: |
30+
RAW_TAG="${GITHUB_REF_NAME}"
31+
TAG="${RAW_TAG#v}"
32+
echo "Setting chart version to ${TAG} and appVersion to ${RAW_TAG}"
33+
sed -i -E "s/^version: .*/version: ${TAG} # replaced by CI/" Chart.yaml
34+
sed -i -E "s/^appVersion: .*/appVersion: \"${RAW_TAG}\" # replaced by CI/" Chart.yaml
35+
36+
- name: Validate chart version
37+
run: |
38+
RAW_TAG="${GITHUB_REF_NAME}"
39+
TAG="${RAW_TAG#v}"
40+
grep -Eq "^version: ${TAG}([[:space:]]+#.*)?$" Chart.yaml || { echo "Chart version mismatch"; cat Chart.yaml; exit 1; }
41+
grep -Eq "^appVersion: \"?${RAW_TAG}\"?([[:space:]]+#.*)?$" Chart.yaml || { echo "appVersion mismatch"; cat Chart.yaml; exit 1; }
42+
- name: Package chart
43+
run: |
44+
mkdir -p dist
45+
helm dependency update charts/k8s-copycat
46+
helm package charts/k8s-copycat --destination dist
47+
48+
- name: Login to GHCR
49+
run: |
50+
echo "${{ secrets.GITHUB_TOKEN }}" | helm registry login ghcr.io --username ${{ github.actor }} --password-stdin
51+
52+
- name: Push chart to GHCR
53+
run: |
54+
for chart in dist/*.tgz; do
55+
helm push "$chart" oci://ghcr.io/${{ github.repository_owner }}/charts
56+
done
57+
58+
- name: Upload packaged chart to release assets
59+
uses: softprops/action-gh-release@v2
60+
with:
61+
files: dist/*.tgz
62+
env:
63+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Release Please
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
9+
jobs:
10+
release:
11+
permissions:
12+
contents: write
13+
pull-requests: write
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Run release-please
17+
uses: googleapis/release-please-action@v4
18+
with:
19+
config-file: release-please-config.json
20+
token: ${{ secrets.RELEASE_PLEASE_PAT }}

.helmignore

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Common Helm ignores
2+
.git/
3+
.github/
4+
.gitignore
5+
.vscode/
6+
.idea/
7+
.DS_Store
8+
*.swp
9+
charts/
10+
Chart.lock
11+
Makefile
12+
README.md
13+
LICENSE

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Changelog
2+
3+
All notable changes to this Helm chart will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

Chart.yaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
apiVersion: v2
2+
name: k8s-copycat
3+
description: Mirror Kubernetes workloads container images to a configurable target registry.
4+
type: application
5+
# version fields are placeholders overwritten during release by .github/workflows/helm-release.yml
6+
version: 0.7.0 # replaced by CI
7+
appVersion: "v0.0.0" # replaced by CI
8+
home: https://github.com/matzegebbe/k8s-copycat
9+
sources:
10+
- https://github.com/matzegebbe/k8s-copycat
11+
keywords:
12+
- kubernetes
13+
- registry
14+
- mirroring
15+
- copycat
16+
maintainers:
17+
- name: Mathias Gebbe
18+
email: mathias.gebbe@gmail.com
19+
icon: https://raw.githubusercontent.com/matzegebbe/k8s-copycat/main/k8s-copycat-logo.png
20+
kubeVersion: ">=1.22.0-0"
21+
annotations:
22+
artifacthub.io/links: |
23+
- name: Source
24+
url: https://github.com/matzegebbe/k8s-copycat
25+
- name: Documentation
26+
url: https://github.com/matzegebbe/k8s-copycat#readme

charts/k8s-copycat/CHANGELOG.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Changelog
2+
3+
## [0.7.0](https://github.com/matzegebbe/k8s-copycat/compare/k8s-copycat-chart-v0.6.1...k8s-copycat-chart-v0.7.0) (2025-11-21)
4+
5+
6+
### Features
7+
8+
* add Helm chart ([#121](https://github.com/matzegebbe/k8s-copycat/issues/121)) ([276921a](https://github.com/matzegebbe/k8s-copycat/commit/276921aac4386a97d39a08b03df77ef0a019af53))
9+
10+
11+
### Continuous Integration
12+
13+
* align helm appVersion with release tags ([#124](https://github.com/matzegebbe/k8s-copycat/issues/124)) ([eb99af6](https://github.com/matzegebbe/k8s-copycat/commit/eb99af64b9cac586ceb86b866fa17f74f7af314c))
14+
15+
16+
### Miscellaneous
17+
18+
* release main ([#123](https://github.com/matzegebbe/k8s-copycat/issues/123)) ([14ac111](https://github.com/matzegebbe/k8s-copycat/commit/14ac111a1e4e84b9a158df302caa8fa212b0e772))
19+
20+
## [0.6.0](https://github.com/matzegebbe/k8s-copycat/compare/v0.5.0...v0.6.0) (2025-11-12)
21+
22+
23+
### Features
24+
25+
* add Helm chart ([#121](https://github.com/matzegebbe/k8s-copycat/issues/121)) ([276921a](https://github.com/matzegebbe/k8s-copycat/commit/276921aac4386a97d39a08b03df77ef0a019af53))
26+
27+
28+
### Continuous Integration
29+
30+
* align helm appVersion with release tags ([#124](https://github.com/matzegebbe/k8s-copycat/issues/124)) ([eb99af6](https://github.com/matzegebbe/k8s-copycat/commit/eb99af64b9cac586ceb86b866fa17f74f7af314c))

k8s-copycat-helm-chart-logo.png

5.12 MB
Loading

release-please-config.json

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
{
2+
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
3+
"include-component-in-tag": false,
4+
"include-v-in-tag": true,
5+
"bump-minor-pre-major": true,
6+
"changelog-sections": [
7+
{
8+
"type": "feat",
9+
"section": "Features"
10+
},
11+
{
12+
"type": "fix",
13+
"section": "Bug Fixes"
14+
},
15+
{
16+
"type": "perf",
17+
"section": "Performance Improvements"
18+
},
19+
{
20+
"type": "refactor",
21+
"section": "Refactoring"
22+
},
23+
{
24+
"type": "docs",
25+
"section": "Documentation"
26+
},
27+
{
28+
"type": "test",
29+
"section": "Tests"
30+
},
31+
{
32+
"type": "build",
33+
"section": "Build System"
34+
},
35+
{
36+
"type": "ci",
37+
"section": "Continuous Integration"
38+
},
39+
{
40+
"type": "chore",
41+
"section": "Miscellaneous"
42+
}
43+
],
44+
"packages": {
45+
".": {
46+
"package-name": "k8s-copycat-chart",
47+
"component": "k8s-copycat-chart",
48+
"release-type": "helm",
49+
"changelog-path": "CHANGELOG.md",
50+
"include-component-in-tag": true
51+
}
52+
}
53+
}

templates/NOTES.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
😺 Thank you for installing {{ include "k8s-copycat.fullname" . }} 😺
2+
3+
To verify the controller is running:
4+
kubectl --namespace {{ .Release.Namespace }} get pods -l {{ include "k8s-copycat.selectorLabels" . | trim | replace "\n" ", " }}

0 commit comments

Comments
 (0)