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

Documentation on how to set up the AWS DataFeed with the Helm Chart #228

Open
gaelayo opened this issue Oct 3, 2024 · 0 comments
Open

Comments

@gaelayo
Copy link

gaelayo commented Oct 3, 2024

Hello, I do have set up the AWS datafeed, but I am having trouble finding out how to pass the configuration related to this to the opencost helm chart.

The documentation states:

The data feed will provide specific pricing information about any Spot instances in your account on an hourly basis. After setting this up, the bucket information can be provided through options in the AWS provider configuration file.

    awsSpotDataBucket - The name of the S3 bucket Spot Instance Data Feed is publishing to.
    awsSpotDataRegion - The region configured for Spot Instance Data Feed
    awsSpotDataPrefix - The prefix (if any) configured for Spot Instance Data Feed
    projectID - The AWS Account ID

It is not clear for me how to pass this "AWS provider configuration file" with the helm chart.

I tried using customPricing, as follows

customPricing = {
          enabled = true
          provider = "aws"
          createConfigmap = true
          // Values from https://www.opencost.io/docs/configuration/aws
          costModel = {
            // ------- Default values start here
            "provider": "aws",
            "description": "AWS Provider Configuration. Provides default values used if instance type or spot information is not found.",
            "CPU": "0.031611",
            "spotCPU": "0.006655",
            "RAM": "0.004237",
            "GPU": "0.95",
            "spotRAM": "0.000892",
            "storage": "0.000138888889",
            "zoneNetworkEgress": "0.01",
            "regionNetworkEgress": "0.01",
            "internetNetworkEgress": "0.143",
            // ------- Default values end here
            "spotLabel": "karpenter.sh/capacity-type",
            "spotLabelValue": "spot",
            "awsSpotDataRegion": "eu-west-1",
            "awsSpotDataBucket": aws_s3_bucket.spot_datafeed.id,
            "awsSpotDataPrefix": aws_s3_bucket.spot_datafeed.bucket_prefix,
            "projectID": var.aws_provider.account_id
          }
        }

But without any luck. I can see the following messages in the logs from opencost.

opencost 2024-10-03T08:49:18.104873176Z INF Found ProviderID starting with "aws", using AWS Provider                                                                                                     opencost 2024-10-03T08:49:18.109954388Z INF No pricing-configs configmap found at install time, using existing configs: configmaps "pricing-configs" not found                                           
opencost 2024-10-03T08:49:18.112451958Z INF No metrics-config configmap found at install time, using existing configs: configmaps "metrics-config" not found 
<...>
 opencost 2024-10-03T08:49:24.302028686Z INF missing service key values for AWS cloud integration attempting to use service account integration                                                           │
 opencost 2024-10-03T08:49:24.302036921Z INF missing service key values for AWS cloud integration attempting to use service account integration logged 1 times: suppressing future logs                   │
opencost 2024-10-03T08:49:24.496713771Z WRN Skipping AWS spot data download: operation error S3: GetObject, https response error StatusCode: 403, RequestID: xxx, HostID: xxx │
<...>
WRN Node i-8574be6f77c456411 marked preemptible but we have no data in spot feed

How do we pass the configuration for aws through the Helm chart ?

Thank you very much

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

No branches or pull requests

1 participant