projectcontour / contour-operator

Experimental repository to explore an operator for deploying Contour
Apache License 2.0
43 stars 34 forks source link

certgen job name does not get truncated to 63 characters, failing when using long image tags #524

Closed javsalgar closed 2 years ago

javsalgar commented 2 years ago

What steps did you take and what happened:

The contour instance will not get deployed because the certgen job will not be created:

         1.6551249492126336e+09 ERROR   controller.contour_controller   Reconciler error    {"name": "contour-sample", "namespace": "srdicontou", "error": "failed to ensure job for contour srdicontou/contour-sample: failed to create job srdicontou/contour-certgen-d76d8b5da2ab549cee82cd99fcf8d747dba564863ccc459cae5a91f50bf9c5d3: Job.batch \"contour-certgen-d76d8b5da2ab549cee82cd99fcf8d747dba564863ccc459cae5a91f50bf9c5d3\" is invalid: spec.template.labels: Invalid value: \"contour-certgen-d76d8b5da2ab549cee82cd99fcf8d747dba564863ccc459cae5a91f50bf9c5d3\": must be no more than 63 characters", "errorCauses": [{"error": "failed to ensure job for contour srdicontou/contour-sample: failed to create job srdicontou/contour-certgen-d76d8b5da2ab549cee82cd99fcf8d747dba564863ccc459cae5a91f50bf9c5d3: Job.batch \"contour-certgen-d76d8b5da2ab549cee82cd99fcf8d747dba564863ccc459cae5a91f50bf9c5d3\" is invalid: spec.template.labels: Invalid value: \"contour-certgen-d76d8b5da2ab549cee82cd99fcf8d747dba564863ccc459cae5a91f50bf9c5d3\": must be no more than 63 characters"}]}

What did you expect to happen:

The job name is truncated to 63 characters so it passes the k8s validations.

Anything else you would like to add: [Miscellaneous information that will assist in solving the issue.]

Environment: