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

Improve error messaging on unsupported resource types #31

Closed
sujaya-sys opened this issue Sep 5, 2024 · 0 comments
Closed

Improve error messaging on unsupported resource types #31

sujaya-sys opened this issue Sep 5, 2024 · 0 comments
Labels
good first issue Good for newcomers

Comments

@sujaya-sys
Copy link
Contributor

Context

score-k8s does currently not support an "environment" resource. In a recent community meeting we discussed the following:

  1. Until we have a clear idea of how to interpret "environment" in score-k8s (possibly a config map?) we'd recommend users to implement a custom resource provisioner for their use case. This is being discussed in Support of the environment resource? #24

  2. Additionally do we want to improve our error messaging to make this more clear. This is the improvement we'd like to tackle as part of the present issue

How to reproduce

Set up a Score spec with an environment resource, for example

apiVersion: score.dev/v1b1
metadata:
  name: my-sample-workload
containers:
  my-sample-container:
    image: .
    variables:
      ENV_VAR: ${resources.env.my-env-var}
resources:
 env:
  type: environment

Run score-k8s

score-k8s init
score-k8s generate score.yaml

You will receive this error:

Error: failed to provision resources: resource 'environment.default#my-sample-workload.env' is not supported by any provisioner

Requirements

Improve error message to

Error: failed to provision resources: The resource 'environment.default#my-sample-workload.env' is not supported by any existing provisioner. Please implement a custom resource provisioner to support this resource type.

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

No branches or pull requests

2 participants