GoogleContainerTools / GoogleContainerTools/skaffold

Profile from skaffold env is not overwritten by profile command line switch

Open
#8,627 0 comments 0 reactions 0 assignees View on GitHub
area/env-vars area/profiles kind/bug priority/p2
Dominant language
Go
Stars
15.9k
Forks
1.7k
Avg merge
3d 9h
Merged PRs (30d)
10

Description

### Expected behavior
![image](https://user-images.githubusercontent.com/4302467/229539101-cf7c3941-de6b-4c90-bd81-39bc265f5221.png)
When a Profile is specified through the SKAFFOLD_PROFILE variable inside skaffold.env then it should get overwritten when skaffold is called with the -p switch on the command line.

### Actual behavior
The profile specified in the skaffold.env file is not overwritten by the command line argument. The profile in the skaffold.env file will also get used.

### Information

- Skaffold version: v2.2.0
- Operating system: Windows 10 using rancher-desktop and dockerd
- Installed via: skaffold.dev

### Steps to reproduce the behavior
When I use a skaffold.env file and set the profile to use like this:
```
SKAFFOLD_PROFILE=all
```
Then it always uses this profile. Also when I try to overwrite this setting by starting skaffold with `skaffold dev -p someProfile`.
I think this is due to the additive behaviour of the profiles argument. But in this case it is not that useful.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.