1. Deploy the tt-workflow-driver helm chart on Oracle Kubernetes Engine (OKE)

    TypeScript

    To deploy a Helm chart on Oracle Kubernetes Engine (OKE) using Pulumi, you will need to perform the following steps:

    1. Set up the OCI provider to manage resources in Oracle Cloud Infrastructure (OCI).
    2. Create or use an existing Oracle Container Engine for Kubernetes (OKE) cluster provided by the oci.ContainerEngine.Cluster resource.
    3. Deploy your Helm chart using the kubernetes.helm.v3.Chart resource, which will interact with your OKE cluster.

    Below is a Pulumi program written in TypeScript that demonstrates how to deploy the tt-workflow-driver Helm chart on an OKE cluster. This will involve setting up the necessary OCI and Kubernetes providers, configuring the connection to the OKE cluster, and deploying the chart.

    import * as oci from "@pulumi/oci"; import * as k8s from "@pulumi/kubernetes"; import * as pulumi from "@pulumi/pulumi"; // Create an Oracle Container Engine for Kubernetes (OKE) cluster const cluster = new oci.ContainerEngine.Cluster("my-oke-cluster", { // Specify necessary properties according to your OCI account and infrastructure needs // Check the documentation for cluster properties here: https://www.pulumi.com/registry/packages/oci/api-docs/containerengine/cluster compartmentId: oci.getCurrentCompartment().then(compartment => compartment.id), name: "my-oke-cluster", kubernetesVersion: "v1.21.5", // replace with a version that OKE supports // Add the rest of required configuration related to networking, nodes, etc. }); // Obtain the Kubeconfig of the OKE cluster to interact with it const kubeconfig = cluster.kubeconfig.apply(JSON.parse); // Create a Kubernetes provider instance using the Kubeconfig from the OKE cluster const k8sProvider = new k8s.Provider("my-oke-k8s-provider", { kubeconfig: kubeconfig, }); // Deploy the tt-workflow-driver Helm chart const ttWorkflowDriver = new k8s.helm.v3.Chart("tt-workflow-driver", { // Assuming we are using a chart from a known repository, you need to specify `repo` or `path` // `chart` is the name of the chart in the repository chart: "tt-workflow-driver", // You can also specify `version` to deploy a specific chart version // Include `values` for any custom configuration you need to pass to your chart values: { // specify your values here, for example: image: "your-docker-image", tag: "your-image-tag", // ...other chart values }, }, { provider: k8sProvider }); // Inform Pulumi to use our custom Kubernetes provider // Export the necessary details of the deployments export const clusterName = cluster.name; export const kubeconfigOutput = kubeconfig;

    Explanation:

    • We are using the oci.ContainerEngine.Cluster resource to create a new OKE cluster. The constructor requires different properties such as compartmentId, name, and kubernetesVersion. Additional properties would be needed based on your specific requirements like VCN IDs, node pool configuration, etc.

    • The kubeconfig obtained from the newly created cluster is parsed into a format that the @pulumi/kubernetes provider can use to manage resources on this cluster.

    • A new instance of k8s.Provider is created, using the kubeconfig for the OKE cluster, which sets up the Pulumi Kubernetes provider to deploy resources to that cluster.

    • The tt-workflow-driver Helm chart is deployed using the k8s.helm.v3.Chart resource. The chart property specifies the name of the Helm chart to deploy, and values can be used to provide any configuration required by the chart. The provider option is passed to ensure the chart is installed on our OKE cluster.

    What's Next:

    To use this code:

    1. Ensure you have Pulumi installed and configured to use Oracle Cloud Infrastructure.
    2. Save this code to a file, such as index.ts.
    3. Run pulumi up to preview and deploy the resources.

    Pulumi will manage the creation of the OKE cluster and the deployment of the Helm chart, along with any other Kubernetes resources specified in the program. Remember that you will need to have Helm installed on your local machine as Pulumi uses the local Helm CLI to package and deploy charts.