You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have some profiles with kubecontext activation in our skaffold configs but have other profiles ('testing' for example) that are unable to run even when running skaffold run -p test because the kubecontext activation seems to override that profile.
It is a common pattern for runtime flags to take precedence of more 'implicitly set' values like a config file or the default values. Skaffold seems to break this assumption/pattern
Actual behavior
At least with kubeContext activations (haven't tested with others), the profile with that activation will be triggered as opposed to the profile explicitly set with -p/--profile [PROFILE NAME]. Also, documentation doesn't make it clear if two profiles would run at once if activation would trigger both of them (I am aware that one can explicitly run more than one profile, not sure if this works with activations as well).
Finally skaffold should probably print to stdout what profile is using as this would aid a lot in troubleshooting such issues.
Information
Skaffold version: v0.36.0
Operating system: both observed in macOS 10.14.6 and Debian Stretch docker container
Steps to reproduce the behavior
I cannot post specific kubeContext values here but a skaffold.yaml with two profiles should reproduce this easily:
One profile ('profile-a') can deploy service a and have a kubeContext activation
The other one ('profile-b') can deploy service b and have no activation
Running skaffold deploy -p profile-b with the Kubernetes context of profile a as the current context will deploy service a and NOT service b
The text was updated successfully, but these errors were encountered:
Thank you for opening @botwhytho - this should be relatively easy to fix and I agree that we are breaking here a conventional pattern. @dgageot you want to take a shot at this, I see you self-assigned?
dgageot
added a commit
to dgageot/skaffold
that referenced
this issue
Nov 21, 2019
* Profile activated with flag override auto-activated profiles
Fix#3261
Signed-off-by: David Gageot <[email protected]>
* Fix long label made of profile names
Fix#3277
Signed-off-by: David Gageot <[email protected]>
Expected behavior
We have some profiles with kubecontext activation in our skaffold configs but have other profiles ('testing' for example) that are unable to run even when running
skaffold run -p test
because the kubecontext activation seems to override that profile.It is a common pattern for runtime flags to take precedence of more 'implicitly set' values like a config file or the default values. Skaffold seems to break this assumption/pattern
Actual behavior
At least with kubeContext activations (haven't tested with others), the profile with that activation will be triggered as opposed to the profile explicitly set with
-p/--profile [PROFILE NAME]
. Also, documentation doesn't make it clear if two profiles would run at once if activation would trigger both of them (I am aware that one can explicitly run more than one profile, not sure if this works with activations as well).Finally skaffold should probably print to stdout what profile is using as this would aid a lot in troubleshooting such issues.
Information
Steps to reproduce the behavior
I cannot post specific kubeContext values here but a skaffold.yaml with two profiles should reproduce this easily:
kubeContext
activationskaffold deploy -p profile-b
with the Kubernetes context of profile a as the current context will deploy service a and NOT service bThe text was updated successfully, but these errors were encountered: