s2i

package
v0.47.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 16, 2025 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultName = builders.S2I

DefaultName when no WithName option is provided to NewBuilder

View Source
const GoAssembler = `` /* 1086-byte string literal not displayed */

GoAssembler

Adapted from /usr/libexec/s2i/assemble within the UBI-8 go-toolchain such that the "go build" command builds subdirectory .s2i/builds/last (where main resides) rather than the root.

View Source
const PythonAssembler = `` /* 4893-byte string literal not displayed */

PythonAssembler

Adapted from /usr/libexec/s2i/assemble within the UBI-8 python-toolchain such that the the script executes from subdirectory .s2i/builds/last (where main resides) rather than the root, and indicates the main is likewise in .s2i/builds/last/service/main.py via Procfile. See the comment inline on line 50 of the script for where the directory change instruction was added.

Variables

View Source
var DefaultBuilderImages = map[string]string{
	"go":         DefaultGoBuilder,
	"node":       DefaultNodeBuilder,
	"nodejs":     DefaultNodeBuilder,
	"python":     DefaultPythonBuilder,
	"quarkus":    DefaultQuarkusBuilder,
	"typescript": DefaultNodeBuilder,
}

DefaultBuilderImages for s2i builders indexed by Runtime Language

View Source
var DefaultGoBuilder = "registry.access.redhat.com/ubi8/go-toolset"
View Source
var DefaultNodeBuilder = "registry.access.redhat.com/ubi8/nodejs-20-minimal"
View Source
var DefaultPythonBuilder = "registry.access.redhat.com/ubi8/python-39"
View Source
var DefaultQuarkusBuilder = "registry.access.redhat.com/ubi8/openjdk-21"

Functions

func BuilderImage

func BuilderImage(f fn.Function, builderName string) (string, error)

Builder Image chooses the correct builder image or defaults.

Types

type Builder

type Builder struct {
	// contains filtered or unexported fields
}

Builder of functions using the s2i subsystem.

func NewBuilder

func NewBuilder(options ...Option) *Builder

NewBuilder creates a new instance of a Builder with static defaults.

func (*Builder) Build

func (b *Builder) Build(ctx context.Context, f fn.Function, platforms []fn.Platform) (err error)

Build the function using the S2I builder.

Platforms: The S2I builder supports at most a single platform to target, and the platform specified must be available in the provided builder image. If the provided builder image is not a multi-architecture image index container, specifying a target platform is redundant, so if provided it must match that of the single-architecture container or the request is invalid.

type Option

type Option func(*Builder)

func WithDockerClient

func WithDockerClient(cli s2idocker.Client) Option

func WithImpl

func WithImpl(s build.Builder) Option

WithImpl sets an optional S2I Builder implementation override to use in place of what will be generated by the S2I build "strategy" system based on the config. Used for mocking the implementation during tests.

func WithName

func WithName(n string) Option

func WithVerbose

func WithVerbose(v bool) Option

WithVerbose toggles verbose logging.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL