Commit Graph

160 Commits (main)

Author SHA1 Message Date
Milas Bowman 7697699e65
fix: skip remote Kustomizations on recursive diff
When recursively diffing Kustomization objects on a cluster, each
Kustomization is built and then a server-side dry-run apply is
performed. This isn't practical to perform if the Kustomization
references a remote cluster via `kubeConfig.secretRef`.

Currently, because it's not skipped, it's treated as though it's
being applied to the context cluster, not the remote cluter, which
results in an incorrect diff.

Instead, write out special message / warnings indicating that it
has been skipped:
```
► Kustomization/my-ns/my-kst skipped: diff not supported for remote clusters
```

Signed-off-by: Milas Bowman <devnull@milas.dev>
2 months ago
h3nryc0ding 9abc802f15 fix: error message for missing kind
Signed-off-by: h3nryc0ding <101796272+h3nryc0ding@users.noreply.github.com>
Signed-off-by: h3nryc0ding <hr.richterhenry@gmail.com>
2 months ago
Stefan Prodan c7daf6466f
Promote `bucket` commands to GA
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
4 months ago
Dipti Pai a4ef1f6992 Flux CLI change to add provider field to GitRepository spec.
- Add provider flag to `flux create source git` command with supported values: azure, generic.

- Unit tests validating the generated yaml and error conditions.

Signed-off-by: Dipti Pai <diptipai89@outlook.com>
4 months ago
Boris Kreitchman 2d37544b06 Recursively build and diff Kustomizations
Signed-off-by: Boris Kreitchman <bkreitch@gmail.com>
4 months ago
Boris Kreitchman 170e4f6f57 Stop spinner on cancel
Signed-off-by: Boris Kreitchman <bkreitch@gmail.com>
5 months ago
Viktor Nagy fabdbaaf92 Introduce visibility flag for bootstrap gitlab
Signed-off-by: Viktor Nagy <vnagy@gitlab.com>
6 months ago
Stefan Prodan 8856de1478
Update `HelmRelease` API to v2
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
8 months ago
Max Jonas Werner 18d5ec4ecd
Add `(create|delete|export) source chart` commands
The `create source chart` command supports all HelmChart.spec fields
except `.valuesFiles` and `ignoreMissingValuesFiles` as these are
assumingly rarely used fields and the CLI usually only supports
commonly used ones.

closes #4760

Co-authored-by: Stefan Prodan <stefan.prodan@gmail.com>
Signed-off-by: Max Jonas Werner <mail@makk.es>
8 months ago
Sunny 4edc640d0c
Update image-automation-controller API to v1beta2
Signed-off-by: Sunny <github@darkowlzz.space>
8 months ago
Stefan Prodan aae086c508
Migrate `flux uninstall` to Helm Source API v1
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
8 months ago
Stefan Prodan 7d52267fc4
Add `--strict-substitute` flag to `flux build` and `flux diff ks` commands
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
9 months ago
Taka Nishida 8fdfbcd251 Fix typo
Signed-off-by: Taka Nishida <takpme@gmail.com>
11 months ago
Stefan Prodan 5e14014e37
Update dependencies to Kubernetes v1.28.6
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
12 months ago
Stefan Prodan 2b653f9cfa
Use `IsObjectNamespaced` from controller-runtime
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
1 year ago
Stefan Prodan 437a943677
Update `HelmRelease` to v2beta2
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
1 year ago
Sunny e901e8b6f8 Update all the references of NC v1beta2 to v1beta3
Signed-off-by: Sunny <darkowlzz@protonmail.com>
1 year ago
Stefan Prodan 80efd29ec0
Update dependencies
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
1 year ago
Hidde Beydals e73d1acb20
Tweak permissions on created files
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
1 year ago
Hidde Beydals f137263fe9
misc: clean up immediately and avoid delayed defer
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
1 year ago
Hidde Beydals 22134b1233
misc: use `errors.As` instead of type checking
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
1 year ago
Hidde Beydals 3c495861a1
misc: address unnecessary use of `fmt.Sprintf`
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
1 year ago
Matheus Pimenta 840e717b72 Add CLI flag for OCIRepo verify secret
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
1 year ago
Gergely Brautigam a51ede681f
fix: only wait for changeset if the result is not empty
Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com>
1 year ago
Stefan Prodan 2c76c70205
Set min value for the `--ssh-rsa-bits` flag
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
1 year ago
Marcus Weiner 56b1e80758 Fix selection of kustomization resource from multi doc yaml
Signed-off-by: Marcus Weiner <marcus.weiner@gmail.com>
1 year ago
Soule BA 90d95988aa
Take into account the server-side inventory for local diff
If implemented users will be able to use a local kustomization file while
retrieving status from the live kustomization file.

Signed-off-by: Soule BA <soule@weave.works>
2 years ago
cui fliter 3edfff49a2 fix some comments
Signed-off-by: cui fliter <imcusg@gmail.com>
2 years ago
Soule BA b74638c25c
Add the possibility to ignore files with build and diff ks
If implemented, user will be able to ignore files when using `build
kustomization` and `diff kustomization` both with .sourceignore and
`ignore-paths` flag.

Signed-off-by: Soule BA <bah.soule@gmail.com>
2 years ago
Stefan Prodan f0c498ff54
Add support for .sourceignore to flux build/diff
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2 years ago
Stefan Prodan cecffc0588
Add commonMetadata to flux build/diff
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2 years ago
Max Jonas Werner 52acac1a37
Add /v2 suffix to module name in preparation of 2.0.0 release
Signed-off-by: Max Jonas Werner <mail@makk.es>
2 years ago
Somtochi Onyekwere 2e71c718ce
update internal flags
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
2 years ago
Somtochi Onyekwere 24452ecd37
Update GitRepository Receiver, and Kustomization to v1
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
2 years ago
Hidde Beydals 16e0b93bec
diff: update Action references to typed Action
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2 years ago
Stefan Prodan b44a3d36ba
Remove deprecated flags
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2 years ago
Sunny 9dd98fb2b2 Update image-reflector API to v1beta2
Signed-off-by: Sunny <darkowlzz@protonmail.com>
2 years ago
Hidde Beydals bb6a7b8f07 Support shortening of revision with digest
The `\b` in the regular expression ensures we only match with a
hexadecimal notation as awhole, while still allowing to match with
e.g. `sha1:...` which would not have been possible by using `\W`
as this includes `_`.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2 years ago
Hidde Beydals 1f5961d2ad tests: deal with remaining `defer`
Signed-off-by: Hidde Beydals <hello@hidde.co>
2 years ago
Stefan Prodan 06b8ad2402
flux tree: Add namespaces to objects reconcile from HRs
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2 years ago
Stefan Prodan f9e69089ea
Update CLI commands to Notification API v1beta2
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2 years ago
Soule BA 2c1085d9ce
Fix dry-run still loading kubeconfig issue
If this is implemented, it will not assume that access to a kubeconfig
is guaranteed even if just for retrieving configured namespace.

Signed-off-by: Soule BA <soule@weave.works>
2 years ago
Hidde Beydals b004fbfc41 Use k8s.io/apimachinery/pkg for error aggregation
Signed-off-by: Hidde Beydals <hello@hidde.co>
2 years ago
Soule BA ad5daee004
Add a dry-run mode to flux build kustomization
If implemented user will be able to use `flux build kustomization`
without any connection to the cluster.

Signed-off-by: Soule BA <soule@weave.works>
2 years ago
Soule BA 35ea91c111
Revert MakeSecureFSOnDisk to MakeFSOnDisk
The reason to this is because MakeSecureFSOnDisk is not consistent
between OS.

Signed-off-by: Soule BA <soule@weave.works>
2 years ago
Philip Laine 0343575146 Move bootstrap package from internal to pkg
Signed-off-by: Philip Laine <philip.laine@gmail.com>
2 years ago
Adrien Fillon 0694a9582f
Support logging in directly to the provider when pushing OCI artifacts
I've noticed during CI, that the current command
already expected a configured Docker client to
push artifacts to authenticated registries.

Some users might not want to have the Docker client
in their process (like a CI job) or build an handcrafted
config.json file.

This would allow this kind of behavior:

```
flux push artifact oci://my-registry.dev/foo:v1 \
  --source xxx \
  --revision xxx \
  --path . \
  --creds $TOKEN # Authenticate via "Bearer $TOKEN" Authorization header
```

Or via Autologin:

```
flux push artifact oci://012345678901.dkr.ecr.us-east-1.amazonaws.com/foo:v1 \
  --source xxx \
  --revision xxx \
  --path . \
  --provider aws
```

This has been implemented for:

* flux push artifact
* flux list artifact
* flux tag artifact
* flux pull artifact

This will require another PR in https://github.com/fluxcd/pkg/pull/352

Signed-off-by: Adrien Fillon <adrien.fillon@manomano.com>
2 years ago
Soule BA ec2aa13165
Make sure we reconcile with the right reconciliation method
Signed-off-by: Soule BA <soule@weave.works>
2 years ago
Stefan Prodan 7c7e76f9f0
Use fluxcd/pkg/oci/client
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2 years ago
Stefan Prodan 08401f62b2
Add OCI provider arg
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2 years ago