Skip to content

Commit 42a2f3f

Browse files
committed
deploy and svc
1 parent 4c8c989 commit 42a2f3f

File tree

5 files changed

+121
-3
lines changed

5 files changed

+121
-3
lines changed

charts/waf-multihost/Chart.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ apiVersion: v2
22
name: waf-multihost
33
description: CloudGuard WAF Deployment for multiple hostnames
44
version: 0.1.0
5-
appVersion: "1.0"
5+
appVersion: "1.1"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: waf
5+
spec:
6+
replicas: {{ .Values.replicaCount }} # Adjust the number of replicas as needed
7+
selector:
8+
matchLabels:
9+
app: waf
10+
template:
11+
metadata:
12+
labels:
13+
app: waf
14+
spec:
15+
containers:
16+
- name: cloudguard-appsec-standalone
17+
env:
18+
- name: CPTOKEN
19+
valueFrom:
20+
secretKeyRef:
21+
name: waf
22+
key: cptoken
23+
# securityContext:
24+
# runAsUser: 0
25+
# runAsGroup: 0
26+
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
27+
#image: checkpoint/cloudguard-appsec-standalone:787396
28+
args:
29+
- /cloudguard-appsec-standalone
30+
- --token
31+
- $(CPTOKEN)
32+
- --ignore-all
33+
# env:
34+
# - name: https_proxy
35+
# value: "user:password@Proxy address:port"
36+
ports:
37+
- containerPort: 443 # SSL port
38+
- containerPort: 80 # HTTP port
39+
- containerPort: 8117 # Health-check port
40+
volumeMounts:
41+
- name: certs-volume
42+
mountPath: "/etc/certs"
43+
readOnly: true
44+
# - name: certs
45+
# mountPath: "/etc/certs2/"
46+
imagePullPolicy: Always
47+
livenessProbe:
48+
failureThreshold: 3
49+
httpGet:
50+
path: /
51+
port: 8117
52+
scheme: HTTP
53+
periodSeconds: 20
54+
successThreshold: 1
55+
timeoutSeconds: 10
56+
startupProbe:
57+
failureThreshold: 90
58+
httpGet:
59+
path: /
60+
port: 8117
61+
scheme: HTTP
62+
periodSeconds: 10
63+
successThreshold: 1
64+
timeoutSeconds: 10
65+
terminationMessagePath: /dev/termination-log
66+
terminationMessagePolicy: File
67+
dnsPolicy: ClusterFirst
68+
restartPolicy: Always
69+
#schedulerName: default-scheduler
70+
securityContext: {}
71+
terminationGracePeriodSeconds: 30
72+
volumes:
73+
- name: tls-secret
74+
secret:
75+
secretName: hello-klaud-tls
76+
- name: certs-volume
77+
projected:
78+
sources:
79+
{{- range $host := .Values.certificates.hosts }}
80+
- secret:
81+
name: {{ $.Release.Name }}-{{ $host.hostname | replace "." "-" }}-tls
82+
items:
83+
- key: tls.key
84+
path: {{ $host.hostname }}.key
85+
- key: tls.crt
86+
path: {{ $host.hostname }}.pem
87+
{{- end }}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
apiVersion: v1
2+
kind: Secret
3+
metadata:
4+
name: waf
5+
type: Opaque
6+
stringData:
7+
cptoken: {{ .Values.cptoken }}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
apiVersion: v1
3+
kind: Service
4+
metadata:
5+
name: waf
6+
spec:
7+
selector:
8+
app: waf
9+
ports:
10+
- protocol: TCP
11+
port: 443
12+
name: https
13+
targetPort: 443 # Match the containerPort of the deployed pod
14+
- protocol: TCP
15+
port: 80
16+
name: http
17+
targetPort: 80 # Match the containerPort of the deployed pod
18+
- protocol: TCP
19+
port: 8117
20+
name: health-check
21+
targetPort: 8117 # Match the containerPort of the deployed pod
22+
type: LoadBalancer

charts/waf-multihost/values.yaml

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
replicaCount: 1
1+
replicaCount: 2
22

33
image:
4-
repository: my-app
4+
repository: checkpoint/cloudguard-appsec-standalone
55
tag: "latest"
66

7+
# token of your Docker Single Managed profile
8+
cptoken:
79

810
certificates:
911
issuer: letsencrypt-prod # Your cert-manager issuer

0 commit comments

Comments
 (0)