Skip to content

Commit a05cdd8

Browse files
authored
fix broken CI caused by upgrading controller-gen (#691)
Signed-off-by: spacewander <[email protected]>
1 parent aa7c245 commit a05cdd8

File tree

6 files changed

+231
-188
lines changed

6 files changed

+231
-188
lines changed

.github/workflows/lint.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,11 @@ jobs:
5757
echo "Generated files are not up-to-date. Please run 'make gen-crd-code' and commit changes."
5858
exit 1
5959
fi
60-
pushd controller/
61-
make manifests generate
60+
make gen-manifests
6261
if ! git diff --exit-code; then
63-
echo "Generated files are not up-to-date. Please run 'make manifests generate' under controller/ and commit changes."
62+
echo "Generated files are not up-to-date. Please run 'make gen-manifests' and commit changes."
6463
exit 1
6564
fi
66-
popd
6765
make gen-helm
6866
if ! git diff --exit-code; then
6967
echo "Generated files are not up-to-date. Please run 'make gen-helm' and commit changes."

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ gen-crd-code: $(LOCALBIN) install-go-fmtter
4040
LOCALBIN=$(LOCALBIN) tools/gen-crd-code.sh
4141
$(LOCALBIN)/gosimports -w -local ${PROJECT_NAME} ./types/pkg/client
4242

43+
.PHONY: gen-manifests
44+
gen-manifests:
45+
cd controller/ && make manifests generate
46+
4347
.PHONY: gen-helm-docs
4448
gen-helm-docs: $(LOCALBIN)
4549
test -x $(LOCALBIN)/helm-docs || GOBIN=$(LOCALBIN) go install github.com/norwoodj/helm-docs/cmd/[email protected]

manifests/charts/htnn-controller/templates/crds/htnn.mosn.io_consumers.yaml

Lines changed: 42 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
33
kind: CustomResourceDefinition
44
metadata:
55
annotations:
6-
controller-gen.kubebuilder.io/version: v0.13.0
6+
controller-gen.kubebuilder.io/version: v0.14.0
77
name: consumers.htnn.mosn.io
88
spec:
99
group: htnn.mosn.io
@@ -20,14 +20,19 @@ spec:
2020
description: Consumer is the Schema for the consumers API
2121
properties:
2222
apiVersion:
23-
description: 'APIVersion defines the versioned schema of this representation
24-
of an object. Servers should convert recognized schemas to the latest
25-
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
23+
description: |-
24+
APIVersion defines the versioned schema of this representation of an object.
25+
Servers should convert recognized schemas to the latest internal value, and
26+
may reject unrecognized values.
27+
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
2628
type: string
2729
kind:
28-
description: 'Kind is a string value representing the REST resource this
29-
object represents. Servers may infer this from the endpoint the client
30-
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
30+
description: |-
31+
Kind is a string value representing the REST resource this object represents.
32+
Servers may infer this from the endpoint the client submits requests to.
33+
Cannot be updated.
34+
In CamelCase.
35+
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
3136
type: string
3237
metadata:
3338
type: object
@@ -71,42 +76,42 @@ spec:
7176
description: Conditions describe the current conditions.
7277
items:
7378
description: "Condition contains details for one aspect of the current
74-
state of this API Resource. --- This struct is intended for direct
75-
use as an array at the field path .status.conditions. For example,
76-
\n type FooStatus struct{ // Represents the observations of a
77-
foo's current state. // Known .status.conditions.type are: \"Available\",
78-
\"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge
79-
// +listType=map // +listMapKey=type Conditions []metav1.Condition
80-
`json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\"
81-
protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }"
79+
state of this API Resource.\n---\nThis struct is intended for
80+
direct use as an array at the field path .status.conditions. For
81+
example,\n\n\n\ttype FooStatus struct{\n\t // Represents the
82+
observations of a foo's current state.\n\t // Known .status.conditions.type
83+
are: \"Available\", \"Progressing\", and \"Degraded\"\n\t //
84+
+patchMergeKey=type\n\t // +patchStrategy=merge\n\t // +listType=map\n\t
85+
\ // +listMapKey=type\n\t Conditions []metav1.Condition `json:\"conditions,omitempty\"
86+
patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"`\n\n\n\t
87+
\ // other fields\n\t}"
8288
properties:
8389
lastTransitionTime:
84-
description: lastTransitionTime is the last time the condition
85-
transitioned from one status to another. This should be when
86-
the underlying condition changed. If that is not known, then
87-
using the time when the API field changed is acceptable.
90+
description: |-
91+
lastTransitionTime is the last time the condition transitioned from one status to another.
92+
This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.
8893
format: date-time
8994
type: string
9095
message:
91-
description: message is a human readable message indicating
92-
details about the transition. This may be an empty string.
96+
description: |-
97+
message is a human readable message indicating details about the transition.
98+
This may be an empty string.
9399
maxLength: 32768
94100
type: string
95101
observedGeneration:
96-
description: observedGeneration represents the .metadata.generation
97-
that the condition was set based upon. For instance, if .metadata.generation
98-
is currently 12, but the .status.conditions[x].observedGeneration
99-
is 9, the condition is out of date with respect to the current
100-
state of the instance.
102+
description: |-
103+
observedGeneration represents the .metadata.generation that the condition was set based upon.
104+
For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date
105+
with respect to the current state of the instance.
101106
format: int64
102107
minimum: 0
103108
type: integer
104109
reason:
105-
description: reason contains a programmatic identifier indicating
106-
the reason for the condition's last transition. Producers
107-
of specific condition types may define expected values and
108-
meanings for this field, and whether the values are considered
109-
a guaranteed API. The value should be a CamelCase string.
110+
description: |-
111+
reason contains a programmatic identifier indicating the reason for the condition's last transition.
112+
Producers of specific condition types may define expected values and meanings for this field,
113+
and whether the values are considered a guaranteed API.
114+
The value should be a CamelCase string.
110115
This field may not be empty.
111116
maxLength: 1024
112117
minLength: 1
@@ -120,11 +125,12 @@ spec:
120125
- Unknown
121126
type: string
122127
type:
123-
description: type of condition in CamelCase or in foo.example.com/CamelCase.
124-
--- Many .condition.type values are consistent across resources
125-
like Available, but because arbitrary conditions can be useful
126-
(see .node.status.conditions), the ability to deconflict is
127-
important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
128+
description: |-
129+
type of condition in CamelCase or in foo.example.com/CamelCase.
130+
---
131+
Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be
132+
useful (see .node.status.conditions), the ability to deconflict is important.
133+
The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
128134
maxLength: 316
129135
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
130136
type: string

0 commit comments

Comments
 (0)