-
Notifications
You must be signed in to change notification settings - Fork 5
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
Implement the cluster sync feature #20
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
stefanprodan
force-pushed
the
sync-cluster-state
branch
3 times, most recently
from
June 10, 2024 12:58
334407c
to
d36c194
Compare
souleb
reviewed
Jun 10, 2024
stefanprodan
force-pushed
the
sync-cluster-state
branch
2 times, most recently
from
June 10, 2024 15:11
2157969
to
292dc33
Compare
stefanprodan
changed the title
Implement cluster sync feature
Implement the cluster sync feature
Jun 10, 2024
Signed-off-by: Stefan Prodan <[email protected]>
Signed-off-by: Stefan Prodan <[email protected]>
Signed-off-by: Stefan Prodan <[email protected]>
Signed-off-by: Stefan Prodan <[email protected]>
Signed-off-by: Stefan Prodan <[email protected]>
stefanprodan
force-pushed
the
sync-cluster-state
branch
from
June 11, 2024 09:56
292dc33
to
699aab2
Compare
souleb
approved these changes
Jun 11, 2024
There was a problem hiding this 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]>
Signed-off-by: Stefan Prodan <[email protected]>
stefanprodan
force-pushed
the
sync-cluster-state
branch
from
June 12, 2024 11:26
b46ba56
to
2a50afc
Compare
Signed-off-by: Stefan Prodan <[email protected]>
stefanprodan
force-pushed
the
sync-cluster-state
branch
from
June 12, 2024 11:31
2a50afc
to
fc0f72f
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR implements the cluster sync feature as defined in RFC-0001. This feature completes the operator goal to offer a viable alternative to Flux Git bootstrap. In addition, the operator can now deploy Flux in sync with an OCI-compliant Container Registry.
Sync configuration
The
.spec.sync
field is optional and specifies the Flux sync configuration.When set, a Flux source and a Flux Kustomization are generated to sync
the cluster state with the source repository.
The Flux objects are created in the same namespace where the FluxInstance is deployed
using the namespace name as the Flux source and Kustomization name. The naming convention
matches the one used by
flux bootstrap
to ensure compatibility with upstream, andto allow transitioning a bootstrapped cluster to a FluxInstance managed one.
Sync fields:
kind
: The source kind, supported values areGitRepository
,OCIRepository
andBucket
.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.interval
: The sync interval. This field is optional, when not set the default is1m
.Sync from Git over HTTP/S
Example:
If the source repository is private, the Kubernetes secret must be created
in the same namespace where the FluxInstance is deployed, and have the following format:
To generate the secret with the Flux CLI:
Sync from Git over SSH
Example:
If the source repository is private, the Kubernetes secret must be created
in the same namespace where the FluxInstance is deployed, and have the following format:
To generate the secret with the Flux CLI:
Sync from OCI over HTTP/S
Example:
If the container registry is private, the Kubernetes secret must be created
in the same namespace where the FluxInstance is deployed, and be of type
kubernetes.io/dockerconfigjson
:To generate the secret with the Flux CLI:
Sync from S3-compatible storage over HTTP/S
Example:
If the Bucket is private, the Kubernetes secret must be created
in the same namespace where the FluxInstance is deployed, and have the following format: