charts icon indicating copy to clipboard operation
charts copied to clipboard

How to use a custom Docker image from a private Docker registry?

Open Felix-neko opened this issue 2 years ago • 3 comments

Hi folks! And thank you for a great project.

In our company we have a private docker registry (artifactory) and need to use it to store our docker images.

So, if I want to use custom airflow docker image (par example, with some extra pip and apt packages installed) I should save this image in our private docker registry.

Can you please tell me, how can I tell airflow's helm chart to pull image from private docker registry? And how to pass credentials in this case?

Felix-neko avatar Jun 23 '22 15:06 Felix-neko

The first thing you need to do is to create a image pull secret on Kubernetes, you can follow the tutorial here.

Once you have the pull secret created in your cluster, you can simply pass it to the chart via airflow.image.pullSecret variable, here's an example:

airflow:
    image:
        repository: registry.company.com/airflow/custom-image
        tag: latest # or any tag you'd like
        pullSecret: my-pull-secret

karakanb avatar Jun 24 '22 17:06 karakanb

Hi @karakanb, I've tried following your suggestion, but the only way to make it work was by using:

images:
 airflow:
    repository: registry.company.com/airflow/custom-image
    tag: latest

Instead of:

airflow:
  image:
    repository: registry.company.com/airflow/custom-image
    tag: latest

Is this expected? Did the helm config change recently?

LucaSoato avatar Jul 12 '22 13:07 LucaSoato

@LucaSoato I think you are using the official Airflow chart, which is a different chart than this repo:

  • values file for the Official chart: https://github.com/apache/airflow/blob/main/chart/values.yaml#L55
  • values file for this repo: https://github.com/airflow-helm/charts/blob/main/charts/airflow/values.yaml#L4-L18

please make sure you are checking the documentation for the correct chart.

karakanb avatar Jul 12 '22 16:07 karakanb

This issue has been automatically marked as stale because it has not had activity in 60 days. It will be closed in 7 days if no further activity occurs.

Thank you for your contributions.


Issues never become stale if any of the following is true:

  1. they are added to a Project
  2. they are added to a Milestone
  3. they have the lifecycle/frozen label

stale[bot] avatar Sep 16 '22 00:09 stale[bot]