-
Notifications
You must be signed in to change notification settings - Fork 707
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
Cannot deploy as user in multicluster mode. An error occurred: Cannot read properties of undefined (reading 'enabled'). #5805
Comments
Seems like a bug, we should be using the optional chaining operator here: kubeapps/dashboard/src/components/DeploymentForm/DeploymentFormBody/DeploymentFormBody.tsx Line 340 in 4a6f250
Like: if (featureFlags?.schemaEditor?.enabled) { To work around it, you can just add the following excerpt in the featureFlags:
schemaEditor:
enabled: false |
With that amendment the same issue still occurs, but only for one user with less permissions. I tested it with two different users to be sure. |
Hi @sfxworks . I'm just looking at this issue, and am wondering what chart version you are using, as you mention the app version is Kubeapps 2.6.2 which was released quite recently, but the
Assuming you are using the 12.1.3 (or .2) chart of the 2.6.2 app release, there must be something else causing that option to not be set for users, but I can't yet see what that would be. Can you please confirm which chart version you are using? I'll add the fix that Antonio mentioned anyway (no loss), but keen to understand. |
Sure, thanks for looking into this.
Also here's the head of our flux helm file. apiVersion: helm.toolkit.fluxcd.io/v2beta1
kind: HelmRelease
metadata:
name: kubeapps
namespace: kubeapps
spec:
interval: 1m
upgrade:
force: true
chart:
spec:
chart: kubeapps
version: '12.1.3'
sourceRef:
kind: HelmRepository
name: bitnami
namespace: default
interval: 1m
values:
featureFlags:
schemaEditor:
enabled: false
Which references
|
Can you please provide a scrubbed version of the rest of your values? When I saw that you're using flux to deploy Kubeapps there, it made me wonder whether you're configuring the flux plugin for Kubeapps (which doesn't support multi-cluster yet, sorry that's not so clear from the docs), but I can't tell without more info (nor would it make any more sense of the error that you see). |
Signed-off-by: Michael Nelson <[email protected]>
Sure, here you go. I'm still waiting on the other user to re-test in the case that cache was involved. Though I'm bringing a few more in to assist. apiVersion: helm.toolkit.fluxcd.io/v2beta1
kind: HelmRelease
metadata:
name: kubeapps
namespace: kubeapps
spec:
interval: 1m
upgrade:
force: true
chart:
spec:
chart: kubeapps
version: '12.1.3'
sourceRef:
kind: HelmRepository
name: bitnami
namespace: default
interval: 1m
values:
featureFlags:
schemaEditor:
enabled: false
clusters:
- name: red
domain: cluster.mcsh.red
apiServiceURL: https://cluster.mcsh.red:6443/
certificateAuthorityData: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUM1ekNDQWMrZ0F3SUJBZ0lCQURBTkJna3Foa2lHOXcwQkFRc0ZBREFWTVJNd0VRWURWUVFERXdwcmRXSmwKY201bGRHVnpNQjRYRFRJeE1ETXdPREUwTlRRd05Wb1hEVE14TURNd05qRTBOVFF3TlZvd0ZURVRNQkVHQTFVRQpBeE1LYTNWaVpYSnVaWFJsY3pDQ0FTSXdEUVlKS29aSWh2Y05BUUVCQlFBRGdnRVBBRENDQVFvQ2dnRUJBTFYwCmlZV002SWUwOE9OdThORTZ0TnpnR2ZmbWNWMVV0cFRwaWJtWk13bEpmWG1FczMxbUFRcmV1TU5kM0k4eDhNVVIKR1ZoUzd2aHNGd2p3TjFwUTg4VVMvTVhPMFFOQjJiQnA3M0VKSlRGMjBybUkvOWZGaklkVE83QW1NTEcwc2lXMApRNktqaHdWY1FxeFhoc1JJRWYwVDFUU2xJWm40cG8xWlhkNm5HUXpZNWtUb0ZHbkhrWkpQS1Z4M3M3MWE5VlR3Ck9OdXV5MHkzWEtwdWxQZm9EbDN6cHZVYjkvajhOWWMwQzJ2RzZrcm9IWDVNb3NJaTVMTDE5RFF2NHVTZzlNdGUKUWVpbzl0Unh4M1RHUGtTV0dBUTMxUlhlY21Tckw0MEo3bWdxclpaSXhhNlZrU3RZSFRLV1hvcDE1OHNDK3R4TAplbjJOWnBaVjIvSG9YMUY2dE9jQ0F3RUFBYU5DTUVBd0RnWURWUjBQQVFIL0JBUURBZ0trTUE4R0ExVWRFd0VCCi93UUZNQU1CQWY4d0hRWURWUjBPQkJZRUZGWnpIVUZiUDQ1RjNPOXFVNERLRUlzTFY4MWNNQTBHQ1NxR1NJYjMKRFFFQkN3VUFBNElCQVFBcndGYmI1TjBxdk1LSnE4SzV6ekY2d1AxbFVUMGVWLy9udTRsRzhKMWRmZHFQRDlmZQpIS0lyUitLalhIZ2xyZURLV1JSUTBSTTAwSVA4R3hXT1NXMEwwT3dtYzlWY1FhUGx5dTI1VzBsZ24rYkhkZ2o4CkJHVmZKL1hubVRMeTRjbDR5ZnEySmhPeDM0ZkgwWVhSTG1EYTNKTmlxNWVkN2hQejNRNHI3dWR3cGxqb1ZHT08KcHNTZlI1eHpyWlFpS3ZMbkIvbUZxTm9jNHl2U004d0dxQXlVaHNiak43M0RscXZwTHRvekU2WkFXUHQ1VEtsTQpiNEpLVmZHNXRTYmdGUk1BMGNiU0YvYkQ2MlN2U2RpMitrZ0tjeUU2YUFBbFhUcnVuYm9nUDg5OFJCNHErUVU1CmRUdW1BQThFZzlscHM1NkFBZHNkTlBFcllxTjdWaHRQeUsrSwotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCg==
serviceToken: snip
- name: office
domain: cluster.local
frontend:
nodeSelector:
beta.kubernetes.io/arch: amd64
service:
type: LoadBalancer
ingress:
enabled: true
hostname: kubeapps.service.mcserverhosting.net
ingressClassName: nginx
tls: true
annotations:
cert-manager.io/cluster-issuer: letsencrypt-prod
nginx.ingress.kubernetes.io/proxy-buffer-size: "16k"
authProxy:
enabled: true
scope: "openid email"
provider: oidc
clientID: account
clientSecret: "snip"
cookieSecret: "snip"
extraFlags:
- "--cookie-secure=false"
- "--oidc-issuer-url=https://auth.service.mcserverhosting.net/realms/mcsh"
dashboard:
nodeSelector:
beta.kubernetes.io/arch: amd64
apprepository:
initialRepos:
- name: mcshservers
url: https://registry.service.mcserverhosting.net/chartrepo/servers
nodeSelector:
beta.kubernetes.io/arch: amd64
kubeops:
nodeSelector:
beta.kubernetes.io/arch: amd64
kubeappsapis:
nodeSelector:
beta.kubernetes.io/arch: amd64 |
Signed-off-by: Michael Nelson <[email protected]> <!-- Before you open the request please review the following guidelines and tips to help it be more easily integrated: - Describe the scope of your change - i.e. what the change does. - Describe any known limitations with your change. - Please run any tests or examples that can exercise your modified code. Thank you for contributing! --> ### Description of the change <!-- Describe the scope of your change - i.e. what the change does. --> Ensures that deployment form can still display even if the schemaEditor feature flag is not set. ### Benefits <!-- What benefits will be realized by the code change? --> Fixes the immediate error shown for #5805, though I'm not convinced it'll be the only error (it's still not clear why the configuration options would not be set). ### Possible drawbacks <!-- Describe any known limitations with your change --> ### Applicable issues <!-- Enter any applicable Issues here (You can reference an issue using #) --> - fixes #5805 ### Additional information <!-- If there's anything else that's important and relevant to your pull request, mention that information here.--> Signed-off-by: Michael Nelson <[email protected]>
Describe the bug
A user with cluster-admin permissions in a namespace trying to deploy against another cluster cannot do so
To Reproduce
Steps to reproduce the behavior:
Expected behavior
User can see the deployment options and click deploy
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
For reference I, the cluster admin of both clusters, was not able to reproduce this issue. A user pointed this out to me.
The text was updated successfully, but these errors were encountered: