I was looking for an example in Go for how to crea...
# kubernetes
b
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
It shouldn't be any different than the TS examples; the name is in the ConfigMap's Metadata.Name property
b
Thanks @bumpy-summer-9075, that was it.
đź‘Ť 1