mirror of
https://github.com/argoproj/argo-cd
synced 2026-04-21 17:07:16 +00:00
chore: add the Argo CD type definitions and method comments (#21854)
Signed-off-by: nitishfy <justnitish06@gmail.com>
This commit is contained in:
parent
f78c7ee2ba
commit
944f9f7b68
10 changed files with 550 additions and 221 deletions
102
assets/swagger.json
generated
102
assets/swagger.json
generated
|
|
@ -5079,41 +5079,51 @@
|
|||
}
|
||||
},
|
||||
"applicationv1alpha1ResourceStatus": {
|
||||
"description": "ResourceStatus holds the current synchronization and health status of a Kubernetes resource.",
|
||||
"type": "object",
|
||||
"title": "ResourceStatus holds the current sync and health status of a resource\nTODO: describe members of this type",
|
||||
"properties": {
|
||||
"group": {
|
||||
"description": "Group represents the API group of the resource (e.g., \"apps\" for Deployments).",
|
||||
"type": "string"
|
||||
},
|
||||
"health": {
|
||||
"$ref": "#/definitions/v1alpha1HealthStatus"
|
||||
},
|
||||
"hook": {
|
||||
"description": "Hook is true if the resource is used as a lifecycle hook in an Argo CD application.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"kind": {
|
||||
"description": "Kind specifies the type of the resource (e.g., \"Deployment\", \"Service\").",
|
||||
"type": "string"
|
||||
},
|
||||
"name": {
|
||||
"description": "Name is the unique name of the resource within the namespace.",
|
||||
"type": "string"
|
||||
},
|
||||
"namespace": {
|
||||
"description": "Namespace defines the Kubernetes namespace where the resource is located.",
|
||||
"type": "string"
|
||||
},
|
||||
"requiresDeletionConfirmation": {
|
||||
"description": "RequiresDeletionConfirmation is true if the resource requires explicit user confirmation before deletion.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"requiresPruning": {
|
||||
"description": "RequiresPruning is true if the resource needs to be pruned (deleted) as part of synchronization.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"status": {
|
||||
"description": "Status represents the synchronization state of the resource (e.g., Synced, OutOfSync).",
|
||||
"type": "string"
|
||||
},
|
||||
"syncWave": {
|
||||
"description": "SyncWave determines the order in which resources are applied during a sync operation.\nLower values are applied first.",
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
},
|
||||
"version": {
|
||||
"description": "Version indicates the API version of the resource (e.g., \"v1\", \"v1beta1\").",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
|
|
@ -7510,34 +7520,34 @@
|
|||
}
|
||||
},
|
||||
"v1alpha1ApplicationTree": {
|
||||
"description": "ApplicationTree represents the hierarchical structure of resources associated with an Argo CD application.",
|
||||
"type": "object",
|
||||
"title": "ApplicationTree holds nodes which belongs to the application\nTODO: describe purpose of this type",
|
||||
"properties": {
|
||||
"hosts": {
|
||||
"description": "Hosts provides a list of Kubernetes nodes that are running pods related to the application.",
|
||||
"type": "array",
|
||||
"title": "Hosts holds list of Kubernetes nodes that run application related pods",
|
||||
"items": {
|
||||
"$ref": "#/definitions/v1alpha1HostInfo"
|
||||
}
|
||||
},
|
||||
"nodes": {
|
||||
"description": "Nodes contains list of nodes which either directly managed by the application and children of directly managed nodes.",
|
||||
"description": "Nodes contains a list of resources that are either directly managed by the application\nor are children of directly managed resources.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/v1alpha1ResourceNode"
|
||||
}
|
||||
},
|
||||
"orphanedNodes": {
|
||||
"description": "OrphanedNodes contains if or orphaned nodes: nodes which are not managed by the app but in the same namespace. List is populated only if orphaned resources enabled in app project.",
|
||||
"description": "OrphanedNodes contains resources that exist in the same namespace as the application\nbut are not managed by it. This list is populated only if orphaned resource tracking\nis enabled in the application's project settings.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/v1alpha1ResourceNode"
|
||||
}
|
||||
},
|
||||
"shardsCount": {
|
||||
"description": "ShardsCount represents the total number of shards the application tree is split into.\nThis is used to distribute resource processing across multiple shards.",
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"title": "ShardsCount contains total number of shards the application tree is split into"
|
||||
"format": "int64"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
@ -8131,13 +8141,15 @@
|
|||
}
|
||||
},
|
||||
"v1alpha1HostInfo": {
|
||||
"description": "HostInfo holds metadata and resource usage metrics for a specific host in the cluster.",
|
||||
"type": "object",
|
||||
"title": "HostInfo holds host name and resources metrics\nTODO: describe purpose of this type\nTODO: describe members of this type",
|
||||
"properties": {
|
||||
"name": {
|
||||
"description": "Name is the hostname or node name in the Kubernetes cluster.",
|
||||
"type": "string"
|
||||
},
|
||||
"resourcesInfo": {
|
||||
"description": "ResourcesInfo provides a list of resource usage details for different resource types on this host.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/v1alpha1HostResourceInfo"
|
||||
|
|
@ -8149,22 +8161,26 @@
|
|||
}
|
||||
},
|
||||
"v1alpha1HostResourceInfo": {
|
||||
"description": "HostResourceInfo represents resource usage details for a specific resource type on a host.",
|
||||
"type": "object",
|
||||
"title": "TODO: describe this type",
|
||||
"properties": {
|
||||
"capacity": {
|
||||
"description": "Capacity represents the total available capacity of this resource on the host.",
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
},
|
||||
"requestedByApp": {
|
||||
"description": "RequestedByApp indicates the total amount of this resource requested by the application running on the host.",
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
},
|
||||
"requestedByNeighbors": {
|
||||
"description": "RequestedByNeighbors indicates the total amount of this resource requested by other workloads on the same host.",
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
},
|
||||
"resourceName": {
|
||||
"description": "ResourceName specifies the type of resource (e.g., CPU, memory, storage).",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
|
|
@ -8280,13 +8296,15 @@
|
|||
}
|
||||
},
|
||||
"v1alpha1KnownTypeField": {
|
||||
"description": "KnownTypeField contains a mapping between a Custom Resource Definition (CRD) field\nand a well-known Kubernetes type. This mapping is primarily used for unit conversions\nin resources where the type is not explicitly defined (e.g., converting \"0.1\" to \"100m\" for CPU requests).",
|
||||
"type": "object",
|
||||
"title": "KnownTypeField contains mapping between CRD field and known Kubernetes type.\nThis is mainly used for unit conversion in unknown resources (e.g. 0.1 == 100mi)\nTODO: Describe the members of this type",
|
||||
"properties": {
|
||||
"field": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"title": "Field represents the JSON path to the specific field in the CRD that requires type conversion.\nExample: \"spec.resources.requests.cpu\""
|
||||
},
|
||||
"type": {
|
||||
"description": "Type specifies the expected Kubernetes type for the field, such as \"cpu\" or \"memory\".\nThis helps in converting values between different formats (e.g., \"0.1\" to \"100m\" for CPU).",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
|
|
@ -9143,22 +9161,27 @@
|
|||
}
|
||||
},
|
||||
"v1alpha1ResourceAction": {
|
||||
"description": "ResourceAction represents an individual action that can be performed on a resource.\nIt includes parameters, an optional disabled flag, an icon for display, and a name for the action.",
|
||||
"type": "object",
|
||||
"title": "TODO: describe this type\nTODO: describe members of this type",
|
||||
"properties": {
|
||||
"disabled": {
|
||||
"description": "Disabled indicates whether the action is disabled.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"displayName": {
|
||||
"description": "DisplayName provides a user-friendly name for the action.",
|
||||
"type": "string"
|
||||
},
|
||||
"iconClass": {
|
||||
"description": "IconClass specifies the CSS class for the action's icon.",
|
||||
"type": "string"
|
||||
},
|
||||
"name": {
|
||||
"description": "Name is the name or identifier for the action.",
|
||||
"type": "string"
|
||||
},
|
||||
"params": {
|
||||
"description": "Params contains the parameters required to execute the action.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/v1alpha1ResourceActionParam"
|
||||
|
|
@ -9167,67 +9190,78 @@
|
|||
}
|
||||
},
|
||||
"v1alpha1ResourceActionParam": {
|
||||
"description": "ResourceActionParam represents a parameter for a resource action.\nIt includes a name, value, type, and an optional default value for the parameter.",
|
||||
"type": "object",
|
||||
"title": "TODO: describe this type\nTODO: describe members of this type",
|
||||
"properties": {
|
||||
"default": {
|
||||
"description": "Default is the default value of the parameter, if any.",
|
||||
"type": "string"
|
||||
},
|
||||
"name": {
|
||||
"description": "Name is the name of the parameter.",
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"description": "Type is the type of the parameter (e.g., string, integer).",
|
||||
"type": "string"
|
||||
},
|
||||
"value": {
|
||||
"description": "Value is the value of the parameter.",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"v1alpha1ResourceDiff": {
|
||||
"description": "ResourceDiff holds the diff between a live and target resource object in Argo CD.\nIt is used to compare the desired state (from Git/Helm) with the actual state in the cluster.",
|
||||
"type": "object",
|
||||
"title": "ResourceDiff holds the diff of a live and target resource object\nTODO: describe members of this type",
|
||||
"properties": {
|
||||
"diff": {
|
||||
"type": "string",
|
||||
"title": "Diff contains the JSON patch between target and live resource\nDeprecated: use NormalizedLiveState and PredictedLiveState to render the difference"
|
||||
"description": "Diff contains the JSON patch representing the difference between the live and target resource.\nDeprecated: Use NormalizedLiveState and PredictedLiveState instead to compute differences.",
|
||||
"type": "string"
|
||||
},
|
||||
"group": {
|
||||
"description": "Group represents the API group of the resource (e.g., \"apps\" for Deployments).",
|
||||
"type": "string"
|
||||
},
|
||||
"hook": {
|
||||
"description": "Hook indicates whether this resource is a hook resource (e.g., pre-sync or post-sync hooks).",
|
||||
"type": "boolean"
|
||||
},
|
||||
"kind": {
|
||||
"description": "Kind represents the Kubernetes resource kind (e.g., \"Deployment\", \"Service\").",
|
||||
"type": "string"
|
||||
},
|
||||
"liveState": {
|
||||
"type": "string",
|
||||
"title": "TargetState contains the JSON live resource manifest"
|
||||
"description": "LiveState contains the JSON-serialized resource manifest of the resource currently running in the cluster.",
|
||||
"type": "string"
|
||||
},
|
||||
"modified": {
|
||||
"description": "Modified indicates whether the live resource has changes compared to the target resource.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"name": {
|
||||
"description": "Name is the name of the resource.",
|
||||
"type": "string"
|
||||
},
|
||||
"namespace": {
|
||||
"description": "Namespace specifies the namespace where the resource exists.",
|
||||
"type": "string"
|
||||
},
|
||||
"normalizedLiveState": {
|
||||
"type": "string",
|
||||
"title": "NormalizedLiveState contains JSON serialized live resource state with applied normalizations"
|
||||
"description": "NormalizedLiveState contains the JSON-serialized live resource state after applying normalizations.\nNormalizations may include ignoring irrelevant fields like timestamps or defaults applied by Kubernetes.",
|
||||
"type": "string"
|
||||
},
|
||||
"predictedLiveState": {
|
||||
"type": "string",
|
||||
"title": "PredictedLiveState contains JSON serialized resource state that is calculated based on normalized and target resource state"
|
||||
"description": "PredictedLiveState contains the JSON-serialized resource state that Argo CD predicts based on the\ncombination of the normalized live state and the desired target state.",
|
||||
"type": "string"
|
||||
},
|
||||
"resourceVersion": {
|
||||
"description": "ResourceVersion is the Kubernetes resource version, which helps in tracking changes.",
|
||||
"type": "string"
|
||||
},
|
||||
"targetState": {
|
||||
"type": "string",
|
||||
"title": "TargetState contains the JSON serialized resource manifest defined in the Git/Helm"
|
||||
"description": "TargetState contains the JSON-serialized resource manifest as defined in the Git/Helm repository.",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
@ -9269,35 +9303,39 @@
|
|||
}
|
||||
},
|
||||
"v1alpha1ResourceNetworkingInfo": {
|
||||
"description": "ResourceNetworkingInfo holds networking-related information for a resource.",
|
||||
"type": "object",
|
||||
"title": "ResourceNetworkingInfo holds networking resource related information\nTODO: describe members of this type",
|
||||
"properties": {
|
||||
"externalURLs": {
|
||||
"description": "ExternalURLs holds list of URLs which should be available externally. List is populated for ingress resources using rules hostnames.",
|
||||
"description": "ExternalURLs holds a list of URLs that should be accessible externally.\nThis field is typically populated for Ingress resources based on their hostname rules.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"ingress": {
|
||||
"description": "Ingress provides information about external access points (e.g., load balancer ingress) for this resource.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/v1LoadBalancerIngress"
|
||||
}
|
||||
},
|
||||
"labels": {
|
||||
"description": "Labels holds the labels associated with this networking resource.",
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"targetLabels": {
|
||||
"description": "TargetLabels represents labels associated with the target resources that this resource communicates with.",
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"targetRefs": {
|
||||
"description": "TargetRefs contains references to other resources that this resource interacts with, such as Services or Pods.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/v1alpha1ResourceRef"
|
||||
|
|
@ -9306,8 +9344,8 @@
|
|||
}
|
||||
},
|
||||
"v1alpha1ResourceNode": {
|
||||
"description": "ResourceNode contains information about a live Kubernetes resource and its relationships with other resources.",
|
||||
"type": "object",
|
||||
"title": "ResourceNode contains information about live resource and its children\nTODO: describe members of this type",
|
||||
"properties": {
|
||||
"createdAt": {
|
||||
"$ref": "#/definitions/v1Time"
|
||||
|
|
@ -9316,12 +9354,14 @@
|
|||
"$ref": "#/definitions/v1alpha1HealthStatus"
|
||||
},
|
||||
"images": {
|
||||
"description": "Images lists container images associated with the resource.\nThis is primarily useful for pods and other workload resources.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"info": {
|
||||
"description": "Info provides additional metadata or annotations about the resource.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/v1alpha1InfoItem"
|
||||
|
|
@ -9331,12 +9371,14 @@
|
|||
"$ref": "#/definitions/v1alpha1ResourceNetworkingInfo"
|
||||
},
|
||||
"parentRefs": {
|
||||
"description": "ParentRefs lists the parent resources that reference this resource.\nThis helps in understanding ownership and hierarchical relationships.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/v1alpha1ResourceRef"
|
||||
}
|
||||
},
|
||||
"resourceVersion": {
|
||||
"description": "ResourceVersion indicates the version of the resource, used to track changes.",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
|
|
@ -9348,12 +9390,14 @@
|
|||
},
|
||||
"v1alpha1ResourceOverride": {
|
||||
"type": "object",
|
||||
"title": "ResourceOverride holds configuration to customize resource diffing and health assessment\nTODO: describe the members of this type",
|
||||
"title": "ResourceOverride holds configuration to customize resource diffing and health assessment",
|
||||
"properties": {
|
||||
"actions": {
|
||||
"description": "Actions defines the set of actions that can be performed on the resource, as a Lua script.",
|
||||
"type": "string"
|
||||
},
|
||||
"healthLua": {
|
||||
"description": "HealthLua contains a Lua script that defines custom health checks for the resource.",
|
||||
"type": "string"
|
||||
},
|
||||
"ignoreDifferences": {
|
||||
|
|
@ -9363,12 +9407,14 @@
|
|||
"$ref": "#/definitions/v1alpha1OverrideIgnoreDiff"
|
||||
},
|
||||
"knownTypeFields": {
|
||||
"description": "KnownTypeFields lists fields for which unit conversions should be applied.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/v1alpha1KnownTypeField"
|
||||
}
|
||||
},
|
||||
"useOpenLibs": {
|
||||
"description": "UseOpenLibs indicates whether to use open-source libraries for the resource.",
|
||||
"type": "boolean"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
32
manifests/core-install-with-hydrator.yaml
generated
32
manifests/core-install-with-hydrator.yaml
generated
|
|
@ -4680,15 +4680,16 @@ spec:
|
|||
description: Resources is a list of Kubernetes resources managed by
|
||||
this application
|
||||
items:
|
||||
description: |-
|
||||
ResourceStatus holds the current sync and health status of a resource
|
||||
TODO: describe members of this type
|
||||
description: ResourceStatus holds the current synchronization and
|
||||
health status of a Kubernetes resource.
|
||||
properties:
|
||||
group:
|
||||
description: Group represents the API group of the resource
|
||||
(e.g., "apps" for Deployments).
|
||||
type: string
|
||||
health:
|
||||
description: HealthStatus contains information about the currently
|
||||
observed health state of an application or resource
|
||||
description: Health indicates the health status of the resource
|
||||
(e.g., Healthy, Degraded, Progressing).
|
||||
properties:
|
||||
lastTransitionTime:
|
||||
description: LastTransitionTime is the time the HealthStatus
|
||||
|
|
@ -4705,25 +4706,42 @@ spec:
|
|||
type: string
|
||||
type: object
|
||||
hook:
|
||||
description: Hook is true if the resource is used as a lifecycle
|
||||
hook in an Argo CD application.
|
||||
type: boolean
|
||||
kind:
|
||||
description: Kind specifies the type of the resource (e.g.,
|
||||
"Deployment", "Service").
|
||||
type: string
|
||||
name:
|
||||
description: Name is the unique name of the resource within
|
||||
the namespace.
|
||||
type: string
|
||||
namespace:
|
||||
description: Namespace defines the Kubernetes namespace where
|
||||
the resource is located.
|
||||
type: string
|
||||
requiresDeletionConfirmation:
|
||||
description: RequiresDeletionConfirmation is true if the resource
|
||||
requires explicit user confirmation before deletion.
|
||||
type: boolean
|
||||
requiresPruning:
|
||||
description: RequiresPruning is true if the resource needs to
|
||||
be pruned (deleted) as part of synchronization.
|
||||
type: boolean
|
||||
status:
|
||||
description: SyncStatusCode is a type which represents possible
|
||||
comparison results
|
||||
description: Status represents the synchronization state of
|
||||
the resource (e.g., Synced, OutOfSync).
|
||||
type: string
|
||||
syncWave:
|
||||
description: |-
|
||||
SyncWave determines the order in which resources are applied during a sync operation.
|
||||
Lower values are applied first.
|
||||
format: int64
|
||||
type: integer
|
||||
version:
|
||||
description: Version indicates the API version of the resource
|
||||
(e.g., "v1", "v1beta1").
|
||||
type: string
|
||||
type: object
|
||||
type: array
|
||||
|
|
|
|||
32
manifests/core-install.yaml
generated
32
manifests/core-install.yaml
generated
|
|
@ -4680,15 +4680,16 @@ spec:
|
|||
description: Resources is a list of Kubernetes resources managed by
|
||||
this application
|
||||
items:
|
||||
description: |-
|
||||
ResourceStatus holds the current sync and health status of a resource
|
||||
TODO: describe members of this type
|
||||
description: ResourceStatus holds the current synchronization and
|
||||
health status of a Kubernetes resource.
|
||||
properties:
|
||||
group:
|
||||
description: Group represents the API group of the resource
|
||||
(e.g., "apps" for Deployments).
|
||||
type: string
|
||||
health:
|
||||
description: HealthStatus contains information about the currently
|
||||
observed health state of an application or resource
|
||||
description: Health indicates the health status of the resource
|
||||
(e.g., Healthy, Degraded, Progressing).
|
||||
properties:
|
||||
lastTransitionTime:
|
||||
description: LastTransitionTime is the time the HealthStatus
|
||||
|
|
@ -4705,25 +4706,42 @@ spec:
|
|||
type: string
|
||||
type: object
|
||||
hook:
|
||||
description: Hook is true if the resource is used as a lifecycle
|
||||
hook in an Argo CD application.
|
||||
type: boolean
|
||||
kind:
|
||||
description: Kind specifies the type of the resource (e.g.,
|
||||
"Deployment", "Service").
|
||||
type: string
|
||||
name:
|
||||
description: Name is the unique name of the resource within
|
||||
the namespace.
|
||||
type: string
|
||||
namespace:
|
||||
description: Namespace defines the Kubernetes namespace where
|
||||
the resource is located.
|
||||
type: string
|
||||
requiresDeletionConfirmation:
|
||||
description: RequiresDeletionConfirmation is true if the resource
|
||||
requires explicit user confirmation before deletion.
|
||||
type: boolean
|
||||
requiresPruning:
|
||||
description: RequiresPruning is true if the resource needs to
|
||||
be pruned (deleted) as part of synchronization.
|
||||
type: boolean
|
||||
status:
|
||||
description: SyncStatusCode is a type which represents possible
|
||||
comparison results
|
||||
description: Status represents the synchronization state of
|
||||
the resource (e.g., Synced, OutOfSync).
|
||||
type: string
|
||||
syncWave:
|
||||
description: |-
|
||||
SyncWave determines the order in which resources are applied during a sync operation.
|
||||
Lower values are applied first.
|
||||
format: int64
|
||||
type: integer
|
||||
version:
|
||||
description: Version indicates the API version of the resource
|
||||
(e.g., "v1", "v1beta1").
|
||||
type: string
|
||||
type: object
|
||||
type: array
|
||||
|
|
|
|||
32
manifests/crds/application-crd.yaml
generated
32
manifests/crds/application-crd.yaml
generated
|
|
@ -4679,15 +4679,16 @@ spec:
|
|||
description: Resources is a list of Kubernetes resources managed by
|
||||
this application
|
||||
items:
|
||||
description: |-
|
||||
ResourceStatus holds the current sync and health status of a resource
|
||||
TODO: describe members of this type
|
||||
description: ResourceStatus holds the current synchronization and
|
||||
health status of a Kubernetes resource.
|
||||
properties:
|
||||
group:
|
||||
description: Group represents the API group of the resource
|
||||
(e.g., "apps" for Deployments).
|
||||
type: string
|
||||
health:
|
||||
description: HealthStatus contains information about the currently
|
||||
observed health state of an application or resource
|
||||
description: Health indicates the health status of the resource
|
||||
(e.g., Healthy, Degraded, Progressing).
|
||||
properties:
|
||||
lastTransitionTime:
|
||||
description: LastTransitionTime is the time the HealthStatus
|
||||
|
|
@ -4704,25 +4705,42 @@ spec:
|
|||
type: string
|
||||
type: object
|
||||
hook:
|
||||
description: Hook is true if the resource is used as a lifecycle
|
||||
hook in an Argo CD application.
|
||||
type: boolean
|
||||
kind:
|
||||
description: Kind specifies the type of the resource (e.g.,
|
||||
"Deployment", "Service").
|
||||
type: string
|
||||
name:
|
||||
description: Name is the unique name of the resource within
|
||||
the namespace.
|
||||
type: string
|
||||
namespace:
|
||||
description: Namespace defines the Kubernetes namespace where
|
||||
the resource is located.
|
||||
type: string
|
||||
requiresDeletionConfirmation:
|
||||
description: RequiresDeletionConfirmation is true if the resource
|
||||
requires explicit user confirmation before deletion.
|
||||
type: boolean
|
||||
requiresPruning:
|
||||
description: RequiresPruning is true if the resource needs to
|
||||
be pruned (deleted) as part of synchronization.
|
||||
type: boolean
|
||||
status:
|
||||
description: SyncStatusCode is a type which represents possible
|
||||
comparison results
|
||||
description: Status represents the synchronization state of
|
||||
the resource (e.g., Synced, OutOfSync).
|
||||
type: string
|
||||
syncWave:
|
||||
description: |-
|
||||
SyncWave determines the order in which resources are applied during a sync operation.
|
||||
Lower values are applied first.
|
||||
format: int64
|
||||
type: integer
|
||||
version:
|
||||
description: Version indicates the API version of the resource
|
||||
(e.g., "v1", "v1beta1").
|
||||
type: string
|
||||
type: object
|
||||
type: array
|
||||
|
|
|
|||
32
manifests/ha/install-with-hydrator.yaml
generated
32
manifests/ha/install-with-hydrator.yaml
generated
|
|
@ -4680,15 +4680,16 @@ spec:
|
|||
description: Resources is a list of Kubernetes resources managed by
|
||||
this application
|
||||
items:
|
||||
description: |-
|
||||
ResourceStatus holds the current sync and health status of a resource
|
||||
TODO: describe members of this type
|
||||
description: ResourceStatus holds the current synchronization and
|
||||
health status of a Kubernetes resource.
|
||||
properties:
|
||||
group:
|
||||
description: Group represents the API group of the resource
|
||||
(e.g., "apps" for Deployments).
|
||||
type: string
|
||||
health:
|
||||
description: HealthStatus contains information about the currently
|
||||
observed health state of an application or resource
|
||||
description: Health indicates the health status of the resource
|
||||
(e.g., Healthy, Degraded, Progressing).
|
||||
properties:
|
||||
lastTransitionTime:
|
||||
description: LastTransitionTime is the time the HealthStatus
|
||||
|
|
@ -4705,25 +4706,42 @@ spec:
|
|||
type: string
|
||||
type: object
|
||||
hook:
|
||||
description: Hook is true if the resource is used as a lifecycle
|
||||
hook in an Argo CD application.
|
||||
type: boolean
|
||||
kind:
|
||||
description: Kind specifies the type of the resource (e.g.,
|
||||
"Deployment", "Service").
|
||||
type: string
|
||||
name:
|
||||
description: Name is the unique name of the resource within
|
||||
the namespace.
|
||||
type: string
|
||||
namespace:
|
||||
description: Namespace defines the Kubernetes namespace where
|
||||
the resource is located.
|
||||
type: string
|
||||
requiresDeletionConfirmation:
|
||||
description: RequiresDeletionConfirmation is true if the resource
|
||||
requires explicit user confirmation before deletion.
|
||||
type: boolean
|
||||
requiresPruning:
|
||||
description: RequiresPruning is true if the resource needs to
|
||||
be pruned (deleted) as part of synchronization.
|
||||
type: boolean
|
||||
status:
|
||||
description: SyncStatusCode is a type which represents possible
|
||||
comparison results
|
||||
description: Status represents the synchronization state of
|
||||
the resource (e.g., Synced, OutOfSync).
|
||||
type: string
|
||||
syncWave:
|
||||
description: |-
|
||||
SyncWave determines the order in which resources are applied during a sync operation.
|
||||
Lower values are applied first.
|
||||
format: int64
|
||||
type: integer
|
||||
version:
|
||||
description: Version indicates the API version of the resource
|
||||
(e.g., "v1", "v1beta1").
|
||||
type: string
|
||||
type: object
|
||||
type: array
|
||||
|
|
|
|||
32
manifests/ha/install.yaml
generated
32
manifests/ha/install.yaml
generated
|
|
@ -4680,15 +4680,16 @@ spec:
|
|||
description: Resources is a list of Kubernetes resources managed by
|
||||
this application
|
||||
items:
|
||||
description: |-
|
||||
ResourceStatus holds the current sync and health status of a resource
|
||||
TODO: describe members of this type
|
||||
description: ResourceStatus holds the current synchronization and
|
||||
health status of a Kubernetes resource.
|
||||
properties:
|
||||
group:
|
||||
description: Group represents the API group of the resource
|
||||
(e.g., "apps" for Deployments).
|
||||
type: string
|
||||
health:
|
||||
description: HealthStatus contains information about the currently
|
||||
observed health state of an application or resource
|
||||
description: Health indicates the health status of the resource
|
||||
(e.g., Healthy, Degraded, Progressing).
|
||||
properties:
|
||||
lastTransitionTime:
|
||||
description: LastTransitionTime is the time the HealthStatus
|
||||
|
|
@ -4705,25 +4706,42 @@ spec:
|
|||
type: string
|
||||
type: object
|
||||
hook:
|
||||
description: Hook is true if the resource is used as a lifecycle
|
||||
hook in an Argo CD application.
|
||||
type: boolean
|
||||
kind:
|
||||
description: Kind specifies the type of the resource (e.g.,
|
||||
"Deployment", "Service").
|
||||
type: string
|
||||
name:
|
||||
description: Name is the unique name of the resource within
|
||||
the namespace.
|
||||
type: string
|
||||
namespace:
|
||||
description: Namespace defines the Kubernetes namespace where
|
||||
the resource is located.
|
||||
type: string
|
||||
requiresDeletionConfirmation:
|
||||
description: RequiresDeletionConfirmation is true if the resource
|
||||
requires explicit user confirmation before deletion.
|
||||
type: boolean
|
||||
requiresPruning:
|
||||
description: RequiresPruning is true if the resource needs to
|
||||
be pruned (deleted) as part of synchronization.
|
||||
type: boolean
|
||||
status:
|
||||
description: SyncStatusCode is a type which represents possible
|
||||
comparison results
|
||||
description: Status represents the synchronization state of
|
||||
the resource (e.g., Synced, OutOfSync).
|
||||
type: string
|
||||
syncWave:
|
||||
description: |-
|
||||
SyncWave determines the order in which resources are applied during a sync operation.
|
||||
Lower values are applied first.
|
||||
format: int64
|
||||
type: integer
|
||||
version:
|
||||
description: Version indicates the API version of the resource
|
||||
(e.g., "v1", "v1beta1").
|
||||
type: string
|
||||
type: object
|
||||
type: array
|
||||
|
|
|
|||
32
manifests/install-with-hydrator.yaml
generated
32
manifests/install-with-hydrator.yaml
generated
|
|
@ -4680,15 +4680,16 @@ spec:
|
|||
description: Resources is a list of Kubernetes resources managed by
|
||||
this application
|
||||
items:
|
||||
description: |-
|
||||
ResourceStatus holds the current sync and health status of a resource
|
||||
TODO: describe members of this type
|
||||
description: ResourceStatus holds the current synchronization and
|
||||
health status of a Kubernetes resource.
|
||||
properties:
|
||||
group:
|
||||
description: Group represents the API group of the resource
|
||||
(e.g., "apps" for Deployments).
|
||||
type: string
|
||||
health:
|
||||
description: HealthStatus contains information about the currently
|
||||
observed health state of an application or resource
|
||||
description: Health indicates the health status of the resource
|
||||
(e.g., Healthy, Degraded, Progressing).
|
||||
properties:
|
||||
lastTransitionTime:
|
||||
description: LastTransitionTime is the time the HealthStatus
|
||||
|
|
@ -4705,25 +4706,42 @@ spec:
|
|||
type: string
|
||||
type: object
|
||||
hook:
|
||||
description: Hook is true if the resource is used as a lifecycle
|
||||
hook in an Argo CD application.
|
||||
type: boolean
|
||||
kind:
|
||||
description: Kind specifies the type of the resource (e.g.,
|
||||
"Deployment", "Service").
|
||||
type: string
|
||||
name:
|
||||
description: Name is the unique name of the resource within
|
||||
the namespace.
|
||||
type: string
|
||||
namespace:
|
||||
description: Namespace defines the Kubernetes namespace where
|
||||
the resource is located.
|
||||
type: string
|
||||
requiresDeletionConfirmation:
|
||||
description: RequiresDeletionConfirmation is true if the resource
|
||||
requires explicit user confirmation before deletion.
|
||||
type: boolean
|
||||
requiresPruning:
|
||||
description: RequiresPruning is true if the resource needs to
|
||||
be pruned (deleted) as part of synchronization.
|
||||
type: boolean
|
||||
status:
|
||||
description: SyncStatusCode is a type which represents possible
|
||||
comparison results
|
||||
description: Status represents the synchronization state of
|
||||
the resource (e.g., Synced, OutOfSync).
|
||||
type: string
|
||||
syncWave:
|
||||
description: |-
|
||||
SyncWave determines the order in which resources are applied during a sync operation.
|
||||
Lower values are applied first.
|
||||
format: int64
|
||||
type: integer
|
||||
version:
|
||||
description: Version indicates the API version of the resource
|
||||
(e.g., "v1", "v1beta1").
|
||||
type: string
|
||||
type: object
|
||||
type: array
|
||||
|
|
|
|||
32
manifests/install.yaml
generated
32
manifests/install.yaml
generated
|
|
@ -4680,15 +4680,16 @@ spec:
|
|||
description: Resources is a list of Kubernetes resources managed by
|
||||
this application
|
||||
items:
|
||||
description: |-
|
||||
ResourceStatus holds the current sync and health status of a resource
|
||||
TODO: describe members of this type
|
||||
description: ResourceStatus holds the current synchronization and
|
||||
health status of a Kubernetes resource.
|
||||
properties:
|
||||
group:
|
||||
description: Group represents the API group of the resource
|
||||
(e.g., "apps" for Deployments).
|
||||
type: string
|
||||
health:
|
||||
description: HealthStatus contains information about the currently
|
||||
observed health state of an application or resource
|
||||
description: Health indicates the health status of the resource
|
||||
(e.g., Healthy, Degraded, Progressing).
|
||||
properties:
|
||||
lastTransitionTime:
|
||||
description: LastTransitionTime is the time the HealthStatus
|
||||
|
|
@ -4705,25 +4706,42 @@ spec:
|
|||
type: string
|
||||
type: object
|
||||
hook:
|
||||
description: Hook is true if the resource is used as a lifecycle
|
||||
hook in an Argo CD application.
|
||||
type: boolean
|
||||
kind:
|
||||
description: Kind specifies the type of the resource (e.g.,
|
||||
"Deployment", "Service").
|
||||
type: string
|
||||
name:
|
||||
description: Name is the unique name of the resource within
|
||||
the namespace.
|
||||
type: string
|
||||
namespace:
|
||||
description: Namespace defines the Kubernetes namespace where
|
||||
the resource is located.
|
||||
type: string
|
||||
requiresDeletionConfirmation:
|
||||
description: RequiresDeletionConfirmation is true if the resource
|
||||
requires explicit user confirmation before deletion.
|
||||
type: boolean
|
||||
requiresPruning:
|
||||
description: RequiresPruning is true if the resource needs to
|
||||
be pruned (deleted) as part of synchronization.
|
||||
type: boolean
|
||||
status:
|
||||
description: SyncStatusCode is a type which represents possible
|
||||
comparison results
|
||||
description: Status represents the synchronization state of
|
||||
the resource (e.g., Synced, OutOfSync).
|
||||
type: string
|
||||
syncWave:
|
||||
description: |-
|
||||
SyncWave determines the order in which resources are applied during a sync operation.
|
||||
Lower values are applied first.
|
||||
format: int64
|
||||
type: integer
|
||||
version:
|
||||
description: Version indicates the API version of the resource
|
||||
(e.g., "v1", "v1beta1").
|
||||
type: string
|
||||
type: object
|
||||
type: array
|
||||
|
|
|
|||
|
|
@ -709,19 +709,22 @@ message ApplicationSummary {
|
|||
repeated string images = 2;
|
||||
}
|
||||
|
||||
// ApplicationTree holds nodes which belongs to the application
|
||||
// TODO: describe purpose of this type
|
||||
// ApplicationTree represents the hierarchical structure of resources associated with an Argo CD application.
|
||||
message ApplicationTree {
|
||||
// Nodes contains list of nodes which either directly managed by the application and children of directly managed nodes.
|
||||
// Nodes contains a list of resources that are either directly managed by the application
|
||||
// or are children of directly managed resources.
|
||||
repeated ResourceNode nodes = 1;
|
||||
|
||||
// OrphanedNodes contains if or orphaned nodes: nodes which are not managed by the app but in the same namespace. List is populated only if orphaned resources enabled in app project.
|
||||
// OrphanedNodes contains resources that exist in the same namespace as the application
|
||||
// but are not managed by it. This list is populated only if orphaned resource tracking
|
||||
// is enabled in the application's project settings.
|
||||
repeated ResourceNode orphanedNodes = 2;
|
||||
|
||||
// Hosts holds list of Kubernetes nodes that run application related pods
|
||||
// Hosts provides a list of Kubernetes nodes that are running pods related to the application.
|
||||
repeated HostInfo hosts = 3;
|
||||
|
||||
// ShardsCount contains total number of shards the application tree is split into
|
||||
// ShardsCount represents the total number of shards the application tree is split into.
|
||||
// This is used to distribute resource processing across multiple shards.
|
||||
optional int64 shardsCount = 4;
|
||||
}
|
||||
|
||||
|
|
@ -1126,25 +1129,30 @@ message HelmParameter {
|
|||
optional bool forceString = 3;
|
||||
}
|
||||
|
||||
// HostInfo holds host name and resources metrics
|
||||
// TODO: describe purpose of this type
|
||||
// TODO: describe members of this type
|
||||
// HostInfo holds metadata and resource usage metrics for a specific host in the cluster.
|
||||
message HostInfo {
|
||||
// Name is the hostname or node name in the Kubernetes cluster.
|
||||
optional string name = 1;
|
||||
|
||||
// ResourcesInfo provides a list of resource usage details for different resource types on this host.
|
||||
repeated HostResourceInfo resourcesInfo = 2;
|
||||
|
||||
// SystemInfo contains detailed system-level information about the host, such as OS, kernel version, and architecture.
|
||||
optional .k8s.io.api.core.v1.NodeSystemInfo systemInfo = 3;
|
||||
}
|
||||
|
||||
// TODO: describe this type
|
||||
// HostResourceInfo represents resource usage details for a specific resource type on a host.
|
||||
message HostResourceInfo {
|
||||
// ResourceName specifies the type of resource (e.g., CPU, memory, storage).
|
||||
optional string resourceName = 1;
|
||||
|
||||
// RequestedByApp indicates the total amount of this resource requested by the application running on the host.
|
||||
optional int64 requestedByApp = 2;
|
||||
|
||||
// RequestedByNeighbors indicates the total amount of this resource requested by other workloads on the same host.
|
||||
optional int64 requestedByNeighbors = 3;
|
||||
|
||||
// Capacity represents the total available capacity of this resource on the host.
|
||||
optional int64 capacity = 4;
|
||||
}
|
||||
|
||||
|
|
@ -1217,12 +1225,16 @@ message JsonnetVar {
|
|||
optional bool code = 3;
|
||||
}
|
||||
|
||||
// KnownTypeField contains mapping between CRD field and known Kubernetes type.
|
||||
// This is mainly used for unit conversion in unknown resources (e.g. 0.1 == 100mi)
|
||||
// TODO: Describe the members of this type
|
||||
// KnownTypeField contains a mapping between a Custom Resource Definition (CRD) field
|
||||
// and a well-known Kubernetes type. This mapping is primarily used for unit conversions
|
||||
// in resources where the type is not explicitly defined (e.g., converting "0.1" to "100m" for CPU requests).
|
||||
message KnownTypeField {
|
||||
// Field represents the JSON path to the specific field in the CRD that requires type conversion.
|
||||
// Example: "spec.resources.requests.cpu"
|
||||
optional string field = 1;
|
||||
|
||||
// Type specifies the expected Kubernetes type for the field, such as "cpu" or "memory".
|
||||
// This helps in converting values between different formats (e.g., "0.1" to "100m" for CPU).
|
||||
optional string type = 2;
|
||||
}
|
||||
|
||||
|
|
@ -1818,81 +1830,105 @@ message RepositoryList {
|
|||
repeated Repository items = 2;
|
||||
}
|
||||
|
||||
// TODO: describe this type
|
||||
// TODO: describe members of this type
|
||||
// ResourceAction represents an individual action that can be performed on a resource.
|
||||
// It includes parameters, an optional disabled flag, an icon for display, and a name for the action.
|
||||
message ResourceAction {
|
||||
// Name is the name or identifier for the action.
|
||||
optional string name = 1;
|
||||
|
||||
// Params contains the parameters required to execute the action.
|
||||
repeated ResourceActionParam params = 2;
|
||||
|
||||
// Disabled indicates whether the action is disabled.
|
||||
optional bool disabled = 3;
|
||||
|
||||
// IconClass specifies the CSS class for the action's icon.
|
||||
optional string iconClass = 4;
|
||||
|
||||
// DisplayName provides a user-friendly name for the action.
|
||||
optional string displayName = 5;
|
||||
}
|
||||
|
||||
// TODO: describe this type
|
||||
// TODO: describe members of this type
|
||||
// ResourceActionDefinition defines an individual action that can be executed on a resource.
|
||||
// It includes a name for the action and a Lua script that defines the action's behavior.
|
||||
message ResourceActionDefinition {
|
||||
// Name is the identifier for the action.
|
||||
optional string name = 1;
|
||||
|
||||
// ActionLua contains the Lua script that defines the behavior of the action.
|
||||
optional string actionLua = 2;
|
||||
}
|
||||
|
||||
// TODO: describe this type
|
||||
// TODO: describe members of this type
|
||||
// ResourceActionParam represents a parameter for a resource action.
|
||||
// It includes a name, value, type, and an optional default value for the parameter.
|
||||
message ResourceActionParam {
|
||||
// Name is the name of the parameter.
|
||||
optional string name = 1;
|
||||
|
||||
// Value is the value of the parameter.
|
||||
optional string value = 2;
|
||||
|
||||
// Type is the type of the parameter (e.g., string, integer).
|
||||
optional string type = 3;
|
||||
|
||||
// Default is the default value of the parameter, if any.
|
||||
optional string default = 4;
|
||||
}
|
||||
|
||||
// TODO: describe this type
|
||||
// TODO: describe members of this type
|
||||
// ResourceActions holds the set of actions that can be applied to a resource.
|
||||
// It defines custom Lua scripts for discovery and action execution, as well as options
|
||||
// for merging built-in actions with custom ones.
|
||||
message ResourceActions {
|
||||
// ActionDiscoveryLua contains a Lua script for discovering actions.
|
||||
optional string actionDiscoveryLua = 1;
|
||||
|
||||
// Definitions holds the list of action definitions available for the resource.
|
||||
repeated ResourceActionDefinition definitions = 2;
|
||||
|
||||
// MergeBuiltinActions indicates whether built-in actions should be merged with custom actions.
|
||||
optional bool mergeBuiltinActions = 3;
|
||||
}
|
||||
|
||||
// ResourceDiff holds the diff of a live and target resource object
|
||||
// TODO: describe members of this type
|
||||
// ResourceDiff holds the diff between a live and target resource object in Argo CD.
|
||||
// It is used to compare the desired state (from Git/Helm) with the actual state in the cluster.
|
||||
message ResourceDiff {
|
||||
// Group represents the API group of the resource (e.g., "apps" for Deployments).
|
||||
optional string group = 1;
|
||||
|
||||
// Kind represents the Kubernetes resource kind (e.g., "Deployment", "Service").
|
||||
optional string kind = 2;
|
||||
|
||||
// Namespace specifies the namespace where the resource exists.
|
||||
optional string namespace = 3;
|
||||
|
||||
// Name is the name of the resource.
|
||||
optional string name = 4;
|
||||
|
||||
// TargetState contains the JSON serialized resource manifest defined in the Git/Helm
|
||||
// TargetState contains the JSON-serialized resource manifest as defined in the Git/Helm repository.
|
||||
optional string targetState = 5;
|
||||
|
||||
// TargetState contains the JSON live resource manifest
|
||||
// LiveState contains the JSON-serialized resource manifest of the resource currently running in the cluster.
|
||||
optional string liveState = 6;
|
||||
|
||||
// Diff contains the JSON patch between target and live resource
|
||||
// Deprecated: use NormalizedLiveState and PredictedLiveState to render the difference
|
||||
// Diff contains the JSON patch representing the difference between the live and target resource.
|
||||
// Deprecated: Use NormalizedLiveState and PredictedLiveState instead to compute differences.
|
||||
optional string diff = 7;
|
||||
|
||||
// Hook indicates whether this resource is a hook resource (e.g., pre-sync or post-sync hooks).
|
||||
optional bool hook = 8;
|
||||
|
||||
// NormalizedLiveState contains JSON serialized live resource state with applied normalizations
|
||||
// NormalizedLiveState contains the JSON-serialized live resource state after applying normalizations.
|
||||
// Normalizations may include ignoring irrelevant fields like timestamps or defaults applied by Kubernetes.
|
||||
optional string normalizedLiveState = 9;
|
||||
|
||||
// PredictedLiveState contains JSON serialized resource state that is calculated based on normalized and target resource state
|
||||
// PredictedLiveState contains the JSON-serialized resource state that Argo CD predicts based on the
|
||||
// combination of the normalized live state and the desired target state.
|
||||
optional string predictedLiveState = 10;
|
||||
|
||||
// ResourceVersion is the Kubernetes resource version, which helps in tracking changes.
|
||||
optional string resourceVersion = 11;
|
||||
|
||||
// Modified indicates whether the live resource has changes compared to the target resource.
|
||||
optional bool modified = 12;
|
||||
}
|
||||
|
||||
|
|
@ -1915,54 +1951,73 @@ message ResourceIgnoreDifferences {
|
|||
repeated string managedFieldsManagers = 7;
|
||||
}
|
||||
|
||||
// ResourceNetworkingInfo holds networking resource related information
|
||||
// TODO: describe members of this type
|
||||
// ResourceNetworkingInfo holds networking-related information for a resource.
|
||||
message ResourceNetworkingInfo {
|
||||
// TargetLabels represents labels associated with the target resources that this resource communicates with.
|
||||
map<string, string> targetLabels = 1;
|
||||
|
||||
// TargetRefs contains references to other resources that this resource interacts with, such as Services or Pods.
|
||||
repeated ResourceRef targetRefs = 2;
|
||||
|
||||
// Labels holds the labels associated with this networking resource.
|
||||
map<string, string> labels = 3;
|
||||
|
||||
// Ingress provides information about external access points (e.g., load balancer ingress) for this resource.
|
||||
repeated .k8s.io.api.core.v1.LoadBalancerIngress ingress = 4;
|
||||
|
||||
// ExternalURLs holds list of URLs which should be available externally. List is populated for ingress resources using rules hostnames.
|
||||
// ExternalURLs holds a list of URLs that should be accessible externally.
|
||||
// This field is typically populated for Ingress resources based on their hostname rules.
|
||||
repeated string externalURLs = 5;
|
||||
}
|
||||
|
||||
// ResourceNode contains information about live resource and its children
|
||||
// TODO: describe members of this type
|
||||
// ResourceNode contains information about a live Kubernetes resource and its relationships with other resources.
|
||||
message ResourceNode {
|
||||
// ResourceRef uniquely identifies the resource using its group, kind, namespace, and name.
|
||||
optional ResourceRef resourceRef = 1;
|
||||
|
||||
// ParentRefs lists the parent resources that reference this resource.
|
||||
// This helps in understanding ownership and hierarchical relationships.
|
||||
repeated ResourceRef parentRefs = 2;
|
||||
|
||||
// Info provides additional metadata or annotations about the resource.
|
||||
repeated InfoItem info = 3;
|
||||
|
||||
// NetworkingInfo contains details about the resource's networking attributes,
|
||||
// such as ingress information and external URLs.
|
||||
optional ResourceNetworkingInfo networkingInfo = 4;
|
||||
|
||||
// ResourceVersion indicates the version of the resource, used to track changes.
|
||||
optional string resourceVersion = 5;
|
||||
|
||||
// Images lists container images associated with the resource.
|
||||
// This is primarily useful for pods and other workload resources.
|
||||
repeated string images = 6;
|
||||
|
||||
// Health represents the health status of the resource (e.g., Healthy, Degraded, Progressing).
|
||||
optional HealthStatus health = 7;
|
||||
|
||||
// CreatedAt records the timestamp when the resource was created.
|
||||
optional .k8s.io.apimachinery.pkg.apis.meta.v1.Time createdAt = 8;
|
||||
}
|
||||
|
||||
// ResourceOverride holds configuration to customize resource diffing and health assessment
|
||||
// TODO: describe the members of this type
|
||||
message ResourceOverride {
|
||||
// HealthLua contains a Lua script that defines custom health checks for the resource.
|
||||
optional string healthLua = 1;
|
||||
|
||||
// UseOpenLibs indicates whether to use open-source libraries for the resource.
|
||||
optional bool useOpenLibs = 5;
|
||||
|
||||
// Actions defines the set of actions that can be performed on the resource, as a Lua script.
|
||||
optional string actions = 3;
|
||||
|
||||
// IgnoreDifferences contains configuration for which differences should be ignored during the resource diffing.
|
||||
optional OverrideIgnoreDiff ignoreDifferences = 2;
|
||||
|
||||
// IgnoreResourceUpdates holds configuration for ignoring updates to specific resource fields.
|
||||
optional OverrideIgnoreDiff ignoreResourceUpdates = 6;
|
||||
|
||||
// KnownTypeFields lists fields for which unit conversions should be applied.
|
||||
repeated KnownTypeField knownTypeFields = 4;
|
||||
}
|
||||
|
||||
|
|
@ -2015,29 +2070,40 @@ message ResourceResult {
|
|||
optional string syncPhase = 10;
|
||||
}
|
||||
|
||||
// ResourceStatus holds the current sync and health status of a resource
|
||||
// TODO: describe members of this type
|
||||
// ResourceStatus holds the current synchronization and health status of a Kubernetes resource.
|
||||
message ResourceStatus {
|
||||
// Group represents the API group of the resource (e.g., "apps" for Deployments).
|
||||
optional string group = 1;
|
||||
|
||||
// Version indicates the API version of the resource (e.g., "v1", "v1beta1").
|
||||
optional string version = 2;
|
||||
|
||||
// Kind specifies the type of the resource (e.g., "Deployment", "Service").
|
||||
optional string kind = 3;
|
||||
|
||||
// Namespace defines the Kubernetes namespace where the resource is located.
|
||||
optional string namespace = 4;
|
||||
|
||||
// Name is the unique name of the resource within the namespace.
|
||||
optional string name = 5;
|
||||
|
||||
// Status represents the synchronization state of the resource (e.g., Synced, OutOfSync).
|
||||
optional string status = 6;
|
||||
|
||||
// Health indicates the health status of the resource (e.g., Healthy, Degraded, Progressing).
|
||||
optional HealthStatus health = 7;
|
||||
|
||||
// Hook is true if the resource is used as a lifecycle hook in an Argo CD application.
|
||||
optional bool hook = 8;
|
||||
|
||||
// RequiresPruning is true if the resource needs to be pruned (deleted) as part of synchronization.
|
||||
optional bool requiresPruning = 9;
|
||||
|
||||
// SyncWave determines the order in which resources are applied during a sync operation.
|
||||
// Lower values are applied first.
|
||||
optional int64 syncWave = 10;
|
||||
|
||||
// RequiresDeletionConfirmation is true if the resource requires explicit user confirmation before deletion.
|
||||
optional bool requiresDeletionConfirmation = 11;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1773,44 +1773,56 @@ type InfoItem struct {
|
|||
Value string `json:"value,omitempty" protobuf:"bytes,2,opt,name=value"`
|
||||
}
|
||||
|
||||
// ResourceNetworkingInfo holds networking resource related information
|
||||
// TODO: describe members of this type
|
||||
// ResourceNetworkingInfo holds networking-related information for a resource.
|
||||
type ResourceNetworkingInfo struct {
|
||||
TargetLabels map[string]string `json:"targetLabels,omitempty" protobuf:"bytes,1,opt,name=targetLabels"`
|
||||
TargetRefs []ResourceRef `json:"targetRefs,omitempty" protobuf:"bytes,2,opt,name=targetRefs"`
|
||||
Labels map[string]string `json:"labels,omitempty" protobuf:"bytes,3,opt,name=labels"`
|
||||
Ingress []corev1.LoadBalancerIngress `json:"ingress,omitempty" protobuf:"bytes,4,opt,name=ingress"`
|
||||
// ExternalURLs holds list of URLs which should be available externally. List is populated for ingress resources using rules hostnames.
|
||||
// TargetLabels represents labels associated with the target resources that this resource communicates with.
|
||||
TargetLabels map[string]string `json:"targetLabels,omitempty" protobuf:"bytes,1,opt,name=targetLabels"`
|
||||
// TargetRefs contains references to other resources that this resource interacts with, such as Services or Pods.
|
||||
TargetRefs []ResourceRef `json:"targetRefs,omitempty" protobuf:"bytes,2,opt,name=targetRefs"`
|
||||
// Labels holds the labels associated with this networking resource.
|
||||
Labels map[string]string `json:"labels,omitempty" protobuf:"bytes,3,opt,name=labels"`
|
||||
// Ingress provides information about external access points (e.g., load balancer ingress) for this resource.
|
||||
Ingress []corev1.LoadBalancerIngress `json:"ingress,omitempty" protobuf:"bytes,4,opt,name=ingress"`
|
||||
// ExternalURLs holds a list of URLs that should be accessible externally.
|
||||
// This field is typically populated for Ingress resources based on their hostname rules.
|
||||
ExternalURLs []string `json:"externalURLs,omitempty" protobuf:"bytes,5,opt,name=externalURLs"`
|
||||
}
|
||||
|
||||
// TODO: describe this type
|
||||
// HostResourceInfo represents resource usage details for a specific resource type on a host.
|
||||
type HostResourceInfo struct {
|
||||
ResourceName corev1.ResourceName `json:"resourceName,omitempty" protobuf:"bytes,1,name=resourceName"`
|
||||
RequestedByApp int64 `json:"requestedByApp,omitempty" protobuf:"bytes,2,name=requestedByApp"`
|
||||
RequestedByNeighbors int64 `json:"requestedByNeighbors,omitempty" protobuf:"bytes,3,name=requestedByNeighbors"`
|
||||
Capacity int64 `json:"capacity,omitempty" protobuf:"bytes,4,name=capacity"`
|
||||
// ResourceName specifies the type of resource (e.g., CPU, memory, storage).
|
||||
ResourceName corev1.ResourceName `json:"resourceName,omitempty" protobuf:"bytes,1,name=resourceName"`
|
||||
// RequestedByApp indicates the total amount of this resource requested by the application running on the host.
|
||||
RequestedByApp int64 `json:"requestedByApp,omitempty" protobuf:"bytes,2,name=requestedByApp"`
|
||||
// RequestedByNeighbors indicates the total amount of this resource requested by other workloads on the same host.
|
||||
RequestedByNeighbors int64 `json:"requestedByNeighbors,omitempty" protobuf:"bytes,3,name=requestedByNeighbors"`
|
||||
// Capacity represents the total available capacity of this resource on the host.
|
||||
Capacity int64 `json:"capacity,omitempty" protobuf:"bytes,4,name=capacity"`
|
||||
}
|
||||
|
||||
// HostInfo holds host name and resources metrics
|
||||
// TODO: describe purpose of this type
|
||||
// TODO: describe members of this type
|
||||
// HostInfo holds metadata and resource usage metrics for a specific host in the cluster.
|
||||
type HostInfo struct {
|
||||
Name string `json:"name,omitempty" protobuf:"bytes,1,name=name"`
|
||||
ResourcesInfo []HostResourceInfo `json:"resourcesInfo,omitempty" protobuf:"bytes,2,name=resourcesInfo"`
|
||||
SystemInfo corev1.NodeSystemInfo `json:"systemInfo,omitempty" protobuf:"bytes,3,opt,name=systemInfo"`
|
||||
// Name is the hostname or node name in the Kubernetes cluster.
|
||||
Name string `json:"name,omitempty" protobuf:"bytes,1,name=name"`
|
||||
// ResourcesInfo provides a list of resource usage details for different resource types on this host.
|
||||
ResourcesInfo []HostResourceInfo `json:"resourcesInfo,omitempty" protobuf:"bytes,2,name=resourcesInfo"`
|
||||
// SystemInfo contains detailed system-level information about the host, such as OS, kernel version, and architecture.
|
||||
SystemInfo corev1.NodeSystemInfo `json:"systemInfo,omitempty" protobuf:"bytes,3,opt,name=systemInfo"`
|
||||
}
|
||||
|
||||
// ApplicationTree holds nodes which belongs to the application
|
||||
// TODO: describe purpose of this type
|
||||
// ApplicationTree represents the hierarchical structure of resources associated with an Argo CD application.
|
||||
type ApplicationTree struct {
|
||||
// Nodes contains list of nodes which either directly managed by the application and children of directly managed nodes.
|
||||
// Nodes contains a list of resources that are either directly managed by the application
|
||||
// or are children of directly managed resources.
|
||||
Nodes []ResourceNode `json:"nodes,omitempty" protobuf:"bytes,1,rep,name=nodes"`
|
||||
// OrphanedNodes contains if or orphaned nodes: nodes which are not managed by the app but in the same namespace. List is populated only if orphaned resources enabled in app project.
|
||||
// OrphanedNodes contains resources that exist in the same namespace as the application
|
||||
// but are not managed by it. This list is populated only if orphaned resource tracking
|
||||
// is enabled in the application's project settings.
|
||||
OrphanedNodes []ResourceNode `json:"orphanedNodes,omitempty" protobuf:"bytes,2,rep,name=orphanedNodes"`
|
||||
// Hosts holds list of Kubernetes nodes that run application related pods
|
||||
// Hosts provides a list of Kubernetes nodes that are running pods related to the application.
|
||||
Hosts []HostInfo `json:"hosts,omitempty" protobuf:"bytes,3,rep,name=hosts"`
|
||||
// ShardsCount contains total number of shards the application tree is split into
|
||||
// ShardsCount represents the total number of shards the application tree is split into.
|
||||
// This is used to distribute resource processing across multiple shards.
|
||||
ShardsCount int64 `json:"shardsCount,omitempty" protobuf:"bytes,4,opt,name=shardsCount"`
|
||||
}
|
||||
|
||||
|
|
@ -1888,7 +1900,10 @@ type ApplicationSummary struct {
|
|||
Images []string `json:"images,omitempty" protobuf:"bytes,2,opt,name=images"`
|
||||
}
|
||||
|
||||
// TODO: Document purpose of this method
|
||||
// FindNode searches for a resource node in the application tree.
|
||||
// It looks for a node that matches the given group, kind, namespace, and name.
|
||||
// The search includes both directly managed nodes (`Nodes`) and orphaned nodes (`OrphanedNodes`).
|
||||
// Returns a pointer to the found node, or nil if no matching node is found.
|
||||
func (t *ApplicationTree) FindNode(group string, kind string, namespace string, name string) *ResourceNode {
|
||||
for _, n := range append(t.Nodes, t.OrphanedNodes...) {
|
||||
if n.Group == group && n.Kind == kind && n.Namespace == namespace && n.Name == name {
|
||||
|
|
@ -1898,10 +1913,20 @@ func (t *ApplicationTree) FindNode(group string, kind string, namespace string,
|
|||
return nil
|
||||
}
|
||||
|
||||
// TODO: Document purpose of this method
|
||||
// GetSummary generates a summary of the application by extracting external URLs and container images
|
||||
// used within the application's resources.
|
||||
//
|
||||
// - It collects external URLs from the networking information of all resource nodes.
|
||||
// - It extracts container images referenced in the application's resources.
|
||||
// - Additionally, it includes links from application annotations that start with `common.AnnotationKeyLinkPrefix`.
|
||||
// - The collected URLs and images are sorted alphabetically before being returned.
|
||||
//
|
||||
// Returns an `ApplicationSummary` containing a list of unique external URLs and container images.
|
||||
func (t *ApplicationTree) GetSummary(app *Application) ApplicationSummary {
|
||||
urlsSet := make(map[string]bool)
|
||||
imagesSet := make(map[string]bool)
|
||||
|
||||
// Collect external URLs and container images from application nodes
|
||||
for _, node := range t.Nodes {
|
||||
if node.NetworkingInfo != nil {
|
||||
for _, url := range node.NetworkingInfo.ExternalURLs {
|
||||
|
|
@ -1912,26 +1937,26 @@ func (t *ApplicationTree) GetSummary(app *Application) ApplicationSummary {
|
|||
imagesSet[image] = true
|
||||
}
|
||||
}
|
||||
// also add Application's own links
|
||||
|
||||
// Include application-specific links from annotations
|
||||
for k, v := range app.GetAnnotations() {
|
||||
if strings.HasPrefix(k, common.AnnotationKeyLinkPrefix) {
|
||||
urlsSet[v] = true
|
||||
}
|
||||
}
|
||||
urls := make([]string, 0)
|
||||
|
||||
urls := make([]string, 0, len(urlsSet))
|
||||
for url := range urlsSet {
|
||||
urls = append(urls, url)
|
||||
}
|
||||
sort.Slice(urls, func(i, j int) bool {
|
||||
return urls[i] < urls[j]
|
||||
})
|
||||
images := make([]string, 0)
|
||||
sort.Strings(urls)
|
||||
|
||||
images := make([]string, 0, len(imagesSet))
|
||||
for image := range imagesSet {
|
||||
images = append(images, image)
|
||||
}
|
||||
sort.Slice(images, func(i, j int) bool {
|
||||
return images[i] < images[j]
|
||||
})
|
||||
sort.Strings(images)
|
||||
|
||||
return ApplicationSummary{ExternalURLs: urls, Images: images}
|
||||
}
|
||||
|
||||
|
|
@ -1945,17 +1970,27 @@ type ResourceRef struct {
|
|||
UID string `json:"uid,omitempty" protobuf:"bytes,6,opt,name=uid"`
|
||||
}
|
||||
|
||||
// ResourceNode contains information about live resource and its children
|
||||
// TODO: describe members of this type
|
||||
// ResourceNode contains information about a live Kubernetes resource and its relationships with other resources.
|
||||
type ResourceNode struct {
|
||||
ResourceRef `json:",inline" protobuf:"bytes,1,opt,name=resourceRef"`
|
||||
ParentRefs []ResourceRef `json:"parentRefs,omitempty" protobuf:"bytes,2,opt,name=parentRefs"`
|
||||
Info []InfoItem `json:"info,omitempty" protobuf:"bytes,3,opt,name=info"`
|
||||
NetworkingInfo *ResourceNetworkingInfo `json:"networkingInfo,omitempty" protobuf:"bytes,4,opt,name=networkingInfo"`
|
||||
ResourceVersion string `json:"resourceVersion,omitempty" protobuf:"bytes,5,opt,name=resourceVersion"`
|
||||
Images []string `json:"images,omitempty" protobuf:"bytes,6,opt,name=images"`
|
||||
Health *HealthStatus `json:"health,omitempty" protobuf:"bytes,7,opt,name=health"`
|
||||
CreatedAt *metav1.Time `json:"createdAt,omitempty" protobuf:"bytes,8,opt,name=createdAt"`
|
||||
// ResourceRef uniquely identifies the resource using its group, kind, namespace, and name.
|
||||
ResourceRef `json:",inline" protobuf:"bytes,1,opt,name=resourceRef"`
|
||||
// ParentRefs lists the parent resources that reference this resource.
|
||||
// This helps in understanding ownership and hierarchical relationships.
|
||||
ParentRefs []ResourceRef `json:"parentRefs,omitempty" protobuf:"bytes,2,opt,name=parentRefs"`
|
||||
// Info provides additional metadata or annotations about the resource.
|
||||
Info []InfoItem `json:"info,omitempty" protobuf:"bytes,3,opt,name=info"`
|
||||
// NetworkingInfo contains details about the resource's networking attributes,
|
||||
// such as ingress information and external URLs.
|
||||
NetworkingInfo *ResourceNetworkingInfo `json:"networkingInfo,omitempty" protobuf:"bytes,4,opt,name=networkingInfo"`
|
||||
// ResourceVersion indicates the version of the resource, used to track changes.
|
||||
ResourceVersion string `json:"resourceVersion,omitempty" protobuf:"bytes,5,opt,name=resourceVersion"`
|
||||
// Images lists container images associated with the resource.
|
||||
// This is primarily useful for pods and other workload resources.
|
||||
Images []string `json:"images,omitempty" protobuf:"bytes,6,opt,name=images"`
|
||||
// Health represents the health status of the resource (e.g., Healthy, Degraded, Progressing).
|
||||
Health *HealthStatus `json:"health,omitempty" protobuf:"bytes,7,opt,name=health"`
|
||||
// CreatedAt records the timestamp when the resource was created.
|
||||
CreatedAt *metav1.Time `json:"createdAt,omitempty" protobuf:"bytes,8,opt,name=createdAt"`
|
||||
}
|
||||
|
||||
// FullName returns a resource node's full name in the format "group/kind/namespace/name"
|
||||
|
|
@ -1973,20 +2008,31 @@ func (n *ResourceNode) GroupKindVersion() schema.GroupVersionKind {
|
|||
}
|
||||
}
|
||||
|
||||
// ResourceStatus holds the current sync and health status of a resource
|
||||
// TODO: describe members of this type
|
||||
// ResourceStatus holds the current synchronization and health status of a Kubernetes resource.
|
||||
type ResourceStatus struct {
|
||||
Group string `json:"group,omitempty" protobuf:"bytes,1,opt,name=group"`
|
||||
Version string `json:"version,omitempty" protobuf:"bytes,2,opt,name=version"`
|
||||
Kind string `json:"kind,omitempty" protobuf:"bytes,3,opt,name=kind"`
|
||||
Namespace string `json:"namespace,omitempty" protobuf:"bytes,4,opt,name=namespace"`
|
||||
Name string `json:"name,omitempty" protobuf:"bytes,5,opt,name=name"`
|
||||
Status SyncStatusCode `json:"status,omitempty" protobuf:"bytes,6,opt,name=status"`
|
||||
Health *HealthStatus `json:"health,omitempty" protobuf:"bytes,7,opt,name=health"`
|
||||
Hook bool `json:"hook,omitempty" protobuf:"bytes,8,opt,name=hook"`
|
||||
RequiresPruning bool `json:"requiresPruning,omitempty" protobuf:"bytes,9,opt,name=requiresPruning"`
|
||||
SyncWave int64 `json:"syncWave,omitempty" protobuf:"bytes,10,opt,name=syncWave"`
|
||||
RequiresDeletionConfirmation bool `json:"requiresDeletionConfirmation,omitempty" protobuf:"bytes,11,opt,name=requiresDeletionConfirmation"`
|
||||
// Group represents the API group of the resource (e.g., "apps" for Deployments).
|
||||
Group string `json:"group,omitempty" protobuf:"bytes,1,opt,name=group"`
|
||||
// Version indicates the API version of the resource (e.g., "v1", "v1beta1").
|
||||
Version string `json:"version,omitempty" protobuf:"bytes,2,opt,name=version"`
|
||||
// Kind specifies the type of the resource (e.g., "Deployment", "Service").
|
||||
Kind string `json:"kind,omitempty" protobuf:"bytes,3,opt,name=kind"`
|
||||
// Namespace defines the Kubernetes namespace where the resource is located.
|
||||
Namespace string `json:"namespace,omitempty" protobuf:"bytes,4,opt,name=namespace"`
|
||||
// Name is the unique name of the resource within the namespace.
|
||||
Name string `json:"name,omitempty" protobuf:"bytes,5,opt,name=name"`
|
||||
// Status represents the synchronization state of the resource (e.g., Synced, OutOfSync).
|
||||
Status SyncStatusCode `json:"status,omitempty" protobuf:"bytes,6,opt,name=status"`
|
||||
// Health indicates the health status of the resource (e.g., Healthy, Degraded, Progressing).
|
||||
Health *HealthStatus `json:"health,omitempty" protobuf:"bytes,7,opt,name=health"`
|
||||
// Hook is true if the resource is used as a lifecycle hook in an Argo CD application.
|
||||
Hook bool `json:"hook,omitempty" protobuf:"bytes,8,opt,name=hook"`
|
||||
// RequiresPruning is true if the resource needs to be pruned (deleted) as part of synchronization.
|
||||
RequiresPruning bool `json:"requiresPruning,omitempty" protobuf:"bytes,9,opt,name=requiresPruning"`
|
||||
// SyncWave determines the order in which resources are applied during a sync operation.
|
||||
// Lower values are applied first.
|
||||
SyncWave int64 `json:"syncWave,omitempty" protobuf:"bytes,10,opt,name=syncWave"`
|
||||
// RequiresDeletionConfirmation is true if the resource requires explicit user confirmation before deletion.
|
||||
RequiresDeletionConfirmation bool `json:"requiresDeletionConfirmation,omitempty" protobuf:"bytes,11,opt,name=requiresDeletionConfirmation"`
|
||||
}
|
||||
|
||||
// GroupVersionKind returns the GVK schema type for given resource status
|
||||
|
|
@ -1994,27 +2040,36 @@ func (r *ResourceStatus) GroupVersionKind() schema.GroupVersionKind {
|
|||
return schema.GroupVersionKind{Group: r.Group, Version: r.Version, Kind: r.Kind}
|
||||
}
|
||||
|
||||
// ResourceDiff holds the diff of a live and target resource object
|
||||
// TODO: describe members of this type
|
||||
// ResourceDiff holds the diff between a live and target resource object in Argo CD.
|
||||
// It is used to compare the desired state (from Git/Helm) with the actual state in the cluster.
|
||||
type ResourceDiff struct {
|
||||
Group string `json:"group,omitempty" protobuf:"bytes,1,opt,name=group"`
|
||||
Kind string `json:"kind,omitempty" protobuf:"bytes,2,opt,name=kind"`
|
||||
// Group represents the API group of the resource (e.g., "apps" for Deployments).
|
||||
Group string `json:"group,omitempty" protobuf:"bytes,1,opt,name=group"`
|
||||
// Kind represents the Kubernetes resource kind (e.g., "Deployment", "Service").
|
||||
Kind string `json:"kind,omitempty" protobuf:"bytes,2,opt,name=kind"`
|
||||
// Namespace specifies the namespace where the resource exists.
|
||||
Namespace string `json:"namespace,omitempty" protobuf:"bytes,3,opt,name=namespace"`
|
||||
Name string `json:"name,omitempty" protobuf:"bytes,4,opt,name=name"`
|
||||
// TargetState contains the JSON serialized resource manifest defined in the Git/Helm
|
||||
// Name is the name of the resource.
|
||||
Name string `json:"name,omitempty" protobuf:"bytes,4,opt,name=name"`
|
||||
// TargetState contains the JSON-serialized resource manifest as defined in the Git/Helm repository.
|
||||
TargetState string `json:"targetState,omitempty" protobuf:"bytes,5,opt,name=targetState"`
|
||||
// TargetState contains the JSON live resource manifest
|
||||
// LiveState contains the JSON-serialized resource manifest of the resource currently running in the cluster.
|
||||
LiveState string `json:"liveState,omitempty" protobuf:"bytes,6,opt,name=liveState"`
|
||||
// Diff contains the JSON patch between target and live resource
|
||||
// Deprecated: use NormalizedLiveState and PredictedLiveState to render the difference
|
||||
// Diff contains the JSON patch representing the difference between the live and target resource.
|
||||
// Deprecated: Use NormalizedLiveState and PredictedLiveState instead to compute differences.
|
||||
Diff string `json:"diff,omitempty" protobuf:"bytes,7,opt,name=diff"`
|
||||
Hook bool `json:"hook,omitempty" protobuf:"bytes,8,opt,name=hook"`
|
||||
// NormalizedLiveState contains JSON serialized live resource state with applied normalizations
|
||||
// Hook indicates whether this resource is a hook resource (e.g., pre-sync or post-sync hooks).
|
||||
Hook bool `json:"hook,omitempty" protobuf:"bytes,8,opt,name=hook"`
|
||||
// NormalizedLiveState contains the JSON-serialized live resource state after applying normalizations.
|
||||
// Normalizations may include ignoring irrelevant fields like timestamps or defaults applied by Kubernetes.
|
||||
NormalizedLiveState string `json:"normalizedLiveState,omitempty" protobuf:"bytes,9,opt,name=normalizedLiveState"`
|
||||
// PredictedLiveState contains JSON serialized resource state that is calculated based on normalized and target resource state
|
||||
// PredictedLiveState contains the JSON-serialized resource state that Argo CD predicts based on the
|
||||
// combination of the normalized live state and the desired target state.
|
||||
PredictedLiveState string `json:"predictedLiveState,omitempty" protobuf:"bytes,10,opt,name=predictedLiveState"`
|
||||
ResourceVersion string `json:"resourceVersion,omitempty" protobuf:"bytes,11,opt,name=resourceVersion"`
|
||||
Modified bool `json:"modified,omitempty" protobuf:"bytes,12,opt,name=modified"`
|
||||
// ResourceVersion is the Kubernetes resource version, which helps in tracking changes.
|
||||
ResourceVersion string `json:"resourceVersion,omitempty" protobuf:"bytes,11,opt,name=resourceVersion"`
|
||||
// Modified indicates whether the live resource has changes compared to the target resource.
|
||||
Modified bool `json:"modified,omitempty" protobuf:"bytes,12,opt,name=modified"`
|
||||
}
|
||||
|
||||
// FullName returns full name of a node that was used for diffing in the format "group/kind/namespace/name"
|
||||
|
|
@ -2233,12 +2288,16 @@ type TLSClientConfig struct {
|
|||
CAData []byte `json:"caData,omitempty" protobuf:"bytes,5,opt,name=caData"`
|
||||
}
|
||||
|
||||
// KnownTypeField contains mapping between CRD field and known Kubernetes type.
|
||||
// This is mainly used for unit conversion in unknown resources (e.g. 0.1 == 100mi)
|
||||
// TODO: Describe the members of this type
|
||||
// KnownTypeField contains a mapping between a Custom Resource Definition (CRD) field
|
||||
// and a well-known Kubernetes type. This mapping is primarily used for unit conversions
|
||||
// in resources where the type is not explicitly defined (e.g., converting "0.1" to "100m" for CPU requests).
|
||||
type KnownTypeField struct {
|
||||
// Field represents the JSON path to the specific field in the CRD that requires type conversion.
|
||||
// Example: "spec.resources.requests.cpu"
|
||||
Field string `json:"field,omitempty" protobuf:"bytes,1,opt,name=field"`
|
||||
Type string `json:"type,omitempty" protobuf:"bytes,2,opt,name=type"`
|
||||
// Type specifies the expected Kubernetes type for the field, such as "cpu" or "memory".
|
||||
// This helps in converting values between different formats (e.g., "0.1" to "100m" for CPU).
|
||||
Type string `json:"type,omitempty" protobuf:"bytes,2,opt,name=type"`
|
||||
}
|
||||
|
||||
// OverrideIgnoreDiff contains configurations about how fields should be ignored during diffs between
|
||||
|
|
@ -2263,17 +2322,24 @@ type rawResourceOverride struct {
|
|||
}
|
||||
|
||||
// ResourceOverride holds configuration to customize resource diffing and health assessment
|
||||
// TODO: describe the members of this type
|
||||
type ResourceOverride struct {
|
||||
HealthLua string `protobuf:"bytes,1,opt,name=healthLua"`
|
||||
UseOpenLibs bool `protobuf:"bytes,5,opt,name=useOpenLibs"`
|
||||
Actions string `protobuf:"bytes,3,opt,name=actions"`
|
||||
IgnoreDifferences OverrideIgnoreDiff `protobuf:"bytes,2,opt,name=ignoreDifferences"`
|
||||
// HealthLua contains a Lua script that defines custom health checks for the resource.
|
||||
HealthLua string `protobuf:"bytes,1,opt,name=healthLua"`
|
||||
// UseOpenLibs indicates whether to use open-source libraries for the resource.
|
||||
UseOpenLibs bool `protobuf:"bytes,5,opt,name=useOpenLibs"`
|
||||
// Actions defines the set of actions that can be performed on the resource, as a Lua script.
|
||||
Actions string `protobuf:"bytes,3,opt,name=actions"`
|
||||
// IgnoreDifferences contains configuration for which differences should be ignored during the resource diffing.
|
||||
IgnoreDifferences OverrideIgnoreDiff `protobuf:"bytes,2,opt,name=ignoreDifferences"`
|
||||
// IgnoreResourceUpdates holds configuration for ignoring updates to specific resource fields.
|
||||
IgnoreResourceUpdates OverrideIgnoreDiff `protobuf:"bytes,6,opt,name=ignoreResourceUpdates"`
|
||||
KnownTypeFields []KnownTypeField `protobuf:"bytes,4,opt,name=knownTypeFields"`
|
||||
// KnownTypeFields lists fields for which unit conversions should be applied.
|
||||
KnownTypeFields []KnownTypeField `protobuf:"bytes,4,opt,name=knownTypeFields"`
|
||||
}
|
||||
|
||||
// TODO: describe this method
|
||||
// UnmarshalJSON unmarshals a JSON byte slice into a ResourceOverride object.
|
||||
// It parses the raw input data and handles special processing for `IgnoreDifferences`
|
||||
// and `IgnoreResourceUpdates` fields using YAML format.
|
||||
func (ro *ResourceOverride) UnmarshalJSON(data []byte) error {
|
||||
raw := &rawResourceOverride{}
|
||||
if err := json.Unmarshal(data, &raw); err != nil {
|
||||
|
|
@ -2294,7 +2360,8 @@ func (ro *ResourceOverride) UnmarshalJSON(data []byte) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
// TODO: describe this method
|
||||
// MarshalJSON marshals a ResourceOverride object into a JSON byte slice.
|
||||
// It converts `IgnoreDifferences` and `IgnoreResourceUpdates` fields to YAML format before marshaling.
|
||||
func (ro ResourceOverride) MarshalJSON() ([]byte, error) {
|
||||
ignoreDifferencesData, err := yaml.Marshal(ro.IgnoreDifferences)
|
||||
if err != nil {
|
||||
|
|
@ -2308,7 +2375,8 @@ func (ro ResourceOverride) MarshalJSON() ([]byte, error) {
|
|||
return json.Marshal(raw)
|
||||
}
|
||||
|
||||
// TODO: describe this method
|
||||
// GetActions parses and returns the actions defined for the resource.
|
||||
// It unmarshals the `Actions` field (a Lua script) into a ResourceActions object.
|
||||
func (ro *ResourceOverride) GetActions() (ResourceActions, error) {
|
||||
var actions ResourceActions
|
||||
err := yaml.Unmarshal([]byte(ro.Actions), &actions)
|
||||
|
|
@ -2318,37 +2386,52 @@ func (ro *ResourceOverride) GetActions() (ResourceActions, error) {
|
|||
return actions, nil
|
||||
}
|
||||
|
||||
// TODO: describe this type
|
||||
// TODO: describe members of this type
|
||||
// ResourceActions holds the set of actions that can be applied to a resource.
|
||||
// It defines custom Lua scripts for discovery and action execution, as well as options
|
||||
// for merging built-in actions with custom ones.
|
||||
type ResourceActions struct {
|
||||
ActionDiscoveryLua string `json:"discovery.lua,omitempty" yaml:"discovery.lua,omitempty" protobuf:"bytes,1,opt,name=actionDiscoveryLua"`
|
||||
Definitions []ResourceActionDefinition `json:"definitions,omitempty" protobuf:"bytes,2,rep,name=definitions"`
|
||||
MergeBuiltinActions bool `json:"mergeBuiltinActions,omitempty" yaml:"mergeBuiltinActions,omitempty" protobuf:"bytes,3,opt,name=mergeBuiltinActions"`
|
||||
// ActionDiscoveryLua contains a Lua script for discovering actions.
|
||||
ActionDiscoveryLua string `json:"discovery.lua,omitempty" yaml:"discovery.lua,omitempty" protobuf:"bytes,1,opt,name=actionDiscoveryLua"`
|
||||
// Definitions holds the list of action definitions available for the resource.
|
||||
Definitions []ResourceActionDefinition `json:"definitions,omitempty" protobuf:"bytes,2,rep,name=definitions"`
|
||||
// MergeBuiltinActions indicates whether built-in actions should be merged with custom actions.
|
||||
MergeBuiltinActions bool `json:"mergeBuiltinActions,omitempty" yaml:"mergeBuiltinActions,omitempty" protobuf:"bytes,3,opt,name=mergeBuiltinActions"`
|
||||
}
|
||||
|
||||
// TODO: describe this type
|
||||
// TODO: describe members of this type
|
||||
// ResourceActionDefinition defines an individual action that can be executed on a resource.
|
||||
// It includes a name for the action and a Lua script that defines the action's behavior.
|
||||
type ResourceActionDefinition struct {
|
||||
Name string `json:"name" protobuf:"bytes,1,opt,name=name"`
|
||||
// Name is the identifier for the action.
|
||||
Name string `json:"name" protobuf:"bytes,1,opt,name=name"`
|
||||
// ActionLua contains the Lua script that defines the behavior of the action.
|
||||
ActionLua string `json:"action.lua" yaml:"action.lua" protobuf:"bytes,2,opt,name=actionLua"`
|
||||
}
|
||||
|
||||
// TODO: describe this type
|
||||
// TODO: describe members of this type
|
||||
// ResourceAction represents an individual action that can be performed on a resource.
|
||||
// It includes parameters, an optional disabled flag, an icon for display, and a name for the action.
|
||||
type ResourceAction struct {
|
||||
Name string `json:"name,omitempty" protobuf:"bytes,1,opt,name=name"`
|
||||
Params []ResourceActionParam `json:"params,omitempty" protobuf:"bytes,2,rep,name=params"`
|
||||
Disabled bool `json:"disabled,omitempty" protobuf:"varint,3,opt,name=disabled"`
|
||||
IconClass string `json:"iconClass,omitempty" protobuf:"bytes,4,opt,name=iconClass"`
|
||||
DisplayName string `json:"displayName,omitempty" protobuf:"bytes,5,opt,name=displayName"`
|
||||
// Name is the name or identifier for the action.
|
||||
Name string `json:"name,omitempty" protobuf:"bytes,1,opt,name=name"`
|
||||
// Params contains the parameters required to execute the action.
|
||||
Params []ResourceActionParam `json:"params,omitempty" protobuf:"bytes,2,rep,name=params"`
|
||||
// Disabled indicates whether the action is disabled.
|
||||
Disabled bool `json:"disabled,omitempty" protobuf:"varint,3,opt,name=disabled"`
|
||||
// IconClass specifies the CSS class for the action's icon.
|
||||
IconClass string `json:"iconClass,omitempty" protobuf:"bytes,4,opt,name=iconClass"`
|
||||
// DisplayName provides a user-friendly name for the action.
|
||||
DisplayName string `json:"displayName,omitempty" protobuf:"bytes,5,opt,name=displayName"`
|
||||
}
|
||||
|
||||
// TODO: describe this type
|
||||
// TODO: describe members of this type
|
||||
// ResourceActionParam represents a parameter for a resource action.
|
||||
// It includes a name, value, type, and an optional default value for the parameter.
|
||||
type ResourceActionParam struct {
|
||||
Name string `json:"name,omitempty" protobuf:"bytes,1,opt,name=name"`
|
||||
Value string `json:"value,omitempty" protobuf:"bytes,2,opt,name=value"`
|
||||
Type string `json:"type,omitempty" protobuf:"bytes,3,opt,name=type"`
|
||||
// Name is the name of the parameter.
|
||||
Name string `json:"name,omitempty" protobuf:"bytes,1,opt,name=name"`
|
||||
// Value is the value of the parameter.
|
||||
Value string `json:"value,omitempty" protobuf:"bytes,2,opt,name=value"`
|
||||
// Type is the type of the parameter (e.g., string, integer).
|
||||
Type string `json:"type,omitempty" protobuf:"bytes,3,opt,name=type"`
|
||||
// Default is the default value of the parameter, if any.
|
||||
Default string `json:"default,omitempty" protobuf:"bytes,4,opt,name=default"`
|
||||
}
|
||||
|
||||
|
|
@ -3482,12 +3565,16 @@ func UnmarshalToUnstructured(resource string) (*unstructured.Unstructured, error
|
|||
return &obj, nil
|
||||
}
|
||||
|
||||
// TODO: document this method
|
||||
// LiveObject returns the live object representation of the resource by unmarshalling the
|
||||
// `LiveState` field into an unstructured.Unstructured object. This object represents the current
|
||||
// live state of the resource in the cluster.
|
||||
func (r ResourceDiff) LiveObject() (*unstructured.Unstructured, error) {
|
||||
return UnmarshalToUnstructured(r.LiveState)
|
||||
}
|
||||
|
||||
// TODO: document this method
|
||||
// TargetObject returns the target object representation of the resource by unmarshalling the
|
||||
// `TargetState` field into an unstructured.Unstructured object. This object represents the desired
|
||||
// state of the resource, as defined in the target configuration.
|
||||
func (r ResourceDiff) TargetObject() (*unstructured.Unstructured, error) {
|
||||
return UnmarshalToUnstructured(r.TargetState)
|
||||
}
|
||||
|
|
@ -3541,6 +3628,10 @@ func (app *Application) GetAnnotation(annotation string) string {
|
|||
return v
|
||||
}
|
||||
|
||||
// IsDeletionConfirmed checks whether the application has been approved for deletion.
|
||||
// It compares the timestamp stored in the `AnnotationDeletionApproved` annotation
|
||||
// with the provided 'since' time. If the annotation is missing or has an invalid
|
||||
// timestamp format, it returns false.
|
||||
func (app *Application) IsDeletionConfirmed(since time.Time) bool {
|
||||
val := app.GetAnnotation(synccommon.AnnotationDeletionApproved)
|
||||
if val == "" {
|
||||
|
|
|
|||
Loading…
Reference in a new issue