https://pulumi.com logo
#kubernetes
Title
# kubernetes
b

bored-table-20691

05/20/2021, 3:29 PM
I was looking for an example in Go for how to create a Deployment that references a ConfigMap (and/or Secret), but couldn’t seem to find any (I could find a bunch of Typescript examples). Is there a quick pointer? For example, say I have:
Copy code
myConfigMap, err := corev1.NewConfigMap(ctx, "my_config_map", &corev1.ConfigMapArgs{ ...
How do I reference that in my Deployment (in this in
EnvFrom
):
Copy code
...
							EnvFrom: corev1.EnvFromSourceArray{
								&corev1.EnvFromSourceArgs{
									ConfigMapRef: &corev1.ConfigMapEnvSourceArgs{
										Name: ... what goes here ? ...
									},
								},
...
(This is with Pulumi 3 btw)
b

bumpy-summer-9075

05/20/2021, 3:37 PM
It shouldn't be any different than the TS examples; the name is in the ConfigMap's Metadata.Name property
b

bored-table-20691

05/20/2021, 7:53 PM
Thanks @bumpy-summer-9075, that was it.
đź‘Ť 1
17 Views