Skip to main content

Manifest Structure Reference

Purpose: For application developers, provides field-level reference for every file in customer-app-example.

Overview

This reference documents the structure and fields of each manifest file in an openCenter application repository. The structure follows the openCenter-customer-app-example pattern.

Repository Layout

my-app/
├── kustomization.yaml # Root Kustomize composition
├── namespace.yaml # Application namespace
├── gateway-resources/ # Shared Gateway API resources (optional)
│ └── gateway.yaml
├── app1/ # Raw manifest application
│ ├── deployment.yaml
│ ├── service.yaml
│ ├── httproute.yaml
│ └── networkpolicy.yaml
└── app2/ # Helm-based application
├── source.yaml # HelmRepository
└── helmrelease.yaml # HelmRelease with values

kustomization.yaml (Root)

Composes all application resources into a single deployable unit.

apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- namespace.yaml
- app1/
- app2/
FieldTypeRequiredDescription
resourceslist of pathsYesPaths to directories or files to include
patcheslist of patch objectsNoStrategic merge or JSON patches
imageslist of image overridesNoOverride image name/tag without patching
namespacestringNoOverride namespace for all resources (prefer targetNamespace in FluxCD Kustomization instead)

deployment.yaml

Standard Kubernetes Deployment for stateless workloads.

Field PathTypeRequiredNotes
spec.replicasintegerYesMinimum 2 for production; overridden per-environment via Kustomize
spec.template.spec.containers[].imagestringYesMust use Harbor registry with pinned tag (no latest)
spec.template.spec.containers[].resources.requestsobjectYesKyverno policy rejects pods without resource requests
spec.template.spec.containers[].resources.limitsobjectYesSet memory limit; CPU limit is optional but recommended
spec.template.spec.containers[].livenessProbeobjectYesRequired for proper pod lifecycle management
spec.template.spec.containers[].readinessProbeobjectYesRequired for traffic routing (Service won't send traffic to unready pods)
spec.template.spec.securityContext.runAsNonRootbooleanYesMust be true; enforced by Pod Security Admission
spec.template.spec.securityContext.seccompProfile.typestringYesMust be RuntimeDefault or Localhost

service.yaml

Exposes the Deployment to cluster-internal traffic and to HTTPRoutes.

Field PathTypeRequiredNotes
spec.selectormapYesMust match Deployment pod labels
spec.ports[].portintegerYesPort exposed to other services and HTTPRoute backendRefs
spec.ports[].targetPortintegerYesMust match container port
spec.typestringNoDefault ClusterIP. Do not use LoadBalancer — use Gateway API instead

httproute.yaml

Gateway API HTTPRoute for external HTTPS routing.

Field PathTypeRequiredNotes
spec.parentRefs[].namestringYesName of the shared Gateway (typically platform-gateway)
spec.parentRefs[].namespacestringYesNamespace of the Gateway (typically gateway-system)
spec.hostnames[]list of stringsYesFQDN(s) for this route
spec.rules[].matches[].path.typestringNoPathPrefix (default) or Exact
spec.rules[].matches[].path.valuestringNoURL path to match
spec.rules[].backendRefs[].namestringYesService name in the same namespace
spec.rules[].backendRefs[].portintegerYesService port number

helmrelease.yaml (Helm-Based Applications)

FluxCD HelmRelease for applications deployed via Helm charts.

apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
name: redis
namespace: my-app
spec:
interval: 30m
chart:
spec:
chart: redis
version: "19.x"
sourceRef:
kind: HelmRepository
name: bitnami
values:
architecture: standalone
auth:
enabled: true
existingSecret: redis-credentials
Field PathTypeRequiredNotes
spec.chart.spec.chartstringYesChart name in the HelmRepository
spec.chart.spec.versionstringYesSemver range or exact version; never omit
spec.chart.spec.sourceRefobjectYesReferences a HelmRepository in the same namespace
spec.valuesobjectNoHelm values merged with chart defaults
spec.intervaldurationYesHow often FluxCD checks for chart updates

networkpolicy.yaml

Restricts ingress and egress traffic for application pods.

apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: my-app
namespace: my-app
spec:
podSelector:
matchLabels:
app: my-app
policyTypes:
- Ingress
- Egress
ingress:
- from:
- namespaceSelector:
matchLabels:
kubernetes.io/metadata.name: gateway-system
ports:
- port: 8080
egress:
- to:
- namespaceSelector:
matchLabels:
kubernetes.io/metadata.name: kube-system
ports:
- port: 53
protocol: UDP
Field PathTypeRequiredNotes
spec.podSelectorobjectYesSelects pods this policy applies to
spec.policyTypeslistYesInclude both Ingress and Egress for explicit control
spec.ingress[].fromlistNoAllow traffic from Gateway namespace for HTTPRoute traffic
spec.egress[].tolistNoAllow DNS (port 53) at minimum; add database/API endpoints as needed

Further Reading