Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.1k views
in Technique[技术] by (71.8m points)

openshift - Kubernetes ConfigMap size limitation

Though resourceQuotas may limit the number of configmaps in a namespace, is there any such option to limit the size of the individual configmap? I will not like some user to start uploading large text files as configmaps.

What is the max size of ConfigMap etcd support? If there is a reasonable limit on the etcd side, should be fine then.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

There are no hard-limits on either the ConfigMap or Secret objects as of this writing.

There's, however, a 1MB limit from the etcd side which is where Kubernetes stores its objects.

From the API side, if you actually see the API code and the ConfigMap type, you'll see that its data field is Golang map of strings so this appears memory bound and managed at runtime unless somewhere else it gets defined with make(). Technically the max size for the number of keys on hashmap is the map length which is an int and the max value is explained here: Maximum number of elements in map. That would also be the theoretical limit for the value of data as the maximum value for len(string).

If you actually want to get more insights from the API side where the kube-apiserver receives protobufs (or JSON for that matter) you can take a look at the google protobuf maximum size. That will give you some measure as to the limitation of sending the data field through the wire. There may be other limitation from the kube-apiserver itself when it comes to processing any large message.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...