feat: tp4 testing deployments
This commit is contained in:
parent
e38a775057
commit
1fef95a37f
11 changed files with 301 additions and 0 deletions
6
.idea/vcs.xml
generated
Normal file
6
.idea/vcs.xml
generated
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="VcsDirectoryMappings">
|
||||||
|
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
4
tp4/kustomization.yaml
Normal file
4
tp4/kustomization.yaml
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
namespace: tp4
|
||||||
|
resources:
|
||||||
|
- sae5dc03-deployment.yaml
|
||||||
|
- sae5dc03-service.yaml
|
||||||
42
tp4/sae5dc03-deployment-blue.yaml
Normal file
42
tp4/sae5dc03-deployment-blue.yaml
Normal file
|
|
@ -0,0 +1,42 @@
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: sae5dc03
|
||||||
|
namespace: tp4
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: sae5dc03
|
||||||
|
env: blue
|
||||||
|
replicas: 10
|
||||||
|
strategy:
|
||||||
|
type: Recreate
|
||||||
|
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: sae5dc03
|
||||||
|
env: blue
|
||||||
|
version: v2
|
||||||
|
annotations:
|
||||||
|
prometheus.io/scrape: "true"
|
||||||
|
prometheus.io/port: "5000"
|
||||||
|
prometheus.io/scheme: "http"
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: sae5dc03
|
||||||
|
image: iut1r-registry.univ-grenoble-alpes.fr/but/sae5dc03:v2
|
||||||
|
imagePullPolicy: Always
|
||||||
|
|
||||||
|
# La configuration readinessProbe permet de vérifier si l'application est prête à recevoir le traffic
|
||||||
|
# Ici, nous la configurons pour accéder à la route /readiness qui ne fait que renvoyer un code 200,
|
||||||
|
# mais qui n'est pas considéré dans les mesures de traffic dans Grafana
|
||||||
|
# le délai de 10s permet (en particulier dans le cas de la stratégie RollingUpdate) de temporiser la
|
||||||
|
# disponibilité de l'application.
|
||||||
|
readinessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /readiness
|
||||||
|
port: 5000
|
||||||
|
initialDelaySeconds: 10
|
||||||
|
periodSeconds: 5
|
||||||
|
restartPolicy: Always
|
||||||
40
tp4/sae5dc03-deployment-canary.yaml
Normal file
40
tp4/sae5dc03-deployment-canary.yaml
Normal file
|
|
@ -0,0 +1,40 @@
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: sae5dc03-canari
|
||||||
|
namespace: tp4
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: sae5dc03
|
||||||
|
replicas: 1
|
||||||
|
strategy:
|
||||||
|
type: Recreate
|
||||||
|
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: sae5dc03
|
||||||
|
version: v2
|
||||||
|
annotations:
|
||||||
|
prometheus.io/scrape: "true"
|
||||||
|
prometheus.io/port: "5000"
|
||||||
|
prometheus.io/scheme: "http"
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: sae5dc03
|
||||||
|
image: iut1r-registry.univ-grenoble-alpes.fr/but/sae5dc03:v2
|
||||||
|
imagePullPolicy: Always
|
||||||
|
|
||||||
|
# La configuration readinessProbe permet de vérifier si l'application est prête à recevoir le traffic
|
||||||
|
# Ici, nous la configurons pour accéder à la route /readiness qui ne fait que renvoyer un code 200,
|
||||||
|
# mais qui n'est pas considéré dans les mesures de traffic dans Grafana
|
||||||
|
# le délai de 10s permet (en particulier dans le cas de la stratégie RollingUpdate) de temporiser la
|
||||||
|
# disponibilité de l'application.
|
||||||
|
readinessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /readiness
|
||||||
|
port: 5000
|
||||||
|
initialDelaySeconds: 10
|
||||||
|
periodSeconds: 5
|
||||||
|
restartPolicy: Always
|
||||||
42
tp4/sae5dc03-deployment-green.yaml
Normal file
42
tp4/sae5dc03-deployment-green.yaml
Normal file
|
|
@ -0,0 +1,42 @@
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: sae5dc03-green
|
||||||
|
namespace: tp4
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: sae5dc03
|
||||||
|
env: green
|
||||||
|
replicas: 10
|
||||||
|
strategy:
|
||||||
|
type: Recreate
|
||||||
|
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: sae5dc03
|
||||||
|
env: green
|
||||||
|
version: v1
|
||||||
|
annotations:
|
||||||
|
prometheus.io/scrape: "true"
|
||||||
|
prometheus.io/port: "5000"
|
||||||
|
prometheus.io/scheme: "http"
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: sae5dc03
|
||||||
|
image: iut1r-registry.univ-grenoble-alpes.fr/but/sae5dc03:v1
|
||||||
|
imagePullPolicy: Always
|
||||||
|
|
||||||
|
# La configuration readinessProbe permet de vérifier si l'application est prête à recevoir le traffic
|
||||||
|
# Ici, nous la configurons pour accéder à la route /readiness qui ne fait que renvoyer un code 200,
|
||||||
|
# mais qui n'est pas considéré dans les mesures de traffic dans Grafana
|
||||||
|
# le délai de 10s permet (en particulier dans le cas de la stratégie RollingUpdate) de temporiser la
|
||||||
|
# disponibilité de l'application.
|
||||||
|
readinessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /readiness
|
||||||
|
port: 5000
|
||||||
|
initialDelaySeconds: 10
|
||||||
|
periodSeconds: 5
|
||||||
|
restartPolicy: Always
|
||||||
40
tp4/sae5dc03-deployment-recreate.yaml
Normal file
40
tp4/sae5dc03-deployment-recreate.yaml
Normal file
|
|
@ -0,0 +1,40 @@
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: sae5dc03
|
||||||
|
namespace: tp4
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: sae5dc03
|
||||||
|
replicas: 10
|
||||||
|
strategy:
|
||||||
|
type: Recreate
|
||||||
|
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: sae5dc03
|
||||||
|
version: v2
|
||||||
|
annotations:
|
||||||
|
prometheus.io/scrape: "true"
|
||||||
|
prometheus.io/port: "5000"
|
||||||
|
prometheus.io/scheme: "http"
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: sae5dc03
|
||||||
|
image: iut1r-registry.univ-grenoble-alpes.fr/but/sae5dc03:v2
|
||||||
|
imagePullPolicy: Always
|
||||||
|
|
||||||
|
# La configuration readinessProbe permet de vérifier si l'application est prête à recevoir le traffic
|
||||||
|
# Ici, nous la configurons pour accéder à la route /readiness qui ne fait que renvoyer un code 200,
|
||||||
|
# mais qui n'est pas considéré dans les mesures de traffic dans Grafana
|
||||||
|
# le délai de 10s permet (en particulier dans le cas de la stratégie RollingUpdate) de temporiser la
|
||||||
|
# disponibilité de l'application.
|
||||||
|
readinessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /readiness
|
||||||
|
port: 5000
|
||||||
|
initialDelaySeconds: 10
|
||||||
|
periodSeconds: 5
|
||||||
|
restartPolicy: Always
|
||||||
43
tp4/sae5dc03-deployment-rollingupdate.yaml
Normal file
43
tp4/sae5dc03-deployment-rollingupdate.yaml
Normal file
|
|
@ -0,0 +1,43 @@
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: sae5dc03
|
||||||
|
namespace: tp4
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: sae5dc03
|
||||||
|
replicas: 10
|
||||||
|
strategy:
|
||||||
|
type: RollingUpdate
|
||||||
|
rollingUpdate:
|
||||||
|
maxSurge: 1
|
||||||
|
maxUnavailable: 0
|
||||||
|
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: sae5dc03
|
||||||
|
version: v2
|
||||||
|
annotations:
|
||||||
|
prometheus.io/scrape: "true"
|
||||||
|
prometheus.io/port: "5000"
|
||||||
|
prometheus.io/scheme: "http"
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: sae5dc03
|
||||||
|
image: iut1r-registry.univ-grenoble-alpes.fr/but/sae5dc03:v2
|
||||||
|
imagePullPolicy: Always
|
||||||
|
|
||||||
|
# La configuration readinessProbe permet de vérifier si l'application est prête à recevoir le traffic
|
||||||
|
# Ici, nous la configurons pour accéder à la route /readiness qui ne fait que renvoyer un code 200,
|
||||||
|
# mais qui n'est pas considéré dans les mesures de traffic dans Grafana
|
||||||
|
# le délai de 10s permet (en particulier dans le cas de la stratégie RollingUpdate) de temporiser la
|
||||||
|
# disponibilité de l'application.
|
||||||
|
readinessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /readiness
|
||||||
|
port: 5000
|
||||||
|
initialDelaySeconds: 30
|
||||||
|
periodSeconds: 5
|
||||||
|
restartPolicy: Always
|
||||||
40
tp4/sae5dc03-deployment.yaml
Normal file
40
tp4/sae5dc03-deployment.yaml
Normal file
|
|
@ -0,0 +1,40 @@
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: sae5dc03
|
||||||
|
namespace: tp4
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: sae5dc03
|
||||||
|
replicas: 10
|
||||||
|
strategy:
|
||||||
|
type: Recreate
|
||||||
|
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: sae5dc03
|
||||||
|
version: v1
|
||||||
|
annotations:
|
||||||
|
prometheus.io/scrape: "true"
|
||||||
|
prometheus.io/port: "5000"
|
||||||
|
prometheus.io/scheme: "http"
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: sae5dc03
|
||||||
|
image: iut1r-registry.univ-grenoble-alpes.fr/but/sae5dc03:v1
|
||||||
|
imagePullPolicy: Always
|
||||||
|
|
||||||
|
# La configuration readinessProbe permet de vérifier si l'application est prête à recevoir le traffic
|
||||||
|
# Ici, nous la configurons pour accéder à la route /readiness qui ne fait que renvoyer un code 200,
|
||||||
|
# mais qui n'est pas considéré dans les mesures de traffic dans Grafana
|
||||||
|
# le délai de 10s permet (en particulier dans le cas de la stratégie RollingUpdate) de temporiser la
|
||||||
|
# disponibilité de l'application.
|
||||||
|
readinessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /readiness
|
||||||
|
port: 5000
|
||||||
|
initialDelaySeconds: 10
|
||||||
|
periodSeconds: 5
|
||||||
|
restartPolicy: Always
|
||||||
15
tp4/sae5dc03-service-prod.yaml
Normal file
15
tp4/sae5dc03-service-prod.yaml
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: sae5dc03
|
||||||
|
namespace: tp4
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
app: sae5dc03
|
||||||
|
env: blue
|
||||||
|
type: NodePort
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
port: 8080
|
||||||
|
targetPort: 5000
|
||||||
|
nodePort: 30480
|
||||||
15
tp4/sae5dc03-service-test.yaml
Normal file
15
tp4/sae5dc03-service-test.yaml
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: sae5dc03
|
||||||
|
namespace: tp4
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
app: sae5dc03
|
||||||
|
env: blue
|
||||||
|
type: NodePort
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
port: 8090
|
||||||
|
targetPort: 5000
|
||||||
|
nodePort: 30490
|
||||||
14
tp4/sae5dc03-service.yaml
Normal file
14
tp4/sae5dc03-service.yaml
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: sae5dc03
|
||||||
|
namespace: tp4
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
app: sae5dc03
|
||||||
|
type: NodePort
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
port: 8080
|
||||||
|
targetPort: 5000
|
||||||
|
nodePort: 30480
|
||||||
Loading…
Add table
Add a link
Reference in a new issue