Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var AllowedVersions = sets.New(openmcpv1alpha1.ArchitectureV1, openmcpv1alpha1.ArchitectureV2)
Functions ¶
This section is empty.
Types ¶
type ArchConfig ¶
type ArchConfig struct { // Immutability contains the configuration for the immutability check. Immutability ImmutabilityConfig `json:"immutability"` // APIServer contains the configuration for the APIServer component v1-v2 bridge. APIServer BridgeConfig `json:"apiServer"` // Landscaper contains the configuration for the Landscaper component v1-v2 bridge. Landscaper BridgeConfig `json:"landscaper"` }
func (*ArchConfig) DecideVersion ¶
func (cfg *ArchConfig) DecideVersion(comp components.Component) string
DecideVersion determines the architecture version for a given component. This basically just checks the component's labels for the architecture version label. If the label is missing, the configured default version for the component type is returned. If the component is nil, 'v1' is returned.
func (*ArchConfig) Default ¶
func (cfg *ArchConfig) Default()
func (*ArchConfig) GetBridgeConfigForComponent ¶
func (cfg *ArchConfig) GetBridgeConfigForComponent(compType openmcpv1alpha1.ComponentType) BridgeConfig
GetBridgeConfigForComponent returns the bridge configuration for the given component type. If the component type is not recognized, it returns a default BridgeConfig.
func (*ArchConfig) Validate ¶
func (cfg *ArchConfig) Validate() field.ErrorList
type BridgeConfig ¶
type BridgeConfig struct { // Version specifies the default version of the architecture to use. Version string `json:"version"` // AllowOverride specifies if the used version can be overridden by setting the appropriate label on the resource. AllowOverride bool `json:"allowOverride"` }
func (*BridgeConfig) Default ¶
func (cfg *BridgeConfig) Default()
func (BridgeConfig) IsAllowedVersion ¶
func (cfg BridgeConfig) IsAllowedVersion(version string) bool
IsAllowedVersion returns whether the given version is allowed in the architecture configuration.
type ImmutabilityConfig ¶
type ImmutabilityConfig struct { // PolicyName is the name of the ValidatingAdmissionPolicy and the corresponding ValidatingAdmissionPolicyBinding // that is created to prevent switching between architecture versions. // Defaults to 'mcp-architecture-immutability' if not specified. PolicyName string `json:"policyName"` // Disabled disables the immutability check if set to 'true'. // This will cause the MCP operator to delete any previously (for the purpose of preventing architecture version changes) // created ValidatingAdmissionPolicy and ValidatingAdmissionPolicyBinding. Disabled bool `json:"disabled"` }
func (*ImmutabilityConfig) Default ¶
func (cfg *ImmutabilityConfig) Default()
func (*ImmutabilityConfig) Validate ¶
func (cfg *ImmutabilityConfig) Validate() field.ErrorList
Click to show internal directories.
Click to hide internal directories.