-
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
ability to set default repo from profile #2317
Comments
cc @tejal29 |
quick ping on this one. We are starting a new project, and the global default repo is not helping us to expand easily. |
Yes the global default repo is definitely causing us some debugging time and only find out it's not any mis-configurations in the project itself. |
Thanks @saturnism. This is on our team's radar. Bumping priority to p1. |
This is still on the roadmap! |
Hi! It's been a while since we've updated on this. Recently we've been talking about what we want to do with default-repo, as its functionality is currently confusing for a lot of users. I believe we're trying to hammer out those issues before we prioritize this, but we're definitely still looking into this :) |
Any updates on this? Being able to control this via profiles would be very beneficial for us. We have multi artifact cases where artifact A needs to go to repo 1 for profile dev/repo 2 for profile prod and artifact B needs to go to repo 3 for profile dev/repo 4 for profile prod. In these cases the command line arg won't work and I can't come up with a reasonably good workaround at all. |
Currently, we don't have plans to support this in v1, v2 skaffold config. |
Refer #5857 for v3 config tracking issue |
Interested in this as well. We recently removed the need for namespaces in our app which gave us a lot of flexibility to point skaffold at per-developer and per-PR namespaces. Would be cool to have the same flexibility at the project / cluster / gcr level. |
Thanks @dhodun We will definitely share stuff internally once we have v3 schema ready |
Totally agree. It would be very useful: build:
artifacts:
- image: myapp
docker:
dockerfile: build/myapp/Dockerfile
profiles:
- name: dev
deploy:
defaultRepo: 127.0.0.1:5000 <---
kubeContext: minikube
kustomize:
defaultNamespace: default
paths:
- deploy/myapp/overlays/dev |
Missing the mentioned funcionality and please include at least
I find very odd that there's global options that you can't configure in a config file and have the globals as an override instead (similar to env vars). |
If we can get to a good design / specs I'd be happy to work on an implementation. @tejal29 @briandealwis Approach 1: Profile onlyI suggest to introduce a field Order of precedence would be:
We need to decide on what should happen when two or more profiles set a Approach 2: Build settingAdd a new setting The order of precedence would be roughly the same as approach 1. |
Also: should we consider renaming it |
chiming in because I could really use setting |
In Skaffold v2.2.0, you can now set |
I don't have an issue setting the default repo, I have an issue having to put |
@gsquared94 Sorry for the late reply! |
We'd love to see the "default repository" feature reimagined to be implemented within profiles. The thing is, the concept of a global "default repository" for all skaffold projects on one computer never really made sense. That's already acknowledged by 1) detecting docker-desktop and pushing to the correct registry in that case and 2) the ability to set default-repo at for each kube context in your I have many skaffold projects at this point, and none of them share the same repository. And within those projects, I have several profiles which each need to push to different repositories (sometimes targeting different k8s clusters as well), because we have a pattern where we like to have different kustomize overlays for dev/staging/prod which each push to different registries (and/or clusters as the situation demands). This helps us keep each of those environments in different stages of the release cycle, and by having a different registry for each, there can be no confusion about what version of the build is deployed where at any given time. If you are deploying to Cloud Run (and I assume other targets in the future), you don't even have the option to specify a kubectx, your only option is to invoke
The problem with this is that I (and anyone else I pass this project off on to) needs to remember to set the environment variable or use the Even just allowing me to manually specify the artifact as a patch would be a great improvement: apiVersion: skaffold/v4beta6
kind: Config
build:
artifacts:
- image: app
context: .
manifests:
kustomize:
paths:
- .cloudrun/overlays/dev
profiles:
- name: dev
- name: staging
patches:
- op: replace
path: /manifests/kustomize/paths/0
value: .cloudrun/overlays/staging
# allow me to manually specify the artifact!
- op: replace
path: /build/artifacts/0/image
value: really.long-difficult-to.us-central1.io/remember-name/app |
Hi everyone, thanks for the discussion on this topic!
Is there another, perhaps more elegant workaround to this limitation? |
currently, the default repo can be associated w/ a kubecontext and is stored in
$HOME/.skaffold/config
. It would be useful if the default repo is configured from skaffold profile.The text was updated successfully, but these errors were encountered: