Fix controller ingress label override. (#4597)

Signed-off-by: zzjin <tczzjin@gmail.com>
This commit is contained in:
zzjin
2024-03-15 15:46:09 +08:00
committed by GitHub
parent 1eafe70326
commit 5c73e629fd
2 changed files with 0 additions and 2 deletions
@@ -438,7 +438,6 @@ func (r *AdminerReconciler) syncNginxIngress(ctx context.Context, adminer *admin
}
if _, err := controllerutil.CreateOrUpdate(ctx, r.Client, ingress, func() error {
expectIngress := r.createNginxIngress(adminer, host)
ingress.ObjectMeta.Labels = expectIngress.ObjectMeta.Labels
ingress.ObjectMeta.Annotations = expectIngress.ObjectMeta.Annotations
ingress.Spec.Rules = expectIngress.Spec.Rules
ingress.Spec.TLS = expectIngress.Spec.TLS
@@ -190,7 +190,6 @@ func (r *TerminalReconciler) syncNginxIngress(ctx context.Context, terminal *ter
}
if _, err := controllerutil.CreateOrUpdate(ctx, r.Client, ingress, func() error {
expectIngress := r.createNginxIngress(terminal, host)
ingress.ObjectMeta.Labels = expectIngress.ObjectMeta.Labels
ingress.ObjectMeta.Annotations = expectIngress.ObjectMeta.Annotations
ingress.Spec.Rules = expectIngress.Spec.Rules
ingress.Spec.TLS = expectIngress.Spec.TLS