apiVersion: apps/v1
kind: Deployment
metadata:
  name: fusiion-front
  namespace: fusiion
  labels:
    app: fusiion
    name: fusiion-front
spec:
  replicas: 1
  selector:
    matchLabels:
      app: fusiion
      name: fusiion-front
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 1
  minReadySeconds: 1
  revisionHistoryLimit: 2
  template:
    metadata:
      labels:
        app: fusiion
        name: fusiion-front
    spec:
      containers:
      - name: fusiion-front
        image: fusiion/sii-codelab-chaos-front:latest
        imagePullPolicy: IfNotPresent
        ports:
        - containerPort: 80
      initContainers:
        - name: init
          image: busybox:1.28
          command: ["sh", "-c", "until (nslookup fusiion-authentification-service && nslookup fusiion-gestion-clients-service && nslookup fusiion-gestion-competences-service && nslookup fusiion-gestion-collaborateurs-service && nslookup fusiion-notification-service && nslookup fusiion-statistiques-service && nslookup fusiion-gaming-service); do echo waiting; sleep 1; done;"]