-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: add k8s validation workflow (#91)
* fix: correct template tags * build: add k8s validation workflow * chore: add minio test case
- Loading branch information
Cristhian Garcia
authored
May 3, 2024
1 parent
dfbbef4
commit acbfec8
Showing
7 changed files
with
125 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
DRYDOCK_INIT_JOBS: true | ||
K8S_NAMESPACE: testing-openedx | ||
PLUGINS: | ||
- forum | ||
- mfe | ||
- drydock | ||
DRYDOCK_BYPASS_CADDY: false | ||
DRYDOCK_FLOWER: false | ||
DRYDOCK_INGRESS: false | ||
DRYDOCK_DEBUG: false | ||
DRYDOCK_ENABLE_CELERY_TUNING: false | ||
DRYDOCK_ENABLE_MULTITENANCY: false | ||
DRYDOCK_ENABLE_SCORM: false | ||
DRYDOCK_ENABLE_SENTRY: false | ||
DRYDOCK_POD_LIFECYCLE: false | ||
DRYDOCK_AUTO_TLS: false | ||
DRYDOCK_NEWRELIC_LICENSE_KEY: "" | ||
DRYDOCK_INGRESS_LMS_EXTRA_HOSTS: [] | ||
DRYDOCK_INGRESS_EXTRA_HOSTS: [] | ||
DRYDOCK_PDB_MINAVAILABLE_PERCENTAGE_MFE: 0 | ||
DRYDOCK_PDB_MINAVAILABLE_PERCENTAGE_FORUM: 0 | ||
DRYDOCK_PDB_MINAVAILABLE_PERCENTAGE_CADDY: 0 | ||
DRYDOCK_PDB_MINAVAILABLE_PERCENTAGE_LMS: 0 | ||
DRYDOCK_PDB_MINAVAILABLE_PERCENTAGE_LMS_WORKER: 0 | ||
DRYDOCK_PDB_MINAVAILABLE_PERCENTAGE_CMS: 0 | ||
DRYDOCK_PDB_MINAVAILABLE_PERCENTAGE_CMS_WORKER: 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
DRYDOCK_INIT_JOBS: true | ||
K8S_NAMESPACE: testing-openedx | ||
PLUGINS: | ||
- forum | ||
- mfe | ||
- drydock | ||
- s3 | ||
DRYDOCK_BYPASS_CADDY: true | ||
DRYDOCK_FLOWER: true | ||
DRYDOCK_INGRESS: true | ||
DRYDOCK_DEBUG: true | ||
DRYDOCK_ENABLE_CELERY_TUNING: true | ||
DRYDOCK_ENABLE_MULTITENANCY: true | ||
DRYDOCK_ENABLE_SCORM: true | ||
DRYDOCK_ENABLE_SENTRY: true | ||
DRYDOCK_POD_LIFECYCLE: true | ||
DRYDOCK_AUTO_TLS: true | ||
DRYDOCK_NEWRELIC_LICENSE_KEY: "your_newrelic_license_key" | ||
DRYDOCK_INGRESS_LMS_EXTRA_HOSTS: | ||
- "lms1.testing.example.com" | ||
- "lms2.testing.example.com" | ||
DRYDOCK_INGRESS_EXTRA_HOSTS: | ||
- "superset.testing.example.com" | ||
- "forum.testing.example.com" | ||
DRYDOCK_PDB_MINAVAILABLE_PERCENTAGE_MFE: 50 | ||
DRYDOCK_PDB_MINAVAILABLE_PERCENTAGE_FORUM: 50 | ||
DRYDOCK_PDB_MINAVAILABLE_PERCENTAGE_CADDY: 50 | ||
DRYDOCK_PDB_MINAVAILABLE_PERCENTAGE_LMS: 50 | ||
DRYDOCK_PDB_MINAVAILABLE_PERCENTAGE_LMS_WORKER: 50 | ||
DRYDOCK_PDB_MINAVAILABLE_PERCENTAGE_CMS: 50 | ||
DRYDOCK_PDB_MINAVAILABLE_PERCENTAGE_CMS_WORKER: 50 | ||
DRYDOCK_MIGRATE_FROM: 13 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
DRYDOCK_INIT_JOBS: true | ||
K8S_NAMESPACE: testing-openedx | ||
PLUGINS: | ||
- mfe | ||
- drydock | ||
- minio | ||
DRYDOCK_BYPASS_CADDY: true | ||
DRYDOCK_INGRESS: true | ||
DRYDOCK_ENABLE_SCORM: true | ||
DRYDOCK_INGRESS_LMS_EXTRA_HOSTS: | ||
- "lms1.testing.example.com" | ||
- "lms2.testing.example.com" | ||
DRYDOCK_INGRESS_EXTRA_HOSTS: | ||
- "superset.testing.example.com" | ||
- "forum.testing.example.com" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
tutor[full]<18 | ||
setuptools | ||
git+https://github.com/hastexo/tutor-contrib-s3@v1.4.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: Kubeconform Validation | ||
|
||
on: | ||
pull_request: | ||
|
||
jobs: | ||
load-environments: | ||
name: Load environments | ||
runs-on: ubuntu-latest | ||
outputs: | ||
matrix: ${{ steps.set-matrix.outputs.matrix }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- id: set-matrix | ||
run: echo "::set-output name=matrix::$(ls .github/environments/ | jq -R -s -c 'split("\n")[:-1]')" | ||
validation: | ||
needs: load-environments | ||
strategy: | ||
matrix: | ||
environment: ${{fromJson(needs.load-environments.outputs.matrix)}} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: setup python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.12 | ||
- name: Setup Tutor environment | ||
run: | | ||
echo "TUTOR_ROOT=$GITHUB_WORKSPACE/.github/environments/${{ matrix.environment }}" >> $GITHUB_ENV | ||
echo "TUTOR_PLUGINS_ROOT=$TUTOR_ROOT/plugins" >> $GITHUB_ENV | ||
- name: Install python reqs | ||
run: | | ||
pip install -r .github/requirements.txt | ||
pip install -e . | ||
- name: Tutor config save | ||
run: tutor config save | ||
- name: Install Kubernetes tools | ||
uses: alexellis/arkade-get@master | ||
with: | ||
kubectl: latest | ||
kustomize: latest | ||
kubeconform: latest | ||
- name: Check k8s manifests | ||
run: | | ||
kustomize build $TUTOR_ROOT/env | kubeconform -strict -ignore-missing-schemas -kubernetes-version latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,3 +18,4 @@ route @scorm_matcher { | |
header_up Host {{ S3_STORAGE_BUCKET }}.s3.amazonaws.com | ||
} | ||
} | ||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,3 +18,4 @@ route @scorm_matcher { | |
header_up Host {{ S3_STORAGE_BUCKET }}.s3.amazonaws.com | ||
} | ||
} | ||
{% endif %} |