Last active
October 29, 2025 22:03
-
-
Save kjanat/556796a0a363a338ee9453a2613cfd53 to your computer and use it in GitHub Desktop.
Schema for ArgoCD Application Custom Resource Definition (BEWARE, AI GENERATED!!! Comment below if issues identified!) Based on: https://github.com/argoproj/argo-cd/blob/f5eaae7/docs/operator-manual/application.yaml. Refer to it using: https://gist.githubusercontent.com/kjanat/556796a0a363a338ee9453a2613cfd53/raw/argocd-application-schema.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "$schema": "http://json-schema.org/draft-07/schema#", | |
| "title": "ArgoCD Application", | |
| "description": "Schema for ArgoCD Application Custom Resource Definition", | |
| "type": "object", | |
| "required": ["apiVersion", "kind", "metadata", "spec"], | |
| "properties": { | |
| "apiVersion": { | |
| "type": "string", | |
| "const": "argoproj.io/v1alpha1", | |
| "description": "API version for ArgoCD Application" | |
| }, | |
| "kind": { | |
| "type": "string", | |
| "const": "Application", | |
| "description": "Resource kind" | |
| }, | |
| "metadata": { | |
| "type": "object", | |
| "required": ["name"], | |
| "properties": { | |
| "name": { "type": "string", "description": "Name of the application" }, | |
| "namespace": { | |
| "type": "string", | |
| "description": "Namespace for the application resource (usually argocd)" | |
| }, | |
| "finalizers": { | |
| "type": "array", | |
| "description": "Finalizers for cascade deletion behavior", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "resources-finalizer.argocd.argoproj.io", | |
| "resources-finalizer.argocd.argoproj.io/background" | |
| ] | |
| } | |
| }, | |
| "labels": { | |
| "type": "object", | |
| "description": "Labels to apply to the application", | |
| "additionalProperties": { "type": "string" } | |
| } | |
| } | |
| }, | |
| "spec": { | |
| "type": "object", | |
| "required": ["destination"], | |
| "properties": { | |
| "project": { | |
| "type": "string", | |
| "description": "The project the application belongs to", | |
| "default": "default" | |
| }, | |
| "source": { | |
| "$ref": "#/$defs/ApplicationSource", | |
| "description": "Source of the application manifests (single source)" | |
| }, | |
| "sources": { | |
| "type": "array", | |
| "description": "Multiple sources for the application (multi-source apps)", | |
| "items": { "$ref": "#/$defs/ApplicationSource" } | |
| }, | |
| "destination": { | |
| "type": "object", | |
| "description": "Destination cluster and namespace to deploy the application", | |
| "properties": { | |
| "server": { "type": "string", "description": "Cluster API URL" }, | |
| "name": { | |
| "type": "string", | |
| "description": "Cluster name (alternative to server)" | |
| }, | |
| "namespace": { | |
| "type": "string", | |
| "description": "Target namespace for deployment" | |
| } | |
| } | |
| }, | |
| "info": { | |
| "type": "array", | |
| "description": "Extra information to show in the Argo CD Application details tab", | |
| "items": { | |
| "type": "object", | |
| "required": ["name", "value"], | |
| "properties": { | |
| "name": { "type": "string" }, | |
| "value": { "type": "string" } | |
| } | |
| } | |
| }, | |
| "syncPolicy": { | |
| "type": "object", | |
| "description": "Sync policy configuration", | |
| "properties": { | |
| "automated": { | |
| "type": "object", | |
| "description": "Automated sync configuration", | |
| "properties": { | |
| "enabled": { | |
| "type": "boolean", | |
| "description": "Enables automated syncing", | |
| "default": true | |
| }, | |
| "prune": { | |
| "type": "boolean", | |
| "description": "Specifies if resources should be pruned during auto-syncing", | |
| "default": false | |
| }, | |
| "selfHeal": { | |
| "type": "boolean", | |
| "description": "Specifies if partial app sync should be executed when resources are changed only in target cluster", | |
| "default": false | |
| }, | |
| "allowEmpty": { | |
| "type": "boolean", | |
| "description": "Allows deleting all application resources during automatic syncing", | |
| "default": false | |
| } | |
| } | |
| }, | |
| "syncOptions": { | |
| "type": "array", | |
| "description": "Sync options which modify sync behavior", | |
| "items": { | |
| "type": "string", | |
| "examples": [ | |
| "Validate=false", | |
| "CreateNamespace=true", | |
| "PrunePropagationPolicy=foreground", | |
| "PruneLast=true", | |
| "RespectIgnoreDifferences=true", | |
| "ApplyOutOfSyncOnly=true", | |
| "SkipDryRunOnMissingResource=true", | |
| "Replace=true" | |
| ] | |
| } | |
| }, | |
| "managedNamespaceMetadata": { | |
| "type": "object", | |
| "description": "Sets the metadata for the application namespace (only valid if CreateNamespace=true)", | |
| "properties": { | |
| "labels": { | |
| "type": "object", | |
| "description": "Labels to set on the application namespace", | |
| "additionalProperties": { "type": "string" } | |
| }, | |
| "annotations": { | |
| "type": "object", | |
| "description": "Annotations to set on the application namespace", | |
| "additionalProperties": { "type": "string" } | |
| } | |
| } | |
| }, | |
| "retry": { | |
| "type": "object", | |
| "description": "Retry configuration for failed syncs", | |
| "properties": { | |
| "limit": { | |
| "type": "integer", | |
| "description": "Number of failed sync attempt retries; unlimited if less than 0", | |
| "default": 5 | |
| }, | |
| "backoff": { | |
| "type": "object", | |
| "properties": { | |
| "duration": { | |
| "type": "string", | |
| "description": "The amount to back off (e.g., '5s', '2m', '1h')", | |
| "default": "5s" | |
| }, | |
| "factor": { | |
| "type": "integer", | |
| "description": "A factor to multiply the base duration after each failed retry", | |
| "default": 2 | |
| }, | |
| "maxDuration": { | |
| "type": "string", | |
| "description": "The maximum amount of time allowed for the backoff strategy", | |
| "default": "3m" | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "ignoreDifferences": { | |
| "type": "array", | |
| "description": "Configurations to ignore differences between live and desired states", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "group": { | |
| "type": "string", | |
| "description": "Kubernetes API group" | |
| }, | |
| "kind": { | |
| "type": "string", | |
| "description": "Kubernetes resource kind" | |
| }, | |
| "name": { | |
| "type": "string", | |
| "description": "Resource name (optional, must match exactly if specified)" | |
| }, | |
| "namespace": { | |
| "type": "string", | |
| "description": "Resource namespace (optional, must match exactly if specified)" | |
| }, | |
| "jsonPointers": { | |
| "type": "array", | |
| "description": "JSON pointers to ignore", | |
| "items": { "type": "string" } | |
| }, | |
| "jqPathExpressions": { | |
| "type": "array", | |
| "description": "JQ path expressions to ignore", | |
| "items": { "type": "string" } | |
| }, | |
| "managedFieldsManagers": { | |
| "type": "array", | |
| "description": "Managed fields managers to ignore", | |
| "items": { "type": "string" } | |
| } | |
| } | |
| } | |
| }, | |
| "revisionHistoryLimit": { | |
| "type": "integer", | |
| "description": "Limits the number of items kept in the application's revision history", | |
| "default": 10 | |
| } | |
| } | |
| } | |
| }, | |
| "$defs": { | |
| "ApplicationSource": { | |
| "type": "object", | |
| "required": ["repoURL"], | |
| "properties": { | |
| "repoURL": { | |
| "type": "string", | |
| "description": "Repository URL (can point to either a Helm chart repo or a git repo)" | |
| }, | |
| "targetRevision": { | |
| "type": "string", | |
| "description": "Target revision (branch, tag, commit SHA). For Helm, this refers to the chart version" | |
| }, | |
| "path": { | |
| "type": "string", | |
| "description": "Path within the repository (no meaning for Helm charts pulled directly from a Helm repo)" | |
| }, | |
| "chart": { | |
| "type": "string", | |
| "description": "Helm chart name (set this when pulling directly from a Helm repo)" | |
| }, | |
| "ref": { | |
| "type": "string", | |
| "description": "Reference name for this source (used in multi-source apps)" | |
| }, | |
| "name": { | |
| "type": "string", | |
| "description": "Optional source name (can be used instead of position in multi-source apps)" | |
| }, | |
| "helm": { "$ref": "#/$defs/HelmConfig" }, | |
| "kustomize": { "$ref": "#/$defs/KustomizeConfig" }, | |
| "directory": { "$ref": "#/$defs/DirectoryConfig" }, | |
| "plugin": { "$ref": "#/$defs/PluginConfig" } | |
| } | |
| }, | |
| "HelmConfig": { | |
| "type": "object", | |
| "description": "Helm-specific configuration", | |
| "properties": { | |
| "passCredentials": { | |
| "type": "boolean", | |
| "description": "If true, adds --pass-credentials to Helm commands", | |
| "default": false | |
| }, | |
| "parameters": { | |
| "type": "array", | |
| "description": "Extra parameters to set (same as values.yaml, but these take precedence)", | |
| "items": { | |
| "type": "object", | |
| "required": ["name"], | |
| "properties": { | |
| "name": { "type": "string" }, | |
| "value": { "type": "string" }, | |
| "forceString": { | |
| "type": "boolean", | |
| "description": "Ensures that value is treated as a string" | |
| } | |
| } | |
| } | |
| }, | |
| "fileParameters": { | |
| "type": "array", | |
| "description": "Use the contents of files as parameters (uses Helm's --set-file)", | |
| "items": { | |
| "type": "object", | |
| "required": ["name", "path"], | |
| "properties": { | |
| "name": { "type": "string" }, | |
| "path": { "type": "string" } | |
| } | |
| } | |
| }, | |
| "releaseName": { | |
| "type": "string", | |
| "description": "Helm release name (defaults to application name)" | |
| }, | |
| "valueFiles": { | |
| "type": "array", | |
| "description": "Helm values files for overriding values", | |
| "items": { "type": "string" } | |
| }, | |
| "ignoreMissingValueFiles": { | |
| "type": "boolean", | |
| "description": "Ignore locally missing valueFiles when installing Helm chart", | |
| "default": false | |
| }, | |
| "values": { | |
| "type": "string", | |
| "description": "Values file as block text (prefer valuesObject if possible)" | |
| }, | |
| "valuesObject": { | |
| "type": "object", | |
| "description": "Values as object (takes precedence over values)", | |
| "additionalProperties": true | |
| }, | |
| "skipCrds": { | |
| "type": "boolean", | |
| "description": "Skip custom resource definition installation", | |
| "default": false | |
| }, | |
| "skipSchemaValidation": { | |
| "type": "boolean", | |
| "description": "Skip schema validation if chart contains JSON schema validation", | |
| "default": false | |
| }, | |
| "version": { | |
| "type": "string", | |
| "description": "Optional Helm version to template with", | |
| "enum": ["v2", "v3"] | |
| }, | |
| "kubeVersion": { | |
| "type": "string", | |
| "description": "Kubernetes API version to pass to Helm (semver format, no 'v' prefix)" | |
| }, | |
| "apiVersions": { | |
| "type": "array", | |
| "description": "Kubernetes resource API versions to pass to Helm (format: [group/]version/kind)", | |
| "items": { "type": "string" } | |
| }, | |
| "namespace": { | |
| "type": "string", | |
| "description": "Optional namespace to template with" | |
| } | |
| } | |
| }, | |
| "KustomizeConfig": { | |
| "type": "object", | |
| "description": "Kustomize-specific configuration", | |
| "properties": { | |
| "version": { | |
| "type": "string", | |
| "description": "Optional kustomize version" | |
| }, | |
| "namePrefix": { | |
| "type": "string", | |
| "description": "Prefix to add to all resource names" | |
| }, | |
| "nameSuffix": { | |
| "type": "string", | |
| "description": "Suffix to add to all resource names" | |
| }, | |
| "commonLabels": { | |
| "type": "object", | |
| "description": "Common labels to add to all resources", | |
| "additionalProperties": { "type": "string" } | |
| }, | |
| "commonAnnotations": { | |
| "type": "object", | |
| "description": "Common annotations to add to all resources", | |
| "additionalProperties": { "type": "string" } | |
| }, | |
| "commonAnnotationsEnvsubst": { | |
| "type": "boolean", | |
| "description": "Enable environment variable substitution in commonAnnotations", | |
| "default": false | |
| }, | |
| "labelWithoutSelector": { | |
| "type": "boolean", | |
| "description": "If true, common labels should be applied to resource selectors", | |
| "default": false | |
| }, | |
| "labelIncludeTemplates": { | |
| "type": "boolean", | |
| "description": "If true, common labels should be applied to resource templates", | |
| "default": false | |
| }, | |
| "forceCommonLabels": { "type": "boolean", "default": false }, | |
| "forceCommonAnnotations": { "type": "boolean", "default": false }, | |
| "images": { | |
| "type": "array", | |
| "description": "Image transformers", | |
| "items": { "type": "string" } | |
| }, | |
| "namespace": { | |
| "type": "string", | |
| "description": "Namespace to set for all resources" | |
| }, | |
| "replicas": { | |
| "type": "array", | |
| "description": "Replica count overrides", | |
| "items": { | |
| "type": "object", | |
| "required": ["name", "count"], | |
| "properties": { | |
| "name": { "type": "string" }, | |
| "count": { "type": "integer" } | |
| } | |
| } | |
| }, | |
| "components": { | |
| "type": "array", | |
| "description": "Kustomize components to include", | |
| "items": { "type": "string" } | |
| }, | |
| "ignoreMissingComponents": { | |
| "type": "boolean", | |
| "description": "Ignore locally missing component directories", | |
| "default": false | |
| }, | |
| "patches": { | |
| "type": "array", | |
| "description": "Strategic merge patches and JSON patches", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "target": { | |
| "type": "object", | |
| "properties": { | |
| "kind": { "type": "string" }, | |
| "name": { "type": "string" }, | |
| "namespace": { "type": "string" }, | |
| "group": { "type": "string" }, | |
| "version": { "type": "string" } | |
| } | |
| }, | |
| "patch": { | |
| "type": "string", | |
| "description": "Patch content (YAML or JSON)" | |
| }, | |
| "path": { "type": "string", "description": "Path to patch file" } | |
| } | |
| } | |
| }, | |
| "kubeVersion": { | |
| "type": "string", | |
| "description": "Kubernetes API version to use (semver format, no 'v' prefix)" | |
| }, | |
| "apiVersions": { | |
| "type": "array", | |
| "description": "Kubernetes resource API versions (format: [group/]version/kind)", | |
| "items": { "type": "string" } | |
| } | |
| } | |
| }, | |
| "DirectoryConfig": { | |
| "type": "object", | |
| "description": "Directory-specific configuration", | |
| "properties": { | |
| "recurse": { | |
| "type": "boolean", | |
| "description": "Recurse into subdirectories", | |
| "default": false | |
| }, | |
| "jsonnet": { | |
| "type": "object", | |
| "description": "Jsonnet configuration", | |
| "properties": { | |
| "extVars": { | |
| "type": "array", | |
| "description": "List of Jsonnet External Variables", | |
| "items": { | |
| "type": "object", | |
| "required": ["name", "value"], | |
| "properties": { | |
| "name": { "type": "string" }, | |
| "value": { "type": "string" }, | |
| "code": { | |
| "type": "boolean", | |
| "description": "If true, value is Jsonnet code; otherwise it's a string", | |
| "default": false | |
| } | |
| } | |
| } | |
| }, | |
| "tlas": { | |
| "type": "array", | |
| "description": "List of Jsonnet Top-level Arguments", | |
| "items": { | |
| "type": "object", | |
| "required": ["name", "value"], | |
| "properties": { | |
| "name": { "type": "string" }, | |
| "value": { "type": "string" }, | |
| "code": { "type": "boolean", "default": false } | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "exclude": { | |
| "type": "string", | |
| "description": "Glob pattern to exclude files from manifest generation" | |
| }, | |
| "include": { | |
| "type": "string", | |
| "description": "Glob pattern to include only specific files" | |
| } | |
| } | |
| }, | |
| "PluginConfig": { | |
| "type": "object", | |
| "description": "Plugin-specific configuration", | |
| "properties": { | |
| "name": { "type": "string", "description": "Plugin name" }, | |
| "env": { | |
| "type": "array", | |
| "description": "Environment variables passed to the plugin", | |
| "items": { | |
| "type": "object", | |
| "required": ["name", "value"], | |
| "properties": { | |
| "name": { "type": "string" }, | |
| "value": { "type": "string" } | |
| } | |
| } | |
| }, | |
| "parameters": { | |
| "type": "array", | |
| "description": "Plugin parameters", | |
| "items": { | |
| "type": "object", | |
| "required": ["name"], | |
| "properties": { | |
| "name": { "type": "string" }, | |
| "string": { "type": "string" }, | |
| "array": { "type": "array", "items": { "type": "string" } }, | |
| "map": { | |
| "type": "object", | |
| "additionalProperties": { "type": "string" } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment