Skip to content

Commit fc101fb

Browse files
committed
fixup
1 parent 47555e7 commit fc101fb

15 files changed

+92
-73
lines changed

src/operator/api/v2alpha1/approved_clientintents_types.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ func init() {
2222
//+kubebuilder:object:root=true
2323
//+kubebuilder:subresource:status
2424

25-
// ApprovedClientIntents is the Schema for the intents API
2625
type ApprovedClientIntents struct {
2726
metav1.TypeMeta `json:",inline" yaml:",inline"`
2827
metav1.ObjectMeta `json:"metadata,omitempty" yaml:"metadata,omitempty"`

src/operator/api/v2alpha1/clientintents_types.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -354,6 +354,7 @@ type ResolvedIPs struct {
354354
IPs []string `json:"ips,omitempty" yaml:"ips,omitempty"`
355355
}
356356

357+
// +kubebuilder:validation:Enum=APPROVED;PENDING;DENIED
357358
type ReviewStatus string
358359

359360
const (
@@ -373,8 +374,8 @@ type AzureKeyVaultPolicy struct {
373374
StoragePermissions []AzureKeyVaultStoragePermission `json:"storagePermissions,omitempty" yaml:"storagePermissions,omitempty"`
374375
}
375376

376-
// IntentsStatus defines the observed state of ClientIntents
377-
type IntentsStatus struct {
377+
// ClientIntentsStatus defines the observed state of ClientIntents
378+
type ClientIntentsStatus struct {
378379
// upToDate field reflects whether the client intents have successfully been applied
379380
// to the cluster to the state specified
380381
// +optional
@@ -402,8 +403,8 @@ type ClientIntents struct {
402403
metav1.TypeMeta `json:",inline" yaml:",inline"`
403404
metav1.ObjectMeta `json:"metadata,omitempty" yaml:"metadata,omitempty"`
404405

405-
Spec *IntentsSpec `json:"spec,omitempty" yaml:"spec,omitempty"`
406-
Status IntentsStatus `json:"status,omitempty" yaml:"status,omitempty"`
406+
Spec *IntentsSpec `json:"spec,omitempty" yaml:"spec,omitempty"`
407+
Status ClientIntentsStatus `json:"status,omitempty" yaml:"status,omitempty"`
407408
}
408409

409410
//+kubebuilder:object:root=true

src/operator/api/v2alpha1/webhooks_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ func (t *WebhooksTestSuite) TestProtectedServiceConversion() {
149149
func (t *WebhooksTestSuite) TestClientIntentsKubernetes() {
150150
// Create a ClientIntents with random data
151151
original := &ClientIntents{
152-
Status: IntentsStatus{ObservedGeneration: 1, UpToDate: true, ResolvedIPs: []ResolvedIPs{{DNS: "a.test", IPs: []string{"1.3.3.7"}}}},
152+
Status: ClientIntentsStatus{ObservedGeneration: 1, UpToDate: true, ResolvedIPs: []ResolvedIPs{{DNS: "a.test", IPs: []string{"1.3.3.7"}}}},
153153
ObjectMeta: metav1.ObjectMeta{
154154
Name: "test",
155155
Namespace: "test",

src/operator/api/v2alpha1/zz_generated.deepcopy.go

Lines changed: 22 additions & 22 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/operator/api/v2beta1/approved_clientintents_types.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ func init() {
2323
//+kubebuilder:subresource:status
2424
//+kubebuilder:storageversion
2525

26-
// ApprovedClientIntents is the Schema for the intents API
2726
type ApprovedClientIntents struct {
2827
metav1.TypeMeta `json:",inline" yaml:",inline"`
2928
metav1.ObjectMeta `json:"metadata,omitempty" yaml:"metadata,omitempty"`

src/operator/api/v2beta1/clientintents_types.go

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,8 @@ type ResolvedIPs struct {
351351
IPs []string `json:"ips,omitempty" yaml:"ips,omitempty"`
352352
}
353353

354+
// +kubebuilder:validation:Enum=APPROVED;PENDING;DENIED
355+
354356
type ReviewStatus string
355357

356358
const (
@@ -370,8 +372,8 @@ type AzureKeyVaultPolicy struct {
370372
StoragePermissions []AzureKeyVaultStoragePermission `json:"storagePermissions,omitempty" yaml:"storagePermissions,omitempty"`
371373
}
372374

373-
// IntentsStatus defines the observed state of ClientIntents
374-
type IntentsStatus struct {
375+
// ClientIntentsStatus defines the observed state of ClientIntents
376+
type ClientIntentsStatus struct {
375377
// upToDate field reflects whether the client intents have successfully been applied
376378
// to the cluster to the state specified
377379
// +optional
@@ -399,8 +401,8 @@ type ClientIntents struct {
399401
metav1.TypeMeta `json:",inline" yaml:",inline"`
400402
metav1.ObjectMeta `json:"metadata,omitempty" yaml:"metadata,omitempty"`
401403

402-
Spec *IntentsSpec `json:"spec,omitempty" yaml:"spec,omitempty"`
403-
Status IntentsStatus `json:"status,omitempty" yaml:"status,omitempty"`
404+
Spec *IntentsSpec `json:"spec,omitempty" yaml:"spec,omitempty"`
405+
Status ClientIntentsStatus `json:"status,omitempty" yaml:"status,omitempty"`
404406
}
405407

406408
//+kubebuilder:object:root=true

src/operator/api/v2beta1/zz_generated.deepcopy.go

Lines changed: 22 additions & 22 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/operator/config/crd/k8s.otterize.com_approvedclientintents.patched

Lines changed: 0 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/operator/config/crd/k8s.otterize.com_approvedclientintents.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ spec:
1717
- name: v2alpha1
1818
schema:
1919
openAPIV3Schema:
20-
description: ApprovedClientIntents is the Schema for the intents API
2120
properties:
2221
apiVersion:
2322
description: |-
@@ -349,7 +348,6 @@ spec:
349348
- name: v2beta1
350349
schema:
351350
openAPIV3Schema:
352-
description: ApprovedClientIntents is the Schema for the intents API
353351
properties:
354352
apiVersion:
355353
description: |-

src/operator/config/crd/k8s.otterize.com_clientintents.patched

Lines changed: 10 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)