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 v1alpha2 API version #139

Merged
merged 7 commits into from
Apr 22, 2021
Merged

Add v1alpha2 API version #139

merged 7 commits into from
Apr 22, 2021

Commits on Apr 13, 2021

  1. Add v1alpha2 API version

    This adds a v1alpha2 API, without changing the controller or tests to
    use it (yet). The new API has roughly the desired shape, per
    fluxcd/flux2#1124, but supporting only
    things that the controller supports now.
    
    It's necessary to give the v1alpha1 type a `storageversion` marker so
    that 1. code generation keeps working, and 2. tests still work, since
    they still expect v1alphav1 types. v1alpha1 will be removed once the
    controller and tests are ported to v1alpha2.
    
    Signed-off-by: Michael Bridgen <[email protected]>
    squaremo committed Apr 13, 2021
    Configuration menu
    Copy the full SHA
    f28a0c4 View commit details
    Browse the repository at this point in the history
  2. Flip the controller and tests to API v1alpha2

    This finishes the v1alpha2 API, and rewrites everything needed so that
    the controller supports it and the tests pass. For the most part, that
    is just changing the location of fields. However, there's a few
    notable extras:
    
     - check that the `sourceRef` is a git repo (that's the default), and
       that a `.spec.git` is supplied;
    
     - change a test that blindly patched an update object, so that it
       first gets the object it's patching. Previously, it succeeded
       because it was OK to patch everything to empty strings, but that's
       no longer the case since SourceReference.Kind is an enum.
    
    Signed-off-by: Michael Bridgen <[email protected]>
    squaremo committed Apr 13, 2021
    Configuration menu
    Copy the full SHA
    cd8a2e9 View commit details
    Browse the repository at this point in the history
  3. Split author email and name into separate fields

    This is a bit neater to read and write, and since I'm making breaking
    changes anyway.
    
    The name is now optional; an email is enough.
    
    Signed-off-by: Michael Bridgen <[email protected]>
    squaremo committed Apr 13, 2021
    Configuration menu
    Copy the full SHA
    b28c5cc View commit details
    Browse the repository at this point in the history
  4. Use sourcev1.GitRepositoryRef

    This changes the API so that the checkout field has a ref, the same as
    GItRepository. This means you can check out a branch or a tag or a
    particular commit. Most of these won't work unless you supply a branch
    to push to as well.
    
    An addtional change is that you can leave out the checkout altogether,
    and the ref will default to that given in the GitRepository, or its
    default. In the latter case, again you will need to provide a push
    branch.
    
    Signed-off-by: Michael Bridgen <[email protected]>
    squaremo committed Apr 13, 2021
    Configuration menu
    Copy the full SHA
    ebb2d6a View commit details
    Browse the repository at this point in the history
  5. Generate docs for v1alpha2

    This switches the API doc generation from v1alpha1, to v1alpha2.
    
    Signed-off-by: Michael Bridgen <[email protected]>
    squaremo committed Apr 13, 2021
    Configuration menu
    Copy the full SHA
    1c33a2d View commit details
    Browse the repository at this point in the history
  6. Write a specification explainer for v1alpha2

    This mostly adapts the material in the v1alpha1 spec explainer doc to
    the different structure of the v1alpha2 types.
    
    Signed-off-by: Michael Bridgen <[email protected]>
    squaremo committed Apr 13, 2021
    Configuration menu
    Copy the full SHA
    b0fc415 View commit details
    Browse the repository at this point in the history
  7. Add guide to migrating to v1alpha2

    This commit adds a step-by-step guide to rewriting specs for v1alpha2.
    
    Signed-off-by: Michael Bridgen <[email protected]>
    squaremo committed Apr 13, 2021
    Configuration menu
    Copy the full SHA
    f746a11 View commit details
    Browse the repository at this point in the history