-
Notifications
You must be signed in to change notification settings - Fork 0
fix: set parent properly on configmaps, naming uniqueness #45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
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.
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
CreateConfigMapfunction to accept an optional parent parameter for proper resource hierarchy - Updated ConfigMap and Secret names to include component prefixes for uniqueness
- Removed redundant
Namefield 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, |
Copilot
AI
Aug 26, 2025
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.
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.
| parent ...pulumi.Resource, | |
| parent pulumi.Resource, |
| Metadata: &metav1.ObjectMetaArgs{ | ||
| Namespace: namespace, | ||
| Labels: labels, | ||
| }, |
Copilot
AI
Aug 26, 2025
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.
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.

No description provided.