Skip to content

Commit

Permalink
Add allowedDNS to PAAS namespace config
Browse files Browse the repository at this point in the history
  • Loading branch information
treydock committed May 25, 2024
1 parent c581df4 commit d4c61c5
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 2 deletions.
2 changes: 1 addition & 1 deletion charts/paas/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: paas
description: OSC PAAS bootstrap Helm Chart
type: application
version: 0.2.1
version: 0.3.0
appVersion: "0.1.0"
maintainers:
- name: treydock
Expand Down
9 changes: 8 additions & 1 deletion charts/paas/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# paas

![Version: 0.2.1](https://img.shields.io/badge/Version-0.2.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.1.0](https://img.shields.io/badge/AppVersion-0.1.0-informational?style=flat-square)
![Version: 0.3.0](https://img.shields.io/badge/Version-0.3.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.1.0](https://img.shields.io/badge/AppVersion-0.1.0-informational?style=flat-square)

OSC PAAS bootstrap Helm Chart

Expand All @@ -26,10 +26,16 @@ namespaces:
serviceAccount: test-account
account: test
groups: ['testgroup']
allowedDNS:
- test.osc.edu
- test.k8.osc.edu
- name: foo
serviceAccount: foo-account
account: foo
groups: ['bar']
allowedDNS:
- foo.osc.edu
- foo.k8.osc.edu
cpuLimit: '8'
cpuDefault: '1'
memoryLimit: '16Gi'
Expand All @@ -47,6 +53,7 @@ namespaces:
| serviceAccount | The user that will run pods | **required** |
| account | The charge account for this namespace | **required** |
| groups | The groups that can manage the namespace's resources | `[]` |
| allowedDNS | Allowed DNS entries for namespace's Ingress resources | `[]` |
| cpuLimit | The max CPU this namespace can consume | `4` |
| cpuDefault | The default CPU request for this namespace | `1` |
| memoryLimit | The max memory this namespace can consume | `8Gi` |
Expand Down
7 changes: 7 additions & 0 deletions charts/paas/README.md.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,16 @@ namespaces:
serviceAccount: test-account
account: test
groups: ['testgroup']
allowedDNS:
- test.osc.edu
- test.k8.osc.edu
- name: foo
serviceAccount: foo-account
account: foo
groups: ['bar']
allowedDNS:
- foo.osc.edu
- foo.k8.osc.edu
cpuLimit: '8'
cpuDefault: '1'
memoryLimit: '16Gi'
Expand All @@ -44,6 +50,7 @@ namespaces:
| serviceAccount | The user that will run pods | **required** |
| account | The charge account for this namespace | **required** |
| groups | The groups that can manage the namespace's resources | `[]` |
| allowedDNS | Allowed DNS entries for namespace's Ingress resources | `[]` |
| cpuLimit | The max CPU this namespace can consume | `4` |
| cpuDefault | The default CPU request for this namespace | `1` |
| memoryLimit | The max memory this namespace can consume | `8Gi` |
Expand Down
3 changes: 3 additions & 0 deletions charts/paas/ci/test-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ namespaces:
serviceAccount: test-account
account: test
groups: ['testgroup']
allowedDNS:
- test.example.com
- test.k8.example.com
cpuLimit: '8'
cpuDefault: '1'
memoryLimit: '16Gi'
Expand Down
3 changes: 3 additions & 0 deletions charts/paas/templates/namespace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ metadata:
osc.edu/role: paas
{{ include "osc.common.serviceAccountKey" . }}: {{ required "Namespace 'serviceAccount' is required" $namespace.serviceAccount}}
account: {{ required "Namespace 'account' is required" $namespace.account }}
{{- with $namespace.allowedDNS }}
osc.edu/allowed-dns: {{ join "," . | quote }}
{{- end }}
annotations:
{{- include "paas.namespaced.annotations" . | nindent 4 }}
{{ end }}

0 comments on commit d4c61c5

Please sign in to comment.