-
Notifications
You must be signed in to change notification settings - Fork 41
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
kbld fails on image:
field in Kyverno CRD
#344
Comments
This issue is being marked as stale due to a long period of inactivity and will be closed in 5 days if there is no response. |
I had a similar problem and it took me awhile to find a solution, so dumping this here for others: I am using tekton, and their It includes these lines:
Which would normally get populated by Tekton TaskRun parameters. However, kbld sees the image tag and wants to build it, and then exits with the complaint In my case, I was able to use the
This allowed my kbld command to complete successfully. |
Sorry for letting this issue stale 😞 I will try to be more proactive here to ensure this doesn't happen. I believe this is not a bug but a new feature we might want to add to kbld. What kbld should have is a way to say that you want to ignore a particular field from being processed. ---
apiVersion: kbld.k14s.io/v1alpha1
kind: Config
sources:
...
ignore:
- image: image: "$(params.gitInitImage)" It would be a better suit for you all's use case. |
As a way to resolve the issue, I prefer the original poster's solution: if kbld can't process a field, it could print a warning and just leave the field alone. This is reasonable behavior, because there are only two outcomes here:
You might add a "fail on warning" case for folks who do not expect any warnings and the presence of one indicates a mistake. I'm not sure the additional configuration would be that useful. The existing config can already be used to "ignore" one-off cases (in the way I've configured it). That said, if the ignore was to accept regex that might be more useful, e.g., you could ignore everything with a $. |
I am convinced. From a backward compatible point of view, I like having a flag that is
If there is any other type of error like it cannot find the image or there is a registry error we should just error out. |
Are yll ok with the change I proposed above? |
This issue is being marked as stale due to a long period of inactivity and will be closed in 5 days if there is no response. |
Sounds fine to me, but because I solved my problem (with the workaround), I never thought about this again (I haven't done that much more carvel stuff yet, and I guess I have my github notifications set up to mail me on close only .. :) ) I am now too far away from the use cases to say for certain if what you proposed re: error vs warn would have been an issue, I think intuitively, it makes sense, the case I care about is going to be where I want to pass through a token to later configure, so it definitely won't look like anything that can be parsed as a url. |
What do you mean by:
|
This issue is being marked as stale due to a long period of inactivity and will be closed in 5 days if there is no response. |
By "token", I meant the string that I later want a different template processor to render, like e.g. above What I meant is that any string I use will probably never parse as a URI, so therefore, only warning on non-parse, but erroring on successful parse if there are later failures would work fine for my use case. |
What steps did you take:
I want to digest-ify all my images in all my manifests, but kbld fails ungracefully on
image:
fields that don't contain image strings in my CRDs. That might seem weird, but it shows up a lot in admission control in the form of regexps. This prevents me from effectively using the tool at the moment.I included a heredoc of the specific offending document, but obviously I am running this against a big
manifest.yaml
file. I would like kbld to have acontinue on error
behaviour where it does as much as it can and produces warnings rather than failures in these situations.What happened:
This produces the error
What did you expect:
I would expect a warning rather than an error, with an otherwise modified file. E.g.
I'm OK with needing a flag like
--no-fail
in order to achieve thisEnvironment:
0.36.4
, installed from brew, darwin/arm64Vote on this request
This is an invitation to the community to vote on issues, to help us prioritize our backlog. Use the "smiley face" up to the right of this comment to vote.
👍 "I would like to see this addressed as soon as possible"
👎 "There are other more important things to focus on right now"
We are also happy to receive and review Pull Requests if you want to help working on this issue.
The text was updated successfully, but these errors were encountered: