Skip to main content
Version: Early Access

FluxCD Setup Application

This workflow orchestrates the deployment of a new application using FluxCD by creating the necessary source and application manifests in the configured Git repository.

Application Verification

Before proceeding with the application setup, the workflow verifies whether an application with the specified name already exists in the target namespace. This ensures that duplicate applications are not created.

Step 1: Application Input

  • Task type: User Input Task
  • Description: Gathers initial information about the application to be deployed.
  • Properties:
    • FluxCD API Server: Reference to the fluxcd.APIServer CI.
    • Git Repository: Reference to the fluxcd.GitConfig CI.
    • Namespace: The target Kubernetes namespace for the application.
    • Application Name: The name for the new application.
    • Deployment Kind: The type of FluxCD deployment (e.g., Kustomization, HelmRelease).

Step 2: Check if Application Exists

  • Task type: FluxCD: Check If Application Exists
  • Description: Checks if an application with the given name already exists in the specified namespace on the FluxCD server.
  • Properties:
    • Server: The fluxcd.APIServer CI.
    • App Name: The name of the application to check.
    • Namespace: The namespace to check in.

Check Application

Application Resource Creation

If the application does not already exist, the workflow proceeds to create the necessary source and application manifests required for deployment.

Step 1: Application Source Information Input

  • Task type: User Input Task
  • Description: Collects details for the FluxCD source manifest (e.g., GitRepository, HelmRepository).
  • Properties:
    • Source Manifest Name: Filename for the source manifest (e.g., app-source.yaml).
    • Source Name: Name of the FluxCD source resource.
    • Source Kind: Kind of FluxCD source (e.g., GitRepository, HelmRepository).
    • Source URL: URL of the repository containing the application's manifests/chart.
    • Source Branch: Branch for the source repository.
    • Source Namespace: Namespace for the FluxCD source resource itself.
    • Source Reconciliation Interval: How often FluxCD checks the source for updates (e.g., 5m).
    • Source Tag: Optional Git tag for the source.
    • Source Commit: Optional Git commit for the source.
    • Source Provider: Advanced source options.
    • Source Secret Ref: Advanced source options.

Step 2: Create Source Manifest

  • Task type: FluxCD: Create Source Manifest
  • Description: Generates and commits the FluxCD source manifest (e.g., GitRepository, HelmRepository) to the configured Git repository.
  • Properties:
    • Git Repository: The fluxcd.GitConfig CI.
    • Server: The fluxcd.APIServer CI.
    • Manifest Filename: Name for the source manifest file.
    • Source Name: Name attribute for the source resource.
    • Source Namespace: Namespace for the source resource.
    • Kind: Type of source (e.g., GitRepository).
    • URL: Source-specific details.
    • Branch: Source-specific details.
    • Interval: Source-specific details.
    • Secret Ref: Source-specific details.

Step 3: Create Namespace Manifest

  • Task type: FluxCD: Create Namespace Manifest File
  • Description: Creates and commits a Kubernetes Namespace manifest to the Git repository if the target namespace doesn't exist.
  • Properties:
    • Git Repository: The fluxcd.GitConfig CI.
    • Namespace: The namespace to create.

Step 4: Kustomization Deployment Information Input (Conditional on deploymentKind being Kustomization)

  • Task type: User Input Task
  • Description: Gathers details specific to a Kustomization deployment.
  • Properties:
    • Deployment Manifest Name: Filename for the Kustomization manifest (e.g., app-kustomization.yaml).
    • Deployment Namespace: Namespace for the Kustomization object (usually where FluxCD runs or a dedicated Flux namespace).
    • Application Reconciliation Interval: How often FluxCD reconciles this Kustomization.
    • Path: Path within the source repository where the kustomization files are located.

Step 5: HelmRelease Deployment Information Input (Conditional on deploymentKind being HelmRelease)

  • Task type: User Input Task
  • Description: Gathers details specific to a HelmRelease deployment.
  • Properties:
    • Deployment Manifest Name: Filename for the HelmRelease manifest.
    • Deployment Namespace: Namespace for the HelmRelease object.
    • Application Reconciliation Interval: Reconciliation interval.
    • Chart Name: Name of the Helm chart.
    • Chart Version: Version of the Helm chart.
    • Values Files: List of values files to use with the Helm chart.
    • Values: Inline values to override chart defaults.

Step 6: Create Deployment Manifest

  • Task type: FluxCD: Create Application Manifest
  • Description: Generates and commits the FluxCD application manifest (e.g., Kustomization or HelmRelease) to the Git repository.
  • Properties:
    • Git Repository: The fluxcd.GitConfig CI.
    • Server: The fluxcd.APIServer CI.
    • Manifest Filename: Name for the application manifest file.
    • Kind: Kustomization or HelmRelease.
    • Application Name: Name of the application being deployed.
    • Target Namespace: Target namespace for the application resources.
    • Source Name: Name of the associated FluxCD source.
    • Source Namespace: Namespace of the associated FluxCD source.
    • Interval: Reconciliation interval.
    • Kustomization specific: Path.
    • HelmRelease specific: Chart Name, Chart Version, Values Files, Values.

Application Setup

Live Deployment Configuration

After setting up the application resources, the workflow configures the live deployment settings in Digital.ai Release to monitor the application's state.

Step 1: Live Deployment Configuration Input

  • Task type: User Input Task
  • Description: Asks for a name for the live deployment configuration to be created for this new application.
  • Properties:
    • Live Deployment Configuration Name: Name for the fluxcd.DeploymentConfig CI.

Step 2: Create Live Deployment Configuration

  • Task type: Script Task
  • Description: Creates a fluxcd.DeploymentConfig CI in Digital.ai Release to monitor this newly set up application.

Step 3: Setup FluxCD

  • Task type: Script Task
  • Description: Sets up the event source in Release based on the server and the new live deployment configuration.

Step 4: Configure FluxCD

  • Task type: Script Task
  • Description: Ensures FluxCD is configured to send notifications for this application to Release (similar to autoconfigure in server setup, but potentially app-specific).