Multiple domains routing with https error

Hi,
I'm trying to create an IngressRoute with many rules, but they have two different domains that redirect to different services. I use a tls certResolver but I only get https in one of the urls, the other never use https.
Here is my ingress route yaml for kubernetes:

apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
name: test-secure
namespace: test
spec:
entryPoints:

  • websecure
    routes:
  • kind: Rule
    match: Host(test.com) && PathPrefix(/api)
    priority: 30
    services:
    • name: backend
      port: 80
  • kind: Rule
    match: Host(test-2.com) && PathPrefix(/api)
    priority: 30
    services:
    • name: backend-2
      port: 80
  • kind: Rule
    match: Host(test-2.com) && PathPrefix(/)
    priority: 10
    services:
    • name: frontend-2
      port: 80
  • kind: Rule
    match: Host(test.com) && PathPrefix(/)
    priority: 10
    services:
    • name: frontend
      port: 80
      tls:
      certResolver: myresolver

My traefik static configuration is:

    - "--entrypoints.websecure.Address=:4443"
    - "--providers.kubernetescrd"
    - "--certificatesresolvers.myresolver.acme.tlschallenge"
    - "--certificatesresolvers.myresolver.acme.email=example@gmail.com"
    - "--certificatesresolvers.myresolver.acme.storage=acme.json"
    - "--certificatesresolvers.myresolver.acme.caserver=https://acme-v02.api.letsencrypt.org/directory"

What could be the problem?