kubernetes-sigs / kubernetes-sigs/kustomize
Kustomize doesn't support metadata.generateName
- Dominant language
- Go
- Stars
- 12.2k
- Forks
- 2.4k
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 25
Description
I am trying to use `kustomize` with https://github.com/argoproj/argo.
Example spec:
```
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
generateName: hello-world-
spec:
entrypoint: whalesay
templates:
- name: whalesay
container:
image: docker/whalesay:latest
command: [cowsay]
args: ["hello world"]
```
Argo Workflow CRDs don't require or use `metadata.name`, but I am getting the following error when I try to run `kustomize build` on an Argo Workflow resource:
```
Error: loadResMapFromBasesAndResources: rawResources failed to read Resources: Missing metadata.name in object {map[args:[hello world] kind:Workflow metadata:map[generateName:hello-world-] spec:map[entrypoint:whalesay templates:[map[container:map[command:[cowsay] image:docker/whalesay:latest] name:whalesay]]] apiVersion:argoproj.io/v1alpha1]}
```
Is there a way for me to override where `kustomize` looks for a name to `metadata.generateName`?
Contributor guide
Research direction
Start by reproducing `kustomize build` with the Argo Workflow manifest and review the issue discussion for the expected handling of `metadata.generateName`. The work is done when a resource using `generateName` builds successfully without requiring `metadata.name`, with behavior covered by the project's relevant tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100