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

POL-1405 Replace deprecated Kubecost endpoints for Kubecost Cluster Policy #2833

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

midir99
Copy link
Contributor

@midir99 midir99 commented Nov 14, 2024

Description

The endpoint we are currently using has been deprecated “/model/savings/clusterSizing"
It still works but only returns one cluster rather than all clusters.

The new endpoint is returns a different response “/model/savings/clusterSizingETL" and simply adding ETL onto the end of our current end point in the policy returns null values in ds_cluster_sizing

This endpoint returns all cluster recommendations in one response.

Issues Resolved

Link to Example Applied Policy

https://app.flexeratest.com/orgs/1105/automation/applied-policies/projects/60073?policyId=673520d66168ce351f89f548

Contribution Check List

  • New functionality includes testing.
  • New functionality has been documented in the README if applicable
  • New functionality has been documented in CHANGELOG.MD

Copy link
Contributor

1 Error
🚫

cost/kubecost/cluster/kubecost_cluster_rightsizing_recommendations.pt

Orphaned datasource code blocks found. Blocks that are not used anywhere in the policy should be removed:

ds_get_cluster_list

1 Warning
⚠️

cost/kubecost/cluster/kubecost_cluster_rightsizing_recommendations.pt

Policy template updated but associated README.md file has not been. Please verify that any necessary changes have been made to the README.


Policy Template has indentation issues. Code should be indented with 2 spaces inside each do/end block, info() block, and EOS block, with additional spacing for nested blocks as appropriate:

Line 180: Expected indentation of at least two spaces within code/text block.
Line 184: Expected indentation of at least two spaces within code/text block.
Line 311: Expected indentation of at least two spaces within code/text block.


Datasources and scripts with mismatched names found. These names should match; for example, a datasource named ds_currency should be paired with a script named js_currency. This convention should only be ignored when the same script is called by multiple datasources. The following datasource/script pairs have mismatched names:

Line 188: ds_cluster_sizing / js_cluster_parse


Recommendation policy has export that is missing recommended fields. These fields are scraped by the Flexera platform for dashboards:

Line 324: tags

Generated by 🚫 Danger

@@ -86,16 +86,6 @@ end
# Datasources & Scripts
###############################################################################

# Get applied policy metadata for use later
datasource "ds_applied_policy" do
Copy link
Contributor

Choose a reason for hiding this comment

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

Why are we removing this and all of the calls to it? The intent behind our policy template design is to make the summary template show the name of the applied policy template so that, if the user applies the policy multiple times, they can easily differentiate the different incidents that are raised.

Not sure how removing this is related to replacing deprecated API endpoints.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants