Skip to content

Commit 97c238e

Browse files
committed
wip
1 parent 2afcc9f commit 97c238e

20 files changed

+109
-348
lines changed

Tiltfile

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,16 +42,11 @@ k8s_yaml(device_yaml())
4242
k8s_resource(new_name='leaf1', objects=['leaf1:device', 'secret-basic-auth:secret'], trigger_mode=TRIGGER_MODE_MANUAL, auto_init=False)
4343

4444
k8s_yaml('./config/samples/v1alpha1_interface.yaml')
45-
k8s_yaml('./config/samples/cisco/nx/v1alpha1_portchannelconfig.yaml')
4645
k8s_resource(new_name='lo0', objects=['lo0:interface'], trigger_mode=TRIGGER_MODE_MANUAL, auto_init=False)
4746
k8s_resource(new_name='lo1', objects=['lo1:interface'], trigger_mode=TRIGGER_MODE_MANUAL, auto_init=False)
4847
k8s_resource(new_name='eth1-1', objects=['eth1-1:interface'], trigger_mode=TRIGGER_MODE_MANUAL, auto_init=False)
4948
k8s_resource(new_name='eth1-2', objects=['eth1-2:interface'], trigger_mode=TRIGGER_MODE_MANUAL, auto_init=False)
5049
k8s_resource(new_name='svi-10', objects=['svi-10:interface'], resource_deps=['vlan-10'], trigger_mode=TRIGGER_MODE_MANUAL, auto_init=False)
51-
k8s_resource(new_name='eth1-10', objects=['eth1-10:interface'], trigger_mode=TRIGGER_MODE_MANUAL, auto_init=False)
52-
# Interface resources relevant to vPC configuration are defined below in the "vpcdomain" sample
53-
#k8s_resource(new_name='po1-cfg', objects=['po1-cfg:portchannelconfig'], trigger_mode=TRIGGER_MODE_MANUAL, auto_init=False)
54-
#k8s_resource(new_name='po2', objects=['po2:interface'], trigger_mode=TRIGGER_MODE_MANUAL, auto_init=False)
5550

5651
k8s_yaml('./config/samples/v1alpha1_banner.yaml')
5752
k8s_resource(new_name='banner', objects=['banner:banner'], trigger_mode=TRIGGER_MODE_MANUAL, auto_init=False)

api/cisco/nx/v1alpha1/portchannelconfig_types.go

Lines changed: 0 additions & 54 deletions
This file was deleted.

api/cisco/nx/v1alpha1/vpcdomain_types.go

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -201,13 +201,29 @@ type VPCDomainStatus struct {
201201
// +optional
202202
KeepaliveStatus KeepAliveStatus `json:"keepaliveStatus,omitempty"`
203203

204+
// KeepaliveStatusMsg provides additional information about the keepalive status.
205+
// +optional
206+
KeepaliveStatusMsg string `json:"keepaliveStatusMsg,omitempty"`
207+
204208
// PeerStatus indicates the status of the vPCDomain peer-link.
205209
// +optional
206210
PeerStatus PeerStatus `json:"peerStatus,omitempty"`
207211

212+
// PeerStatusMsg provides additional information about the peer status.
213+
// +optional
214+
PeerStatusMsg string `json:"peerStatusMsg,omitempty"`
215+
208216
// PeerUptime indicates how long the vPCDomain peer has been up and reachable via keepalive.
209217
// +optional
210218
PeerUptime metav1.Duration `json:"peerUptime,omitempty"`
219+
220+
// PeerLinkIf is the name of the interface used as the vPCDomain peer-link.
221+
// +optional
222+
PeerLinkIf string `json:"peerLinkIf,omitempty"`
223+
224+
// PeerLinkIfOperStatus is the Operational status of `PeerLinkIf`.
225+
// +optional
226+
PeerLinkIfOperStatus string `json:"peerLinkIfOperStatus,omitempty"`
211227
}
212228

213229
// The VPCDomainRole type represents the operational role of a vPCDomain peer as returned by the device.
@@ -235,6 +251,13 @@ const (
235251
PeerStatusDown PeerStatus = "Down"
236252
)
237253

254+
type LinkStatus string
255+
256+
const (
257+
LinkStatusUp LinkStatus = "Up"
258+
LinkStatusDown LinkStatus = "Down"
259+
)
260+
238261
// +kubebuilder:object:root=true
239262
// +kubebuilder:subresource:status
240263
// +kubebuilder:resource:path=vpcdomains
@@ -245,11 +268,12 @@ const (
245268
// +kubebuilder:printcolumn:name="Enabled",type=string,JSONPath=`.spec.adminState`
246269
// +kubebuilder:printcolumn:name="Ready",type=string,JSONPath=`.status.conditions[?(@.type=="Ready")].status`
247270
// +kubebuilder:printcolumn:name="Configured",type=string,JSONPath=`.status.conditions[?(@.type=="Configured")].status`,priority=1
248-
// +kubebuilder:printcolumn:name="Operational",type=string,JSONPath=`.status.conditions[?(@.type=="Operational")].status`,priority=1
249-
// +kubebuilder:printcolumn:name="Role",type=string,JSONPath=`.status.role`,priority=1
250-
// +kubebuilder:printcolumn:name="KeepAliveStatus",type=string,JSONPath=`.status.keepaliveStatus`,priority=1
251271
// +kubebuilder:printcolumn:name="PeerStatus",type=string,JSONPath=`.status.peerStatus`,priority=1
252-
// +kubebuilder:printcolumn:name="PeerUptime",type="string",JSONPath=`.status.peerUptime`,priority=1
272+
// +kubebuilder:printcolumn:name="Role",type=string,JSONPath=`.status.role`,priority=1
273+
// +kubebuilder:printcolumn:name="PeerLinkIf",type="string",JSONPath=".status.peerLinkIf",priority=1
274+
// +kubebuilder:printcolumn:name="PeerLinkIfOperSt",type="string",JSONPath=".status.peerLinkIfOperStatus",priority=1
275+
// +kubebuilder:printcolumn:name="KA-PeerStatus",type=string,JSONPath=`.status.keepaliveStatus`,priority=1
276+
// +kubebuilder:printcolumn:name="KA-PeerUptime",type="string",JSONPath=`.status.peerUptime`,priority=1
253277
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"
254278

255279
// VPCDomain is the Schema for the VPCDomains API

api/cisco/nx/v1alpha1/zz_generated.deepcopy.go

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

api/core/v1alpha1/zz_generated.deepcopy.go

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

config/crd/bases/nx.cisco.networking.metal.ironcore.dev_portchannelconfigs.yaml

Lines changed: 0 additions & 54 deletions
This file was deleted.

config/crd/bases/nx.cisco.networking.metal.ironcore.dev_vpcdomains.yaml

Lines changed: 26 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,24 +33,28 @@ spec:
3333
name: Configured
3434
priority: 1
3535
type: string
36-
- jsonPath: .status.conditions[?(@.type=="Operational")].status
37-
name: Operational
36+
- jsonPath: .status.peerStatus
37+
name: PeerStatus
3838
priority: 1
3939
type: string
4040
- jsonPath: .status.role
4141
name: Role
4242
priority: 1
4343
type: string
44-
- jsonPath: .status.keepaliveStatus
45-
name: KeepAliveStatus
44+
- jsonPath: .status.peerLinkIf
45+
name: PeerLinkIf
4646
priority: 1
4747
type: string
48-
- jsonPath: .status.peerStatus
49-
name: PeerStatus
48+
- jsonPath: .status.peerLinkIfOperStatus
49+
name: PeerLinkIfOperSt
50+
priority: 1
51+
type: string
52+
- jsonPath: .status.keepaliveStatus
53+
name: KA-PeerStatus
5054
priority: 1
5155
type: string
5256
- jsonPath: .status.peerUptime
53-
name: PeerUptime
57+
name: KA-PeerUptime
5458
priority: 1
5559
type: string
5660
- jsonPath: .metadata.creationTimestamp
@@ -386,9 +390,24 @@ spec:
386390
description: KeepaliveStatus indicates the status of the peer via
387391
the keepalive link.
388392
type: string
393+
keepaliveStatusMsg:
394+
description: KeepaliveStatusMsg provides additional information about
395+
the keepalive status.
396+
type: string
397+
peerLinkIf:
398+
description: PeerLinkIf is the name of the interface used as the vPCDomain
399+
peer-link.
400+
type: string
401+
peerLinkIfOperStatus:
402+
description: PeerLinkIfOperStatus is the Operational status of `PeerLinkIf`.
403+
type: string
389404
peerStatus:
390405
description: PeerStatus indicates the status of the vPCDomain peer-link.
391406
type: string
407+
peerStatusMsg:
408+
description: PeerStatusMsg provides additional information about the
409+
peer status.
410+
type: string
392411
peerUptime:
393412
description: PeerUptime indicates how long the vPCDomain peer has
394413
been up and reachable via keepalive.

config/crd/kustomization.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ resources:
2626
- bases/nx.cisco.networking.metal.ironcore.dev_systems.yaml
2727
- bases/nx.cisco.networking.metal.ironcore.dev_managementaccessconfigs.yaml
2828
- bases/nx.cisco.networking.metal.ironcore.dev_vpcdomains.yaml
29-
- bases/nx.cisco.networking.metal.ironcore.dev_portchannelconfigs.yaml
3029
# +kubebuilder:scaffold:crdkustomizeresource
3130

3231
patches:

config/rbac/cisco/nx/portchannelconfig_admin_role.yaml

Lines changed: 0 additions & 21 deletions
This file was deleted.

config/rbac/cisco/nx/portchannelconfig_editor_role.yaml

Lines changed: 0 additions & 27 deletions
This file was deleted.

0 commit comments

Comments
 (0)