1. Deploy the argo-workflow helm chart on Kubernetes


    To deploy the Argo Workflow Helm chart on Kubernetes using Pulumi, you'll need to use Pulumi's Kubernetes provider. In this guide, I will walk you through the process of writing a TypeScript program to accomplish this.

    Pulumi provides a Kubernetes package that offers resources for managing Kubernetes resources, including deploying Helm charts. The Chart resource from the @pulumi/kubernetes/helm/v3 module allows you to deploy a Helm chart to a Kubernetes cluster.

    Here is what the program will accomplish:

    1. Configure Kubernetes Provider: You need to have a Kubernetes cluster running and kubeconfig file correctly set in your environment for Pulumi to interact with your cluster.

    2. Use the Chart Resource: The Chart resource is used to deploy the Argo Workflow Helm chart onto your Kubernetes cluster from a specified repository.

    Below is the TypeScript program that deploys the Argo Workflow Helm chart to your Kubernetes cluster:

    import * as k8s from "@pulumi/kubernetes"; // Define the Argo Workflow Helm chart details. const argoChart = new k8s.helm.v3.Chart("argo-workflows", { chart: "argo", // This is the name of the chart within the Helm repo, change if necessary fetchOpts: { repo: "https://argoproj.github.io/argo-helm", // The Helm repository URL where the chart is located }, // Add any values here you would like to override the default chart values. values: { // Sample value override // server: { // serviceType: "LoadBalancer", // }, }, }); // Export the URL for Argo Workflows UI if service type is LoadBalancer or NodePort. export const argoUiService = argoChart.getResourceProperty("v1/Service", "argo-workflows-server", "status");

    In the program above:

    • We import the @pulumi/kubernetes package which is Pulumi's way of interacting with Kubernetes objects.
    • We create a new Helm chart resource named argo-workflows.
    • We specify the chart name, which is argo (you need to ensure this matches the actual chart name in the Helm repository).
    • The repo option within fetchOpts must be set to the URL of the Helm chart repository for Argo Workflows.
    • You can provide additional Helm values in the values property if you need to customize Argo deployments, such as changing the service type. The commented section is an example that you might need to customize.
    • Lastly, we export the service details. The getResourceProperty function retrieves information about a specific resource that is created as part of the Helm chart deployment. If you have a LoadBalancer set up, it can give you an endpoint to access the Argo Workflows UI.

    Please ensure you have Pulumi installed and configured to use with your Kubernetes cluster. You can run this program with the pulumi up command. It will prompt you for confirmation before applying the changes to your cluster.

    This program does not assume any Pulumi cloud setup, as that is handled outside the code using the Pulumi CLI and configuration files. Ensure your kubeconfig is properly configured and that you have sufficient permissions to deploy resources to your cluster.