Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions helm/oauth2-proxy/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: oauth2-proxy
version: 8.2.2
version: 8.3.0
apiVersion: v2
appVersion: 7.12.0
home: https://oauth2-proxy.github.io/oauth2-proxy/
Expand Down Expand Up @@ -31,8 +31,8 @@ maintainers:
kubeVersion: ">=1.16.0-0"
annotations:
artifacthub.io/changes: |
- kind: security
description: Adding cosign keyless signing for helm chart artifact
- kind: added
description: Add NetworkPolicy manifest to the helm chart
links:
- name: Github PR
url: https://github.com/oauth2-proxy/manifests/pull/356
url: https://github.com/oauth2-proxy/manifests/pull/357
3 changes: 3 additions & 0 deletions helm/oauth2-proxy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,9 @@ The following table lists the configurable parameters of the oauth2-proxy chart
| `livenessProbe.initialDelaySeconds` | number of seconds | 0 |
| `livenessProbe.timeoutSeconds` | number of seconds | 1 |
| `namespaceOverride` | Override the deployment namespace | `""` |
| `networkPolicy.create` | Create a NetworkPolicy resource | `false` |
| `networkPolicy.ingress` | List of ingress configuration objects | `[]` |
| `networkPolicy.egress` | List of egress configuration objects | `[]` |
| `nodeSelector` | node labels for pod assignment | `{}` |
| `deploymentAnnotations` | annotations to add to the deployment | `{}` |
| `podAnnotations` | annotations to add to each pod | `{}` |
Expand Down
35 changes: 35 additions & 0 deletions helm/oauth2-proxy/templates/networkpolicy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{{- if .Values.networkPolicy.create }}
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: {{ include "oauth2-proxy.fullname" . }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "oauth2-proxy.labels" . | nindent 4 }}
{{- with .Values.commonLabels }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.commonAnnotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
policyTypes:
{{- if .Values.networkPolicy.ingress }}
- Ingress
{{- end }}
{{- if .Values.networkPolicy.egress }}
- Egress
{{- end }}
podSelector:
matchLabels:
{{- include "oauth2-proxy.selectorLabels" . | nindent 6 }}
{{- if .Values.networkPolicy.ingress }}
ingress:
{{- toYaml .Values.networkPolicy.ingress | nindent 4 }}
{{- end }}
{{- if .Values.networkPolicy.egress }}
egress:
{{- toYaml .Values.networkPolicy.egress | nindent 4 }}
{{- end }}
{{- end }}
6 changes: 6 additions & 0 deletions helm/oauth2-proxy/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,12 @@ serviceAccount:
automountServiceAccountToken: true
annotations: {}

# Network policy settings.
networkPolicy:
create: false
ingress: []
egress: []

ingress:
enabled: false
# className: nginx
Expand Down
Loading