Skip to content

Commit 2ca824b

Browse files
Merge pull request #2671 from oribon/frrk8s_bgpsessionstates
CNF-16707: frr-k8s: Add BGPSessionState CRD
2 parents 720212f + 29d6fa4 commit 2ca824b

File tree

4 files changed

+110
-5
lines changed

4 files changed

+110
-5
lines changed

bindata/network/frr-k8s/001-crd.yaml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -542,3 +542,80 @@ spec:
542542
storage: true
543543
subresources:
544544
status: {}
545+
---
546+
apiVersion: apiextensions.k8s.io/v1
547+
kind: CustomResourceDefinition
548+
metadata:
549+
annotations:
550+
controller-gen.kubebuilder.io/version: v0.14.0
551+
name: bgpsessionstates.frrk8s.metallb.io
552+
spec:
553+
group: frrk8s.metallb.io
554+
names:
555+
kind: BGPSessionState
556+
listKind: BGPSessionStateList
557+
plural: bgpsessionstates
558+
singular: bgpsessionstate
559+
scope: Namespaced
560+
versions:
561+
- additionalPrinterColumns:
562+
- jsonPath: .status.node
563+
name: Node
564+
type: string
565+
- jsonPath: .status.peer
566+
name: Peer
567+
type: string
568+
- jsonPath: .status.vrf
569+
name: VRF
570+
type: string
571+
- jsonPath: .status.bgpStatus
572+
name: BGP
573+
type: string
574+
- jsonPath: .status.bfdStatus
575+
name: BFD
576+
type: string
577+
name: v1beta1
578+
schema:
579+
openAPIV3Schema:
580+
description: BGPSessionState exposes the status of a BGP Session from the
581+
FRR instance running on the node.
582+
properties:
583+
apiVersion:
584+
description: |-
585+
APIVersion defines the versioned schema of this representation of an object.
586+
Servers should convert recognized schemas to the latest internal value, and
587+
may reject unrecognized values.
588+
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
589+
type: string
590+
kind:
591+
description: |-
592+
Kind is a string value representing the REST resource this object represents.
593+
Servers may infer this from the endpoint the client submits requests to.
594+
Cannot be updated.
595+
In CamelCase.
596+
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
597+
type: string
598+
metadata:
599+
type: object
600+
spec:
601+
description: BGPSessionStateSpec defines the desired state of BGPSessionState.
602+
type: object
603+
status:
604+
description: BGPSessionStateStatus defines the observed state of BGPSessionState.
605+
properties:
606+
bfdStatus:
607+
type: string
608+
bgpStatus:
609+
type: string
610+
node:
611+
type: string
612+
peer:
613+
type: string
614+
vrf:
615+
type: string
616+
type: object
617+
type: object
618+
served: true
619+
storage: true
620+
subresources:
621+
status: {}

bindata/network/frr-k8s/002-rbac.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,14 @@ rules:
2020
- list
2121
- watch
2222
- update
23+
- apiGroups:
24+
- ""
25+
resources:
26+
- pods
27+
verbs:
28+
- get
29+
- list
30+
- watch
2331
---
2432
apiVersion: rbac.authorization.k8s.io/v1
2533
kind: ClusterRole
@@ -50,6 +58,26 @@ rules:
5058
- validatingwebhookconfigurations
5159
verbs:
5260
- update
61+
- apiGroups:
62+
- frrk8s.metallb.io
63+
resources:
64+
- bgpsessionstates
65+
verbs:
66+
- create
67+
- delete
68+
- get
69+
- list
70+
- patch
71+
- update
72+
- watch
73+
- apiGroups:
74+
- frrk8s.metallb.io
75+
resources:
76+
- bgpsessionstates/status
77+
verbs:
78+
- get
79+
- patch
80+
- update
5381
- apiGroups:
5482
- frrk8s.metallb.io
5583
resources:

bindata/network/frr-k8s/config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ data:
4545
# Check /etc/pam.d/frr if you intend to use "vtysh"!
4646
#
4747
vtysh_enable=yes
48-
zebra_options=" -A 127.0.0.1 -s 90000000"
49-
bgpd_options=" -A 127.0.0.1"
48+
zebra_options=" -A 127.0.0.1 -s 90000000 --limit-fds 100000"
49+
bgpd_options=" -A 127.0.0.1 --limit-fds 100000"
5050
ospfd_options=" -A 127.0.0.1"
5151
ospf6d_options=" -A ::1"
5252
ripd_options=" -A 127.0.0.1"
@@ -59,8 +59,8 @@ data:
5959
babeld_options=" -A 127.0.0.1"
6060
sharpd_options=" -A 127.0.0.1"
6161
pbrd_options=" -A 127.0.0.1"
62-
staticd_options="-A 127.0.0.1"
63-
bfdd_options=" -A 127.0.0.1"
62+
staticd_options="-A 127.0.0.1 --limit-fds 100000"
63+
bfdd_options=" -A 127.0.0.1 --limit-fds 100000"
6464
fabricd_options="-A 127.0.0.1"
6565
vrrpd_options=" -A 127.0.0.1"
6666

pkg/network/render_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -641,7 +641,7 @@ func Test_renderAdditionalRoutingCapabilities(t *testing.T) {
641641
},
642642
},
643643
},
644-
want: 18,
644+
want: 19,
645645
expectedErr: nil,
646646
},
647647
}

0 commit comments

Comments
 (0)