Skip to content

Commit

Permalink
- README updates and fixes
Browse files Browse the repository at this point in the history
- Update goreleaser for a Docker image
  • Loading branch information
DaemonDude23 committed Feb 11, 2025
1 parent c3e0e1f commit a60f417
Show file tree
Hide file tree
Showing 6 changed files with 70 additions and 13 deletions.
23 changes: 21 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: goreleaser

"on":
on:
push:
tags:
- "v*"
Expand All @@ -14,10 +14,29 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.22.0'
go-version: '1.23.4'

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and Push Docker Image
run: |
docker buildx build --platform linux/amd64,linux/arm64,linux/386 \
-t ghcr.io/daemondude23/helmizer/helmizer:${{ github.ref_name }} \
-t ghcr.io/daemondude23/helmizer/helmizer:latest \
--push .
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
Expand Down
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ repos:
rev: v1.0.0-rc.1
hooks:
- id: go-build-mod
- id: go-mod-tidy
- id: go-mod-tidy-repo
# - id: go-mod-tidy
# - id: go-mod-tidy-repo
- id: go-test-mod
- id: go-test-repo-mod
# - id: go-test-repo-mod
- id: go-fmt
- id: go-fmt-repo
# - id: go-fmt-repo
# Python specific hooks
- repo: https://github.com/asottile/reorder_python_imports
rev: v3.14.0
Expand Down
11 changes: 7 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,25 @@
**Changelog**

- [2025](#2025)
- [v0.15.0](#v0150)
- [v0.16.0](#v0160)
- [2024](#2024)
- [v0.15.0](#v0150-1)
- [v0.15.0](#v0150)

---

# 2025

## [v0.15.0](https://github.com/DaemonDude23/helmizer/releases/tag/v0.16.0)
## [v0.16.0](https://github.com/DaemonDude23/helmizer/releases/tag/v0.16.0)

February 10 2025

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

**Housekeeping**

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

Expand Down
17 changes: 17 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Builder stage
FROM docker.io/library/golang:1.23.4 AS builder
WORKDIR /build
# Copy go mod files and download dependencies
COPY ./src/go.mod ./src/go.sum ./
RUN go mod download
# Copy the rest of the source code
COPY ./src/ ./
# Build the helmizer binary with CGO disabled for a fully static binary
RUN CGO_ENABLED=0 go build -ldflags="-s -w" -o helmizer .

# Final stage
FROM scratch AS final
# Copy the helmizer binary to a known location
COPY --from=builder /build/helmizer /usr/local/bin/helmizer
# By default, set the binary as the entry point in case you want to run it
ENTRYPOINT ["/usr/local/bin/helmizer"]
22 changes: 20 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@

- [About](#about)
- [Usage](#usage)
- [CLI](#cli)
- [Configuration](#configuration)
- [Installation](#installation)
- [Linux](#linux)
- [Docker](#docker)
- [In your Docker Image](#in-your-docker-image)
- [Windows](#windows)
- [Run](#run)
- [Examples](#examples)
Expand All @@ -18,7 +21,7 @@

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.

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`.
`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`.

---

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

# Usage

## CLI

```
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
Expand Down Expand Up @@ -178,13 +183,26 @@ kustomize: # this is essentially an overlay for your eventual kustomization.yam
### Linux
```bash
curl -L "https://github.com/DaemonDude23/helmizer/releases/download/v0.15.0/helmizer_0.15.0_linux_amd64.tar.gz" -o helmizer.tar.gz && \
curl -L "https://github.com/DaemonDude23/helmizer/releases/download/v0.16.0/helmizer_0.16.0_linux_amd64.tar.gz" -o helmizer.tar.gz && \
tar -xzf helmizer.tar.gz helmizer && \
sudo mv helmizer /usr/local/bin/ && \
rm helmizer.tar.gz && \
sudo chmod +x /usr/local/bin/helmizer
```

### Docker

#### In your Docker Image

```dockerfile
# Builder stage
FROM ghcr.io/DaemonDude23/helmizer:v0.16.0 AS builder

# Final minimal stage
FROM scratch
COPY --from=builder /usr/local/bin/helmizer /usr/local/bin/helmizer
```

### Windows

1. Download the Windows version.
Expand Down
2 changes: 1 addition & 1 deletion src/utilities.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
)

func (CLIArgs) Version() string {
return "helmizer 0.15.0"
return "helmizer 0.16.0"
}

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

0 comments on commit a60f417

Please sign in to comment.