Skip to content

move fluxcd and operator back to system - #188

Merged
Andrei Kvapil (kvaps) merged 1 commit into
mainfrom
flux-to-system
Jun 26, 2024
Merged

Andrei Kvapil (kvaps) merged 1 commit into
mainfrom
flux-to-system

Conversation

@kvaps

@kvaps Andrei Kvapil (kvaps) commented Jun 25, 2024 •

Copy link
Copy Markdown
Member

Separate and move fluxcd and fluxcd-operator from core to system.

It should not be problem with self-update now, since we correctly set dependsOn option, it ensures ordered update of flux instance right after flux-operator.

As part of #184 and #185
fixes #169

@kvaps
Andrei Kvapil (kvaps) force-pushed the flux-to-system branch 3 times, most recently from a2d4e05 to f493b09 Compare June 25, 2024 20:19

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good improvement.

Comment thread scripts/migrations/4 Outdated
if kubectl get fluxinstances.fluxcd.controlplane.io -n cozy-fluxcd flux; then
kubectl delete fluxinstances.fluxcd.controlplane.io -n cozy-fluxcd flux --wait=false
kubectl patch fluxinstances.fluxcd.controlplane.io -n cozy-fluxcd flux -p '{"metadata":{"finalizers":null}}' --type=merge
fi

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure I understand the purpose of this migration, is it just designed to evict a flux-operator that has been installed as a core package? There hasn't been a release of cozystack which had shipped flux-operator, and it doesn't look like flux is moving namespaces, I don't think that is needed.

On the other hand, it could be beneficial to move Flux to flux-system for compatibility with some UIs that expect Flux to be in flux-system. That would require a migration. It is not required by flux-operator though, Flux can be in any single namespace, it should be the same namespace as the operator was helm install'ed into.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Installing flux-operator is designed to take over an existing Flux instance however it was deployed, so long as it's one singular instance and the namespace matches that of the FluxInstance.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the goal of this migration is to make Flux Operator user-installable inside of a tenant, I think that further discussion is needed before that will work. Note this is mentioned at the top of the guide docs:

The Flux Operator comes with a Kubernetes CRD called FluxInstance. A single custom resource of this kind can exist in a Kubernetes cluster with the name flux that must be created in the same namespace where the operator is deployed.

https://fluxcd.control-plane.io/operator/flux-config/

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm testing it now, if it allows the operator of cozystack to perform self-upgrades then I think it's a go. I don't know about this migration though. What will stop it from deleting FluxInstances / where is the FluxInstance to be deleted expected to come from?

This comment was marked as outdated.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey Kingdon Barrett (@kingdonb) I reworkied this fully, could you check again please?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, you're right I did something wrong here.

Hey, we didn't make any release since flux-operator was merged, let's remove it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add option for overriding fluxcd values values-fluxcd

3 participants