-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Emin Aktas <[email protected]>
- Loading branch information
Showing
27 changed files
with
736 additions
and
268 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
# More info: https://docs.docker.com/engine/reference/builder/#dockerignore-file | ||
# Ignore build and test binaries. | ||
bin/ | ||
dist/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: Lint | ||
|
||
permissions: | ||
contents: read | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
lint: | ||
name: Lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
- name: Set Up Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version-file: go.mod | ||
cache-dependency-path: go.sum | ||
- name: golangci-lint | ||
uses: golangci/golangci-lint-action@v4 | ||
with: | ||
args: --timeout=30m --verbose | ||
skip-cache: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Release | ||
|
||
permissions: {} | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
id-token: write | ||
packages: write | ||
pull-requests: write | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Set up Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version-file: go.mod | ||
cache-dependency-path: go.sum | ||
- name: Install Syft | ||
uses: anchore/sbom-action/download-syft@v0 | ||
- name: Run GoReleaser | ||
uses: goreleaser/goreleaser-action@v5 | ||
with: | ||
distribution: goreleaser | ||
version: latest | ||
args: release --clean --timeout 90m | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ | |
*.so | ||
*.dylib | ||
bin/* | ||
dist/* | ||
Dockerfile.cross | ||
|
||
# Test binary, built with `go test -c` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
run: | ||
deadline: 5m | ||
timeout: 5m | ||
allow-parallel-runners: true | ||
|
||
issues: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
project_name: kubedns-shepherd | ||
|
||
before: | ||
hooks: | ||
- go mod tidy | ||
|
||
builds: | ||
- id: kubedns-shepherd | ||
binary: kubedns-shepherd | ||
main: cmd/main.go | ||
env: | ||
- CGO_ENABLED=0 | ||
flags: | ||
- -trimpath | ||
ldflags: | ||
- -s -w -X main.version={{ .Version }} -X main.commit={{ .Commit }} -X main.date={{ .CommitDate }} -X main.treeState={{ .IsGitDirty }} -X main.builtBy=goreleaser | ||
goos: | ||
- linux | ||
goarch: | ||
- amd64 | ||
- arm64 | ||
mod_timestamp: '{{ .CommitTimestamp }}' | ||
|
||
kos: | ||
- build: kubedns-shepherd | ||
main: ./cmd/... | ||
base_image: ghcr.io/distroless/static:latest | ||
repository: ghcr.io/eminaktas/kubedns-shepherd | ||
tags: | ||
- '{{ .Tag }}' | ||
- '{{ if not .Prerelease }}latest{{ end }}' | ||
bare: true | ||
preserve_import_paths: false | ||
base_import_paths: false | ||
sbom: none | ||
platforms: | ||
- linux/amd64 | ||
- linux/arm64 | ||
labels: | ||
io.artifacthub.package.readme-url: "https://raw.githubusercontent.com/eminaktas/kubedns-shepherd/main/README.md" | ||
io.artifacthub.package.maintainers: '[{"name":"Emin Aktas","email":""}]' | ||
io.artifacthub.package.license: "Apache-2.0" | ||
org.opencontainers.image.description: "A Kubernetes controller that manages the DNS configuration for workloads" | ||
org.opencontainers.image.created: "{{ .Date }}" | ||
org.opencontainers.image.name: "{{ .ProjectName }}" | ||
org.opencontainers.image.revision: "{{ .FullCommit }}" | ||
org.opencontainers.image.version: "{{ .Version }}" | ||
org.opencontainers.image.source: "{{ .GitURL }}" | ||
|
||
archives: | ||
- name_template: >- | ||
{{- .ProjectName }}_ | ||
{{- title .Os }}_ | ||
{{- if eq .Arch "amd64" }}x86_64 | ||
{{- else if eq .Arch "386" }}i386 | ||
{{- else }}{{ .Arch }}{{ end }} | ||
{{- if .Arm }}v{{ .Arm }}{{ end -}} | ||
format_overrides: | ||
- goos: windows | ||
format: zip | ||
builds_info: | ||
group: root | ||
owner: root | ||
files: | ||
- README.md | ||
- LICENSE | ||
sboms: | ||
- artifacts: archive | ||
|
||
checksum: | ||
name_template: "checksums.txt" | ||
|
||
snapshot: | ||
name_template: "{{ incpatch .Version }}-next" | ||
|
||
changelog: | ||
sort: asc | ||
use: github | ||
filters: | ||
exclude: | ||
- "^test:" | ||
- "^test\\(" | ||
- "^chore" | ||
- "merge conflict" | ||
- Merge pull request | ||
- Merge remote-tracking branch | ||
- Merge branch | ||
- go mod tidy | ||
groups: | ||
- title: Dependency updates | ||
regexp: '^.*?(feat|fix|chore)\(deps\)!?:.+$' | ||
order: 300 | ||
- title: "New Features" | ||
regexp: '^.*?feat(\(.+\))??!?:.+$' | ||
order: 100 | ||
- title: "Security updates" | ||
regexp: '^.*?sec(\(.+\))??!?:.+$' | ||
order: 150 | ||
- title: "Bug fixes" | ||
regexp: '^.*?(fix|refactor)(\(.+\))??!?:.+$' | ||
order: 200 | ||
- title: "Documentation updates" | ||
regexp: ^.*?docs?(\(.+\))??!?:.+$ | ||
order: 400 | ||
- title: "Build process updates" | ||
regexp: ^.*?(build|ci)(\(.+\))??!?:.+$ | ||
order: 400 | ||
- title: Other work | ||
order: 9999 | ||
|
||
release: | ||
prerelease: auto | ||
name_template: "v{{ .Version }}" | ||
footer: | | ||
**Full Changelog**: https://github.com/eminaktas/kubedns-shepherd/compare/{{ .PreviousTag }}...{{ .Tag }} | ||
**Container Image**: ghcr.io/eminaktas/kubedns-shepherd:{{ .Tag }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# Build the manager binary | ||
FROM golang:1.20 AS builder | ||
FROM golang:1.22 AS builder | ||
ARG TARGETOS | ||
ARG TARGETARCH | ||
|
||
|
Oops, something went wrong.