Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid header field name "Impersonate-Extra-authentication.kubernetes.io/pod-uid" on OpenShift 4.8 #3253

Closed
skabashnyuk opened this issue Jun 17, 2021 · 1 comment

Comments

@skabashnyuk
Copy link
Contributor

During testing of Eclipse Che on OpenShift 4.8 discovered such an issue eclipse-che/che#19988

2021-06-16 15:25:19,254[nio-8080-exec-1]  [ERROR] [c.a.c.r.RuntimeExceptionMapper 47]   - Internal Server Error occurred, error time: 2021-06-16 15:25:19
io.fabric8.kubernetes.client.KubernetesClientException: Failure executing: GET at: https://172.30.0.1/apis/authorization.openshift.io/v1/namespaces/admin-che/rolebindings/admin. Message: Get "https://172.30.0.1:443/apis/rbac.authorization.k8s.io/v1/namespaces/admin-che/rolebindings/admin": net/http: invalid header field name "Impersonate-Extra-authentication.kubernetes.io/pod-uid". Received status: Status(apiVersion=v1, code=500, details=null, kind=Status, message=Get "https://172.30.0.1:443/apis/rbac.authorization.k8s.io/v1/namespaces/admin-che/rolebindings/admin": net/http: invalid header field name "Impersonate-Extra-authentication.kubernetes.io/pod-uid", metadata=ListMeta(_continue=null, remainingItemCount=null, resourceVersion=null, selfLink=null, additionalProperties={}), reason=null, status=Failure, additionalProperties={}).
	at io.fabric8.kubernetes.client.dsl.base.OperationSupport.requestFailure(OperationSupport.java:639)
	at io.fabric8.kubernetes.client.dsl.base.OperationSupport.assertResponseCode(OperationSupport.java:578)
	at io.fabric8.kubernetes.client.dsl.base.OperationSupport.handleResponse(OperationSupport.java:543)
	at io.fabric8.kubernetes.client.dsl.base.OperationSupport.handleResponse(OperationSupport.java:504)
	at io.fabric8.kubernetes.client.dsl.base.OperationSupport.handleGet(OperationSupport.java:471)
	at io.fabric8.kubernetes.client.dsl.base.OperationSupport.handleGet(OperationSupport.java:453)
	at io.fabric8.kubernetes.client.dsl.base.BaseOperation.handleGet(BaseOperation.java:947)
	at io.fabric8.kubernetes.client.dsl.base.BaseOperation.getMandatory(BaseOperation.java:221)
	at io.fabric8.kubernetes.client.dsl.base.BaseOperation.get(BaseOperation.java:187)
	at io.fabric8.kubernetes.client.dsl.base.BaseOperation.get(BaseOperation.java:86)
	at io.fabric8.kubernetes.client.dsl.base.BaseOperation.lambda$createOrReplace$1(BaseOperation.java:416)
	at io.fabric8.kubernetes.client.utils.CreateOrReplaceHelper.createOrReplace(CreateOrReplaceHelper.java:59)
	at io.fabric8.kubernetes.client.dsl.base.BaseOperation.createOrReplace(BaseOperation.java:419)

The issue happened during the execution of such a code

        openshiftClient
            .roleBindings()
            .inNamespace(projectName)
            .createOrReplace(
                new RoleBindingBuilder()
                    .withNewMetadata()
                    .withName("admin")
                    .endMetadata()
                    .addToUserNames(osClient.currentUser().getMetadata().getName())
                    .withNewRoleRef()
                    .withApiVersion("rbac.authorization.k8s.io")
                    .withKind("RoleBinding")
                    .withName("admin")
                    .endRoleRef()
                    .build());

which is trying to grant necessary role binding after project/namespace creation.
This error might be related to the latest changes eclipse-che/che-server#7 or to the upgrade of the client to 5.4.1 eclipse-che/che-server#22 or it's something incompatible with Openshift 4.8.

Can you help me identify the cause?

@skabashnyuk
Copy link
Contributor Author

Thanks to eclipse-che/che#19988 (comment) we found an already known bug https://bugzilla.redhat.com/show_bug.cgi?id=1972687 in OpenShift 4.8 that should be fixed by openshift/openshift-apiserver#219

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant