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

Sync node labels and taints #4

Merged
merged 50 commits into from
Jan 8, 2021
Merged

Sync node labels and taints #4

merged 50 commits into from
Jan 8, 2021

Commits on Jan 3, 2021

  1. Configuration menu
    Copy the full SHA
    eb49d0e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e958aab View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    a9b011c View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    7adff41 View commit details
    Browse the repository at this point in the history

Commits on Jan 4, 2021

  1. Fixup image build

    annismckenzie committed Jan 4, 2021
    Configuration menu
    Copy the full SHA
    5ad0b62 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    7efecc1 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    6355380 View commit details
    Browse the repository at this point in the history
  4. Fix RBAC roles for the K3OSConfig CR

    It can now only handle these in its own namespace. The fix was to add
    `namespace=k3os-config-operator-system` to the RBAC markers for the CR.
    annismckenzie committed Jan 4, 2021
    Configuration menu
    Copy the full SHA
    d225ec2 View commit details
    Browse the repository at this point in the history
  5. Add a Kubernetes clientset to the K3OSConfig reconciler

    This is necessary in order to get secrets and update the nodes.
    annismckenzie committed Jan 4, 2021
    Configuration menu
    Copy the full SHA
    f0fc1b2 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    ad26193 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    444c80b View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    54a85cd View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    9cb6165 View commit details
    Browse the repository at this point in the history

Commits on Jan 6, 2021

  1. Add initial implementation of node label reconciliation

    This is still very much a work in progress.
    annismckenzie committed Jan 6, 2021
    Configuration menu
    Copy the full SHA
    b56dbac View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    7b596b0 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    d71bef1 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    add5507 View commit details
    Browse the repository at this point in the history
  5. Deserialize hostname from k3OS config YAML

    I need this over in the picl-k3os-image-generator repository.
    annismckenzie committed Jan 6, 2021
    Configuration menu
    Copy the full SHA
    4a1e433 View commit details
    Browse the repository at this point in the history

Commits on Jan 8, 2021

  1. Configuration menu
    Copy the full SHA
    caddd48 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    3e367c8 View commit details
    Browse the repository at this point in the history
  3. Move k3OS node config YAML handling to the pkg/nodes package

    This will allow this code to be used outside of this project by
    using the operator as a library.
    annismckenzie committed Jan 8, 2021
    Configuration menu
    Copy the full SHA
    fdce6f1 View commit details
    Browse the repository at this point in the history
  4. Move constants to their own package

    These are not constant in the Go sense of `const` but must be treated
    as constant. They’re structured so no one can update them outside of
    the `pkg` package.
    annismckenzie committed Jan 8, 2021
    Configuration menu
    Copy the full SHA
    c2f22f9 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    bf1ae92 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    a8fb0e7 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    395911d View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    411376e View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    2ec64ed View commit details
    Browse the repository at this point in the history
  10. Add GetNodeName to consts that hides where the node name is retriev…

    …ed from
    
    For now it’s from the environment via the downward API but this might
    change and the reconciler should not care when this changes.
    annismckenzie committed Jan 8, 2021
    Configuration menu
    Copy the full SHA
    c31210b View commit details
    Browse the repository at this point in the history
  11. Wrap reconcile error that’s returned

    This is another approach to handle terminal errors in a reconciler.
    For the case where an object was deleted (like the node, the secret or
    the K3OSConfig CR object) we have to return a nil error to the caller
    so that our reconciler isn’t called anymore. I might flesh this out
    more in the future with some functional options to configure the
    response error further. For now, this will do.
    annismckenzie committed Jan 8, 2021
    Configuration menu
    Copy the full SHA
    7445488 View commit details
    Browse the repository at this point in the history
  12. Simplify and streamline logic to fetch node and node config in the re…

    …conciler
    
    There’s now a couple more smaller methods to make this easier to read,
    understand and test.
    annismckenzie committed Jan 8, 2021
    Configuration menu
    Copy the full SHA
    1fc081d View commit details
    Browse the repository at this point in the history
  13. Add no-op node tainter

    annismckenzie committed Jan 8, 2021
    Configuration menu
    Copy the full SHA
    1fde51c View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    150b513 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    11063bb View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    84fbcd7 View commit details
    Browse the repository at this point in the history
  17. Validate node name is set when starting the operator

    This removes the need for the nasty panic I added earlier.
    annismckenzie committed Jan 8, 2021
    Configuration menu
    Copy the full SHA
    0063b96 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    f3fe16f View commit details
    Browse the repository at this point in the history
  19. Reattach the extracted getters to the reconciler struct

    This cuts down on the amount of parameters these need to lug around.
    annismckenzie committed Jan 8, 2021
    Configuration menu
    Copy the full SHA
    0038db6 View commit details
    Browse the repository at this point in the history
  20. Extract updating the node resource into its own method

    This way we can change the implementation of that and the rest of the
    code doesn’t need to care.
    annismckenzie committed Jan 8, 2021
    Configuration menu
    Copy the full SHA
    eb3b704 View commit details
    Browse the repository at this point in the history
  21. Configure all the watches when building the reconciler

    This creates metadata-only watches on our secret (filtered by the
    unique label it has) as well as the node the current instance is
    running on. It’s pretty light on the network and the memory but boy
    was this a pain to set up. 🤞 that it works correctly.
    annismckenzie committed Jan 8, 2021
    Configuration menu
    Copy the full SHA
    60505e5 View commit details
    Browse the repository at this point in the history
  22. Enable the new LeaderElectionReleaseOnCancel option on the manager

    We’re using the context everywhere so enabling this should be safe.
    annismckenzie committed Jan 8, 2021
    Configuration menu
    Copy the full SHA
    6581f2f View commit details
    Browse the repository at this point in the history
  23. Configuration menu
    Copy the full SHA
    d6f0256 View commit details
    Browse the repository at this point in the history
  24. Configuration menu
    Copy the full SHA
    bf875c2 View commit details
    Browse the repository at this point in the history
  25. Switch leader election resource lock to leases only

    This feature has been on by default since v1.14 and this operator was
    never deployed anywhere.
    annismckenzie committed Jan 8, 2021
    Configuration menu
    Copy the full SHA
    52a8276 View commit details
    Browse the repository at this point in the history
  26. Configuration menu
    Copy the full SHA
    39991dc View commit details
    Browse the repository at this point in the history
  27. Configuration menu
    Copy the full SHA
    70b9870 View commit details
    Browse the repository at this point in the history
  28. Configuration menu
    Copy the full SHA
    c105f8a View commit details
    Browse the repository at this point in the history
  29. Configuration menu
    Copy the full SHA
    fe36bf3 View commit details
    Browse the repository at this point in the history
  30. Finish implementation of node taint reconciler

    This includes about the same number of tests as the node label
    reconciler but the implementation is more complex because of the
    fact that taints have a lot more intricacies than labels.
    annismckenzie committed Jan 8, 2021
    Configuration menu
    Copy the full SHA
    79496c0 View commit details
    Browse the repository at this point in the history
  31. Clean up code that was mentioned in the review

    This mostly deals with updates to comments and removing dead code.
    annismckenzie committed Jan 8, 2021
    Configuration menu
    Copy the full SHA
    b281432 View commit details
    Browse the repository at this point in the history
  32. Add log statements in result error handler

    This handles IsNotFound, IsGone and IsForbidden API server error
    responses.
    annismckenzie committed Jan 8, 2021
    Configuration menu
    Copy the full SHA
    4cf2e0a View commit details
    Browse the repository at this point in the history