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

OTA-1339: UpdateStatus: Initial working draft #2012

Open
wants to merge 23 commits into
base: master
Choose a base branch
from

Commits on Oct 7, 2024

  1. Configuration menu
    Copy the full SHA
    755b51a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    3bb5e5c View commit details
    Browse the repository at this point in the history

Commits on Oct 8, 2024

  1. status: move to a new update.openshift.io group

    Moved `UpdateStatus` from `config.openshift.io` group to a new
    `update.openshift.io`, because config did not feel like a good fit
    (there’s no configuration involved) and none of the other existing
    groups felt appropriate.
    petr-muller committed Oct 8, 2024
    Configuration menu
    Copy the full SHA
    a9c96ca View commit details
    Browse the repository at this point in the history
  2. status: make namespaced

    Initial draft used a non-namespaced API, because in standalone clusters
    it would be a singleton scoped to the cluster, semantically. We expect
    the concept to work with HCP too though. There the resource would need
    to live in the management cluster apiserver and would be scoped to a
    *hosted* cluster, not the management cluster (management cluster would
    need one too, though). Therefore, we would need a namespaced,
    functionally equivalent CRD for HCP, which seems like higher effort and
    complexity than the minor awkwardness of using a namespaced resource in
    standalone clusters.
    petr-muller committed Oct 8, 2024
    Configuration menu
    Copy the full SHA
    71c9709 View commit details
    Browse the repository at this point in the history
  3. status: add resource ref to high-level control plane status

    Adding a resource reference to this level improves the cohesion with
    workerPools part of the API, and can be useful in standalone/hcp
    scenarios where controlplane is represented by different CRDs.
    petr-muller committed Oct 8, 2024
    Configuration menu
    Copy the full SHA
    92eeef6 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    97fa50c View commit details
    Browse the repository at this point in the history
  5. status: generalize metadata on CV update edge versions

    We are expecting use cases for more flexible metadata about the versions
    involved in the update, such as 'architecture' for pseudo-updates when
    clusters are migrated from `x86_64` to `multi`. The original two boolean
    flags were replaced with a generic list of name+type+value triplets.
    petr-muller committed Oct 8, 2024
    Configuration menu
    Copy the full SHA
    0743ec0 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    c6e96d2 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    cbcab55 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    64fff96 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    ef93d30 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    2f067c2 View commit details
    Browse the repository at this point in the history

Commits on Oct 9, 2024

  1. Configuration menu
    Copy the full SHA
    1652674 View commit details
    Browse the repository at this point in the history
  2. status: add minimal tests

    Generated with:
    
    ```
    ./tests/hack/gen-minimal-test.sh update/v1alpha1 v1alpha1
    ```
    petr-muller committed Oct 9, 2024
    Configuration menu
    Copy the full SHA
    3e18612 View commit details
    Browse the repository at this point in the history

Commits on Oct 14, 2024

  1. status: minor fixes for conventions

    - Use `+kubebuilder:validation:Required` consistently (not `+required`)
    - Do not mention (assume) underlying controller name
    - Integers use `int32` types with enforced bounds
    - Constants are `PascalNames` by convention
    - GoDoc start by JSON name by convention
    - Other GoDoc description tweaks
    petr-muller committed Oct 14, 2024
    Configuration menu
    Copy the full SHA
    de4246b View commit details
    Browse the repository at this point in the history
  2. status: use resource names instead of kind

    Make the `ResourceRef` type follow [OpenShift API conventions](https://github.com/openshift/enhancements/blob/master/dev-guide/api-conventions.md#use-resource-name-rather-than-kind-in-object-references).
    
    I also considered to follow the ["Use Specific Types for Object Reference"](https://github.com/openshift/enhancements/blob/master/dev-guide/api-conventions.md#use-specific-types-for-object-references-and-omit-ref-suffix) more strictly and introduce speficic types instead using `ResourceRef` everywhere but consistency felt much worse (control plane would need ClusterVersion/HostedCluster reference, status insights would need just names, pool references would need MCP/NodePool but not in control plane...). Consistency is also a value, and because we use resource references at different places, it felt better to stay consistent everywhere.
    petr-muller committed Oct 14, 2024
    Configuration menu
    Copy the full SHA
    5ecce20 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    3679dc9 View commit details
    Browse the repository at this point in the history
  4. status: use listType=atomic for scope.resources

    CI enforces the presence of listType annotations on slices. List of resources is not a set, because resources are not scalars. It is not simple map because resource does not have a suitable key field. So it must be atomic I guess?
    petr-muller committed Oct 14, 2024
    Configuration menu
    Copy the full SHA
    3f4293b View commit details
    Browse the repository at this point in the history
  5. status: simplify version metadata

    OpenShift API convention forbids bool usage and enforces this with CI. While I could argue for an exception (reasoning behind the convention does not apply in this case, as it would be easy to migrate from bools to strings if necessary), we can also simplify the API and make the metadata a simple key->value map, similar to `labels`. Value is optional and with empty value the presence of the key has a boolean=true semantics. It simplifies the API and possibly even improves the usability for clients.
    petr-muller committed Oct 14, 2024
    Configuration menu
    Copy the full SHA
    0ca9e6d View commit details
    Browse the repository at this point in the history

Commits on Oct 15, 2024

  1. Configuration menu
    Copy the full SHA
    87a1e0b View commit details
    Browse the repository at this point in the history
  2. status: add tests

    petr-muller committed Oct 15, 2024
    Configuration menu
    Copy the full SHA
    a3681e4 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    2226bc8 View commit details
    Browse the repository at this point in the history
  4. make update

    petr-muller committed Oct 15, 2024
    Configuration menu
    Copy the full SHA
    995b161 View commit details
    Browse the repository at this point in the history