Skip to content

Commit c8d3576

Browse files
committed
Use kubebuilder style code
Signed-off-by: Tamal Saha <[email protected]>
1 parent 239f1fc commit c8d3576

File tree

1,489 files changed

+689
-293706
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,489 files changed

+689
-293706
lines changed

Makefile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ COMPRESS ?= no
2525

2626
# Produce CRDs that work back to Kubernetes 1.11 (no version conversion)
2727
CRD_OPTIONS ?= "crd:crdVersions={v1},allowDangerousTypes=true"
28-
CODE_GENERATOR_IMAGE ?= ghcr.io/appscode/gengo:release-1.29
28+
CODE_GENERATOR_IMAGE ?= ghcr.io/appscode/gengo:release-1.32
2929
API_GROUPS ?= supervisor:v1alpha1
3030

3131
# Where to push the docker image.
@@ -200,12 +200,12 @@ gen-crds:
200200
-v /tmp:/.cache \
201201
-v $$(pwd):$(DOCKER_REPO_ROOT) \
202202
-w $(DOCKER_REPO_ROOT) \
203-
--env HTTP_PROXY=$(HTTP_PROXY) \
204-
--env HTTPS_PROXY=$(HTTPS_PROXY) \
203+
--env HTTP_PROXY=$(HTTP_PROXY) \
204+
--env HTTPS_PROXY=$(HTTPS_PROXY) \
205205
$(CODE_GENERATOR_IMAGE) \
206206
controller-gen \
207-
$(CRD_OPTIONS) \
208-
paths="./apis/..." \
207+
$(CRD_OPTIONS) \
208+
paths="./apis/..." \
209209
output:crd:artifacts:config=crds
210210

211211
.PHONY: manifests

crds/supervisor.appscode.com_approvalpolicies.yaml

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,29 +20,38 @@ spec:
2020
description: ApprovalPolicy is the Schema for the approvalpolicies 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
maintenanceWindowRef:
33-
description: Specifies MaintenanceWindow reference for ApprovalPolicy.
34-
Recommendation will be executed in this MaintenanceWindow without manual
35-
approval.
38+
description: |-
39+
Specifies MaintenanceWindow reference for ApprovalPolicy.
40+
Recommendation will be executed in this MaintenanceWindow without manual approval.
3641
properties:
3742
apiGroup:
3843
type: string
3944
kind:
4045
type: string
4146
name:
42-
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
47+
description: |-
48+
Name of the referent.
49+
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
4350
type: string
4451
namespace:
45-
description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
52+
description: |-
53+
Namespace of the referent.
54+
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/
4655
type: string
4756
required:
4857
- name

crds/supervisor.appscode.com_clustermaintenancewindows.yaml

Lines changed: 61 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -28,25 +28,34 @@ spec:
2828
API
2929
properties:
3030
apiVersion:
31-
description: 'APIVersion defines the versioned schema of this representation
32-
of an object. Servers should convert recognized schemas to the latest
33-
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
31+
description: |-
32+
APIVersion defines the versioned schema of this representation of an object.
33+
Servers should convert recognized schemas to the latest internal value, and
34+
may reject unrecognized values.
35+
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
3436
type: string
3537
kind:
36-
description: 'Kind is a string value representing the REST resource this
37-
object represents. Servers may infer this from the endpoint the client
38-
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
38+
description: |-
39+
Kind is a string value representing the REST resource this object represents.
40+
Servers may infer this from the endpoint the client submits requests to.
41+
Cannot be updated.
42+
In CamelCase.
43+
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
3944
type: string
4045
metadata:
4146
type: object
4247
spec:
4348
description: MaintenanceWindowSpec defines the desired state of MaintenanceWindow
4449
properties:
4550
dates:
46-
description: 'Dates consists of a list of Dates as Maintenance time.
47-
Dates are always needed to be given in UTC format. Format: yyyy-mm-ddThh.mm.ssZ
48-
[Here Z stands for Zero time zone / UTC time zone / GMT (+0000)]
49-
Example: dates: - start: 2022-01-24T00:00:18Z end: 2022-01-24T23:41:18Z'
51+
description: |-
52+
Dates consists of a list of Dates as Maintenance time.
53+
Dates are always needed to be given in UTC format.
54+
Format: yyyy-mm-ddThh.mm.ssZ [Here Z stands for Zero time zone / UTC time zone / GMT (+0000)]
55+
Example:
56+
dates:
57+
- start: 2022-01-24T00:00:18Z
58+
end: 2022-01-24T23:41:18Z
5059
items:
5160
properties:
5261
end:
@@ -75,19 +84,26 @@ spec:
7584
- start
7685
type: object
7786
type: array
78-
description: 'Days consists of a map of DayOfWeek and corresponding
79-
list of TimeWindow. There is `Logical OR` relationship between Days
80-
and Dates. Example: days: Monday: - start: 10:40AM end: 7:00PM'
87+
description: |-
88+
Days consists of a map of DayOfWeek and corresponding list of TimeWindow.
89+
There is `Logical OR` relationship between Days and Dates.
90+
Example:
91+
days:
92+
Monday:
93+
- start: 10:40AM
94+
end: 7:00PM
8195
type: object
8296
isDefault:
8397
type: boolean
8498
timezone:
85-
description: "If the Timezone is not set or \"\" or \"UTC\", the given
86-
times and dates are considered as UTC. If the name is \"Local\",
87-
the given times and dates are considered as server local timezone.
88-
\n Otherwise, the Timezone should specify a location name corresponding
89-
to a file in the IANA Time Zone database, such as \"Asia/Dhaka\",
90-
\"America/New_York\", . Ref: https://www.iana.org/time-zones https://en.wikipedia.org/wiki/List_of_tz_database_time_zones"
99+
description: |-
100+
If the Timezone is not set or "" or "UTC", the given times and dates are considered as UTC.
101+
If the name is "Local", the given times and dates are considered as server local timezone.
102+
103+
Otherwise, the Timezone should specify a location name corresponding to a file
104+
in the IANA Time Zone database, such as "Asia/Dhaka", "America/New_York", .
105+
Ref: https://www.iana.org/time-zones
106+
https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
91107
type: string
92108
type: object
93109
status:
@@ -101,43 +117,44 @@ spec:
101117
state.
102118
properties:
103119
lastTransitionTime:
104-
description: Last time the condition transitioned from one status
105-
to another. This should be when the underlying condition changed.
106-
If that is not known, then using the time when the API field
107-
changed is acceptable.
120+
description: |-
121+
Last time the condition transitioned from one status to another.
122+
This should be when the underlying condition changed. If that is not known, then using the time when
123+
the API field changed is acceptable.
108124
format: date-time
109125
type: string
110126
message:
111-
description: A human-readable message indicating details about
112-
the transition. This field may be empty.
127+
description: |-
128+
A human-readable message indicating details about the transition.
129+
This field may be empty.
113130
type: string
114131
observedGeneration:
115-
description: If set, this represents the .metadata.generation
116-
that the condition was set based upon. For instance, if .metadata.generation
117-
is currently 12, but the .status.condition[x].observedGeneration
118-
is 9, the condition is out of date with respect to the current
119-
state of the instance.
132+
description: |-
133+
If set, this represents the .metadata.generation that the condition was set based upon.
134+
For instance, if .metadata.generation is currently 12, but the .status.condition[x].observedGeneration is 9, the condition is out of date
135+
with respect to the current state of the instance.
120136
format: int64
121137
type: integer
122138
reason:
123-
description: The reason for the condition's last transition
124-
in CamelCase. The specific API may choose whether this field
125-
is considered a guaranteed API. This field may not be empty.
139+
description: |-
140+
The reason for the condition's last transition in CamelCase.
141+
The specific API may choose whether this field is considered a guaranteed API.
142+
This field may not be empty.
126143
type: string
127144
severity:
128-
description: Severity provides an explicit classification of
129-
Reason code, so the users or machines can immediately understand
130-
the current situation and act accordingly. The Severity field
131-
MUST be set only when Status=False.
145+
description: |-
146+
Severity provides an explicit classification of Reason code, so the users or machines can immediately
147+
understand the current situation and act accordingly.
148+
The Severity field MUST be set only when Status=False.
132149
type: string
133150
status:
134151
description: Status of the condition, one of True, False, Unknown.
135152
type: string
136153
type:
137-
description: Type of condition in CamelCase or in foo.example.com/CamelCase.
138-
Many .condition.type values are consistent across resources
139-
like Available, but because arbitrary util can be useful (see
140-
.node.status.util), the ability to deconflict is important.
154+
description: |-
155+
Type of condition in CamelCase or in foo.example.com/CamelCase.
156+
Many .condition.type values are consistent across resources like Available, but because arbitrary util
157+
can be useful (see .node.status.util), the ability to deconflict is important.
141158
type: string
142159
required:
143160
- lastTransitionTime
@@ -146,9 +163,9 @@ spec:
146163
type: object
147164
type: array
148165
observedGeneration:
149-
description: observedGeneration is the most recent generation observed
150-
for this resource. It corresponds to the resource's generation,
151-
which is updated on mutation by the API Server.
166+
description: |-
167+
observedGeneration is the most recent generation observed for this resource. It corresponds to the
168+
resource's generation, which is updated on mutation by the API Server.
152169
format: int64
153170
type: integer
154171
status:

0 commit comments

Comments
 (0)