Skip to content

Commit

Permalink
release: set platform for resourcegen
Browse files Browse the repository at this point in the history
  • Loading branch information
burgerdev authored and katexochen committed Aug 7, 2024
1 parent 54492fd commit 617f675
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 13 deletions.
23 changes: 11 additions & 12 deletions internal/kuberesource/resourcegen/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,18 @@ func main() {

flag.Parse()

var platform platforms.Platform
var runtimeHandler string
if *rawPlatform != "" {
var err error
platform, err = platforms.FromString(*rawPlatform)
if err != nil {
log.Fatalf("Error parsing platform: %v", err)
}
if *rawPlatform == "" {
log.Fatalf("--platform must be set to one of %v", platforms.AllStrings())
}

runtimeHandler, err = manifest.RuntimeHandler(platform)
if err != nil {
log.Fatalf("Error getting default runtime handler: %v", err)
}
platform, err := platforms.FromString(*rawPlatform)
if err != nil {
log.Fatalf("Error parsing platform: %v", err)
}

runtimeHandler, err := manifest.RuntimeHandler(platform)
if err != nil {
log.Fatalf("Error getting default runtime handler: %v", err)
}

var resources []any
Expand Down
2 changes: 1 addition & 1 deletion packages/scripts.nix
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@
trap 'rm -rf $tmpdir' EXIT
echo "ghcr.io/edgelesssys/contrast/coordinator:latest=$imageRef" > "$tmpdir/image-replacements.txt"
resourcegen --image-replacements "$tmpdir/image-replacements.txt" --add-load-balancers coordinator > "$tmpdir/coordinator_base.yml"
resourcegen --platform AKS-CLH-SNP --image-replacements "$tmpdir/image-replacements.txt" --add-load-balancers coordinator > "$tmpdir/coordinator_base.yml"
pushd "$tmpdir" >/dev/null
cp ${pkgs.microsoft.genpolicy.rules-coordinator}/genpolicy-rules.rego rules.rego
Expand Down

0 comments on commit 617f675

Please sign in to comment.