Commit Graph

404 Commits (a296afdd6984b1e7ae6095feb3dc8bf785b9d046)

Author SHA1 Message Date
Somtochi Onyekwere e44ab85880
update testdata yamls
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
Santosh Kaluskar 6afef04a88
Add support for create source git with --commit and --ref-name flags
Signed-off-by: Santosh Kaluskar <dtshbl@gmail.com>
2 years ago
Yiannis b55f49b4fe
fix: Remove any leading and trailing whitespace from resource before
exporting

Signed-off-by: Yiannis <yiannistri@users.noreply.github.com>
2 years ago
Timo Furrer 2e1721ca85 Implement `--deploy-token-auth` in GitLab bootstrapping
This change set implements support for the `--deploy-token-auth` option
in the `flux bootstrap gitlab` command.

That option will reconcile a GitLab Project Deploy Token to use for the
authentication of the GitLab git repository.
A GitLab Project Deploy Token can be used the same way as a Personal
Access Token which is already supported via `--token-auth`.
The difference with the GitLab Project Deploy Token is that the token is
managed (created, updated, deleted) by Flux and not provided by the
user.

This change is transparent to the source-controller.

A prerequisite for this change is the
`fluxcd/go-git-providers` change here:

* https://github.com/fluxcd/go-git-providers/pull/191

See related discussion here: https://github.com/fluxcd/flux2/discussions/3595
GitLab Issue here: https://gitlab.com/gitlab-org/gitlab/-/issues/392605

Signed-off-by: Timo Furrer <tuxtimo@gmail.com>
2 years ago
Matheus Pimenta c9fea671a7 Add retry interval option to create kustomization command
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
2 years ago
Santosh Kaluskar 5a45d2b127
Create secret with bearer-token
Signed-off-by: Santosh Kaluskar <dtshbl@gmail.com>
2 years ago
Hidde Beydals af153ea0cf
events: avoid having to keep individal kind maps
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2 years ago
Hidde Beydals 3f3d68a33a
events: reword error messages
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2 years ago
Hidde Beydals c0916edc44
events: prevent defer in loop
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2 years ago
Hidde Beydals 34220fd514
events: make `--for` case insensitive for kinds
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2 years ago
Hidde Beydals 5b8f673baa
events: use constants for supported Flux kinds
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2 years ago
Somtochi Onyekwere 5b18289808
Add `flux events` command
This adds a command to Flux which behaves similarly as `kubectl events`,
including the Flux sources events when showing events for top level
objects, thus making debugging easy for Flux users.

For example, `flux events --for kustomization/<name>` includes the
events of its source (e.g. a `GitRepository`, `OCIRepository` or
`Bucket`).

In addition, `flux events --for helmrelease/<name>` includes events of
the `HelmChart` and `HelmRepository`. While `flux events --for
alerts/<name>` includes the events of the `Provider`.

Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
2 years ago
Hidde Beydals 26aafa1b6f
e2e: update podinfo to version with newer APIs
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2 years ago
Hidde Beydals 1cc7682d44
Replace `helmv2.KubeConfig` with `meta.KubeConfig`
This is a backwards compatible change in terms of "YAML API", as they
spec still equals the previous one. Object type has just changed.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2 years ago
Stefan Prodan a64913f2f0
Allow custom annotations to be set when pushing OCI artifacts
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2 years ago
Stefan Prodan 7490d4d4b8
Add command to print the reconcilers status
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2 years ago
Stefan Prodan b44a3d36ba
Remove deprecated flags
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2 years ago
Hidde Beydals 0f7b903ace Update `push artifact`'s `--revision` to RFC-0005
Signed-off-by: Hidde Beydals <hello@hidde.co>
2 years ago
Hidde Beydals 7f99655a2b Update golden files with RFC-0005 revision formats
Signed-off-by: Hidde Beydals <hello@hidde.co>
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 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