Skip to content

Commit

Permalink
Merge pull request #14 from GDATASoftwareAG/13-networkpolicy-prevents…
Browse files Browse the repository at this point in the history
…-update-job-to-access-kubernetes-api-server

makes the k8s api port configurable
  • Loading branch information
unglaublicherdude authored Feb 13, 2023
2 parents 94dc2c6 + e9459a6 commit 17d37ee
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 3 deletions.
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,19 @@ The token has to be set in the `secret.dockerconfigjson` variable on deployment.
```yaml
# Example values.yaml
secret:
dockerconfigjson: $$_BASE64_ENCODED_TOKEN_$$
dockerconfigjson: $$_BASE64_ENCODED_JSON_CONTAINING_TOKEN_$$
```
Example of the dockerconfigjson
```json
{
"auths": {
"ghcr.io": {
"auth": "$$_BASE64_ENCODED_USERNAME_AND_TOKEN_$$"
}
}
}
```

3. Add GD Scan repository:
Expand Down
2 changes: 1 addition & 1 deletion charts/gdscan/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ maintainers:
- name: G DATA CyberDefense AG
email: oem@gdata.de
type: application
version: 0.7.1
version: 0.7.2
4 changes: 3 additions & 1 deletion charts/gdscan/templates/update.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ spec:
{{- else }}
- "deployment/{{ include "gdscan.fullname" . }}"
{{- end }}
{{- if .Values.autoUpdate.networkPolicy.enabled }}
---
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
Expand All @@ -81,5 +82,6 @@ spec:
ingress: []
egress:
- ports:
- port: 6443
- port: {{ .Values.autoUpdate.networkPolicy.k8sApiPort }}
{{- end }}
{{- end}}
4 changes: 4 additions & 0 deletions charts/gdscan/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,11 @@ persistence:
memory: false
size: 5Gi
storageClass: ""

autoUpdate:
enabled: true
# every hour
schedule: "0 * * * *"
networkPolicy:
enabled: true
k8sApiPort: 6443

0 comments on commit 17d37ee

Please sign in to comment.