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 ConstraintTemplate v1 #121

Merged

Commits on Jun 22, 2021

  1. Setup basic scaffolding for v1 CT

    Signed-off-by: juliankatz <juliankatz@google.com>
    julianKatz committed Jun 22, 2021
    Configuration menu
    Copy the full SHA
    43a229c View commit details
    Browse the repository at this point in the history
  2. Update CRD. v1 package tests now running

    Signed-off-by: juliankatz <juliankatz@google.com>
    julianKatz committed Jun 22, 2021
    Configuration menu
    Copy the full SHA
    86ef21f View commit details
    Browse the repository at this point in the history
  3. Add ConstraintTemplate v1

    We recently upgraded Constraint Framework to produce v1 CRDs when
    creating Constraint kind CRDs.  This was in preparation for the release
    of k8s 1.22, which removes the `v1beta1` CRD version.  See
    open-policy-agent/gatekeeper#550 for more info.
    
    As v1beta1 ConstraintTemplate did _not_ required any user-entered schema
    information to be structural, transformation logic was implemented to
    "structuralize" the user-inputted schema information as needed.
    
    The new v1 ConstraintTemplate version purposefully does _no_
    transformation, as it is meant to put the ConstraintTemplate creation
    experience in line with that of a v1 CRDs.  Any schema information added
    by the user is expected to be structural.  If non-structural schema info
    is added, an error should be returned.
    
    Signed-off-by: juliankatz <juliankatz@google.com>
    julianKatz committed Jun 22, 2021
    Configuration menu
    Copy the full SHA
    1e43b95 View commit details
    Browse the repository at this point in the history
  4. Add legacySchema field with defaults

    Signed-off-by: juliankatz <juliankatz@google.com>
    julianKatz committed Jun 22, 2021
    Configuration menu
    Copy the full SHA
    8ec1d94 View commit details
    Browse the repository at this point in the history
  5. Add custom conversion file for templates/v1

    Signed-off-by: juliankatz <juliankatz@google.com>
    julianKatz committed Jun 22, 2021
    Configuration menu
    Copy the full SHA
    4202aca View commit details
    Browse the repository at this point in the history
  6. Added legacySchema checks in conversion and fixed tests

    Signed-off-by: juliankatz <juliankatz@google.com>
    julianKatz committed Jun 22, 2021
    Configuration menu
    Copy the full SHA
    1561b2c View commit details
    Browse the repository at this point in the history
  7. Added extra test cases for when LegacySchema=false

    Signed-off-by: juliankatz <juliankatz@google.com>
    julianKatz committed Jun 22, 2021
    Configuration menu
    Copy the full SHA
    ae8a149 View commit details
    Browse the repository at this point in the history
  8. Removed unused error field from test structs

    Signed-off-by: juliankatz <juliankatz@google.com>
    julianKatz committed Jun 22, 2021
    Configuration menu
    Copy the full SHA
    0e3672b View commit details
    Browse the repository at this point in the history