Skip to content

Commit 44bbc87

Browse files
committed
enabled commentstart linter and addressed findings
1 parent cfdcb14 commit 44bbc87

File tree

5 files changed

+14
-14
lines changed

5 files changed

+14
-14
lines changed

.golangci-kal.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ linters:
2525
#- "nobools" # Bools do not evolve over time, should use enums instead.
2626
#- "nofloats" # Ensure floats are not used.
2727
#- "optionalorrequired" # Every field should be marked as `+optional` or `+required`.
28-
# - "requiredfields" # Required fields should not be pointers, and should not have `omitempty`.
28+
- "requiredfields" # Required fields should not be pointers, and should not have `omitempty`.
2929
- "statussubresource" # All root objects that have a `status` field should have a status subresource.
3030

3131
# Linters below this line are disabled, pending conversation on how and when to enable them.
@@ -45,11 +45,11 @@ linters:
4545
# pointerPolicy: Warn | SuggestFix # Defaults to `SuggestFix`. We want our required fields to not be pointers.
4646

4747
exclusions:
48-
generated: strict
49-
paths:
50-
- zz_generated.*\.go$
51-
- ".*_test.go" # Exclude test files.
52-
rules:
48+
generated: strict
49+
paths:
50+
- zz_generated.*\.go$
51+
- ".*_test.go" # Exclude test files.
52+
rules:
5353
# KAL should only run on API folders.
5454
- path-except: "api//*"
5555
linters:

controlplane/eks/api/v1beta1/types.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ type OIDCIdentityProviderConfig struct {
223223
// This is also known as audience. The ID for the client application that makes
224224
// authentication requests to the OpenID identity provider.
225225
// +kubebuilder:validation:Required
226-
ClientID string `json:"clientId,omitempty"`
226+
ClientID string `json:"clientId"`
227227

228228
// The JWT claim that the provider uses to return your groups.
229229
// +optional
@@ -239,7 +239,7 @@ type OIDCIdentityProviderConfig struct {
239239
//
240240
// IdentityProviderConfigName is a required field
241241
// +kubebuilder:validation:Required
242-
IdentityProviderConfigName string `json:"identityProviderConfigName,omitempty"`
242+
IdentityProviderConfigName string `json:"identityProviderConfigName"`
243243

244244
// The URL of the OpenID identity provider that allows the API server to discover
245245
// public signing keys for verifying tokens. The URL must begin with https://
@@ -250,7 +250,7 @@ type OIDCIdentityProviderConfig struct {
250250
// and must be publicly accessible over the internet.
251251
//
252252
// +kubebuilder:validation:Required
253-
IssuerURL string `json:"issuerUrl,omitempty"`
253+
IssuerURL string `json:"issuerUrl"`
254254

255255
// The key value pairs that describe required claims in the identity token.
256256
// If set, each claim is verified to be present in the token with a matching

controlplane/eks/api/v1beta2/types.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ type OIDCIdentityProviderConfig struct {
227227
// This is also known as audience. The ID for the client application that makes
228228
// authentication requests to the OpenID identity provider.
229229
// +kubebuilder:validation:Required
230-
ClientID string `json:"clientId,omitempty"`
230+
ClientID string `json:"clientId"`
231231

232232
// The JWT claim that the provider uses to return your groups.
233233
// +optional
@@ -243,7 +243,7 @@ type OIDCIdentityProviderConfig struct {
243243
//
244244
// IdentityProviderConfigName is a required field
245245
// +kubebuilder:validation:Required
246-
IdentityProviderConfigName string `json:"identityProviderConfigName,omitempty"`
246+
IdentityProviderConfigName string `json:"identityProviderConfigName"`
247247

248248
// The URL of the OpenID identity provider that allows the API server to discover
249249
// public signing keys for verifying tokens. The URL must begin with https://
@@ -254,7 +254,7 @@ type OIDCIdentityProviderConfig struct {
254254
// and must be publicly accessible over the internet.
255255
//
256256
// +kubebuilder:validation:Required
257-
IssuerURL string `json:"issuerUrl,omitempty"`
257+
IssuerURL string `json:"issuerUrl"`
258258

259259
// The key value pairs that describe required claims in the identity token.
260260
// If set, each claim is verified to be present in the token with a matching

exp/api/v1beta1/types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ type EBS struct {
5353
type BlockDeviceMapping struct {
5454
// The device name exposed to the EC2 instance (for example, /dev/sdh or xvdh).
5555
// +kubebuilder:validation:Required
56-
DeviceName string `json:"deviceName,omitempty"`
56+
DeviceName string `json:"deviceName"`
5757

5858
// You can specify either VirtualName or Ebs, but not both.
5959
// +optional

exp/api/v1beta2/types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ type EBS struct {
5252
type BlockDeviceMapping struct {
5353
// The device name exposed to the EC2 instance (for example, /dev/sdh or xvdh).
5454
// +kubebuilder:validation:Required
55-
DeviceName string `json:"deviceName,omitempty"`
55+
DeviceName string `json:"deviceName"`
5656

5757
// You can specify either VirtualName or Ebs, but not both.
5858
// +optional

0 commit comments

Comments
 (0)