Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kubernetes resource creation template fails for resources like ConfigMap, Secrets, Pods etc #5722

Closed
mojojoji opened this issue Apr 20, 2021 · 4 comments · Fixed by #5723
Closed
Labels
type/bug type/regression Regression from previous behavior (a specific type of bug)

Comments

@mojojoji
Copy link

Creation of resources like ConfigMap, Secret fails when a kubernetes resource type template is used. This is happening because there is a check for empty resourceGroup. But resourceGroup will be empty for certain resources like ConfigMap, Secrets, Pods etc.

if resourceGroup == "" || resourceName == "" || resourceKind == "" {
return "", "", "", errors.New(errors.CodeBadRequest, "Group, kind, and name are all required but at least one of them is missing from the manifest")
}

The resource is created but because of the above check, the workflow fails with error
Group, kind, and name are all required but at least one of them is missing from the manifest

How can argo workflows be used to create ConfigMaps and Secrets in one of the steps?

The workflow that gave this error is

apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
  name: hello-workflow
spec:
  entrypoint: hello-config-gen
  templates:
    - name: hello-config-gen
      resource:
        action: create
        manifest: |
          apiVersion: v1
          kind: ConfigMap
          metadata:
            name: hello-config
          data:
            username: test
@alexec
Copy link
Contributor

alexec commented Apr 20, 2021

Related to 2651bd6
@terrytangyuan ?

@alexec alexec added type/bug type/regression Regression from previous behavior (a specific type of bug) labels Apr 20, 2021
@alexec
Copy link
Contributor

alexec commented Apr 20, 2021

@simster7 did we back port that commit to v3.0?

@terrytangyuan
Copy link
Member

terrytangyuan commented Apr 20, 2021

My apologies. This is indeed an oversight. Fixing in #5723. Thanks for reporting!

@terrytangyuan
Copy link
Member

terrytangyuan commented Apr 20, 2021

@alexec From the commit 2651bd6, I don't see it being ported to any of the releases yet. It's not check-marked in #5715 either so we should be fine as is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug type/regression Regression from previous behavior (a specific type of bug)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants