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

Init / system-logger containers are not defining the resources to use. #184

Merged
merged 1 commit into from
Aug 17, 2020

Conversation

rcosnita
Copy link
Contributor

@rcosnita rcosnita commented Aug 2, 2020

This PR adds supports for fine grained control over the quotas of each default container currently defined by the cass-operator:

  • server-config-init
  • cassandra
  • server-system-logger

Before this PR, only cassandra container had quota configured. This PR makes the configuration of additional containers explicitly visible in the CRD definition:

resourceServerSystemLogger:
    requests:
      memory: 1Gi
      cpu: 1
    limits:
      memory: 1Gi
      cpu: 1
resourceServerConfigInit:
    requests:
      memory: 1Gi
      cpu: 1
    limits:
      memory: 1Gi
      cpu: 1

@jimdickinson
Copy link
Collaborator

Thank you for the PR! :) Can you add something similar for the reaper sidecar? Also, are you OK with signing a DataStax CLA? We're getting the website for it updated next week, but we can probably merge this in advance if you're up for it.

@rcosnita
Copy link
Contributor Author

rcosnita commented Aug 6, 2020

@jimdickinson I will update the reaper sidecar by the end of tomorrow. Regarding the CLA, I've just signed it.

@rcosnita rcosnita force-pushed the master branch 2 times, most recently from b7ee9e2 to 2b9871b Compare August 8, 2020 13:59
// Provides reasonable defaults for the configuration container.
DefaultsConfigInitContainer = buildResourceRequirements(1000, 256)

DefaultsReaperContainer = buildResourceRequirements(2000, 512)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jsanda what do you think is reasonable here?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the delayed response. I will try to have some numbers for you today.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we leave the values as is and tune them later? @jsanda / @jimdickinson what do you think?

@jimdickinson
Copy link
Collaborator

jimdickinson commented Aug 10, 2020

@rcosnita I left some feedback that was a little nitpicky, but I don't think we can merge it as is without the couple small changes. Thank you for the solid effort here! Which CLA did you sign?

@rcosnita
Copy link
Contributor Author

@jimdickinson Thank you for the review. I will address by the end of tomorrow. Regarding the CLA, here is a quick screenshot:

Screenshot 2020-08-11 at 10 32 45

Co-authored-by: Jim Dickinson <jimdickinson>

Closes #183
@rcosnita
Copy link
Contributor Author

@jimdickinson Thank you for the review. I merged all the changes in the PR.

@rcosnita
Copy link
Contributor Author

rcosnita commented Aug 15, 2020

Just as final info here is a valid configuration now supported with the code from the pr:

systemLoggerResources:
    requests:
      memory: 1Gi
      cpu: 1
    limits:
      memory: 1Gi
      cpu: 1
configBuilderResources:
    requests:
      memory: 1Gi
      cpu: 1
    limits:
      memory: 1Gi
      cpu: 1
reaper:
  enabled: true
  resources:
    requests:
      memory: 1Gi
      cpu: 1
    limits:
      memory: 1Gi
      cpu: 1

@jimdickinson
Copy link
Collaborator

Looks great! I think I'll add on whatever we need to make these marked as optional on the CRD.

@jimdickinson jimdickinson merged commit 94634ba into datastax:master Aug 17, 2020
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 this pull request may close these issues.

3 participants