Uploaded image for project: 'Apache YuniKorn'
  1. Apache YuniKorn
  2. YUNIKORN-928

refactor admission controller code

    XMLWordPrintableJSON

Details

    Description

      During the logging review in YUNIKORN-927 I noticed a possible nil pointer and a number of sub optimal code paths:

      • in the serve function we check for a nil AdmissionReview.Request this is after all the calls are made that access the same object without nil checks. We either do not need this or have possible nil pointers
      • we should unwrap the AdmissionReview and use the AdmissionRequest in our internal calls
      • we create AdmissionResponse objects all over the code (9 places) we need to refactor that into a single function that takes the fields: uid, resultMessage and patch and returns the correct object

      Attachments

        Issue Links

          Activity

            People

              wfps1210 Chung En Lee
              wilfreds Wilfred Spiegelenburg
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: