diff --git a/charts/cdefense/templates/ai/deployment.yaml b/charts/cdefense/templates/ai/deployment.yaml index 8a3dbb9..5218680 100644 --- a/charts/cdefense/templates/ai/deployment.yaml +++ b/charts/cdefense/templates/ai/deployment.yaml @@ -34,6 +34,20 @@ spec: - name: frontend image: {{ .Values.ai.image }}:{{ .Values.version }} imagePullPolicy: Always + livenessProbe: + tcpSocket: + port: 8084 + initialDelaySeconds: 15 + periodSeconds: 15 + failureThreshold: 10 + successThreshold: 1 + readinessProbe: + tcpSocket: + port: 8084 + initialDelaySeconds: 20 + periodSeconds: 15 + failureThreshold: 10 + successThreshold: 1 resources: requests: memory: {{ .Values.ai.resources.requests.memory}} diff --git a/charts/cdefense/templates/alertservice/deployment.yaml b/charts/cdefense/templates/alertservice/deployment.yaml index 0a063d6..6a6af2d 100644 --- a/charts/cdefense/templates/alertservice/deployment.yaml +++ b/charts/cdefense/templates/alertservice/deployment.yaml @@ -53,6 +53,20 @@ spec: configMapKeyRef: name: cdefense-config key: CLOUDDEFENSE_BASE_URL + livenessProbe: + tcpSocket: + port: 8080 + initialDelaySeconds: 20 + periodSeconds: 15 + failureThreshold: 10 + successThreshold: 1 + readinessProbe: + tcpSocket: + port: 8080 + initialDelaySeconds: 25 + periodSeconds: 15 + failureThreshold: 10 + successThreshold: 1 # resources: # requests: # memory: "0.5G" diff --git a/charts/cdefense/templates/alertservice/service.yaml b/charts/cdefense/templates/alertservice/service.yaml new file mode 100644 index 0000000..57c91e6 --- /dev/null +++ b/charts/cdefense/templates/alertservice/service.yaml @@ -0,0 +1,15 @@ +{{ if .Values.alertservice.enabled }} +--- +apiVersion: v1 +kind: Service +metadata: + name: alertservice + labels: + app: alertservice +spec: + type: {{ .Values.alertservice.service.type }} + selector: + app: alertservice + ports: + {{- .Values.alertservice.service.ports | toYaml | nindent 2 -}} +{{ end }} diff --git a/charts/cdefense/templates/api/deployment.yaml b/charts/cdefense/templates/api/deployment.yaml index 66544bb..d2bb21b 100644 --- a/charts/cdefense/templates/api/deployment.yaml +++ b/charts/cdefense/templates/api/deployment.yaml @@ -280,6 +280,20 @@ spec: key: ONLINE_SCAN_POOL_SIZE ports: - containerPort: 8080 + livenessProbe: + tcpSocket: + port: 8080 + initialDelaySeconds: 30 + periodSeconds: 15 + failureThreshold: 10 + successThreshold: 1 + readinessProbe: + tcpSocket: + port: 8080 + initialDelaySeconds: 35 + periodSeconds: 15 + failureThreshold: 10 + successThreshold: 1 # resources: # requests: # memory: "1G" diff --git a/charts/cdefense/templates/authservice/deployment.yaml b/charts/cdefense/templates/authservice/deployment.yaml index b6906ed..ba35329 100644 --- a/charts/cdefense/templates/authservice/deployment.yaml +++ b/charts/cdefense/templates/authservice/deployment.yaml @@ -184,6 +184,20 @@ spec: key: HASURA_GRAPHQL_ADMIN_SECRET ports: - containerPort: 8080 + livenessProbe: + tcpSocket: + port: 8080 + initialDelaySeconds: 60 + periodSeconds: 15 + failureThreshold: 10 + successThreshold: 1 + readinessProbe: + tcpSocket: + port: 8080 + initialDelaySeconds: 70 + periodSeconds: 15 + failureThreshold: 10 + successThreshold: 1 # resources: # requests: # memory: "2G" diff --git a/charts/cdefense/templates/keycloak/statefulset.yaml b/charts/cdefense/templates/keycloak/statefulset.yaml index fde2716..e4c354b 100644 --- a/charts/cdefense/templates/keycloak/statefulset.yaml +++ b/charts/cdefense/templates/keycloak/statefulset.yaml @@ -160,6 +160,20 @@ spec: optional: true ports: - containerPort: 8080 + livenessProbe: + tcpSocket: + port: 8080 + initialDelaySeconds: 35 + periodSeconds: 15 + failureThreshold: 10 + successThreshold: 1 + readinessProbe: + tcpSocket: + port: 8080 + initialDelaySeconds: 40 + periodSeconds: 15 + failureThreshold: 10 + successThreshold: 1 # resources: # requests: # memory: "0.5G" diff --git a/charts/cdefense/templates/newapi/deployment.yaml b/charts/cdefense/templates/newapi/deployment.yaml index 6e552b1..b337b54 100644 --- a/charts/cdefense/templates/newapi/deployment.yaml +++ b/charts/cdefense/templates/newapi/deployment.yaml @@ -62,6 +62,20 @@ spec: key: OUTSIDE ports: - containerPort: 8080 + livenessProbe: + tcpSocket: + port: 8080 + initialDelaySeconds: 35 + periodSeconds: 15 + failureThreshold: 10 + successThreshold: 1 + readinessProbe: + tcpSocket: + port: 8080 + initialDelaySeconds: 40 + periodSeconds: 15 + failureThreshold: 10 + successThreshold: 1 # resources: # requests: # memory: "0.5G" diff --git a/charts/cdefense/templates/web/deployment.yaml b/charts/cdefense/templates/web/deployment.yaml index 395d37e..e9597dd 100644 --- a/charts/cdefense/templates/web/deployment.yaml +++ b/charts/cdefense/templates/web/deployment.yaml @@ -82,6 +82,15 @@ spec: - "80" periodSeconds: 30 timeoutSeconds: 3 + readinessProbe: + exec: + command: + - nc + - -z + - 127.0.0.1 + - "80" + periodSeconds: 30 + timeoutSeconds: 3 ports: - containerPort: 80 # resources: