Skip to content

Commit

Permalink
Merge pull request #4 from akto-api-security/feature/disable_runtime_…
Browse files Browse the repository at this point in the history
…testing

Added flags to control service deployments
  • Loading branch information
ankush-jain-akto authored Nov 28, 2023
2 parents b95e716 + 397d907 commit 4960e40
Show file tree
Hide file tree
Showing 9 changed files with 31 additions and 6 deletions.
4 changes: 3 additions & 1 deletion charts/akto-setup/templates/dashboard.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{ if .Values.dashboard.aktoApiSecurityDashboard.env.enabled }}
apiVersion: v1
kind: Service
metadata:
Expand All @@ -12,4 +13,5 @@ spec:
app: {{ include "akto.fullname" . }}-dashboard
{{- include "akto.selectorLabels" . | nindent 4 }}
ports:
{{- .Values.dashboard.ports | toYaml | nindent 2 -}}
{{- .Values.dashboard.ports | toYaml | nindent 2 -}}
{{ end }}
11 changes: 9 additions & 2 deletions charts/akto-setup/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{ if .Values.dashboard.aktoApiSecurityDashboard.env.enabled }}
apiVersion: apps/v1
kind: Deployment
metadata:
Expand Down Expand Up @@ -70,7 +71,9 @@ spec:
ports:
- containerPort: 8080
resources: {{- toYaml .Values.dashboard.aktoApiSecurityDashboard.resources | nindent 10 }}
{{ end }}
---
{{ if .Values.testing.aktoApiSecurityTesting.env.enabled }}
apiVersion: apps/v1
kind: Deployment
metadata:
Expand Down Expand Up @@ -136,7 +139,9 @@ spec:
name: akto-api-security-testing
resources: {{- toYaml .Values.testing.aktoApiSecurityTesting.resources | nindent 10 }}
restartPolicy: Always
{{ end }}
---
{{ if .Values.runtime.aktoApiSecurityRuntime.env.enabled }}
apiVersion: apps/v1
kind: Deployment
metadata:
Expand Down Expand Up @@ -270,8 +275,9 @@ spec:
- containerPort: 9999
resources: {{- toYaml .Values.runtime.kafka1.resources | nindent 10 }}
restartPolicy: Always

{{ end }}
---
{{ if .Values.keel.keel.env.enabled }}
apiVersion: apps/v1
kind: Deployment
metadata:
Expand Down Expand Up @@ -340,4 +346,5 @@ spec:
ports:
- containerPort: 9300
resources: {{- toYaml .Values.keel.keel.resources | nindent 10 }}
serviceAccountName: {{ include "akto.fullname" . }}-keel
serviceAccountName: {{ include "akto.fullname" . }}-keel
{{ end }}
4 changes: 3 additions & 1 deletion charts/akto-setup/templates/hpa.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{ if .Values.runtime.aktoApiSecurityRuntime.env.enabled }}
apiVersion: autoscaling/v1
kind: HorizontalPodAutoscaler
metadata:
Expand All @@ -11,4 +12,5 @@ spec:
apiVersion: apps/v1
kind: Deployment
name: {{ include "akto.fullname" . }}-runtime
targetCPUUtilizationPercentage: 80
targetCPUUtilizationPercentage: 80
{{ end }}
4 changes: 3 additions & 1 deletion charts/akto-setup/templates/keel-rbac-binding.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{ if .Values.keel.keel.env.enabled }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
Expand All @@ -11,4 +12,5 @@ roleRef:
subjects:
- kind: ServiceAccount
name: '{{ include "akto.fullname" . }}-keel'
namespace: '{{ .Release.Namespace }}'
namespace: '{{ .Release.Namespace }}'
{{ end }}
2 changes: 2 additions & 0 deletions charts/akto-setup/templates/keel-rbac.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{ if .Values.keel.keel.env.enabled }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
Expand Down Expand Up @@ -49,3 +50,4 @@ rules:
- get
- create
- update
{{ end }}
2 changes: 2 additions & 0 deletions charts/akto-setup/templates/keel.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{ if .Values.keel.keel.env.enabled }}
apiVersion: v1
kind: Service
metadata:
Expand All @@ -12,3 +13,4 @@ spec:
{{- include "akto.selectorLabels" . | nindent 4 }}
ports:
{{- .Values.keel.ports | toYaml | nindent 2 -}}
{{ end }}
2 changes: 2 additions & 0 deletions charts/akto-setup/templates/runtime.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{ if .Values.runtime.aktoApiSecurityRuntime.env.enabled }}
apiVersion: v1
kind: Service
metadata:
Expand All @@ -11,3 +12,4 @@ spec:
{{- include "akto.selectorLabels" . | nindent 4 }}
ports:
{{- .Values.runtime.ports | toYaml | nindent 2 -}}
{{ end }}
4 changes: 3 additions & 1 deletion charts/akto-setup/templates/serviceaccount.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{ if .Values.keel.keel.env.enabled }}
apiVersion: v1
kind: ServiceAccount
metadata:
Expand All @@ -6,4 +7,5 @@ metadata:
app: {{ include "akto.fullname" . }}-keel
{{- include "akto.labels" . | nindent 4 }}
annotations:
{{- toYaml .Values.keel.serviceAccount.annotations | nindent 4 }}
{{- toYaml .Values.keel.serviceAccount.annotations | nindent 4 }}
{{ end }}
4 changes: 4 additions & 0 deletions charts/akto-setup/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ dashboard:
aktoTrafficBatchSize: "100"
aktoTrafficBatchTimeSecs: "10"
puppeteerReplayServiceUrl: http://akto-puppeteer-replay:3000
enabled: true
image:
repository: public.ecr.aws/aktosecurity/akto-api-security-dashboard
tag: latest
Expand Down Expand Up @@ -47,6 +48,7 @@ runtime:
aktoTrafficBatchTimeSecs: "10"
puppeteerReplayServiceUrl: http://akto-puppeteer-replay:3000
useHostName: true
enabled: true
image:
repository: public.ecr.aws/aktosecurity/akto-api-security-runtime
tag: latest
Expand Down Expand Up @@ -122,6 +124,7 @@ testing:
aktoTrafficBatchSize: "100"
aktoTrafficBatchTimeSecs: "10"
puppeteerReplayServiceUrl: http://akto-puppeteer-replay:3000
enabled: true
image:
repository: public.ecr.aws/aktosecurity/akto-api-testing
tag: latest
Expand Down Expand Up @@ -151,6 +154,7 @@ keel:
mattermostEndpoint: ""
notificationLevel: info
webhookEndpoint: ""
enabled: true
image:
repository: keelhq/keel
tag: latest
Expand Down

0 comments on commit 4960e40

Please sign in to comment.