flyte: [BUG] Namespace creation fails with default pod template
Describe the bug
when configuring a basic default pod template the name spaces are not created. Projects are created without error but there are no traces of the namespace for the project. When deploying a workflow the propeller error is
failed to create workflow in propeller namespaces "test-development" not found…
Removing the default pod, the namespaces are created
Expected behavior
I expect the namespaces to be created or an error when creation failed. I expect the default pod template to be used as either primary, default containers or ignored.
Additional context to reproduce
clusterResourceTemplates = {
inline = {
"test_template.yaml" = file("${path}/test_template.yaml")
}
}
....
plugins = {
k8s = {
default-pod-template-name = "test_template.yaml" # also tried with "test_template"
}
}
Trimming down the default template to the most basic skeleton for testing. test_template.yaml
apiVersion: v1
kind: PodTemplate
metadata:
name: test_template
namespace: flyte # default for all namespaces
template:
metadata:
labels:
foo: from-pod-template
spec:
containers:
- name: noob # should be ignore, also tried with default and primary
image: docker.io/rwgrim/docker-noop
Screenshots
No response
Are you sure this issue hasn’t been raised already?
- Yes
Have you read the Code of Conduct?
- Yes
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 20 (10 by maintainers)
Thank you for opening your first issue here! 🛠
@nuhaj great, hopefully, we’ll improve the PodTemplates docs soon to cover some of the gaps. Any other questions please let us know. Thanks!
@nuhaj regarding the PodTemplate behavior I just had success using the flyte-binary v1.12.0 with the following config:
In the Helm values:
The PodTemplate:
And running a simple workflow:
I get the following Pod spec:
Resulting Pod spec
Notice here that I used
defaultas the container name, which should instruct flytepropeller to use this spec as a base for all the containers in the Pod, not only the primary (in which case, you’d useprimaryas the container name)In regards to the namespace issue which I wasn’t able to reproduce: without even using anything in the
clusterResourceTemplatessection and creating a new project:flytectl create project --name projectx --id projectxThe cluster resources controller creates the namespaces:
Let me know if you have additional questions.