### Apache Airflow version

2.2.5 (latest released)

### What happened

Helm installation fails with the following config:

``` 
postgresql:
  enabled: true
  nameOverride: overridename
```

The problem is manifested in the `-airflow-metadata` secret where the connection string will be generated without respect to the `nameOverride`

With the example config the generated string should be:

`postgresql://postgres:postgres@myrelease-overridename:5432/postgres?sslmode=disable`

but the actual string generated is:
`postgresql://postgres:postgres@myrelease-overridename.namespace:5432/postgres?sslmode=disable`




### What you think should happen instead

Installation should succeed with correctly generated metadata connection string

### How to reproduce

To reproduce just set the following in values.yaml and attempt `helm install`

``` 
postgresql:
  enabled: true
  nameOverride: overridename
```

### Operating System

Ubuntu

### Versions of Apache Airflow Providers

_No response_

### Deployment

Official Apache Airflow Helm Chart

### Deployment details

using helm with kind cluster

### Anything else

_No response_

### Are you willing to submit PR?

- [X] Yes I am willing to submit a PR!

### Code of Conduct

- [X] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)

def get_k8s_objs_with_image(obj: list[Any] | dict[str, Any]) -> list[dict[str, Any]]:
            """
            Recursive helper to retrieve all the k8s objects that have an "image" key
            inside k8s obj or list of k8s obj
            """
            out = []
            if isinstance(obj, list):
                for item in obj:
                    out += get_k8s_objs_with_image(item)
            if isinstance(obj, dict):
                if "image" in obj:
                    out += [obj]
                
                for val in obj.values():
                    out += get_k8s_objs_with_image(val)
            return out
        image_repo = "test-airflow-repo/airflow"
        k8s_objects = render_chart("test-basic", {"defaultAirflowRepository": image_repo})
        objs_with_image = get_k8s_objs_with_image(k8s_objects)
        for obj in objs_with_image:
            image: str = obj["image"]
            if image.startswith(image_repo):
                
                assert "command" not in obj
    def test_unsupported_executor(self):