Skip to content

Commit a60f417

Browse files
committed
- README updates and fixes
- Update goreleaser for a Docker image
1 parent c3e0e1f commit a60f417

File tree

6 files changed

+70
-13
lines changed

6 files changed

+70
-13
lines changed

.github/workflows/release.yaml

+21-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: goreleaser
22

3-
"on":
3+
on:
44
push:
55
tags:
66
- "v*"
@@ -14,10 +14,29 @@ jobs:
1414
uses: actions/checkout@v4
1515
with:
1616
fetch-depth: 0
17+
1718
- name: Set up Go
1819
uses: actions/setup-go@v5
1920
with:
20-
go-version: '1.22.0'
21+
go-version: '1.23.4'
22+
23+
- name: Set up Docker Buildx
24+
uses: docker/setup-buildx-action@v3
25+
26+
- name: Log in to GitHub Container Registry
27+
uses: docker/login-action@v3
28+
with:
29+
registry: ghcr.io
30+
username: ${{ github.actor }}
31+
password: ${{ secrets.GITHUB_TOKEN }}
32+
33+
- name: Build and Push Docker Image
34+
run: |
35+
docker buildx build --platform linux/amd64,linux/arm64,linux/386 \
36+
-t ghcr.io/daemondude23/helmizer/helmizer:${{ github.ref_name }} \
37+
-t ghcr.io/daemondude23/helmizer/helmizer:latest \
38+
--push .
39+
2140
- name: Run GoReleaser
2241
uses: goreleaser/goreleaser-action@v6
2342
with:

.pre-commit-config.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,12 @@ repos:
3232
rev: v1.0.0-rc.1
3333
hooks:
3434
- id: go-build-mod
35-
- id: go-mod-tidy
36-
- id: go-mod-tidy-repo
35+
# - id: go-mod-tidy
36+
# - id: go-mod-tidy-repo
3737
- id: go-test-mod
38-
- id: go-test-repo-mod
38+
# - id: go-test-repo-mod
3939
- id: go-fmt
40-
- id: go-fmt-repo
40+
# - id: go-fmt-repo
4141
# Python specific hooks
4242
- repo: https://github.com/asottile/reorder_python_imports
4343
rev: v3.14.0

CHANGELOG.md

+7-4
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,25 @@
11
**Changelog**
22

33
- [2025](#2025)
4-
- [v0.15.0](#v0150)
4+
- [v0.16.0](#v0160)
55
- [2024](#2024)
6-
- [v0.15.0](#v0150-1)
6+
- [v0.15.0](#v0150)
77

88
---
99

1010
# 2025
1111

12-
## [v0.15.0](https://github.com/DaemonDude23/helmizer/releases/tag/v0.16.0)
12+
## [v0.16.0](https://github.com/DaemonDude23/helmizer/releases/tag/v0.16.0)
13+
14+
February 10 2025
1315

1416
Just a maintenance release with various dependency updates. No code changes.
1517

1618
**Housekeeping**
1719

18-
- Updated Go to 1.23.4.
20+
- Updated Go to `1.23.4`.
1921
- Updated Go dependencies.
22+
- Added a Dockerfile, testing with docker, and docs for copying helmizer out of a container.
2023
- Removed old Python changelog.
2124
- Removed `asdf` environment variables from `launch.json`.
2225

Dockerfile

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Builder stage
2+
FROM docker.io/library/golang:1.23.4 AS builder
3+
WORKDIR /build
4+
# Copy go mod files and download dependencies
5+
COPY ./src/go.mod ./src/go.sum ./
6+
RUN go mod download
7+
# Copy the rest of the source code
8+
COPY ./src/ ./
9+
# Build the helmizer binary with CGO disabled for a fully static binary
10+
RUN CGO_ENABLED=0 go build -ldflags="-s -w" -o helmizer .
11+
12+
# Final stage
13+
FROM scratch AS final
14+
# Copy the helmizer binary to a known location
15+
COPY --from=builder /build/helmizer /usr/local/bin/helmizer
16+
# By default, set the binary as the entry point in case you want to run it
17+
ENTRYPOINT ["/usr/local/bin/helmizer"]

README.md

+20-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,12 @@
22

33
- [About](#about)
44
- [Usage](#usage)
5+
- [CLI](#cli)
56
- [Configuration](#configuration)
67
- [Installation](#installation)
78
- [Linux](#linux)
9+
- [Docker](#docker)
10+
- [In your Docker Image](#in-your-docker-image)
811
- [Windows](#windows)
912
- [Run](#run)
1013
- [Examples](#examples)
@@ -18,7 +21,7 @@
1821

1922
Generates a `kustomization.yaml` file, optionally providing the ability to run commands (e.g. `helm template`) on your OS prior to generating a kustomization, and will compose the kustomization fields that deal with file paths (e.g. `resources`) with glob-like features, as well as pass-through all other kustomization configuration properties. No need to explicitly enumerate every file to be 'kustomized' individually.
2023

21-
Takes a config file as input, telling **Helmizer** if you want to run any commands. Then if you give it one or more directories for `crds`/`components`/`patchesStrategicMerge`/`resources`, it will recursively lookup all of those files and render them into your kustomization.yaml. Want to skip including one file like `templates/secret.yaml`? Just add the relative path to `helmizer.ignore` to `helmizer.yaml`.
24+
`helmizer` takes a config file as input, telling **Helmizer** if you want to run any commands. Then if you give it one or more directories for `crds`/`components`/`patchesStrategicMerge`/`resources`, it will recursively lookup all of those files and render them into your kustomization.yaml. Want to skip including one file like `templates/secret.yaml`? Just add the relative path to `helmizer.ignore` to `helmizer.yaml`.
2225

2326
---
2427

@@ -32,6 +35,8 @@ I began transitioning my `helm` charts to local manifests via [`helm template`](
3235

3336
# Usage
3437

38+
## CLI
39+
3540
```
3641
Usage: helmizer [--log-format LOG-FORMAT] [--log-level LOG-LEVEL] [--log-colors] [--api-version API-VERSION] [--dry-run] [--kustomization-path KUSTOMIZATION-PATH] [--quiet-commands] [--quiet-helmizer] [--skip-commands] [--skip-postcommands] [--skip-precommands] [--stop-on-error] CONFIGFILEPATH
3742
@@ -178,13 +183,26 @@ kustomize: # this is essentially an overlay for your eventual kustomization.yam
178183
### Linux
179184
180185
```bash
181-
curl -L "https://github.com/DaemonDude23/helmizer/releases/download/v0.15.0/helmizer_0.15.0_linux_amd64.tar.gz" -o helmizer.tar.gz && \
186+
curl -L "https://github.com/DaemonDude23/helmizer/releases/download/v0.16.0/helmizer_0.16.0_linux_amd64.tar.gz" -o helmizer.tar.gz && \
182187
tar -xzf helmizer.tar.gz helmizer && \
183188
sudo mv helmizer /usr/local/bin/ && \
184189
rm helmizer.tar.gz && \
185190
sudo chmod +x /usr/local/bin/helmizer
186191
```
187192

193+
### Docker
194+
195+
#### In your Docker Image
196+
197+
```dockerfile
198+
# Builder stage
199+
FROM ghcr.io/DaemonDude23/helmizer:v0.16.0 AS builder
200+
201+
# Final minimal stage
202+
FROM scratch
203+
COPY --from=builder /usr/local/bin/helmizer /usr/local/bin/helmizer
204+
```
205+
188206
### Windows
189207

190208
1. Download the Windows version.

src/utilities.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111
)
1212

1313
func (CLIArgs) Version() string {
14-
return "helmizer 0.15.0"
14+
return "helmizer 0.16.0"
1515
}
1616

1717
// Compares two lists and removes any elements from list2 that are present in list1.

0 commit comments

Comments
 (0)