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

Container resources readonly incosistency #2175

Open
oleghind opened this issue Aug 28, 2024 · 1 comment
Open

Container resources readonly incosistency #2175

oleghind opened this issue Aug 28, 2024 · 1 comment
Labels
bug Something isn't working @component/cdk8s-plus Issue related to cdk8s-plus needs-triage Priority and effort undetermined yet response-requested Awaiting response from author

Comments

@oleghind
Copy link

Description of the bug:

I can adjust cpu resources, but not memory

export class MyChart extends MyBaseChart  {
  constructor(scope: Construct, id: string, props: ChartProps = {}) {
    super(scope, id, props)
    this.someContainer.resources.cpu.request.amount = '3000m'; // Works
    this.someContainer.resources.memory.request.limit = '4096Mi' // Doesn't work, value readonly
});

Please make both adjustable, so child charts can adjust the value without patching yaml


This is 🐛 Bug Report

@oleghind oleghind added bug Something isn't working needs-triage Priority and effort undetermined yet labels Aug 28, 2024
@iliapolo iliapolo transferred this issue from cdk8s-team/cdk8s Sep 9, 2024
@iliapolo
Copy link
Member

iliapolo commented Sep 9, 2024

@oleghind Apologies for the inconsistency, but the immutable nature of these properties is intentional. You'll note that none of the other properties in the library are mutable. The fact that amount is mutable is actually a mistake/bug:

https://github.com/cdk8s-team/cdk8s-plus/blob/a3afd28ecd403a048f984143e6c2cc7a225120b6/src/container.ts#L1344

@iliapolo iliapolo added the response-requested Awaiting response from author label Sep 9, 2024
@iliapolo iliapolo added the @component/cdk8s-plus Issue related to cdk8s-plus label Sep 20, 2024
@iliapolo iliapolo transferred this issue from cdk8s-team/cdk8s-plus Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working @component/cdk8s-plus Issue related to cdk8s-plus needs-triage Priority and effort undetermined yet response-requested Awaiting response from author
Projects
None yet
Development

No branches or pull requests

2 participants