Commit graph

591 commits

Author SHA1 Message Date
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>
2023-04-05 16:05:21 +03:00
Somtochi Onyekwere
e44ab85880
update testdata yamls
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
2023-04-05 16:05:20 +03:00
Somtochi Onyekwere
24452ecd37
Update GitRepository Receiver, and Kustomization to v1
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
2023-04-05 16:05:20 +03:00
Santosh Kaluskar
6afef04a88
Add support for create source git with --commit and --ref-name flags
Signed-off-by: Santosh Kaluskar <dtshbl@gmail.com>
2023-03-24 16:54:50 +05:30
Yiannis
b55f49b4fe
fix: Remove any leading and trailing whitespace from resource before
exporting

Signed-off-by: Yiannis <yiannistri@users.noreply.github.com>
2023-03-24 09:07:36 +00:00
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>
2023-03-21 14:03:09 +01:00
Matheus Pimenta
c9fea671a7 Add retry interval option to create kustomization command
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
2023-03-21 12:36:07 +00:00
Santosh Kaluskar
5a45d2b127
Create secret with bearer-token
Signed-off-by: Santosh Kaluskar <dtshbl@gmail.com>
2023-03-14 22:31:45 +05:30
Hidde Beydals
af153ea0cf
events: avoid having to keep individal kind maps
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-03-09 14:41:32 +01:00
Hidde Beydals
3f3d68a33a
events: reword error messages
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-03-09 14:41:32 +01:00
Hidde Beydals
c0916edc44
events: prevent defer in loop
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-03-09 14:41:32 +01:00
Hidde Beydals
34220fd514
events: make --for case insensitive for kinds
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-03-09 14:41:32 +01:00
Hidde Beydals
5b8f673baa
events: use constants for supported Flux kinds
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-03-09 14:41:31 +01:00
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>
2023-03-09 14:41:31 +01:00
Hidde Beydals
26aafa1b6f
e2e: update podinfo to version with newer APIs
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-03-09 11:43:05 +01:00
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>
2023-03-08 18:51:14 +01:00
Stefan Prodan
a64913f2f0
Allow custom annotations to be set when pushing OCI artifacts
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-03-03 12:40:59 +02:00
Stefan Prodan
7490d4d4b8
Add command to print the reconcilers status
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-02-20 13:08:04 +02:00
Stefan Prodan
b44a3d36ba
Remove deprecated flags
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-02-17 14:23:11 +02:00
Hidde Beydals
0f7b903ace Update push artifact's --revision to RFC-0005
Signed-off-by: Hidde Beydals <hello@hidde.co>
2023-02-17 12:48:55 +01:00
Hidde Beydals
7f99655a2b Update golden files with RFC-0005 revision formats
Signed-off-by: Hidde Beydals <hello@hidde.co>
2023-02-17 12:48:55 +01:00
Sunny
9dd98fb2b2 Update image-reflector API to v1beta2
Signed-off-by: Sunny <darkowlzz@protonmail.com>
2023-02-17 00:32:48 +05:30
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>
2023-02-15 15:43:11 +01:00
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>
2023-02-15 13:56:55 +01:00
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>
2023-02-15 13:22:44 +01:00
Stefan Prodan
87232fd4dd
flux tree: Set CRDs GroupKind in output
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-02-01 12:41:35 +02:00
Stefan Prodan
be154d079b
flux tree: Track CRDs managed by HelmReleases
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-02-01 12:01:11 +02:00
Stefan Prodan
06b8ad2402
flux tree: Add namespaces to objects reconcile from HRs
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-01-31 18:17:48 +02:00
Stefan Prodan
6681cd05a9
Add example of push and sign OCI artifacts
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-01-31 14:30:50 +02:00
Stefan Prodan
56807fddf6
Add json/yaml output to flux push artifact
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-01-31 13:36:59 +02:00
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>
2023-01-30 16:54:16 +01:00
Kingdon Barrett
ddd377b997
Fix fluxcd/website#1347
Signed-off-by: Kingdon Barrett <kingdon@weave.works>
2023-01-05 20:19:53 -05:00
Stefan Prodan
9d38ea6ffc
check: Show the latest stored version of CRDs
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-12-23 11:44:28 +02:00
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>
2022-12-22 15:34:56 +02:00
Stefan Prodan
f9e69089ea
Update CLI commands to Notification API v1beta2
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-12-21 17:14:18 +02:00
Somtochi Onyekwere
d79e49f80b fix path on flux push
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
2022-12-20 12:15:35 +01:00
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>
2022-12-17 00:34:38 +01:00
Somtochi Onyekwere
0bd78ca80c read manifests from stdin
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
2022-12-15 01:36:34 +01:00
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>
2022-12-12 15:33:34 +05:30
Boris Kreitchman
c01023d8f8 Process getVersion error in bootstrap
Signed-off-by: Boris Kreitchman <bkreitch@gmail.com>
2022-11-23 13:37:20 +02:00
Sanskar Jaiswal
35e1b5cbb9 add aws codecommit example and validation; azure devops example
Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
2022-11-17 17:42:44 +05:30
Sanskar Jaiswal
0a5048a56b refactor bootstrap process to use fluxcd/pkg/git
Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
2022-11-17 17:30:49 +05:30
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>
2022-11-16 16:06:30 +01:00
Philip Laine
a4734d7e30 Remove file reading from bootstrap package
Signed-off-by: Philip Laine <philip.laine@gmail.com>
2022-11-04 15:23:08 +01:00
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>
2022-10-21 20:37:09 +03:00
Philip Laine
0343575146 Move bootstrap package from internal to pkg
Signed-off-by: Philip Laine <philip.laine@gmail.com>
2022-10-21 11:54:28 +02:00
Batuhan Apaydın
c3d7cad53e
feat: diff artifact capability added
Signed-off-by: Batuhan Apaydın <batuhan.apaydin@trendyol.com>
2022-10-20 13:23:50 +03:00
Philip Laine
80b87729b6 Move uninstall code to pkg
Signed-off-by: Philip Laine <philip.laine@gmail.com>
2022-10-12 19:25:14 +02:00
Batuhan Apaydın
d49b77c8d2
chore: bump the pkg/oci package to v0.12.0
Signed-off-by: Batuhan Apaydın <batuhan.apaydin@trendyol.com>
2022-10-11 14:32:24 +03:00
Somtochi Onyekwere
1f57cf3d31 Update oci golden file
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
2022-09-30 06:04:38 +01:00