Skip to content

Commit c019731

Browse files
crenshaw-devrumstead
authored andcommitted
fix(repo-server): support .argocd-source.yaml kustomize version (argoproj#23643) (argoproj#23644)
Signed-off-by: Michael Crenshaw <[email protected]> Co-authored-by: rumstead <[email protected]> Signed-off-by: enneitex <[email protected]>
1 parent 2a86927 commit c019731

File tree

27 files changed

+1505
-956
lines changed

27 files changed

+1505
-956
lines changed

assets/swagger.json

Lines changed: 26 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

controller/state.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -235,10 +235,6 @@ func (m *appStateManager) GetRepoObjs(app *v1alpha1.Application, sources []v1alp
235235
if err != nil {
236236
return nil, nil, false, fmt.Errorf("failed to get repo %q: %w", source.RepoURL, err)
237237
}
238-
kustomizeOptions, err := kustomizeSettings.GetOptions(source)
239-
if err != nil {
240-
return nil, nil, false, fmt.Errorf("failed to get Kustomize options for source %d of %d: %w", i+1, len(sources), err)
241-
}
242238

243239
syncedRevision := app.Status.Sync.Revision
244240
if app.Spec.HasMultipleSources() {
@@ -315,7 +311,7 @@ func (m *appStateManager) GetRepoObjs(app *v1alpha1.Application, sources []v1alp
315311
AppName: app.InstanceName(m.namespace),
316312
Namespace: appNamespace,
317313
ApplicationSource: &source,
318-
KustomizeOptions: kustomizeOptions,
314+
KustomizeOptions: kustomizeSettings,
319315
KubeVersion: serverVersion,
320316
ApiVersions: apiVersions,
321317
VerifySignature: verifySignature,
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# v3.1 to 3.2
2+
3+
## Argo CD Now Respects Kustomize Version in `.argocd-source.yaml`
4+
5+
Argo CD provides a way to [override Application `spec.source` values](../../user-guide/parameters.md#store-overrides-in-git)
6+
using the `.argocd-source.yaml` file.
7+
8+
Before Argo CD v3.2, you could set the Kustomize version in the Application's `.spec.source.kustomize.version` field,
9+
but you could not set it in the `.argocd-source.yaml` file.
10+
11+
Starting with Argo CD v3.2, you can now set the Kustomize version in the `.argocd-source.yaml` file like this:
12+
13+
```yaml
14+
kustomize:
15+
version: v4.5.7
16+
```
17+
18+
## Deprecated fields in the repo-server GRPC service
19+
20+
The repo-server's GRPC service is generally considered an internal API and is not recommended for use by external
21+
clients. No user-facing services or functionality have changed. However, if you are using the repo-server's GRPC service
22+
directly, please note field deprecations in the following messages.
23+
24+
The `kustomizeOptions.binaryPath` field in the `ManifestRequest` and `RepoServerAppDetailsQuery` messages has been
25+
deprecated. Instead of calculating the correct binary path client-side, the client is expected to populate the
26+
`kustomizeOptions.versions` field with the [configured Kustomize binary paths](../../user-guide/kustomize.md#custom-kustomize-versions).
27+
This allows the repo-server to select the correct binary path based on the Kustomize version configured in the
28+
Application's source field as well as any [overrides configured via git](../../user-guide/parameters.md#store-overrides-in-git).
29+
30+
The `kustomizeOptions.binaryPath` will continue to be respected when `kustomizeOptions.versions` is not set, but this is
31+
not recommended. It will prevent overrides configured via git from being respected. The `kustomizeOptions.binaryPath`
32+
field will be removed in a future release.
33+
34+
If the repo-server encounters a request with the `kustomizeOptions.binaryPath` field set, it will log a warning message:
35+
36+
> kustomizeOptions.binaryPath is deprecated, use KustomizeOptions.versions instead
37+
38+
The `ManifestRequest` and `RepoServerAppDetailsQuery` messages are used by the following GRPC services:
39+
`GenerateManifest`, `GenerateManifestWithFiles`, and `GetAppDetails`.

docs/operator-manual/upgrading/overview.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/<v
3838

3939
<hr/>
4040

41+
- [v3.1 to v3.2](./3.1-3.2.md)
4142
- [v3.0 to v3.1](./3.0-3.1.md)
4243
- [v2.14 to v3.0](./2.14-3.0.md)
4344
- [v2.13 to v2.14](./2.13-2.14.md)

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ nav:
131131
- operator-manual/server-commands/additional-configuration-method.md
132132
- Upgrading:
133133
- operator-manual/upgrading/overview.md
134+
- operator-manual/upgrading/3.1-3.2.md
134135
- operator-manual/upgrading/3.0-3.1.md
135136
- operator-manual/upgrading/2.14-3.0.md
136137
- operator-manual/upgrading/2.13-2.14.md

0 commit comments

Comments
 (0)