diff --git a/cmd/argocd/commands/app.go b/cmd/argocd/commands/app.go index fcad08a346..a8c23ce8d8 100644 --- a/cmd/argocd/commands/app.go +++ b/cmd/argocd/commands/app.go @@ -818,8 +818,8 @@ func liveObjects(resources []*argoappv1.ResourceDiff) ([]*unstructured.Unstructu return objs, nil } -func getLocalObjects(app *argoappv1.Application, local, appLabelKey, kubeVersion string) []*unstructured.Unstructured { - manifestStrings := getLocalObjectsString(app, local, appLabelKey, kubeVersion, nil) +func getLocalObjects(app *argoappv1.Application, local, appLabelKey, kubeVersion string, kustomizeOptions *argoappv1.KustomizeOptions) []*unstructured.Unstructured { + manifestStrings := getLocalObjectsString(app, local, appLabelKey, kubeVersion, kustomizeOptions) objs := make([]*unstructured.Unstructured, len(manifestStrings)) for i := range manifestStrings { obj := unstructured.Unstructured{} @@ -920,7 +920,7 @@ func NewApplicationDiffCommand(clientOpts *argocdclient.ClientOptions) *cobra.Co cluster, err := clusterIf.Get(context.Background(), &clusterpkg.ClusterQuery{Server: app.Spec.Destination.Server}) errors.CheckError(err) util.Close(conn) - localObjs := groupLocalObjs(getLocalObjects(app, local, argoSettings.AppLabelKey, cluster.ServerVersion), liveObjs, app.Spec.Destination.Namespace) + localObjs := groupLocalObjs(getLocalObjects(app, local, argoSettings.AppLabelKey, cluster.ServerVersion, argoSettings.KustomizeOptions), liveObjs, app.Spec.Destination.Namespace) for _, res := range resources.Items { var live = &unstructured.Unstructured{} err := json.Unmarshal([]byte(res.LiveState), &live)