-
Notifications
You must be signed in to change notification settings - Fork 239
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
Fleet Test Flag Cannot Find Match #1385
Comments
Indeed, the test command can only match on clustername/group/labels ( In the first mode, if no argument is passed, it uses "default" as a cluster group. However, 'fleet test' doesn't look at actual clusters. Furthermore, when called with You can load a full bundle with In general, I'm still not sure what |
Also see #527 |
With 0.7.0 it still seems like if a targetCustomization is defined, it is not possible to test against the default. |
Yeah this is super important, and a glaring gap in Fleet today. The fact that one has to commit changes to a Bundle and then actually attempt to deploy it to a test cluster, just to validate that changes to fleet.yaml are working as expected, is not great. As OP noted, we really need a comprehensive way of rendering the output of a Fleet Bundle for a particular cluster, when in an isolated test environment (or e.g. on your workstation). This would then allow us to write tests around that, to ensure that targetCustomizations are being matched as expected, and that the resulting resources contain the desired changes. It also would let us test the full Kustomize/Helm rendering pipeline and not just "hope" that it works once deployed. |
I'm experimenting with two new fleet CLI sub-commands: "target" and "deploy". The second command "deploy" takes the output of target, or a dumped bundledeployment/content resource and deploys it to a cluster, just like fleet-agent would. It supports a dry run mode, to print out the resources which would be created, instead of installing them with helm. Since the command doesn't create the input resources, a running fleet-agent would likely garbage collect the deployment. I'm still investigating how to deal with manually created deployments. I think adopt or ignore are the most useful options. Both commands are currently prototypes, but they should behave like the controllers do. |
fleet target and fleet deploy --dry-run have been merged and will be in 2.9.1 |
Is there an existing issue for this?
Current Behavior
We are attempting to utilize the
fleet
CLItest
command to validate ourfleet.yaml
and generated content in our pipeline. Currently, at v0.5.3, running thefleet test
command against afleet.yaml
that has one item undertargetCustomizations
will fail unless we specify the name of the one target. I would expect to match on "default" if no targets are passed or if "default" is specifically targetted.Expected Behavior
I expect the default target to be selected or have the ability to select the default target if there are items under
targetCustomizations
.Steps To Reproduce
fleet.yaml
in the same directory asfleet-linux-amd64
fleet.yaml
without a target or withdefault
as targettargetCustomizations
Environment
Logs
No response
Anything else?
Thank you! Much appreciate all the community engagement we have.
The text was updated successfully, but these errors were encountered: