Skip to main content

Prerequisites

  • Access to the Fast Foundation manifest repository
  • Output values from the AWS Resources step
  • Basic understanding of Kubernetes concepts

Step-by-Step Process

1. Add Application to Cluster Configuration

Navigate to your manifest repository and open the file clusters/<cluster_name>/ruling-app/<environment>/values.yaml. Add your application configuration under the application: field.
Make sure you have the output values from the AWS Resources step ready, since you’ll need them to replace placeholders in the YAML config.
  your-app-name:
    # appType: standard-application
    ingressRule: Host(`your-app.dev.your-domain.com`)
    port: 3000
    replicas: 1
    nodePoolTier: application
    image:
      registry: "1110987654321.dkr.ecr.us-east-1.amazonaws.com"  # From ecr_repository output
      repository: "development/application/your-app-name"       # Rest of ecr_repository
    env:
      awsSecretId: "environment/your-app-name/env-cDkfzs"       # From static_secret output
      mountPath: "/mnt"
    mainContainer:
      resources: 
        limits:
          cpu: 250m
          memory: 512Mi
        requests:
          cpu: 250m
          memory: 512Mi
      # Configure health check probes according to your application's requirements
      # startupProbe: Gives your app time to start up (especially for slow-starting apps)
      # livenessProbe: Detects if your app is still running (restarts container if failing)
      # readinessProbe: Determines if your app is ready to receive traffic
      startupProbe:
        httpGet:
          port: 3000
          path: "/api/healthz" 
        failureThreshold: 30
        periodSeconds: 5
      
      livenessProbe:
        httpGet:
          port: 3000
          path: "/api/healthz"
        failureThreshold: 4
        periodSeconds: 20
        timeoutSeconds: 2
      
      readinessProbe:
        httpGet:
          port: 3000
          path: "/api/healthz"

2. Configure Environment-Specific Values

Replace these values with your AWS Resources output:
FieldDescriptionSource
env.awsSecretIdSecret name for environment variablesEverything after :secret: in static_secret
image.registryECR registry URLFirst part of ecr_repository
image.repositoryImage repository pathRemaining part of ecr_repository

3. Create Application Directory Structure


environments/
└── <environment>/
    └── apps/
        └── <app_name>/
            ├── values.yaml
            └── Chart.yaml

4. Create values.yaml

Create environments/<environment>/apps/<app_name>/values.yaml:
standard-application:
  image:
    tag: default-12kmkjas9
The image tag can be any placeholder like default-12kmkjas9 or development-application-deployment-6b0f2da7 until a real image is built.

5. Create Chart.yaml

Create environments/<environment>/apps/<app_name>/Chart.yaml:
apiVersion: v2
name: standard-application
description: application helm chart

version: 0.1.0
appVersion: "1.0"

dependencies:
- name: standard-application
  version: 0.1.0
  repository: file://../../charts/standard-application

6. Configure Dockerfile and Entrypoint

Since a secret is automatically mounted at /mnt/.env, configure your app to load environment variables from that file.

Entrypoint Script (Node.js Example)

#!/bin/bash

# Load environment variables from mounted secret
if [ -f /mnt/.env ]; then
    export $(cat /mnt/.env | grep -v '^#' | xargs)
fi

exec "$@"

Dockerfile Example (Node.js)

FROM node:18-alpine

WORKDIR /app
COPY . /app

RUN npm install

COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh

EXPOSE 3000
ENTRYPOINT ["/entrypoint.sh"]
CMD ["npm", "start"]

7. Deploy to ArgoCD

Push your changes to the main branch:
git add .
git commit -m "Add application manifest files"
git push origin main
ArgoCD will automatically detect the changes and deploy your application.

8. Verify Deployment

  1. Go to your ArgoCD dashboard
  2. Find your application in the list
  3. Check the sync status
  4. Review logs if there are issues

Manifest Fields Reference

Environment Configuration

FieldDescriptionExample
env.secretidAWS Secrets Manager secret namedevelopment/app_name/env-ABC123
image.registryContainer registry URL123456789.dkr.ecr.us-east-1.amazonaws.com
image.repositoryImage repository pathdevelopment/application/app_name
image.tagImage taglatest, v1.0.0, test-6b0f2da7

Resource Configuration

FieldDescriptionRecommended
resources.requests.memoryMinimum memory required256Mi
resources.requests.cpuMinimum CPU required100m
resources.limits.memoryMaximum memory allowed512Mi
resources.limits.cpuMaximum CPU allowed500m

Next Steps

Once manifests are created and ArgoCD has synced them, continue to Configure CI/CD.

Troubleshooting

  • Check that you pushed to the main branch
  • Verify the directory structure is correct
  • Check ArgoCD logs for sync errors
  • Verify the secret ID matches AWS output
  • Confirm the secret exists in AWS Secrets Manager
  • Ensure the IAM role can read the secret
  • Verify the ECR repository URL is correct
  • Check the image tag exists in the repository
  • Ensure the service account has ECR pull permissions