Skip to content

Commit 29d09f5

Browse files
cloud-vinyl-botclaude
andcommitted
fix: resolve remaining CI failures (golangci-lint version, Docker base image, CRD directory)
- Upgrade golangci-lint from v2.1.6 to v2.8.0 (built with Go 1.25, compatible with go 1.25.3 modules) - Update Dockerfile.operator and Dockerfile.agent base image from golang:1.23 to golang:1.25 - Remove config/crd/bases/ from .gitignore and commit CRD manifests so integration tests can find them Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 1c514ec commit 29d09f5

File tree

7 files changed

+1972
-4
lines changed

7 files changed

+1972
-4
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
cache: true
1919
- uses: golangci/golangci-lint-action@v7
2020
with:
21-
version: v2.1.6
21+
version: v2.8.0
2222

2323
test:
2424
name: Unit Tests

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ go.work
3333

3434
# kubebuilder / controller-runtime
3535
testbin/
36-
config/crd/bases/
3736
zz_generated.*
3837
!api/v1alpha1/zz_generated.deepcopy.go
3938

Dockerfile.agent

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Build stage
2-
FROM golang:1.23 AS builder
2+
FROM golang:1.25 AS builder
33
WORKDIR /workspace
44
COPY go.mod go.sum ./
55
RUN go mod download

Dockerfile.operator

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Build stage
2-
FROM golang:1.23 AS builder
2+
FROM golang:1.25 AS builder
33
WORKDIR /workspace
44
COPY go.mod go.sum ./
55
RUN go mod download
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
---
2+
apiVersion: apiextensions.k8s.io/v1
3+
kind: CustomResourceDefinition
4+
metadata:
5+
annotations:
6+
controller-gen.kubebuilder.io/version: v0.20.0
7+
name: prometheusrules.
8+
spec:
9+
group: ""
10+
names:
11+
kind: PrometheusRule
12+
listKind: PrometheusRuleList
13+
plural: prometheusrules
14+
singular: prometheusrule
15+
scope: Namespaced
16+
versions:
17+
- name: ""
18+
schema:
19+
openAPIV3Schema:
20+
description: |-
21+
PrometheusRule is a minimal representation of monitoring.coreos.com/v1 PrometheusRule.
22+
We define our own struct to avoid the heavy prometheus-operator dependency.
23+
In production, convert this to the actual CRD type when applying to Kubernetes.
24+
properties:
25+
apiVersion:
26+
description: |-
27+
APIVersion defines the versioned schema of this representation of an object.
28+
Servers should convert recognized schemas to the latest internal value, and
29+
may reject unrecognized values.
30+
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
31+
type: string
32+
kind:
33+
description: |-
34+
Kind is a string value representing the REST resource this object represents.
35+
Servers may infer this from the endpoint the client submits requests to.
36+
Cannot be updated.
37+
In CamelCase.
38+
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
39+
type: string
40+
metadata:
41+
type: object
42+
spec:
43+
description: PrometheusRuleSpec holds the alert rule groups.
44+
properties:
45+
groups:
46+
items:
47+
description: RuleGroup is a named group of alert rules.
48+
properties:
49+
name:
50+
type: string
51+
rules:
52+
items:
53+
description: Rule represents a single Prometheus alerting
54+
rule.
55+
properties:
56+
alert:
57+
type: string
58+
annotations:
59+
additionalProperties:
60+
type: string
61+
type: object
62+
expr:
63+
anyOf:
64+
- type: integer
65+
- type: string
66+
x-kubernetes-int-or-string: true
67+
for:
68+
type: string
69+
labels:
70+
additionalProperties:
71+
type: string
72+
type: object
73+
required:
74+
- expr
75+
type: object
76+
type: array
77+
required:
78+
- name
79+
- rules
80+
type: object
81+
type: array
82+
required:
83+
- groups
84+
type: object
85+
required:
86+
- spec
87+
type: object
88+
served: true
89+
storage: true
Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
---
2+
apiVersion: apiextensions.k8s.io/v1
3+
kind: CustomResourceDefinition
4+
metadata:
5+
annotations:
6+
controller-gen.kubebuilder.io/version: v0.20.0
7+
name: servicemonitors.
8+
spec:
9+
group: ""
10+
names:
11+
kind: ServiceMonitor
12+
listKind: ServiceMonitorList
13+
plural: servicemonitors
14+
singular: servicemonitor
15+
scope: Namespaced
16+
versions:
17+
- name: ""
18+
schema:
19+
openAPIV3Schema:
20+
description: |-
21+
ServiceMonitor is a minimal representation of monitoring.coreos.com/v1 ServiceMonitor.
22+
We define our own struct to avoid the heavy prometheus-operator dependency.
23+
In production, convert this to the actual CRD type when applying to Kubernetes.
24+
properties:
25+
apiVersion:
26+
description: |-
27+
APIVersion defines the versioned schema of this representation of an object.
28+
Servers should convert recognized schemas to the latest internal value, and
29+
may reject unrecognized values.
30+
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
31+
type: string
32+
kind:
33+
description: |-
34+
Kind is a string value representing the REST resource this object represents.
35+
Servers may infer this from the endpoint the client submits requests to.
36+
Cannot be updated.
37+
In CamelCase.
38+
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
39+
type: string
40+
metadata:
41+
type: object
42+
spec:
43+
description: ServiceMonitorSpec defines what the ServiceMonitor scrapes.
44+
properties:
45+
endpoints:
46+
items:
47+
description: Endpoint describes a single scrape endpoint.
48+
properties:
49+
interval:
50+
type: string
51+
path:
52+
type: string
53+
port:
54+
type: string
55+
scrapeTimeout:
56+
type: string
57+
required:
58+
- port
59+
type: object
60+
type: array
61+
selector:
62+
description: |-
63+
A label selector is a label query over a set of resources. The result of matchLabels and
64+
matchExpressions are ANDed. An empty label selector matches all objects. A null
65+
label selector matches no objects.
66+
properties:
67+
matchExpressions:
68+
description: matchExpressions is a list of label selector requirements.
69+
The requirements are ANDed.
70+
items:
71+
description: |-
72+
A label selector requirement is a selector that contains values, a key, and an operator that
73+
relates the key and values.
74+
properties:
75+
key:
76+
description: key is the label key that the selector applies
77+
to.
78+
type: string
79+
operator:
80+
description: |-
81+
operator represents a key's relationship to a set of values.
82+
Valid operators are In, NotIn, Exists and DoesNotExist.
83+
type: string
84+
values:
85+
description: |-
86+
values is an array of string values. If the operator is In or NotIn,
87+
the values array must be non-empty. If the operator is Exists or DoesNotExist,
88+
the values array must be empty. This array is replaced during a strategic
89+
merge patch.
90+
items:
91+
type: string
92+
type: array
93+
x-kubernetes-list-type: atomic
94+
required:
95+
- key
96+
- operator
97+
type: object
98+
type: array
99+
x-kubernetes-list-type: atomic
100+
matchLabels:
101+
additionalProperties:
102+
type: string
103+
description: |-
104+
matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
105+
map is equivalent to an element of matchExpressions, whose key field is "key", the
106+
operator is "In", and the values array contains only "value". The requirements are ANDed.
107+
type: object
108+
type: object
109+
x-kubernetes-map-type: atomic
110+
required:
111+
- endpoints
112+
- selector
113+
type: object
114+
required:
115+
- spec
116+
type: object
117+
served: true
118+
storage: true

0 commit comments

Comments
 (0)