OpenShift GitOps currently does not support looking up values in the cluster either through Helm or Kustomize. You can do this through the use of the plugin however it should be noted that this isn’t recommended as a general practice since lookup values are not stored in git and subject to change.
An example use case where this may make sense is when dealing with ephemeral clusters that are created for a specific task and then torn down again once that task is completed. In this case it’s not possible to manage this through normal GitOps practices.
To accomplish this goal, you can use a ConfigurationManagementPlugin in Argo CD.
In my case I am using Red Hat Advanced Cluster Manager (RHACM) to deploy OpenShift GitOps via policy to various clusters. RHACM has the ability in it's template policies to lookup values so I am using this capability to populate enivronment variables on the repo server as follows:
repo: