Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add peer storage overrides #51

Merged
merged 3 commits into from
May 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions ansible-roles/k8s_fabric_peer/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,6 @@ k8s_fabric_peer_snapshot_archiver_version: "v0.0.1"

k8s_fabric_peer_service_account_iam_role_arns: {}
k8s_fabric_peer_service_account: default

k8s_fabric_peer_storage_size_overrides: []
k8s_fabric_peer_recovery_overrides: []
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ spec:
command:
- /bin/sh
- -c
- while true; do sleep 10; done
- sleep infinity
{{- end }}
env:
- name: FABRIC_CFG_PATH
Expand Down
8 changes: 5 additions & 3 deletions ansible-roles/k8s_fabric_peer/tasks/inner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
k8s_pvc_name: "storage-fabric-peer{{item}}-{{k8s_fabric_peer_org}}"
k8s_pvc_component: fabric
k8s_pvc_part_of: bcpeer
k8s_pvc_storage_size: "{{k8s_fabric_peer_storage_size}}"
k8s_pvc_storage_size: "{{ k8s_fabric_peer_storage_size_overrides[item] | default(k8s_fabric_peer_storage_size, true) }}"
k8s_pvc_storage_class: "{{k8s_fabric_peer_storage_class}}"
k8s_pvc_volume_type_override: "{{k8s_fabric_peer_volume_type_override}}"
when: k8s_fabric_peer_separate_pvc
Expand Down Expand Up @@ -53,7 +53,7 @@
version: "{{k8s_fabric_peer_substrate_version or shiro_phylum_substrate_version | default('')}}"
image:
repository: "{{k8s_fabric_peer_image_repository}}"
startService: "{{k8s_fabric_peer_start_service}}"
startService: "{{not recovery_mode}}"
startProbes: "{{k8s_fabric_peer_start_probes}}"
internal:
container:
Expand All @@ -63,7 +63,7 @@
memory: "{{k8s_fabric_peer_chaincode_memory_limit}}"
persistentVolume:
create: "{{not k8s_fabric_peer_separate_pvc}}"
storageSize: "{{k8s_fabric_peer_storage_size}}"
storageSize: "{{ storage_size }}"
storageClassName: "{{k8s_fabric_peer_storage_class}}"
dockerStorageSize: "{{k8s_fabric_peer_dockerstorage_size}}"
typeOverride: "{{k8s_fabric_peer_volume_type_override}}"
Expand All @@ -86,6 +86,8 @@
environment: "{{ kubectl_env }}"
vars:
availability_zones: "{{k8s_fabric_peer_azs or k8s_pv_data_replica_azs}}"
storage_size: "{{ k8s_fabric_peer_storage_size_overrides[item] | default(k8s_fabric_peer_storage_size, true) }}"
recovery_mode: "{{ k8s_fabric_peer_recovery_overrides[item] | default(not k8s_fabric_peer_start_service, true) }}"

- name: Upgrade pauser has run
when: is_fabric_upgrade | bool
Expand Down
Loading