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

Flux Operator 0.16 #650

Closed
wants to merge 1 commit into from
Closed

Conversation

kingdonb
Copy link
Contributor

@kingdonb kingdonb commented Feb 26, 2025

Another update - this time Flux Operator adds support for the sync.provider field in the FluxInstance.spec, so users can take advantage of the new GitHub App support to build syncs in a way that have more finely scoped permissions, and to rotate the deploy key automatically.

And other changes which you can read about here:

Summary by CodeRabbit

  • New Features

    • Added configurable options for specifying the provider, enabling enhanced OIDC authentication and sync customization.
    • Enabled a dynamic image pull policy, allowing selection among "IfNotPresent," "Always," or "Never" to better manage container images.
  • Documentation

    • Updated release badges and guidance to reflect the new version and configuration options.
  • Chores

    • Upgraded chart and application versions from v0.15.0 to v0.16.0.

Signed-off-by: Kingdon B <[email protected]>
@kingdonb kingdonb requested a review from kvaps as a code owner February 26, 2025 13:44
@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Feb 26, 2025
Copy link
Contributor

coderabbitai bot commented Feb 26, 2025

Walkthrough

The pull request updates two Helm charts for Flux Operator and Flux Instance. Version numbers in Chart.yaml files are incremented from 0.15.0 to 0.16.0. In addition, configuration improvements are introduced: the Flux Operator now supports a dynamic imagePullPolicy (with corresponding schema and defaults) and the CRD for Flux Operator gets a new provider field. Similarly, the Flux Instance chart adds a new provider field to the synchronization configuration along with the necessary template and schema updates.

Changes

File(s) Change Summary
packages/.../flux-operator/Chart.yaml
packages/.../flux-operator/README.md
Updated appVersion and version from 0.15.0 to 0.16.0; updated version badge and added imagePullPolicy key in the image configuration.
packages/.../flux-operator/templates/crds.yaml
packages/.../flux-operator/templates/deployment.yaml
Added new provider property in the CRD schema and modified the deployment to reference {{ .Values.image.imagePullPolicy }} dynamically.
packages/.../flux-operator/values.schema.json
packages/.../flux-operator/values.yaml
Introduced imagePullPolicy configuration with allowed enum values and default set to IfNotPresent.
packages/.../flux-instance/Chart.yaml
packages/.../flux-instance/README.md
Updated appVersion and version from 0.15.0 to 0.16.0; updated version badges and added a provider field in the instance.sync configuration.
packages/.../flux-instance/templates/instance.yaml Added a conditional block to include provider in the sync spec if defined in values.
packages/.../flux-instance/values.schema.json
packages/.../flux-instance/values.yaml
Added a new provider property in the sync configuration and updated the JSON schema accordingly.

Sequence Diagram(s)

sequenceDiagram
    participant HelmChart as Helm Chart
    participant Values as Values File
    participant Deployment as Deployment Template
    participant Cluster as Kubernetes Cluster

    HelmChart->>Values: Reads imagePullPolicy value (default "IfNotPresent")
    Values->>Deployment: Passes imagePullPolicy setting
    Deployment->>Cluster: Applies dynamic imagePullPolicy configuration
Loading
sequenceDiagram
    participant HelmChart as Helm Chart
    participant Values as Values File
    participant Template as Instance Template
    participant FluxInstance as Flux Instance

    HelmChart->>Values: Reads sync.provider value
    Values->>Template: Passes provider value if defined
    Template->>FluxInstance: Sets provider field in sync configuration
Loading

Possibly related PRs

Suggested labels

enhancement, size:L, documentation, lgtm

Suggested reviewers

  • kvaps

Poem

I’m a bouncy rabbit, here to say,
New versions hop in a bright new way.
With dynamic pulls and fields so neat,
Our charts now dance with a rhythmic beat.
Hoppin’ to changes, joyful and light!

🐇✨


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@dosubot dosubot bot added documentation Improvements or additions to documentation enhancement New feature or request labels Feb 26, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (2)
packages/system/fluxcd/charts/flux-instance/README.md (1)

50-52: Convert Bare URLs in Source Code Section

Consider replacing bare URL presentations with proper Markdown link format for improved readability and to adhere to markdown best practices (e.g., [Flux Operator](https://github.com/controlplaneio-fluxcd/flux-operator)).

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

52-52: Unordered list style
Expected: dash; Actual: asterisk

(MD004, ul-style)

packages/system/fluxcd-operator/charts/flux-operator/README.md (1)

62-64: Convert Bare URLs to Markdown Links

It is recommended to format bare URLs as Markdown links (e.g., [Flux Operator](https://github.com/controlplaneio-fluxcd/flux-operator)) in the “Source Code” section for enhanced readability and to comply with markdown linters.

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

62-62: Unordered list style
Expected: dash; Actual: asterisk

(MD004, ul-style)


63-63: Unordered list style
Expected: dash; Actual: asterisk

(MD004, ul-style)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 86bb640 and 96047ae.

📒 Files selected for processing (11)
  • packages/system/fluxcd-operator/charts/flux-operator/Chart.yaml (2 hunks)
  • packages/system/fluxcd-operator/charts/flux-operator/README.md (2 hunks)
  • packages/system/fluxcd-operator/charts/flux-operator/templates/crds.yaml (1 hunks)
  • packages/system/fluxcd-operator/charts/flux-operator/templates/deployment.yaml (1 hunks)
  • packages/system/fluxcd-operator/charts/flux-operator/values.schema.json (1 hunks)
  • packages/system/fluxcd-operator/charts/flux-operator/values.yaml (1 hunks)
  • packages/system/fluxcd/charts/flux-instance/Chart.yaml (2 hunks)
  • packages/system/fluxcd/charts/flux-instance/README.md (2 hunks)
  • packages/system/fluxcd/charts/flux-instance/templates/instance.yaml (1 hunks)
  • packages/system/fluxcd/charts/flux-instance/values.schema.json (1 hunks)
  • packages/system/fluxcd/charts/flux-instance/values.yaml (1 hunks)
✅ Files skipped from review due to trivial changes (2)
  • packages/system/fluxcd/charts/flux-instance/Chart.yaml
  • packages/system/fluxcd-operator/charts/flux-operator/Chart.yaml
🧰 Additional context used
🪛 markdownlint-cli2 (0.17.2)
packages/system/fluxcd/charts/flux-instance/README.md

47-47: Bare URL used
null

(MD034, no-bare-urls)

🔇 Additional comments (11)
packages/system/fluxcd/charts/flux-instance/values.yaml (1)

48-48: New Provider Field in Sync Configuration

The addition of the provider: "" field under the sync section provides a clean way for users to specify a sync provider. This change aligns well with the broader update and schema modifications. Ensure that accompanying documentation or examples reflect this new option if necessary.

packages/system/fluxcd-operator/charts/flux-operator/values.schema.json (1)

97-104: Addition of imagePullPolicy to Image Schema

The new imagePullPolicy property is well-defined with enumerated values (IfNotPresent, Always, Never). This enhancement allows for flexible control over image pulling behavior. Verify that the deployment template correctly references this dynamic value.

packages/system/fluxcd/charts/flux-instance/templates/instance.yaml (1)

50-52: Conditional Rendering of Provider in Sync Configuration

The conditional block using {{- if .Values.instance.sync.provider }} is implemented correctly. It ensures that the provider field is only rendered when a value is provided, maintaining a clean output configuration.

packages/system/fluxcd-operator/charts/flux-operator/values.yaml (1)

26-26: Configure Image Pull Policy in Values

Introducing imagePullPolicy: IfNotPresent under the image section provides a sensible default that complements the schema changes. This update allows end users to override the pull policy as needed.

packages/system/fluxcd/charts/flux-instance/values.schema.json (1)

151-153: Extension of Sync Schema with Provider Field

Adding the provider property to the sync object in the schema correctly extends the configuration to support the new provider option. This change ensures that any configuration adhering to the schema can now include a provider for source authentication.

packages/system/fluxcd-operator/charts/flux-operator/templates/deployment.yaml (1)

83-83: Dynamic Image Pull Policy Configured

The use of {{ .Values.image.imagePullPolicy }} makes the image pull policy configurable via the values file. This change enhances deployment flexibility and ensures that users can override the default (typically "IfNotPresent") as needed.

packages/system/fluxcd-operator/charts/flux-operator/templates/crds.yaml (1)

304-316: New 'provider' Field for OIDC Authentication

The addition of the provider field in the sync configuration offers enhanced control over OIDC authentication for different source kinds. The enumerated values (generic, aws, azure, gcp, github) appropriately cover the expected providers. Please verify that downstream processes or controllers correctly interpret this field based on the source kind.

packages/system/fluxcd/charts/flux-instance/README.md (2)

3-3: Version Badge Update

The version badge has been updated to 0.16.0, ensuring that the documentation correctly reflects the new release version of the chart.


47-47: Updated Sync Configuration with 'provider' Field

The instance.sync configuration now includes the new provider field. This update allows users to specify the OIDC provider for source authentication. Please make sure this change is also documented in the related schema and configuration instructions.

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

47-47: Bare URL used
null

(MD034, no-bare-urls)

packages/system/fluxcd-operator/charts/flux-operator/README.md (2)

3-3: Version Badge Update

The version badge now reflects the updated version (0.16.0), ensuring that users immediately see the current release information.


42-42: Updated Image Configuration

The image configuration has been enhanced by adding an imagePullPolicy key with a default value of "IfNotPresent". This gives users more explicit control over the image pull behavior, improving consistency with Kubernetes best practices.

@kingdonb kingdonb closed this Feb 26, 2025
@kingdonb kingdonb deleted the flux-operator-0.16 branch February 26, 2025 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request size:M This PR changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant