Skip to content

Commit

Permalink
Make peer probes optional, set config path
Browse files Browse the repository at this point in the history
  • Loading branch information
sam-at-luther committed Oct 28, 2023
1 parent 0d46673 commit 64035bb
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 1 deletion.
1 change: 1 addition & 0 deletions ansible-roles/k8s_fabric_peer/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ k8s_fabric_peer_namespace: fabric-{{k8s_fabric_peer_org}}
k8s_fabric_peer_helm_chart_path: "{{kubectl_asset_root_path}}/fabric-peer"
k8s_fabric_peer_image_repository: hyperledger/fabric-peer
k8s_fabric_peer_start_service: true
k8s_fabric_peer_start_probes: true
k8s_fabric_peer_chaincode_invoke_timeout: 5s
k8s_fabric_peer_chaincode_memory_limit: 4294967296 # 4Gi
k8s_fabric_peer_storage_size: 10Gi
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ spec:
- while true; do sleep 10; done
{{- end }}
env:
- name: FABRIC_CFG_PATH
value: /etc/hyperledger/fabric/
{{- if .Values.logGrpc }}
- name: GRPC_GO_LOG_VERBOSITY_LEVEL
value: 99
Expand Down Expand Up @@ -172,15 +174,25 @@ spec:
- name: http-op
containerPort: {{ .Values.internal.container.operationsPort }}
protocol: TCP
{{- if .Values.startService }}
{{- if and .Values.startProbes .Values.startService }}
livenessProbe:
httpGet:
path: /healthz
port: http-op
failureThreshold: 1
periodSeconds: 10
readinessProbe:
httpGet:
path: /healthz
port: http-op
initialDelaySeconds: 5
periodSeconds: 5
startupProbe:
httpGet:
path: /healthz
port: http-op
failureThreshold: 30
periodSeconds: 10
{{- end }}
volumeMounts:
{{- if .Values.externalChaincode }}
Expand Down
2 changes: 2 additions & 0 deletions ansible-roles/k8s_fabric_peer/files/fabric-peer/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ affinity: {}

startService: true

startProbes: true

logLevel: INFO

logGrpc: false
Expand Down
1 change: 1 addition & 0 deletions ansible-roles/k8s_fabric_peer/tasks/inner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
image:
repository: "{{k8s_fabric_peer_image_repository}}"
startService: "{{k8s_fabric_peer_start_service}}"
startProbes: "{{k8s_fabric_peer_start_probes}}"
internal:
container:
invokeTimeout: "{{k8s_fabric_peer_chaincode_invoke_timeout}}"
Expand Down

0 comments on commit 64035bb

Please sign in to comment.