Coder Social home page Coder Social logo

`faas list` does not seem to work about func HOT 5 CLOSED

knative avatar knative commented on August 30, 2024
`faas list` does not seem to work

from func.

Comments (5)

lance avatar lance commented on August 30, 2024

Update: it's listing only functions deployed to the faas namespace.

from func.

lkingland avatar lkingland commented on August 30, 2024

Upon thinking about this a bit, I think the most broadly compatible option here might be to consider that the FaaS system, when using a Kubernetes cluster as the underlying Platform, always delegates to the K8S client for making requests. This client is already configured using ~/.kube/config, which includes the currently active namespace.
So how about, in all cases, we let the currently configured namespace be determined by that system (the docs currently recommend setting this during configuration):

kubectl config set-context --current --namespace=faas

Then we confirm that our code does not interfere with this setting.

By keeping the namespace configuration as a layer "below" the faas system (in the same way we expect the currently active cluster to be abstracted, credentials, connection address, etc) we are not only preventing a leak through the Platform abstraction, we're also allowing for support of different platforms which don't have the namespace concept.

Alternately, if we really do want to expose the concept of namespace through the abstraction, we would just need to agree to be on the hook to create a sensible default implementation in situations where namespace does not exist by default, such as localhost, other cluster types, etc. We would then just add this setting in the .faas.config such that the Faas Client can find the Function on subsequent invocations. Thoughts??

from func.

lance avatar lance commented on August 30, 2024

So how about, in all cases, we let the currently configured namespace be determined by that system (the docs currently recommend setting this during configuration)

Agree. I don't think this eliminates the need for a --namespace flag though.

Alternately, if we really do want to expose the concept of namespace through the abstraction, we would just need to agree to be on the hook to create a sensible default implementation in situations where namespace does not exist by default, such as localhost, other cluster types, etc.

This should be taken under consideration, for sure. However, I think for an initial Dev Preview release, we can assume that localhost and Kube/OCP are the only two supported platforms. In this case, I'm not sure that there is much to really do other than be clear that delete, deploy update and list commands are only relevant in the context of remote Kube/OCP deployments.

from func.

lkingland avatar lkingland commented on August 30, 2024

OK, so we'll default to using the kubectl-defined namespace (not override), but if supplied, use it. Additionally, in platforms that do not utilize the setting, for now it is ignored.

It seems to me upon reflection that, regardless of underlying platform (be that Kubernetes, localhost, or some future platform made deployable via Grid), that the concept of a namespace will be useful if not necessary for anything beyond toy deployments. Woe be unto those who add complexity at such an early stage, but this may be part of the Irreducible Complexity of function-as-a-service offering.

from func.

lance avatar lance commented on August 30, 2024

Fixed in #78

from func.

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.