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

1683 Commits

Author SHA1 Message Date
Jakub Baron
b16f1fc260 feature: let user specify what version of flux-cli they want to install
Signed-off-by: Jakub Baron <jakub.baron@oaknorth.com>
2021-09-21 12:36:47 +01:00
Stefan Prodan
3a76c26822 Merge pull request #1844 from fluxcd/fail-manifests-build-properly
Update Makefile target in release workflow
v0.17.2
2021-09-20 18:33:05 +03:00
Michael Bridgen
9d9fff5796 Update Makefile target in release workflow
There's another location which uses the "manifests directory" target
directly, but isn't run when testing a PR: the release workflow.

Signed-off-by: Michael Bridgen <michael@weave.works>
2021-09-20 16:06:01 +01:00
Stefan Prodan
0a92c61b09 Merge pull request #1830 from makkes/fix-create-hr
fix: don't set 'Install' field by default in 'create hr'
2021-09-20 17:11:30 +03:00
Max Jonas Werner
546be76f55 fix: don't set 'Install' field by default in 'create hr'
This fixes the case where you create a HelmRelease with `--export` and
the `install: {}` field being there, adding no value to the manifest.

Signed-off-by: Max Jonas Werner <mail@makk.es>
2021-09-20 14:42:29 +02:00
Stefan Prodan
d770f3f53f Merge pull request #1838 from superbrothers/dynamic-completions
Add dynamic completion suppport
2021-09-20 09:42:54 +03:00
Kazuki Suda
254cc131ae Add dynamic completion suppport
This commit adds dynamic completion support for the following commands
and flags:

- `flux delete ...` command
- `flux export ...` command
- `flux get ...` command
- `flux reconcile ...` command
- `flux resume ...` command
- `flux suspend ...` command
- `--namespace` flag
- `--context` flag

Signed-off-by: Kazuki Suda <kazuki.suda@gmail.com>
2021-09-18 17:27:47 +09:00
Stefan Prodan
70509ffcb4 Merge pull request #1833 from superbrothers/fix-971
Fix `flux completion zsh` to work with `source` only
2021-09-18 11:14:44 +03:00
Kazuki Suda
4cc2326c7f Fix flux completion zsh to work with source only
Signed-off-by: Kazuki Suda <kazuki.suda@gmail.com>
2021-09-17 17:49:47 +09:00
Michael Bridgen
0133caaec4 Merge pull request #1828 from fluxcd/fail-manifests-build-properly
Use a file to record successful manifests build
2021-09-16 14:33:58 +01:00
Michael Bridgen
7ae4f28920 Use a file to record successful manifests build
Using the directory cmd/flux/manifests as a prerequisite causes a
problem: if the script that creates the files within fails, the next
invocation of make will see the directory and assume it
succeeded. Since the executable expects certain files to be present,
but they are not explicit prerequisites of the recipe for building the
binary, this results in a successful build but a broken `flux`
executable.

Instead, depend on a file that's explicitly updated when the script
has succeeded, and which itself depends on the inputs.

A couple of the CI workflows run

    make cmd/flux/manifests

before doing other things, presumably as a way to avoid running the
whole test suite in a CI pipeline for some purpose other than testing,
so these needed changing as well.

Signed-off-by: Michael Bridgen <michael@weave.works>
2021-09-16 14:03:13 +01:00
Stefan Prodan
b1eb0270e9 Merge pull request #1811 from fluxcd/replace-promptui-lgpl
Replace promptui pkg with a fork free of LGPL
v0.17.1
2021-09-13 14:47:10 +03:00
Stefan Prodan
03b6de1169 Replace promptui pkg with a fork free of LGPL
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-09-13 14:27:06 +03:00
Stefan Prodan
9d3f75d111 Merge pull request #1810 from fluxcd/pass-version-to-build
Add version arg to make build
2021-09-13 14:17:27 +03:00
Stefan Prodan
5c41924b2f Add version arg to make build
Allow specifying the version when building the CLI binary with Make. This is useful for projects that distribute their own Flux CLI binary.

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-09-13 13:59:52 +03:00
Stefan Prodan
7cf7cf2f1e Merge pull request #1801 from fluxcd/update-components
Update toolkit components
2021-09-09 16:46:43 +03:00
fluxcdbot
2679731bde Update toolkit components
- kustomize-controller to v0.14.1
  https://github.com/fluxcd/kustomize-controller/blob/v0.14.1/CHANGELOG.md

Signed-off-by: GitHub <noreply@github.com>
2021-09-09 13:14:44 +00:00
Stefan Prodan
ad73370cd7 Merge pull request #1791 from 23technologies/feat/fix-secretRef-bucket-creation
Fix Bucket SecretRef mapping
2021-09-07 14:20:13 +03:00
Fynn Späker
18acae57bd Fix SecretRef
Signed-off-by: Fynn Späker <spaeker@23technologies.cloud>
2021-09-07 12:15:35 +02:00
Hidde Beydals
b427356eca Merge pull request #1782 from makkes/bootstrap-with-custom-ca
feat: enable bootstrap with custom CA locally
2021-09-03 15:54:09 +02:00
Max Jonas Werner
2e6ca16a4a chore: use os.ReadFile instead of deprecated ioutil.ReadFile
Signed-off-by: Max Jonas Werner <mail@makk.es>
2021-09-03 12:20:57 +02:00
Max Jonas Werner
e98f1142a6 feat: enable bootstrap with custom CA locally
When a user provided the `--ca-file` flag to the `bootstrap` command,
the given CA file wasn't taken into account for cloning the repository
locally. It was just passed along to the CR that is created so Flux
can make use of it when cloning the repository in-cluster.

However, users may not want to add a custom CA to their local host's
trust chain and may expect the `--ca-file` flag to be respected also
for cloning the repository locally. This is what this commit
accomplishes.

closes #1775

Signed-off-by: Max Jonas Werner <mail@makk.es>
2021-09-01 15:38:53 +02:00
Hidde Beydals
06fa8f75c9 Merge pull request #1696 from allenporter/flux-cmd-create
Add tests for create source git
2021-08-30 17:43:09 +02:00
Allen Porter
8cbd4e8172 Add test for "flux create source git"
The create source tests are more interesting than the existing tests as they
create objects then wit for the flux source reconciler to complete. The tests
simulate this with a background goroutine that waits for an object to be
created then uses a test specific function to update it.

The tests set a timeout so that if there is a failure they timeout somewhat
quickly rather than hanging for a longer period of time.

Signed-off-by: Allen Porter <allen@thebends.org>
2021-08-30 07:44:03 -07:00
Stefan Prodan
83c7994266 Merge pull request #1761 from fluxcd/improve-readme
Simplify readme
2021-08-27 16:31:23 +03:00
Stefan Prodan
43843581b6 Simplify readme
- remove install instruction as they get out of sync with the docs website
- make the get started guide the first link under docs

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-08-27 16:07:25 +03:00
Stefan Prodan
7e03d64e8a Merge pull request #1757 from Schildkroete23/main
Be able to create a git source without human interaction.
2021-08-27 16:06:34 +03:00
Daniel Petró
c6f4d71187 Be able to create a git source without human interaction.
Signed-off-by: Daniel Petró <daniel.petro@icloud.com>
2021-08-27 13:01:35 +02:00
Stefan Prodan
69c3b90fea Merge pull request #1755 from fluxcd/update-components
Update toolkit components
v0.17.0
2021-08-26 15:35:01 +03:00
fluxcdbot
75309b4c93 Update toolkit components
- kustomize-controller to v0.14.0
  https://github.com/fluxcd/kustomize-controller/blob/v0.14.0/CHANGELOG.md
- notification-controller to v0.16.0
  https://github.com/fluxcd/notification-controller/blob/v0.16.0/CHANGELOG.md

Signed-off-by: GitHub <noreply@github.com>
2021-08-26 12:11:29 +00:00
Stefan Prodan
433f13a7ed Merge pull request #1754 from ttulka/logs-since-2
Add `logs` flags `--since` and `--since-time`
2021-08-26 15:10:58 +03:00
Tomas Tulka
8896a1e73e tidy
Signed-off-by: Tomas Tulka <tomas.tulka@gmail.com>
2021-08-26 10:56:25 +02:00
Tomas Tulka
54758b1692 add --since and --since-time
Signed-off-by: Tomas Tulka <tomas.tulka@gmail.com>
2021-08-25 22:10:47 +02:00
Stefan Prodan
375e00c79c Merge pull request #1748 from allenporter/ioutil
Remove use of deprecated io/ioutil
2021-08-25 08:41:50 +03:00
Allen Porter
e2454d91f1 Remove use of deprecated io/ioutil
Signed-off-by: Allen Porter <allen@thebends.org>
2021-08-24 13:06:17 -07:00
Stefan Prodan
6894f6f3bf Merge pull request #1743 from allenporter/flux-envtest
Use shared envTest for unit tests
2021-08-24 11:56:23 +03:00
Allen Porter
d45501a129 Use shared envTest for unit tests
Speed up unit tests by using a shared envTest. This requires each
test to use its own namespace to avoid clobbering objects for
other tests. Tests previously took around 8 seconds each, and now
the initial test takes 2 seconds with follow up tests taking less
than a second each.

Also update existing tests that use a fixed namespace to use a
generated namespace.

Share gold file template function with yaml files.

Remove the testClusterMode, and instead rely on MainTest to do
the appropriate test setup and rootArgs flag setup. Move the
rootArg flag setup out of NewTestEnvKubeManager to avoid
side effects.

A follow up change can be to push the individual setups
from NewTestEnvKubeManager() into their respective TestMain since
the harness share little code.

Signed-off-by: Allen Porter <allen@thebends.org>
2021-08-24 01:01:14 -07:00
Stefan Prodan
def92e14ee Merge pull request #1740 from allenporter/flux-test-cleanup
Rename trace test golden files
2021-08-23 19:50:28 +03:00
Allen Porter
11708d4189 Rename trace test golden files
Rename trace test golden files to match the convention used by other tests

Signed-off-by: Allen Porter <allen@thebends.org>
2021-08-23 09:29:27 -07:00
Stefan Prodan
2bc64bf419 Merge pull request #1739 from allenporter/flux-cmd-test-func
Make test harness more flexible with functions
2021-08-23 19:25:31 +03:00
Allen Porter
3a3bdc62c8 Make test harness more flexible with functions
Replace the 4 arguments to cmdTestCase with a function that
can let tests run arbitrary logic if it is more complex than
what is provided by the test harness. Move the existing logic
into functions that the test can use for common assertions on
golden files and golden values.

These changes were pulled out of PR #1696 to make a smaller review.

Signed-off-by: Allen Porter <allen@thebends.org>
2021-08-23 08:57:43 -07:00
Stefan Prodan
72294b2a56 Merge pull request #1733 from fluxcd/arm64-e2e
Move arm64 e2e to Go tests
2021-08-19 15:47:52 +03:00
Stefan Prodan
94940a20ef Move arm64 e2e to Go tests
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-08-19 15:16:45 +03:00
Stefan Prodan
219ff2ef7d Merge pull request #1729 from timja/patch-1
Avoid substitution issue in kustomize for azure credentials sync
2021-08-19 13:10:54 +03:00
Tim Jacomb
bc2de741b8 Avoid substitution issue in kustomize for azure credentials sync
Signed-off-by: Tim Jacomb <tim.jacomb@hmcts.net>
2021-08-19 07:53:58 +01:00
Stefan Prodan
5eabd4e898 Merge pull request #1726 from allenporter/flux-envtest
Remove fakeclient and use testenv for flux cmd tests
2021-08-19 08:33:16 +03:00
Allen Porter
e8d6d5fe5c Remove fakeclient and use testenv for flux cmd tests
Remove use of the fake client, and replace with a real client connected to the
testEnv.

This required fixes to the yaml files as the testEnv has stricter verifcation
of objects. This also meant it was not possible to test a GitRepository with
a missing artifact since that is not a valid state.

The tests are slower than before, taking around 7-10 seconds each because the
 testEnv is setup and destroyed for every test. These will be sped up in a
 follow up PR.

Signed-off-by: Allen Porter <allen@thebends.org>
2021-08-18 18:53:53 -07:00
Stefan Prodan
55bd93ff79 Merge pull request #1727 from fluxcd/make-envtest
Wire kubebuilder assets to envtest bin
2021-08-18 17:55:02 +03:00
Stefan Prodan
b34b2d779b Wire kubebuilder assets to envtest bin
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-08-18 17:35:46 +03:00
Stefan Prodan
103ed2be65 Merge pull request #1719 from chanwit/e2e_check_pre
Add e2e test case fo check --pre
2021-08-18 16:42:53 +03:00