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

refactor: use a pointer for field: skipAnalysis in Canary object #2

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Commits on Jun 14, 2024

  1. refactor: use a pointer for field skipAnalysis in CanarySpec

    This refactor tries to fulfil a special use case fluxcd#1660: when a custom
    controller uses the Flagger API to render the Canary object to
    json/yaml, it makes sure the skipAnalysis field is rendered when the
    value is "false", so that the field is always communicated to the k8s
    API server.
    
    Comparison is as follows:
    
    before, when skipAnalysis is "false" the canary object is rendered as such:
    
    ```
    apiVersion: flagger.app/v1beta1
    kind: Canary
    ...
    spec:
      analysis:
    ...
    ```
    
    After, it is as such:
    ```
    apiVersion: flagger.app/v1beta1
    kind: Canary
    ...
    spec:
      skipAnalysis: false # this is the field we expected
      analysis:
    ...
    ```
    bruce-personio committed Jun 14, 2024
    Configuration menu
    Copy the full SHA
    24b40e3 View commit details
    Browse the repository at this point in the history