Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Resource Requirements for Cryostat deployment #332

Closed
ebaron opened this issue Jan 14, 2022 · 5 comments · Fixed by #344
Closed

Add Resource Requirements for Cryostat deployment #332

ebaron opened this issue Jan 14, 2022 · 5 comments · Fixed by #344
Assignees
Labels
feat New feature or request
Milestone

Comments

@ebaron
Copy link
Member

ebaron commented Jan 14, 2022

A user should be able to specify resource requests/limits for the main Cryostat deployment using the Cryostat CRD.

@andrewazores
Copy link
Member

Related to #277

@jaadbarg
Copy link
Contributor

Hi @ebaron, I'd like to take this one

@ebaron
Copy link
Member Author

ebaron commented Feb 7, 2022

ResourceRequirements type: https://pkg.go.dev/k8s.io/api/core/v1#ResourceRequirements

@ebaron
Copy link
Member Author

ebaron commented Feb 7, 2022

Resource requirements are set at the container level, so we should expose properties for each of the 3 containers. Something like this perhaps:

type CryostatSpec struct {
...
	// Define resource requirements for containers within the main Cryostat deployment
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec
	Resources ResourceConfigList `json:"resources,omitempty"`
}

// ResourceConfigList includes resource requirements settings for each container in the main Cryostat deployment
type ResourceConfigList struct {
	// Resource requirements for the Cryostat application
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:resourceRequirements"}
	CoreResources corev1.ResourceRequirements `json:"coreResources,omitempty"`
	// Resource requirements for the JFR Data Source container
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:resourceRequirements"}
	DataSourceResources corev1.ResourceRequirements `json:"dataSourceResources,omitempty"`
	// Resource requirements for the Grafana container
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:resourceRequirements"}
	GrafanaResources corev1.ResourceRequirements `json:"grafanaResources,omitempty"`
}

jaadbarg pushed a commit to jaadbarg/cryostat-operator that referenced this issue Feb 25, 2022
@ebaron ebaron added this to the 2.1.0 milestone Mar 11, 2022
ebaron added a commit to jaadbarg/cryostat-operator that referenced this issue Mar 18, 2022
ebaron added a commit to jaadbarg/cryostat-operator that referenced this issue Apr 6, 2022
ebaron added a commit that referenced this issue Apr 6, 2022
* #332

* Update tests

* comment update

* make bundle

* comment fix

* merge conf fix

Co-authored-by: John Barguti <jbarguti@redhat.com>
Co-authored-by: Elliott Baron <ebaron@redhat.com>
@andrewazores andrewazores added feat New feature or request and removed enhancement labels Jun 6, 2022
jaadbarg pushed a commit to jaadbarg/cryostat-operator that referenced this issue Jun 17, 2022
jaadbarg pushed a commit to jaadbarg/cryostat-operator that referenced this issue Aug 22, 2022
jaadbarg pushed a commit to jaadbarg/cryostat-operator that referenced this issue Sep 23, 2022
ebaron added a commit that referenced this issue Oct 3, 2022
* #332

* correct indentation

* recent changes

* test changes

* rebase

* mr comments

* regenerate bundle

* Update internal/controllers/common/resource_definitions/resource_definitions.go

Co-authored-by: Elliott Baron <ebaron@redhat.com>

* go fmt blank line reduced

Co-authored-by: Elliott Baron <ebaron@redhat.com>

* Alignment fix

Co-authored-by: Elliott Baron <ebaron@redhat.com>

* test fix

Co-authored-by: John Barguti <jbarguti@redhat.com>
Co-authored-by: Elliott Baron <ebaron@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants