Skip to content

Commit f0319d3

Browse files
i.kvasovsmira
authored andcommitted
fix: tcp webhook resource name and version
Fix copy-pasted names. Signed-off-by: Andrey Smirnov <[email protected]> (cherry picked from commit 86d8ebf)
1 parent fd6056c commit f0319d3

File tree

4 files changed

+41
-25
lines changed

4 files changed

+41
-25
lines changed

.conform.yaml

Lines changed: 29 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,21 @@
11
policies:
22
- type: commit
33
spec:
4-
headerLength: 89
54
dco: true
6-
gpg: false
7-
imperative: true
5+
gpg:
6+
required: true
7+
identity:
8+
gitHubOrganization: siderolabs
9+
spellcheck:
10+
locale: US
811
maximumOfOneCommit: true
9-
requireCommitBody: true
12+
header:
13+
length: 89
14+
imperative: true
15+
case: lower
16+
invalidLastCharacters: .
17+
body:
18+
required: true
1019
conventional:
1120
types:
1221
- chore
@@ -15,14 +24,29 @@ policies:
1524
- refactor
1625
- style
1726
- test
27+
- release
1828
scopes:
19-
- '*'
29+
- apid
30+
- machined
31+
- networkd
32+
- talosctl
33+
- trustd
34+
- talosctl
35+
- kernel
36+
- security
37+
- ^v1.1
2038
- type: license
2139
spec:
2240
skipPaths:
2341
- .git/
2442
includeSuffixes:
2543
- .go
44+
excludeSuffixes:
45+
- .pb.go
46+
- _string.go
47+
- _enumer.go
48+
- _string_linux.go
49+
- zz_generated.deepcopy.go
2650
header: |
2751
// This Source Code Form is subject to the terms of the Mozilla Public
2852
// License, v. 2.0. If a copy of the MPL was not distributed with this

api/v1alpha3/taloscontrolplane_webhook.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// This Source Code Form is subject to the terms of the Mozilla Public
2+
// License, v. 2.0. If a copy of the MPL was not distributed with this
3+
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
4+
15
package v1alpha3
26

37
import (
@@ -15,7 +19,7 @@ func (r *TalosControlPlane) SetupWebhookWithManager(mgr ctrl.Manager) error {
1519
Complete()
1620
}
1721

18-
// +kubebuilder:webhook:verbs=create;update,path=/mutate-controlplane-cluster-x-k8s-io-v1beta1-kubeadmcontrolplane,mutating=true,failurePolicy=fail,matchPolicy=Equivalent,groups=controlplane.cluster.x-k8s.io,resources=kubeadmcontrolplanes,versions=v1beta1,name=default.kubeadmcontrolplane.controlplane.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1
22+
// +kubebuilder:webhook:verbs=create;update,path=/mutate-controlplane-cluster-x-k8s-io-v1alpha3-taloscontrolplane,mutating=true,failurePolicy=fail,matchPolicy=Equivalent,groups=controlplane.cluster.x-k8s.io,resources=taloscontrolplanes,versions=v1alpha3,name=default.taloscontrolplane.controlplane.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1
1923

2024
var _ webhook.Defaulter = &TalosControlPlane{}
2125

config/webhook/manifests.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,18 @@ webhooks:
1212
service:
1313
name: webhook-service
1414
namespace: system
15-
path: /mutate-controlplane-cluster-x-k8s-io-v1beta1-kubeadmcontrolplane
15+
path: /mutate-controlplane-cluster-x-k8s-io-v1alpha3-taloscontrolplane
1616
failurePolicy: Fail
1717
matchPolicy: Equivalent
18-
name: default.kubeadmcontrolplane.controlplane.cluster.x-k8s.io
18+
name: default.taloscontrolplane.controlplane.cluster.x-k8s.io
1919
rules:
2020
- apiGroups:
2121
- controlplane.cluster.x-k8s.io
2222
apiVersions:
23-
- v1beta1
23+
- v1alpha3
2424
operations:
2525
- CREATE
2626
- UPDATE
2727
resources:
28-
- kubeadmcontrolplanes
28+
- taloscontrolplanes
2929
sideEffects: None

main.go

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,6 @@
1-
/*
2-
3-
4-
Licensed under the Apache License, Version 2.0 (the "License");
5-
you may not use this file except in compliance with the License.
6-
You may obtain a copy of the License at
7-
8-
http://www.apache.org/licenses/LICENSE-2.0
9-
10-
Unless required by applicable law or agreed to in writing, software
11-
distributed under the License is distributed on an "AS IS" BASIS,
12-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-
See the License for the specific language governing permissions and
14-
limitations under the License.
15-
*/
1+
// This Source Code Form is subject to the terms of the Mozilla Public
2+
// License, v. 2.0. If a copy of the MPL was not distributed with this
3+
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
164

175
package main
186

0 commit comments

Comments
 (0)