-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Helm deployer examples still reference artifactOverrides #8002
Comments
With help from @cmeury I was able to get my migration from v1 to v2 to work. The migration required the changed below. Therefore It may be beneficial to others to include this information in the documentation when addressing this issue. ChangesThe
|
As mentioned in the MR, |
Looks like It's unclear to me what Skaffold's new default imageStrategy is when not specifying |
I don't understand how it's supposed to work either @chris13524, did you find out the logic behind the implementation (without cc @aaron-prindle, as mentionned above # example values file where skaffold should replace values for every image it builds
service1:
image:
repository:
tag:
service2:
image:
repository:
tag: I'm using WARN[0025] image [...] is not used. subtask=-1 task=DevLoop
WARN[0025] See helm documentation on how to replace image names with their actual tags: https://skaffold.dev/docs/pipeline-stages/deployers/helm/#image-configuration subtask=-1 task=DevLoop |
@toniopelo hey, I have a similar situation to yours, but I can't get the deploy tag to match that used in build. Can you provide me with a full example of your workaround? # my values.yaml
base:
image:
repository: xxx/base
tag: v1.7.5
pullPolicy: IfNotPresent
webserver:
image:
repository: xxx/webserver
tag: v1.7.5 # skaffold.yaml
apiVersion: skaffold/v3
kind: Config
metadata:
name: myapp
build:
artifacts:
- image: xxx/base
context: ./base
- image: xxx/webserver
context: .
deploy:
helm:
releases:
- name: myapp
createNamespace: true
namespace: dev
chartPath: .
version: 0.1.0
valuesFiles:
- values.yaml
setValueTemplates:
base.image.repository: '{{.IMAGE_NAME}}'
base.image.tag: '{{.IMAGE_TAG}}'
webserver.image.repository: '{{.IMAGE_NAME2}}'
webserver.image.tag: '{{.IMAGE_TAG2}}' $ skaffold dev
Listing files to watch...
- xxx/base
- xxx/webserver
Generating tags...
- xxx/base -> xxx/base:v1.7.5 #notice that this is a git submodule with tree set at tag v1.7.5
- xxx/webserver -> xxx/webserver:32ed75d-dirty
Tags used in deployment:
- xxx/base -> xxx/base:2f007284f8587f4618c03921aa8972a8bfc0a726de9a925d87a4b270d4edd474
- xxx/webserver -> xxx/webserver:bcd5006051826c35e7cd38336593eb6a07c7c48bab4fd0fa3ca4504d1469b9b9
# which then fails because of mismatch |
Adding some more context here. The change to remove
I think some of the context and important information was not conveyed in the current EDIT: from the additional responses below it seems that currently the logic there is not correct for all cases leaving users to manual change entries. Hoping to resolve this with continued conversation here to get a repro case |
@falcorocks I believe the issue you are having is that the tag values: base.image.tag: '{{.IMAGE_TAG}}' should instead be base.image.tag: '{{.IMAGE_TAG}}@{{.IMAGE_DIGEST}}' |
@toniopelo my PR attempted to acccount for Is there possibly an issue in the logic there? |
Created #8057 to track adding more context and migration information to the relevant helm documentation |
Also did users here find that |
Hi @aaron-prindle , yes I'll try to get the "before" and the "after fix" today if I can, unfortunately it's an awkward day where I won't be at my machine much 🙂 |
@alewis001 can you post a redacted version of the EDIT: I see you added some info regarding the "before" and "after fix" at the bottom of your message - that would be great thanks! |
Ha, I just updated my previous comment before you posted. Yes, I'll try to get that today if I can. Unfortunately not at my computer much today so it might be tomorrow. |
thank you @aaron-prindle , but it's still won't work, even in a single image scenario. BTW I'm working with a local kubernetes cluster (k3d) could this be relevant?
$ skaffold dev
Listing files to watch...
- registry.gitlab.com/cyberrs/watcher
Generating tags...
- registry.gitlab.com/cyberrs/watcher -> registry.gitlab.com/cyberrs/watcher:69dae48
Checking cache...
- registry.gitlab.com/cyberrs/watcher: Found. Tagging
Tags used in deployment:
- registry.gitlab.com/cyberrs/watcher -> registry.gitlab.com/cyberrs/watcher:9552842b0246863c7c151716c102822d5dd23ee17fe9c54f9dd26a9ea8e403e5
Starting deploy...
Loading images into k3d cluster nodes...
Images loaded in 84ns
Release "crs-watcher" has been upgraded. Happy Helming!
NAME: crs-watcher
LAST DEPLOYED: Thu Nov 10 10:46:02 2022
NAMESPACE: staging
STATUS: deployed
REVISION: 12
TEST SUITE: None
WARN[0006] image [registry.gitlab.com/cyberrs/watcher:9552842b0246863c7c151716c102822d5dd23ee17fe9c54f9dd26a9ea8e403e5] is not used. subtask=-1 task=DevLoop
WARN[0006] See helm documentation on how to replace image names with their actual tags: https://skaffold.dev/docs/pipeline-stages/deployers/helm/#image-configuration subtask=-1 task=DevLoop
Waiting for deployments to stabilize...
- staging:deployment/crs-watcher-watcher: InspectFailed: Failed to apply default image tag "registry.gitlab.com/cyberrs/watcher:9552842b0246863c7c151716c102822d5dd23ee17fe9c54f9dd26a9ea8e403e5@": couldn't parse image reference "registry.gitlab.com/cyberrs/watcher:9552842b0246863c7c151716c102822d5dd23ee17fe9c54f9dd26a9ea8e403e5@": invalid reference format
- staging:pod/crs-watcher-watcher-858d468b76-wvpb9: InspectFailed: Failed to apply default image tag "registry.gitlab.com/cyberrs/watcher:9552842b0246863c7c151716c102822d5dd23ee17fe9c54f9dd26a9ea8e403e5@": couldn't parse image reference "registry.gitlab.com/cyberrs/watcher:9552842b0246863c7c151716c102822d5dd23ee17fe9c54f9dd26a9ea8e403e5@": invalid reference format |
Hi, Hopefully the attached files are useful. I have removed some profiles as they were just repeats with minor changes but I have left a single profile in each file. Skaffold v1 (api version: v2beta16)The Helm Template When using Skaffold v2 binary, the Helm Template value was Skaffold v2 (api version: v3)This file was generated using Skaffold v2 (api version: v3) - FixedAfter guidance from @cmeury, I made the changes as I mentioned in this comment to produce this file. I.e. Changed the Helm Template to
|
Thanks for the information @alewis001. In reading through this I still trying to understand how the skaffold.v3.yaml.txt file produced which does have it's
Ideally we want to move away from using
setValueTemplates:
image: image-name
setValueTemplates:
image.repository: image-name
image.tag: image-name
setValueTemplates:
image.regsitry: image-name
image.repository: image-name
image.tag: image-name |
It's the I also use the I'll try to collect logs but as I'll have to go through them to redact them, it might take a while to produce. I'll be as quick as I can. |
A bit more digging, and using the output from In the values files for the Helm template, I didn't have a The behaviour is:
So it would appear that using |
The odd behaviour of I did try adding the profile argument back in once I discovered the SS/Deployment issue but as soon as the profile is included, the |
Ah thank you very much for the additional information, I believe I understand the issue now. Now that helm uses Skaffold as a |
I do believe the above is the issue (allowlist/denylist omitting the change when it should not be) but
Still remains though that these lists should not be considerered at all when using skaffold as a |
EDIT: I believe you already shared this above - |
@alewis001, there was an issue with how |
A large doc update explaining how to use helm with Skaffold Feel free to add any comments there if you believe any other information should be added/clarified |
Thanks @aaron-prindle. I'll get the latest code and build skaffold and try out your fix. Hopefully I'll be able to confirm whether or not the profile issue is fixed as well. |
@aaron-prindle I've just tested with a locally built version |
The lack of Skaffold generated
Below are the different Helm commands depending on whether a profile is specified and whether or not the section above is included (Note:
If you need the actual logs, let me know and I'll try to redact them accordingly and get them back to you. |
@alewis001, thanks for the information and your help here. I will look into the profile issue more today. I have created #8100 to track the profile issue specifically, we can move the continued discussion here to that issue. |
I am closing this issue has the helm deployer documentation has been updated to have many more examples including using multiple images and what the equivalent |
for anyone wanted to view this earlier |
See: https://skaffold.dev/docs/pipeline-stages/deployers/helm/#image-configuration (file:
docs-v2/content/en/docs/pipeline-stages/deployers/helm.md
)Coincidentally, it's also mentioned here and in some other places (maybe a global grep might be useful):
examples/helm-deployment/README.md
Also, the alert at the top of the page mentions
artifactsOverride
when in fact the key was calledartifactOverrides
.The text was updated successfully, but these errors were encountered: