openshift

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StripDefaultRBACFlag        = "strip-default-rbac"
	StripDefaultCABundleFlag    = "strip-default-cabundle"
	StripDefaultPullSecretsFlag = "strip-default-pull-secrets"
	PullSecretReplacementFlag   = "pull-secret-replacement"
	PVCRenameMapFlag            = "pvc-rename-map"
	RegistryReplacementFlag     = "registry-replacement"
)
View Source
const PluginVersion = "v0.1.0"
View Source
const (

	// SCCNamespaceUIDMin is the minimum UID value for OpenShift SCC-injected namespace UID ranges.
	// UIDs >= this value are considered SCC-injected and should be stripped during migration.
	SCCNamespaceUIDMin int64 = 1000000000
)

Variables

This section is empty.

Functions

func StripSecurityContext added in v0.1.1

func StripSecurityContext(u unstructured.Unstructured) (jsonpatch.Patch, error)

StripSecurityContext removes SCC-injected security context values while preserving user-configured values.

Only strips:

  • runAsUser when >= SCCNamespaceUIDMin (SCC-injected namespace UID range)
  • fsGroup when >= SCCNamespaceUIDMin (SCC-injected namespace UID range)
  • seLinuxOptions.level (always SCC-injected)

Preserves all other security context values (capabilities, readOnlyRootFilesystem, etc.)

func UpdateRoleBinding

func UpdateRoleBinding(u unstructured.Unstructured) (jsonpatch.Patch, error)

func UpdateServiceAccount

func UpdateServiceAccount(u unstructured.Unstructured) (jsonpatch.Patch, error)

Types

type OpenShiftTransformPlugin

type OpenShiftTransformPlugin struct {
	Log logrus.FieldLogger
}

OpenShiftTransformPlugin implements transform.Plugin for OpenShift-specific transformations.

func (*OpenShiftTransformPlugin) Metadata

func (*OpenShiftTransformPlugin) Run

type OpenshiftOptionalFields added in v0.1.1

type OpenshiftOptionalFields struct {
	StripDefaultRBAC        bool
	StripDefaultCABundle    bool
	StripDefaultPullSecrets bool
	PullSecretReplacement   map[string]string
	PVCRenameMap            map[string]string
	RegistryReplacement     map[string]string
}

OpenshiftOptionalFields contains the optional configuration fields for OpenShift transformations

func ParseOptionalFields added in v0.1.1

func ParseOptionalFields(extras map[string]string) (OpenshiftOptionalFields, error)

ParseOptionalFields parses the extras map into OpenshiftOptionalFields

Jump to

Keyboard shortcuts

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