Skip to content

Commit

Permalink
Merge branch 'main' into unstable
Browse files Browse the repository at this point in the history
  • Loading branch information
gasRU76 committed Nov 28, 2024
2 parents f90147c + 109e293 commit bb2d486
Show file tree
Hide file tree
Showing 30 changed files with 591 additions and 42 deletions.
23 changes: 23 additions & 0 deletions charts/flood-testing/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
23 changes: 23 additions & 0 deletions charts/flood-testing/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
apiVersion: v2
name: flood-testing
description: A Helm chart for Kubernetes

# To use chart you can use the following commands (small image size is default):
# helm upgrade --install releaseName --set imageSize=small|medium|large --set ingress.url=something.k3s.brokencrystals.nexploit.app . --namespace distributor --wait


type: application

# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
keywords:
- flood-testing
- ft
version: 1.0.1

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "1.0.0"
44 changes: 44 additions & 0 deletions charts/flood-testing/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Release.Name }}
namespace: {{ .Release.Namespace }}
labels:
app: {{ .Release.Name }}
app.kubernetes.io/instance: {{ .Release.Name }}
spec:
selector:
matchLabels:
app: {{ .Release.Name }}
app.kubernetes.io/instance: {{ .Release.Name }}
template:
metadata:
labels:
app.kubernetes.io/instance: {{ .Release.Name }}
app: {{ .Release.Name }}
spec:
containers:
- name: {{ .Chart.Name }}
image: ghcr.io/neuralegion/floodtest_tgt:{{ .Values.imageSize }}
resources:
requests:
cpu: 50m
memory: 128Mi
limits:
cpu: 250m
memory: 512Mi
livenessProbe:
httpGet:
path: /
port: 3000
scheme: HTTP
initialDelaySeconds: 30
periodSeconds: 30
startupProbe:
httpGet:
path: /
port: 3000
scheme: HTTP
imagePullSecrets:
- name: pull-ghcr-io
29 changes: 29 additions & 0 deletions charts/flood-testing/templates/ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ .Release.Name }}
namespace: {{ .Release.Namespace }}
annotations:
nginx.ingress.kubernetes.io/proxy-ssl-protocols: "TLSv1.1 TLSv1.2"
nginx.ingress.kubernetes.io/ssl-redirect: "false"
{{ if eq .Values.ingress.cert "" }}
cert-manager.io/cluster-issuer: letsencrypt-cf-prod
{{ end }}
spec:
ingressClassName: nginx
tls:
- hosts:
- {{ .Values.ingress.url }}
secretName: {{ if eq .Values.ingress.cert "" }}distributorwildcard{{ else }}{{ .Values.ingress.cert }}{{ end }}
rules:
- host: {{ .Values.ingress.url }}
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: {{ .Release.Name }}
port:
number: 3000
11 changes: 11 additions & 0 deletions charts/flood-testing/templates/service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: v1
kind: Service
metadata:
name: {{ .Release.Name }}
namespace: {{ .Release.Namespace }}
spec:
ports:
- port: 3000
selector:
app.kubernetes.io/instance: {{ .Release.Name }}
app: {{ .Release.Name }}
5 changes: 5 additions & 0 deletions charts/flood-testing/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
ingress:
url: dev.vuln.nexploit.app
cert: ""
authlevel: "."
imageSize: "small"
2 changes: 1 addition & 1 deletion charts/log4shell/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: log4shell app
type: application
keywords:
- log4shell
version: 0.0.2
version: 0.0.3
dependencies:
- name: simple-service
version: 0.0.1
Expand Down
8 changes: 4 additions & 4 deletions charts/log4shell/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ simple-service:
port: 8080
resources:
requests:
cpu: 50m
memory: 128Mi
limits:
cpu: 125m
cpu: 150m
memory: 256Mi
limits:
cpu: 500m
memory: 768Mi
livenessProbe:
httpGet:
path: /
Expand Down
6 changes: 6 additions & 0 deletions charts/static-app-with-delay/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# static-app-with-delay/Chart.yaml
apiVersion: v2
name: static-app-with-delay
description: A Helm chart for Kubernetes deployment with self-signed certificate
version: 0.0.1
appVersion: "1.0"
8 changes: 8 additions & 0 deletions charts/static-app-with-delay/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# static-app-with-delay/templates/_helpers.tpl
{{- define "static-app-with-delay.name" -}}
static-app-with-delay
{{- end -}}

{{- define "static-app-with-delay.fullname" -}}
{{- .Release.Name }}-static-app-with-delay
{{- end -}}
103 changes: 103 additions & 0 deletions charts/static-app-with-delay/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
# static-app-with-delay/templates/deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "static-app-with-delay.fullname" . }}
labels:
app: {{ include "static-app-with-delay.name" . }}
spec:
replicas: 1
selector:
matchLabels:
app: {{ include "static-app-with-delay.name" . }}
template:
metadata:
labels:
app: {{ include "static-app-with-delay.name" . }}
spec:
hostAliases:
- ip: "127.0.0.1"
hostnames:
- "target.local"
containers:
- name: static-app
image: "{{ .Values.staticApp.image }}"
ports:
- containerPort: 80
env:
- name: RESPONSE_SIZE
value: "{{ .Values.staticApp.responseSize }}"

- name: nginx
image: "{{ .Values.nginx.image }}"
ports:
- containerPort: 443
volumeMounts:
- name: tls-certs
mountPath: "/etc/nginx/tls"
readOnly: true
command: ["/bin/sh", "-c"]
args:
- |
echo '
server {
listen 443 ssl;
server_name {{ .Values.nginx.serverName }};
ssl_certificate /etc/nginx/tls/tls.crt;
ssl_certificate_key /etc/nginx/tls/tls.key;
location / {
proxy_pass http://localhost:8080;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
server {
listen 80;
server_name {{ .Values.nginx.serverName }};
location / {
proxy_pass http://localhost:8080;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
' > /etc/nginx/conf.d/default.conf && nginx -g 'daemon off;'
{{- if and .Values.repeaterID .Values.token .Values.cluster }}
{{- range $index, $repeaterID := .Values.repeaterID }}
- name: repeater-{{ $index }}
image: brightsec/cli{{ if $.Values.repeaterImageTag }}:{{ $.Values.repeaterImageTag }}{{ else }}:latest{{ end }}
command: ["bright-cli", "repeater"]
args:
- "--token=$(TOKEN)"
- "--id=$(REPEATER_ID)"
- "--cluster=$(CLUSTER)"
- "--timeout=$(TIMEOUT)"
- "--log-level=verbose"
resources:
requests:
cpu: 200m
memory: 100Mi
env:
- name: REPEATER_ID
value: "{{ $repeaterID }}"
- name: TOKEN
value: "{{ $.Values.token }}"
- name: CLUSTER
value: "{{ $.Values.cluster }}"
- name: TIMEOUT
value: "{{ $.Values.timeout | default "30000" }}"
{{- end }}
{{- end }}

volumes:
- name: tls-certs
secret:
secretName: {{ include "static-app-with-delay.fullname" . }}-tls
9 changes: 9 additions & 0 deletions charts/static-app-with-delay/templates/secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# static-app-with-delay/templates/secret.yaml
apiVersion: v1
kind: Secret
metadata:
name: {{ include "static-app-with-delay.fullname" . }}-tls
type: kubernetes.io/tls
data:
tls.crt: {{ .Values.tls.crt }}
tls.key: {{ .Values.tls.key }}
18 changes: 18 additions & 0 deletions charts/static-app-with-delay/templates/service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# static-app-with-delay/templates/service.yaml
apiVersion: v1
kind: Service
metadata:
name: {{ include "static-app-with-delay.fullname" . }}
spec:
type: ClusterIP
ports:
- name: http
port: 80
targetPort: 8080
protocol: TCP
- name: https
port: 443
targetPort: 443
protocol: TCP
selector:
app: {{ include "static-app-with-delay.name" . }}
15 changes: 15 additions & 0 deletions charts/static-app-with-delay/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# static-app-with-delay/values.yaml
staticApp:
image: "454884832027.dkr.ecr.us-east-1.amazonaws.com/static-app-with-delay:latest" # Replace with your app image if different
responseSize: ""
nginx:
image: "nginx:latest"
serverName: "static.local" # Replace with your actual domain name if needed
repeaterID: ""
token: ""
cluster: ""
timeout: "30000"
repeaterImageTag: ""
tls:
crt: "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUROVENDQWgyZ0F3SUJBZ0lVY1B5K2VpWjgyZTY0WEt6aUpLQWZKbTRWNTYwd0RRWUpLb1pJaHZjTkFRRUwKQlFBd0tqRVZNQk1HQTFVRUF3d01jM1JoZEdsakxteHZZMkZzTVJFd0R3WURWUVFLREFoWmIzVnlJRTl5WnpBZQpGdzB5TkRFeE1UTXhNREl4TlRSYUZ3MHlOVEV4TVRNeE1ESXhOVFJhTUNveEZUQVRCZ05WQkFNTURITjBZWFJwCll5NXNiMk5oYkRFUk1BOEdBMVVFQ2d3SVdXOTFjaUJQY21jd2dnRWlNQTBHQ1NxR1NJYjNEUUVCQVFVQUE0SUIKRHdBd2dnRUtBb0lCQVFDNldtTDJwdmtyYkhQY2JiRkRUeWF1Y1ptUnV1aHFjZFZXREVkc3dQTkkxbm9XS3cxZwpoZWQzRDIrUG5EWHZxRFh3c2NvKzVEdG43SllKU2dKVXpxQ1BkOWdVWWMrZTBGWkZyRWt6bnpnVXdO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81RFJjeDB5TmRJL3AvaDZMK2h2WWNQMlhBcDdHajl5ZWNFVFRhZEFqYkw3bE0KRHFKdmcyaGJvR1ZpYXlBcjNtWkJkYkR5Ci0tLS0tRU5EIFBSSVZBVEUgS0VZLS0tLS0K"
23 changes: 23 additions & 0 deletions charts/stress-nonweb/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
21 changes: 21 additions & 0 deletions charts/stress-nonweb/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
apiVersion: v2
name: stress-nonweb
description: A Helm chart for Kubernetes

# To use chart you can use the following commands (small image size is default):
# helm upgrade --install releaseName --set imageSize=small|medium|large --set ingress.url=something.k3s.brokencrystals.nexploit.app . --namespace distributor --wait

type: application

# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
keywords:
- stress-nonweb
version: 1.0.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "1.0.0"
Loading

0 comments on commit bb2d486

Please sign in to comment.