@@ -14,7 +14,7 @@ import (
1414func NewSignetNode (ctx * pulumi.Context , args SignetNodeComponentArgs , opts ... pulumi.ResourceOption ) (* SignetNodeComponent , error ) {
1515 // Apply defaults before validation
1616 args .ApplyDefaults ()
17-
17+
1818 if err := args .Validate (); err != nil {
1919 return nil , fmt .Errorf ("invalid signet node component args: %w" , err )
2020 }
@@ -54,7 +54,7 @@ func NewSignetNode(ctx *pulumi.Context, args SignetNodeComponentArgs, opts ...pu
5454 return nil , fmt .Errorf ("failed to create rollup data pvc: %w" , err )
5555 }
5656
57- secretName := " execution-jwt"
57+ secretName := fmt . Sprintf ( "%s- execution-jwt", args . Name )
5858 secret , err := corev1 .NewSecret (ctx , secretName , & corev1.SecretArgs {
5959 StringData : pulumi.StringMap {
6060 "jwt.hex" : internalArgs .ExecutionJwt ,
@@ -63,19 +63,20 @@ func NewSignetNode(ctx *pulumi.Context, args SignetNodeComponentArgs, opts ...pu
6363 Namespace : internalArgs .Namespace ,
6464 Labels : utils .CreateResourceLabels (args .Name , secretName , args .Name , nil ),
6565 },
66- })
66+ }, pulumi . Parent ( component ) )
6767 if err != nil {
6868 return nil , fmt .Errorf ("failed to create execution jwt secret: %w" , err )
6969 }
7070
7171 // Create ConfigMap for execution environment variables
72- executionConfigMapName := " exex-configmap"
72+ executionConfigMapName := fmt . Sprintf ( "%s- exex-configmap", args . Name )
7373 executionConfigMap , err := utils .CreateConfigMap (
7474 ctx ,
7575 executionConfigMapName ,
7676 internalArgs .Namespace ,
7777 utils .CreateResourceLabels (args .Name , executionConfigMapName , args .Name , nil ),
7878 internalArgs .Env ,
79+ component ,
7980 )
8081 if err != nil {
8182 return nil , fmt .Errorf ("failed to create execution configmap: %w" , err )
@@ -215,7 +216,7 @@ func NewSignetNode(ctx *pulumi.Context, args SignetNodeComponentArgs, opts ...pu
215216 MountPath : internalArgs .RollupDataMountPath ,
216217 },
217218 corev1.VolumeMountArgs {
218- Name : pulumi .String ("execution-jwt" ),
219+ Name : pulumi .String (secretName ),
219220 MountPath : internalArgs .ExecutionJwtMountPath ,
220221 },
221222 },
@@ -230,7 +231,7 @@ func NewSignetNode(ctx *pulumi.Context, args SignetNodeComponentArgs, opts ...pu
230231 },
231232 },
232233 corev1.VolumeArgs {
233- Name : pulumi .String ("execution-jwt" ),
234+ Name : pulumi .String (secretName ),
234235 Secret : & corev1.SecretVolumeSourceArgs {
235236 SecretName : secret .Metadata .Name (),
236237 },
@@ -270,13 +271,14 @@ func NewSignetNode(ctx *pulumi.Context, args SignetNodeComponentArgs, opts ...pu
270271 Example : "example" ,
271272 }
272273
273- consensusConfigMapName := " consensus-configmap-env-config"
274+ consensusConfigMapName := fmt . Sprintf ( "%s- consensus-configmap-env-config", args . Name )
274275 consensusConfigMap , err := utils .CreateConfigMap (
275276 ctx ,
276277 consensusConfigMapName ,
277278 internalArgs .Namespace ,
278279 utils .CreateResourceLabels (args .Name , consensusConfigMapName , args .Name , nil ),
279280 consensusEnv .toInternal (),
281+ component ,
280282 )
281283 if err != nil {
282284 return nil , fmt .Errorf ("failed to create consensus configmap: %w" , err )
0 commit comments