Compare commits

..

4 Commits

Author SHA1 Message Date
akamai 2aae669515 Merge pull request 'k8s' (#4) from k8s into main
Reviewed-on: #4
2024-04-08 01:02:58 +00:00
akamai c2a16c2802 Merge pull request 'k8s' (#3) from k8s into main
Reviewed-on: #3
2024-04-04 08:00:38 +00:00
akamai 595a1bf3de Merge pull request 'k8s' (#2) from k8s into main
Reviewed-on: #2
2024-04-03 08:20:13 +00:00
akamai 415291ddb3 Merge pull request 'new file: akashop/deployment.yml' (#1) from k8s into main
Reviewed-on: #1
2024-04-01 07:56:55 +00:00
4 changed files with 14 additions and 50 deletions

View File

@ -4,7 +4,7 @@ metadata:
name: wp name: wp
namespace: akashop namespace: akashop
spec: spec:
replicas: 1 replicas: 3
selector: selector:
matchLabels: matchLabels:
app: wp app: wp
@ -19,11 +19,11 @@ spec:
imagePullPolicy: Always imagePullPolicy: Always
resources: resources:
limits: limits:
cpu: "2"
memory: "2Gi"
requests:
cpu: "1" cpu: "1"
memory: "1Gi" memory: "1Gi"
requests:
cpu: "0.5"
memory: "200Mi"
ports: ports:
- name: http - name: http
containerPort: 80 containerPort: 80
@ -41,12 +41,12 @@ spec:
# secretKeyRef: # secretKeyRef:
# name: my-secret # Name of the secret containing the variable # name: my-secret # Name of the secret containing the variable
# key: VAR2_KEY # key: VAR2_KEY
#livenessProbe: livenessProbe:
#httpGet: httpGet:
#path: / path: /
#port: 80 port: 80
#initialDelaySeconds: 5 initialDelaySeconds: 5
#periodSeconds: 10 periodSeconds: 10
volumeMounts: volumeMounts:
- name: wp-data - name: wp-data
mountPath: /var/www/html mountPath: /var/www/html
@ -78,8 +78,8 @@ spec:
imagePullPolicy: Always imagePullPolicy: Always
resources: resources:
limits: limits:
cpu: "2" cpu: "1"
memory: "2Gi" memory: "1Gi"
requests: requests:
cpu: "0.5" cpu: "0.5"
memory: "200Mi" memory: "200Mi"

View File

@ -1,19 +0,0 @@
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: wp-hpa
namespace: akashop
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: wp
minReplicas: 1
maxReplicas: 10
metrics:
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: 50

View File

@ -1,15 +1,3 @@
apiVersion: traefik.io/v1alpha1
kind: Middleware
metadata:
name: akashop-ratelimit
namespace: akashop
spec:
rateLimit:
average: 5
burst: 10
---
apiVersion: traefik.io/v1alpha1 apiVersion: traefik.io/v1alpha1
kind: Middleware kind: Middleware
metadata: metadata:
@ -39,8 +27,7 @@ spec:
- name: wp - name: wp
port: 80 port: 80
middlewares: # middlewares:
- name: akashop-ratelimit
# - name: akashop-redir # - name: akashop-redir
--- ---
@ -69,10 +56,7 @@ spec:
httpOnly: true httpOnly: true
# name: cookie # name: cookie
# secure: true # secure: true
sameSite: strict # sameSite: none
# strategy: RoundRobin # strategy: RoundRobin
# weight: 10 # weight: 10
# nativeLB: true # nativeLB: true
middlewares:
- name: akashop-ratelimit

View File

@ -2,7 +2,6 @@ kind: Deployment
apiVersion: apps/v1 apiVersion: apps/v1
metadata: metadata:
name: traefik-deployment name: traefik-deployment
namespace: traefik
labels: labels:
app: traefik app: traefik