Neil Hanlon
4bf6fb6618
* use a flag to determine if we want an RC or not * Convert rldict and sigdict to an AttributeDict to allow access via __getattr__ * add fedora_release variable to configs for controlling icicle templates * build_image.py script to generate per-architecture XML files used by imagefactory * refactor time to call utcnow() once * add jinja types to development dependencies until we move past jinja 2.x * Generate TDL templates per architecture for each image variant on demand * Generate imagefactory and copy commands to execute image build * Refactor Kubernetes job template to be generic for all current jobs
65 lines
1.6 KiB
Cheetah
65 lines
1.6 KiB
Cheetah
---
|
|
apiVersion: batch/v1
|
|
kind: Job
|
|
metadata:
|
|
name: {{ jobname }}-{{ major }}-{{ architecture }}
|
|
namespace: {{ namespace }}
|
|
spec:
|
|
template:
|
|
metadata:
|
|
labels:
|
|
peridot.rockylinux.org/workflow-tolerates-arch: {{ architecture }}
|
|
spec:
|
|
containers:
|
|
- name: {{ jobname }}-{{ major }}-{{ architecture }}
|
|
image: {{ imageName }}
|
|
command: ["/bin/bash", "-c"]
|
|
args:
|
|
- |
|
|
{%- for c in command -%}
|
|
{%- if c is string %}
|
|
{{ c }}
|
|
{%- else %}
|
|
{{ ' '.join(c) }}
|
|
{%- endif %}
|
|
{%- endfor %}
|
|
securityContext:
|
|
runAsUser: 0
|
|
runAsGroup: 0
|
|
privileged: true
|
|
runAsNonRoot: false
|
|
allowPrivilegeEscalation: true
|
|
volumeMounts:
|
|
- mountPath: /etc/resolv.conf
|
|
name: resolv-conf
|
|
- mountPath: /var/lib/mock/
|
|
name: mock
|
|
env:
|
|
- name: AWS_REGION
|
|
value: us-east-2
|
|
- name: AWS_ACCESS_KEY_ID
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: empanadas-s3
|
|
key: ID
|
|
- name: AWS_SECRET_ACCESS_KEY
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: empanadas-s3
|
|
key: SECRET
|
|
tolerations:
|
|
- effect: NoSchedule
|
|
key: peridot.rockylinux.org/workflow-tolerates-arch
|
|
operator: Equal
|
|
value: {{ architecture }}
|
|
restartPolicy: {{ restartPolicy }}
|
|
volumes:
|
|
- name: resolv-conf
|
|
hostPath:
|
|
path: /etc/resolv.conf
|
|
type: File
|
|
- name: mock
|
|
emptyDir: {}
|
|
backoffLimit: {{ backoffLimit }}
|
|
|