1

我的 Zalenium 部署在 Kubernetes 中。我已经设置了选项 desiredContainers = 2 并且它正在工作。但有时所需的容器不可用。测试工作正常,即使所需的容器不可用。在“重新启动”容器出现后,但我不知道为什么它们有时会消失。有谁知道发生了什么?

kind: Deployment
apiVersion: extensions/v1beta1
metadata:
  name: zalenium
  namespace: zalenium-omdc
  selfLink: /apis/extensions/v1beta1/namespaces/zalenium-omdc/deployments/zalenium
  uid: cbafe254-3e28-4889-a09e-ccfa500ff628
  resourceVersion: '25201258'
  generation: 24
  creationTimestamp: '2019-09-17T13:24:52Z'
  labels:
    app: zalenium
    instance: zalenium
  annotations:
    deployment.kubernetes.io/revision: '24'
    kubectl.kubernetes.io/last-applied-configuration: >
      {"apiVersion":"apps/v1","kind":"Deployment","metadata":{"annotations":{},"labels":{"app":"zalenium","instance":"zalenium"},"name":"zalenium","namespace":"zalenium-omdc"},"spec":{"replicas":1,"selector":{"matchLabels":{"instance":"zalenium"}},"template":{"metadata":{"labels":{"app":"zalenium","instance":"zalenium"}},"spec":{"containers":[{"args":["start"],"env":[{"name":"ZALENIUM_KUBERNETES_CPU_REQUEST","value":"250m"},{"name":"ZALENIUM_KUBERNETES_CPU_LIMIT","value":"1000m"},{"name":"ZALENIUM_KUBERNETES_MEMORY_REQUEST","value":"500Mi"},{"name":"ZALENIUM_KUBERNETES_MEMORY_LIMIT","value":"2Gi"},{"name":"DESIRED_CONTAINERS","value":"2"},{"name":"MAX_DOCKER_SELENIUM_CONTAINERS","value":"16"},{"name":"SELENIUM_IMAGE_NAME","value":"elgalu/selenium"},{"name":"VIDEO_RECORDING_ENABLED","value":"true"},{"name":"SCREEN_WIDTH","value":"1440"},{"name":"SCREEN_HEIGHT","value":"900"},{"name":"MAX_TEST_SESSIONS","value":"1"},{"name":"NEW_SESSION_WAIT_TIMEOUT","value":"1800000"},{"name":"DEBUG_ENABLED","value":"false"},{"name":"SEND_ANONYMOUS_USAGE_INFO","value":"true"},{"name":"TZ","value":"UTC"},{"name":"KEEP_ONLY_FAILED_TESTS","value":"false"},{"name":"RETENTION_PERIOD","value":"3"}],"image":"dosel/zalenium:3","imagePullPolicy":"IfNotPresent","livenessProbe":{"httpGet":{"path":"/status","port":4444},"initialDelaySeconds":90,"periodSeconds":5,"timeoutSeconds":1},"name":"zalenium","ports":[{"containerPort":4444,"protocol":"TCP"}],"readinessProbe":{"httpGet":{"path":"/status","port":4444},"timeoutSeconds":1},"resources":{"requests":{"cpu":"500m","memory":"500Mi"}},"volumeMounts":[{"mountPath":"/home/seluser/videos","name":"zalenium-videos"},{"mountPath":"/tmp/mounted","name":"zalenium-data"}]}],"serviceAccountName":"zalenium","volumes":[{"emptyDir":{},"name":"zalenium-videos"},{"emptyDir":{},"name":"zalenium-data"}]}}}}
spec:
  replicas: 1
  selector:
    matchLabels:
      instance: zalenium
  template:
    metadata:
      creationTimestamp: null
      labels:
        app: zalenium
        instance: zalenium
    spec:
      volumes:
        - name: zalenium-videos
          emptyDir: {}
        - name: zalenium-data
          emptyDir: {}
      containers:
        - name: zalenium
          image: 'dosel/zalenium:3'
          args:
            - start
          ports:
            - containerPort: 4444
              protocol: TCP
          env:
            - name: ZALENIUM_KUBERNETES_CPU_REQUEST
              value: 250m
            - name: ZALENIUM_KUBERNETES_CPU_LIMIT
              value: 1000m
            - name: ZALENIUM_KUBERNETES_MEMORY_REQUEST
              value: 500Mi
            - name: ZALENIUM_KUBERNETES_MEMORY_LIMIT
              value: 2Gi
            - name: DESIRED_CONTAINERS
              value: '2'
            - name: MAX_DOCKER_SELENIUM_CONTAINERS
              value: '16'
            - name: SELENIUM_IMAGE_NAME
              value: elgalu/selenium
            - name: VIDEO_RECORDING_ENABLED
              value: 'false'
            - name: SCREEN_WIDTH
              value: '1920'
            - name: SCREEN_HEIGHT
              value: '1080'
            - name: MAX_TEST_SESSIONS
              value: '1'
            - name: NEW_SESSION_WAIT_TIMEOUT
              value: '7200000'
            - name: DEBUG_ENABLED
              value: 'false'
            - name: SEND_ANONYMOUS_USAGE_INFO
              value: 'true'
            - name: TZ
              value: UTC
            - name: KEEP_ONLY_FAILED_TESTS
              value: 'false'
            - name: RETENTION_PERIOD
              value: '3'
            - name: SEL_BROWSER_TIMEOUT_SECS
              value: '7200'
            - name: BROWSER_STACK_WAIT_TIMEOUT
              value: 120m
          resources:
            limits:
              memory: 1Gi
            requests:
              cpu: 500m
              memory: 500Mi
          volumeMounts:
            - name: zalenium-videos
              mountPath: /home/seluser/videos
            - name: zalenium-data
              mountPath: /tmp/mounted
          livenessProbe:
            httpGet:
              path: /status
              port: 4444
              scheme: HTTP
            initialDelaySeconds: 90
            timeoutSeconds: 1
            periodSeconds: 5
            successThreshold: 1
            failureThreshold: 3
          readinessProbe:
            httpGet:
              path: /status
              port: 4444
              scheme: HTTP
            timeoutSeconds: 1
            periodSeconds: 10
            successThreshold: 1
            failureThreshold: 3
          terminationMessagePath: /dev/termination-log
          terminationMessagePolicy: File
          imagePullPolicy: IfNotPresent
      restartPolicy: Always
      terminationGracePeriodSeconds: 30
      dnsPolicy: ClusterFirst
      nodeSelector:
        dedicated: omdc
      serviceAccountName: zalenium
      serviceAccount: zalenium
      securityContext: {}
      affinity:
        nodeAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
            nodeSelectorTerms:
              - matchExpressions:
                  - key: dedicated
                    operator: In
                    values:
                      - omdc
      schedulerName: default-scheduler
      tolerations:
        - key: dedicated
          operator: Equal
          value: omdc
          effect: NoSchedule
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxUnavailable: 25%
      maxSurge: 25%
  revisionHistoryLimit: 10
  progressDeadlineSeconds: 600
status:
  observedGeneration: 24
  replicas: 1
  updatedReplicas: 1
  readyReplicas: 1
  availableReplicas: 1
  conditions:
    - type: Available
      status: 'True'
      lastUpdateTime: '2019-10-22T06:57:52Z'
      lastTransitionTime: '2019-10-22T06:57:52Z'
      reason: MinimumReplicasAvailable
      message: Deployment has minimum availability.
    - type: Progressing
      status: 'True'
      lastUpdateTime: '2019-10-31T09:14:01Z'
      lastTransitionTime: '2019-09-17T13:24:52Z'
      reason: NewReplicaSetAvailable
      message: ReplicaSet "zalenium-6df85c7f49" has successfully progressed.
4

0 回答 0