1
0
mirror of synced 2026-02-06 19:05:55 +00:00
Commit Graph

557 Commits

Author SHA1 Message Date
Parthib Mukherjee
bef6f36755 Add --show-history flag to debug helmrelease
Signed-off-by: Parthib Mukherjee <parthibmukherjee@gmail.com>
2025-09-04 12:44:28 +00:00
S. M. Mohiuddin Khan Shiam
c2a883e25a fix(events): respect --all-namespaces flag
The `flux events` command always applied a namespace filter, even when `--all-namespaces` was set.
This produced incomplete results and confused users expecting cluster-wide events.

Changes made:
* Build `clientListOpts` dynamically.
* Omit `client.InNamespace(...)` when `eventArgs.allNamespaces` is true, ensuring no namespace constraint.

Impact:
`flux events --all-namespaces` now returns events from every namespace, restoring expected functionality without affecting other options.

Signed-off-by: S. M. Mohiuddin Khan Shiam <147746955+mohiuddin-khan-shiam@users.noreply.github.com>
2025-09-01 08:55:15 +01:00
Stefan Prodan
d340f80d75 Update dependencies to Kubernetes v1.34.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2025-08-30 15:11:43 +03:00
Stefan Prodan
45837d2d1b Implement flux migrate command
The migrate command must be run before a Flux minor version upgrade.
The command migrates the Flux custom resources stored in Kubernetes etcd to their latest API version, ensuring the Flux components can continue to function correctly after the upgrade.

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2025-08-08 13:23:00 +03:00
cappyzawa
8b95a09319 Migrate sourcesecret package to runtime/secrets APIs
The sourcesecret package now uses pkg/runtime/secrets factory
functions instead of the previous monolithic approach. This
provides standardized secret generation with consistent
validation and error handling across all authentication types.

Signed-off-by: cappyzawa <cappyzawa@gmail.com>
2025-07-29 22:50:56 +09:00
Matheus Pimenta
b3b404ed30 Upgrade fluxcd/pkg dependencies
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
2025-07-15 10:32:35 +01:00
Stefan Prodan
600ec37524 Fix flux push artifact for insecure registries
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2025-07-10 12:38:53 +03:00
Daniel Guns
5a4bc9410b Promote image CLI commands to stable
Remove experimental status from flux image commands in preparation
for GA release of image automation APIs.

Partial fix for #5411

Signed-off-by: Daniel Guns <danbguns@gmail.com>
2025-06-25 20:52:11 -03:00
cappyzawa
4c343893c5 refactor: cleanup GetArtifactRegistryCredentials error handling
Update fluxcd/pkg/auth to v0.18.0 and simplify error handling for
GetArtifactRegistryCredentials() following the improvements made in
the library.

Similar to fluxcd/image-reflector-controller#786, this removes
unnecessary nil checks as the function now returns errors directly
for unsupported providers.

- Replace authentication code in push_artifact.go with loginWithProvider()
- Remove unnecessary authenticator nil check in oci.go
- Remove unused imports (errors, auth packages)

Signed-off-by: cappyzawa <cappyzawa@gmail.com>
2025-06-21 14:11:18 +09:00
Stefan Bickel
1d34e5355b Make golden tests pass
Signed-off-by: Stefan Bickel <stefan.bickel@cornelsen.de>
2025-06-13 13:25:26 +02:00
Stefan Bickel
00d0e1af25 Add tests and golden files for create tenant
Signed-off-by: Stefan Bickel <stefan.bickel@cornelsen.de>
2025-06-13 13:25:26 +02:00
Stefan Bickel
9f29702f54 Add cli arg --with-service-account
Signed-off-by: Stefan Bickel <stefan.bickel@cornelsen.de>
2025-06-13 13:25:26 +02:00
cappyzawa
5291902fd7 Use normalize.UnstructuredList instead of ssa.SetNativeKindsDefaults
Signed-off-by: cappyzawa <cappyzawa@gmail.com>
2025-06-13 15:15:47 +09:00
Matheus Pimenta
ec3804cc6f Introduce support for shelling out to Azure binaries in authentication
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
2025-06-09 14:07:51 +01:00
Brock Alberry
06e3047a2f add sparse checkout to cli
Signed-off-by: Brock Alberry <brock.alberry@cse-cst.gc.ca>
2025-06-04 12:04:41 -04:00
Johannes Ibald
cd4244ae65 correct small typo
Signed-off-by: Johannes Ibald <johannes.ibald@etes.de>
2025-06-04 11:21:11 +02:00
Stefan Prodan
79fed691ca Update CLI to OCIRepository v1 (GA)
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2025-05-28 15:12:17 +03:00
Matheus Pimenta
65766ff4fc Add --interval and --reflect-digest flags to flux create image policy
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
2025-05-28 08:25:10 +01:00
Matheus Pimenta
d82ec5a211 Promote artifact commands to stable
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
2025-05-27 16:53:47 +01:00
Matheus Pimenta
13ec11da58 Fix image-reflector-controller tests after output change
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
2025-05-27 15:57:45 +01:00
Stefan Prodan
a421ce4266 Set Kubernetes 1.31 as min supported version
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2025-05-23 15:15:13 +03:00
Matheus Pimenta
0951061b5e Upgrade fluxcd/pkg packages
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
2025-05-19 14:08:33 +01:00
Max Jonas Werner
3e80c5809e Fix flux trace for HRs from OCIRepositorys
Before:
```
$ flux -n default trace pod default-podinfo-585856f49c-4jl4m
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x40 pc=0x10618da70]

goroutine 1 [running]:
main.traceHelm({0x106dd7b28, 0x14000201490}, {0x12f34c0d8, 0x14000783100}, {{0x1400071e130?, 0x1061e7795?}, {0x1400071e109?, 0x1000d9c84?}}, 0x140006a6030)
	/home/runner/work/flux2/flux2/cmd/flux/trace.go:404 +0x2f0
main.traceObject({0x106dd7b28, 0x14000201490}, {0x12f34c0d8, 0x14000783100}, 0x140006a6030)
	/home/runner/work/flux2/flux2/cmd/flux/trace.go:134 +0x11c
main.traceObjects({0x106dd7b28, 0x14000201490}, {0x12f34c0d8, 0x14000783100}, {0x140006a6040, 0x1, 0x0?})
	/home/runner/work/flux2/flux2/cmd/flux/trace.go:112 +0x74
main.traceCmdRun(0x14000592800?, {0x140003aea80, 0x2, 0x4})
	/home/runner/work/flux2/flux2/cmd/flux/trace.go:107 +0x180
github.com/spf13/cobra.(*Command).execute(0x108341980, {0x140003aea40, 0x4, 0x4})
	/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.8.1/command.go:985 +0x834
github.com/spf13/cobra.(*Command).ExecuteC(0x108329280)
	/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.8.1/command.go:1117 +0x344
github.com/spf13/cobra.(*Command).Execute(...)
	/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.8.1/command.go:1041
main.main()
	/home/runner/work/flux2/flux2/cmd/flux/main.go:189 +0x78
```

After:

```
 $ ~/dev/flux/flux2/bin/flux -n default trace pod default-podinfo-585856f49c-4jl4m

Object:         Pod/default-podinfo-585856f49c-4jl4m
Namespace:      default
Status:         Managed by Flux
---
HelmRelease:    podinfo
Namespace:      flux-system
Target:         default
Revision:       6.8.0+2360bdf32ddc
Status:         Last reconciled at 2025-05-14 16:10:37 +0200 CEST
Message:        Helm install succeeded for release default/default-podinfo.v1 with chart podinfo@6.8.0+2360bdf32ddc
---
OCIRepository:   podinfo
Namespace:       flux-system
URL:             oci://ghcr.io/stefanprodan/charts/podinfo
Tag:             6.8.0
Revision:        6.8.0@sha256:2360bdf32ddc50c05f8e128118173343b0a012a338daf145b16e0da9c80081a4
Status:          Last reconciled at 2025-05-14 16:09:17 +0200 CEST
Message:         stored artifact for digest '6.8.0@sha256:2360bdf32ddc50c05f8e128118173343b0a012a338daf145b16e0da9c80081a4'
```

Signed-off-by: Max Jonas Werner <max@coppersoft.com>
2025-05-14 18:02:18 +02:00
Daniel Guns
392a33d425 Change error reporting in get.go from logger.Failure to fmt.Errorf to give non 0 exit code
Signed-off-by: Daniel Guns <danbguns@gmail.com>
2025-05-07 19:11:16 -03:00
Matheus Pimenta
ac66adc24c Upgrade fluxcd/pkg auth, oci, git and git/gogit
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
2025-05-07 17:49:36 +01:00
Stefan Prodan
8816c5f7de Update to Kubernetes 1.33.0 and Go 1.24.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2025-04-28 15:02:33 +03:00
niveau0
1b98e16940 fix: allow recursive dry-run over local sources
Signed-off-by: niveau0 <plingplong@t-online.de>
2025-04-16 09:27:26 +02:00
Matthieu Mottet
3f4743037b Allow to pull/push artifacts without TLS
If applied, this commit will introduce a new `--insecure-repository`
flag to the following commands: `push artifacts`, `pull artifact`,
`diff artifact` and `list artifacts`. When used the flag will lead to
the option `crane.Insecure` being passed to the `crane` client allowing
the use of insecure repositories.

Signed-off-by: Matthieu Mottet <m.mottet@outlook.com>
2025-04-11 20:12:55 +02:00
laiminhtrung1997
54db4ffc8b Remove redundant space.
Signed-off-by: laiminhtrung1997 <68812829+laiminhtrung1997@users.noreply.github.com>
2025-03-24 15:07:48 +07:00
Matheus Pimenta
24057743bb Fix command debug hr not taking targetPath into account
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
2025-03-03 10:56:16 +00:00
Stefan Prodan
14da7d58be Update Kubernetes min supported version to 1.30
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2025-02-20 14:54:41 +02:00
Dipti Pai
c15eb30b0d [RFC-007] Flux cmd support for GitHub provider: This commit includes the following changes -
- Add flux create secret githubapp command that accepts and validates the inputs to create a github app secret with options to export the secret yaml or create the secret directly in the Kubernetes cluster

- Add tests for flux create secret githubapp command

- Add flux create source git command that accepts and validates the inputs to create a gitrepository source with for github provider with options to export the source yaml or create the github gitrepository source directly in the Kubernetes cluster.

- Add tests for flux create source git command for github provider.

Signed-off-by: Dipti Pai <diptipai89@outlook.com>
2025-02-13 11:36:24 -08:00
Sjors Holtrop
f29bcfb108 handle len(args) < 1 case
Signed-off-by: Sjors Holtrop <sjors.holtrop@ritense.com>
2025-01-14 14:45:49 +01:00
Sjors Holtrop
2e9e8e2690 pass args to enable more detailed error message
Signed-off-by: Sjors Holtrop <sjors.holtrop@ritense.com>
2025-01-14 14:29:40 +01:00
Sjors Holtrop
3478fe343d fix golden file
Signed-off-by: Sjors Holtrop <sjors.holtrop@ritense.com>
2025-01-14 13:53:24 +01:00
Sjors Holtrop
8b10a32088 Improve "flux resume" error message on non-existent object
Signed-off-by: Sjors Holtrop <sjors.holtrop@ritense.com>
2025-01-14 13:15:57 +01:00
Matheus Pimenta
055958d533 Fix create command always using imageRepositoryType
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
2025-01-12 14:09:24 +00:00
Stefan Prodan
5208515604 Make flux debug hr single flag selection required
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-12-23 17:44:33 +02:00
Stefan Prodan
928ea24bcb Add links to status docs in flux debug commands
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-12-18 00:50:02 +02:00
Stefan Prodan
9b1b5e8a51 Add name completion to debug commands
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-12-13 18:40:02 +02:00
Stefan Prodan
5b740c45d1 Implement flux debug kustomization command
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-12-13 12:21:41 +02:00
Stefan Prodan
19568eb94e Add missing copyright headers
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-12-13 10:54:07 +02:00
Stefan Prodan
5cf0dcc77d Add preview note to debug hr
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-12-13 10:53:39 +02:00
Stefan Prodan
120ec049f9 Implement flux debug helmrelease command
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-12-11 11:41:27 +02:00
Boris Kreitchman
570bc81278 fix misplaced quotes
Signed-off-by: Boris Kreitchman <bkreitch@gmail.com>
2024-12-09 12:21:52 +02:00
Stefan Prodan
a3dbf31e87 Remove TLS deprecated flags from flux create secret
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-09-27 19:54:11 +03:00
Stefan Prodan
8470f23ad2 Add flux create secret proxy command
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-09-27 19:11:10 +03:00
Stefan Prodan
e0b8464a6c Add --proxy-secret-ref to flux create source commands
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-09-27 18:08:46 +03:00
Stefan Prodan
c7daf6466f Promote bucket commands to GA
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-09-27 17:01:21 +03:00
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>
2024-09-26 23:50:12 +05:30