Skip to content

Commit 610ce76

Browse files
committed
Implement changes to 3.0
Signed-off-by: David VIEJO <[email protected]>
1 parent 4c2d670 commit 610ce76

File tree

13 files changed

+659
-57
lines changed

13 files changed

+659
-57
lines changed

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ To install helm: [https://helm.sh/docs/intro/install/](https://helm.sh/docs/intr
118118
```bash
119119
helm repo add kfs https://kfsoftware.github.io/hlf-helm-charts --force-update
120120

121-
helm install hlf-operator --version=1.10.1 -- kfs/hlf-operator
121+
helm install hlf-operator --version=1.10.0 -- kfs/hlf-operator
122122
```
123123

124124

@@ -146,6 +146,9 @@ Install Istio on the Kubernetes cluster:
146146

147147
kubectl create namespace istio-system
148148

149+
export ISTIO_PATH=$(echo $PWD/istio-*/bin)
150+
export PATH="$PATH:$ISTIO_PATH"
151+
149152
istioctl operator init
150153

151154
kubectl apply -f - <<EOF

api/hlf.kungfusoftware.es/v1alpha1/hlf_types.go

Lines changed: 49 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ package v1alpha1
1919
import (
2020
"fmt"
2121

22+
sb "github.com/hyperledger/fabric-protos-go/orderer/smartbft"
2223
"github.com/kfsoftware/hlf-operator/pkg/status"
2324
"k8s.io/api/networking/v1beta1"
2425
kubeclock "k8s.io/utils/clock"
@@ -2375,7 +2376,7 @@ type FabricMainChannelApplicationConfig struct {
23752376
type FabricMainChannelOrdererConfig struct {
23762377
// OrdererType of the consensus, default "etcdraft"
23772378
// +kubebuilder:default:="etcdraft"
2378-
OrdererType string `json:"ordererType"`
2379+
OrdererType OrdererConsensusType `json:"ordererType"`
23792380
// Capabilities of the channel
23802381
// +kubebuilder:default:={"V2_0"}
23812382
Capabilities []string `json:"capabilities"`
@@ -2398,8 +2399,37 @@ type FabricMainChannelOrdererConfig struct {
23982399
// +kubebuilder:validation:Optional
23992400
// +optional
24002401
EtcdRaft *FabricMainChannelEtcdRaft `json:"etcdRaft"`
2402+
// +nullable
2403+
// +kubebuilder:validation:Optional
2404+
// +optional
2405+
SmartBFT *FabricMainChannelSmartBFT `json:"smartBFT"`
2406+
// +nullable
2407+
// +kubebuilder:validation:Optional
2408+
// +optional
2409+
// +kubebuilder:validation:Default={}
2410+
ConsenterMapping []FabricMainChannelConsenterItem `json:"consenterMapping"`
2411+
}
2412+
2413+
type FabricMainChannelSmartBFT struct {
2414+
RequestBatchMaxCount uint64 `json:"request_batch_max_count,omitempty"`
2415+
RequestBatchMaxBytes uint64 `json:"request_batch_max_bytes,omitempty"`
2416+
RequestBatchMaxInterval string `json:"request_batch_max_interval,omitempty"`
2417+
IncomingMessageBufferSize uint64 `json:"incoming_message_buffer_size,omitempty"`
2418+
RequestPoolSize uint64 `json:"request_pool_size,omitempty"`
2419+
RequestForwardTimeout string `json:"request_forward_timeout,omitempty"`
2420+
RequestComplainTimeout string `json:"request_complain_timeout,omitempty"`
2421+
RequestAutoRemoveTimeout string `json:"request_auto_remove_timeout,omitempty"`
2422+
RequestMaxBytes uint64 `json:"request_max_bytes,omitempty"`
2423+
ViewChangeResendInterval string `json:"view_change_resend_interval,omitempty"`
2424+
ViewChangeTimeout string `json:"view_change_timeout,omitempty"`
2425+
LeaderHeartbeatTimeout string `json:"leader_heartbeat_timeout,omitempty"`
2426+
LeaderHeartbeatCount uint64 `json:"leader_heartbeat_count,omitempty"`
2427+
CollectTimeout string `json:"collect_timeout,omitempty"`
2428+
SyncOnStart bool `json:"sync_on_start,omitempty"`
2429+
SpeedUpViewChange bool `json:"speed_up_view_change,omitempty"`
2430+
LeaderRotation sb.Options_Rotation `json:"leader_rotation,omitempty"`
2431+
DecisionsPerLeader uint64 `json:"decisions_per_leader,omitempty"`
24012432
}
2402-
24032433
type FabricMainChannelEtcdRaft struct {
24042434
// +nullable
24052435
// +kubebuilder:validation:Optional
@@ -2422,6 +2452,14 @@ type FabricMainChannelEtcdRaftOptions struct {
24222452
// +kubebuilder:default:=16777216
24232453
SnapshotIntervalSize uint32 `json:"snapshotIntervalSize"`
24242454
}
2455+
2456+
type OrdererConsensusType string
2457+
2458+
const (
2459+
OrdererConsensusEtcdraft OrdererConsensusType = "etcdraft"
2460+
OrdererConsensusBFT OrdererConsensusType = "BFT"
2461+
)
2462+
24252463
type FabricMainChannelConsensusState string
24262464

24272465
const (
@@ -2460,6 +2498,15 @@ type FabricMainChannelIdentity struct {
24602498
SecretKey string `json:"secretKey"`
24612499
}
24622500

2501+
type FabricMainChannelConsenterItem struct {
2502+
Id uint32 `json:"id,omitempty"`
2503+
Host string `json:"host,omitempty"`
2504+
Port uint32 `json:"port,omitempty"`
2505+
MspId string `json:"msp_id,omitempty"`
2506+
Identity string `json:"identity,omitempty"`
2507+
ClientTlsCert string `json:"client_tls_cert,omitempty"`
2508+
ServerTlsCert string `json:"server_tls_cert,omitempty"`
2509+
}
24632510
type FabricMainChannelConsenter struct {
24642511
// Orderer host of the consenter
24652512
Host string `json:"host"`

api/hlf.kungfusoftware.es/v1alpha1/zz_generated.deepcopy.go

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

config/crd/bases/hlf.kungfusoftware.es_fabricmainchannels.yaml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,28 @@ spec:
159159
items:
160160
type: string
161161
type: array
162+
consenterMapping:
163+
items:
164+
properties:
165+
client_tls_cert:
166+
type: string
167+
host:
168+
type: string
169+
id:
170+
format: int32
171+
type: integer
172+
identity:
173+
type: string
174+
msp_id:
175+
type: string
176+
port:
177+
format: int32
178+
type: integer
179+
server_tls_cert:
180+
type: string
181+
type: object
182+
nullable: true
183+
type: array
162184
etcdRaft:
163185
nullable: true
164186
properties:
@@ -222,6 +244,54 @@ spec:
222244
description: Policies of the orderer section of the channel
223245
nullable: true
224246
type: object
247+
smartBFT:
248+
nullable: true
249+
properties:
250+
collect_timeout:
251+
type: string
252+
decisions_per_leader:
253+
format: int64
254+
type: integer
255+
incoming_message_buffer_size:
256+
format: int64
257+
type: integer
258+
leader_heartbeat_count:
259+
format: int64
260+
type: integer
261+
leader_heartbeat_timeout:
262+
type: string
263+
leader_rotation:
264+
format: int32
265+
type: integer
266+
request_auto_remove_timeout:
267+
type: string
268+
request_batch_max_bytes:
269+
format: int64
270+
type: integer
271+
request_batch_max_count:
272+
format: int64
273+
type: integer
274+
request_batch_max_interval:
275+
type: string
276+
request_complain_timeout:
277+
type: string
278+
request_forward_timeout:
279+
type: string
280+
request_max_bytes:
281+
format: int64
282+
type: integer
283+
request_pool_size:
284+
format: int64
285+
type: integer
286+
speed_up_view_change:
287+
type: boolean
288+
sync_on_start:
289+
type: boolean
290+
view_change_resend_interval:
291+
type: string
292+
view_change_timeout:
293+
type: string
294+
type: object
225295
state:
226296
default: STATE_NORMAL
227297
description: State about the channel, can only be `STATE_NORMAL`

config/default/kustomization.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,5 @@ apiVersion: kustomize.config.k8s.io/v1beta1
4040
kind: Kustomization
4141
resources:
4242
- ../crd
43-
# - ../rbac
43+
- ../rbac
4444
- ../manager

config/manager/kustomization.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ kind: Kustomization
55
images:
66
- name: controller
77
newName: kfsoftware/hlf-operator
8-
newTag: 1.11.0-support-chaincodes-17237171893N
8+
newTag: dev-1724072591

0 commit comments

Comments
 (0)