Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Template configuration - new coder_agent resource #245

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

Closed
defelmnq opened this issue Dec 4, 2024 · 0 comments · Fixed by coder/coder#16241
Closed

Template configuration - new coder_agent resource #245

defelmnq opened this issue Dec 4, 2024 · 0 comments · Fixed by coder/coder#16241
Assignees

Comments

@defelmnq
Copy link

defelmnq commented Dec 4, 2024

The template configuration issue includes all the components required in order for coderd to read and access the OOM & OOD configuration.

As per the RFC, the new component to read from the agent block look like :

resource "coder_agent" "blah" {
	resource_monitoring { 
		memory = {
		  enabled = true
		  threshold = 50
	  }
	  volumes = {
		  "/home/user": {
				enabled = true
				threshold = 85		  
		  }
		  "/home/coder": {    // as enabled is false, it will not be monitored.
			  enabled = false
			  threshold = 90
		  }
	  }
	}
}

This logic is done inside the ConvertState function https://github.com/coder/coder/blob/630fd7c0a1ee44fa6ce61ac9cb4c76842dc247dd/provisioner/terraform/resources.go#L143

The parsed configuration then has to be stored into the DB for further usage.

The scope of this issue stops when the data are inserted in the database - with the associated methods available to fetch it.

@defelmnq defelmnq self-assigned this Dec 9, 2024
@dannykopping dannykopping transferred this issue from coder/coder Dec 11, 2024
@coder-labeler coder-labeler bot added help wanted Extra attention is needed tech-debt labels Dec 11, 2024
@dannykopping dannykopping removed help wanted Extra attention is needed tech-debt labels Dec 11, 2024
@dannykopping dannykopping reopened this Dec 11, 2024
@coder-labeler coder-labeler bot added help wanted Extra attention is needed tech-debt labels Dec 11, 2024
@defelmnq defelmnq changed the title Defining threshold in templates Template configuration - new agent resource Jan 13, 2025
@defelmnq defelmnq changed the title Template configuration - new agent resource Template configuration - new coder_agent resource Jan 13, 2025
@dannykopping dannykopping removed help wanted Extra attention is needed tech-debt labels Jan 29, 2025
defelmnq added a commit to coder/coder that referenced this issue Feb 4, 2025
As requested for [this
issue](coder/internal#245) we need to have a
new resource `resources_monitoring` in the agent.

It needs to be parsed from the provisioner and inserted into a new db
table.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants