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

🐛 Bug Report: Config validation does not allow for custom k8s authProvider #26958

Closed
2 tasks done
Jenson3210 opened this issue Oct 3, 2024 · 0 comments · Fixed by #26960
Closed
2 tasks done

🐛 Bug Report: Config validation does not allow for custom k8s authProvider #26958

Jenson3210 opened this issue Oct 3, 2024 · 0 comments · Fixed by #26960
Labels
area:kubernetes Related to the Kubernetes Project Area - not deploying Backstage with k8s. bug Something isn't working

Comments

@Jenson3210
Copy link
Contributor

Jenson3210 commented Oct 3, 2024

📜 Description

After changing our default authProvider from serviceAccount to a custom one as explained in the docs, our production version fails to start.

With
authStrategy.addAuthStrategy('pinniped', pinnipedStrategy);
it will be required to have in the app-config.production.yaml

kubernetes:
  serviceLocatorMethod:
    type: 'singleTenant'
  clusterLocatorMethods:
    - type: 'config'
      clusters:
        - url: ...
          name: ...
          authProvider: pinniped

NOTE: it does not need to be pinniped but this string might be any other possibility.

👍 Expected behavior

Startup succeeds and uses the provided authProvider.

👎 Actual Behavior with Screenshots

Loading config from MergedConfigSource{FileConfigSource{path="/app/app-config.yaml"}, FileConfigSource{path="/app/app-config.production.yaml"}, EnvConfigSource{count=0}}
...
throw new errors.ForwardedError(
^
Error: Plugin 'app' startup failed; caused by Error: Invalid app bundle schema. If this error is unexpected you need to run `yarn build` in the app. If that doesn't help you should make sure your config schema is correct and rebuild the app bundle again. Caused by the following schema error, Error: Config validation failed, Config must be equal to one of the allowed values { allowedValues=aks,aws,azure,google,googleServiceAccount,oidc,serviceAccount } at /kubernetes/clusterLocatorMethods/0/clusters/0/authProvider; Config must be equal to one of the allowed values { allowedValues=aks,aws,azure,google,googleServiceAccount,oidc,serviceAccount } at /kubernetes/clusterLocatorMethods/0/clusters/1/authProvider; Config must be equal to one of the allowed values { allowedValues=aks,aws,azure,google,googleServiceAccount,oidc,serviceAccount } at /kubernetes/clusterLocatorMethods/0/clusters/2/authProvider; Config must be equal to constant { allowedValue=catalog } at 

Config must be equal to one of the allowed values { allowedValues=aks,aws,azure,google,googleServiceAccount,oidc,serviceAccount }

Do I miss documentation on how to extend the schema OR is this simply not possible?

👟 Reproduction steps

Just follow the docs for custom authProvider.

Configure the yaml to use this provider.

📃 Provide the context for the Bug.

🖥️ Your Environment

No response

👀 Have you spent some time to check if this bug has been raised before?

  • I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

Are you willing to submit PR?

Yes I am willing to submit a PR!

@Jenson3210 Jenson3210 added the bug Something isn't working label Oct 3, 2024
@benjdlambert benjdlambert added the area:kubernetes Related to the Kubernetes Project Area - not deploying Backstage with k8s. label Oct 7, 2024
@freben freben closed this as completed in bee9664 Nov 5, 2024
jroebu14 pushed a commit that referenced this issue Nov 18, 2024
Closes: #26958
Signed-off-by: Jente Sondervorst <jentesondervorst@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:kubernetes Related to the Kubernetes Project Area - not deploying Backstage with k8s. bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants