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

426 Commits

Author SHA1 Message Date
Somtochi Onyekwere
a30ffdb176 Use text/template
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
2022-02-14 23:59:20 +01:00
Stefan Prodan
cbca583f4b Add GitRepository namespace arg to flux create image update
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-02-10 10:52:51 +02:00
Stefan Prodan
9d6a037935 Update dependencies
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-02-07 14:09:23 +02:00
Soule BA
2e9fd33ce5 Mask dockerconfigjson secret types and support StringData secrets
If implemented, flux diff kustomization will managed correctly sops
managed dockerconfigjson secrets.
Sops encrypted secret with stringData maps are supported too.

Signed-off-by: Soule BA <soule@weave.works>
2022-02-07 09:45:38 +01:00
Somtochi Onyekwere
d3d271defe use client.Patch for suspend/resume operations
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
2022-02-04 12:06:39 +01:00
Robert Wittman
e33198e750 Replace github boostrap GPG options
Signed-off-by: Robert Wittman <robkwittman@gmail.com>
2022-02-03 11:09:10 -05:00
Robert Wittman
e3f5a8fee3 Add GPG options to Gitlab and BitBucket bootstraps
Signed-off-by: Robert Wittman <robkwittman@gmail.com>
2022-02-03 11:07:55 -05:00
Robert Wittman
f8b58f8be9 Add GPG signing to Github bootstrap
Signed-off-by: Robert Wittman <robkwittman@gmail.com>
2022-02-03 11:03:35 -05:00
Soule BA
b86b195450 Add contextual error code for flux diff kustomization
If implemented, calling the diff command on kustomization will return 0,
1(if changes are identified), >1 for errors.

Signed-off-by: Soule BA <soule@weave.works>
2022-02-03 13:41:57 +01:00
Stefan Prodan
141d71c39d Use CrossNamespaceSourceReference for image automations
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-02-01 12:12:59 +02:00
Stefan Prodan
246af92386 Adapt diff test to match Kubernetes 1.23.3 API response
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-01-28 20:37:16 +02:00
leigh capili
57962347f2 Output Usage for flux get <sources|images>
Signed-off-by: leigh capili <leigh@null.net>
2022-01-26 16:03:22 -07:00
Stefan Prodan
f154326391 Set minimum supported version to Kubernetes 1.20.6
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-01-26 11:21:32 +02:00
Soule BA
306f8f5715 Add graceful shutdown when interrupted
If implemented this permit restoring a clean state in case of signal
interruption.

Signed-off-by: Soule BA <soule@weave.works>
2022-01-20 13:21:07 +01:00
Soule BA
f7d9ee90cd Add e2e tests for build/diff kustomization
Signed-off-by: Soule BA <soule@weave.works>
2022-01-20 11:51:57 +01:00
Soule BA
9376c9a946 Add a diff kustomization feature
If implemented it will permit queriying the Kubernetes API to fetch the specified
Flux Kustomization, then uses the specified path to build the overlay.
It will then ssa-dry-run apply and output the diff using homeport/dyff

Signed-off-by: Soule BA <soule@weave.works>
2022-01-20 11:51:56 +01:00
Soule BA
70fb87bc93 Add a build kustomization feature
If implemented it will permit queriying the Kubernetes API to fetch the specified
Flux Kustomization, then uses the specified path to build
the overlay.

Signed-off-by: Soule BA <soule@weave.works>
2022-01-20 11:51:56 +01:00
Somtochi Onyekwere
1e2a497108 Shorten sha commit
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
2022-01-20 11:13:25 +01:00
Stefan Prodan
8c67708829 Update dependencies
- sigs.k8s.io/cli-utils v0.27.0
- github.com/fluxcd/pkg/ssa v0.10.0

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-01-13 19:37:14 +02:00
Jakob Schrettenbrunner
d3c56eb3d3 trace: fix lint warning
Signed-off-by: Jakob Schrettenbrunner <jakob.schrettenbrunner@telekom.de>
2022-01-13 15:52:47 +01:00
Jakob Schrettenbrunner
b10eee87ee Simplify arguments of flux trace command
It now accepts arguments in the forms <resource>/<name>
and <resource> <name> instead of requiring api version and
kind as flags.

Signed-off-by: Jakob Schrettenbrunner <jakob.schrettenbrunner@telekom.de>
2022-01-13 15:52:47 +01:00
Alby Hernández
c190d80d4a Avoid overwriting the host port on http requests
Remove the overwrite of the repositoryURL.Host variable to include Git
servers deployed on non-standard https ports

Co-authored-by: Sebastián Vargas <develolux@gmail.com>

Signed-off-by: Alby Hernández <me@achetronic.com>
Signed-off-by: Alby Hernández <alby.hernandez@system73.com>
2022-01-13 10:32:10 +01:00
Aurel Canciu
f3d143e5ee Update Go to v1.17
Signed-off-by: Aurel Canciu <aurelcanciu@gmail.com>
2022-01-10 16:30:38 +01:00
Jakob Schrettenbrunner
ca7d2e783f Use k8s.io/cli-runtime for kubernetes flags
Signed-off-by: Jakob Schrettenbrunner <jakob.schrettenbrunner@telekom.de>
2022-01-07 16:01:24 +01:00
Hidde Beydals
c13de6089a cmd: start trace short description with T
This fixes a styling issue:

```
$ flux --help

Command line utility for assembling Kubernetes CD pipelines the GitOps
way.

Usage:
  flux [command]

...

Available Commands:
  ...
  suspend     Suspend resources
  trace       trace an in-cluster object throughout the GitOps delivery
pipeline
  uninstall   Uninstall Flux and its custom resource definitions
...
```

Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-12-09 17:35:53 +01:00
Somtochi Onyekwere
a26dd05c49 Remove extra space
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
2021-11-23 16:17:10 +01:00
Somtochi Onyekwere
a03574f8c3 Add caBundle to bitbucket
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
2021-11-23 12:37:39 +01:00
Somtochi Onyekwere
43c6a1531a Add caBundle to gogit provider config
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
2021-11-23 12:02:06 +01:00
Stefan Prodan
8731f00347 Remove deprecated io/ioutil from flux tree
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-11-22 17:53:43 +02:00
Soule BA
46f9fc194c Add stash provider bootstrap support
The new command set is:
  flux bootstrap bitbucket-server --owner=<project> --username=<user> --repository=<repository name> --hostname=<domain> --token-auth

There is a parity in the capabilities with the other providers.

Signed-off-by: Soule BA <soule@weave.works>
2021-11-18 11:23:44 +01:00
Somtochi Onyekwere
e96652bdaa Update keys to ECDSA format
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
2021-11-17 11:16:36 +01:00
Somtochi Onyekwere
b7007a35d7 update test files to use ecdsa key
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
2021-11-17 10:49:30 +01:00
Jack Evans
05b053e2e9 remove trailing --- for install and bootstrap consistency
Signed-off-by: Jack Evans <jack.evans1@ibm.com>
2021-11-11 13:49:50 +00:00
Stefan Prodan
f03c24565f Skip remote clusters in flux tree cmd
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-11-09 18:52:51 +02:00
Jack Evans
923a5882de make flux bootstrap and install generation more consistent
Signed-off-by: Jack Evans <jack.evans1@ibm.com>
2021-11-09 15:18:32 +00:00
Max Jonas Werner
be1ce74dc5 fix: trim CRLF from password read from stdin
bufio's reader.ReadString includes any CRLF characters and we don't
want these in the resulting token because this leads to errors in the
authentication like this:

```
✗ failed to get Git repository
"https://github.com/kingdon-ci/jenkins-infra": Get
"https://api.github.com/repos/kingdon-ci/jenkins-infra": net/http:
invalid header field value "Bearer gho_NNNNNsecrettokenMMMMM\n" for
key Authorization
```

Signed-off-by: Max Jonas Werner <mail@makk.es>
2021-11-07 15:09:31 +01:00
Max Jonas Werner
31771f3575 fix: improve wording
Signed-off-by: Max Jonas Werner <mail@makk.es>
2021-11-07 15:09:31 +01:00
Max Jonas Werner
ffcd7d8059 feat: prompt for access tokens in 'bootstrap' command
This change adds functionality to both, `bootstrap github` and
`bootstrap gitlab` to prompt the user for the personal access tokens
if those can't be derived from the shell environment. Echoing is
turned off for better privacy.

Instead of having to interactively type the token or manually paste it
from the clipboard, users can also pipe it to Flux which comes in
handy e.g. when executing Flux remotely over an SSH connection:

```
$ echo 'asdf' | flux bootstrap github
```

Otherwise, Flux will prompt the user:

```
$ flux bootstrap github
Please type your GitHub personal access token:
```

closes #2011

Signed-off-by: Max Jonas Werner <mail@makk.es>
2021-11-07 15:09:30 +01:00
Stefan Prodan
4621576f40 Set ECDSA as the default algorithm for flux create source git
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-11-02 17:21:10 +02:00
Stefan Prodan
4f2ebd78be Set ECDSA as the default algorithm for flux create secret git
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-11-02 16:49:17 +02:00
Stefan Prodan
88dacebc94 bootstrap: Set ECDSA as the default SSH key algorithm
Motivation: RSA SHA-1 SSH keys are no longer accepted by GitHub https://github.blog/2021-09-01-improving-git-protocol-security-github/.
Given this we are switching the default from RSA to ECDSA for `git`, `github` and `gitlab` variants of `flux bootstrap`.

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-11-02 16:22:16 +02:00
Stefan Prodan
d5d8c340c8 Switch to app.kubernetes.io/part-of label selector
Use `app.kubernetes.io/part-of: flux` label instead of `app.kubernetes.io/instance` to select the in-cluster objects used in flux version, check, logs and uninstall commands.

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-11-01 18:02:49 +02:00
Stefan Prodan
61be0775af Add fetch timeout arg to create source commands
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-11-01 15:37:58 +02:00
Stefan Prodan
f2de7e04b8 Set default ns with FLUX_SYSTEM_NAMESPACE env var
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-11-01 14:21:44 +02:00
Stefan Prodan
37746023c1 Enable completion for flux tree cmd
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-11-01 12:19:06 +02:00
Somtochi Onyekwere
eb69083ef5 Add unit tests for export
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
2021-11-01 10:46:07 +01:00
Kingdon Barrett
94b7917679 Fix quoting around reconciliation error message
While fixing an unrelated issue, I noticed:
    ✗ GitRepository reconciliation failed: ''PGP public keys secret error: expected pointer, but got nil

the single quote should surround the readyCond.Message

Signed-off-by: Kingdon Barrett <yebyen@gmail.com>
2021-10-29 11:21:56 -04:00
Stefan Prodan
d9bb4c631e Add flux tree to e2e tests
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-10-26 17:34:01 +03:00
Stefan Prodan
722962c138 Expand Helm releases in flux tree cmd
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-10-26 15:54:31 +03:00
Stefan Prodan
078cfe92c2 Add JSON and YAML output options to flux tree cmd
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-10-25 13:45:27 +03:00