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

0.13: [Bug]: Module task with podSelector does not work with 0.13 #5269

Closed
shumailxyz opened this issue Oct 18, 2023 · 0 comments · Fixed by #5272
Closed

0.13: [Bug]: Module task with podSelector does not work with 0.13 #5269

shumailxyz opened this issue Oct 18, 2023 · 0 comments · Fixed by #5272
Assignees

Comments

@shumailxyz
Copy link
Contributor

shumailxyz commented Oct 18, 2023

Garden Bonsai (0.13) Bug

Current Behavior

If a task in a module specifies podSelector, it doesn't work in bonsai with the following error message:

Error validating spec for Run type=kubernetes-pod name=task-foo (from module test-tasks):
"podSelector" can't be specified with "kind"
object at spec.resource can only contain one of [kind, podSelector]

Expected behavior

Task should work fine.

Reproducible example

Run garden run task-foo with the following project and module:

project.garden.yml

apiVersion: garden.io/v1
kind: Project
name: repro-task-to-run
environments:
  - name: local
providers:
  - name: local-kubernetes
    environments: [local]

garden.yml

kind: Module
name: test-tasks
description: task bug in bonsai
type: kubernetes
allowPublish: false
include: []
timeout: 120
manifests:
  - apiVersion: v1
    kind: Pod
    metadata:
      name: test-app
      labels:
        app: test-app
    spec:
      containers:
        - name: test-app
          image: nginx
      restartPolicy: Never
tasks:
  - name: task-foo
    description: some task foo
    timeout: 1200
    resource:
      podSelector:
        app: test-app
    dependencies:
      - test-tasks
    command:
      - '/bin/bash'
      - '-c'
      - 'echo hello'

Workaround

Don't know of any.

Additional context

Could be an issue with conversion of tasks to run.

Your environment

  • OS: mac
  • How I'm running Kubernetes: minikube

garden version
0.13.17

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants