Skip to content
ReferenceAppProjectDefinition

AppProjectDefinition

k8s.gitops.nyl/v1

Kubernetes GitOps Resources · Download JSON Schema · Usage guide

Defines an Argo CD AppProject manifest or an externally managed project contract.

Rendered projects are emitted into the catalog. External projects supply an admission contract without transferring ownership to Nyl.

When needed

Required when one project is shared by several ApplicationGroups, when the Argo CD AppProject is externally managed, or when the project needs AppProject fields beyond spec.projectTemplate.

If omitted

An ApplicationGroup generates its own AppProject, admitting only what the group’s Applications deploy unless spec.projectTemplate declares otherwise. Nyl does not assume an existing Argo CD project supplies the required policy contract.

Example

apiVersion: k8s.gitops.nyl/v1
kind: AppProjectDefinition
metadata:
  name: workloads
spec:
  management: External
  manifest:
    apiVersion: argoproj.io/v1alpha1
    kind: AppProject
    metadata:
      name: workloads
      namespace: argocd
    spec: {}

Fields

Required means required within the containing object. Optional and nullable are distinct; contextual defaults and requirements are explained with each field.

Unknown fields are rejected.

apiVersion

Required · string

API group and version defining this resource.

const: "k8s.gitops.nyl/v1"

kind

Required · string

Resource kind within the API group.

const: "AppProjectDefinition"

metadata

Required · object

Resource identity and metadata.

Unknown fields are rejected.

metadata.labels

Optional · object

Literal labels used for organization and target selection.

metadata.labels[key]

Optional · string

metadata.name

Required · string

Project-local identity, validated by the resource kind; remains static during discovery.

spec

Required · object

Configuration for this resource.

Unknown fields are rejected.

spec.management

Required · string

Whether Nyl emits the AppProject or validates against an externally managed project contract.

Allowed values:

ValueMeaning
"Rendered"Emit this AppProject into the target catalog.
"External"Use the project contract for validation without emitting or owning the AppProject.

spec.manifest

Required · any value

Argo CD argoproj.io/v1alpha1 AppProject manifest. Its metadata name supplies the Argo CD project identity.

spec.sourceRepositoryRefs

Optional · array

GitRepository names admitted as source repositories. Valid only for a Rendered project; duplicate names are rejected.

spec.sourceRepositoryRefs[]

Required · object

Unknown fields are rejected.

spec.sourceRepositoryRefs[].name

Required · string

Project-local name of the referenced resource; its kind and API group are determined by the containing field.