Skip to content

Commit 7e3e065

Browse files
authored
Feat/small feats (#211)
* NetworkConfig: filter the peers to be added per organization * Filter peers by org, global peers and global CAs * Add `FabricChaincodeTemplate` CRD * update * Add support for FabricChaincodeTemplateRef in FabricChaincodeSpec Signed-off-by: David VIEJO <[email protected]> * update * Update helm chart in pipelien Signed-off-by: David VIEJO <[email protected]> * Update Signed-off-by: David VIEJO <[email protected]> * update Signed-off-by: David VIEJO <[email protected]> * Update Signed-off-by: David VIEJO <[email protected]> * update * fabric-config 0.1.0 -> 0.2.1 Add ports 443 for the peer * Upgrade to go 1.21 * Add adminURL in the network config if available * Update pipelines to 1.21 * Add command to get the next sequence and version for a chaincode based on chaincode definition Signed-off-by: David VIEJO <[email protected]> * update Signed-off-by: David VIEJO <[email protected]> * update Signed-off-by: David VIEJO <[email protected]> * update Signed-off-by: David VIEJO <[email protected]> * Update peer controller Signed-off-by: David VIEJO <[email protected]> * Update go dependencies Signed-off-by: David VIEJO <[email protected]> * Parametrize responseWaitTime, aliveTimeInterval, aliveExpirationTimeout and reconnectInterval * Fix ci/cd * fix ci/cd * fix error in suite_test * fix ci/cd --------- Signed-off-by: David VIEJO <[email protected]> Signed-off-by: David Viejo <[email protected]>
1 parent b34e3ec commit 7e3e065

32 files changed

+7187
-5413
lines changed

.github/workflows/test-kubectl-plugin.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
4949
- name: Install operator CRDs
5050
run: |
51-
go install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.3.0
51+
go install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.14.0
5252
make generate manifests install
5353
- name: Install Istio
5454
run: |

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626

2727
- name: Install operator
2828
run: |
29-
go install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.3.0
29+
go install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.14.0
3030
make generate manifests install
3131
3232
- name: Test

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ BUNDLE_METADATA_OPTS ?= $(BUNDLE_CHANNELS) $(BUNDLE_DEFAULT_CHANNEL)
1414
# Image URL to use all building/pushing image targets
1515
IMG ?= controller:latest
1616
# Produce CRDs that work back to Kubernetes 1.11 (no version conversion)
17-
CRD_OPTIONS ?= "crd:trivialVersions=true,crdVersions=v1"
17+
CRD_OPTIONS ?= "crd:crdVersions=v1"
1818

1919
# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set)
2020
ifeq (,$(shell go env GOBIN))

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

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import (
2020
"fmt"
2121
"github.com/kfsoftware/hlf-operator/pkg/status"
2222
"k8s.io/api/networking/v1beta1"
23-
kubeclock "k8s.io/apimachinery/pkg/util/clock"
23+
kubeclock "k8s.io/utils/clock"
2424

2525
corev1 "k8s.io/api/core/v1"
2626
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@@ -375,6 +375,18 @@ type FabricPeerSpecGossip struct {
375375
Endpoint string `json:"endpoint"`
376376
UseLeaderElection bool `json:"useLeaderElection"`
377377
OrgLeader bool `json:"orgLeader"`
378+
// +kubebuilder:validation:Default=25s
379+
// +optional
380+
ReconnectInterval string `json:"reconnectInterval"`
381+
// +kubebuilder:validation:Default=25s
382+
// +optional
383+
AliveExpirationTimeout string `json:"aliveExpirationTimeout"`
384+
// +kubebuilder:validation:Default=5s
385+
// +optional
386+
AliveTimeInterval string `json:"aliveTimeInterval"`
387+
// +kubebuilder:validation:Default=2s
388+
// +optional
389+
ResponseWaitTime string `json:"responseWaitTime"`
378390
}
379391
type Catls struct {
380392
Cacert string `json:"cacert"`

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

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

charts/hlf-peer/templates/configmap--peer--core.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -162,13 +162,13 @@ data:
162162
# Should be slightly bigger than digestWaitTime
163163
requestWaitTime: 1500ms
164164
# Time to wait before pull engine ends pull (unit: second)
165-
responseWaitTime: 2s
165+
responseWaitTime: {{.Values.peer.gossip.responseWaitTime | default "2s" }}
166166
# Alive check interval(unit: second)
167-
aliveTimeInterval: 5s
167+
aliveTimeInterval: {{.Values.peer.gossip.aliveTimeInterval | default "5s" }}
168168
# Alive expiration timeout(unit: second)
169-
aliveExpirationTimeout: 25s
169+
aliveExpirationTimeout: {{.Values.peer.gossip.aliveExpirationTimeout | default "25s"}}
170170
# Reconnect interval(unit: second)
171-
reconnectInterval: 25s
171+
reconnectInterval: {{.Values.peer.gossip.reconnectInterval | default "25s"}}
172172
# Max number of attempts to connect to a peer
173173
maxConnectionAttempts: 120
174174
# Message expiration factor for alive messages

charts/hlf-peer/values.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,11 @@ peer:
5656
orgLeader: "false"
5757
useLeaderElection: "true"
5858

59+
reconnectInterval: "25s"
60+
aliveExpirationTimeout: "25s"
61+
aliveTimeInterval: "5s"
62+
responseWaitTime: "2s"
63+
5964
tls:
6065
server:
6166
enabled: "true"

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

Lines changed: 615 additions & 502 deletions
Large diffs are not rendered by default.

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

Lines changed: 589 additions & 474 deletions
Large diffs are not rendered by default.

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

Lines changed: 589 additions & 474 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)