Skip to content

Add allowed namespaces to vshngarage#682

Open
mikeshootzz wants to merge 1 commit into
developfrom
feat/garage-reference-grant
Open

Add allowed namespaces to vshngarage#682
mikeshootzz wants to merge 1 commit into
developfrom
feat/garage-reference-grant

Conversation

@mikeshootzz
Copy link
Copy Markdown
Contributor

@mikeshootzz mikeshootzz commented May 20, 2026

Summary

  • This uses the GarageReferenceGrant to restrict where GarageKeys and GarageBuckets can be provisioned.
  • syn-appcat is included by default so AppCat can provision the buckets as normal

Checklist

  • Update tests.
  • Link this PR to related issues.
  • Merge with /merge comment.

Component PR: vshn/component-appcat#1193

This uses the GarageReferenceGrant to restrict where GarageKeys and
GarageBuckets can be provisioned.
@github-actions
Copy link
Copy Markdown
Contributor

@mikeshootzz mikeshootzz marked this pull request as draft May 20, 2026 11:47
@mikeshootzz mikeshootzz marked this pull request as ready for review May 20, 2026 14:10
@mikeshootzz mikeshootzz requested review from a team, Kidswiss, TheBigLee, mdnix and zugao and removed request for a team May 20, 2026 14:10
Copy link
Copy Markdown
Member

@TheBigLee TheBigLee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit in the comment

Comment on lines +24 to +28
// applyAllowedNamespaces decodes the comma-coupled JSON list provided through
// the comp-function xfn-config (key: garageAllowedNamespaces) and injects it
// into the vshngaragecluster chart values. Empty input leaves values
// untouched so older component-appcat releases that don't ship the key keep
// working — the chart simply skips the GarageReferenceGrant template.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// applyAllowedNamespaces decodes the comma-coupled JSON list provided through
// the comp-function xfn-config (key: garageAllowedNamespaces) and injects it
// into the vshngaragecluster chart values. Empty input leaves values
// untouched so older component-appcat releases that don't ship the key keep
// working — the chart simply skips the GarageReferenceGrant template.
// applyAllowedNamespaces decodes the JSON array through
// the comp-functions config key (`garageAllowedNamespaces`) and injects it
// into the vshngaragecluster chart values.
// An empty input leaves values untouched, for backwards compatibility.
// the chart simply skips the GarageReferenceGrant template.

// into the vshngaragecluster chart values. Empty input leaves values
// untouched so older component-appcat releases that don't ship the key keep
// working — the chart simply skips the GarageReferenceGrant template.
func applyAllowedNamespaces(values map[string]any, raw string) error {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: for reading purposes I would move this function at the bottom

}

if err := applyAllowedNamespaces(values, svc.Config.Data["garageAllowedNamespaces"]); err != nil {
return runtime.NewFatalResult(err)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this fatal error return too early and try to delete managed resources?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants