Application Deployment Guide

End-to-end guide for deployments on the ayedo SDP: container builds with Forgejo or GitLab, Harbor, OpenBao & External Secrets, ohMyHelm, and Argo CD.

Application Deployment Guide

This guide walks through the complete end-to-end workflow for application developers on the ayedo Software Delivery Platform (SDP): from building a container image through Harbor, OpenBao, and ohMyHelm to GitOps deployment with Argo CD.

Overview

  1. Build the container image — rootless (without Docker-in-Docker) and tagged with a fixed, immutable version
  2. Store in Harbor — centrally host and scan the container image and OCI Helm chart
  3. Manage secrets with OpenBao & External Secrets — keep all credentials out of Git repositories
  4. Package with ohMyHelm — standard workload plus PodDisruptionBudget, NetworkPolicy, and ExternalSecret via manifests:
  5. Deploy with Argo CD — declarative GitOps rollout with automated drift reconciliation

Prerequisites

Make sure you have access via your team SSO to Forgejo or GitLab, Harbor, OpenBao, Argo CD, and your target namespace (acme-production) (see Access Control).

Locally installed CLI tools:

docker --version   # or podman / buildah for local image testing
helm version       # Helm 3.x
kubectl version --client
bao version        # OpenBao CLI
argocd version --client

Step 1: Build the Container Image and Push to Harbor

Guardrails-Compliant Dockerfile (Non-Root)

Ensure your Dockerfile uses an unprivileged user (USER 1000) and a minimal base image pinned to a fixed tag:

FROM node:22-alpine AS builder
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build

FROM node:22-alpine
RUN addgroup -g 1000 appuser && \
    adduser -D -u 1000 -G appuser appuser
WORKDIR /app
COPY --from=builder --chown=1000:1000 /app/node_modules ./node_modules
COPY --from=builder --chown=1000:1000 /app/dist ./dist
COPY --chown=1000:1000 package*.json ./
USER 1000
EXPOSE 8080
CMD ["node", "dist/server.js"]

Rootless Build in CI/CD (Forgejo Actions or GitLab CI)

Avoid privileged Docker-in-Docker and the mutable :latest tag in CI/CD pipelines. Use Kaniko or Buildah instead with a unique tag (such as a Semantic Version or Git commit SHA).

Example with Kaniko (pattern for Forgejo Actions or GitLab CI):

# Generate registry auth from CI secrets
mkdir -p /kaniko/.docker
printf '{"auths":{"registry.acme.corp":{"auth":"%s"}}}' \
  "$(printf '%s:%s' "$HARBOR_ROBOT_USER" "$HARBOR_ROBOT_TOKEN" | base64 -w0)" \
  > /kaniko/.docker/config.json

# Build the image and push it to Harbor with a unique tag
/kaniko/executor \
  --context "$PWD" \
  --dockerfile "$PWD/Dockerfile" \
  --destination "registry.acme.corp/acme/my-app:${RELEASE_TAG}" \
  --cache=true \
  --cache-repo="registry.acme.corp/acme/cache"

Alternatively, you can use Buildah (buildah bud / buildah push) to build completely daemonless and rootless in Forgejo or GitLab runners. Once pushed, Harbor automatically scans the image for known vulnerabilities.

Step 2: Store Secrets in OpenBao

Sensitive configuration values (API keys, database credentials, signing keys) are stored in OpenBao and automatically synced as Kubernetes Secrets into the target namespace via the External Secrets Operator (ESO).

Log In with the bao CLI and Write Secrets

export BAO_ADDR="https://openbao.example.com"

# Log in via OIDC (Keycloak or Authentik)
bao login -method=oidc role=developer

# Store application secrets under your team path (KV v2)
bao kv put secret/acme/my-app \
  api_key="<your-api-key>" \
  database_url="postgresql://appuser:<password>@acme-db-rw.acme-production.svc:5432/acme"

# Verify stored keys
bao kv get secret/acme/my-app

Platform operations typically provides a ClusterSecretStore in the cluster (in this example openbao-backend), which ESO uses to fetch secrets for your namespace.

Step 3: Package the Application with ohMyHelm

ohMyHelm provides a ready-to-use Helm chart for standard workloads. You can cleanly add supporting Kubernetes resources such as ExternalSecret, PodDisruptionBudget, and NetworkPolicy using the manifests: helper.

Create Chart.yaml

Use the official ohMyHelm HTTP Helm repository:

apiVersion: v2
name: my-app
description: Sample application for the ayedo SDP
type: application
version: 1.0.0
appVersion: "1.0.0"
dependencies:
  - name: ohmyhelm
    version: "1.17.1"
    repository: "https://gitlab.com/api/v4/projects/28993678/packages/helm/stable"

Configure values.yaml

ohmyhelm:
  chart:
    enabled: true
    fullnameOverride: "my-app"
    replicaCount: 2

    podSecurityContext:
      runAsNonRoot: true
      runAsUser: 1000
      runAsGroup: 1000
      fsGroup: 1000

    container:
      image: registry.acme.corp/acme/my-app:1.0.0
      imageConfig:
        pullPolicy: IfNotPresent
      ports:
        - name: http
          containerPort: 8080
          protocol: TCP
      securityContext:
        allowPrivilegeEscalation: false
        readOnlyRootFilesystem: true
        capabilities:
          drop:
            - ALL
      resources:
        requests:
          cpu: 100m
          memory: 128Mi
        limits:
          cpu: 500m
          memory: 512Mi
      livenessProbe:
        httpGet:
          path: /health
          port: http
        initialDelaySeconds: 15
        periodSeconds: 10
      readinessProbe:
        httpGet:
          path: /ready
          port: http
        initialDelaySeconds: 5
        periodSeconds: 5
      envFrom:
        - secretRef:
            name: my-app-secrets

    service:
      type: ClusterIP
      ports:
        - port: 80
          targetPort: http
          protocol: TCP
          name: http

    ingressSimple:
      enabled: true
      host: app.example.com
      tlsSecretName: my-app-tls
      path: /
      pathType: Prefix
      annotations:
        cert-manager.io/cluster-issuer: letsencrypt-prod
        polycrate_endpoint_monitor: "true"
        polycrate_endpoint_path: "/ready"

  # Additional resources via the ohMyHelm manifests: helper
  manifests:
    - apiVersion: external-secrets.io/v1beta1
      kind: ExternalSecret
      content:
        metadata:
          name: my-app-secrets
          namespace: acme-production
        spec:
          refreshInterval: 1h
          secretStoreRef:
            name: openbao-backend
            kind: ClusterSecretStore
          target:
            name: my-app-secrets
            creationPolicy: Owner
          data:
            - secretKey: API_KEY
              remoteRef:
                key: acme/my-app
                property: api_key
            - secretKey: DATABASE_URL
              remoteRef:
                key: acme/my-app
                property: database_url

    - apiVersion: policy/v1
      kind: PodDisruptionBudget
      content:
        metadata:
          name: my-app-pdb
          namespace: acme-production
        spec:
          minAvailable: 1
          selector:
            matchLabels:
              app: my-app

    - apiVersion: networking.k8s.io/v1
      kind: NetworkPolicy
      content:
        metadata:
          name: my-app-allow-ingress
          namespace: acme-production
        spec:
          podSelector:
            matchLabels:
              app: my-app
          policyTypes:
            - Ingress
          ingress:
            - from:
                - namespaceSelector:
                    matchLabels:
                      kubernetes.io/metadata.name: ingress-nginx
              ports:
                - protocol: TCP
                  port: 8080

Validate Locally and Push the Chart to Harbor as an OCI Artifact

# Download dependencies and inspect rendered manifests
helm dependency update .
helm template my-app . --namespace acme-production

# Package the chart and push it to Harbor
helm package .
helm registry login registry.acme.corp -u "$HARBOR_ROBOT_USER" --password-stdin <<< "$HARBOR_ROBOT_TOKEN"
helm push my-app-1.0.0.tgz oci://registry.acme.corp/acme

Step 4: GitOps Deployment with Argo CD

The recommended approach for teams is a declarative Application manifest in a GitOps repository (Forgejo or GitLab) referencing your versioned OCI chart in Harbor:

apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: acme-my-app-production
  namespace: argocd
  finalizers:
    - resources-finalizer.argocd.argoproj.io
spec:
  project: acme
  source:
    repoURL: registry.acme.corp/acme
    chart: my-app
    targetRevision: 1.0.0
    helm:
      values: |
        ohmyhelm:
          chart:
            replicaCount: 2
            container:
              image: registry.acme.corp/acme/my-app:1.0.0
  destination:
    server: https://kubernetes.default.svc
    namespace: acme-production
  syncPolicy:
    automated:
      prune: true
      selfHeal: true
    syncOptions:
      - CreateNamespace=false

Trigger or Inspect a Deployment via the Argo CD CLI

Log in to Argo CD via SSO with standard TLS certificate verification:

argocd login argocd.example.com --sso

# Inspect application status and sync state
argocd app get acme-my-app-production

# Optional: override the image reference directly (full image path including tag)
argocd app set acme-my-app-production \
  --helm-set ohmyhelm.chart.container.image=registry.acme.corp/acme/my-app:1.0.1

argocd app sync acme-my-app-production --prune
argocd app wait acme-my-app-production --health --timeout 300

In production GitOps workflows, update targetRevision and image via pull/merge requests in your GitOps repository so every release remains audited and can be rolled back to a previous revision at any time.

Step 5: Verify and Operate the Rollout

# Check Pods, ExternalSecrets, and Ingress/Routes in the namespace
kubectl get pods,externalsecret,ingress,pvc -n acme-production

# Monitor rollout status
kubectl rollout status deployment/my-app -n acme-production

# Trigger a new rollout after rotating secrets in OpenBao
kubectl rollout restart deployment/my-app -n acme-production

Afterward, verify pod metrics, application logs (stdout/stderr), and the status of your configured User Alerts in Grafana.

Further Reading