-
Notifications
You must be signed in to change notification settings - Fork 210
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
connectivity: Make pod to world test configurable
A configurable domain allows us to run the PodToWord test in an environment where external traffic only allow for specific domains. This also gives us the ability to swap the domain in test environments to better handle flaky tests. Signed-off-by: Birol Bilgin <[email protected]>
- Loading branch information
Showing
8 changed files
with
71 additions
and
30 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
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
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
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,21 @@ | ||
package utils | ||
|
||
import ( | ||
"bytes" | ||
"text/template" | ||
) | ||
|
||
// RenderTemplate executes temp with data and returns the result | ||
func RenderTemplate(temp string, data any) (string, error) { | ||
tm, err := template.New("template").Parse(temp) | ||
if err != nil { | ||
return "", err | ||
} | ||
|
||
buf := bytes.NewBuffer(nil) | ||
if err := tm.Execute(buf, data); err != nil { | ||
return "", err | ||
} | ||
|
||
return buf.String(), nil | ||
} |
60ae1d5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tklauser I think this commit broke the sample at https://play.instruqt.com/embed/isovalent/tracks/cilium-service-mesh/challenges/l7-traffic-mgmt/assignment that directly applies the resource from the master
Maybe there's already an issue tracked for this that I wasn't able to spot. In which case please ignore.
60ae1d5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the report @danistrebel. I wasn't aware the instruqt labs use these resources directly. I've created #1337 to track the issue.