Skip to content

Commit

Permalink
fix: Update manifests to ensure it can be rendered correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
Danny-Wei committed Nov 8, 2024
1 parent fc47c87 commit bdb4313
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 19 deletions.
2 changes: 1 addition & 1 deletion manifests/varmor/templates/deployments/classifier.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,4 @@ spec:
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end}}
{{- end }}
11 changes: 6 additions & 5 deletions manifests/varmor/templates/deployments/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,11 @@ spec:
{{- with .Values.manager.bpfExclusiveMode.args }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{ - if .Values.enableMetrics.enabled }}
{{ - with .Values.manager.enableMetrics.args }}
{{ - toYaml . | nindent 8 }}
{{ - end }}
{{- end }}
{{- if .Values.metrics.enabled }}
{{- with .Values.manager.metrics.args }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
{{- end }}
securityContext:
Expand All @@ -71,7 +72,7 @@ spec:
- name: status
containerPort: 8080
protocol: TCP
{{ - if .Values.enableMetrics.enabled }}
{{- if .Values.metrics.enabled }}
- name: metrics
containerPort: 8081
protocol: TCP
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if and .Values.enableMetrics.enabled .Values.enableMetrics.serviceMonitorEnabled }}
{{- if and .Values.metrics.enabled .Values.metrics.serviceMonitorEnabled }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
Expand All @@ -18,4 +18,4 @@ spec:
path: /metrics
interval: 15s
scrapeTimeout: 14s
{{- end }}
{{- end }}
14 changes: 7 additions & 7 deletions manifests/varmor/templates/services/varmor-metrics-svc.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{{- if .Values.enableMetrics.enabled }}
{{- if .Values.metrics.enabled }}
apiVersion: v1
kind: Service
metadata:
name: {{ include "varmor.manager.fullname" . }}-metrics
name: varmor-metrics-svc
namespace: {{ include "varmor.namespace" . }}
labels:
{{- include "varmor.manager.labels" . | nindent 4 }}
Expand All @@ -13,10 +13,10 @@ metadata:
spec:
type: ClusterIP
ports:
- port: 8081
targetPort: metrics
protocol: TCP
name: metrics
- port: 8081
targetPort: metrics
protocol: TCP
name: metrics
selector:
{{- include "varmor.manager.selectorLabels" . | nindent 4 }}
{{- end }}
{{- end }}
10 changes: 6 additions & 4 deletions manifests/varmor/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ appArmorLsmEnforcer:
bpfLsmEnforcer:
enabled: false

enableMetrics:
metrics:
enabled: false
serviceMonitorEnabled: false

Expand Down Expand Up @@ -93,16 +93,18 @@ manager:
args:
- --bpfExclusiveMode

metrics:
args:
- --enableMetrics

resources:
limits:
cpu: 200m
memory: 300Mi
requests:
cpu: 100m
memory: 200Mi
enableMetrics:
args:
- --enableMetrics

autoscaling:
enabled: false
minReplicas: 3
Expand Down

0 comments on commit bdb4313

Please sign in to comment.