Skip to content

Commit

Permalink
try de changer loadbalancer du back pour clusterip, ajout activation …
Browse files Browse the repository at this point in the history
…logging et monitoring et essais certif SSL
  • Loading branch information
Khagou committed Mar 22, 2024
1 parent 31c7a1d commit 06079b9
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 12 deletions.
22 changes: 11 additions & 11 deletions client/prod-front.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,10 @@ spec:
spec:
containers:
- name: khagu-dev-front
image: "europe-west1-docker.pkg.dev/khagu-devops/khagu-dev-images-registry/khagu-dev-front:1.1.4" # Remplacer par votre repo
image: "europe-west1-docker.pkg.dev/khagu-devops/khagu-dev-images-registry/khagu-dev-front:1.1.5" # Remplacer par votre repo
ports:
- containerPort: 80
- containerPort: 7000
# resources:
# requests:
# memory: "256Mi"
# cpu: "500m"
# limits:
# memory: "512Mi"
# cpu: "1"

# nodeSelector:
# cloud.google.com/gke-nodepool: khagu-dev-pool
---
apiVersion: "autoscaling/v2"
kind: "HorizontalPodAutoscaler"
Expand Down Expand Up @@ -76,6 +66,16 @@ metadata:
kubernetes.io/ingress.class: "gce"
spec:
rules:
- host: www.projet.khagu-dev.fr
http:
paths:
- pathType: Prefix
path: "/"
backend:
service:
name: khagu-dev-front
port:
number: 80
- host: projet.khagu-dev.fr
http:
paths:
Expand Down
2 changes: 1 addition & 1 deletion server/prod-back.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ metadata:
spec:
selector:
app: khagu-dev-back
type: LoadBalancer
type: ClusterIP
ports:
- port: 7000
targetPort: 7000
3 changes: 3 additions & 0 deletions terraform/cluster/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ resource "google_container_cluster" "primary" {
remove_default_node_pool = true # Remove the default node pool
initial_node_count = 1 # Number of nodes in the cluster initially

logging_service = "logging.googleapis.com/kubernetes" # Enable Stackdriver Logging
monitoring_service = "monitoring.googleapis.com/kubernetes" # Enable Stackdriver Monitoring

node_pool_auto_config {
network_tags {
tags = ["foo", "bar"]
Expand Down

0 comments on commit 06079b9

Please sign in to comment.