Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add helm chart with initial functional test #2

Merged
merged 66 commits into from
Jul 9, 2024
Merged

Add helm chart with initial functional test #2

merged 66 commits into from
Jul 9, 2024

Conversation

scrungus
Copy link
Contributor

No description provided.

@github-advanced-security
Copy link

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

@JohnGarbutt JohnGarbutt changed the title Add ci jobs Add helm chart with initial functional test Jul 2, 2024
coral_credits/settings.py Outdated Show resolved Hide resolved
@mkjpryor
Copy link
Member

mkjpryor commented Jul 3, 2024

The problem with Django more generally is that the documentation assumes you have one settings file, but there are actually two classes of settings:

  1. Those that define the app and should be in the Docker image, e.g. INSTALLED_APPS
  2. Those that are genuinely runtime configurations, that should be injected using the chart

In Azimuth, we use https://github.com/stackhpc/django-flexi-settings to allow us to break up the settings file in this way. If we are going to stick with Django, I think it is worth doing something similar here.

@scrungus scrungus requested a review from JohnGarbutt July 4, 2024 13:04
Copy link
Member

@mkjpryor mkjpryor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few minor comments.

charts/templates/clusterrole.yaml Outdated Show resolved Hide resolved
charts/templates/clusterrolebinding.yaml Outdated Show resolved Hide resolved
charts/templates/deployment.yaml Outdated Show resolved Hide resolved
charts/templates/serviceaccount.yaml Outdated Show resolved Hide resolved
# Not doing so means that AWX-related keys are not removed on transition to the CRD
data:
01-django.yaml: |
{{- tpl (.Files.Get "files/settings/01-django.yaml") . | b64enc | nindent 4 }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personally, for the number of settings you have I would just inline them here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

might just leave it as it is as we will probably add configuration in the future

Comment on lines +13 to +18
DATABASES = {
"default": {
"ENGINE": "django.db.backends.sqlite3",
"NAME": "/data/db.sqlite3",
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this should be in the settings in the chart values, so it is easier to change to point at a proper DB in future?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

made database configurable via values now

@scrungus
Copy link
Contributor Author

scrungus commented Jul 9, 2024

@mkjpryor huh, for some reason when I first tried this I was getting some permissions errors about service accounts, which I can't remember exactly by memory. But removed it now and it still works 🤷

@scrungus scrungus dismissed stale reviews from JohnGarbutt and mkjpryor July 9, 2024 17:02

stale

@scrungus scrungus merged commit 3065029 into main Jul 9, 2024
5 checks passed
@scrungus scrungus deleted the add-ci-jobs branch July 9, 2024 17:10
scrungus added a commit that referenced this pull request Jul 10, 2024
* Dockerfile

* initial CI setup

* initial helm charts

* add functional test

* make database configurable, with default

---------

Co-authored-by: Jake Hutchinson <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants