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

Pod creation fails in certain cases when generateUniqueAppId is enabled

    XMLWordPrintableJSON

Details

    Description

      As part of YUNIKORN-1273 new functionality was added to generate unique application ids.

      A unique appId is generated based on the podUid and the namespace name. We used podUID instead of other options like timestamp and random hash, as regenerating the appId with the podUID during the recovery would generate the same appId.

      But in certain cases, when the request reaches the admission controller, the podUID is not available and the request would fail due to an invalid label value.

       

      Example pod that fails with this error:

      apiVersion: v1
      kind: Pod
      metadata:
        name: sleepy
      spec:
        containers:
        - name: sleepy
          image: sleepy:0.1.0
      kubectl apply -f sleepypod.yaml
      

      Error:

      The Pod "sleepy" is invalid: metadata.labels: Invalid value: "default-": a valid label must be an empty string or consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyValue',  or 'my_value',  or '12345', regex used for validation is '(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?')
      

       

      Attachments

        Issue Links

          Activity

            People

              mitdesai Mit Desai
              mitdesai Mit Desai
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: