Commit Graph

382 Commits (662f0d8cae08b86a0f40d8017c3debb231046aa7)

Author SHA1 Message Date
Hidde Beydals 662f0d8cae tests: rename "kubectl" `setupTestNamespace`
As the other version has a different signature, but exists for a
different build tag. Resulting in my IDE becoming absolutely confused
when I tried to enable both at the same time. Opted for "exec" because
this one shells out.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2 years ago
Hidde Beydals b263e14fa8 tests: only provide template values when used
As otherwise the `.golden` values can not be automatically updated using
`-update` as documented in `CONTRIBUTING.md`.

Also ensure we do not use `defer` but rather `t.Cleanup` in tests, as
this will always be called even if e.g. `t.Fatal` absruptly stops the
test.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2 years ago
Stefan Prodan 87232fd4dd
flux tree: Set CRDs GroupKind in output
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2 years ago
Stefan Prodan be154d079b
flux tree: Track CRDs managed by HelmReleases
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
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 6681cd05a9
Add example of push and sign OCI artifacts
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2 years ago
Stefan Prodan 56807fddf6
Add json/yaml output to flux push artifact
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2 years ago
Max Jonas Werner 0648f56049
fix misleading messaging when using `-A` flag
Before:

```
$ flux get source git -A
✗ no GitRepository objects found in flux-system namespace
```

After:

```
$ flux get source git -A
✗ no GitRepository objects found in any namespace
```

Signed-off-by: Max Jonas Werner <max@e13.dev>
2 years ago
Kingdon Barrett ddd377b997
Fix fluxcd/website#1347
Signed-off-by: Kingdon Barrett <kingdon@weave.works>
2 years ago
Stefan Prodan 9d38ea6ffc
check: Show the latest stored version of CRDs
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2 years ago
fluxcdbot be361a44d5
Update toolkit components
- helm-controller to v0.28.1
  https://github.com/fluxcd/helm-controller/blob/v0.28.1/CHANGELOG.md
- notification-controller to v0.30.2
  https://github.com/fluxcd/notification-controller/blob/v0.30.2/CHANGELOG.md

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
Somtochi Onyekwere d79e49f80b fix path on flux push
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@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
Somtochi Onyekwere 0bd78ca80c read manifests from stdin
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
2 years ago
Sanskar Jaiswal 28feb8b1d7 bootstrap: fallback to default known_hosts
Use default known_hosts and ssh configuration when no private key file
is provided while bootstraping using ssh.

Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
2 years ago
Boris Kreitchman c01023d8f8 Process getVersion error in bootstrap
Signed-off-by: Boris Kreitchman <bkreitch@gmail.com>
2 years ago
Sanskar Jaiswal 35e1b5cbb9 add aws codecommit example and validation; azure devops example
Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
2 years ago
Sanskar Jaiswal 0a5048a56b refactor bootstrap process to use fluxcd/pkg/git
Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
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
Philip Laine a4734d7e30 Remove file reading from bootstrap package
Signed-off-by: Philip Laine <philip.laine@gmail.com>
2 years ago
fluxcdbot 4643f8383e
Update toolkit components
- helm-controller to v0.26.0
  https://github.com/fluxcd/helm-controller/blob/v0.26.0/CHANGELOG.md
- kustomize-controller to v0.30.0
  https://github.com/fluxcd/kustomize-controller/blob/v0.30.0/CHANGELOG.md
- source-controller to v0.31.0
  https://github.com/fluxcd/source-controller/blob/v0.31.0/CHANGELOG.md
- notification-controller to v0.28.0
  https://github.com/fluxcd/notification-controller/blob/v0.28.0/CHANGELOG.md
- image-reflector-controller to v0.22.1
  https://github.com/fluxcd/image-reflector-controller/blob/v0.22.1/CHANGELOG.md
- image-automation-controller to v0.26.1
  https://github.com/fluxcd/image-automation-controller/blob/v0.26.1/CHANGELOG.md

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
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
Batuhan Apaydın c3d7cad53e
feat: diff artifact capability added
Signed-off-by: Batuhan Apaydın <batuhan.apaydin@trendyol.com>
2 years ago
Philip Laine 80b87729b6 Move uninstall code to pkg
Signed-off-by: Philip Laine <philip.laine@gmail.com>
2 years ago
Batuhan Apaydın d49b77c8d2
chore: bump the pkg/oci package to v0.12.0
Signed-off-by: Batuhan Apaydın <batuhan.apaydin@trendyol.com>
2 years ago
Somtochi Onyekwere 1f57cf3d31 Update oci golden file
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
2 years ago
Stefan Prodan cad251444c
Update OCI golden files
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2 years ago
Stefan Prodan d7dadb4425
e2e: Update bootstrap test to Kubernetes 1.25.2
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2 years ago
Carlos Nunez 45a00a0170
Maintain original scheme when using --token-auth
If you're using an HTTP-based Git server with Flux, you need to provide `--token-auth` to avoid triggering an SSH host key check (see [here](https://github.com/fluxcd/flux2/issues/2825#issuecomment-1151355914)). Unfortunately, doing this forces the URL in the `GitRepository` resource created during bootstrapping to always use `https`. This will cause Kustomization reconcile errors for servers that do not have HTTPS enabled or do not have the appropriate certs installed or available.

This pull request fixes this by keeping the repository URL scheme intact when using `--token-auth`.

Signed-off-by: Carlos Nunez <75340335+carlosonunez-vmw@users.noreply.github.com>
2 years ago
Stefan Prodan d5262404f3
Add insecure flag to `flux create source oci`
Signed-off-by: Stefan Prodan <stefan.prodan@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
Somtochi Onyekwere 11dd0d918c remove finalizers for notification controllers
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
2 years ago
Stefan Prodan e777947539
Remove finalizers for OCI repositories on uninstall
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2 years ago
Daniel Holbach c57afa1e56 Revert "Fix broken "edit this page" links in Flux CLI section"
Signed-off-by: Daniel Holbach <daniel@weave.works>
2 years ago
Somtochi Onyekwere 7b95e90a33 Update flux logs to accomodate the new format
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
2 years ago
Stefan Prodan a5a9158a24
Add provider to Helm OCI tests
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2 years ago
Sven Nebel 2c9ef85f6d Fix broken "edit this page" links in Flux CLI section #2203
Signed-off-by: Sven Nebel <nebel.sven@gmail.com>
2 years ago
Somtochi Onyekwere ad0f3373b6 Improve error message in get cmd
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
2 years ago
Stefan Prodan 8a0fd6ddf9
Add version validation to install commands
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2 years ago
Somtochi Onyekwere 96d1c1b2bd Add --filter-semver and regex flags to list artifact
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
2 years ago
Stefan Prodan 40717fa4f4
Exclude VCS files by default from OCI artifacts
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2 years ago
Stefan Prodan 899a1fffca
Add `--ignore-paths` arg to `flux build|push artifact`
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2 years ago
Somtochi Onyekwere 5dcd599612 reset cmd flags
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
2 years ago
Max Jonas Werner b810aea6cc
Make `flux trace` work with OCIRepository
* Added support for OCIRepositories to `flux trace`
* Changed indentation to compensate new, longer field name "Source
  Revision"
* Added unit tests for the new output

closes #2970

Signed-off-by: Max Jonas Werner <max@e13.dev>
2 years ago
Stefan Prodan 75a879c770
OCI docs improvements
Co-authored-by: Kingdon Barrett <kingdon@weave.works>
Co-authored-by: Sunny <darkowlzz@protonmail.com>
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2 years ago
Stefan Prodan d4718f6ff4
Improve artifact commands docs
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2 years ago
Stefan Prodan ac9b3d193d
Update controllers with OCI support
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
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