little-river-49422
04/02/2019, 7:58 AMPlan apply failed: Job.batch "dbseed" is invalid: spec.template.spec.containers[0].envFrom[0].configMapRef.name: Invalid value: "develop/baseconfigmap-wwykveez": a DNS-1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. '<http://example.com|example.com>', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')
which doesnt make a lot of sense. develop - is the namespace, everything after /
is real configmap name. this works for deployments, but not for jobs? I can work around with this bad boy:
config_map.metadata.apply(
lambda metadata: metadata['name'].split('/')[-1]
)
but this doesnt look rightincalculable-sundown-82514
04/02/2019, 5:20 PMgorgeous-egg-16927
04/02/2019, 5:24 PMlittle-river-49422
04/02/2019, 8:48 PMincalculable-sundown-82514
04/02/2019, 8:54 PMlittle-river-49422
04/02/2019, 8:57 PMconfig_map_name = config_map.metadata.apply(lambda resource: resource['name'])
incalculable-sundown-82514
04/02/2019, 9:05 PMconfig_map.metadata["name"]
instead of doing the explicit apply here, this is just some syntax sugar on top of what you’re doing