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

544 Commits

Author SHA1 Message Date
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
Stefan Prodan
cad251444c Update OCI golden files
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-09-29 21:06:57 +03:00
Stefan Prodan
d7dadb4425 e2e: Update bootstrap test to Kubernetes 1.25.2
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-09-28 23:54:08 +03:00
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>
2022-09-27 22:14:29 -05:00
Stefan Prodan
d5262404f3 Add insecure flag to flux create source oci
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-09-12 14:31:03 +03:00
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>
2022-09-12 12:08:47 +02:00
Somtochi Onyekwere
11dd0d918c remove finalizers for notification controllers
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
2022-09-11 13:16:53 +01:00
Stefan Prodan
e777947539 Remove finalizers for OCI repositories on uninstall
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-09-08 10:43:31 +03:00
Daniel Holbach
c57afa1e56 Revert "Fix broken "edit this page" links in Flux CLI section"
Signed-off-by: Daniel Holbach <daniel@weave.works>
2022-09-06 15:20:42 +02:00
Somtochi Onyekwere
7b95e90a33 Update flux logs to accomodate the new format
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
2022-08-31 17:58:43 +01:00
Stefan Prodan
a5a9158a24 Add provider to Helm OCI tests
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-08-29 14:09:42 +03:00
Sven Nebel
2c9ef85f6d Fix broken "edit this page" links in Flux CLI section #2203
Signed-off-by: Sven Nebel <nebel.sven@gmail.com>
2022-08-25 21:01:53 +01:00