-
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
Skaffold generates strange warnings when running with many profiles #3277
Comments
Fix GoogleContainerTools#3277 Signed-off-by: David Gageot <[email protected]>
I see that there is a pr to address the warning issue I am also seeing, but I can't seem to get passing multiple profiles to work as the documentation and the op suggests. I am on version 1.0.1 of Skaffold and running macOS Mojave.
Running any of the below does not work.
There are no errors (except a very lengthy WARN message that times out on deployment), but it just seems to ignore anything other than the last item in the comma separated list or the last argument passed to -p. It also appears that setting the |
@dgageot I see you created a fix for that issue. Thank you very much! Hash from the whole profiles string will actually change with the profiles string, but trimmed string will not, if changes were made after "trim point". |
Fix GoogleContainerTools#3277 Signed-off-by: David Gageot <[email protected]>
I experience the same behaviour with skaffold 1.0.1 on macOs 10.15.1. Also, this bug makes
useless, since it blocking the manual profile selection. |
Fix GoogleContainerTools#3277 Signed-off-by: David Gageot <[email protected]>
* 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]>
@dgageot The bug is still in place, tried skaffold dev -p rails -p core -p api
skaffold dev --profile=rails,core,api
skaffold dev -p=rails,core,api
skaffold dev -p rails,core,api and always got only the latest profile executed, while the others were omitted with out any warning. |
@kvokka your bug is actually not relative to this issue, but you can see this comment: Possibly you have not If so, I found temporary workaround until this get fixed: you can fill top-level sections with some dummy values, and that will make your profiles work. |
@petr-buchin Merry Christmas! Thank you for such a quick response. But unfortunately this hack did not work, tried skaffold build -p api,core
skaffold dev -p api,core In both cases i got only the action for Will provide fill apiVersion: skaffold/v2alpha1
kind: Config
build:
tagPolicy:
gitCommit: {}
artifacts:
- image: us.gcr.io/replay-gaming/rails
docker:
dockerfile: docker/development/Dockerfile
context: rails
sync:
# switch to `infer` syntax after https://github.com/GoogleContainerTools/skaffold/issues/3376
manual:
- src: 'app/**/*'
dest: '.'
- src: 'bin/**/*'
dest: '.'
- src: 'db/**/*'
dest: '.'
- src: 'lib/**/*'
dest: '.'
- src: 'public/**/*'
dest: '.'
- src: 'script/**/*'
dest: '.'
- src: 'spec/**/*'
dest: '.'
- image: us.gcr.io/replay-gaming/poker-core
docker:
dockerfile: docker/development/Dockerfile
context: core
sync:
# switch to `infer` syntax after https://github.com/GoogleContainerTools/skaffold/issues/3376
manual:
- src: 'bin/**/*'
dest: '.'
- src: 'db/**/*'
dest: '.'
- src: 'lib/**/*'
dest: '.'
- src: 'system/**/*'
dest: '.'
- src: 'schemas/**/*'
dest: '.'
- image: us.gcr.io/replay-gaming/poker-api
docker:
dockerfile: docker/development/Dockerfile
context: api
sync:
# switch to `infer` syntax after https://github.com/GoogleContainerTools/skaffold/issues/3376
manual:
- src: 'bin/**/*'
dest: '.'
- src: 'src/**/*'
dest: '.'
- src: 'tests/**/*'
dest: '.'
- image: us.gcr.io/replay-gaming/poker-client
docker:
dockerfile: docker/development/Dockerfile
context: client
sync:
# switch to `infer` syntax after https://github.com/GoogleContainerTools/skaffold/issues/3376
manual:
- src: 'bin/**/*'
dest: '.'
- src: 'public/**/*'
dest: '.'
- src: 'src/**/*'
dest: '.'
deploy:
helm:
releases:
- name: rails
chartPath: rails/charts/rails
valuesFiles:
- rails/charts/rails/values.development.yaml
skipBuildDependencies: true
values:
'image.name': us.gcr.io/replay-gaming/rails
- name: core
chartPath: core/charts/poker-core
valuesFiles:
- core/charts/poker-core/values.development.yaml
skipBuildDependencies: true
values:
'repository.image': us.gcr.io/replay-gaming/poker-core
- name: api
chartPath: api/charts/poker-api
valuesFiles:
- api/charts/poker-api/values.development.yaml
skipBuildDependencies: true
values:
'image.repository': us.gcr.io/replay-gaming/poker-api
profiles:
- name: dependencies
deploy:
helm:
releases:
#TODO: move it to some other path instead
- name: redis
chartPath: stable/redis
remote: true
valuesFiles:
- support/skaffold/minikube/redis.yaml
- name: postgresql
chartPath: stable/postgresql
remote: true
valuesFiles:
- support/skaffold/minikube/postgresql.yaml
- name: memcached
chartPath: stable/memcached
remote: true
valuesFiles:
- support/skaffold/minikube/memcached.yaml
- name: mysql
chartPath: stable/mysql
version: ~1.6.1
remote: true
valuesFiles:
- support/skaffold/minikube/mysql.yaml
# TODO: whap it in helm chart
- name: pubsub_emulator
build:
artifacts:
- image: us.gcr.io/replay-gaming/pubsub-emulator
docker:
dockerfile: support/skaffold/pubsub_emulator/Dockerfile
deploy:
kubectl:
manifests:
- support/skaffold/pubsub_emulator/k8s.yaml
- name: rails
build:
artifacts:
- image: us.gcr.io/replay-gaming/rails
docker:
dockerfile: docker/development/Dockerfile
context: rails
sync:
# switch to `infer` syntax after https://github.com/GoogleContainerTools/skaffold/issues/3376
manual:
- src: 'app/**/*'
dest: '.'
- src: 'bin/**/*'
dest: '.'
- src: 'db/**/*'
dest: '.'
- src: 'lib/**/*'
dest: '.'
- src: 'public/**/*'
dest: '.'
- src: 'script/**/*'
dest: '.'
- src: 'spec/**/*'
dest: '.'
deploy:
helm:
releases:
- name: rails
chartPath: rails/charts/rails
valuesFiles:
- rails/charts/rails/values.development.yaml
skipBuildDependencies: true
values:
'image.name': us.gcr.io/replay-gaming/rails
- name: core
build:
artifacts:
- image: us.gcr.io/replay-gaming/poker-core
docker:
dockerfile: docker/development/Dockerfile
context: core
sync:
# switch to `infer` syntax after https://github.com/GoogleContainerTools/skaffold/issues/3376
manual:
- src: 'bin/**/*'
dest: '.'
- src: 'db/**/*'
dest: '.'
- src: 'lib/**/*'
dest: '.'
- src: 'system/**/*'
dest: '.'
- src: 'schemas/**/*'
dest: '.'
deploy:
helm:
releases:
- name: core
chartPath: core/charts/poker-core
valuesFiles:
- core/charts/poker-core/values.development.yaml
skipBuildDependencies: true
values:
'repository.image': us.gcr.io/replay-gaming/poker-core
- name: api
build:
artifacts:
- image: us.gcr.io/replay-gaming/poker-api
docker:
dockerfile: docker/development/Dockerfile
context: api
sync:
# switch to `infer` syntax after https://github.com/GoogleContainerTools/skaffold/issues/3376
manual:
- src: 'bin/**/*'
dest: '.'
- src: 'src/**/*'
dest: '.'
- src: 'tests/**/*'
dest: '.'
deploy:
helm:
releases:
- name: api
chartPath: api/charts/poker-api
valuesFiles:
- api/charts/poker-api/values.development.yaml
skipBuildDependencies: true
values:
'image.repository': us.gcr.io/replay-gaming/poker-api |
@kvokka your issue is actually even simpler :) According to the Skaffold documentation, when you provide But you could use json patch to get it working. Here is the docs page: https://skaffold.dev/docs/environment/profiles/ You should look at Override via patches header here. Your profile may look something like that: profiles:
- name: pubsub_emulator
patches:
- op: add
path: /build/artifacts/-
value:
image: us.gcr.io/replay-gaming/pubsub-emulator
docker:
dockerfile: support/skaffold/pubsub_emulator/Dockerfile
- op: add
path: /deploy/kubectl/manifests/-
value: support/skaffold/pubsub_emulator/k8s.yaml |
Thank you for the advise, @petr-buchyn . apiVersion: skaffold/v2alpha1
kind: Config
build:
artifacts: []
deploy:
helm:
releases: [] I can not use $ skaffold build -p api
FATA[0000] creating runner: applying profiles: applying profile api: invalid path: /build/artifacts/- Adding some value to |
Expected behavior
I expect Skaffold to run in
dev
-mode without errors and warnings, when configured correctlyActual behavior
We use Skaffold to develop locally a big platform, which consists from many services.
We use Helm as our deployer.
We have separate profiles for different services in
skaffold.yaml
, therefore our skaffold command looks like following:However, after Helm completes deploy, skaffold starts to generate errors like following:
This warnings are generated for every single resource we have: configmaps, secrets, roles, role bindings and so on, and the label value is the names of our skaffold profiles, concatenated with
__
(to underscores), in order, in which they appear in ourskaffold.yaml
.Information
Steps to reproduce the behavior
Skaffold command:
skaffold dev -p=profile-one,profile-two,profile-three,profile-n --cache-artifacts=true --auto-build=false --auto-deploy=false --rpc-http-port=50070
Actual number of profiles, specified in command, is bigger than three, of course.
The text was updated successfully, but these errors were encountered: