Skip to content

Commit

Permalink
Merge pull request #124 from ApplauseOSS/feat/update-ingress-dsl
Browse files Browse the repository at this point in the history
  • Loading branch information
verbotenj authored Sep 24, 2024
2 parents f397acf + 224b154 commit 6e97563
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 5 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ jobs:
Run-CI-Script:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-python@v2
- uses: actions/setup-python@v5
with:
python-version: '3.8'
- uses: actions/checkout@v2
python-version: '3.10'
- uses: actions/checkout@v4
- run: scripts/ci.sh
3 changes: 3 additions & 0 deletions deploy_config_generator/output/kube_ingress.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ class OutputPlugin(kube_common.OutputPlugin):
type='dict',
fields=copy.deepcopy(INGRESS_BACKEND_FIELD_SPEC),
),
ingress_class_name=dict(
type='str',
),
rules=dict(
type='list',
subtype='dict',
Expand Down
1 change: 1 addition & 0 deletions docs/plugin_kube_ingress.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ Name | Type | Required | Default | Description
`spec . default_backend . service . port`|`dict`|no||
`spec . default_backend . service . port . name`|`str`|no||
`spec . default_backend . service . port . number`|`int`|no||
`spec . ingress_class_name`|`str`|no||
`spec . rules`|`list` (of `dict`)|no||
`spec . rules . host`|`str`|no||
`spec . rules . http`|`dict`|no||
Expand Down
16 changes: 16 additions & 0 deletions tests/integration/kube_basic/deploy/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,22 @@ kube_ingresses:
name: test
port:
number: 80
- metadata:
name: test-ingress-with-class-name
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /
spec:
ingress_class_name: kong
rules:
- http:
paths:
- path: /testpath
path_type: Prefix
backend:
service:
name: test
port:
number: 80

kube_pvcs:
- metadata:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /
name: test-ingress-with-class-name
spec:
ingressClassName: kong
rules:
- http:
paths:
- backend:
service:
name: test
port:
number: 80
path: /testpath
pathType: Prefix
6 changes: 4 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@ downloadcache = {toxworkdir}/cache/
envlist = py3

[testenv]
deps = flake8
deps =
flake8
pytest
commands =
flake8
python setup.py test
pytest tests
python setup.py integration

[flake8]
Expand Down

0 comments on commit 6e97563

Please sign in to comment.