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

98 Commits

Author SHA1 Message Date
Sanskar Jaiswal
8df27d8c3a modify flux create secret tls to create secrets of type TLS
Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
2023-08-23 14:44:10 +05:30
Sanskar Jaiswal
6464d6c7b4 add deprecation warning per secret key field and constant
Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
2023-08-23 14:44:09 +05:30
Sanskar Jaiswal
bf36a29ca2 add support for Kubernetes TLS keys for flux create secret tls
Add support for using `tls.key`, `tls.crt` and `ca.crt` keys while
generating a Secret, using the `--tls-key-file`, `--tls-crt-file` and
`--ca-crt-file` flags respectively.
Mark the flags `--key-file`, `--cert-file` and `--ca-file` as
deprecated.

Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
2023-08-23 14:44:09 +05:30
Hidde Beydals
00c6ac81b9 manifestgen/install: use clean default HTTP client
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-08-22 14:05:12 +02:00
Max Jonas Werner
ce854236cf Annotate errors from go-git-providers
closes #3623

Signed-off-by: Max Jonas Werner <mail@makk.es>
2023-07-03 13:55:53 +02:00
Somtochi Onyekwere
6bf439d4ce fix 'patchesJson6902' is deprecated' warning
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
2023-06-14 16:32:27 +01:00
Stefan Prodan
41cdd3dcf7 Update Git packages
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-05-29 14:13:56 +03:00
Stefan Prodan
13ff4afaa4 Update Kubernetes to v1.27 and Kustomize to v5.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-05-23 18:49:47 +03:00
cui fliter
3edfff49a2 fix some comments
Signed-off-by: cui fliter <imcusg@gmail.com>
2023-05-01 18:05:10 +02:00
Sanskar Jaiswal
08370cb3a6 clean dir before cloning git repo
Remove all files/subdirs from the directory we are cloning into. This is
needed because go-git returns a `repository already exists` error if
the directory is non-empty, which is possible since we retry cloning
(into the same dir) if the first attempt fails.

Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
2023-04-12 14:29:45 +05:30
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
24452ecd37 Update GitRepository Receiver, and Kustomization to v1
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
2023-04-05 16:05:20 +03: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
Santosh Kaluskar
5a45d2b127 Create secret with bearer-token
Signed-off-by: Santosh Kaluskar <dtshbl@gmail.com>
2023-03-14 22:31:45 +05:30
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
71d59e36cc bootstrap: support legacy revision while polling
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
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
Hidde Beydals
b004fbfc41 Use k8s.io/apimachinery/pkg for error aggregation
Signed-off-by: Hidde Beydals <hello@hidde.co>
2022-11-22 13:29:35 +00:00
Philip Laine
8c56ccc5b0 Aggregate errors in uninstall functions
Signed-off-by: Philip Laine <philip.laine@gmail.com>
2022-11-22 13:29:20 +00:00
Sanskar Jaiswal
f8da3a1b44 make gpg signing more robust for bootstrap
Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
2022-11-17 17:30:49 +05:30
Sanskar Jaiswal
4ea253220a use fluxcd/go-git instead of go-git/go-git directly
Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
2022-11-17 17:30:49 +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
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
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
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
Philip Laine
f6c96aea48 Add discard logger
Signed-off-by: Philip Laine <philip.laine@gmail.com>
2022-10-12 11:55:00 +02:00
Somtochi Onyekwere
41aac68193 Add link to kubectl repo
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
2022-08-09 12:44:59 +03:00
Somtochi Onyekwere
fe4b65972a Update cli description
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
2022-08-09 12:44:59 +03:00
Somtochi Onyekwere
4c576bf599 Add create oci secret command
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
2022-08-09 12:44:59 +03:00
Stefan Prodan
3f0efc9435 Update dependencies
- Update Kubernetes packages to v1.24
- Update go-yaml to v3.0.0 (fix CVE-2022-28948)
- Update fluxcd/pkg/runtime to v0.15.1

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-05-27 13:29:20 +03:00
Hidde Beydals
5130a154e4 Ensure proper FS root is set while bootstrapping
This ensures relative paths to e.g. bases can be used.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2022-05-24 12:14:21 +02:00
Sanskar Jaiswal
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
Stefan Prodan
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
Hidde Beydals
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
Paulo Gomes
e5ede275f8 Update Source API to v1beta2
The creation of oldConditions, statusableConditions and
reconcilableConditions is an adhoc solution to deal with the upstream
changes on `pkg/apis/meta`, which are yet to be replicated across other
Flux API components.

Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-03-23 11:33:35 +01:00
Stefan Prodan
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
Soule BA
7359e63960 Introduce a printer interface for flux resource
If implemented, there will a common interface to print flux resource.

We are adding new way to print resource information e.g. diff of
objects.

Signed-off-by: Soule BA <soule@weave.works>
2022-03-07 12:15:35 +01:00
cuishuang
1fda202cf9 all: fix some typos
Signed-off-by: cuishuang <imcusg@gmail.com>
2022-03-02 19:36:08 +08:00
Soule BA
32ad462ebe Fix stringData Secret issue
This commit migrate to the last version of pkg/ssa v0.14.1 that contains a fix
for stringData secrets. The test case was changed accordingly to
    validate a stringData drift.

A progress-bar flag option has also been added in order to be able to
disable it.

Signed-off-by: Soule BA <soule@weave.works>
2022-02-18 17:18:16 +01:00
Paulo Gomes
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
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
Aurel Canciu
f3d143e5ee Update Go to v1.17
Signed-off-by: Aurel Canciu <aurelcanciu@gmail.com>
2022-01-10 16:30:38 +01: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
Stefan Prodan
04faba95cd Add DO NOT EDIT warn to bootstrap sync manifests
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-11-04 18:03:40 +02:00
Pawel Rozlach
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
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
3d4ca831dc Add missing copyright headers
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-10-14 16:14:28 +03:00
Stefan Prodan
0b659e3f09 Update kustomize-controller API to v1beta2
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-10-08 21:11:06 +03:00
Stefan Prodan
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