Skip to content

Add CAST AI package metadata to package list #7084

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

Closed
wants to merge 1 commit into from

Conversation

germanilia
Copy link

@germanilia germanilia commented Apr 9, 2025

Checklist

Please make sure that you have:

  • Released your package with a version prefixed with v (e.g. v0.1.0). The part after the leading v must be valid semver 2.0.
  • Published an SDK for your provider in:
    • Typescript
    • Python
    • Go
    • C#
    • Java (optional)
  • Have checked in a schema.json that matches the location of the schemaFile
    specified in /community-packages/package-list.json.
  • Have a /docs/_index.md and /docs/installation-configuration.md filled
    out in your repo.
  • /docs/installation-configuration.md links to all published SDKs.
  • /docs/index.md shows an example of using your provider in each language.

@germanilia germanilia requested a review from a team as a code owner April 9, 2025 10:37
@iwahbe iwahbe added the needs-triage Needs attention from the triage team label Apr 9, 2025
@flostadler flostadler removed the needs-triage Needs attention from the triage team label Apr 9, 2025
@flostadler
Copy link
Contributor

flostadler commented Apr 9, 2025

Hey @germanilia, thanks for your interest in adding a new package to the Pulumi Registry! To keep quality in the Pulumi Registry high, we have a check-list before merging a new provider into the registry. I added the parts of the checklist you need to do to the PR description. Please confirm that your package meets those expectations and and a brief description to the PR, thanks!

Is my assumption correct that the provider is maintained by a company? Could you please fill out this contact form? Thanks! https://forms.gle/ar3A5AUckZ282ZZ7A

Once you've done these things, I'm going to verify the PR using this checklist:

  • Pulumi has appropriate contact information from the provider maintainer

  • The package will generate accurate documentation:

    1. Check out the PR under review and run:
    $ make bin/resourcedocsgen
    $ ./bin/resourcedocsgen metadata from-github \
            --repoSlug '<repoSlug>' \
            --schemaFile '<schemaFile>' \
            --version '<version>'

    Here <repoSlug> and <schemaFile> should match exactly the values added to /community-packages/package-list.json.

    This will generate metadata for the provider locally.

    1. Push the metadata files into a PR (either back to the PR under review or a new PR).

    After pushing the provider to CI and waiting for a preview site:

    • Confirm that that CI passes for the PR with the metadata files.

    • Click through the site preview and confirm that the docs (for the new provider) render as expected.

    • The registry renders a valid logo for the new provider.

  • Hand-written docs are complete and accurate:

    • Validate that you can install the new provider with the instructions found in /docs/installation-configuration.md.

    Maintainers should run the pulumi plugin install resource <name> <version> --server <pluginDownloadURL> command specified in the /docs/installation-configuration.md and see a provider be downloaded.

    • /docs/installation-configuration.md contains a link to the published SDK in each language (i.e. TypeScript, Python, Go and C#).

    • /docs/_index.md contains a minimal example in every supported language.

    • /docs/_index.md contains a brief explanation of what the package does.

  • There is a published version:

    • The repository has a version tag prefixed with v that corresponds with a valid GitHub release
    • Each published SDK has a matching release
  • A CODEOWNER has approved the PR.

@germanilia
Copy link
Author

CAST AI Provider v0.1.2

What is CAST AI?

CAST AI is a Kubernetes cost optimization platform that helps organizations reduce cloud costs by up to 50% through automated instance selection, scaling, and spot instance management. CAST AI analyzes your Kubernetes clusters and automatically optimizes them for cost efficiency without sacrificing performance or reliability.

About the Provider

The CAST AI Pulumi provider enables you to manage your CAST AI resources using infrastructure as code. This provider bridges the gap between Pulumi's infrastructure as code capabilities and CAST AI's cost optimization platform, allowing you to:

  1. Connect Kubernetes Clusters: Easily connect your existing EKS, GKE, and AKS clusters to CAST AI for cost optimization.

  2. Automate Cost Optimization: Configure autoscaling policies that automatically select the most cost-effective instance types for your workloads.

  3. Manage Spot Instances: Leverage spot instances safely with automatic fallback mechanisms to ensure reliability while reducing costs.

  4. Configure Policies: Set up and manage cost optimization policies tailored to your specific requirements.

  5. Integrate with CI/CD: Include CAST AI configuration in your infrastructure as code pipelines for consistent deployment.

Key Resources

The provider includes resources for:

  • Cloud Provider Integration: Connect AWS EKS, Google GKE, and Azure AKS clusters
  • Autoscaling Configuration: Set up intelligent autoscaling based on workload requirements
  • Credentials Management: Securely manage access credentials for your cloud providers
  • Cluster Tokens: Generate and manage authentication tokens for CAST AI services
  • Data Sources: Access information about your clusters, settings, and policies

Use Cases

  • DevOps Teams: Integrate cost optimization into your infrastructure as code workflows
  • FinOps: Implement programmatic cost controls for Kubernetes environments
  • Platform Engineering: Build cost-efficient Kubernetes platforms with automated optimization
  • Multi-Cloud Management: Consistently manage cost optimization across different cloud providers

This provider helps organizations implement FinOps best practices by making cloud cost optimization an integral part of the infrastructure deployment process.

@flostadler flostadler added the awaiting-feedback Blocked on input from the author label Apr 10, 2025
@flostadler flostadler self-requested a review April 10, 2025 11:40
@germanilia
Copy link
Author

  • C#

We currently don't support c#, is this mandatory?

@flostadler
Copy link
Contributor

  • C#

We currently don't support c#, is this mandatory?

Yes, we require packages in the registry to have published SDKs for all languages except Java, which is optional for the time being.

@germanilia
Copy link
Author

We published all the required sdks

@germanilia
Copy link
Author

Are there any other tasks we need to complete?

@flostadler
Copy link
Contributor

@germanilia can you go through the checklist in the PR description to confirm all the pre-requisites? Once that's done I'll take it from there!

@germanilia
Copy link
Author

Checklist

Please make sure that you have:

  • [X ] Released your package with a version prefixed with v (e.g. v0.1.0). The part after the leading v must be valid semver 2.0.
  • [ X] Published an SDK for your provider in:
    • [X ] Typescript
    • [ X] Python
    • [ X] Go
    • [ X] C#
    • Java (optional)
  • [ X] Have checked in a schema.json that matches the location of the schemaFile
    specified in /community-packages/package-list.json.
  • [ X] Have a /docs/_index.md and /docs/installation-configuration.md filled
    out in your repo.
  • [ X] /docs/installation-configuration.md links to all published SDKs.
  • [ X] /docs/index.md shows an example of using your provider in each language.

@flostadler
Copy link
Contributor

@germanilia It seems that the Go and dotnet SDKs haven't been published. The links here 404 for me.

I also tried installing the provider with: pulumi plugin install resource castai v0.1.13 --server github://api.github.com/castai/pulumi-castai
But this fails because you've only released the provider for Linux with amd64 architecture. Can you build and release all of these architectures:

  • darwin-amd64
  • darwin-arm64
  • linux-amd64
  • linux-arm64
  • windows-amd64

We can assist you on our community slack in case you have questions about that: https://pulumi-community.slack.com

@germanilia
Copy link
Author

@flostadler Thanks for the feedback, I fixed the nuget and go packages and the provider is now build in all the required configurations

@flostadler
Copy link
Contributor

@germanilia thanks! The go SDK doesn't seem to have a tagged release for v0.1.28: https://pkg.go.dev/github.com/castai/pulumi-castai/sdk/go/castai?tab=versions

@germanilia
Copy link
Author

nks! The go SDK doesn't seem to have a tagged release for v0.1.28

@flostadler I fixed the tagging issue, bellow is the relevant link with the latest release
https://pkg.go.dev/github.com/castai/[email protected]

@flostadler
Copy link
Contributor

nks! The go SDK doesn't seem to have a tagged release for v0.1.28

@flostadler I fixed the tagging issue, bellow is the relevant link with the latest release https://pkg.go.dev/github.com/castai/[email protected]

Thanks, I’ll generate a test version of the registry with your changes and verify that everything looks correct. Monday’s a public holiday here, so it’ll take until Tuesday for me to do that.

@flostadler flostadler mentioned this pull request Apr 22, 2025
@flostadler
Copy link
Contributor

@germanilia It seems like your releases are broken. There's no plugin binaries published for the last few (e.g. https://github.com/castai/pulumi-castai/releases/tag/v0.1.45).

Also, the Go SDK doesn't seem to get published correctly: https://pkg.go.dev/github.com/castai/pulumi-castai/sdk/go/castai?tab=versions
The only version that landed in pkg.go.dev is 0.1.28

@germanilia
Copy link
Author

germanilia commented Apr 23, 2025

@flostadler fixed the issue all the files are there for version 50

https://github.com/castai/pulumi-castai/releases/tag/v0.1.50

@flostadler
Copy link
Contributor

flostadler commented Apr 24, 2025

@germanilia the artifacts for darwin are missing and the others artifacts seem to be broken. The binaries in the archives have 0 bytes.

Also, please fix the SDK publishing for Go like I mentioned above. We require SDKs to be published for all languages.

@germanilia
Copy link
Author

@flostadler https://github.com/castai/pulumi-castai/releases/tag/v0.1.57 all the artifacts are included here. regarding go it can be found here: https://pkg.go.dev/github.com/castai/[email protected]

@flostadler
Copy link
Contributor

@germanilia are you sure that's correct (/wrt go)?
The installation instructions of your provider mention github.com/castai/pulumi-castai/sdk/go/castai:
https://github.com/castai/pulumi-castai/blob/f965a84e2e68a5c5ceac9e650a8d9c4d5e1bfb1e/docs/installation-configuration.md?plain=1#L31

Neither do your code examples in the docs work if I do go get github.com/castai/pulumi-castai.
When doing github.com/castai/pulumi-castai/sdk/go/castai they seem to work, but it's pulling v0.1.28.

@germanilia
Copy link
Author

@flostadler I reviewed it again, the examples now work with version 71, I was able to download it and execute the examples.
https://pkg.go.dev/github.com/castai/pulumi-castai/sdk/go/[email protected]

@sarvesh-cast
Copy link

@flostadler , I am reaching out on behalf of CAST AI. Hope the PR is good to go? Please let us know if there any changes. We have customer waiting for this official release :)

@flostadler
Copy link
Contributor

@flostadler , I am reaching out on behalf of CAST AI. Hope the PR is good to go? Please let us know if there any changes. We have customer waiting for this official release :)

Hey @sarvesh-cast, our business development team was in contact with you, right? At least that's what I assume given that we got your details as the primary contact for this provider.
When I checked with our business development team they said that there's still open items to agree on before we can move forward here. I can follow up with the team again, but it'll likely take until after May 6th because they're heads down in preparation for the PulumiUP conference

@sarvesh-cast
Copy link

Thanks for the update @flostadler, We have already reverted back with all details to business development team.

I would like to get a quick check from you, that all of the code changes are upto pulumi standards & hope we are good to merge once we get an confirmation from your business development team ?

@flostadler
Copy link
Contributor

@sarvesh-cast Yeah I can continue with the verification for now! Will keep you posted!

@sarvesh-cast
Copy link

sarvesh-cast commented May 6, 2025

Hey @flostadler! Are we good on code changes?

@flostadler
Copy link
Contributor

Hey @sarvesh-cast, sadly not. It seems like you deleted your docs/_index.md and /docs/installation-configuration.md files.

Please make sure that your submission is meeting all requirements outlined in the checklist that's in the PR description

@germanilia
Copy link
Author

@flostadler Done, the missing files were added

@flostadler
Copy link
Contributor

@germanilia Thanks, taking a look!

@flostadler
Copy link
Contributor

@germanilia You need to release the provider after adding the missing docs. The latest release is still missing the docs: https://github.com/castai/pulumi-castai/tree/v0.1.71/docs

@germanilia
Copy link
Author

@flostadler I released a new version

@flostadler flostadler mentioned this pull request May 12, 2025
@flostadler
Copy link
Contributor

@germanilia Here's the preview build of the registry with your provider: http://registry--origin-pr-7543-d964baeb.s3-website.us-west-2.amazonaws.com/registry/packages/castai/

Based on the checklist I shared here, I've noticed the following things that need to be fixed:

  • Your logoURL does not render. The file referenced here doesn't seem to be a png: https://github.com/castai/pulumi-castai/blob/98b5e41b0459f03ac6d1f9d45306cf00241c6e40/provider/sdk/schema/schema.json#L15C17-L15C104 (looks like an SVG to me)
  • You need to provide a minimal example in every supported language: https://github.com/castai/pulumi-castai/blob/main/docs/_index.md#example. Please use code-choosers to they render properly in the registry. Here's an example of how this should look like:
    {{< chooser language "typescript,python,go,csharp,java,yaml" >}}
    {{% choosable language javascript %}}
    ```javascript
    import * as eks from "@pulumi/eks";
    // Create an EKS cluster with the default configuration.
    const cluster = new eks.Cluster("eks-cluster");
    // Export the cluster's kubeconfig.
    export const kubeconfig = cluster.kubeconfig;
    ```
    {{% /choosable %}}
    {{% choosable language typescript %}}
    ```typescript
    import * as eks from "@pulumi/eks";
    // Create an EKS cluster with the default configuration.
    const cluster = new eks.Cluster("eks-cluster");
    // Export the cluster's kubeconfig.
    export const kubeconfig = cluster.kubeconfig;
    ```
    {{% /choosable %}}
    {{% choosable language python %}}
    ```python
    import pulumi
    import pulumi_eks as eks
    # Create an EKS cluster with the default configuration.
    cluster = eks.Cluster("eks-cluster")
    # Export the cluster's kubeconfig.
    pulumi.export("kubeconfig", cluster.kubeconfig)
    ```
    {{% /choosable %}}
    {{% choosable language go %}}
    ```go
    package main
    import (
    "github.com/pulumi/pulumi-eks/sdk/go/eks"
    "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
    // Create an EKS cluster with default settings.
    cluster, err := eks.NewCluster(ctx, "eks-cluster", nil)
    if err != nil {
    return err
    }
    // Export the cluster's kubeconfig.
    ctx.Export("kubeconfig", cluster.Kubeconfig)
    return nil
    })
    }
    ```
    {{% /choosable %}}
    {{% choosable language csharp %}}
    ```csharp
    using System.Collections.Generic;
    using Pulumi;
    using Pulumi.Eks;
    await Deployment.RunAsync(() =>
    {
    // Create an EKS cluster with default settings.
    var cluster = new Cluster("eks-cluster");
    // Export the cluster's kubeconfig.
    return new Dictionary<string, object?>
    {
    ["kubeconfig"] = cluster.Kubeconfig
    };
    });
    ```
    {{% /choosable %}}
    {{% choosable language java %}}
    ```java
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.eks.Cluster;
    public class App {
    public static void main(String[] args) {
    Pulumi.run(App::stack);
    }
    private static void stack(Context ctx) {
    final var cluster = new Cluster("eks-cluster");
    ctx.export("kubeconfig", cluster.kubeconfig());
    }
    }
    ```
    {{% /choosable %}}
    {{% choosable language yaml %}}
    ```yaml
    resources:
    eks-cluster:
    type: eks:Cluster
    outputs:
    kubeconfig: ${cluster.kubeconfig}
    ```
    {{% /choosable %}}
    {{< /chooser >}}

@germanilia
Copy link
Author

@flostadler I released a new version with the fixes you requested

@flostadler flostadler removed the awaiting-feedback Blocked on input from the author label May 14, 2025
@flostadler
Copy link
Contributor

@germanilia your Go SDK publishing is broken again. This is the similar issue I pointed out here (#7084 (comment)) and it popped up again now:

Additionally, the examples you've added do not work for me because they reference non-existent input properties. For example the EksCluster resource doesn't have eksClusterName, securityGroupId or subnetIds input properties (https://github.com/castai/pulumi-castai/blob/8a2e7232b10234e559623d244fb50f39b6fe3546/docs/_index.md?plain=1#L25-L32). Please make sure that the examples you're adding are correct

@flostadler flostadler added the awaiting-feedback Blocked on input from the author label May 14, 2025
@germanilia
Copy link
Author

@flostadler fixed and updated the examples

@flostadler
Copy link
Contributor

@flostadler fixed and updated the examples

Thanks! Taking another look now

@flostadler
Copy link
Contributor

@germanilia here's the preview build for the package at version 0.1.77: http://registry--origin-pr-7543-e129a9ae.s3-website.us-west-2.amazonaws.com/registry/packages/castai/

@flostadler
Copy link
Contributor

flostadler commented May 19, 2025

@germanilia thanks for fixing the installation instructions, they now mention the correct command for Golang.

The problems related to Golang SDK publishing being broken (shows v0.1.75 as latest) and (edit: fixed) the examples being wrong that I mentioned in my previous comment (#7084 (comment)) still need to be fixed though. The typescript and python examples were fixed, but the Golang and dotnet ones not. Please make sure that the examples compile.

@germanilia
Copy link
Author

@flostadler what do you mean the Golang SDK publishing being broken? you were unable to install it?

@flostadler
Copy link
Contributor

flostadler commented May 21, 2025

shows v0.1.75 as latest

@germanilia I just re-checked and installing is working now, maybe it was some eventual consistency problem. Please disregard that comment!

So the only thing left is fixing the Golang & Dotnet examples

@germanilia
Copy link
Author

I published new examples version sorry for the confusion. @flostadler

@flostadler
Copy link
Contributor

@germanilia I published a new test version of your provider to the registry and it's looking good to me: http://registry--origin-pr-7543-256b9bf5.s3-website.us-west-2.amazonaws.com/registry/packages/castai/

From a technical perspective we're good to go. I'll follow up with our bizdev team to see if we're good to publish

@flostadler flostadler removed the awaiting-feedback Blocked on input from the author label May 21, 2025
flostadler added a commit that referenced this pull request May 22, 2025
Adding Cast.ai provider. See #7084 for more details
@flostadler
Copy link
Contributor

flostadler commented May 22, 2025

@germanilia I've published the provider (it should be live in a couple of minutes once the deployment finishes)! See #7543
Closing this PR out now. Feel free to reach out to me on the community slack if you have any further questions regarding provider maintenance!

@flostadler flostadler closed this May 22, 2025
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.

5 participants