Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .custom-gcl.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
version: v2.9.0
name: golangci-lint-kube-api-linter
destination: ./bin
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,7 @@ jobs:
run: |
sudo apt-get update
sudo apt-get install -y yamllint
- uses: ibiqlik/action-yamllint@2576378a8e339169678f9939646ee3ee325e845c # v3.1.1
with:
format: github
- run: make yamllint

actionlint:
name: actionlint
Expand Down
1 change: 1 addition & 0 deletions .golangci-kal.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
version: "2"
run:
go: "1.25"
Expand Down
3 changes: 3 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
version: "2"
run:
allow-parallel-runners: true
Expand Down Expand Up @@ -62,9 +63,11 @@ linters:
text: 'G108: Profiling endpoint is automatically exposed on /debug/pprof'
- linters:
- revive
# yamllint disable-line rule:line-length
text: 'exported: exported method .*\.(Reconcile|SetupWithManager|SetupWebhookWithManager) should have comment or be unexported'
- linters:
- errcheck
# yamllint disable-line rule:line-length
text: Error return value of .((os\.)?std(out|err)\..*|.*Close|.*Flush|os\.Remove(All)?|.*print(f|ln)?|os\.(Un)?Setenv). is not checked
- linters:
- revive
Expand Down
1 change: 1 addition & 0 deletions .mockery.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
quiet: false
disable-version-string: true
with-expecter: true
Expand Down
17 changes: 7 additions & 10 deletions .yamlfmt
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
include:
- metadata.yaml
- .github
- config/default
- config/manager
- config/samples
- config/webhook
- examples
exclude:
- .github/workflows
# generated files
- config/crd
- config/certmanager
- config/prometheus
- config/rbac
- out
Copy link

Copilot AI Apr 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.yamlfmt no longer restricts/limits which YAML files are processed (the previous include: list is removed) and it does not exclude directories that are explicitly ignored by .yamllint (e.g. .github/workflows, templates, test/e2e). Since make yamllint runs go tool yamlfmt -lint -quiet after yamllint, this can cause CI to fail or format-check files that yamllint intentionally skips. Consider aligning .yamlfmt scope with .yamllint (add matching excludes, or reintroduce an explicit include: list).

Suggested change
- out
- out
# align with .yamllint ignored paths
- .github/workflows
- templates
- test/e2e

Copilot uses AI. Check for mistakes.
formatter:
include_document_start: true
indent: 2
indentless_arrays: true
max_line_length: 120
retain_line_breaks: true
type: basic
type: kyaml
11 changes: 4 additions & 7 deletions .yamllint
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,12 @@ ignore:
- config/certmanager
- config/prometheus
- config/rbac
- config/manager
- config/default
- test/e2e
- out
- .*.yaml
- .*.yml
# these are clusterctl templates, not yaml
# clusterctl templates use envsubst syntax that isn't valid yaml
# TODO: find a way to lint these (preprocess with envsubst + dummy values?)
- templates
- test/e2e
# conversion tool testdata contains envsubst templates
- pkg/convert/testdata
# github actions checked by actionlint
# github actions have no document-start markers
- .github/workflows
8 changes: 6 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,12 @@ mockgen: ## Generate mocks.

.PHONY: yamlfmt
yamlfmt: ## Run yamlfmt against yaml.
go tool yamlfmt -dry -quiet
go tool yamlfmt
go tool yamlfmt -verbose

.PHONY: yamllint
yamllint: ## Lint YAML files with yamllint and yamlfmt.
yamllint $(if $(GITHUB_ACTIONS),-f github) .
go tool yamlfmt -lint -quiet

.PHONY: tidy
tidy: ## Run go mod tidy to ensure modules are up to date
Expand Down
20 changes: 10 additions & 10 deletions config/default/webhookcainjection_patch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@
apiVersion: admissionregistration.k8s.io/v1
kind: MutatingWebhookConfiguration
metadata:
labels:
app.kubernetes.io/name: mutatingwebhookconfiguration
app.kubernetes.io/instance: mutating-webhook-configuration
app.kubernetes.io/component: webhook
app.kubernetes.io/created-by: cluster-api-provider-proxmox
app.kubernetes.io/part-of: cluster-api-provider-proxmox
app.kubernetes.io/managed-by: kustomize
name: mutating-webhook-configuration
annotations:
cert-manager.io/inject-ca-from: CERTIFICATE_NAMESPACE/CERTIFICATE_NAME
labels:
app.kubernetes.io/name: mutatingwebhookconfiguration
app.kubernetes.io/instance: mutating-webhook-configuration
app.kubernetes.io/component: webhook
app.kubernetes.io/created-by: cluster-api-provider-proxmox
app.kubernetes.io/part-of: cluster-api-provider-proxmox
app.kubernetes.io/managed-by: kustomize
name: mutating-webhook-configuration
annotations:
cert-manager.io/inject-ca-from: CERTIFICATE_NAMESPACE/CERTIFICATE_NAME
---
apiVersion: admissionregistration.k8s.io/v1
kind: ValidatingWebhookConfiguration
Expand Down
1 change: 1 addition & 0 deletions config/manager/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
resources:
- manager.yaml
apiVersion: kustomize.config.k8s.io/v1beta1
Expand Down
48 changes: 24 additions & 24 deletions examples/cluster-calico.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -101,27 +101,27 @@ spec:
sshAuthorizedKeys:
- ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJPK5kBd7cxXAHZ6UbeE+ysOlSjOFare3fCCZJ3xtXt1 capmox@k8s.io
virtualIPNetworkInterface: ""
#---
#apiVersion: ipam.cluster.x-k8s.io/v1alpha2
#kind: GlobalInClusterIPPool
#metadata:
# name: shared-inclusteripv4pool
#spec:
# addresses:
# - 10.10.11.1
# - 10.10.11.2
# - 10.10.11.3
# prefix: 24
# gateway: 10.10.11.254
#---
#apiVersion: ipam.cluster.x-k8s.io/v1alpha2
#kind: GlobalInClusterIPPool
#metadata:
# name: shared-inclusteripv6pool
#spec:
# addresses:
# - 2001:db8::10
# - 2001:db8::11
# - 2001:db8::12
# prefix: 64
# gateway: "2001:db8::1"
# ---
# apiVersion: ipam.cluster.x-k8s.io/v1alpha2
# kind: GlobalInClusterIPPool
# metadata:
# name: shared-inclusteripv4pool
# spec:
# addresses:
# - 10.10.11.1
# - 10.10.11.2
# - 10.10.11.3
# prefix: 24
# gateway: 10.10.11.254
# ---
# apiVersion: ipam.cluster.x-k8s.io/v1alpha2
# kind: GlobalInClusterIPPool
# metadata:
# name: shared-inclusteripv6pool
# spec:
# addresses:
# - 2001:db8::10
# - 2001:db8::11
# - 2001:db8::12
# prefix: 64
# gateway: "2001:db8::1"
48 changes: 24 additions & 24 deletions examples/cluster-cilium.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -101,27 +101,27 @@ spec:
sshAuthorizedKeys:
- ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJPK5kBd7cxXAHZ6UbeE+ysOlSjOFare3fCCZJ3xtXt1 capmox@k8s.io
virtualIPNetworkInterface: ""
#---
#apiVersion: ipam.cluster.x-k8s.io/v1alpha2
#kind: GlobalInClusterIPPool
#metadata:
# name: shared-inclusteripv4pool
#spec:
# addresses:
# - 10.10.11.1
# - 10.10.11.2
# - 10.10.11.3
# prefix: 24
# gateway: 10.10.11.254
#---
#apiVersion: ipam.cluster.x-k8s.io/v1alpha2
#kind: GlobalInClusterIPPool
#metadata:
# name: shared-inclusteripv6pool
#spec:
# addresses:
# - 2001:db8::10
# - 2001:db8::11
# - 2001:db8::12
# prefix: 64
# gateway: "2001:db8::1"
# ---
# apiVersion: ipam.cluster.x-k8s.io/v1alpha2
# kind: GlobalInClusterIPPool
# metadata:
# name: shared-inclusteripv4pool
# spec:
# addresses:
# - 10.10.11.1
# - 10.10.11.2
# - 10.10.11.3
# prefix: 24
# gateway: 10.10.11.254
# ---
# apiVersion: ipam.cluster.x-k8s.io/v1alpha2
# kind: GlobalInClusterIPPool
# metadata:
# name: shared-inclusteripv6pool
# spec:
# addresses:
# - 2001:db8::10
# - 2001:db8::11
# - 2001:db8::12
# prefix: 64
# gateway: "2001:db8::1"
48 changes: 24 additions & 24 deletions examples/cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -101,27 +101,27 @@ spec:
sshAuthorizedKeys:
- ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJPK5kBd7cxXAHZ6UbeE+ysOlSjOFare3fCCZJ3xtXt1 capmox@k8s.io
virtualIPNetworkInterface: ""
#---
#apiVersion: ipam.cluster.x-k8s.io/v1alpha2
#kind: GlobalInClusterIPPool
#metadata:
# name: shared-inclusteripv4pool
#spec:
# addresses:
# - 10.10.11.1
# - 10.10.11.2
# - 10.10.11.3
# prefix: 24
# gateway: 10.10.11.254
#---
#apiVersion: ipam.cluster.x-k8s.io/v1alpha2
#kind: GlobalInClusterIPPool
#metadata:
# name: shared-inclusteripv6pool
#spec:
# addresses:
# - 2001:db8::10
# - 2001:db8::11
# - 2001:db8::12
# prefix: 64
# gateway: "2001:db8::1"
# ---
# apiVersion: ipam.cluster.x-k8s.io/v1alpha2
# kind: GlobalInClusterIPPool
# metadata:
# name: shared-inclusteripv4pool
# spec:
# addresses:
# - 10.10.11.1
# - 10.10.11.2
# - 10.10.11.3
# prefix: 24
# gateway: 10.10.11.254
# ---
# apiVersion: ipam.cluster.x-k8s.io/v1alpha2
# kind: GlobalInClusterIPPool
# metadata:
# name: shared-inclusteripv6pool
# spec:
# addresses:
# - 2001:db8::10
# - 2001:db8::11
# - 2001:db8::12
# prefix: 64
# gateway: "2001:db8::1"
Loading