Skip to content

Commit

Permalink
added omitempty to enabled bool to avoid accidental overwriting
Browse files Browse the repository at this point in the history
  • Loading branch information
xadhatter committed May 22, 2024
1 parent e5966f3 commit 7afcba7
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
3 changes: 0 additions & 3 deletions api/crds/kubefox.xigxog.io_platforms.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4789,10 +4789,7 @@ spec:
address:
type: string
enabled:
default: false
type: boolean
required:
- enabled
type: object
logs:
properties:
Expand Down
3 changes: 1 addition & 2 deletions api/kubernetes/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,7 @@ type TelemetrySpec struct {
}

type CollectorSpec struct {
// +kubebuilder:default=false
Enabled bool `json:"enabled"`
Enabled bool `json:"enabled,omitempty"`
Address string `json:"address,omitempty"`
}

Expand Down
2 changes: 1 addition & 1 deletion docs/reference/kubernetes-crds.md
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ Used by:<br>

| Field | Type | Description | Validation |
| ----- | ---- | ----------- | ---------- |
| `enabled` | <div style="white-space:nowrap">boolean<div> | <div style="max-width:30rem"></div> | <div style="white-space:nowrap">default: false</div> |
| `enabled` | <div style="white-space:nowrap">boolean<div> | <div style="max-width:30rem"></div> | <div style="white-space:nowrap"></div> |
| `address` | <div style="white-space:nowrap">string<div> | <div style="max-width:30rem"></div> | <div style="white-space:nowrap"></div> |


Expand Down

0 comments on commit 7afcba7

Please sign in to comment.