-
Notifications
You must be signed in to change notification settings - Fork 5
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
Added network policy to radar applications #107
Changes from all commits
a638e5b
93d5452
a7546bd
2c446d9
7a2e375
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{{- if .Values.networkpolicy }} | ||
kind: NetworkPolicy | ||
apiVersion: networking.k8s.io/v1 | ||
metadata: | ||
name: {{ template "app-config-frontend.fullname" . }} | ||
labels: | ||
{{ include "app-config-frontend.labels" . | indent 4 }} | ||
spec: | ||
podSelector: | ||
{{ include "app-config-frontend.labels" . | indent 4 }} | ||
{{- tpl (toYaml .Values.networkpolicy) . | nindent 2 }} | ||
{{- end -}} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{{- if .Values.networkpolicy }} | ||
kind: NetworkPolicy | ||
apiVersion: networking.k8s.io/v1 | ||
metadata: | ||
name: {{ template "app-config.fullname" . }} | ||
labels: | ||
{{ include "app-config.labels" . | indent 4 }} | ||
spec: | ||
podSelector: | ||
{{ include "app-config.labels" . | indent 4 }} | ||
{{- tpl (toYaml .Values.networkpolicy) . | nindent 2 }} | ||
{{- end -}} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{{- if .Values.networkpolicy }} | ||
kind: NetworkPolicy | ||
apiVersion: networking.k8s.io/v1 | ||
metadata: | ||
name: {{ template "catalog-server.fullname" . }} | ||
labels: | ||
{{ include "catalog-server.labels" . | indent 4 }} | ||
spec: | ||
podSelector: | ||
{{ include "catalog-server.labels" . | indent 4 }} | ||
{{- tpl (toYaml .Values.networkpolicy) . | nindent 2 }} | ||
{{- end -}} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -122,6 +122,60 @@ readinessProbe: | |
# -- Failure threshold for readinessProbe | ||
failureThreshold: 3 | ||
|
||
# -- Network policy defines who can access this application and who this applications has access to | ||
# @default -- check `values.yaml` | ||
networkpolicy: | ||
policyTypes: | ||
- Ingress | ||
- Egress | ||
ingress: | ||
- from: | ||
- namespaceSelector: | ||
matchLabels: | ||
kubernetes.io/metadata.name: '{{ .Release.Namespace }}' | ||
podSelector: | ||
matchLabels: | ||
app.kubernetes.io/name: management-portal | ||
- namespaceSelector: | ||
matchLabels: | ||
kubernetes.io/metadata.name: '{{ .Release.Namespace }}' | ||
podSelector: | ||
matchLabels: | ||
app.kubernetes.io/name: radar-s3-connector | ||
egress: | ||
- to: | ||
- ipBlock: | ||
cidr: 0.0.0.0/0 | ||
except: | ||
- 10.0.0.0/8 | ||
- 192.168.0.0/16 | ||
- 172.16.0.0/20 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why are we blocking these private/local IPs? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The policies will be enabled by default. If you want to disable them you can change the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we also accept incoming requests from management portal here? Since management portal needs the catalog server for source types? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes! Good catch! Thank you! |
||
- to: | ||
- namespaceSelector: | ||
matchLabels: | ||
kubernetes.io/metadata.name: kube-system | ||
podSelector: | ||
matchLabels: | ||
k8s-app: kube-dns | ||
ports: | ||
- port: 53 | ||
protocol: UDP | ||
- port: 53 | ||
protocol: TCP | ||
- to: | ||
- namespaceSelector: | ||
matchLabels: | ||
kubernetes.io/metadata.name: '{{ .Release.Namespace }}' | ||
podSelector: | ||
matchLabels: | ||
app.kubernetes.io/name: cp-kafka | ||
- namespaceSelector: | ||
matchLabels: | ||
kubernetes.io/metadata.name: '{{ .Release.Namespace }}' | ||
podSelector: | ||
matchLabels: | ||
app.kubernetes.io/name: cp-schema-registry | ||
|
||
# -- number of Kafka brokers to look for | ||
kafka_num_brokers: 3 | ||
# -- URI of Kafka brokers | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
# management-portal | ||
[![Artifact HUB](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/management-portal)](https://artifacthub.io/packages/helm/radar-base/management-portal) | ||
|
||
![Version: 1.0.4](https://img.shields.io/badge/Version-1.0.4-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.0.0](https://img.shields.io/badge/AppVersion-2.0.0-informational?style=flat-square) | ||
![Version: 1.1.0](https://img.shields.io/badge/Version-1.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.0.0](https://img.shields.io/badge/AppVersion-2.0.0-informational?style=flat-square) | ||
|
||
A Helm chart for RADAR-Base Management Portal to manage projects and participants throughout RADAR-base. | ||
|
||
|
@@ -76,6 +76,7 @@ A Helm chart for RADAR-Base Management Portal to manage projects and participant | |
| readinessProbe.timeoutSeconds | int | `5` | Timeout seconds for readinessProbe | | ||
| readinessProbe.successThreshold | int | `1` | Success threshold for readinessProbe | | ||
| readinessProbe.failureThreshold | int | `3` | Failure threshold for readinessProbe | | ||
| networkpolicy | object | check `values.yaml` | Network policy defines who can access this application and who this applications has access to | | ||
| keystore | string | `""` | base 64 encoded binary p12 keystore containing a ECDSA certificate with alias `radarbase-managementportal-ec` and a RSA certificate with alias `selfsigned`. | | ||
| postgres.host | string | `"postgresql"` | host name of the postgres db | | ||
| postgres.port | int | `5432` | post of the postgres db | | ||
|
@@ -101,7 +102,7 @@ A Helm chart for RADAR-Base Management Portal to manage projects and participant | |
| smtp.from | string | `"[email protected]"` | Email address which should be used to send activation emails | | ||
| smtp.starttls | bool | `false` | set to true,if ttls should be enabled | | ||
| smtp.auth | bool | `true` | set to true, if the account should be authenticated before sending emails | | ||
| oauth_clients | object | check values.yaml | OAuth2 Client configuration | | ||
| oauth_clients | object | check `values.yaml` | OAuth2 Client configuration | | ||
|
||
## OAuth Client Configuration | ||
List of OAuth client configurations supported by RADAR-base. Each client should be enabled separately, if relevant and used in the installation. | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{{- if .Values.networkpolicy }} | ||
kind: NetworkPolicy | ||
apiVersion: networking.k8s.io/v1 | ||
metadata: | ||
name: {{ template "management-portal.fullname" . }} | ||
labels: | ||
{{ include "management-portal.labels" . | indent 4 }} | ||
spec: | ||
podSelector: | ||
{{ include "management-portal.labels" . | indent 4 }} | ||
{{- tpl (toYaml .Values.networkpolicy) . | nindent 2 }} | ||
{{- end -}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what about other connectors?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems only only these two applications connect to catalog-server: