Skip to content

Commit 974500a

Browse files
authored
Merge pull request #2587 from saurabhkumarkardam/indy-main-branch-updates
[indy] refactor codebase for effective deployment
2 parents 00d0170 + d38f214 commit 974500a

File tree

12 files changed

+106
-40
lines changed

12 files changed

+106
-40
lines changed

platforms/hyperledger-indy/charts/indy-node/templates/statefulset.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ kind: StatefulSet
99
metadata:
1010
name: "{{ $.Values.metadata.name }}"
1111
namespace: "{{ $.Values.metadata.namespace }}"
12+
labels:
13+
app: "{{ $.Values.metadata.name }}"
1214
spec:
1315
serviceName: "{{ $.Values.metadata.name }}"
1416
replicas: 1
@@ -217,7 +219,7 @@ spec:
217219
- containerPort: {{ $.Values.client.port }}
218220
env:
219221
- name: INDY_NODE_NAME
220-
value: "{{ $.Values.node.name }}"
222+
value: "{{ $.Values.vault.nodeId }}"
221223
- name: INDY_NODE_IP
222224
value: "{{ $.Values.node.ip }}"
223225
- name: INDY_NODE_PORT

platforms/hyperledger-indy/configuration/roles/check/k8_component/tasks/main.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@
2727
service_account: "{{ component_name }}"
2828
role: "ro"
2929
shell: |
30-
secret="$(KUBECONFIG={{ kubernetes.config_file }} kubectl get serviceaccount {{ service_account }} -n {{ component_ns }} -o go-template={% raw %}'{{ (index .secrets 0).name }}'{% endraw %})"
31-
kube_token="$(KUBECONFIG={{ kubernetes.config_file }} kubectl get secret ${secret} -n {{ component_ns }} -o go-template={% raw %}'{{ .data.token }}'{% endraw %} | base64 -d)"
30+
secret="{{ service_account }}-token"
31+
kube_token=$(kubectl --kubeconfig={{ kubernetes.config_file }} -n {{ component_ns }} get secret ${secret} -o jsonpath="{.data.token}" | base64 --decode)
3232
vault_token=$(curl --request POST --data '{"jwt": "'"$kube_token"'", "role": "{{ role }}"}' {{ vault.url }}/v1/auth/kubernetes-{{ organization }}-bevel-ac-auth/login | jq -j '.auth.client_token')
33-
echo ${vault_token}
33+
echo $vault_token
3434
register: token_output
3535
when: component_type == "GetServiceAccount"
3636

platforms/hyperledger-indy/configuration/roles/create/helm_component/node/templates/node.tpl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,18 @@ spec:
4040
name: {{ component_name }}
4141
repository: {{ network.docker.url }}/bevel-indy-node:{{ network.version }}
4242
node:
43-
name: {{ stewardItem.name }}
43+
name: {{ component_name }}
4444
ip: 0.0.0.0
4545
publicIp: {{ stewardItem.publicIp }}
4646
port: {{ stewardItem.node.port }}
47+
targetPort: {{ stewardItem.node.targetPort }}
4748
ambassadorPort: {{ stewardItem.node.ambassador }}
4849
client:
50+
name: {{ component_name }}
4951
publicIp: {{ stewardItem.publicIp }}
5052
ip: 0.0.0.0
5153
port: {{ stewardItem.client.port }}
54+
targetPort: {{ stewardItem.client.targetPort }}
5255
ambassadorPort: {{ stewardItem.client.ambassador }}
5356
service:
5457
{% if organizationItem.cloud_provider != 'minikube' %}
@@ -99,4 +102,3 @@ spec:
99102
keys:
100103
storagesize: 3Gi
101104
storageClassName: {{ sc_name }}
102-

platforms/hyperledger-indy/configuration/roles/create/k8_component/templates/serviceaccount.tpl

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,12 @@ kind: ServiceAccount
33
metadata:
44
name: {{ component_name }}
55
namespace: {{ component_namespace }}
6+
---
7+
apiVersion: v1
8+
kind: Secret
9+
type: kubernetes.io/service-account-token
10+
metadata:
11+
name: {{ component_name }}-token
12+
namespace: {{ component_namespace }}
13+
annotations:
14+
kubernetes.io/service-account.name: "{{ component_name }}"

platforms/hyperledger-indy/configuration/samples/network-indy-newnode-to-baf-network.yaml

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,20 @@ network:
1515
# Network level configuration specifies the attributes required for each organization
1616
# to join an existing network.
1717
type: indy
18-
version: 1.11.0 # Supported versions 1.11.0 and 1.12.1
18+
version: 1.12.6 # Supported versions 1.11.0, 1.12.1 & 1.12.6
1919

2020
#Environment section for Kubernetes setup
2121
env:
22-
type: indy # tag for the environment. Important to run multiple flux on single cluster
22+
type: indy # tag for the environment. Important to run multiple flux on single cluster
2323
proxy: ambassador # value has to be 'ambassador' as 'haproxy' has not been implemented for Indy
24+
proxy_namespace: "ambassador" # Namespace for the proxy
2425
ambassadorPorts:
25-
portRange: # For a range of ports
26-
from: 9711
27-
to: 9720
26+
# Specify a list of individual ports to use
27+
ports: [15010, 15023, 15024, 15025, 15033, 15034, 15035, 15043, 15044, 15045]
28+
# Alternatively, specify a range of ports to use all ports within the specified range
29+
# portRange:
30+
# from: 15010 # Starting port of the range
31+
# to: 15045 # Ending port of the range
2832
loadBalancerSourceRanges: # (Optional) Default value is '0.0.0.0/0', this value can be changed to any other IP adres or list (comma-separated without spaces) of IP adresses, this is valid only if proxy='ambassador'
2933
retry_count: 40 # Retry count for the checks
3034
external_dns: enabled # Should be enabled if using external-dns for automatic route configuration
@@ -64,6 +68,8 @@ network:
6468
region: "region" # AWS region
6569

6670
publicIps: ["3.221.78.194"] # List of all public IP addresses of each availability zone from all organizations in the same k8s cluster
71+
azure:
72+
node_resource_group: "MC_myResourceGroup_myCluster_westeurope"
6773

6874
# Kubernetes cluster deployment variables. The config file path has to be provided in case
6975
# the cluster has already been created.
@@ -178,6 +184,8 @@ network:
178184
region: "region" # AWS region
179185

180186
publicIps: ["3.221.78.194"] # List of all public IP addresses of each availability zone from all organizations in the same k8s cluster # List of all public IP addresses of each availability zone
187+
azure:
188+
node_resource_group: "MC_myResourceGroup_myCluster_westeurope"
181189

182190
# Kubernetes cluster deployment variables. The config file path has to be provided in case
183191
# the cluster has already been created.

platforms/hyperledger-indy/configuration/samples/network-indy-newnode-to-non-baf-network.yaml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,20 @@ network:
1414
# Network level configuration specifies the attributes required for each organization
1515
# to join an existing network.
1616
type: indy
17-
version: 1.11.0 # Supported versions 1.11.0 and 1.12.1
17+
version: 1.12.6 # Supported versions 1.11.0, 1.12.1 & 1.12.6
1818

1919
#Environment section for Kubernetes setup
2020
env:
21-
type: indy # tag for the environment. Important to run multiple flux on single cluster
21+
type: indy # tag for the environment. Important to run multiple flux on single cluster
2222
proxy: ambassador # value has to be 'ambassador' as 'haproxy' has not been implemented for Indy
23+
proxy_namespace: "ambassador" # Namespace for the proxy
2324
ambassadorPorts:
24-
portRange: # For a range of ports
25-
from: 9711
26-
to: 9712
25+
# Specify a list of individual ports to use
26+
ports: [15010, 15023, 15024, 15025, 15033, 15034, 15035, 15043, 15044, 15045]
27+
# Alternatively, specify a range of ports to use all ports within the specified range
28+
# portRange:
29+
# from: 15010 # Starting port of the range
30+
# to: 15045 # Ending port of the range
2731
loadBalancerSourceRanges: # (Optional) Default value is '0.0.0.0/0', this value can be changed to any other IP adres or list (comma-separated without spaces) of IP adresses, this is valid only if proxy='ambassador'
2832
retry_count: 40 # Retry count for the checks
2933
external_dns: enabled # Should be enabled if using external-dns for automatic route configuration
@@ -63,6 +67,8 @@ network:
6367
region: "region" # AWS region
6468

6569
publicIps: ["3.221.78.194"] # List of all public IP addresses of each availability zone from all organizations in the same k8s cluster # List of all public IP addresses of each availability zone
70+
azure:
71+
node_resource_group: "MC_myResourceGroup_myCluster_westeurope"
6672

6773
# Kubernetes cluster deployment variables. The config file path has to be provided in case
6874
# the cluster has already been created.

platforms/hyperledger-indy/configuration/samples/network-indyv3-aries.yaml

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,21 @@ network:
1414
# Network level configuration specifies the attributes required for each organization
1515
# to join an existing network.
1616
type: indy
17-
version: 1.11.0 # Supported versions 1.11.0 and 1.12.1
17+
version: 1.12.6 # Supported versions 1.11.0, 1.12.1 & 1.12.6
1818

1919
#Environment section for Kubernetes setup
2020
env:
2121
type: "bevel" # tag for the environment. Important to run multiple flux on single cluster
22-
proxy: ambassador # value has to be 'ambassador' as 'haproxy' has not been implemented for Indy
22+
proxy: ambassador # value has to be 'ambassador' as 'haproxy' has not been implemented for Indy
23+
proxy_namespace: "ambassador" # Namespace for the proxy
2324
# Must be different from all stward ambassador ports specified in the rest of this network yaml
24-
ambassadorPorts: # Any additional Ambassador ports can be given here, this is valid only if proxy='ambassador'
25-
ports: 15010,15023,15024,15025,15033,15034,15035,15043,15044,15045 # Each Client Agent uses 3 ports # Indy does not use a port range as it creates an NLB, and only necessary ports should be opened
25+
ambassadorPorts: # Any additional Ambassador ports can be given here, this is valid only if proxy='ambassador'
26+
# Specify a list of individual ports to use
27+
ports: [15010,15023,15024,15025,15033,15034,15035,15043,15044,15045] # Each Client Agent uses 3 ports # Indy does not use a port range as it creates an NLB, and only necessary ports should be opened
28+
# Alternatively, specify a range of ports to use all ports within the specified range
29+
# portRange:
30+
# from: 15010 # Starting port of the range
31+
# to: 15045 # Ending port of the range
2632
loadBalancerSourceRanges: # (Optional) Default value is '0.0.0.0/0', this value can be changed to any other IP adres or list (comma-separated without spaces) of IP adresses, this is valid only if proxy='ambassador'
2733
retry_count: 20 # Retry count for the checks
2834
external_dns: enabled # Should be enabled if using external-dns for automatic route configuration
@@ -61,6 +67,8 @@ network:
6167
region: "region" # AWS region
6268

6369
publicIps: ["1.1.1.1", "2.2.2.2"] # List of all public IP addresses of each availability zone from all organizations in the same k8s cluster
70+
azure:
71+
node_resource_group: "MC_myResourceGroup_myCluster_westeurope"
6472

6573
# Kubernetes cluster deployment variables. The config file path has to be provided in case
6674
# the cluster has already been created.
@@ -114,6 +122,8 @@ network:
114122
region: "region" # AWS region
115123

116124
publicIps: ["192.168.99.173"] # List of all public IP addresses of each availability zone from all organizations in the same k8s cluster
125+
azure:
126+
node_resource_group: "MC_myResourceGroup_myCluster_westeurope"
117127

118128
# Kubernetes cluster deployment variables. The config file path has to be provided in case
119129
# the cluster has already been created.

platforms/hyperledger-indy/configuration/samples/network-indyv3.yaml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,21 @@ network:
1616
# Network level configuration specifies the attributes required for each organization
1717
# to join an existing network.
1818
type: indy
19-
version: 1.11.0 # Supported versions 1.11.0 and 1.12.1
19+
version: 1.12.6 # Supported versions 1.11.0, 1.12.1 & 1.12.6
2020

2121
#Environment section for Kubernetes setup
2222
env:
23-
type: "dev" # tag for the environment. Important to run multiple flux on single cluster
23+
type: "dev" # tag for the environment. Important to run multiple flux on single cluster
2424
proxy: ambassador # value has to be 'ambassador' as 'haproxy' has not been implemented for Indy
25+
proxy_namespace: "ambassador" # Namespace for the proxy
2526
# Must be different from all other ports specified in the rest of this network yaml
2627
ambassadorPorts: # Any additional Ambassador ports can be given here, this is valid only if proxy='ambassador'
27-
ports: 15010,15023,15024,15025,15033,15034,15035,15043,15044,15045 # Each Client Agent uses 3 ports # Indy does not use a port range as it creates an NLB, and only necessary ports should be opened
28+
# Specify a list of individual ports to use
29+
ports: [15010,15023,15024,15025,15033,15034,15035,15043,15044,15045] # Each Client Agent uses 3 ports # Indy does not use a port range as it creates an NLB, and only necessary ports should be opened
30+
# Alternatively, specify a range of ports to use all ports within the specified range
31+
# portRange:
32+
# from: 15010 # Starting port of the range
33+
# to: 15045 # Ending port of the range
2834
loadBalancerSourceRanges: # (Optional) Default value is '0.0.0.0/0', this value can be changed to any other IP adres or list (comma-separated without spaces) of IP adresses, this is valid only if proxy='ambassador'
2935
retry_count: 20 # Retry count for the checks
3036
external_dns: enabled # Should be enabled if using external-dns for automatic route configuration
@@ -63,6 +69,8 @@ network:
6369
region: "region" # AWS region
6470

6571
publicIps: ["1.1.1.1", "2.2.2.2"] # List of all public IP addresses of each availability zone from all organizations in the same k8s cluster
72+
azure:
73+
node_resource_group: "MC_myResourceGroup_myCluster_westeurope"
6674

6775
# Kubernetes cluster deployment variables. The config file path has to be provided in case
6876
# the cluster has already been created.
@@ -116,6 +124,8 @@ network:
116124
region: "region" # AWS region
117125

118126
publicIps: ["3.221.78.194"] # List of all public IP addresses of each availability zone from all organizations in the same k8s cluster
127+
azure:
128+
node_resource_group: "MC_myResourceGroup_myCluster_westeurope"
119129

120130
# Kubernetes cluster deployment variables. The config file path has to be provided in case
121131
# the cluster has already been created.
@@ -205,6 +215,8 @@ network:
205215
region: "region" # AWS region
206216

207217
publicIps: ["3.221.78.194"] # List of all public IP addresses of each availability zone from all organizations in the same k8s cluster
218+
azure:
219+
node_resource_group: "MC_myResourceGroup_myCluster_westeurope"
208220

209221
# Kubernetes cluster deployment variables. The config file path has to be provided in case
210222
# the cluster has already been created.

platforms/hyperledger-indy/configuration/samples/network-minikube-aries.yaml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ network:
1414
# Network level configuration specifies the attributes required for each organization
1515
# to join an existing network.
1616
type: indy
17-
version: 1.11.0 # Supported versions 1.11.0 and 1.12.1
17+
version: 1.12.6 # Supported versions 1.11.0, 1.12.1 & 1.12.6
1818

1919
#Environment section for Kubernetes setup
2020
env:
2121
type: "bevel" # tag for the environment. Important to run multiple flux on single cluster
22-
proxy: none # proxy is none for minikube/single cluster
23-
retry_count: 20 # Retry count for the checks
24-
external_dns: disabled # Should be enabled if using external-dns for automatic route configuration
22+
proxy: none # proxy is none for minikube/single cluster
23+
retry_count: 20 # Retry count for the checks
24+
external_dns: disabled # Should be enabled if using external-dns for automatic route configuration
2525

2626
# Docker registry details where images are stored. This will be used to create k8s secrets
2727
# Please ensure all required images are built and stored in this registry.
@@ -48,6 +48,8 @@ network:
4848
type: peer
4949
cloud_provider: minikube
5050
publicIps: [] # Public Ips of stewards/nodes [public ip of minikube]
51+
azure:
52+
node_resource_group: "MC_myResourceGroup_myCluster_westeurope"
5153

5254
# Kubernetes cluster deployment variables. The config file path has to be provided in case
5355
# the cluster has already been created.
@@ -92,6 +94,8 @@ network:
9294
type: peer
9395
cloud_provider: minikube
9496
publicIps: ["192.168.99.173"] # Public Ips of stewards/nodes [public ip of minikube]
97+
azure:
98+
node_resource_group: "MC_myResourceGroup_myCluster_westeurope"
9599

96100
# Kubernetes cluster deployment variables. The config file path has to be provided in case
97101
# the cluster has already been created.

platforms/hyperledger-indy/configuration/samples/network-minikube.yaml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ network:
1111
# Network level configuration specifies the attributes required for each organization
1212
# to join an existing network.
1313
type: indy
14-
version: 1.11.0 # Supported versions 1.11.0 and 1.12.1
14+
version: 1.12.6 # Supported versions 1.11.0, 1.12.1 & 1.12.6
1515

1616
#Environment section for Kubernetes setup
1717
env:
1818
type: "bevel" # tag for the environment. Important to run multiple flux on single cluster
19-
proxy: none # proxy is none for minikube/single cluster
20-
retry_count: 20 # Retry count for the checks
21-
external_dns: disabled # Should be enabled if using external-dns for automatic route configuration
19+
proxy: none # proxy is none for minikube/single cluster
20+
retry_count: 20 # Retry count for the checks
21+
external_dns: disabled # Should be enabled if using external-dns for automatic route configuration
2222

2323
# Docker registry details where images are stored. This will be used to create k8s secrets
2424
# Please ensure all required images are built and stored in this registry.
@@ -45,6 +45,8 @@ network:
4545
type: peer
4646
cloud_provider: minikube
4747
publicIps: [] # Public Ips of stewards/nodes [public ip of minikube]
48+
azure:
49+
node_resource_group: "MC_myResourceGroup_myCluster_westeurope"
4850

4951
# Kubernetes cluster deployment variables. The config file path has to be provided in case
5052
# the cluster has already been created.
@@ -89,6 +91,8 @@ network:
8991
type: peer
9092
cloud_provider: minikube
9193
publicIps: ["192.168.99.173"] # Public Ips of stewards/nodes [public ip of minikube]
94+
azure:
95+
node_resource_group: "MC_myResourceGroup_myCluster_westeurope"
9296

9397
# Kubernetes cluster deployment variables. The config file path has to be provided in case
9498
# the cluster has already been created.
@@ -165,6 +169,8 @@ network:
165169
type: peer
166170
cloud_provider: minikube
167171
publicIps: ["192.168.99.173"] # Public Ips of stewards/nodes [public ip of minikube]
172+
azure:
173+
node_resource_group: "MC_myResourceGroup_myCluster_westeurope"
168174

169175
# Kubernetes cluster deployment variables. The config file path has to be provided in case
170176
# the cluster has already been created.

0 commit comments

Comments
 (0)