Skip to content

Commit

Permalink
fix other pkg name
Browse files Browse the repository at this point in the history
  • Loading branch information
Racer159 committed May 9, 2024
1 parent 10a0c7e commit 4393b62
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/pepr/operator/crd/validators/package-validator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const invalidNamespaces = ["kube-system", "kube-public", "_unknown_", "pepr-syst
export async function validator(req: PeprValidateRequest<UDSPackage>) {
const pkg = migrate(req.Raw);

const pkgName = pkg.metadata?.name ?? "_unknown_";
const ns = pkg.metadata?.namespace ?? "_unknown_";

if (invalidNamespaces.includes(ns)) {
Expand Down Expand Up @@ -38,7 +39,7 @@ export async function validator(req: PeprValidateRequest<UDSPackage>) {
}

// Ensure the service name is unique
const name = generateVSName(req.Raw, expose);
const name = generateVSName(pkgName, expose);
if (virtualServiceNames.has(name)) {
return req.Deny(
`The combination of characteristics of this expose entry would create a duplicate VirtualService. ` +
Expand Down

0 comments on commit 4393b62

Please sign in to comment.