1. Deploy the livekit-recorder helm chart on Oracle Kubernetes Engine (OKE)

    TypeScript

    Deploying the LiveKit Recorder Helm chart to Oracle Kubernetes Engine (OKE) involves using the Pulumi Kubernetes provider to interact with your Kubernetes cluster and deploy Helm charts.

    To achieve this, we'll go through the following steps:

    1. Set up the Pulumi Kubernetes provider to connect to your OKE cluster.
    2. Deploy the LiveKit Recorder Helm chart using the Chart resource from Pulumi's Kubernetes package.

    Before running this program, make sure you have access to your OKE cluster and the necessary credentials are set up in your environment. Pulumi uses the Kubernetes configuration file (kubeconfig) to interact with your cluster. Ensure that this file is configured to connect to your OKE cluster.

    Here's the Pulumi program in TypeScript which explains how to deploy the LiveKit Recorder Helm chart on Oracle Kubernetes Engine:

    import * as pulumi from "@pulumi/pulumi"; import * as k8s from "@pulumi/kubernetes"; // Configuration variables for the Helm chart. const name = "livekit-recorder"; const chartVersion = "x.y.z"; // Replace with the specific version you want to deploy const helmRepository = "https://helm.livekit.io"; // The Helm repository for LiveKit // Instantiate the Kubernetes provider using the current context from Kubernetes config. // When running Pulumi commands, it will use the active context in your kubeconfig that points to your OKE cluster. const provider = new k8s.Provider("oke-provider", {}); // Create a Kubernetes namespace for the LiveKit Recorder if you want to separate it from other workloads. const ns = new k8s.core.v1.Namespace("livekit-namespace", { metadata: { name: "livekit", // The namespace name where you want to deploy the LiveKit Recorder }, }, { provider }); // Deploy the LiveKit Recorder Helm chart. const livekitChart = new k8s.helm.v3.Chart(name, { chart: "livekit-recorder", version: chartVersion, // Ensure this matches the chart version you want to use fetchOpts: { repo: helmRepository, }, // If needed, specify the values for your deployment through `values` // For example: // values: { // image: { // repository: "livekit/recorder", // tag: "latest" // }, // // Add other configuration values here // }, namespace: ns.metadata.name, // Deploy to the namespace created above }, { provider }); // Export the namespace name and the status of the Helm release export const livekitNamespace = ns.metadata.name; export const livekitChartStatus = livekitChart.status;

    Explanation

    • We import the required Pulumi packages: @pulumi/pulumi for the Pulumi SDK and @pulumi/kubernetes for the Kubernetes provider and resources.
    • We define a few constants for the Helm chart deployment, including the name we want to give to our Helm release (livekit-recorder), the version we want to use, and the Helm repository URL for LiveKit.
    • We create an instance of the Kubernetes provider. Pulumi will use the credentials from your kubeconfig to interact with your OKE cluster.
    • We declare a Kubernetes namespace resource for organizational purposes, but this is optional. You can deploy the Helm chart to an existing namespace by setting the namespace property to that namespace name.
    • We deploy the LiveKit Recorder Helm chart using a Chart resource. We specify the chart name, version, and the fetchOpts which include the Helm repository URL. We also define the namespace where we want to install the chart.
    • We optionally export the namespace name and the status of the Helm release as stack outputs, which can be helpful for further automation or inspection.

    Please note that you need to replace the chartVersion with the specific version of the LiveKit Recorder Helm chart that you intend to deploy. Also, adjust the values in the livekitChart if you have specific configuration needs for your deployment.

    After you've written this code, you can deploy it using the Pulumi CLI. Run pulumi up in your terminal in the directory where this file is located, and Pulumi will execute the deployment to your OKE cluster.