# Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
################################################################################
# IMPORTANT: This Prowjob was generated by running `make prowjobs -C templater`.
# DO NOT EDIT THIS FILE BY HAND! Refer to docs/prowjobs.md for instructions on
# how to add a new Prowjob or update an existing Prowjob.
################################################################################

postsubmits:
  aws/eks-distro:
  - name: dev-release-1-28-postsubmit
    always_run: false
    run_if_changed: "release/1-28/development/RELEASE"
    branches:
    - ^main$
    max_concurrency: 1
    error_on_eviction: true
    cluster: "prow-postsubmits-cluster"
    skip_report: false
    decoration_config:
      timeout: 4h
      gcs_configuration:
        bucket: s3://prowdataclusterstack-316434458-prowbucket7c73355c-1n9f9v93wpjcm
        path_strategy: explicit
      s3_credentials_secret: s3-credentials
    labels:
      image-build: "true"
      disk-usage: "true"
    spec:
      serviceaccountName: postsubmits-build-account
      automountServiceAccountToken: false
      nodeSelector:
        arch: AMD64
      containers:
      - name: build-container
        image: public.ecr.aws/eks-distro-build-tooling/builder-base:standard-875f14aa285cd879ded85d553f44fa919fd962eb.2
        command:
        - bash
        - -c
        - >
          trap 'touch /status/done' EXIT
          &&
          build/lib/buildkit_check.sh
          &&
          if make check-for-supported-release-branch -C $PROJECT_PATH; then ./release/prow.sh; fi
        env:
        - name: PROJECT_PATH
          value: "projects/kubernetes/kubernetes"
        - name: AWS_REGION
          value: "us-east-1"
        - name: ARTIFACT_BUCKET
          value: "eks-d-postsubmit-artifacts"
        - name: RELEASE_BRANCH
          value: "1-28"
        - name: IMAGE_REPO
          value: "public.ecr.aws/h1r8a7l5"
        resources:
          requests:
            memory: "16Gi"
            cpu: "4"
      - name: buildkitd
        image: moby/buildkit:v0.10.5-rootless
        command:
        - sh
        args:
        - /script/entrypoint.sh
        securityContext:
          runAsUser: 1000
          runAsGroup: 1000
        resources:
          requests:
            memory: "2Gi"
            cpu: "1024m"
      - command:
        - sh
        args:
        - /disk-usage-script/entrypoint.sh
        image: public.ecr.aws/amazonlinux/amazonlinux:2
        name: disk-monitor