35 Commits

Author SHA1 Message Date
3542d61afd Add source-watcher to the install and bootstrap commands
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2025-09-15 23:59:03 +03:00
2f850743fa Add labels to Pod templates
Ensure also pods contain the relevant labels inherited from pared
Deployment object, this makes it easier to select and filter the pods
using the labels eg. when scraping for metrics.

Signed-off-by: Jiří Pinkava <j-pi@seznam.cz>
2025-07-28 10:09:12 +02:00
05903e2171 Generate image pull secret at bootstrap
Add an optional flag called `--registry-creds` to the bootstrap
command for generating an image pull secret for container images
stored in private registries.

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-04-05 16:42:15 +03:00
00c6ac81b9 manifestgen/install: use clean default HTTP client
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-08-22 14:05:12 +02:00
6bf439d4ce fix 'patchesJson6902' is deprecated' warning
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
2023-06-14 16:32:27 +01:00
41cdd3dcf7 Update Git packages
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-05-29 14:13:56 +03:00
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
7232ff9ea0 modify tmp dir generation to be absolute on all OSes
Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
2022-05-04 15:13:39 +05:30
b9fbdfc9a4 Fix bootstrap manifest generation
Use the OS package to write the generated files on disk instead of Flux  secure FS package which is meant for read operations.

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-05-04 09:41:26 +03:00
57442e8faa kustomize: use FS from fluxcd/pkg
This switches to a secure FS implementation in most places, except for
where we can not make changes at this moment because it would break
behavior.

Not handled in this commit:

- Allowing the root for `manifestgen` packages to be configured.
- Allowing the user to define a working root while building locally.
- Defaulting to the secure FS implementation in
  `kustomization.MakeDefaultOptions`. Problem here is that constructing
  the secure FS could result in an error, which we can not surface
  without signature changes to the constructor func.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2022-05-03 13:52:51 +02:00
139bbbb87c Use absolute domain name for the events address
Add ending dot to the events address to be consistent with source controller address.
This will affect bootstrap and install by setting `--events-addr=http://notification-controller.flux-system.svc.cluster.local./`.

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-03-23 11:57:46 +02:00
1fda202cf9 all: fix some typos
Signed-off-by: cuishuang <imcusg@gmail.com>
2022-03-02 19:36:08 +08:00
f7853c4ddf Enable pod security warnings for flux-system
Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-01-21 11:23:56 +00:00
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
8ec5492d87 fix: use full domain name for notification-controller
Signed-off-by: Pawel Rozlach <vespian@users.noreply.github.com>
2021-11-03 10:37:29 +01:00
83c3e8c2fc Replace kubectl with Go server-side apply
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-10-08 21:10:31 +03:00
7f425efa6b chore: remove deprecated io/ioutil
Signed-off-by: Dmitry Rybin <ayrowa@yandex.ru>
2021-07-30 20:51:46 +02:00
a6620e478a Update to Kustomize v4
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-06-15 11:25:57 +03:00
9055e753a9 Add app.kubernetes.io/part-of: flux label
To be used in a future version of Flux to better select Flux components
in a namespace, as the namespace value for the
`app.kubernetes.io/instance` could be used by non Flux related
workloads.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-04-07 10:24:08 +02:00
6003d11156 Embed the install manifests in flux binary
- add make target for generating the install manifests using kustomize
- embed the generated manifests in flux binary
- the install and bootstrap commands default to using the embedded manifests
- download the install manifests from GitHub only if the install/bootstrap version arg is set

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-02-25 12:53:04 +02:00
9b649f6c72 Check if targeted bootstrap/install version exists
Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-02-15 21:57:06 +01:00
bc9cbc387c Add flux version to bootstrap commit messages
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-02-12 10:47:00 +02:00
37f5587085 Allow Flux to be deployed on tainted Kubernetes nodes
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-02-11 15:20:19 +02:00
4c29a1ca27 Replace SA namespace in RBAC
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-01-26 18:57:36 +02:00
8f8c7cccc6 Add SA namespace to RBAC
Fix flux install when not all controllers have been selected

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-01-26 16:16:34 +02:00
207c50ceac Deprecate arch flags in favor of multi-arch images
This commit deprecates the architecture flag (`--arch`) for the install
and bootstrap commands, in favor of the bundled multi-arch images that
will be available for the next MINOR range of GOTK controller releases.

Summary of changes:

* `*Arch` variables have been marked as deprecated for both commands.
* `-arm64` suffix is no longer selectively added to the image definition
  of a component's `Deployment`.
* `kubernetes.io/arch` node selector with the defined value has been
  removed from the components' `Deployment`s.
* `Arch` has been removed from the available `Options` in
  `manifestgen/install`.
* Documentation references have been changed to highlight existence
  of multi-arch images and supported architectures.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-01-15 11:25:20 +01:00
dd0b807fe4 Validates components set
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>

Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
2021-01-05 10:52:11 +01:00
5ea4e814f5 Add safe guards for relative paths
This commit adds multiple safe guards for relative paths, ensuring they
never traverse outside the working directory.

The `SafeRelativePath` flag calculates the safe relative path based on a
relative base dir, which results in a flattened path.

The write methods of `manifestgen` make use of the `SecureJoin` as well,
to ensure writes are never outside of the given directory when used as
a lib outside of the CLI.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2020-12-14 15:14:49 +01:00
4d7df52dbe Add cluster-domain option for bootstrap command
Signed-off-by: Léopold Jacquot <leopold.jacquot@infomaniak.com>
2020-12-12 16:37:05 +01:00
6280fbce17 Update kustomize/api to v0.7.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-12-11 16:07:23 +02:00
ee1f70841c Use path rel to working dir for kustomize build
Work around for a bug in kustomize causing it to not properly
handle absolute paths on Windows.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2020-12-10 16:54:19 +01:00
dd65e9b89d Fix typo
Signed-off-by: Sylvain Rabot <sylvain@abstraction.fr>
2020-12-10 11:00:54 +01:00
0bf52f4746 Change fluxcd/toolkit to fluxcd/flux2
Signed-off-by: Hidde Beydals <hello@hidde.co>
2020-10-29 16:31:32 +01:00
9916a53761 Rename gotk-system namespace to flux-system
Signed-off-by: Hidde Beydals <hello@hidde.co>
2020-10-29 16:25:16 +01:00
9bc250d027 Refactor manifests generation
- introduce manifestgen pkg, to be consumed by the CLI and Terraform provider
- consolidate defaults in manifestgen/install pkg
- introduce Manifest as the returning type of manifest generation
- add helper function to Manifest for writing multi-doc YAMLs on disk

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-10-29 10:15:53 +02:00