Skip to content

Commit 1635479

Browse files
committed
make role name customizable
Issue: ZENKO-5069
1 parent dce3139 commit 1635479

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

.github/scripts/end2end/configure-e2e.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ kubectl run ${POD_NAME} \
112112
--env=CRR_DESTINATION_LOCATION_NAME=${CRR_DESTINATION_LOCATION_NAME} \
113113
--env=CRR_SOURCE_ACCOUNT_NAME=${CRR_SOURCE_ACCOUNT_NAME} \
114114
--env=CRR_DESTINATION_ACCOUNT_NAME=${CRR_DESTINATION_ACCOUNT_NAME} \
115+
--env=CRR_ROLE_NAME=${CRR_ROLE_NAME} \
115116
--command -- python3 configuration.py
116117

117118
## wait for updates to trigger zenko upgrades

.github/workflows/end2end.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ env:
8282
CRR_DESTINATION_LOCATION_NAME: crr-destination-location
8383
CRR_SOURCE_ACCOUNT_NAME: crr-source-account
8484
CRR_DESTINATION_ACCOUNT_NAME: crr-destination-account
85+
CRR_ROLE_NAME: crr-role
8586
# Enable this for Ring tests
8687
ENABLE_RING_TESTS: "false"
8788
RING_S3C_ACCESS_KEY: accessKey1

tests/zenko_tests/e2e_config/locations.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
_log = logging.getLogger("end2end configuration")
88

99
IAM_ENDPOINT = os.getenv("IAM_ENDPOINT", "http://iam.zenko.local")
10+
CRR_ROLE_NAME = os.getenv("CRR_ROLE_NAME", "crr-role")
1011

1112
def _setup_crr_iam_resources(account_creds):
1213
"""
@@ -25,7 +26,7 @@ def _setup_crr_iam_resources(account_creds):
2526
credentials = iam_client.create_access_key(UserName="crr-user")
2627

2728
iam_client.create_role(
28-
RoleName="crr-role",
29+
RoleName=CRR_ROLE_NAME,
2930
AssumeRolePolicyDocument='''{
3031
"Version": "2012-10-17",
3132
"Statement": [
@@ -55,7 +56,7 @@ def _setup_crr_iam_resources(account_creds):
5556
)
5657

5758
iam_client.attach_role_policy(
58-
RoleName="crr-role",
59+
RoleName=CRR_ROLE_NAME,
5960
PolicyArn=policy["Policy"]["Arn"]
6061
)
6162

0 commit comments

Comments
 (0)