Files
vshell/openshift/03-buildconfig.yaml
mward4 eab245f61d OpenShift: pull runtime image from the internal ATT GitLab registry
- runtime/03-deployment.yaml: image is now
  att-gitlab.apps.evd.geaerospace.net:5050/att/infrastructure/vshell:latest with
  imagePullSecrets; the internal ImageStream trigger is gone
- runtime/00-serviceaccount.yaml: carries att-gitlab-pull
- runtime/06-att-gitlab-pull-secret.yaml: registry credentials (placeholders)
- cluster/00-insecure-registry.yaml: Image/cluster insecureRegistries entry, the
  cluster-side equivalent of 'podman pull -k'
- 02/03 build manifests marked optional, with the GitLab push-output variant
  documented inline
- openshift/README.md split into run-from-registry and build-in-cluster paths
- all 14 manifests decode cleanly with 'oc create --dry-run=client'
2026-10-05 14:24:29 -04:00

66 lines
2.5 KiB
YAML

# In-cluster build of the VShell image.
#
# OPTIONAL when you already have the image in the internal GitLab registry:
# runtime/03-deployment.yaml pulls
# att-gitlab.apps.evd.geaerospace.net:5050/att/infrastructure/vshell:latest
# so this BuildConfig and 02-vshell-imagestream.yaml are only needed if you want
# OpenShift to build the image too.
#
# The repository vendors the vendor .deb, so the only things the build pod
# fetches from the network are:
# - gitea.milesward.dev (this git repo, authenticated by gitea-vshell-source)
# - registry-1.docker.io (base image ubuntu:24.04)
# - archive.ubuntu.com (apt-get install openssl in the Dockerfile)
# On an air-gapped cluster, mirror ubuntu:24.04 and openssl first; see
# 04-base-imagestream.yaml.
apiVersion: build.openshift.io/v1
kind: BuildConfig
metadata:
name: vshell
namespace: vshell
labels:
app.kubernetes.io/name: vshell
spec:
runPolicy: Serial
source:
type: Git
git:
uri: https://gitea.milesward.dev/mward4/vshell.git
ref: main
sourceSecret:
name: gitea-vshell-source
strategy:
type: Docker
dockerStrategy:
dockerfilePath: Dockerfile
from:
kind: DockerImage
name: docker.io/library/ubuntu:24.04
# Pin the base by digest instead of tag when you need reproducible builds:
# name: docker.io/library/ubuntu@sha256:a60ef8ec184edb5ed91f5983f00261359fb2fe20f603e8d488b9477d32fcad70
# Default: push the build into the in-cluster image stream (02-vshell-imagestream.yaml).
output:
to:
kind: ImageStreamTag
name: vshell:latest
# Alternative: push the build straight to the internal GitLab registry, so the
# Deployment picks it up with imagePullPolicy: Always. Needs push credentials
# on the builder service account, and the nodes must trust the registry
# (cluster/00-insecure-registry.yaml):
# oc create secret docker-registry att-gitlab-push -n vshell \
# --docker-server=att-gitlab.apps.evd.geaerospace.net:5050 \
# --docker-username=<user> --docker-password=<token>
# oc secrets link builder att-gitlab-push -n vshell
# oc patch bc/vshell -n vshell --type=merge -p '{"spec":{"output":{"to":{"kind":"DockerImage","name":"att-gitlab.apps.evd.geaerospace.net:5050/att/infrastructure/vshell:latest"}}}}'
resources:
requests:
cpu: 500m
memory: 1Gi
limits:
cpu: "2"
memory: 4Gi
successfulBuildsHistoryLimit: 5
failedBuildsHistoryLimit: 3
triggers:
- type: ConfigChange