1
0
mirror of https://github.com/rancher/rke.git synced 2025-07-13 15:15:59 +00:00

Merge pull request #2955 from rayandas/fix-coredns-addon

Add logic to fix coreDNS addon config issue.
This commit is contained in:
Rayan Das 2022-06-15 10:00:39 +05:30 committed by GitHub
commit fd6c8d87e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -186,6 +186,18 @@ func (c *Cluster) deployK8sAddOns(ctx context.Context, data map[string]interface
func (c *Cluster) deployUserAddOns(ctx context.Context) error {
log.Infof(ctx, "[addons] Setting up user addons")
if c.Addons != "" {
addonJobExists, err := addons.AddonJobExists(UserAddonJobName, c.LocalKubeConfigPath, c.K8sWrapTransport)
if err != nil {
return err
}
if addonJobExists {
log.Infof(ctx, "[addons] Removing old user addons")
if err := c.doAddonDelete(ctx, UserAddonResourceName, false); err != nil {
return err
}
log.Infof(ctx, "[addons] Old user addons removed successfully")
}
if err := c.doAddonDeploy(ctx, c.Addons, UserAddonResourceName, false); err != nil {
return err
}