common

package
v0.0.0-...-8d9567e Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OpenShiftBuildFinalizerName   = "operator.openshift.io/openshiftbuilds"
	OpenShiftBuildOperatorCRDName = "openshiftbuilds.operator.openshift.io"
	OpenShiftBuildResourceName    = "cluster"
	OpenShiftBuildNamespaceName   = "openshift-builds"
)
View Source
const (
	ShipwrightBuildOperatorCRDName         = "shipwrightbuilds.operator.shipwright.io"
	ShipwrightBuildManifestPathEnv         = "SHIPWRIGHT_BUILD_MANIFEST_PATH"
	ShipwrightBuildStrategyManifestPathEnv = "SHIPWRIGHT_BUILD_STRATEGY_MANIFEST_PATH"
	ShipwrightWebhookServiceName           = "shp-build-webhook"
	ShipwrightWebhookCertSecretName        = "shipwright-build-webhook-cert"
)

Variables

View Source
var (
	ShipwrightBuildManifestPath         = filepath.Join("config", "shipwright", "build", "release")
	ShipwrightBuildStrategyManifestPath = filepath.Join("config", "shipwright", "build", "strategy")
	ShipwrightBuildCRDNames             = []string{
		"builds.shipwright.io",
		"buildruns.shipwright.io",
		"buildstrategies.shipwright.io",
		"clusterbuildstrategies.shipwright.io",
	}
)
View Source
var (
	CurrentNamespaceName string
)
View Source
var (
	SharedResourceManifestPath = filepath.Join("config", "sharedresource")
)

Functions

func FetchCurrentNamespaceName

func FetchCurrentNamespaceName() string

FetchCurrentNamespaceName returns namespace name by using information stored as file Returns default Openshift Builds namespace on error Refer: https://kubernetes.io/docs/tasks/run-application/access-api-from-pod/#without-using-a-proxy

func InjectAnnotations

func InjectAnnotations(kinds, names []string, annotations map[string]string) manifestival.Transformer

InjectAnnotations is a Manifestival transformer to add given annotations in resources of provided Kinds.

func InjectFinalizer

func InjectFinalizer(finalizer string) manifestival.Transformer

InjectFinalizer appends finalizer to the passed resources metadata.

func IsControlledBy

func IsControlledBy(object client.Object, owner *metav1.OwnerReference) bool

IsControlledBy returns true if the Controller Reference matches the same group, version and kind.

func RemoveRunAsUserRunAsGroup

func RemoveRunAsUserRunAsGroup(object *unstructured.Unstructured) error

RemoveRunAsUserRunAsGroup is a Manifestival transformer function that removes runAsUser and runAsGroup from a Deployment container's security context

Types

This section is empty.

Jump to

Keyboard shortcuts

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