Skip to content

Commit ac021f0

Browse files
committed
chore(ci-governance): synchronize Go profile onto main
Merge of current main into the profile sync branch to resolve the conflicts introduced by the dependency bumps consolidated in #94. Dependency pins from main are preserved (reviewdog/action-actionlint v1.77.0, github/codeql-action v4.38.2 across codeql.yml and the new scorecard-analysis.yml). Signed-off-by: Enrique Andrés Villar <enriqueavi@inditex.com>
2 parents 6af7b72 + bf3adef commit ac021f0

9 files changed

Lines changed: 66 additions & 56 deletions

File tree

‎.github/workflows/code-gomod_go-sonarcloud-analysis.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ jobs:
129129
130130
- name: Run SonarCloud analysis
131131
if: steps.sonar.outputs.enabled == 'true'
132-
uses: SonarSource/sonarqube-scan-action@22918119ff8e1ca75a623e15c8296b6ea4fbe28f # v8.2.1
132+
uses: SonarSource/sonarqube-scan-action@d209202bc7d53ff1cc128f7f907dac145c9d6ae9 # v8.3.0
133133
env:
134134
SONAR_HOST_URL: https://sonarcloud.io
135135
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

‎.github/workflows/codeql.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,12 +167,12 @@ jobs:
167167
asdf_version: ${{ env.ASDF_BRANCH_VERSION }}
168168

169169
- name: Initialize CodeQL
170-
uses: github/codeql-action/init@db488ddef3bf6cb639b32c2e9a7c0a7ea8271d28 # v4
170+
uses: github/codeql-action/init@2892aa5e19bbd11bc0cff5427e3b750a04d9e3c2 # v4
171171
with:
172172
build-mode: ${{ matrix.build-mode }}
173173
languages: ${{ matrix.language }}
174174

175175
- name: Perform CodeQL analysis
176-
uses: github/codeql-action/analyze@db488ddef3bf6cb639b32c2e9a7c0a7ea8271d28 # v4
176+
uses: github/codeql-action/analyze@2892aa5e19bbd11bc0cff5427e3b750a04d9e3c2 # v4
177177
with:
178178
category: /language:${{ matrix.language }}

‎.github/workflows/pr-verify.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
ref: ${{ github.event.pull_request.head.sha }}
2929

3030
- name: Lint GitHub Actions workflows
31-
uses: reviewdog/action-actionlint@320fcdd9c860767cf17fab3b20e22e739d5d02b8 # v1.76.0
31+
uses: reviewdog/action-actionlint@2085657ab2c7f48c58edcc767fba576f63bea76b # v1.77.0
3232
with:
3333
reporter: github-annotations
3434
fail_level: error

‎.github/workflows/push-verify.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
persist-credentials: false
3030

3131
- name: Lint GitHub Actions workflows
32-
uses: reviewdog/action-actionlint@320fcdd9c860767cf17fab3b20e22e739d5d02b8 # v1.76.0
32+
uses: reviewdog/action-actionlint@2085657ab2c7f48c58edcc767fba576f63bea76b # v1.77.0
3333
with:
3434
reporter: github-annotations
3535
fail_level: error

‎.github/workflows/scorecard-analysis.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ jobs:
9898
name: SARIF file
9999

100100
- name: Upload SARIF to Code Scanning
101-
uses: github/codeql-action/upload-sarif@db488ddef3bf6cb639b32c2e9a7c0a7ea8271d28 # v4.37.8
101+
uses: github/codeql-action/upload-sarif@2892aa5e19bbd11bc0cff5427e3b750a04d9e3c2 # v4.38.2
102102
with:
103103
sarif_file: results.sarif
104104
category: scorecard

‎chart/templates/02-rbac.yaml‎

Lines changed: 44 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -10,60 +10,67 @@ metadata:
1010
name: k8s-overcommit-clusterrole
1111
rules:
1212
- apiGroups:
13-
- '*'
13+
- ""
1414
resources:
15-
- '*'
15+
- events
16+
verbs:
17+
- create
18+
- patch
19+
- update
20+
- apiGroups:
21+
- ""
22+
resources:
23+
- pods
1624
verbs:
1725
- get
1826
- list
1927
- watch
2028
- apiGroups:
2129
- ""
2230
resources:
23-
- events
31+
- namespaces
2432
verbs:
25-
- create
26-
- patch
27-
- update
33+
- get
34+
- list
35+
- watch
2836
- apiGroups:
2937
- ""
3038
resources:
3139
- services
32-
- namespaces
3340
verbs:
3441
- create
42+
- delete
3543
- get
3644
- list
37-
- watch
38-
- delete
39-
- update
4045
- patch
46+
- update
47+
- watch
4148
- apiGroups:
4249
- admissionregistration.k8s.io
4350
resources:
4451
- mutatingwebhookconfigurations
4552
- validatingwebhookconfigurations
4653
verbs:
4754
- create
55+
- delete
4856
- get
4957
- list
50-
- watch
51-
- delete
52-
- update
5358
- patch
59+
- update
60+
- watch
5461
- apiGroups:
5562
- apps
5663
resources:
5764
- deployments
5865
- replicasets
5966
verbs:
6067
- create
68+
- delete
6169
- get
6270
- list
63-
- delete
71+
- patch
6472
- update
6573
- watch
66-
- update
6774
- apiGroups:
6875
- cert-manager.io
6976
resources:
@@ -77,9 +84,9 @@ rules:
7784
- update
7885
- watch
7986
- apiGroups:
80-
- overcommit.inditex.dev
87+
- coordination.k8s.io
8188
resources:
82-
- "*"
89+
- leases
8390
verbs:
8491
- create
8592
- delete
@@ -89,9 +96,10 @@ rules:
8996
- update
9097
- watch
9198
- apiGroups:
92-
- "coordination.k8s.io"
99+
- overcommit.inditex.dev
93100
resources:
94-
- leases
101+
- overcommitclasses
102+
- overcommits
95103
verbs:
96104
- create
97105
- delete
@@ -100,6 +108,22 @@ rules:
100108
- patch
101109
- update
102110
- watch
111+
- apiGroups:
112+
- overcommit.inditex.dev
113+
resources:
114+
- overcommitclasses/finalizers
115+
- overcommits/finalizers
116+
verbs:
117+
- update
118+
- apiGroups:
119+
- overcommit.inditex.dev
120+
resources:
121+
- overcommitclasses/status
122+
- overcommits/status
123+
verbs:
124+
- get
125+
- patch
126+
- update
103127
---
104128
apiVersion: rbac.authorization.k8s.io/v1
105129
kind: ClusterRoleBinding
@@ -125,4 +149,4 @@ roleRef:
125149
subjects:
126150
- kind: ServiceAccount
127151
name: {{ $.Values.serviceAccount.name }}
128-
namespace: {{ $.Values.namespace }}
152+
namespace: {{ $.Values.namespace }}

‎docs/architecture.md‎

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -274,21 +274,7 @@ func CalculateResources(limits corev1.ResourceList, class OvercommitClass) corev
274274

275275
### RBAC Permissions
276276

277-
The operator requires minimal permissions:
278-
279-
```yaml
280-
apiVersion: rbac.authorization.k8s.io/v1
281-
kind: ClusterRole
282-
metadata:
283-
name: manager-role
284-
rules:
285-
- apiGroups: [""]
286-
resources: ["pods"]
287-
verbs: ["get", "list", "watch"]
288-
- apiGroups: ["overcommit.inditex.dev"]
289-
resources: ["overcommits", "overcommitclasses"]
290-
verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]
291-
```
277+
The controller ClusterRole is defined in `config/rbac/role.yaml` (generated from kubebuilder markers). The Helm chart uses the same explicit rules, plus `namespaces` get/list/watch for label lookups, and keeps the binding to the built-in `view` ClusterRole for owner resolution.
292278

293279
### Certificate Management
294280

‎go.mod‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ go 1.26.8
55
require (
66
github.com/cert-manager/cert-manager v1.21.2
77
github.com/onsi/ginkgo/v2 v2.33.0
8-
github.com/onsi/gomega v1.43.1
8+
github.com/onsi/gomega v1.44.0
99
github.com/prometheus/client_golang v1.24.1
1010
github.com/stretchr/testify v1.12.1
11-
k8s.io/api v0.37.0
12-
k8s.io/apimachinery v0.37.0
13-
k8s.io/client-go v0.37.0
11+
k8s.io/api v0.37.1
12+
k8s.io/apimachinery v0.37.1
13+
k8s.io/client-go v0.37.1
1414
sigs.k8s.io/controller-runtime v0.25.1
1515
)
1616

@@ -100,7 +100,7 @@ require (
100100
k8s.io/component-base v0.37.0 // indirect
101101
k8s.io/klog/v2 v2.140.0 // indirect
102102
k8s.io/kube-openapi v0.0.0-20260721132016-d427ff9ee9ad // indirect
103-
k8s.io/streaming v0.37.0 // indirect
103+
k8s.io/streaming v0.37.1 // indirect
104104
k8s.io/utils v0.0.0-20260626114624-be93311217bd // indirect
105105
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.36.0 // indirect
106106
sigs.k8s.io/gateway-api v1.6.0 // indirect

‎go.sum‎

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,8 @@ github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq
127127
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
128128
github.com/onsi/ginkgo/v2 v2.33.0 h1:C8gBA6Uc2ZEubiV+SXiu5tZnMTwEmXHgkJwGozKtZf8=
129129
github.com/onsi/ginkgo/v2 v2.33.0/go.mod h1:+aXOY+vzZ5mu2iI2HpTZUPmM//oQfsNFX6gU9kNcA44=
130-
github.com/onsi/gomega v1.43.1 h1:vGIPFuYrIO6/0Z09s0I0QQQgFchiX4+tb1re3MScJYo=
131-
github.com/onsi/gomega v1.43.1/go.mod h1:e/C2HwaZ1DhvjzXXuFhcR7hY7Sh9pl7MmoWKEjzwcdA=
130+
github.com/onsi/gomega v1.44.0 h1:eAiGl3Pw5jz5GQdDff0BcxYpAX1JxW8xD7mFUuwNfZQ=
131+
github.com/onsi/gomega v1.44.0/go.mod h1:e/C2HwaZ1DhvjzXXuFhcR7hY7Sh9pl7MmoWKEjzwcdA=
132132
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
133133
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
134134
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
@@ -234,24 +234,24 @@ gopkg.in/evanphx/json-patch.v4 v4.13.0 h1:czT3CmqEaQ1aanPc5SdlgQrrEIb8w/wwCvWWnf
234234
gopkg.in/evanphx/json-patch.v4 v4.13.0/go.mod h1:p8EYWUEYMpynmqDbY58zCKCFZw8pRWMG4EsWvDvM72M=
235235
gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc=
236236
gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw=
237-
k8s.io/api v0.37.0 h1:Z//Vj9N7RA/yS2sDmxyeo7h+RR4zbUrd2vrd3Z0TbB4=
238-
k8s.io/api v0.37.0/go.mod h1:LKXgcJWMc+f4OLbP5SFR8rulEg07zZhpi/zMULiBImk=
237+
k8s.io/api v0.37.1 h1:l6N77U7tjwB5L056bgrBTJIEdevac/naBZ3iSvDNfpM=
238+
k8s.io/api v0.37.1/go.mod h1:zSlbB1YpJ1YQlFVQy20UYll81UJSJJUMLhkhvg6Z78M=
239239
k8s.io/apiextensions-apiserver v0.37.0 h1:zRMQ3+/LIE5oZ0tVvXwYHC+dIkSP5cjNWju7AZU1LOI=
240240
k8s.io/apiextensions-apiserver v0.37.0/go.mod h1:HU0PfSBwchHL5iDau6jjt9zU6ryWkDDlaVUiq91NK80=
241-
k8s.io/apimachinery v0.37.0 h1:Np2AbDtf8x6RDHiD8T9LbKJ9gaegeVNa8yNm5FuGKm0=
242-
k8s.io/apimachinery v0.37.0/go.mod h1:RN3nhprFSCxOi5Selxd7oMTXOe/c+ZbcE7Im+TS2zkE=
241+
k8s.io/apimachinery v0.37.1 h1:hGCYyvKHCwtwMitj2vU4vYx0Z16N9GyZk9BBnz0wDAE=
242+
k8s.io/apimachinery v0.37.1/go.mod h1:jF84AyUi/IRIXRot5f+lm6MpxoWI+F1XgjaMmwCdTFw=
243243
k8s.io/apiserver v0.37.0 h1:TXg7OxsOWrAH8J4Zi/gBAZuMw1Dfdd+6cca2h4qjRqo=
244244
k8s.io/apiserver v0.37.0/go.mod h1:OddHDF4gy9qyIb8o/3+qaeP6S0vEObWLgOygVqXksv0=
245-
k8s.io/client-go v0.37.0 h1:nsN31fy8wBySuZ+QRnKmrjRSQLOG2rvoGN0tKd12zhQ=
246-
k8s.io/client-go v0.37.0/go.mod h1:FcGqw+Ll/gNQiq+nPGY1Oyt9y7SgDh1d3MW3RFDEbn0=
245+
k8s.io/client-go v0.37.1 h1:QTv/5ha4jAHtW9qxxVBkQVFBRDb4jHfFopQqqMdc+wM=
246+
k8s.io/client-go v0.37.1/go.mod h1:dnAPtTnCNY38Ho04D2KdY1F4IKausa9UbqaAZKl60SY=
247247
k8s.io/component-base v0.37.0 h1:3SdSa4+itMdFTDFTeR8CxKGmSTSMXFlKL4ky8OqjguM=
248248
k8s.io/component-base v0.37.0/go.mod h1:LjOebp4R9y6LODWZQv102ZQxGheLcDO2ZJLAw6bbh4I=
249249
k8s.io/klog/v2 v2.140.0 h1:Tf+J3AH7xnUzZyVVXhTgGhEKnFqye14aadWv7bzXdzc=
250250
k8s.io/klog/v2 v2.140.0/go.mod h1:o+/RWfJ6PwpnFn7OyAG3QnO47BFsymfEfrz6XyYSSp0=
251251
k8s.io/kube-openapi v0.0.0-20260721132016-d427ff9ee9ad h1:oXImqH8mQNk7PmvzKhmN3ddJoY6OnyM225MXwGHPm0A=
252252
k8s.io/kube-openapi v0.0.0-20260721132016-d427ff9ee9ad/go.mod h1:0/mqHCVhlumdJ3BhCfnjSZQE037nAhNodh1/hK0T8/I=
253-
k8s.io/streaming v0.37.0 h1:iPBUZLZiKt5bV+lxJurASMOV07VuBhNpiwJt2//AWrM=
254-
k8s.io/streaming v0.37.0/go.mod h1:APlJR26ZWRcVy5bIEj0QRrKUXROtBHPcxl2NT7EAzPU=
253+
k8s.io/streaming v0.37.1 h1:TpzVfQeFuVndn2g9mFqxy1UcUYPwDzqjUmwR/IzJCWc=
254+
k8s.io/streaming v0.37.1/go.mod h1:APlJR26ZWRcVy5bIEj0QRrKUXROtBHPcxl2NT7EAzPU=
255255
k8s.io/utils v0.0.0-20260626114624-be93311217bd h1:Ea7fgQ5we8Y9T0OX5o0dAHzQOBRI07D/dEYRaB9ZZEs=
256256
k8s.io/utils v0.0.0-20260626114624-be93311217bd/go.mod h1:xDxuJ0whA3d0I4mf/C4ppKHxXynQ+fxnkmQH0vTHnuk=
257257
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.36.0 h1:/YpDJ4vReG7ZmzSpBGxduXgywWkJU9zHubgJG03MT+Y=

0 commit comments

Comments
 (0)