Skip to content

Commit a591ccd

Browse files
committedJan 13, 2025
handles all other as kinesis
1 parent db1dad2 commit a591ccd

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed
 

‎crossplane/modify-claims.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ if [[ "$kind" == "LykonEventSourceMapping" ]]; then
7979
# Get the current stream value
8080
stream=$(yq eval '.spec.parameters.stream' "$temp_yaml_file")
8181

82-
# Modify the stream based on whether it's S3 or Kinesis
82+
# Modify the stream based on whether it's S3, Kinesis, or a simple Kinesis stream name
8383
if [[ "$stream" == s3:* ]]; then
8484
# Extract bucket name from the stream and form the S3 ARN
8585
bucket_name=$(echo "$stream" | cut -d':' -f2)
@@ -91,8 +91,9 @@ if [[ "$kind" == "LykonEventSourceMapping" ]]; then
9191
new_stream="arn:aws:kinesis:279707217826:stream/$stream_name"
9292
yq eval ".spec.parameters.stream = \"$new_stream\"" -i "$temp_yaml_file"
9393
else
94-
echo "Error: Unsupported stream format: $stream"
95-
exit 1
94+
# Treat any other value as a simple Kinesis stream name and form the Kinesis ARN
95+
new_stream="arn:aws:kinesis:279707217826:stream/$stream"
96+
yq eval ".spec.parameters.stream = \"$new_stream\"" -i "$temp_yaml_file"
9697
fi
9798
fi
9899

0 commit comments

Comments
 (0)
Please sign in to comment.