-
-
Notifications
You must be signed in to change notification settings - Fork 675
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Update resource limits and requests for client-react Deployment
- 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
1 parent
24fdbf1
commit 963204b
Showing
6 changed files
with
87 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,6 +29,7 @@ spec: | |
resources: | ||
limits: | ||
memory: 100Mi | ||
cpu: 50m | ||
requests: | ||
cpu: 50m | ||
memory: 100Mi | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
apiVersion: v1 | ||
kind: Namespace | ||
metadata: | ||
name: nginx-demo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
``` | ||
|