Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Operator fails to patch ingress after update to 25.0.0 #30332

@bo0ts

Description

@bo0ts

Before reporting an issue

  • I have read and understood the above terms for submitting issues, and I understand that my issue may be closed without action if I do not follow them.

Area

operator

Describe the bug

After upgrading the operator to version 25.0.0 the following error message appears in the log:

Caused by: io.fabric8.kubernetes.client.KubernetesClientException: Failure executing: PATCH at: https://...:443/apis/networking.k8s.io/v1/namespaces/keycloak/ingresses/keycloak-ingress?fieldManager=keycloakcontroller&force=true. Message: Ingress.extensions "keycloak-ingress" is invalid: spec.rules[0].host: Invalid value: "https://keycloak.apps.okd.intern": a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*'). Received status: Status(apiVersion=v1, code=422, details=StatusDetails(causes=[StatusCause(field=spec.rules[0].host, message=Invalid value: "https://keycloak.apps.okd.intern": a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.co...
at io.fabric8.kubernetes.client.dsl.internal.OperationSupport.requestFailure(OperationSupport.java:660)
at io.fabric8.kubernetes.client.dsl.internal.OperationSupport.requestFailure(OperationSupport.java:640)
at io.fabric8.kubernetes.client.dsl.internal.OperationSupport.assertResponseCode(OperationSupport.java:589)
at io.fabric8.kubernetes.client.dsl.internal.OperationSupport.lambda$handleResponse$0(OperationSupport.java:5

I assume this has to do with required change in the hostname stanza:

  hostname:
    # used to be 
    # admin: keycloak.apps.okd.intern
    admin: https://keycloak.apps.okd.intern
    hostname: https://keycloak.apps.okd.intern
    # hostname: eycloak.apps.okd.intern
    strict: false
  ingress:
    enabled: true
    className: openshift-default

Version

25.0.0

Regression

  • The issue is a regression

Expected behavior

The operator creates a valid ingress resource and has no errors during reconciliation.

Actual behavior

The operator logs errors. The existing ingress continues to work.

How to Reproduce?

Upgrade with ingress.enabled from version 24.0.X to 25.0.0.

Anything else?

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions