-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
748b92a
commit c3c3f0b
Showing
3 changed files
with
26 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import os | ||
|
||
# Read the random namespace from the file | ||
with open("random_namespace.txt", "r") as file: | ||
random_namespace = file.read().strip() | ||
|
||
# Read the template file | ||
with open("cnp_template.yaml", "r") as file: | ||
template = file.read() | ||
|
||
# Replace the placeholder with the random namespace | ||
template = template.replace("{{$randomNamespace}}", random_namespace) | ||
|
||
# Write the processed template back to the same file | ||
with open("cnp_template.yaml", "w") as file: | ||
file.write(template) | ||
|
||
print("Processed template written to cnp_template.yaml") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters