Giter Club home page Giter Club logo

Comments (4)

mmourafiq avatar mmourafiq commented on June 26, 2024 1

Sorry for late reply, I just checked again the generated CRD from kubebuilder, and indeed intOrString is the correct one. But the type needs to change from string to:

anyOf:
  - type: integer
  - type: string

Not sure if this is supported, but here's the full generated spec:

port:
  anyOf:
  - type: integer
  - type: string
  description: Name or number of the port to access
    on the container. Number must be in the range
    1 to 65535. Name must be an IANA_SVC_NAME.
  x-kubernetes-int-or-string: true

Hope this helps.

P.S. I reworked the converter in our application to use the port name string instead of the port value int, but the issue could happen to other users and it will easily take ~ an hour of debugging :)

from dask-kubernetes.

jacobtomlinson avatar jacobtomlinson commented on June 26, 2024

Thanks @mmourafiq. I'm not 100% sure where to look to resolve this because DaskJob.spec.cluster.spec.scheduler.spec is just an io.k8s.api.core.v1.PodSpec and should be validated exactly the same as any other Pod spec. We use k8s-crd-resolver to generate the CRDs from our templates.

I note that our CRD templates are referencing the Kubernetes 1.21.1 spec so perhaps bumping those to a more recent version would help?

$ref: 'python://k8s_crd_resolver/schemata/k8s-1.21.1.json#/definitions/io.k8s.api.core.v1.PodSpec'

from dask-kubernetes.

mmourafiq avatar mmourafiq commented on June 26, 2024

I see, I think the issue is in the k8s-crd-resolver, the choice of intOrString from the machinery is probably not the correct one. I already tried port: "8786" but the issue with that is that kubernetes would automatically try to resolve a port name if the value is string, i.e. it would complain about the value not starting with a charter value when there are quotes.

from dask-kubernetes.

jacobtomlinson avatar jacobtomlinson commented on June 26, 2024

We can patch things and do in a couple of places already. Maybe we should do that here? Do you know what type should it be instead ofintOrString?

https://github.com/dask/dask-kubernetes/blob/main/dask_kubernetes/operator/customresources/daskcluster.patch.yaml

from dask-kubernetes.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.