You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
OCPBUGS-17157: registry: implement memory targets on gRPC servers (#3004)
* go.mod: update operator-framework/api
$ GOPROXY=direct go get github.com/operator-framework/api@master
$ GOPROXY=direct go mod tidy
$ GOPROXY=direct go mod vendor
$ make gen-all
Signed-off-by: Steve Kuznetsov <[email protected]>
* registry: implement memory targets on gRPC servers
This commit implements the GoDoc on the new CatalogSource field, adding
memory requests, limits and $GOMEMLIMIT values for sources that opt into
a memory target.
Signed-off-by: Steve Kuznetsov <[email protected]>
---------
Signed-off-by: Steve Kuznetsov <[email protected]>
Upstream-repository: operator-lifecycle-manager
Upstream-commit: 2c3928ec460a9354cb8d840da92d90900075e94d
Signed-off-by: Steve Kuznetsov <[email protected]>
Copy file name to clipboardExpand all lines: staging/operator-lifecycle-manager/deploy/chart/crds/0000_50_olm_00-catalogsources.crd.yaml
+7
Original file line number
Diff line number
Diff line change
@@ -532,6 +532,13 @@ spec:
532
532
topologyKey:
533
533
description: This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. Empty topologyKey is not allowed.
534
534
type: string
535
+
memoryTarget:
536
+
description: "MemoryTarget configures the $GOMEMLIMIT value for the gRPC catalog Pod. This is a soft memory limit for the server, which the runtime will attempt to meet but makes no guarantees that it will do so. If this value is set, the Pod will have the following modifications made to the container running the server: - the $GOMEMLIMIT environment variable will be set to this value in bytes - the memory request will be set to this value - the memory limit will be set to 200% of this value \n This field should be set if it's desired to reduce the footprint of a catalog server as much as possible, or if a catalog being served is very large and needs more than the default allocation. If your index image has a file- system cache, determine a good approximation for this value by doubling the size of the package cache at /tmp/cache/cache/packages.json in the index image. \n This field is best-effort; if unset, no default will be used and no Pod memory limit or $GOMEMLIMIT value will be set."
description: NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node.
Copy file name to clipboardExpand all lines: staging/operator-lifecycle-manager/deploy/chart/crds/0000_50_olm_00-subscriptions.crd.yaml
+5-5
Original file line number
Diff line number
Diff line change
@@ -644,7 +644,7 @@ spec:
644
644
type: object
645
645
properties:
646
646
claims:
647
-
description: "Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. \n This is an alpha field and requires enabling the DynamicResourceAllocation feature gate. \n This field is immutable."
647
+
description: "Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. \n This is an alpha field and requires enabling the DynamicResourceAllocation feature gate. \n This field is immutable. It can only be set for containers."
648
648
type: array
649
649
items:
650
650
description: ResourceClaim references one entry in PodSpec.ResourceClaims.
@@ -668,7 +668,7 @@ spec:
668
668
- type: string
669
669
x-kubernetes-int-or-string: true
670
670
requests:
671
-
description: 'Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
671
+
description: 'Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. Requests cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
description: 'medium represents what type of storage medium should back this directory. The default is "" which means to use the node''s default medium. Must be an empty string (default) or Memory. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir'
1003
1003
type: string
1004
1004
sizeLimit:
1005
-
description: 'sizeLimit is the total amount of local storage required for this EmptyDir volume. The size limit is also applicable for memory medium. The maximum usage on memory medium EmptyDir would be the minimum value between the SizeLimit specified here and the sum of memory limits of all containers in a pod. The default is nil which means that the limit is undefined. More info: http://kubernetes.io/docs/user-guide/volumes#emptydir'
1005
+
description: 'sizeLimit is the total amount of local storage required for this EmptyDir volume. The size limit is also applicable for memory medium. The maximum usage on memory medium EmptyDir would be the minimum value between the SizeLimit specified here and the sum of memory limits of all containers in a pod. The default is nil which means that the limit is undefined. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir'
description: "Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. \n This is an alpha field and requires enabling the DynamicResourceAllocation feature gate. \n This field is immutable."
1073
+
description: "Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. \n This is an alpha field and requires enabling the DynamicResourceAllocation feature gate. \n This field is immutable. It can only be set for containers."
1074
1074
type: array
1075
1075
items:
1076
1076
description: ResourceClaim references one entry in PodSpec.ResourceClaims.
@@ -1094,7 +1094,7 @@ spec:
1094
1094
- type: string
1095
1095
x-kubernetes-int-or-string: true
1096
1096
requests:
1097
-
description: 'Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
1097
+
description: 'Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. Requests cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
0 commit comments