funktionio / funktion

a CLI tool for working with funktion
https://funktion.fabric8.io/
Apache License 2.0
297 stars 25 forks source link

Extensive ConfigMap usage a problem in some OpenShift environments #35

Closed bbrowning closed 7 years ago

bbrowning commented 7 years ago

When trying to deploy Funktion to an Openshift environment maintained by my IT department, I hit an issue with ConfigMap quotas. Just installing the platform creates a lot of catalog-* ConfigMap entries and every Function, Flow, and Connector installed adds more. In my case I have a quota of 20 ConfigMaps, which is fairly low, but even a much higher quota could quickly be hit.

Is there a way we could reduce overall ConfigMap usage without sacrificing functionality? Perhaps we could install the catalog-* ConfigMap entries from funktion install platform lazily as-needed instead of eagerly?

iocanel commented 7 years ago

I don't see any reason, why we couldn't use a single map that contains all catalogs.

@jstrachan: wdyt?

jimmidyson commented 7 years ago

Iirc there's a 1mb limit on config map size.

tobias commented 7 years ago

Does funktion even need all of those catalog- entries? Or are they just coming in because funktion-platform brings in the fabric8 console? If we removed the console from the platform, that would greatly reduce the ConfigMap burden I believe.

jimmidyson commented 7 years ago

I think there are two problems: the undesirable coupling with the fabric8 app catalog deployment; and also the use of config maps to define possible connectors. It should be easy to remove the installation of fabric8 console but probably need to think more about the use of configmaps for connectors.

ChugR commented 7 years ago

Is there a workaround for this?

> funktion install platform
kubectl apply --namespace funktion-system -f https://repo1.maven.org/maven2/io/fabric8/platform/packages/funktion-platform/2.4.24/funktion-platform-2.4.24-kubernetes.yml

bufio.Scanner: token too long
Failed: exit status 1
jstrachan commented 7 years ago

@ChugR whats the output of

kubectl version

I suspect we need a recent 1.4.x version of kubectl

ChugR commented 7 years ago

@jstrachan 1.3

$ kubectl version Client Version: version.Info{Major:"1", Minor:"3", GitVersion:"v1.3.0+52492b4", GitCommit:"52492b4", GitTreeState:"clean", BuildDate:"2016-10-26T13:42:34Z", GoVersion:"go1.7.1", Compiler:"gc", Platform:"linux/amd64"}

Server Version: version.Info{Major:"1", Minor:"3", GitVersion:"v1.3.0+52492b4", GitCommit:"52492b4", GitTreeState:"clean", BuildDate:"2016-10-15T23:44:12Z", GoVersion:"go1.6.3", Compiler:"gc", Platform:"linux/amd64"}

ChugR commented 7 years ago

I updated my Openshift CLI and kubectl but 'funktion install platform' still fails. I'm using vanilla, as-installed Openshift. Is there some configuration I can do to get my microservices installed?

$ kubectl version Client Version: version.Info{Major:"1", Minor:"4", GitVersion:"v1.4.0+776c994", GitCommit:"a9e9cf3", GitTreeState:"clean", BuildDate:"2017-01-24T15:12:46Z", GoVersion:"go1.7.4", Compiler:"gc", Platform:"linux/amd64"} Server Version: version.Info{Major:"1", Minor:"4", GitVersion:"v1.4.0+776c994", GitCommit:"a9e9cf3", GitTreeState:"clean", BuildDate:"2017-01-24T15:12:46Z", GoVersion:"go1.7.4", Compiler:"gc", Platform:"linux/amd64"}

$ funktion version funktion version: 1.0.9 $ funktion install platform created Namespace funktion-system kubectl apply --namespace funktion-system -f https://repo1.maven.org/maven2/io/fabric8/platform/packages/funktion-platform/2.4.24/funktion-platform-2.4.24-kubernetes.yml

namespace "user-secrets-source-admin" created serviceaccount "configmapcontroller" created serviceaccount "exposecontroller" created serviceaccount "fabric8" created serviceaccount "funktion-operator" created service "fabric8" created service "jenkinshift" created configmap "catalog-apiman" created ... a bunch of configmaps created ... configmap "catalog-zookeeper" created configmap "exposecontroller" created configmap "fabric8" created configmap "fabric8-environments" created configmap "nodejs" created deployment "configmapcontroller" created deployment "exposecontroller" created deployment "fabric8" created deployment "funktion-operator" created The ConfigMap "catalog-letschat" is invalid: metadata.annotations: Too long: must have at most 262144 characters Failed: exit status 1

tobias commented 7 years ago

@ChugR that's a known issue which can be ignored, it won't prevent funktion from working (see https://github.com/funktionio/funktion/issues/33).

jstrachan commented 7 years ago

I've removed the fabric8 console and application catalog from the funktion installation which makes things much simpler; so a funktion install is 2 small ConfigMaps (one runtime, one for exposing services) and 1 Deployment/pod so its pretty minimal and can fit inside OpenShift Online free tier now