Skip to content

Commit 3186577

Browse files
committed
Merge branch 'move-charts' into adamancini/release-create
2 parents 3f65934 + 797828c commit 3186577

File tree

96 files changed

+4031
-69
lines changed

Some content is hidden

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

96 files changed

+4031
-69
lines changed

.gitignore

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@
22
**/charts/*.tgz
33
**/.specstory/
44

5-
6-
# Ignore Helm dependency directories
7-
**/charts/*.lock
8-
95
# General files to ignore
106
*.log
117
*.gz
@@ -53,8 +49,6 @@ applications/mlflow/tests/.venv/
5349
# wg-easy specific
5450
*.kubeconfig
5551
applications/wg-easy/release/
56-
applications/wg-easy/*/charts/
57-
applications/wg-easy/*/Chart.lock
5852
.aider*
5953
# SpecStory explanation file
6054
.specstory/.what-is-this.md

applications/wg-easy/README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,15 @@ Use tools to automate repetitive tasks, reducing human error and increasing deve
5555

5656
```
5757
applications/wg-easy/
58-
├── charts/templates/ # Common templates shared across charts
59-
├── cert-manager/ # Wrapped cert-manager chart
60-
├── cert-manager-issuers/ # Chart for cert-manager issuers
58+
├── charts
59+
│   ├── cert-manager # Wrapped cert-manager chart
60+
│   ├── cert-manager-issuers # Chart for cert-manager issuers
61+
│   ├── replicated-sdk # Replicated SDK chart
62+
│   ├── templates # Common templates shared across charts
63+
│   ├── traefik # Wrapped Traefik chart
64+
│   └── wg-easy # Main application chart
6165
├── replicated/ # Root Replicated configuration
62-
├── replicated-sdk/ # Replicated SDK chart
6366
├── taskfiles/ # Task utility functions
64-
├── traefik/ # Wrapped Traefik chart
65-
├── wg-easy/ # Main application chart
6667
├── helmfile.yaml # Defines chart installation order
6768
└── Taskfile.yaml # Main task definitions
6869
```

applications/wg-easy/Taskfile.yaml

Lines changed: 15 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ tasks:
137137
- echo "Updating Helm dependencies for all charts..."
138138
- |
139139
# Find all charts and update their dependencies
140-
for chart_dir in $(find . -maxdepth 2 -name "Chart.yaml" | xargs dirname); do
140+
for chart_dir in $(find charts/ -maxdepth 2 -name "Chart.yaml" | xargs dirname); do
141141
echo "Updating dependency $chart_dir"
142142
helm dependency update --skip-refresh "$chart_dir"
143143
done
@@ -276,10 +276,10 @@ tasks:
276276
- echo "Packaging Helm charts..."
277277
- |
278278
# Find top-level directories containing Chart.yaml files
279-
for chart_dir in $(find . -maxdepth 2 -name "Chart.yaml" | xargs dirname); do
279+
for chart_dir in $(find charts/ -maxdepth 2 -name "Chart.yaml" | xargs dirname); do
280280
echo "Packaging chart: $chart_dir"
281281
# Navigate to chart directory, package it, and move the resulting .tgz to release folder
282-
(cd "$chart_dir" && helm package . && mv *.tgz ../release/)
282+
(cd "$chart_dir" && helm package . && mv *.tgz ../../release/)
283283
done
284284
285285
- echo "Release files prepared in ./release/ directory"
@@ -458,37 +458,21 @@ tasks:
458458
echo "Removing release directory..."
459459
rm -rf ./release
460460
fi
461-
462-
# Find and remove tmpcharts-* directories
461+
462+
# Find and remove tmpcharts-* directories in charts/
463463
echo "Removing temporary chart directories..."
464+
find charts/ -type d -name "tmpcharts-*" -print
465+
find charts/ -type d -name "tmpcharts-*" -exec rm -rf {} \; 2>/dev/null || true
466+
467+
# Clean up chart dependencies (.tgz files) in charts/*/charts/
468+
echo "Removing chart dependencies..."
469+
find charts/ -path "*/charts/*.tgz" -type f -print
470+
find charts/ -path "*/charts/*.tgz" -type f -delete
471+
472+
# Clean up any tmpcharts directories in subdirectories
473+
echo "Cleaning up any remaining tmpcharts directories..."
464474
find . -type d -name "tmpcharts-*" -print
465475
find . -type d -name "tmpcharts-*" -exec rm -rf {} \; 2>/dev/null || true
466-
467-
# Find charts directories that only contain .tgz files (dependencies)
468-
echo "Removing chart dependency directories..."
469-
for charts_dir in $(find . -type d -name "charts"); do
470-
# Skip if the charts directory is in ./charts/ (which is our template charts directory)
471-
if [[ "$charts_dir" == "./charts" || "$charts_dir" == "./charts/"* ]]; then
472-
continue
473-
fi
474-
475-
# Check if the directory only contains .tgz files
476-
NON_TGZ_FILES=$(find "$charts_dir" -type f -not -name "*.tgz" | wc -l | tr -d ' ')
477-
TOTAL_FILES=$(find "$charts_dir" -type f | wc -l | tr -d ' ')
478-
479-
if [ "$TOTAL_FILES" -gt 0 ] && [ "$NON_TGZ_FILES" -eq 0 ]; then
480-
# Check if the directory contains any subdirectories
481-
SUBDIRS=$(find "$charts_dir" -mindepth 1 -type d | wc -l | tr -d ' ')
482-
483-
if [ "$SUBDIRS" -eq 0 ]; then
484-
echo "Removing entire chart dependency directory: $charts_dir"
485-
rm -rf "$charts_dir"
486-
else
487-
echo "Removing chart dependencies in $charts_dir (keeping subdirectories)"
488-
rm -f "$charts_dir"/*.tgz
489-
fi
490-
fi
491-
done
492476
- echo "Cleaning complete!"
493477

494478
full-test-cycle:
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
dependencies:
2+
- name: cert-manager
3+
repository: https://charts.jetstack.io
4+
version: v1.14.5
5+
- name: templates
6+
repository: file://../templates
7+
version: 1.0.0
8+
digest: sha256:ab86a335f7f473446968c607ed7920bf4ce29f625e5ff6175be17bb2e1101a32
9+
generated: "2025-05-06T15:35:47.871225-04:00"

applications/wg-easy/cert-manager/Chart.yaml renamed to applications/wg-easy/charts/cert-manager/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ dependencies:
77
repository: https://charts.jetstack.io
88
- name: templates
99
version: '*'
10-
repository: file://../charts/templates
10+
repository: file://../templates

0 commit comments

Comments
 (0)