Commit Graph

113 Commits (45faebb6b3091861ac5bc03986ab0ea8b534fad1)

Author SHA1 Message Date
Stuebinger, Bernd b93d4a4a17 Fix typo in bootstrap_plain_git.go
Signed-off-by: Bernd Stübinger <41049452+stuebingerb@users.noreply.github.com>
Joel Bennett cdcf332491
Correct "sync" to "component" in log lines
Signed-off-by: Joel Bennett <Jaykul@HuddledMasses.org>
Stefan Prodan 437a943677
Update `HelmRelease` to v2beta2
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
Sunny e901e8b6f8 Update all the references of NC v1beta2 to v1beta3
Signed-off-by: Sunny <darkowlzz@protonmail.com>
Somtochi Onyekwere 2289c6cc60 bootstrap: provide better error message on timeout
Check GitRepository and return Ready condition message as part of error
on timeout.

Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
Somtochi Onyekwere fd163ddcf2 show cluster instance name and version in flux check and flux version
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
Stefan Prodan 80efd29ec0
Update dependencies
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
Jabar Asadi dcbca6b1bf
feat: add gitea bootstrapper
Signed-off-by: Jabar Asadi <jasadi@d2iq.com>
Hidde Beydals ba1180ad4d
misc: fix hypothetical implicit memory aliasing
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
Hidde Beydals 3fdb292381
misc: address `wait.PollImmediate` deprecation
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
Hidde Beydals ce3e264c7d
misc: unconditional `strings.TrimPrefix`
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
Hidde Beydals 5b22207c98
misc: address `kustomize/api/filesys` deprecation
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
Hidde Beydals 3278a0782f
misc: simplify row append
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
Hidde Beydals 3c495861a1
misc: address unnecessary use of `fmt.Sprintf`
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
Somtochi Onyekwere 08cb3858ed Update go-git-providers to v0.19.1
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
Sanskar Jaiswal 8df27d8c3a
modify `flux create secret tls` to create secrets of type TLS
Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
Sanskar Jaiswal 6464d6c7b4
add deprecation warning per secret key field and constant
Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
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>
Hidde Beydals 00c6ac81b9
manifestgen/install: use clean default HTTP client
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
Max Jonas Werner ce854236cf
Annotate errors from go-git-providers
closes 

Signed-off-by: Max Jonas Werner <mail@makk.es>
Somtochi Onyekwere 6bf439d4ce fix 'patchesJson6902' is deprecated' warning
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
Stefan Prodan 41cdd3dcf7
Update Git packages
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
Stefan Prodan 13ff4afaa4
Update Kubernetes to v1.27 and Kustomize to v5.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
cui fliter 3edfff49a2 fix some comments
Signed-off-by: cui fliter <imcusg@gmail.com>
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>
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>
Somtochi Onyekwere 24452ecd37
Update GitRepository Receiver, and Kustomization to v1
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
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>
Santosh Kaluskar 5a45d2b127
Create secret with bearer-token
Signed-off-by: Santosh Kaluskar <dtshbl@gmail.com>
Stefan Prodan b44a3d36ba
Remove deprecated flags
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
Hidde Beydals 71d59e36cc bootstrap: support legacy revision while polling
Signed-off-by: Hidde Beydals <hello@hidde.co>
Sunny 9dd98fb2b2 Update image-reflector API to v1beta2
Signed-off-by: Sunny <darkowlzz@protonmail.com>
Stefan Prodan f9e69089ea
Update CLI commands to Notification API v1beta2
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
Hidde Beydals b004fbfc41 Use k8s.io/apimachinery/pkg for error aggregation
Signed-off-by: Hidde Beydals <hello@hidde.co>
Philip Laine 8c56ccc5b0 Aggregate errors in uninstall functions
Signed-off-by: Philip Laine <philip.laine@gmail.com>
Sanskar Jaiswal f8da3a1b44 make gpg signing more robust for bootstrap
Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
Sanskar Jaiswal 4ea253220a use fluxcd/go-git instead of go-git/go-git directly
Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
Sanskar Jaiswal 0a5048a56b refactor bootstrap process to use fluxcd/pkg/git
Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
Philip Laine a4734d7e30 Remove file reading from bootstrap package
Signed-off-by: Philip Laine <philip.laine@gmail.com>
Philip Laine 0343575146 Move bootstrap package from internal to pkg
Signed-off-by: Philip Laine <philip.laine@gmail.com>
Philip Laine 80b87729b6 Move uninstall code to pkg
Signed-off-by: Philip Laine <philip.laine@gmail.com>
Philip Laine f6c96aea48 Add discard logger
Signed-off-by: Philip Laine <philip.laine@gmail.com>
Somtochi Onyekwere 41aac68193
Add link to kubectl repo
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
Somtochi Onyekwere fe4b65972a
Update cli description
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
Somtochi Onyekwere 4c576bf599
Add create oci secret command
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
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>
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>
Sanskar Jaiswal 7232ff9ea0 modify tmp dir generation to be absolute on all OSes
Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
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>
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>