-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathContainerfile.bundle
More file actions
46 lines (40 loc) · 2.25 KB
/
Containerfile.bundle
File metadata and controls
46 lines (40 loc) · 2.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# Containerfile for building OLMv0 Bundle image
#
# This Containerfile creates a bundle image containing operator manifests (CSV, CRDs)
# and metadata for deployment via OLMv0 on legacy Kubernetes/OpenShift clusters.
#
# Build command:
# podman build -f Containerfile.bundle -t ghcr.io/stacklok/toolhive-operator-metadata/bundle:v0.6.11 .
#
# Validation command (before build):
# /opt/operator-sdk/bin/operator-sdk --plugins go.kubebuilder.io/v4 bundle validate ./bundle --select-optional suite=operatorframework
#
# Validation command (after build):
# /opt/operator-sdk/bin/operator-sdk --plugins go.kubebuilder.io/v4 bundle validate ghcr.io/stacklok/toolhive-operator-metadata/bundle:v0.6.11
# Use scratch base image for minimal size and security
# Bundle images are data-only (no executables needed)
FROM scratch
# Add bundle directories to standard OLM paths
# /manifests/ contains CSV and CRD YAML files
# /metadata/ contains annotations.yaml with OLM metadata
ADD bundle/manifests /manifests/
ADD bundle/metadata /metadata/
# Required OLM labels for bundle discovery
# These MUST match the annotations in /metadata/annotations.yaml
LABEL operators.operatorframework.io.bundle.mediatype.v1=registry+v1
LABEL operators.operatorframework.io.bundle.manifests.v1=manifests/
LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/
LABEL operators.operatorframework.io.bundle.package.v1=toolhive-operator
LABEL operators.operatorframework.io.bundle.channels.v1=fast
LABEL operators.operatorframework.io.bundle.channel.default.v1=fast
# Optional metadata labels for image documentation and registry display
LABEL org.opencontainers.image.title="ToolHive Operator Bundle"
LABEL org.opencontainers.image.description="OLMv0 Bundle for ToolHive Operator (manages MCP servers and registries)"
LABEL org.opencontainers.image.vendor="Stacklok"
LABEL org.opencontainers.image.source="https://github.com/stacklok/toolhive-operator-metadata"
LABEL org.opencontainers.image.version="v0.6.11"
LABEL org.opencontainers.image.licenses="Apache-2.0"
# OpenShift-specific label indicating supported versions
LABEL com.redhat.openshift.versions="v4.10-v4.19"
# No ENTRYPOINT or CMD needed - this is a data-only image
# OLM reads the bundle metadata and manifests directly from the image filesystem