export function getImagePullSecrets()

in src/utilities/manifestPullSecretUtils.ts [3:19]


export function getImagePullSecrets(inputObject: any) {
   if (!inputObject?.spec) return null

   if (
      inputObject.kind.toLowerCase() ===
      KubernetesWorkload.CRON_JOB.toLowerCase()
   )
      return inputObject?.spec?.jobTemplate?.spec?.template?.spec
         ?.imagePullSecrets

   if (inputObject.kind.toLowerCase() === KubernetesWorkload.POD.toLowerCase())
      return inputObject.spec.imagePullSecrets

   if (inputObject?.spec?.template?.spec) {
      return inputObject.spec.template.spec.imagePullSecrets
   }
}