Commit Graph

108 Commits (main)

Author SHA1 Message Date
Stefan Bickel 00d0e1af25 Add tests and golden files for create tenant
Signed-off-by: Stefan Bickel <stefan.bickel@cornelsen.de>
2 days ago
Brock Alberry 06e3047a2f add sparse checkout to cli
Signed-off-by: Brock Alberry <brock.alberry@cse-cst.gc.ca>
2 weeks ago
Stefan Prodan 79fed691ca
Update CLI to OCIRepository v1 (GA)
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
3 weeks ago
Matheus Pimenta 65766ff4fc
Add --interval and --reflect-digest flags to flux create image policy
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
3 weeks ago
Matheus Pimenta 13ec11da58
Fix image-reflector-controller tests after output change
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
3 weeks ago
Stefan Prodan a421ce4266
Set Kubernetes 1.31 as min supported version
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
3 weeks ago
Max Jonas Werner 3e80c5809e
Fix `flux trace` for HRs from `OCIRepository`s
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>
1 month ago
Matheus Pimenta 24057743bb
Fix command debug hr not taking targetPath into account
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
3 months ago
Stefan Prodan 14da7d58be
Update Kubernetes min supported version to 1.30
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
4 months ago
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>
4 months ago
Sjors Holtrop 3478fe343d fix golden file
Signed-off-by: Sjors Holtrop <sjors.holtrop@ritense.com>
5 months ago
Matheus Pimenta 055958d533 Fix create command always using imageRepositoryType
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
5 months ago
Stefan Prodan 928ea24bcb
Add links to status docs in `flux debug` commands
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
6 months ago
Stefan Prodan 5b740c45d1
Implement `flux debug kustomization` command
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
6 months ago
Stefan Prodan 120ec049f9
Implement `flux debug helmrelease` command
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
6 months ago
Stefan Prodan a3dbf31e87
Remove TLS deprecated flags from `flux create secret`
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
9 months ago
Stefan Prodan 8470f23ad2
Add `flux create secret proxy` command
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
9 months ago
Stefan Prodan c7daf6466f
Promote `bucket` commands to GA
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
9 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>
9 months ago
Boris Kreitchman 2d37544b06 Recursively build and diff Kustomizations
Signed-off-by: Boris Kreitchman <bkreitch@gmail.com>
9 months ago
Soule BA 5feee5c73d
Add support for creating HR with .spec.ChartRef
Signed-off-by: Soule BA <bah.soule@gmail.com>
1 year ago
Stefan Prodan d8e6199b2a
Set Kubernetes 1.28 as min required version
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
1 year ago
Stefan Prodan d5aedaca7d
Update tests to GA APIs
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
1 year ago
Stefan Prodan 8856de1478
Update `HelmRelease` API to v2
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
1 year ago
Stefan Prodan 472396728b
Adapt HelmRelease revision to API v2
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
1 year 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>
1 year ago
Sunny 4edc640d0c
Update image-automation-controller API to v1beta2
Signed-off-by: Sunny <github@darkowlzz.space>
1 year ago
Stefan Prodan 1aaa48fa09
Update Helm Source APIs to v1 (GA)
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
1 year ago
Jason c49ba9d310 Add command for creating notation configuration secrets
Signed-off-by: Jason <jagoodse@microsoft.com>
1 year ago
Max Jonas Werner 1bb92548e4
Add flags for issuer/subject OCI signature verification
This change introduces two new flags to `create source oci` for
providing the values to the
`OCIRepository.spec.verify.matchOIDCIdentity.(issuer,subject)` fields.

Signed-off-by: Max Jonas Werner <mail@makk.es>
1 year ago
Stefan Prodan 493c1fbdf9
Add `flux envsubst` command
This command can be used to replicate the behavior of the
Flux Kustomization post-build substitutions.

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
1 year ago
Stefan Prodan c22d8f28f9
Drop support for Kubernetes EOL versions
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2 years ago
Stefan Prodan b4f5d121c8
Update tests to `HelmRelease` v2beta2
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2 years ago
Hidde Beydals eeaffd5c0e
Update HelmRelease golden file with new message
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2 years ago
Sunny e901e8b6f8 Update all the references of NC v1beta2 to v1beta3
Signed-off-by: Sunny <darkowlzz@protonmail.com>
2 years ago
Stefan Prodan 80efd29ec0
Update dependencies
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2 years ago
Somtochi Onyekwere 0eba9662e6 prevent flux install from overriding bootrapped cluster
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
2 years ago
Matheus Pimenta 840e717b72 Add CLI flag for OCIRepo verify secret
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
2 years ago
Sanskar Jaiswal 8df27d8c3a
modify `flux create secret tls` to create secrets of type TLS
Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
2 years ago
Sanskar Jaiswal 2fc9d73c5f
add flag `--ca-crt-file` to `flux create secret git`
Add flag `--ca-crt-file` to `flux create secret git` to specify the path
to CA certificate. It takes precedence over `--ca-file` and uses the
key `ca.crt` in the generated Secret.

Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
2 years ago
Sanskar Jaiswal bf36a29ca2
add support for Kubernetes TLS keys for `flux create secret tls`
Add support for using `tls.key`, `tls.crt` and `ca.crt` keys while
generating a Secret, using the `--tls-key-file`, `--tls-crt-file` and
`--ca-crt-file` flags respectively.
Mark the flags `--key-file`, `--cert-file` and `--ca-file` as
deprecated.

Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
2 years ago
Marcus Weiner 56b1e80758 Fix selection of kustomization resource from multi doc yaml
Signed-off-by: Marcus Weiner <marcus.weiner@gmail.com>
2 years ago
Stefan Prodan 28262f59d3
Set Kubernetes min version to 1.25
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2 years ago
Rishikesh Nair 42607aadc3
Add support for passing multiple objects to suspend/resume commands
This change adds support for running `suspend/resume` on multiple
supported resources at the same time. This improves the user
experience by converting

```
flux suspend ks operator && \
flux suspend ks database && \
flux suspend ks app
```

to

```
flux suspend ks operator database app
```

This works for all types of resources (Kustomizations, Sources, etc.)
since it has been implemented at the `suspend.go` and `resume.go`
level.

When the `--wait` flag is passed to the `resume` command, then Flux
will wait for all resources in parallel within a goroutine each.

Each object is only processed once, even if user provided its name
more than once.

If suspension or resuming fails for one object, it is still carried
out for the remaining objects.

As a special case, the old behaviour of `resume` is retained, i.e.
when only one object name is provided, `resume` waits for the object
to become ready even if the `--wait` flag is not provided. In all
other cases the `--wait` flag is always considered.

closes #3746
closes #3793

Co-Authored-By: Max Jonas Werner <mail@makk.es>
Signed-off-by: Rishikesh Nair <alienware505@gmail.com>
Signed-off-by: Max Jonas Werner <mail@makk.es>
2 years ago
Stefan Prodan db0256e0f7
Set minimum supported version to Kubernetes 1.24.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2 years ago
Raffael Sahli b8c24f906d fix: support reconcile recursive source tree hr => chart => repo
Signed-off-by: Raffael Sahli <raffael.sahli@doodle.com>
2 years ago
Somtochi Onyekwere a52f5aaa75 Add label selector flag to get cmd
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@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 cecffc0588
Add commonMetadata to flux build/diff
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2 years ago
Somtochi Onyekwere e44ab85880
update testdata yamls
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
2 years ago