Skip to content

Conversation

@rswanson
Copy link
Member

No description provided.

Copilot AI review requested due to automatic review settings August 26, 2025 15:12
Copy link
Member Author

rswanson commented Aug 26, 2025

Merge activity

  • Aug 26, 3:12 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Aug 26, 3:12 PM UTC: @rswanson merged this pull request with Graphite.

Copy link
Member Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@rswanson rswanson merged commit 996884a into main Aug 26, 2025
2 checks passed
@rswanson rswanson deleted the swanny/naming-and-parent-resource branch August 26, 2025 15:12
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes resource parent assignment and naming uniqueness issues for ConfigMaps and related resources in a Kubernetes deployment system. The changes ensure proper resource hierarchy and prevent naming conflicts when multiple instances are deployed.

  • Modified the CreateConfigMap function to accept an optional parent parameter for proper resource hierarchy
  • Updated ConfigMap and Secret names to include component prefixes for uniqueness
  • Removed redundant Name field from metadata that was causing conflicts with Pulumi's automatic naming

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
pkg/utils/env.go Enhanced CreateConfigMap function to support parent resources and removed duplicate Name metadata field
pkg/signet_node/signet_node.go Updated resource names to include component prefixes and set proper parent relationships

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

namespace pulumi.StringInput,
labels pulumi.StringMap,
env T,
parent ...pulumi.Resource,
Copy link

Copilot AI Aug 26, 2025

Choose a reason for hiding this comment

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

The variadic parameter parent ...pulumi.Resource allows multiple parents to be passed, but the implementation only uses the first one. Consider using a single optional parameter parent pulumi.Resource or *pulumi.Resource to make the API intention clearer and prevent confusion.

Suggested change
parent ...pulumi.Resource,
parent pulumi.Resource,

Copilot uses AI. Check for mistakes.
Comment on lines +43 to +46
Metadata: &metav1.ObjectMetaArgs{
Namespace: namespace,
Labels: labels,
},
Copy link

Copilot AI Aug 26, 2025

Choose a reason for hiding this comment

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

The Name field was removed from the metadata, but there's no comment explaining why this change was necessary. Consider adding a comment explaining that Pulumi automatically sets the name based on the resource name parameter to avoid confusion for future maintainers.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants