Skip to content

Commit fac7786

Browse files
akhilnittalaanandf
andauthored
[GITOPS-7846]: Feature Changes for Resource requests and limits configurable for Gitops plugin and backend (redhat-developer#969)
* Added support for resource requirements in GitOpsService Signed-off-by: Anand Francis Joseph <[email protected]> * Added initial version of e2e test which needs improvment and additional tests Signed-off-by: Anand Francis Joseph <[email protected]> * Added generated file Signed-off-by: Anand Francis Joseph <[email protected]> * Added missing changes for crds and manifests Signed-off-by: Anand Francis Joseph <[email protected]> * [GITOPS-7743]: Cluster, gitoops-backend are not getting cleanedup when disableDefaultinstance is true Signed-off-by: akhil nittala <[email protected]> * [GITOPS-7743]: Cluster, gitoops-backend are not getting cleanedup when disableDefaultinstance is true Signed-off-by: akhil nittala <[email protected]> * Resource requests and limits configurable Signed-off-by: akhil nittala <[email protected]> * Resource requests and limits configurable Signed-off-by: akhil nittala <[email protected]> * Resource requests and limits configurable Signed-off-by: akhil nittala <[email protected]> * Resource requests and limits configurable Signed-off-by: akhil nittala <[email protected]> * Resource requests and limits configurable Signed-off-by: akhil nittala <[email protected]> * Resource requests and limits configurable Signed-off-by: akhil nittala <[email protected]> * Resource requests and limits configurable Signed-off-by: akhil nittala <[email protected]> * Resource requests and limits configurable Signed-off-by: akhil nittala <[email protected]> * Resource requests and limits configurable Signed-off-by: akhil nittala <[email protected]> * Resource requests and limits configurable Signed-off-by: akhil nittala <[email protected]> * Resource requests and limits configurable Signed-off-by: akhil nittala <[email protected]> * Resource requests and limits configurable Signed-off-by: akhil nittala <[email protected]> * Resource requests and limits configurable Signed-off-by: akhil nittala <[email protected]> * Resource requests and limits configurable Signed-off-by: akhil nittala <[email protected]> * Resource requests and limits configurable Signed-off-by: akhil nittala <[email protected]> * Resource requests and limits configurable Signed-off-by: akhil nittala <[email protected]> * Resource requests and limits configurable Signed-off-by: akhil nittala <[email protected]> * Resource requests and limits configurable Signed-off-by: akhil nittala <[email protected]> * Resource requests and limits configurable Signed-off-by: akhil nittala <[email protected]> --------- Signed-off-by: Anand Francis Joseph <[email protected]> Signed-off-by: akhil nittala <[email protected]> Co-authored-by: Anand Francis Joseph <[email protected]>
1 parent e8ca4e7 commit fac7786

File tree

11 files changed

+978
-2
lines changed

11 files changed

+978
-2
lines changed

api/v1alpha1/gitopsservice_types.go

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,28 @@ type GitopsServiceSpec struct {
3232
Tolerations []corev1.Toleration `json:"tolerations,omitempty"`
3333
// NodeSelector is a map of key value pairs used for node selection in the default workloads
3434
NodeSelector map[string]string `json:"nodeSelector,omitempty"`
35+
// ConsolePlugin defines the Resource configuration for the Console Plugin components
36+
ConsolePlugin *ConsolePluginStruct `json:"consolePlugin,omitempty"`
37+
}
38+
39+
// ConsolePluginStruct defines the resource configuration for the Console Plugin components
40+
type ConsolePluginStruct struct {
41+
// Backend defines the resource requests and limits for the backend service
42+
Backend *BackendStruct `json:"backend,omitempty"`
43+
// GitopsPlugin defines the resource requests and limits for the gitops plugin service
44+
GitopsPlugin *GitopsPluginStruct `json:"gitopsPlugin,omitempty"`
45+
}
46+
47+
// BackendStruct defines the resource configuration for the Backend components
48+
type BackendStruct struct {
49+
// Resources defines the resource requests and limits for the backend service
50+
Resources *corev1.ResourceRequirements `json:"resources,omitempty"`
51+
}
52+
53+
// GitopsPluginStruct defines the resource configuration for the Gitops Plugin components
54+
type GitopsPluginStruct struct {
55+
// Resources defines the resource requests and limits for the gitops plugin service
56+
Resources *corev1.ResourceRequirements `json:"resources,omitempty"`
3557
}
3658

3759
// GitopsServiceStatus defines the observed state of GitopsService

api/v1alpha1/zz_generated.deepcopy.go

Lines changed: 70 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bundle/manifests/gitops-operator.clusterserviceversion.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ metadata:
180180
capabilities: Deep Insights
181181
console.openshift.io/plugins: '["gitops-plugin"]'
182182
containerImage: quay.io/redhat-developer/gitops-operator
183-
createdAt: "2025-09-30T08:46:55Z"
183+
createdAt: "2025-10-01T09:01:02Z"
184184
description: Enables teams to adopt GitOps principles for managing cluster configurations
185185
and application delivery across hybrid multi-cluster Kubernetes environments.
186186
features.operators.openshift.io/disconnected: "true"

bundle/manifests/pipelines.openshift.io_gitopsservices.yaml

Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,141 @@ spec:
3939
spec:
4040
description: GitopsServiceSpec defines the desired state of GitopsService
4141
properties:
42+
consolePlugin:
43+
description: ConsolePlugin defines the Resource configuration for
44+
the Console Plugin components
45+
properties:
46+
backend:
47+
description: Backend defines the resource requests and limits
48+
for the backend service
49+
properties:
50+
resources:
51+
description: Resources defines the resource requests and limits
52+
for the backend service
53+
properties:
54+
claims:
55+
description: |-
56+
Claims lists the names of resources, defined in spec.resourceClaims,
57+
that are used by this container.
58+
59+
This is an alpha field and requires enabling the
60+
DynamicResourceAllocation feature gate.
61+
62+
This field is immutable. It can only be set for containers.
63+
items:
64+
description: ResourceClaim references one entry in PodSpec.ResourceClaims.
65+
properties:
66+
name:
67+
description: |-
68+
Name must match the name of one entry in pod.spec.resourceClaims of
69+
the Pod where this field is used. It makes that resource available
70+
inside a container.
71+
type: string
72+
request:
73+
description: |-
74+
Request is the name chosen for a request in the referenced claim.
75+
If empty, everything from the claim is made available, otherwise
76+
only the result of this request.
77+
type: string
78+
required:
79+
- name
80+
type: object
81+
type: array
82+
x-kubernetes-list-map-keys:
83+
- name
84+
x-kubernetes-list-type: map
85+
limits:
86+
additionalProperties:
87+
anyOf:
88+
- type: integer
89+
- type: string
90+
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
91+
x-kubernetes-int-or-string: true
92+
description: |-
93+
Limits describes the maximum amount of compute resources allowed.
94+
More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
95+
type: object
96+
requests:
97+
additionalProperties:
98+
anyOf:
99+
- type: integer
100+
- type: string
101+
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
102+
x-kubernetes-int-or-string: true
103+
description: |-
104+
Requests describes the minimum amount of compute resources required.
105+
If Requests is omitted for a container, it defaults to Limits if that is explicitly specified,
106+
otherwise to an implementation-defined value. Requests cannot exceed Limits.
107+
More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
108+
type: object
109+
type: object
110+
type: object
111+
gitopsPlugin:
112+
description: GitopsPlugin defines the resource requests and limits
113+
for the gitops plugin service
114+
properties:
115+
resources:
116+
description: Resources defines the resource requests and limits
117+
for the gitops plugin service
118+
properties:
119+
claims:
120+
description: |-
121+
Claims lists the names of resources, defined in spec.resourceClaims,
122+
that are used by this container.
123+
124+
This is an alpha field and requires enabling the
125+
DynamicResourceAllocation feature gate.
126+
127+
This field is immutable. It can only be set for containers.
128+
items:
129+
description: ResourceClaim references one entry in PodSpec.ResourceClaims.
130+
properties:
131+
name:
132+
description: |-
133+
Name must match the name of one entry in pod.spec.resourceClaims of
134+
the Pod where this field is used. It makes that resource available
135+
inside a container.
136+
type: string
137+
request:
138+
description: |-
139+
Request is the name chosen for a request in the referenced claim.
140+
If empty, everything from the claim is made available, otherwise
141+
only the result of this request.
142+
type: string
143+
required:
144+
- name
145+
type: object
146+
type: array
147+
x-kubernetes-list-map-keys:
148+
- name
149+
x-kubernetes-list-type: map
150+
limits:
151+
additionalProperties:
152+
anyOf:
153+
- type: integer
154+
- type: string
155+
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
156+
x-kubernetes-int-or-string: true
157+
description: |-
158+
Limits describes the maximum amount of compute resources allowed.
159+
More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
160+
type: object
161+
requests:
162+
additionalProperties:
163+
anyOf:
164+
- type: integer
165+
- type: string
166+
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
167+
x-kubernetes-int-or-string: true
168+
description: |-
169+
Requests describes the minimum amount of compute resources required.
170+
If Requests is omitted for a container, it defaults to Limits if that is explicitly specified,
171+
otherwise to an implementation-defined value. Requests cannot exceed Limits.
172+
More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
173+
type: object
174+
type: object
175+
type: object
176+
type: object
42177
nodeSelector:
43178
additionalProperties:
44179
type: string

0 commit comments

Comments
 (0)