Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add cluster sync addendum to RFC-0001 #75

Merged
merged 2 commits into from
Jun 10, 2024
Merged

Conversation

stefanprodan
Copy link
Member

@stefanprodan stefanprodan commented Jun 10, 2024

Extend the RFC so that the FluxInstance resource can be configured to instruct the operator to generate a Flux source (GitRepository, OCIRepository or Bucket) and a Flux Kustomization to sync the cluster state with the source repository.

Reference implementation: controlplaneio-fluxcd/flux-operator#20

@stefanprodan stefanprodan added the area/rfc Feature request proposals in the RFC format label Jun 10, 2024
@stefanprodan stefanprodan requested a review from souleb June 10, 2024 13:37
rfcs/0001-flux-operator/README.md Outdated Show resolved Hide resolved
- `url`: The URL of the source repository, can be a Git repository HTTP/S or SSH address, an OCI repository address or a Bucket endpoint.
- `ref`: The source reference, can be a Git ref name e.g. `refs/heads/main`, an OCI tag e.g. `latest` or a Bucket name.
- `path`: The path to the source directory containing the kustomize overlay or plain Kubernetes manifests to sync from.
- `pullSecret`: The name of the Kubernetes secret that contains the credentials to pull the source repository. This field is optional.
Copy link
Contributor

Choose a reason for hiding this comment

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

whjat about the provider field? It's true that we cannot do it for git yet, but we can already have it in the rfc.

Copy link
Member Author

Choose a reason for hiding this comment

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

Provider is set from the cluster.type field, no point in duplicating it here.

- `kind`: The source kind, supported values are `GitRepository`, `OCIRepository` and `Bucket`.
- `url`: The URL of the source repository, can be a Git repository HTTP/S or SSH address, an OCI repository address or a Bucket endpoint.
- `ref`: The source reference, can be a Git ref name e.g. `refs/heads/main`, an OCI tag e.g. `latest` or a Bucket name.
- `path`: The path to the source directory containing the kustomize overlay or plain Kubernetes manifests to sync from.
Copy link
Contributor

Choose a reason for hiding this comment

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

I have written a question about it in the implementation PR, but what about LayerSelector? I would rather use that than path for an oci Artifact.

Copy link
Member Author

Choose a reason for hiding this comment

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

LayerSelector could be added via a kustomize patch if anyone needs it, for now there is no practical use to it. The artifacts in this case are create with flux push artifact for the fleet Git repo content, so path is a must for any of this to work.

@stefanprodan stefanprodan force-pushed the rfc-0001-cluster-sync branch from c2901ab to 6649114 Compare June 10, 2024 14:50
Copy link
Contributor

@souleb souleb left a comment

Choose a reason for hiding this comment

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

LGTM!

Signed-off-by: Stefan Prodan <[email protected]>
@stefanprodan stefanprodan merged commit 0ddfcac into main Jun 10, 2024
@stefanprodan stefanprodan deleted the rfc-0001-cluster-sync branch June 10, 2024 15:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/rfc Feature request proposals in the RFC format
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants