kind: Deployment
apiVersion: apps/v1
metadata:
  annotations:
    deployment.kubernetes.io/revision: '1'
  resourceVersion: '121488'
  name: win-webserver
  uid: 4097dcf0-86a2-45c7-b51b-e67f74fc7d62
  creationTimestamp: '2024-07-01T19:57:08Z'
  generation: 1
  managedFields:
    - manager: kubectl-create
      operation: Update
      apiVersion: apps/v1
      time: '2024-07-01T19:57:08Z'
      fieldsType: FieldsV1
      fieldsV1:
        'f:metadata':
          'f:labels':
            .: {}
            'f:app': {}
        'f:spec':
          'f:progressDeadlineSeconds': {}
          'f:replicas': {}
          'f:revisionHistoryLimit': {}
          'f:selector': {}
          'f:strategy':
            'f:rollingUpdate':
              .: {}
              'f:maxSurge': {}
              'f:maxUnavailable': {}
            'f:type': {}
          'f:template':
            'f:metadata':
              'f:labels':
                .: {}
                'f:app': {}
              'f:name': {}
            'f:spec':
              'f:containers':
                'k:{"name":"win-webserver"}':
                  'f:image': {}
                  'f:terminationMessagePolicy': {}
                  .: {}
                  'f:resources':
                    .: {}
                    'f:limits':
                      .: {}
                      'f:cpu': {}
                      'f:memory': {}
                    'f:requests':
                      .: {}
                      'f:cpu': {}
                      'f:memory': {}
                  'f:command': {}
                  'f:securityContext':
                    .: {}
                    'f:runAsNonRoot': {}
                    'f:windowsOptions':
                      .: {}
                      'f:runAsUserName': {}
                  'f:terminationMessagePath': {}
                  'f:imagePullPolicy': {}
                  'f:name': {}
              'f:dnsPolicy': {}
              'f:tolerations': {}
              'f:restartPolicy': {}
              'f:schedulerName': {}
              'f:nodeSelector': {}
              'f:terminationGracePeriodSeconds': {}
              'f:os':
                .: {}
                'f:name': {}
              'f:securityContext': {}
    - manager: kube-controller-manager
      operation: Update
      apiVersion: apps/v1
      time: '2024-07-01T19:58:11Z'
      fieldsType: FieldsV1
      fieldsV1:
        'f:metadata':
          'f:annotations':
            .: {}
            'f:deployment.kubernetes.io/revision': {}
        'f:status':
          'f:availableReplicas': {}
          'f:conditions':
            .: {}
            'k:{"type":"Available"}':
              .: {}
              'f:lastTransitionTime': {}
              'f:lastUpdateTime': {}
              'f:message': {}
              'f:reason': {}
              'f:status': {}
              'f:type': {}
            'k:{"type":"Progressing"}':
              .: {}
              'f:lastTransitionTime': {}
              'f:lastUpdateTime': {}
              'f:message': {}
              'f:reason': {}
              'f:status': {}
              'f:type': {}
          'f:observedGeneration': {}
          'f:readyReplicas': {}
          'f:replicas': {}
          'f:updatedReplicas': {}
      subresource: status
  namespace: win-webserver
  labels:
    app: win-webserver
spec:
  replicas: 2
  selector:
    matchLabels:
      app: win-webserver
  template:
    metadata:
      name: win-webserver
      creationTimestamp: null
      labels:
        app: win-webserver
    spec:
      nodeSelector:
        kubernetes.io/os: windows
      restartPolicy: Always
      os:
        name: windows
      schedulerName: default-scheduler
      terminationGracePeriodSeconds: 30
      securityContext: {}
      containers:
        - name: win-webserver
          image: 'mcr.microsoft.com/powershell:lts-nanoserver-ltsc2022'
          command:
            - pwsh.exe
            - '-command'
            - '$listener = New-Object System.Net.HttpListener; $listener.Prefixes.Add(''http://*:80/''); $listener.Start();Write-Host(''Listening at http://*:80/''); while ($listener.IsListening) { $context = $listener.GetContext(); $response = $context.Response; $content=''<html><body><H1>Red Hat OpenShift </br> Windows Container workload running in GCP</H1></body></html>''; $buffer = [System.Text.Encoding]::UTF8.GetBytes($content); $response.ContentLength64 = $buffer.Length; $response.OutputStream.Write($buffer, 0, $buffer.Length); $response.Close(); };'
          resources:
            limits:
              cpu: '1'
              memory: 512Mi
            requests:
              cpu: 500m
              memory: 512Mi
          terminationMessagePath: /dev/termination-log
          terminationMessagePolicy: File
          imagePullPolicy: IfNotPresent
          securityContext:
            windowsOptions:
              runAsUserName: ContainerAdministrator
            runAsNonRoot: false
      dnsPolicy: ClusterFirst
      tolerations:
        - key: os
          value: Windows
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxUnavailable: 25%
      maxSurge: 25%
  revisionHistoryLimit: 10
  progressDeadlineSeconds: 600
status:
  observedGeneration: 1
  replicas: 2
  updatedReplicas: 2
  readyReplicas: 2
  availableReplicas: 2
  conditions:
    - type: Available
      status: 'True'
      lastUpdateTime: '2024-07-01T19:58:11Z'
      lastTransitionTime: '2024-07-01T19:58:11Z'
      reason: MinimumReplicasAvailable
      message: Deployment has minimum availability.
    - type: Progressing
      status: 'True'
      lastUpdateTime: '2024-07-01T19:58:11Z'
      lastTransitionTime: '2024-07-01T19:57:08Z'
      reason: NewReplicaSetAvailable
      message: ReplicaSet "win-webserver-6b89ff7ff" has successfully progressed.
