Skip to content

Commit 031aa7c

Browse files
Madhu-1mergify[bot]
authored andcommitted
api: update the csiaddonsnode status
adding a new fields to the csiaddonsnode status to represent the networkfenceclass and its client details. Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
1 parent c278fa6 commit 031aa7c

File tree

4 files changed

+134
-0
lines changed

4 files changed

+134
-0
lines changed

api/csiaddons/v1alpha1/csiaddonsnode_types.go

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,23 @@ type CSIAddonsNodeStatus struct {
7777

7878
// A list of capabilities advertised by the sidecar
7979
Capabilities []string `json:"capabilities,omitempty"`
80+
81+
// NetworkFenceClientStatus contains the status of the clients required for fencing.
82+
NetworkFenceClientStatus []NetworkFenceClientStatus `json:"networkFenceClientStatus,omitempty"`
83+
}
84+
85+
// NetworkFenceClientStatus contains the status of the clients required for fencing.
86+
type NetworkFenceClientStatus struct {
87+
NetworkFenceClassName string `json:"networkFenceClassName"`
88+
ClientDetails []ClientDetail `json:"ClientDetails"`
89+
}
90+
91+
// ClientDetail contains the details of the client required for fencing.
92+
type ClientDetail struct {
93+
// Id is the unique identifier of the client where it belongs to.
94+
Id string `json:"id"`
95+
// Cidrs is the list of CIDR blocks that are fenced.
96+
Cidrs []string `json:"cidrs"`
8097
}
8198

8299
//+kubebuilder:object:root=true

api/csiaddons/v1alpha1/zz_generated.deepcopy.go

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

config/crd/bases/csiaddons.openshift.io_csiaddonsnodes.yaml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,40 @@ spec:
104104
Message is a human-readable message indicating details about why the CSIAddonsNode
105105
is in this state.
106106
type: string
107+
networkFenceClientStatus:
108+
description: NetworkFenceClientStatus contains the status of the clients
109+
required for fencing.
110+
items:
111+
description: NetworkFenceClientStatus contains the status of the
112+
clients required for fencing.
113+
properties:
114+
ClientDetails:
115+
items:
116+
description: ClientDetail contains the details of the client
117+
required for fencing.
118+
properties:
119+
cidrs:
120+
description: Cidrs is the list of CIDR blocks that are
121+
fenced.
122+
items:
123+
type: string
124+
type: array
125+
id:
126+
description: Id is the unique identifier of the client
127+
where it belongs to.
128+
type: string
129+
required:
130+
- cidrs
131+
- id
132+
type: object
133+
type: array
134+
networkFenceClassName:
135+
type: string
136+
required:
137+
- ClientDetails
138+
- networkFenceClassName
139+
type: object
140+
type: array
107141
reason:
108142
description: |-
109143
Reason is a brief CamelCase string that describes any failure and is meant

deploy/controller/crds.yaml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,40 @@ spec:
103103
Message is a human-readable message indicating details about why the CSIAddonsNode
104104
is in this state.
105105
type: string
106+
networkFenceClientStatus:
107+
description: NetworkFenceClientStatus contains the status of the clients
108+
required for fencing.
109+
items:
110+
description: NetworkFenceClientStatus contains the status of the
111+
clients required for fencing.
112+
properties:
113+
ClientDetails:
114+
items:
115+
description: ClientDetail contains the details of the client
116+
required for fencing.
117+
properties:
118+
cidrs:
119+
description: Cidrs is the list of CIDR blocks that are
120+
fenced.
121+
items:
122+
type: string
123+
type: array
124+
id:
125+
description: Id is the unique identifier of the client
126+
where it belongs to.
127+
type: string
128+
required:
129+
- cidrs
130+
- id
131+
type: object
132+
type: array
133+
networkFenceClassName:
134+
type: string
135+
required:
136+
- ClientDetails
137+
- networkFenceClassName
138+
type: object
139+
type: array
106140
reason:
107141
description: |-
108142
Reason is a brief CamelCase string that describes any failure and is meant

0 commit comments

Comments
 (0)