|
| 1 | +# Comparison: Argo CD Application API vs GitOpsDeployment API |
| 2 | + |
| 3 | +### Written by |
| 4 | +- Jonathan West (@jgwest) |
| 5 | +- Originally written May 27, 2023 |
| 6 | + |
| 7 | + |
| 8 | +This document is a short comparison between the Argo CD Application CR, and the corresponding GitOpsDeployment CR. See [this document for an explanation/example of GitOpsDeployment](https://github.com/redhat-appstudio/managed-gitops/blob/main/docs/api.md#gitopsdeployment). |
| 9 | + |
| 10 | +**NOREQ** \= Any items marked as NOREQ means we haven’t had a requirement (‘no requirement’) to implement this API yet, but there is no technical reason we couldn’t. (It just hasn’t been at the top of our TODO list yet based on requests from leadership.) |
| 11 | + |
| 12 | +# Argo CD Application API only |
| 13 | + |
| 14 | +The following fields do not currently exist in the GitOpsDeployment API. |
| 15 | + |
| 16 | +## .operation field |
| 17 | + |
| 18 | +**‘.operation’ field** |
| 19 | + |
| 20 | +* A top-level field (a peer of **.spec** and **.metadata**) |
| 21 | + * And not to be confused with **.status.operationState** |
| 22 | +* Contains declarative information on current operation |
| 23 | +* *Why not included in GitOpsDeployment:* |
| 24 | + * We don’t expose the concept of operations in RHTAP. Why? RHTAP UI doesn’t allow actions on operations, nor do we support the Argo CD CLI (which could likewise be used to perform actions on operations). |
| 25 | + |
| 26 | +## .spec field |
| 27 | + |
| 28 | +**.spec.source field** |
| 29 | + |
| 30 | +* **.targetRevision** |
| 31 | + * The name of the corresponding field in GitOpsDeployment is *branch* (I don’t recall any particular reason) |
| 32 | +* Various Source-type fields: **.helm/.kustomize/.directory/.chart** |
| 33 | + * *Why not included in GitOpsDeployment*: NOREQ |
| 34 | +* **.plugin** |
| 35 | + * *Why not included in GitOpsDeployment*: no support for Argo CD plugins |
| 36 | +* **.ref** |
| 37 | + * *Why not included in GitOpDeployment*: no support for sources (at this time) |
| 38 | + |
| 39 | +**.spec.destination field** |
| 40 | + |
| 41 | +* name/server |
| 42 | + * *Why not included in GitOpDeployment*: we instead use the ‘environment’ field, which is a reference to a GitOpsDeploymentManagedEnvironment. |
| 43 | + * Since we don’t support Argo CD cluster secrets, the GitOps Service equivalent is ManagedEnvironment, and thus we have a reference to it. |
| 44 | + |
| 45 | +**.spec.project field** |
| 46 | + |
| 47 | +* *Why not included in GitOpsDeployment:* |
| 48 | + * RHTAP uses a different multitenancy model than AppProjects (although behind the scenes we do use AppProjects as a defense-in-depth to ensure individual users are segregated) |
| 49 | + * RHTAP doesn’t allow users to define AppProjects. |
| 50 | + |
| 51 | +**.spec.syncpolicy** |
| 52 | + |
| 53 | +* Most fields not supported: |
| 54 | + * **.automated** |
| 55 | + * allowEmpty |
| 56 | + * prune |
| 57 | + * selfHeal |
| 58 | + * **.retry** |
| 59 | + * backoff (various) |
| 60 | + * limit |
| 61 | + * **.syncOptions** (various options) |
| 62 | +* *Why not included in GitOpsDeployment:* |
| 63 | + * NOREQ |
| 64 | + * Instead GitOps Service has the ability to switch between automated/manual sync, and sensible defaults for the automated case. |
| 65 | + |
| 66 | +**.spec.ignoreDifferences field** |
| 67 | + |
| 68 | +* *Why not included in GitOpsDeployment*: NOREQ |
| 69 | + |
| 70 | +**.spec.sources**: |
| 71 | + |
| 72 | +* *Why not included in GitOpsDeployment*: NOREQ |
| 73 | + |
| 74 | +**.spec.revisionHistoryLimit** |
| 75 | + |
| 76 | +* *Why not included in GitOpsDeployment*: NOREQ |
| 77 | + |
| 78 | +**.spec.info** |
| 79 | + |
| 80 | +* *Why not included in GitOpsDeployment*: NOREQ |
| 81 | + |
| 82 | +## .status field |
| 83 | + |
| 84 | +Conditions |
| 85 | + |
| 86 | +**.status.operationState** |
| 87 | + |
| 88 | +* *Why not included in GitOpsDeployment:* |
| 89 | + * We don’t expose the concept of operations in RHTAP. Why? RHTAP UI doesn’t allow actions on operations, nor do we support the Argo CD CLI (which could likewise be used to perform actions on operations). |
| 90 | +* *BUT*: Argo CD does include information within this field that isn’t available elsewhere, so we are likely to still need to expose this field. |
| 91 | + |
| 92 | +**.status.sync** |
| 93 | + |
| 94 | +* **.revisions** |
| 95 | + * *Why not included in GitOpsDeployment*: we don’t support multiple sources due to NOREQ. |
| 96 | +* **.comparedTo**: |
| 97 | + * *Why not included in GitOpsDeployment*: this data is instead exposed via **.status.reconciledState** |
| 98 | + |
| 99 | +**.status.history** |
| 100 | + |
| 101 | +* *Why not included in GitOpsDeployment*: NOREQ |
| 102 | + |
| 103 | +**.status.reconciledAt**: |
| 104 | + |
| 105 | +* *Why not included in GitOpsDeployment*: NOREQ |
| 106 | + |
| 107 | +**.status.sourceType/sourcetypes**: |
| 108 | + |
| 109 | +* *Why not included in GitOpsDeployment*: NOREQ |
| 110 | + |
| 111 | +**.status.summary:** |
| 112 | + |
| 113 | +* *Why not included in GitOpsDeployment*: NOREQ |
| 114 | + |
| 115 | +# GitOpsDeployment API only |
| 116 | + |
| 117 | +**.spec.source.branch** |
| 118 | + |
| 119 | +* The name of the corresponding field in GitOpsDeployment is *targetRevision* (I don’t recall any particular reason for the change) |
| 120 | + |
| 121 | +**.spec.destination** |
| 122 | + |
| 123 | +* For convenience, GitOpsDeployment allows .spec.destination to be empty, in which case the target is assumed to be the same namespace as the GitOpsDeployment CR |
| 124 | + |
| 125 | +**.spec.destination.environment** |
| 126 | + |
| 127 | +* See above re: differences between .spec.destination fields in Argo CD vs GitOpsDeployment |
| 128 | + |
| 129 | +**.status.reconciledState** |
| 130 | + |
| 131 | +* Argo CD instead exposes this via **.status.sync.comparedTo** |
| 132 | + |
| 133 | +# Differences in APIs that are defined in both |
| 134 | + |
| 135 | +**.status.conditions** |
| 136 | + |
| 137 | +* The condition types that are supported are different. |
| 138 | + |
0 commit comments