-
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
[Proposal] Add Helm support to skaffold init
#1726
Comments
if I'm understanding correctly there would be different implementations of the also, returning the list of images to build isn't the full story. we also need the list of Dockerfiles (or .bzl files or whatever) to build those images, and then take input from the user to match them up. |
That is correct, i was going to rely on files present.
I was thinking of that too. I do like that idea. Adding a hint on command like would help resolve conflicts.
That is correct, however determining the list Dockerfiles logic should remain the same irrespective of the Deploy Tool unless i am missing something. Hence it is not part of the Initializer Interface.
and then in skaffold/pkg/skaffold/initializer/init.go
Does that make sense? |
Did you consider adding the Initializer as part of the |
I did not consider as from the code it felt like the Deployer Interface was very specific to how to deploy.
Most of this information like workingDir, Kubectl context and default are not part of the latest.DeployConfig and determined in pkg/skaffold/runner/runner.go. If, i use the same Deployer interface, it will look something like this for KubectlDeployer.
The Deployer interface will be
The init flow will now be
This looks like a smaller change and i like it better now. |
Thank you so much for digging into this. I agree that keeping the first approach (separate |
I'm not sure why we closed this :) |
I am trying to run "skaffold init" for a docker-compose.yml file using the below command and it fails with "Invalid k8s yaml" error.
Please find below the error:
As @tejal29 mentioned in the issue #1651 (comment), please share the skaffold init command with deploy type as helm if available or any alternative to resolve this issue. |
skaffold init
skaffold init
I'm still not convinced that this is necessary, but would love to hear some feedback. Narrowing the issue down to a single deployer. |
Closing this in favor of #3768 |
In issue #1651, @soullivaneuh tried running
skaffold init
in his code base which useshelm
deployer.He discovered a bug, where
skaffold init
ran into an error.See details here
This Proposal is to support all the deploy tools that skaffold supports which are
helm
,kubectl
andkustomize
inskaffold init
flow.Currently, we only support
kubectl
deployer and generate skaffoldKubeCtlDeployConfig
.This Proposal is to add a new Initializer Interface,
The interface will provide 2 methods.
This method will generate the deploy config for skaffold configuration for each supported deploy tool.
kubectl:
manifests:
- k8-*
helm::
releases:
- name: release-name
chartPath: .
kustomize: {}
This method will return a list of images used in corresponding manifest files for the deploy tool.
In case of kubectl, these will a list of images defined in
image
tag defined in k8 yaml.For helm, this would be the images defined in
values.yaml
.(in case of helm, i haven't really thought about how to grab those yet. But we could use a norms like,
e.g. gocontainer registry name.ParseReference
These images are required to generate BuildConfig.
Right now, all skaffold initialization happens in
cmd/skaffold/app/cmd/init.go
I plan to refactor this as follows:
e.g.: pkg/skaffold/initializer/kubectl, pkg/skaffold/initializer/helm, pkg/skaffold/initializer/kustomize,
The text was updated successfully, but these errors were encountered: