Comments (5)
Update: it's listing only functions deployed to the faas
namespace.
from func.
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.
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.
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.
Fixed in #78
from func.
Related Issues (20)
- Feature: inform the cluster of events that my function produces
- Typo in run command
- func build failing for new installation HOT 13
- when redeploying function in openshift dont force its internal registry HOT 2
- Support service bindings in build stages
- func deploy returing MANIFEST_BLOB_UNKNOWN HOT 5
- `builderImages` is ignored HOT 2
- Support configuration of the `lifecycle` image HOT 2
- gitlab test often fails when unrelated to the PR changes HOT 1
- Support gradual rollout and traffic management in `func.yaml` HOT 1
- Support GitOps with an option to output as YAML HOT 1
- Adding ca certificates to support transparent proxy HOT 11
- Unable to build quickstart `hello` image HOT 21
- Unable to build go function - tls verify certificate: x509: certificate signed by unkown authority HOT 3
- Building containers with func HOT 2
- Docker detection is broken on Mac OS X HOT 2
- deploy error: knative deployer failed to wait for the Knative Service to become ready: timeout: service HOT 1
- Packaging func cli for openSUSE: How to make it properly report the version? HOT 5
- Cannot write into node_modules directory HOT 2
- Func invoke encodes json data differently than curl HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from func.