Skip to content
This repository has been archived by the owner on Feb 27, 2023. It is now read-only.

Fixes Job Equality Comparison #47

Merged
merged 1 commit into from
Oct 16, 2020
Merged

Conversation

danehans
Copy link
Contributor

Previously, JobConfigChanged() would always update the existing cert-gen Job due to API defaults not being set by DesiredJob().

  • api/v1alpha1/contour_types.go: OwningContourLabel constant is moved from controller/contour/controller.go so it can be used by packages throughout the operator.
  • controller/contour/job.go: Adds fields that are defaulted by the api server.
  • util/equality/equality.go: Updates the equality comparison of JobConfigChanged() to only compare managed Job fields. Reorders the returned values of JobConfigChanged()to be idiomatic.
  • util/equality/equality_test.go: Updates tests based on util/equality/equality.go changes.

/assign @jpeach @stevesloka
/cc @Miciah

Signed-off-by: Daneyon Hansen [email protected]

Signed-off-by: Daneyon Hansen <[email protected]>
@jpeach jpeach merged commit ab81bdb into projectcontour:main Oct 16, 2020
@jpeach jpeach mentioned this pull request Oct 16, 2020
@danehans danehans deleted the job_equal_fix branch December 2, 2020 03:00
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants