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

Feature 1635 - added labels to generate HPA #1847

Merged
merged 5 commits into from
Apr 19, 2024

Conversation

sosan
Copy link
Contributor

@sosan sosan commented Mar 26, 2024

What type of PR is this?

/kind feature

What this PR does / why we need it:

added this labels to min/max replicas and custom metrics for cpu and memory:

kompose.hpa.minreplicas
kompose.hpa.maxreplicas
kompose.hpa.cpu
kompose.hpa.memory

documentated labels user_guide.md

generate custom metrics from cpu, memory and set min/max replicas

Which issue(s) this PR fixes:

Fixes #1631

Special notes for your reviewer:

kompose.hpa.minreplicas
kompose.hpa.maxreplicas
kompose.hpa.cpu
kompose.hpa.memory

documentated labels user_guide.md

generate custom metrics from cpu, memory and set min/max replicas

Signed-off-by: jose luis <[email protected]>
@k8s-ci-robot k8s-ci-robot added kind/feature Categorizes issue or PR as related to a new feature. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Mar 26, 2024
@k8s-ci-robot k8s-ci-robot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Mar 26, 2024
Copy link
Member

@cdrage cdrage left a comment

Choose a reason for hiding this comment

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

This is amazing work, great job on the implementation!

Needs e2e and regular tests though, sorry!

docs/user-guide.md Outdated Show resolved Hide resolved
docs/user-guide.md Outdated Show resolved Hide resolved
docs/user-guide.md Outdated Show resolved Hide resolved
docs/user-guide.md Outdated Show resolved Hide resolved
docs/user-guide.md Outdated Show resolved Hide resolved
e2e tests
fixed name labels
@k8s-ci-robot k8s-ci-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Apr 2, 2024
Copy link
Member

@TessaIO TessaIO left a comment

Choose a reason for hiding this comment

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

Thanks @sosan for this amazing enhancement. I left a review, and I'll do another round when you finish this!

pkg/transformer/kubernetes/k8sutils.go Outdated Show resolved Hide resolved
pkg/transformer/kubernetes/k8sutils.go Outdated Show resolved Hide resolved
pkg/transformer/kubernetes/k8sutils.go Outdated Show resolved Hide resolved
pkg/transformer/kubernetes/k8sutils.go Outdated Show resolved Hide resolved
pkg/transformer/kubernetes/k8sutils.go Outdated Show resolved Hide resolved
pkg/transformer/kubernetes/k8sutils.go Outdated Show resolved Hide resolved
pkg/transformer/kubernetes/kubernetes.go Outdated Show resolved Hide resolved
script/test/cmd/tests_new.sh Outdated Show resolved Hide resolved
script/test/fixtures/hpa/compose.yaml Outdated Show resolved Hide resolved
script/test/fixtures/hpa/output-k8s.yaml Outdated Show resolved Hide resolved
…more tests

add warning in situations like:
- maxreplicas < minreplicas
- value from label < 0
- validate percentage in cpu, memory metrics
@sosan
Copy link
Contributor Author

sosan commented Apr 4, 2024

done 👌

@TessaIO
Copy link
Member

TessaIO commented Apr 8, 2024

ping @sosan. Can you fix merge conflicts?

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 8, 2024
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 10, 2024
@sosan
Copy link
Contributor Author

sosan commented Apr 10, 2024

fixed merge conflicts

Copy link
Member

@cdrage cdrage left a comment

Choose a reason for hiding this comment

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

Amazing, thanks for the awesome work! All the code LGTM!

@cdrage
Copy link
Member

cdrage commented Apr 19, 2024

/lgtm

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 19, 2024
@cdrage
Copy link
Member

cdrage commented Apr 19, 2024

/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 19, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cdrage, sosan

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot merged commit cdcb0e7 into kubernetes:main Apr 19, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature]: Support HPA configuration
4 participants