jx upgrade ingress Timeout reached while waiting for TLS

Created on 4 Nov 2019  路  9Comments  路  Source: jenkins-x/jx

Summary

Timeout reached while waiting for TLS certificates to be ready

Steps to reproduce the behavior

jx upgrade ingress --namespaces jx-production --urltemplate='{{.Service}}.{{.Domain}}'

Expected behavior

Ingress and tls are upgraded

Actual behavior

Timeout reached while waiting for TLS certificates to be ready

Jx version

The output of jx version is:

NAME               VERSION
jx                 2.0.948
jenkins x platform 2.0.1562
Kubernetes cluster v1.13.11-eks-5876d6
kubectl            v1.15.0
helm client        Client: v2.13.1+g618447c
git                2.23.0
Operating System   Mac OS X 10.15 build 19A602

Jenkins type

  • [ ] Serverless Jenkins X Pipelines (Tekton + Prow)
  • [x] Classic Jenkins

Kubernetes cluster


EKS,

Operating system / Environment


Mac OS X 10.15 build 19A602

areingress kinbug lifecyclrotten prioritimportant-longterm

Most helpful comment

Hi having same issue,
I detected when removing double quotes from urltemplate: in part0-configmap.yaml it works fine.
Just leaving "chartmuseum.jx.example.io" instead of "\"chartmuseum.jx.example.io\""

I try to add --urltemplate= in the jx update ingress command with quotes, without quotes, with simple quotes, but it always forms the URL with double quotes. Resulting the error described above by @pod2metra.

This were the steps I followed to manually resolve the issue.

  1. Run
    jx update ingress --namespaces=NAMESPACE --verbose

  2. Detect from the debug log were the yaml files are created

On MAC
/var/folders/fr/j47zgnsn7655b0cwr4vs2h7c0000gp/T/helm-template-workdir-278263853/expose-princesstree/output/namespaces/NAMESPACE/exposecontroller/templates/

On LINUX

/tmp/helm-template-workdir-996004538/expose-lynxfog/output/namespaces/NAMESPACE/exposecontroller/templates/

  1. Edit configmap.yaml file en delete the double quotes
apiVersion: v1
data:
  config.yml: |-
    exposer: Ingress
    domain: DOMAIN
    urltemplate: "subdomain{{.Domain}}" ##Changed this line removed both '\"'
    http: true
    tls-acme: true
....
  1. Apply manually all yaml files again.

kubectl apply -f part0-serviceaccount.yaml -f part0-job.yaml -f part0-role.yaml -f part0-rolebinding.yaml -f part0-configmap.yaml -n NAMESPACE

And the cert generates and ingress is configured properly with out errors.

I see in upgrade_ingress.go line 408 this double quote was added.

Is there a way to remove this double quote to make jx update ingress work again?
There are two older issues regarding this error #5800 and #5816 that seems that has a fix.

Thank you!
Matias

All 9 comments

on exposecontroller pod logs I found: Add failed: failed to create ingress jx/chartmuseum: Ingress.extensions "chartmuseum" is invalid: [spec.rules[0].host: Invalid value: "\"chartmuseum.jx.example.io\"": a DNS-1123 subdomain must consist of lower case alphanumeric characters,

Can you please try it as --urltemplate="{{.Service}}.{{.Domain}}"

It's not resolve issue.
Looks like the problem was in issue template.
After changing annotations to kubernetes.io/tls-acme: "true" and changes in ingress annotations to

      certmanager.k8s.io/issuer: letsencrypt-prod
      ingress.kubernetes.io/ssl-redirect: "true"
      kubernetes.io/ingress.class: nginx
      kubernetes.io/tls-acme: "true"

TLS cert gets correctly, but I made it manually and not via jx update ingress call.

Hi having same issue,
I detected when removing double quotes from urltemplate: in part0-configmap.yaml it works fine.
Just leaving "chartmuseum.jx.example.io" instead of "\"chartmuseum.jx.example.io\""

I try to add --urltemplate= in the jx update ingress command with quotes, without quotes, with simple quotes, but it always forms the URL with double quotes. Resulting the error described above by @pod2metra.

This were the steps I followed to manually resolve the issue.

  1. Run
    jx update ingress --namespaces=NAMESPACE --verbose

  2. Detect from the debug log were the yaml files are created

On MAC
/var/folders/fr/j47zgnsn7655b0cwr4vs2h7c0000gp/T/helm-template-workdir-278263853/expose-princesstree/output/namespaces/NAMESPACE/exposecontroller/templates/

On LINUX

/tmp/helm-template-workdir-996004538/expose-lynxfog/output/namespaces/NAMESPACE/exposecontroller/templates/

  1. Edit configmap.yaml file en delete the double quotes
apiVersion: v1
data:
  config.yml: |-
    exposer: Ingress
    domain: DOMAIN
    urltemplate: "subdomain{{.Domain}}" ##Changed this line removed both '\"'
    http: true
    tls-acme: true
....
  1. Apply manually all yaml files again.

kubectl apply -f part0-serviceaccount.yaml -f part0-job.yaml -f part0-role.yaml -f part0-rolebinding.yaml -f part0-configmap.yaml -n NAMESPACE

And the cert generates and ingress is configured properly with out errors.

I see in upgrade_ingress.go line 408 this double quote was added.

Is there a way to remove this double quote to make jx update ingress work again?
There are two older issues regarding this error #5800 and #5816 that seems that has a fix.

Thank you!
Matias

Why do these escaped quotes need to be added anyway?

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close.
Provide feedback via https://jenkins-x.io/community.
/lifecycle stale

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.
If this issue is safe to close now please do so with /close.
Provide feedback via https://jenkins-x.io/community.
/lifecycle rotten

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.
Provide feedback via https://jenkins-x.io/community.
/close

@jenkins-x-bot: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.
Provide feedback via https://jenkins-x.io/community.
/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the jenkins-x/lighthouse repository.

Was this page helpful?
0 / 5 - 0 ratings