Skip to content

Commit

Permalink
rename chart to neuvector, update values interface
Browse files Browse the repository at this point in the history
  • Loading branch information
hadams95 committed Feb 22, 2024
1 parent 1c35c74 commit 3bcb51d
Show file tree
Hide file tree
Showing 27 changed files with 132 additions and 63 deletions.
6 changes: 3 additions & 3 deletions helm/gen3/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,10 @@ dependencies:
version: "0.1.4"
repository: "file://../spark"
condition: spark.enabled
- name: neuvectorPolicies
- name: neuvector
version: "0.1.0"
repository: "file://../neuvector-policies"
condition: neuvectorPolicies.enabled
repository: "file://../neuvector"
condition: neuvector.enabled


- name: elasticsearch
Expand Down
22 changes: 20 additions & 2 deletions helm/gen3/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -401,5 +401,23 @@ elasticsearch:
# Here we can add elasticsearch config
neuvectorPolicies:
enabled: false
neuvector:
# install Neuvector
enabled: false
policies:
# deploy predefined Neuvector policies for Gen3
include: false
# Discover, Monitor, or Protect
policyMode: Monitor
# Configure your ingress controller information for enabling ingress to containers
ingress:
# service name of your ingress controller
controller: nginx-ingress-controller
# installation namespace of your ingress controller
namespace: nginx
# classname of your ingress
class: nginx
# Required to allow egress to in-cluster database or external, managed database
DB_HOST: development-gen3-postgresql


Check failure on line 423 in helm/gen3/values.yaml

View workflow job for this annotation

GitHub Actions / lint-test

423:1 [empty-lines] too many blank lines (2 > 0)
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apiVersion: v2
name: neuvector-policies
name: neuvector
description: A Helm chart for Kubernetes

# A chart can be either an 'application' or a 'library' chart.
Expand All @@ -22,3 +22,8 @@ version: 0.1.0
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "1.16.0"

# dependencies:
# - name: neuvector
# version: "5.2.2-s1"
# repository: "https://neuvector.github.io/neuvector-helm/core"
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "neuvector-policies.name" -}}
{{- define "neuvector.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}

Expand All @@ -10,7 +10,7 @@ Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "neuvector-policies.fullname" -}}
{{- define "neuvector.fullname" -}}
{{- if .Values.fullnameOverride }}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
Expand All @@ -26,16 +26,16 @@ If release name contains chart name it will be used as a full name.
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "neuvector-policies.chart" -}}
{{- define "neuvector.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Common labels
*/}}
{{- define "neuvector-policies.labels" -}}
helm.sh/chart: {{ include "neuvector-policies.chart" . }}
{{ include "neuvector-policies.selectorLabels" . }}
{{- define "neuvector.labels" -}}
helm.sh/chart: {{ include "neuvector.chart" . }}
{{ include "neuvector.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
Expand All @@ -45,17 +45,17 @@ app.kubernetes.io/managed-by: {{ .Release.Service }}
{{/*
Selector labels
*/}}
{{- define "neuvector-policies.selectorLabels" -}}
app.kubernetes.io/name: {{ include "neuvector-policies.name" . }}
{{- define "neuvector.selectorLabels" -}}
app.kubernetes.io/name: {{ include "neuvector.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

{{/*
Create the name of the service account to use
*/}}
{{- define "neuvector-policies.serviceAccountName" -}}
{{- define "neuvector.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default (include "neuvector-policies.fullname" .) .Values.serviceAccount.name }}
{{- default (include "neuvector.fullname" .) .Values.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.policies.include }}
apiVersion: neuvector.com/v1
kind: NvSecurityRule
metadata:
Expand Down Expand Up @@ -193,7 +194,7 @@ spec:
process_profile:
baseline: zero-drift
target:
policymode: {{ .Values.POLICY_MODE }}
policymode: {{ .Values.policies.policyMode }}
selector:
comment: ""
criteria:
Expand All @@ -207,4 +208,5 @@ spec:
original_name: ""
waf:
settings: []
status: true
status: true
{{- end }}
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.policies.include }}
apiVersion: neuvector.com/v1
kind: NvSecurityRule
metadata:
Expand Down Expand Up @@ -199,7 +200,7 @@ spec:
process_profile:
baseline: zero-drift
target:
policymode: {{ .Values.POLICY_MODE }}
policymode: {{ .Values.policies.policyMode }}
selector:
comment: ""
criteria:
Expand All @@ -213,4 +214,5 @@ spec:
original_name: ""
waf:
settings: []
status: true
status: true
{{- end }}
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.policies.include }}
apiVersion: neuvector.com/v1
kind: NvSecurityRule
metadata:
Expand Down Expand Up @@ -79,7 +80,7 @@ spec:
process_profile:
baseline: zero-drift
target:
policymode: {{ .Values.POLICY_MODE }}
policymode: {{ .Values.policies.policyMode }}
selector:
comment: ""
criteria:
Expand All @@ -93,4 +94,5 @@ spec:
original_name: ""
waf:
settings: []
status: true
status: true
{{- end }}
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.policies.include }}
apiVersion: neuvector.com/v1
kind: NvSecurityRule
metadata:
Expand Down Expand Up @@ -68,7 +69,7 @@ spec:
process_profile:
baseline: zero-drift
target:
policymode: {{ .Values.POLICY_MODE }}
policymode: {{ .Values.policies.policyMode }}
selector:
comment: ""
criteria:
Expand All @@ -82,4 +83,5 @@ spec:
original_name: ""
waf:
settings: []
status: true
status: true
{{- end }}
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.policies.include }}
apiVersion: neuvector.com/v1
kind: NvSecurityRule
metadata:
Expand Down Expand Up @@ -275,7 +276,7 @@ spec:
process_profile:
baseline: zero-drift
target:
policymode: {{ .Values.POLICY_MODE }}
policymode: {{ .Values.policies.policyMode }}
selector:
comment: ""
criteria:
Expand All @@ -289,4 +290,5 @@ spec:
original_name: ""
waf:
settings: []
status: true
status: true
{{- end }}
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.policies.include }}
apiVersion: neuvector.com/v1
kind: NvSecurityRule
metadata:
Expand Down Expand Up @@ -53,7 +54,7 @@ spec:
process_profile:
baseline: zero-drift
target:
policymode: {{ .Values.POLICY_MODE }}
policymode: {{ .Values.policies.policyMode }}
selector:
comment: ""
criteria:
Expand All @@ -67,4 +68,5 @@ spec:
original_name: ""
waf:
settings: []
status: true
status: true
{{- end }}
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.policies.include }}
apiVersion: neuvector.com/v1
kind: NvSecurityRule
metadata:
Expand Down Expand Up @@ -110,7 +111,7 @@ spec:
process_profile:
baseline: zero-drift
target:
policymode: {{ .Values.POLICY_MODE }}
policymode: {{ .Values.policies.policyMode }}
selector:
comment: ""
criteria:
Expand All @@ -124,4 +125,5 @@ spec:
original_name: ""
waf:
settings: []
status: true
status: true
{{- end }}
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.policies.include }}
apiVersion: neuvector.com/v1
kind: NvSecurityRule
metadata:
Expand Down Expand Up @@ -121,7 +122,7 @@ spec:
process_profile:
baseline: zero-drift
target:
policymode: {{ .Values.POLICY_MODE }}
policymode: {{ .Values.policies.policyMode }}
selector:
comment: ""
criteria:
Expand All @@ -135,4 +136,5 @@ spec:
original_name: ""
waf:
settings: []
status: true
status: true
{{- end }}
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.policies.include }}
apiVersion: neuvector.com/v1
kind: NvSecurityRule
metadata:
Expand Down Expand Up @@ -133,7 +134,7 @@ spec:
process_profile:
baseline: zero-drift
target:
policymode: {{ .Values.POLICY_MODE }}
policymode: {{ .Values.policies.policyMode }}
selector:
comment: ""
criteria:
Expand All @@ -147,4 +148,5 @@ spec:
original_name: ""
waf:
settings: []
status: true
status: true
{{- end }}
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.policies.include }}
apiVersion: neuvector.com/v1
kind: NvClusterSecurityRule
metadata:
Expand Down Expand Up @@ -125,4 +126,5 @@ spec:
original_name: ""
waf:
settings: []
status: true
status: true
{{- end }}
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.policies.include }}
apiVersion: neuvector.com/v1
kind: NvSecurityRule
metadata:
Expand Down Expand Up @@ -147,7 +148,7 @@ spec:
process_profile:
baseline: zero-drift
target:
policymode: {{ .Values.POLICY_MODE }}
policymode: {{ .Values.policies.policyMode }}
selector:
comment: ""
criteria:
Expand All @@ -161,4 +162,5 @@ spec:
original_name: ""
waf:
settings: []
status: true
status: true
{{- end }}
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.policies.include }}
apiVersion: neuvector.com/v1
kind: NvSecurityRule
metadata:
Expand Down Expand Up @@ -68,7 +69,7 @@ spec:
process_profile:
baseline: zero-drift
target:
policymode: {{ .Values.POLICY_MODE }}
policymode: {{ .Values.policies.policyMode }}
selector:
comment: ""
criteria:
Expand All @@ -82,4 +83,5 @@ spec:
original_name: ""
waf:
settings: []
status: true
status: true
{{- end }}
Loading

0 comments on commit 3bcb51d

Please sign in to comment.