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

Merge updates from ocm-plus repo #16

Merged

Commits on Jun 23, 2021

  1. lease api updates (open-cluster-management-io#134)

    * lease api updates
    
    Signed-off-by: ckandag <ckandaga@redhat.com>
    
    * fix for kind test
    
    Signed-off-by: ckandag <ckandaga@redhat.com>
    
    * fix quote
    
    Signed-off-by: ckandag <ckandaga@redhat.com>
    
    * debug
    
    Signed-off-by: ckandag <ckandaga@redhat.com>
    
    * fix hubconfig logic
    
    Signed-off-by: ckandag <ckandaga@redhat.com>
    
    * fix fmt
    
    Signed-off-by: ckandag <ckandaga@redhat.com>
    ckandag committed Jun 23, 2021
    Configuration menu
    Copy the full SHA
    202f06e View commit details
    Browse the repository at this point in the history
  2. change the way compliance is handled across multiple namespaces (open…

    …-cluster-management-io#133)
    
    * change the way compliance is handled across multiple namespaces
    
    Signed-off-by: Gus Parvin <gparvin@redhat.com>
    
    * organize changes more from review comments
    
    Signed-off-by: Gus Parvin <gparvin@redhat.com>
    
    * re-organize checks based on review comments
    
    Signed-off-by: Gus Parvin <gparvin@redhat.com>
    gparvin committed Jun 23, 2021
    Configuration menu
    Copy the full SHA
    4ac3ab2 View commit details
    Browse the repository at this point in the history

Commits on Jun 28, 2021

  1. show name in status of partially noncompliant policy (open-cluster-ma…

    …nagement-io#135)
    
    Signed-off-by: Will Kutler <wkutler@redhat.com>
    willkutler committed Jun 28, 2021
    Configuration menu
    Copy the full SHA
    e5036fe View commit details
    Browse the repository at this point in the history

Commits on Jun 30, 2021

  1. build refresh for pkg vulnerability (open-cluster-management-io#137)

    Signed-off-by: ckandag <ckandaga@redhat.com>
    ckandag committed Jun 30, 2021
    Configuration menu
    Copy the full SHA
    93c1b23 View commit details
    Browse the repository at this point in the history

Commits on Jul 9, 2021

  1. fix sort compare bug and extra list items bug (open-cluster-managemen…

    …t-io#140)
    
    * workaround to not add extras
    
    Signed-off-by: Will Kutler <wkutler@redhat.com>
    
    * fix sort failure
    
    Signed-off-by: Will Kutler <wkutler@redhat.com>
    
    * add fix and test
    
    Signed-off-by: Will Kutler <wkutler@redhat.com>
    
    * fmt
    
    Signed-off-by: Will Kutler <wkutler@redhat.com>
    
    * clean up
    
    Signed-off-by: Will Kutler <wkutler@redhat.com>
    
    * cleanup 2
    
    Signed-off-by: Will Kutler <wkutler@redhat.com>
    
    * remove extra compliancetypes
    
    Signed-off-by: Will Kutler <willkutler@gmail.com>
    willkutler committed Jul 9, 2021
    Configuration menu
    Copy the full SHA
    0ba80ed View commit details
    Browse the repository at this point in the history

Commits on Jul 15, 2021

  1. fix ctrl addon name (open-cluster-management-io#141)

    Signed-off-by: ckandag <ckandaga@redhat.com>
    ckandag committed Jul 15, 2021
    Configuration menu
    Copy the full SHA
    5b9873c View commit details
    Browse the repository at this point in the history

Commits on Jul 21, 2021

  1. add additional release support (open-cluster-management-io#142)

    Signed-off-by: Gus Parvin <gparvin@redhat.com>
    gparvin committed Jul 21, 2021
    Configuration menu
    Copy the full SHA
    545fefc View commit details
    Browse the repository at this point in the history

Commits on Jul 23, 2021

  1. sort template in merge fn (open-cluster-management-io#143)

    * sort template in merge fn
    
    Signed-off-by: Will Kutler <wkutler@redhat.com>
    
    * fmt
    
    Signed-off-by: Will Kutler <wkutler@redhat.com>
    
    * test logs
    
    Signed-off-by: Will Kutler <wkutler@redhat.com>
    
    * logs 2
    
    Signed-off-by: Will Kutler <wkutler@redhat.com>
    
    * clean up logs and fix test
    
    Signed-off-by: Will Kutler <wkutler@redhat.com>
    
    * fix list compare
    
    Signed-off-by: Will Kutler <wkutler@redhat.com>
    
    * fmt
    
    Signed-off-by: Will Kutler <wkutler@redhat.com>
    
    * fix mustonlyhave
    
    Signed-off-by: Will Kutler <wkutler@redhat.com>
    
    * remove logs
    
    Signed-off-by: Will Kutler <wkutler@redhat.com>
    
    * add test to verify fix
    
    Signed-off-by: Will Kutler <wkutler@redhat.com>
    
    * rename function
    
    Signed-off-by: Will Kutler <wkutler@redhat.com>
    willkutler committed Jul 23, 2021
    Configuration menu
    Copy the full SHA
    6f1fabf View commit details
    Browse the repository at this point in the history

Commits on Jul 27, 2021

  1. Refactor mergeArray (open-cluster-management-io#145)

    * Refactor mergeArrays
    
    Adjusted conditionals with equivalent logic, renamed a variable.
    
    Signed-off-by: Justin Kulikauskas <jkulikau@redhat.com>
    
    * Remove dead code
    
    Signed-off-by: Justin Kulikauskas <jkulikau@redhat.com>
    JustinKuli committed Jul 27, 2021
    Configuration menu
    Copy the full SHA
    b9b8546 View commit details
    Browse the repository at this point in the history

Commits on Jul 28, 2021

  1. clean up code (open-cluster-management-io#147)

    * add comments 1/2
    
    Signed-off-by: Will Kutler <wkutler@redhat.com>
    
    * add comments 2/2
    
    Signed-off-by: Will Kutler <wkutler@redhat.com>
    
    * fmt
    
    Signed-off-by: Will Kutler <wkutler@redhat.com>
    
    * comment
    
    Signed-off-by: Will Kutler <wkutler@redhat.com>
    
    * add new block to merge
    
    Signed-off-by: Will Kutler <wkutler@redhat.com>
    
    * remove unnecessary sort
    
    Signed-off-by: Will Kutler <wkutler@redhat.com>
    
    * remove unnecessary sort 2
    
    Signed-off-by: Will Kutler <wkutler@redhat.com>
    willkutler committed Jul 28, 2021
    Configuration menu
    Copy the full SHA
    c25b7c4 View commit details
    Browse the repository at this point in the history
  2. Use the go-template-utils library (open-cluster-management-io#148)

    The "templates" package was split out to its own Go module in:
    stolostron/go-template-utils#2
    
    Signed-off-by: mprahl <mprahl@users.noreply.github.com>
    mprahl committed Jul 28, 2021
    Configuration menu
    Copy the full SHA
    8f8c58f View commit details
    Browse the repository at this point in the history

Commits on Aug 2, 2021

  1. fix merge inconsistencies for 1 item lists (open-cluster-management-i…

    …o#149)
    
    * try removing merge block
    
    Signed-off-by: Will Kutler <wkutler@redhat.com>
    
    * add e2e test
    
    Signed-off-by: Will Kutler <wkutler@redhat.com>
    
    * fix list handling when len(existing) < len(template)
    
    Signed-off-by: Will Kutler <wkutler@redhat.com>
    
    * remove redundant mustonlyhave branch
    
    Signed-off-by: Will Kutler <wkutler@redhat.com>
    willkutler committed Aug 2, 2021
    Configuration menu
    Copy the full SHA
    8f5d4c1 View commit details
    Browse the repository at this point in the history
  2. edit comment in merge specs to reflect new behavior of func (open-clu…

    …ster-management-io#150)
    
    Signed-off-by: Will Kutler <wkutler@redhat.com>
    willkutler committed Aug 2, 2021
    Configuration menu
    Copy the full SHA
    4a343ea View commit details
    Browse the repository at this point in the history

Commits on Aug 4, 2021

  1. Whitespace in lists (open-cluster-management-io#151)

    * Add test for whitespace in list
    
    Currently, if an item in a list has whitespace at the beginning or end,
    it won't get matched by the same item because only one of them is
    trimmed. As a result, and enforce policy with an item like that will
    keep appending duplicates of the item on the list indefinitely. This
    test demonstrates the issue with a Deployment.
    
    Signed-off-by: Justin Kulikauskas <jkulikau@redhat.com>
    
    * Stop trimming some items in lists
    
    This should resolve the issue described in the previous commit.
    
    Signed-off-by: Justin Kulikauskas <jkulikau@redhat.com>
    JustinKuli committed Aug 4, 2021
    Configuration menu
    Copy the full SHA
    8344c8d View commit details
    Browse the repository at this point in the history
  2. Update OWNERS (open-cluster-management-io#146)

    Signed-off-by: Dale Haiducek <dhaiduce@redhat.com>
    dhaiducek committed Aug 4, 2021
    Configuration menu
    Copy the full SHA
    888daf3 View commit details
    Browse the repository at this point in the history

Commits on Aug 18, 2021

  1. update date in readme for rebuild (open-cluster-management-io#153)

    Signed-off-by: Will Kutler <wkutler@redhat.com>
    willkutler committed Aug 18, 2021
    Configuration menu
    Copy the full SHA
    31e8fd3 View commit details
    Browse the repository at this point in the history

Commits on Aug 19, 2021

  1. Use the latest templates API (open-cluster-management-io#152)

    This updates the dependency on the go-template-utils module.
    
    Resolves stolostron/backlog#14952
    
    Signed-off-by: mprahl <mprahl@users.noreply.github.com>
    mprahl committed Aug 19, 2021
    Configuration menu
    Copy the full SHA
    3ef4570 View commit details
    Browse the repository at this point in the history

Commits on Aug 24, 2021

  1. update kubebuilder curl command (open-cluster-management-io#154)

    Signed-off-by: Will Kutler <wkutler@redhat.com>
    willkutler committed Aug 24, 2021
    Configuration menu
    Copy the full SHA
    3bf5ad1 View commit details
    Browse the repository at this point in the history

Commits on Aug 25, 2021

  1. Update go-template-utils to the latest version (open-cluster-manageme…

    …nt-io#156)
    
    See the release notes for more information:
    https://github.com/open-cluster-management/go-template-utils/releases/tag/v1.1.0
    
    Signed-off-by: mprahl <mprahl@users.noreply.github.com>
    mprahl committed Aug 25, 2021
    Configuration menu
    Copy the full SHA
    bfd0180 View commit details
    Browse the repository at this point in the history

Commits on Sep 16, 2021

  1. handle namespace selection properly when the resource is unnamed (ope…

    …n-cluster-management-io#159)
    
    Signed-off-by: Gus Parvin <gparvin@redhat.com>
    gparvin committed Sep 16, 2021
    Configuration menu
    Copy the full SHA
    c3b43bd View commit details
    Browse the repository at this point in the history
  2. Fix an issue that caused integer comparison to fail (open-cluster-man…

    …agement-io#160)
    
    This fixes the situation where the controller is comparing what is in
    the policy versus what already exists, and the object being compared
    contains an integer.
    
    The code in the mergeSpecs function marshals and unmarshals the existing
    object and the object in the policy. Presumably this is to create a copy
    of the objects before modification. By doing so with the encoding/json
    package, it converts any integers to float64.
    
    This caused an issue in the checkFieldsWithSort function which compared
    the existing object with the merged object, since the existing object
    referenced here did not go through the marshal and unmarshal process,
    but the merged object did. This meant that the integers in the merged
    object were of type float64, but they remained integers in the existing
    object. When checkFieldsWithSort converts both integers to strings to
    compare, if the one of type float64 is a large enough number, it gets
    printed in scientific notation where as the one that remained of type
    integer does not. This would cause a mismatch even though it should have
    matched.
    
    The solution is quite simple. Just start using the json package from
    Kubernetes so that the same unmarshaling process occurs in all cases.
    
    Signed-off-by: mprahl <mprahl@users.noreply.github.com>
    mprahl committed Sep 16, 2021
    Configuration menu
    Copy the full SHA
    0d05b39 View commit details
    Browse the repository at this point in the history

Commits on Sep 17, 2021

  1. handle errors in hub templates (open-cluster-management-io#162)

    Signed-off-by: ckandag <ckandaga@redhat.com>
    ckandag committed Sep 17, 2021
    Configuration menu
    Copy the full SHA
    817cfd3 View commit details
    Browse the repository at this point in the history

Commits on Sep 22, 2021

  1. Update go-template-utils to v1.2.1 (open-cluster-management-io#163)

    This makes the code consistent with the policy propagator in:
    stolostron/governance-policy-propagator#101
    
    Signed-off-by: mprahl <mprahl@users.noreply.github.com>
    mprahl committed Sep 22, 2021
    Configuration menu
    Copy the full SHA
    f35ad45 View commit details
    Browse the repository at this point in the history
  2. Update go-template-utils to v1.2.2 (open-cluster-management-io#164)

    This is to include the fix from:
    stolostron/go-template-utils#18
    
    Signed-off-by: mprahl <mprahl@users.noreply.github.com>
    mprahl committed Sep 22, 2021
    Configuration menu
    Copy the full SHA
    9f7dd42 View commit details
    Browse the repository at this point in the history

Commits on Sep 24, 2021

  1. Update go-template-utils to v1.2.3 (open-cluster-management-io#165)

    This fixes a regression as described in:
    stolostron/go-template-utils#19
    
    Signed-off-by: mprahl <mprahl@users.noreply.github.com>
    mprahl committed Sep 24, 2021
    Configuration menu
    Copy the full SHA
    3f14e27 View commit details
    Browse the repository at this point in the history

Commits on Oct 4, 2021

  1. Protect the policy cache from unintended updates (open-cluster-manage…

    …ment-io#166)
    
    Deep copy the policy before passing it to handleObjectTemplates since even
    though handleObjectTemplates accepts a copy (i.e. not a pointer) of the
    policy, policy.Spec.ObjectTemplates is a slice of pointers, so any
    modifications to the objects in that slice will be reflected in
    the PolicyMap cache, which can have unintended side effects.
    
    This manifested itself when a policy has templates which when resolved,
    still have intentional template delimiters (i.e. {{ and }}) in the result.
    On the first time being processed, everything would go well. On the
    second or third time, when the policy cache was not updated again by the
    reconciler, the policy in the cache already had resolved templates. This
    would lead to the templates code trying to reprocess the already
    resolved policy.
    
    Additionally to this, this caused some updates to referenced resource
    objects in templates to not get properly updated in the policy.
    
    Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2007575
    
    Signed-off-by: mprahl <mprahl@users.noreply.github.com>
    mprahl committed Oct 4, 2021
    Configuration menu
    Copy the full SHA
    9f3e9b8 View commit details
    Browse the repository at this point in the history

Commits on Oct 5, 2021

  1. Annotation to disable templates (open-cluster-management-io#169)

    * Annotation to disable templates
    
    Signed-off-by: ckandag <ckandaga@redhat.com>
    
    * fix glog formatting
    
    Signed-off-by: ckandag <ckandaga@redhat.com>
    ckandag committed Oct 5, 2021
    Configuration menu
    Copy the full SHA
    054b4d5 View commit details
    Browse the repository at this point in the history

Commits on Oct 11, 2021

  1. store api resource list in case of failure (open-cluster-management-i…

    …o#170)
    
    * store api resource list in case of failure
    
    Signed-off-by: Will Kutler <wkutler@redhat.com>
    
    * fmt
    
    Signed-off-by: Will Kutler <wkutler@redhat.com>
    
    * ignore error if partial list is returned
    
    Signed-off-by: Will Kutler <wkutler@redhat.com>
    willkutler committed Oct 11, 2021
    Configuration menu
    Copy the full SHA
    1b58ac7 View commit details
    Browse the repository at this point in the history

Commits on Nov 8, 2021

  1. Merge 'midstream' release-2.4 into 'upstream'

    Signed-off-by: Justin Kulikauskas <jkulikau@redhat.com>
    JustinKuli committed Nov 8, 2021
    Configuration menu
    Copy the full SHA
    2ba49db View commit details
    Browse the repository at this point in the history
  2. Correct lease name

    Signed-off-by: Justin Kulikauskas <jkulikau@redhat.com>
    JustinKuli committed Nov 8, 2021
    Configuration menu
    Copy the full SHA
    262fd4f View commit details
    Browse the repository at this point in the history