https://github.com/polyseam/ez-af-baking
for baking Airflow images with custom dependencies
https://github.com/polyseam/ez-af-baking
Last synced: 6 months ago
JSON representation
for baking Airflow images with custom dependencies
- Host: GitHub
- URL: https://github.com/polyseam/ez-af-baking
- Owner: polyseam
- License: apache-2.0
- Created: 2023-12-04T23:54:12.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-06T11:01:47.000Z (about 2 years ago)
- Last Synced: 2024-05-06T12:25:37.848Z (about 2 years ago)
- Language: Dockerfile
- Homepage:
- Size: 1.05 MB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README

EZ AF Baking
for baking Airflow images with custom dependencies
## Usage
### Setup Repo
Click the
[Use this template](https://github.com/new?template_name=ez-af-baking&template_owner=polyseam)
button!
### Set Requirements
1. Pull down the repo
2. Add your dependencies to `requirements.txt`
### Push Code to GitHub
1. `git add .`
2. `git commit -m "added dependencies"`
3. `git push`
### Publish Image to the Container Registry
Automation will publish your image when you push a tag to the repo.
1. run `git tag v1.0.0` to designate an image version
2. run `git push --tags` to publish that version
3. the published images should be shown in the GitHub packages tab over there ↗️
### using the image in Airflow Kubernetes (optional)
Now that you have an image in the [GitHub Container Registry](https://ghcr.io),
you need to be able to consume it from Airflow.
- If you are using Polyseam's [CNDI](https://github.com/polyseam/cndi), here is
[an example here showing how to securely apply that secret for your Airflow Container Image](./docs/examples/cndi).
- There is also an
[example provided here](./docs/examples/plain/registry-secret.yaml) if you are
using Airflow on Kubernetes without CNDI.
In either case once you've applied the Secret you just need to tell Airflow to
use it in your Helm Chart's values:
```yaml
values:
registry:
secretName: airflow-image-pull-secret
images:
airflow:
repository: 'ghcr.io/johnstonmatt/my-baked-image'
tag: v1.0.0
```