Skip to content

Inconsistence between command line of FluxCD and GitOps #3753

Open
@gecube

Description

Good day!

As a DevOps engineer I want to generate GitOps platform manifests and apply them to the cluster via GitOps approach. So - generate helm release, put it into git repo and fluxcd would apply it.

If I want to generate FluxCD manifests I use the next command:

flux install \
  --components-extra='image-reflector-controller,image-automation-controller' \ 
  --export > gotk-components.yaml

This way is clean and understandable.

I want to do the same with Gitops platform and I found that there is no install subcommand, or generate or something similar. The only option is to use bootstrap subcommand in such a way:

gitops bootstrap --export
► creating client to cluster
✔ created client to cluster: https://teleport.private.zodiamarkets.xyz:3026
◎ checking flux
► verifying flux installation
✗ flux installed error: ► checking prerequisites
✗ Kubernetes version v1.25.16-eks-77b1e4e does not match >=1.26.0-0
► checking version in cluster
✔ distribution: flux-v2.2.3
✔ bootstrapped: true
► checking controllers
✔ helm-controller: deployment ready
► ghcr.io/fluxcd/helm-controller:v0.37.4
✔ image-automation-controller: deployment ready
► ghcr.io/fluxcd/image-automation-controller:v0.37.1
✔ image-reflector-controller: deployment ready
► ghcr.io/fluxcd/image-reflector-controller:v0.31.2
✔ kustomize-controller: deployment ready
► ghcr.io/fluxcd/kustomize-controller:v1.2.2
✔ notification-controller: deployment ready
► ghcr.io/fluxcd/notification-controller:v1.2.4
✔ source-controller: deployment ready
► ghcr.io/fluxcd/source-controller:v1.2.4
► checking crds
✔ alerts.notification.toolkit.fluxcd.io/v1beta3
✔ buckets.source.toolkit.fluxcd.io/v1beta2
✔ gitrepositories.source.toolkit.fluxcd.io/v1
✔ helmcharts.source.toolkit.fluxcd.io/v1beta2
✔ helmreleases.helm.toolkit.fluxcd.io/v2beta2
✔ helmrepositories.source.toolkit.fluxcd.io/v1beta2
✔ imagepolicies.image.toolkit.fluxcd.io/v1beta2
✔ imagerepositories.image.toolkit.fluxcd.io/v1beta2
✔ imageupdateautomations.image.toolkit.fluxcd.io/v1beta1
✔ kustomizations.kustomize.toolkit.fluxcd.io/v1
✔ ocirepositories.source.toolkit.fluxcd.io/v1beta2
✔ providers.notification.toolkit.fluxcd.io/v1beta3
✔ receivers.notification.toolkit.fluxcd.io/v1
✗ check failed
. flux is not bootstrapped in 'flux-system' namespace: more info https://fluxcd.io/flux/installation
◎ bootstrap flux

Look a little bit awkward as it is a different subcommand and also it performs additional checks (which are unnecessary if I want to use Gitops approach for the installation).

Possible solution:

  • remove checks
  • move an export to a separate subcommand

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions