Skip to content
This repository has been archived by the owner on Oct 17, 2024. It is now read-only.

Allow klusterlet to patch hostAliases when creating klusterlet-registration-agent deployment #318

Open
abdennour opened this issue Feb 13, 2023 · 1 comment

Comments

@abdennour
Copy link

Hi,
IF we want to add hostAliases in all deployments under the namespace open-cluster-management-agent. So the Managed Cluster can resolve hostname of hub cluster API.

# patch
spec:
  template:
    spec:
     hostAliases:
       - ip: a.b.x.y
         hostnames:
           - api.company.lan

We patched klusterlet deployment, it's fine.. but when we patched klusterlet-registration-agent , it get overriden.

There is a permanent way to patch klusterlet-registration-agent by hostAliases and in general by any Pod Spec.

@qiujian16
Copy link
Member

you can set hubApiServerHostAlias in klusterlet resource, it will update the hostaliases field on registration/work agent.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants