Documentation
¶
Index ¶
- Constants
- Variables
- func APIVersionOption(version APIVersion) string
- func Must[T any](v T, err error) T
- func ResourceTypeEqual(lhs, rhs azcorearm.ResourceType) bool
- type APIVersion
- type ClusterImageRegistryState
- type CryptoRestrictions
- type CustomerManagedEncryptionType
- type DiskStorageAccountType
- type Effect
- type EtcdDataEncryptionKeyManagementModeType
- type ExternalAuthClientType
- type IngressType
- type InternalID
- func (id *InternalID) ClusterID() string
- func (in *InternalID) DeepCopy() *InternalID
- func (in *InternalID) DeepCopyInto(out *InternalID)
- func (id *InternalID) ID() string
- func (id *InternalID) Kind() string
- func (id InternalID) MarshalText() ([]byte, error)
- func (id *InternalID) Path() string
- func (id *InternalID) String() string
- func (id *InternalID) UnmarshalText(text []byte) error
- type KeyVaultVisibility
- type MirrorSourcePolicy
- type NetworkType
- type ObjectMetadata
- type OsDiskType
- type OutboundType
- type TokenValidationRuleType
- type UsernameClaimPrefixPolicy
- type Visibility
Constants ¶
const ( // FeatureExperimentalReleaseFeatures is the subscription-level AFEC that gates all // tag-based experimental features. When registered, per-resource tags in the // "aro-hcp.experimental.*" namespace are honored. Without this AFEC, experimental // tags are ignored. FeatureExperimentalReleaseFeatures = "microsoft.redhatopenshift/experimentalreleasefeatures" // ExperimentalClusterTagPrefix is the prefix for all experimental cluster // tags. Tags with this prefix are only honored when the // ExperimentalReleaseFeatures AFEC is registered. Unrecognized tags // with this prefix are rejected. // // Azure ARM tag names must not contain: < > % & \ ? / // The Azure Portal additionally rejects: * : + // Tags starting with "microsoft", "azure", "windows", or "hidden-" // are reserved. Names are limited to 512 characters (128 for storage // accounts). See https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/tag-resources ExperimentalClusterTagPrefix = "aro-hcp.experimental.cluster." // TagClusterSingleReplica is the ARM resource tag that enables // single-replica control plane components when the // ExperimentalReleaseFeatures AFEC is registered on the subscription. TagClusterSingleReplica = ExperimentalClusterTagPrefix + "single-replica" // TagClusterSizeOverride is the ARM resource tag that enables the // ClusterSizeOverride annotation for reduced resource requests when the // ExperimentalReleaseFeatures AFEC is registered on the subscription. TagClusterSizeOverride = ExperimentalClusterTagPrefix + "size-override" // TagClusterDisableSwift permits creation without a VNet integration subnet // when ExperimentalReleaseFeatures is registered, API visibility is Public, // and KMS visibility is not Private. Keys are case-insensitive; values must be // exactly "true" (opt in) or "false" (no opt-in). Without AFEC it is ignored. // An honored "true" conflicts with a nonnil VNet integration subnet. // The subnet, not this tag, determines immutable networking after creation; // removing the tag or AFEC registration does not change existing networking. TagClusterDisableSwift = ExperimentalClusterTagPrefix + "disable-swift" // TagClusterCPOImageOverride is the ARM resource tag that overrides // the control plane operator image for a HostedCluster when the // ExperimentalReleaseFeatures AFEC is registered on the subscription. TagClusterCPOImageOverride = ExperimentalClusterTagPrefix + "control-plane-operator-image-override" // TagClusterControlPlaneExactVersion is the ARM resource tag that pins the // control plane to an exact OpenShift release (e.g. "4.17.3") when the // ExperimentalReleaseFeatures AFEC is registered on the subscription. When // set, the desired control plane version controllers use the exact version // directly and skip Cincinnati/gateway version resolution. The value may be // a full semantic version; alternatively the tag may be present while the // exact version is supplied through the cluster's version.id, in which case // admission relocates the patch version here and reduces version.id to its // "<major>.<minor>" release line. TagClusterControlPlaneExactVersion = ExperimentalClusterTagPrefix + "control-plane-exact-version" // TagClusterZStreamUpdatePolicy controls automatic z-stream rollout when the // ExperimentalReleaseFeatures AFEC is registered. The only valid value is // "Immediate", which follows the channel's best version without waiting for // canary progress. Production e2e tests need this to exercise automatic // z-stream upgrades reliably, independently of the rest of the fleet. TagClusterZStreamUpdatePolicy = ExperimentalClusterTagPrefix + "z-stream-update-policy" // TagClusterMaxCreationDuration is the ARM resource tag that overrides // the default cluster creation deadline (60 minutes) when the // ExperimentalReleaseFeatures AFEC is registered on the subscription. // The value must be a valid Go time.Duration string (e.g. "19m", "30m"). TagClusterMaxCreationDuration = ExperimentalClusterTagPrefix + "max-creation-duration" // TagClusterMaxUpdateDuration overrides the default 60-minute update deadline. // Only honored when ExperimentalReleaseFeatures is registered. The value must // be a valid Go duration of at least one minute. TagClusterMaxUpdateDuration = ExperimentalClusterTagPrefix + "max-update-duration" // TagClusterMaxDeletionDuration is the ARM resource tag that overrides // the default cluster deletion deadline (60 minutes) when the // ExperimentalReleaseFeatures AFEC is registered on the subscription. // The value must be a valid Go time.Duration string (e.g. "24m", "30m"). // The tag is set at cluster creation time but consumed at deletion time. TagClusterMaxDeletionDuration = ExperimentalClusterTagPrefix + "max-deletion-duration" // ExperimentalNodePoolTagPrefix is the prefix for all experimental node pool // tags. Tags with this prefix are only honored when the // ExperimentalReleaseFeatures AFEC is registered. Unrecognized tags // with this prefix are rejected. ExperimentalNodePoolTagPrefix = "aro-hcp.experimental.nodepool." // TagNodePoolMaxCreationDuration is the ARM resource tag that overrides // the default node pool creation deadline (60 minutes) when the // ExperimentalReleaseFeatures AFEC is registered on the subscription. // The value must be a valid Go time.Duration string (e.g. "19m", "30m"). TagNodePoolMaxCreationDuration = ExperimentalNodePoolTagPrefix + "max-creation-duration" // TagNodePoolMaxUpdateDuration overrides the default 60-minute update deadline. // Only honored when ExperimentalReleaseFeatures is registered. The value must // be a valid Go duration of at least one minute. TagNodePoolMaxUpdateDuration = ExperimentalNodePoolTagPrefix + "max-update-duration" )
ARM handles feature names as case insensitive. Normalize the names using lowercase
const ( ChannelGroupStable = "stable" ChannelGroupFast = "fast" ChannelGroupCandidate = "candidate" // ChannelGroupNightly builds are published to the CI releasestream API rather // than the Cincinnati graph API used for version selection, so a nightly // version cannot be resolved from a bare major.minor and must be pinned to a // full major.minor.patch (see validateVersionProfile and the control plane // desired version controller). ChannelGroupNightly = "nightly" )
OpenShift version update channel groups.
const (
OpenShiftVersionPrefix = "openshift-v"
)
Variables ¶
var AllowControlPlaneNodePoolMajorVersionSkew = map[string][]string{
"4.21": {"5.0"},
"4.22": {"5.0", "5.1"},
"4.23": {"5.1", "5.2"},
}
AllowControlPlaneNodePoolMajorVersionSkew maps node pool OpenShift minor release lines (x.y) to allowed control-plane minor release lines when the node pool major differs from the cluster major. Values are sorted from strictest to most permissive allowed skew. See the HyperShift control plane version status enhancement for node pool skews against cluster version: https://github.com/openshift/enhancements/blob/master/enhancements/hypershift/hypershift-control-plane-version-status.md
var AllowMajorUpgradePaths = map[string]string{
"4.22": "5.0",
"4.23": "5.1",
}
AllowedMajorUpgrades is for OpenShift cross-major upgrades (one major at a time, e.g. 4 to 5). Keys and values are major.minor lines ("x.y"): the key is the current version's line, the value is the only allowed line for the desired version. Used when validating version on clusters and node pools. Add entries when new cross-major paths are supported.
var AllowedChannelGroups = sets.New(ChannelGroupStable, ChannelGroupFast)
AllowedChannelGroups is the set ARO-HCP allows to use for customer purposes
var AllowedChannelGroupsWithExperimentalFlag = sets.New(ChannelGroupStable, ChannelGroupFast, ChannelGroupCandidate, ChannelGroupNightly)
AllowedChannelGroupsWithExperimentalFlag is the set the service allows to use when using the Experimental Feature AFEC flag
var ( ValidClusterImageRegistryStates = sets.New[ClusterImageRegistryState]( ClusterImageRegistryStateDisabled, ClusterImageRegistryStateEnabled, ) )
var ( ValidCryptoRestrictions = sets.New[CryptoRestrictions]( CryptoRestrictionsNone, CryptoRestrictionsFIPS, ) )
var ( ValidCustomerManagedEncryptionType = sets.New[CustomerManagedEncryptionType]( CustomerManagedEncryptionTypeKMS, ) )
var ( ValidDiskStorageAccountTypes = sets.New[DiskStorageAccountType]( DiskStorageAccountTypePremium_LRS, DiskStorageAccountTypeStandardSSD_LRS, DiskStorageAccountTypeStandard_LRS, ) )
var ( ValidEffects = sets.New[Effect]( EffectNoExecute, EffectNoSchedule, EffectPreferNoSchedule, ) )
var ( ValidEtcdDataEncryptionKeyManagementModeType = sets.New[EtcdDataEncryptionKeyManagementModeType]( EtcdDataEncryptionKeyManagementModeTypeCustomerManaged, ) )
var ( ValidExternalAuthClientTypes = sets.New[ExternalAuthClientType]( ExternalAuthClientTypeConfidential, ExternalAuthClientTypePublic, ) )
var ( // ValidIngressTypes contains ingress types that are currently supported. // Disabled is defined in the API but not yet supported. ValidIngressTypes = sets.New[IngressType]( IngressTypePublic, IngressTypePrivate, ) )
var ( ValidKeyVaultVisibility = sets.New[KeyVaultVisibility]( KeyVaultVisibilityPublic, KeyVaultVisibilityPrivate, ) )
var ( ValidMirrorSourcePolicies = sets.New[MirrorSourcePolicy]( MirrorSourcePolicyAllowContactingSource, ) )
var ( ValidNetworkTypes = sets.New[NetworkType]( NetworkTypeOVNKubernetes, NetworkTypeOther, ) )
var ( ValidOsDiskTypes = sets.New[OsDiskType]( OsDiskTypeManaged, OsDiskTypeEphemeral, ) )
var ( ValidOutboundTypes = sets.New[OutboundType]( OutboundTypeLoadBalancer, ) )
var ( ValidTokenValidationRuleTypes = sets.New[TokenValidationRuleType]( TokenValidationRuleTypeRequiredClaim, ) )
var ( ValidUsernameClaimPrefixPolicies = sets.New[UsernameClaimPrefixPolicy]( UsernameClaimPrefixPolicyPrefix, UsernameClaimPrefixPolicyNoPrefix, UsernameClaimPrefixPolicyNone, ) )
var ( ValidVisibility = sets.New[Visibility]( VisibilityPublic, VisibilityPrivate, ) )
Functions ¶
func APIVersionOption ¶
func APIVersionOption(version APIVersion) string
APIVersionOption returns the operation option string for an API version, suitable for inclusion in operation.Operation.Options.
func Must ¶
Must is a helper function that takes a value and error, returns the value if no error occurred, or panics if an error occurred. This is useful for test setup where we don't expect errors.
func ResourceTypeEqual ¶
func ResourceTypeEqual(lhs, rhs azcorearm.ResourceType) bool
ResourceTypeEqual reports whether two ARM resource types are equal, case-insensitively.
Types ¶
type APIVersion ¶
type APIVersion string
APIVersion represents an Azure ARM API version following the uniform versioning guidelines (https://github.com/Azure/azure-rest-api-specs/blob/main/documentation/uniform-versioning.md).
Format: YYYY-MM-DD[-preview]
Ordering: versions are ordered chronologically by date. The uniform versioning spec requires that each new API version uses a date later than all preceding versions, and that stable and preview versions cannot share the same date (promoting preview to stable requires incrementing the date by at least one day).
The comparison functions (LT, LE, GT, GE) implement semantic ordering that additionally handles the hypothetical case of a same-date stable and preview version by ranking stable after preview. This guards against a violation of the uniform versioning guidelines where the date is not incremented when moving from preview to stable — naive lexicographic comparison would incorrectly place the stable version before the preview version in that scenario.
const ( APIVersionV20240610Preview APIVersion = "2024-06-10-preview" APIVersionV20251223Preview APIVersion = "2025-12-23-preview" APIVersionV20260630Preview APIVersion = "2026-06-30-preview" APIVersionV20260901Preview APIVersion = "2026-09-01-preview" APIVersionV20261001 APIVersion = "2026-10-01" )
func APIVersionFromOptions ¶
func APIVersionFromOptions(options []string) APIVersion
APIVersionFromOptions extracts the API version from operation options. Returns an empty string if no API version option is present.
func (APIVersion) EQ ¶
func (v APIVersion) EQ(other APIVersion) bool
func (APIVersion) GE ¶
func (v APIVersion) GE(other APIVersion) bool
func (APIVersion) GT ¶
func (v APIVersion) GT(other APIVersion) bool
func (APIVersion) LE ¶
func (v APIVersion) LE(other APIVersion) bool
func (APIVersion) LT ¶
func (v APIVersion) LT(other APIVersion) bool
func (APIVersion) NE ¶
func (v APIVersion) NE(other APIVersion) bool
type ClusterImageRegistryState ¶
type ClusterImageRegistryState string
ClusterImageRegistryState - state indicates the desired ImageStream-backed cluster image registry installation mode. This can only be set during cluster creation and cannot be changed after cluster creation. Enabled means the ImageStream-backed image registry will be run as pods on worker nodes in the cluster. Disabled means the ImageStream-backed image registry will not be present in the cluster. The default is Enabled.
const ( ClusterImageRegistryStateDisabled ClusterImageRegistryState = "Disabled" ClusterImageRegistryStateEnabled ClusterImageRegistryState = "Enabled" )
type CryptoRestrictions ¶
type CryptoRestrictions string
CryptoRestrictions represents cryptographic restrictions for a cluster.
const ( // CryptoRestrictionsNone - no cryptographic restrictions will be applied to the cluster CryptoRestrictionsNone CryptoRestrictions = "None" // CryptoRestrictionsFIPS - FIPS cryptographic restrictions will be applied to the cluster CryptoRestrictionsFIPS CryptoRestrictions = "FIPS" )
type CustomerManagedEncryptionType ¶
type CustomerManagedEncryptionType string
const ( // CustomerManagedEncryptionTypeKMS - KMS encryption type. CustomerManagedEncryptionTypeKMS CustomerManagedEncryptionType = "KMS" )
type DiskStorageAccountType ¶
type DiskStorageAccountType string
DiskStorageAccountType represents supported Azure storage account types.
const ( DiskStorageAccountTypePremium_LRS DiskStorageAccountType = "Premium_LRS" DiskStorageAccountTypeStandardSSD_LRS DiskStorageAccountType = "StandardSSD_LRS" DiskStorageAccountTypeStandard_LRS DiskStorageAccountType = "Standard_LRS" )
type EtcdDataEncryptionKeyManagementModeType ¶
type EtcdDataEncryptionKeyManagementModeType string
const ( // EtcdDataEncryptionKeyManagementModeTypeCustomerManaged - Customer managed encryption key management mode type. EtcdDataEncryptionKeyManagementModeTypeCustomerManaged EtcdDataEncryptionKeyManagementModeType = "CustomerManaged" // EtcdDataEncryptionKeyManagementModeTypePlatformManaged - Platform managed encryption key management mode type. // Not currently supported; left defined so EnsureDefaults / Cosmos defaults keep // filling the historic value, but excluded from ValidEtcdDataEncryptionKeyManagementModeType until // platform-managed etcd encryption is supported. EtcdDataEncryptionKeyManagementModeTypePlatformManaged EtcdDataEncryptionKeyManagementModeType = "PlatformManaged" )
type ExternalAuthClientType ¶
type ExternalAuthClientType string
const ( // ExternalAuthClientTypeConfidential - the client is confidential. ExternalAuthClientTypeConfidential ExternalAuthClientType = "Confidential" // ExternalAuthClientTypePublic - the client is public. ExternalAuthClientTypePublic ExternalAuthClientType = "Public" )
type IngressType ¶
type IngressType string
IngressType represents the type of the default cluster ingress.
const ( IngressTypePublic IngressType = "Public" IngressTypePrivate IngressType = "Private" IngressTypeDisabled IngressType = "Disabled" )
type InternalID ¶
type InternalID struct {
// contains filtered or unexported fields
}
InternalID represents a Cluster Service resource.
func NewInternalID ¶
func NewInternalID(path string) (InternalID, error)
NewInternalID attempts to create a new InternalID from a Cluster Service API path, returning an error if the API path is invalid or unsupported.
func (*InternalID) ClusterID ¶
func (id *InternalID) ClusterID() string
ClusterID returns the path element following "clusters", if present.
func (*InternalID) DeepCopy ¶
func (in *InternalID) DeepCopy() *InternalID
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InternalID.
func (*InternalID) DeepCopyInto ¶
func (in *InternalID) DeepCopyInto(out *InternalID)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*InternalID) ID ¶
func (id *InternalID) ID() string
ID returns the last path element of the resource described by InternalID.
func (*InternalID) Kind ¶
func (id *InternalID) Kind() string
Kind returns the kind of resource described by InternalID, currently limited to "Cluster" and "NodePool".
func (InternalID) MarshalText ¶
func (id InternalID) MarshalText() ([]byte, error)
MarshalText allows an InternalID to be used as an encoding.TextMarshaler.
func (*InternalID) Path ¶
func (id *InternalID) Path() string
Path returns the full API path of the resource.
func (*InternalID) String ¶
func (id *InternalID) String() string
String allows an InternalID to be used as a fmt.Stringer.
func (*InternalID) UnmarshalText ¶
func (id *InternalID) UnmarshalText(text []byte) error
UnmarshalText allows an InternalID to be used as an encoding.TextUnmarshaler.
type KeyVaultVisibility ¶
type KeyVaultVisibility string
KeyVaultVisibility represents the visibility of a KeyVault resource.
const ( KeyVaultVisibilityPublic KeyVaultVisibility = "Public" KeyVaultVisibilityPrivate KeyVaultVisibility = "Private" )
type MirrorSourcePolicy ¶
type MirrorSourcePolicy string
const ( // MirrorSourcePolicyAllowContactingSource - allows falling back to the specified // repository in the pull spec if the image pull from the mirror list fails MirrorSourcePolicyAllowContactingSource MirrorSourcePolicy = "AllowContactingSource" )
type NetworkType ¶
type NetworkType string
NetworkType represents an OpenShift cluster network plugin.
const ( NetworkTypeOVNKubernetes NetworkType = "OVNKubernetes" NetworkTypeOther NetworkType = "Other" )
type ObjectMetadata ¶
type ObjectMetadata struct {
CosmosContainer string `json:"cosmosContainer"`
SubscriptionID string `json:"subscriptionID"`
ResourceGroup string `json:"resourceGroup"`
ResourceType string `json:"resourceType"`
ResourceName string `json:"resourceName"`
ResourceID string `json:"resourceID"`
// ClusterResourceID is the full resource ID of the logical parent HCP cluster.
// It is empty when the resource is not part of an HCP cluster.
ClusterResourceID string `json:"clusterResourceID"`
}
ObjectMetadata provides per-document identity for the cosmosResourceSnapshots Kusto table. It is emitted as a structured log field alongside the document content.
func (*ObjectMetadata) DeepCopy ¶
func (in *ObjectMetadata) DeepCopy() *ObjectMetadata
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ObjectMetadata.
func (*ObjectMetadata) DeepCopyInto ¶
func (in *ObjectMetadata) DeepCopyInto(out *ObjectMetadata)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type OsDiskType ¶
type OsDiskType string
OsDiskType represents the type of OS disk.
const ( OsDiskTypeManaged OsDiskType = "Managed" OsDiskTypeEphemeral OsDiskType = "Ephemeral" )
type OutboundType ¶
type OutboundType string
OutboundType represents a routing strategy to provide egress to the Internet.
const (
OutboundTypeLoadBalancer OutboundType = "LoadBalancer"
)
type TokenValidationRuleType ¶
type TokenValidationRuleType string
const ( // TokenValidationRuleTypeRequiredClaim - the Kubernetes API server will be configured to validate that the // incoming JWT contains the required claim and that its value matches the required value. TokenValidationRuleTypeRequiredClaim TokenValidationRuleType = "RequiredClaim" )
type UsernameClaimPrefixPolicy ¶
type UsernameClaimPrefixPolicy string
const ( // UsernameClaimPrefixPolicyPrefix - prefix the JWT claim with the value of Prefix. UsernameClaimPrefixPolicyPrefix UsernameClaimPrefixPolicy = "Prefix" // UsernameClaimPrefixPolicyNoPrefix - do not prefix the JWT claim. UsernameClaimPrefixPolicyNoPrefix UsernameClaimPrefixPolicy = "NoPrefix" // UsernameClaimPrefixPolicyNone - let the platform choose an appropriate prefix. UsernameClaimPrefixPolicyNone UsernameClaimPrefixPolicy = "None" )
type Visibility ¶
type Visibility string
Visibility represents the visibility of an API endpoint.
const ( VisibilityPublic Visibility = "Public" VisibilityPrivate Visibility = "Private" )