Skip to content

Commit

Permalink
chore: Update resource limits and requests for client-react Deployment
Browse files Browse the repository at this point in the history
- Update the CPU limit to 50m and memory limit to 100Mi for the client-react Deployment in the demo-app namespace.
- Add a new ConfigMap.yaml file for nginx-custom with an index.html file.
- Add a new Deployment.yaml file for nginx-custom in the nginx-demo namespace.
- Add a new Namespace.yaml file for nginx-custom.
- Add a new Service.yaml file for nginx-custom in the nginx-demo namespace.
- Add a new trivy.md file to provide information about Trivy and its installation and uninstallation.
  • Loading branch information
Pradumnasaraf committed Sep 10, 2024
1 parent 24fdbf1 commit 963204b
Show file tree
Hide file tree
Showing 6 changed files with 87 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ spec:
resources:
limits:
memory: 100Mi
cpu: 50m
requests:
cpu: 50m
memory: 100Mi
Expand Down
7 changes: 7 additions & 0 deletions docs/kubernetes/demo-apps/nginx-custom/ConfigMap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: nginx-configmap
data:
index.html: |
<h1> Hello World from ConfigMap </h1>
42 changes: 42 additions & 0 deletions docs/kubernetes/demo-apps/nginx-custom/Deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment
namespace: nginx-demo
spec:
replicas: 3
selector:
matchLabels:
app: nginx-app
template:
metadata:
labels:
app: nginx-app
spec:
containers:
- name: nginx
image: nginx:latest
ports:
- containerPort: 80
resources:
limits:
cpu: 100m
memory: 100Mi
requests:
cpu: 100m
memory: 100Mi
readinessProbe:
failureThreshold: 3
httpGet:
path: /
port: 80
volumeMounts:
- name: html-file
mountPath: /usr/share/nginx/html

volumes:
- name: html-file
configMap:
name: nginx-configmap


4 changes: 4 additions & 0 deletions docs/kubernetes/demo-apps/nginx-custom/Namespace.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
apiVersion: v1
kind: Namespace
metadata:
name: nginx-demo
11 changes: 11 additions & 0 deletions docs/kubernetes/demo-apps/nginx-custom/Service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: v1
kind: Service
metadata:
name: nginx-service-clusterip
namespace: nginx-demo
spec:
selector:
app: nginx-app
ports:
- port: 80
targetPort: 80
22 changes: 22 additions & 0 deletions docs/kubernetes/k8s-resources-type/crds/trivy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
### Trivy

Trivy helps to detect vulnerabilities in your application's dependencies. It is a simple and comprehensive vulnerability scanner for containers and other artifacts.

#### Installation

To install Trivy, you can use the following Helm chart:

```bash
helm repo add aqua https://aquasecurity.github.io/helm-charts/
helm repo update
helm install trivy-operator aqua/trivy-operator --namespace trivy-system --create-namespace --version 0.23.2
```

#### Uninstallation

To uninstall Trivy, you can use the following Helm command:

```bash
helm uninstall trivy-operator --namespace trivy-system
```

0 comments on commit 963204b

Please sign in to comment.