8000 Node selector not working · Issue #99 · joyrex2001/kubedock · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Node selector not working #99

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

Closed
clrxbl opened this issue Nov 11, 2024 · 6 comments
Closed

Node selector not working #99

clrxbl opened this issue Nov 11, 2024 · 6 comments
Labels
bug Something isn't working

Comments

@clrxbl
Copy link
clrxbl commented Nov 11, 2024

Passing along --node-selector=worker=test or using the K8S_NODE_SELECTOR variable doesn't seem to work and returns the following error upon container creation

I1111 14:06:05.048891       1 main.go:29] kubedock 0.17.0-3-gda4f013 (20241025-082815) / kubedock.id=6a4351a01397

2024/11/11 14:06:49 [Recovery] 2024/11/11 - 14:06:49 panic recovered:
assignment to entry in nil map
/usr/local/go/src/runtime/map_faststr.go:205 (0x41857a)
/go/src/github.com/joyrex2001/kubedock/internal/model/types/container.go:190 (0x176e38d)
/go/src/github.com/joyrex2001/kubedock/internal/backend/deploy.go:89 (0x19f249b)
/go/src/github.com/joyrex2001/kubedock/internal/backend/deploy.go:47 (0x19f1cce)
/go/src/github.com/joyrex2001/kubedock/internal/server/routes/common/util.go:15 (0x1a11555)
/go/src/github.com/joyrex2001/kubedock/internal/server/routes/common/containers.go:31 (0x1a0ce76)
/go/src/github.com/joyrex2001/kubedock/internal/server/routes/docker.go:15 (0x1a22041)
/go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/context.go:185 (0x982d79)
/go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/recovery.go:102 (0x982d67)
/go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/context.go:185 (0x974daa)
/go/src/github.com/joyrex2001/kubedock/internal/server/httputil/util.go:99 (0x1a25064)
/go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/context.go:185 (0x974daa)
/go/src/github.com/joyrex2001/kubedock/internal/server/httputil/util.go:78 (0x1a24f4e)
/go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/context.go:185 (0x981ea4)
/go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/logger.go:249 (0x981e8b)
/go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/context.go:185 (0x1a09fc8)
/go/src/github.com/joyrex2001/kubedock/internal/server/httputil/util.go:122 (0x1a09f45)
/go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/context.go:185 (0x981291)
/go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/gin.go:633 (0x980d00)
/go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/gin.go:600 (0x9809ba)
/go/src/github.com/joyrex2001/kubedock/internal/server/httputil/util.go:112 (0x1a09f14)
/go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/context.go:185 (0x98136a)
/go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/gin.go:677 (0x981357)
/go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/gin.go:670 (0x980ec4)
/go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/gin.go:589 (0x980831)
/usr/local/go/src/net/http/server.go:3142 (0x714cad)
/usr/local/go/src/net/http/server.go:2044 (0x710067)
/usr/local/go/src/runtime/asm_amd64.s:1695 (0x472100)
@chaos-mind
Copy link

I faced the same behaviour

@joyrex2001 joyrex2001 added the bug Something isn't working label Nov 11, 2024
joyrex2001 added a commit that referenced this issue Nov 12, 2024
@joyrex2001
Copy link
Owner

Should be fixed, can you confirm?

@clrxbl
Copy link
Author
clrxbl commented Nov 12, 2024

Should be fixed, can you confirm?

Is there a Docker image available?

@joyrex2001
Copy link
Owner

Should be fixed, can you confirm?

Is there a Docker image available?

Yes, latest contains the current changes (joyrex2001/kubedock:latest).

@clrxbl
Copy link
Author
clrxbl commented Nov 12, 2024

Should be fixed, can you confirm?

Is there a Docker image available?

Yes, latest contains the current changes (joyrex2001/kubedock:latest).

Can confirm that it works fine now, thanks!
Would love to see node affinity / topology spread constraints next.

@joyrex2001
Copy link
Owner

Awesome, thanks for testing!

Considering the affinity/topology spread; you could try using a custom pod-template; this simple example:

apiVersion: v1
kind: Pod
metadata:
  annotations:
    example: kubedock 
spec:
  serviceAccountName: kubedock

will add an annotation and use a specific service account; but the template can be used for your use-case as well.

if not, I am always open for PRs (or maybe create a separate issue to track the feature request).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants
0