Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: sapcc/disco
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: e98a4c97363f9c11005cc4a20705d0ca475c64c8
Choose a base ref
..
head repository: sapcc/disco
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 2775f08413215f6859a9206540b299305db45cd5
Choose a head ref
Showing with 118 additions and 9 deletions.
  1. +3 −0 .github/CODEOWNERS
  2. +2 −2 Dockerfile
  3. +13 −7 Makefile
  4. +100 −0 Makefile.maker.yaml
3 changes: 3 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# These owners will be the default owners for everything in
# the repo. Unless a later match takes precedence,
* @abhijith-darshan @kengou
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# syntax=docker/dockerfile:experimental
# Build the manager binary
FROM golang:1.23 as builder
FROM --platform=${BUILDPLATFORM:-linux/amd64} golang:1.23 as builder

WORKDIR /workspace
# Copy the Go Modules manifests
@@ -25,7 +25,7 @@ RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 make build

# Use distroless as minimal base image to package the manager binary
# Refer to https://github.com/GoogleContainerTools/distroless for more details
FROM gcr.io/distroless/static:nonroot
FROM --platform=${BUILDPLATFORM:-linux/amd64} gcr.io/distroless/static:nonroot
LABEL source_repository="https://github.com/sapcc/disco"
LABEL org.opencontainers.image.source="https://github.com/sapcc/disco"
WORKDIR /
20 changes: 13 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
@@ -5,6 +5,9 @@ IMG ?= ${IMG_REPO}:${IMG_TAG}

# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
ENVTEST_K8S_VERSION = 1.28
## Tool Versions
KUSTOMIZE_VERSION ?= 5.4.1
CONTROLLER_TOOLS_VERSION ?= 0.14.0

# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set)
ifeq (,$(shell go env GOBIN))
@@ -21,8 +24,8 @@ SHELL = /usr/bin/env bash -o pipefail

OS := $(shell go env GOOS)

.PHONY: all
all: build
.PHONY: build-all
build-all: build

##@ General

@@ -135,10 +138,6 @@ KUSTOMIZE ?= $(LOCALBIN)/kustomize
CONTROLLER_GEN ?= $(LOCALBIN)/controller-gen
ENVTEST ?= $(LOCALBIN)/setup-envtest

## Tool Versions
KUSTOMIZE_VERSION ?= v5.4.1
CONTROLLER_TOOLS_VERSION ?= v0.14.0

KUSTOMIZE_INSTALL_SCRIPT ?= "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh"
.PHONY: kustomize
kustomize: $(KUSTOMIZE) ## Download kustomize locally if necessary.
@@ -148,9 +147,16 @@ $(KUSTOMIZE): $(LOCALBIN)
.PHONY: controller-gen
controller-gen: $(CONTROLLER_GEN) ## Download controller-gen locally if necessary.
$(CONTROLLER_GEN): $(LOCALBIN)
GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-tools/cmd/controller-gen@$(CONTROLLER_TOOLS_VERSION)
GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-tools/cmd/controller-gen@v$(CONTROLLER_TOOLS_VERSION)

.PHONY: envtest
envtest: $(ENVTEST) ## Download envtest-setup locally if necessary.
$(ENVTEST): $(LOCALBIN)
GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest

install-go-licence-detector: FORCE
@if ! hash go-licence-detector 2>/dev/null; then printf "\e[1;36m>> Installing go-licence-detector (this may take a while)...\e[0m\n"; go install go.elastic.co/go-licence-detector@latest; fi

check-dependency-licenses: FORCE install-go-licence-detector
@printf "\e[1;36m>> go-licence-detector\e[0m\n"
@go list -m -mod=readonly -json all | go-licence-detector -includeIndirect -rules .license-scan-rules.json -overrides .license-scan-overrides.jsonl
100 changes: 100 additions & 0 deletions Makefile.maker.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
# Configuration file for <https://github.com/sapcc/go-makefile-maker>

metadata:
url: https://github.com/sapcc/disco

binaries:
- name: disco
fromPackage: ./
installTo: bin/

dockerfile:
enabled: false

golang:
setGoModVersion: false

golangciLint:
createConfig: true

goReleaser:
createConfig: true
binaryName: "{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}"
format: .tar.gz
nameTemplate: "{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}"

githubWorkflow:
ci:
enabled: true
coveralls: false
pushContainerToGhcr:
enabled: true
platforms: "linux/amd64,linux/arm64"
tagStrategy:
- edge
- latest
- semver
- sha
securityChecks:
enabled: true
license:
enabled: false
release:
enabled: true

makefile:
enabled: false

renovate:
enabled: true
assignees:
- kengou
- abhijith-darshan
customManagers:
- customType: "regex"
description: "Bump envtest version in the Makefile"
fileMatch: [
"^Makefile$"
]
matchStrings: [
"ENVTEST_K8S_VERSION\\s*\\?=\\s*(?<currentValue>.?(?:\\d+\\.){0,2}\\d+)"
]
datasourceTemplate: "github-tags"
depNameTemplate: "kubernetes-sigs/controller-tools"
extractVersionTemplate: "^envtest.v(?<version>.*)$"
- customType: "regex"
description: "Bump kustomize version in the Makefile"
fileMatch: [
"^Makefile$"
]
matchStrings: [
"KUSTOMIZE_VERSION\\s*\\?=\\s*(?<currentValue>.?(?:\\d+\\.){0,2}\\d+)"
]
datasourceTemplate: "github-tags"
depNameTemplate: "kubernetes-sigs/kustomize"
extractVersionTemplate: "^kustomize/v(?<version>.*)$"
- customType: "regex"
description: "Bump controller tools version in the Makefile"
fileMatch: [
"^Makefile$"
]
matchStrings: [
"CONTROLLER_TOOLS_VERSION\\s*\\?=\\s*(?<currentValue>.?(?:\\d+\\.){0,2}\\d+)"
]
datasourceTemplate: "github-tags"
depNameTemplate: "kubernetes-sigs/controller-tools"
extractVersionTemplate: "^v(?<version>.*)$"
packageRules:
- matchPackageNames: [
"github-actions"
]
groupName: "github actions"
matchUpdateTypes: [
"major",
"minor",
"patch"
]
minimumReleaseAge: "14 days"
extends: [
"helpers:pinGitHubActionDigests"
]