api

package
v0.0.0-...-0ecf4d6 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: Apache-2.0 Imports: 12 Imported by: 133

Documentation

Index

Constants

View Source
const (
	CloudErrorCodeInternalServerError                = "InternalServerError"
	CloudErrorCodeDeploymentFailed                   = "DeploymentFailed"
	CloudErrorCodeInvalidParameter                   = "InvalidParameter"
	CloudErrorCodeInvalidRequestContent              = "InvalidRequestContent"
	CloudErrorCodeInvalidResource                    = "InvalidResource"
	CloudErrorCodeDuplicateResourceGroup             = "DuplicateResourceGroup"
	CloudErrorCodeInvalidResourceNamespace           = "InvalidResourceNamespace"
	CloudErrorCodeInvalidResourceType                = "InvalidResourceType"
	CloudErrorCodeInvalidSubscriptionID              = "InvalidSubscriptionID"
	CloudErrorCodeMismatchingResourceID              = "MismatchingResourceID"
	CloudErrorCodeMismatchingResourceName            = "MismatchingResourceName"
	CloudErrorCodeMismatchingResourceType            = "MismatchingResourceType"
	CloudErrorCodePropertyChangeNotAllowed           = "PropertyChangeNotAllowed"
	CloudErrorCodeRequestNotAllowed                  = "RequestNotAllowed"
	CloudErrorCodeResourceGroupNotFound              = "ResourceGroupNotFound"
	CloudErrorCodeClusterResourceGroupAlreadyExists  = "ClusterResourceGroupAlreadyExists"
	CloudErrorCodeResourceNotFound                   = "ResourceNotFound"
	CloudErrorCodeUnsupportedMediaType               = "UnsupportedMediaType"
	CloudErrorCodeInvalidLinkedVNet                  = "InvalidLinkedVNet"
	CloudErrorCodeInvalidLinkedRouteTable            = "InvalidLinkedRouteTable"
	CloudErrorCodeInvalidLinkedNatGateway            = "InvalidLinkedNatGateway"
	CloudErrorCodeInvalidLinkedDiskEncryptionSet     = "InvalidLinkedDiskEncryptionSet"
	CloudErrorCodeNotFound                           = "NotFound"
	CloudErrorCodeForbidden                          = "Forbidden"
	CloudErrorCodeInvalidSubscriptionState           = "InvalidSubscriptionState"
	CloudErrorCodeInvalidServicePrincipalCredentials = "InvalidServicePrincipalCredentials"
	CloudErrorCodeInvalidServicePrincipalToken       = "InvalidServicePrincipalToken"
	CloudErrorCodeInvalidServicePrincipalClaims      = "InvalidServicePrincipalClaims"
	CloudErrorCodeInvalidResourceProviderPermissions = "InvalidResourceProviderPermissions"
	CloudErrorCodeInvalidServicePrincipalPermissions = "InvalidServicePrincipalPermissions"
	CloudErrorCodeInvalidWorkloadIdentityPermissions = "InvalidWorkloadIdentityPermissions"
	CloudErrorCodeInvalidLocation                    = "InvalidLocation"
	CloudErrorCodeInvalidOperationID                 = "InvalidOperationID"
	CloudErrorCodeDuplicateClientID                  = "DuplicateClientID"
	CloudErrorCodeDuplicateDomain                    = "DuplicateDomain"
	CloudErrorCodeResourceQuotaExceeded              = "ResourceQuotaExceeded"
	CloudErrorCodeQuotaExceeded                      = "QuotaExceeded"
	CloudErrorCodeResourceProviderNotRegistered      = "ResourceProviderNotRegistered"
	CloudErrorCodeCannotDeleteLoadBalancerByID       = "CannotDeleteLoadBalancerWithPrivateLinkService"
	CloudErrorCodeInUseSubnetCannotBeDeleted         = "InUseSubnetCannotBeDeleted"
	CloudErrorCodeScopeLocked                        = "ScopeLocked"
	CloudErrorCodeRequestDisallowedByPolicy          = "RequestDisallowedByPolicy"
	CloudErrorCodeInvalidNetworkAddress              = "InvalidNetworkAddress"
	CloudErrorCodeThrottlingLimitExceeded            = "ThrottlingLimitExceeded"
	CloudErrorCodeInvalidCIDRRange                   = "InvalidCIDRRange"
	CloudErrorCodePlatformWorkloadIdentityMismatch   = "CloudErrorCodePlatformWorkloadIdentityMismatch"
	CloudErrorCodeInvalidClusterMSICount             = "CloudErrorCodeInvalidClusterMSICount"
)

CloudErrorCodes

View Source
const APIVersionKey = "api-version"

Copyright (c) Microsoft Corporation. Licensed under the Apache License 2.0.

View Source
const (
	// FeatureFlagMTU3900 is the feature in the subscription that causes new
	// OpenShift cluster nodes to use the largest available Maximum Transmission
	// Unit (MTU) on Azure virtual networks, which as of late 2021 is 3900 bytes.
	// Otherwise cluster nodes will use the DHCP-provided MTU of 1500 bytes.
	FeatureFlagMTU3900 = "Microsoft.RedHatOpenShift/MTU3900"
)

Variables

View Source
var (
	VMSizeStandardD2sV3Struct  = VMSizeStruct{CoreCount: 2, Family: standardDSv3}
	VMSizeStandardD4sV3Struct  = VMSizeStruct{CoreCount: 4, Family: standardDSv3}
	VMSizeStandardD8sV3Struct  = VMSizeStruct{CoreCount: 8, Family: standardDSv3}
	VMSizeStandardD16sV3Struct = VMSizeStruct{CoreCount: 16, Family: standardDSv3}
	VMSizeStandardD32sV3Struct = VMSizeStruct{CoreCount: 32, Family: standardDSv3}

	VMSizeStandardD4sV4Struct  = VMSizeStruct{CoreCount: 4, Family: standardDSv4}
	VMSizeStandardD8sV4Struct  = VMSizeStruct{CoreCount: 8, Family: standardDSv4}
	VMSizeStandardD16sV4Struct = VMSizeStruct{CoreCount: 16, Family: standardDSv4}
	VMSizeStandardD32sV4Struct = VMSizeStruct{CoreCount: 32, Family: standardDSv4}
	VMSizeStandardD64sV4Struct = VMSizeStruct{CoreCount: 64, Family: standardDSv4}

	VMSizeStandardD4sV5Struct  = VMSizeStruct{CoreCount: 4, Family: standardDSv5}
	VMSizeStandardD8sV5Struct  = VMSizeStruct{CoreCount: 8, Family: standardDSv5}
	VMSizeStandardD16sV5Struct = VMSizeStruct{CoreCount: 16, Family: standardDSv5}
	VMSizeStandardD32sV5Struct = VMSizeStruct{CoreCount: 32, Family: standardDSv5}
	VMSizeStandardD64sV5Struct = VMSizeStruct{CoreCount: 64, Family: standardDSv5}
	VMSizeStandardD96sV5Struct = VMSizeStruct{CoreCount: 96, Family: standardDSv5}

	VMSizeStandardD4asV4Struct  = VMSizeStruct{CoreCount: 4, Family: standardDASv4}
	VMSizeStandardD8asV4Struct  = VMSizeStruct{CoreCount: 8, Family: standardDASv4}
	VMSizeStandardD16asV4Struct = VMSizeStruct{CoreCount: 16, Family: standardDASv4}
	VMSizeStandardD32asV4Struct = VMSizeStruct{CoreCount: 32, Family: standardDASv4}
	VMSizeStandardD64asV4Struct = VMSizeStruct{CoreCount: 64, Family: standardDASv4}
	VMSizeStandardD96asV4Struct = VMSizeStruct{CoreCount: 96, Family: standardDASv4}

	VMSizeStandardD4asV5Struct  = VMSizeStruct{CoreCount: 4, Family: standardDASv5}
	VMSizeStandardD8asV5Struct  = VMSizeStruct{CoreCount: 8, Family: standardDASv5}
	VMSizeStandardD16asV5Struct = VMSizeStruct{CoreCount: 16, Family: standardDASv5}
	VMSizeStandardD32asV5Struct = VMSizeStruct{CoreCount: 32, Family: standardDASv5}
	VMSizeStandardD64asV5Struct = VMSizeStruct{CoreCount: 64, Family: standardDASv5}
	VMSizeStandardD96asV5Struct = VMSizeStruct{CoreCount: 96, Family: standardDASv5}

	VMSizeStandardD4dsV5Struct  = VMSizeStruct{CoreCount: 4, Family: standardDDSv5}
	VMSizeStandardD8dsV5Struct  = VMSizeStruct{CoreCount: 8, Family: standardDDSv5}
	VMSizeStandardD16dsV5Struct = VMSizeStruct{CoreCount: 16, Family: standardDDSv5}
	VMSizeStandardD32dsV5Struct = VMSizeStruct{CoreCount: 32, Family: standardDDSv5}
	VMSizeStandardD64dsV5Struct = VMSizeStruct{CoreCount: 64, Family: standardDDSv5}
	VMSizeStandardD96dsV5Struct = VMSizeStruct{CoreCount: 96, Family: standardDDSv5}

	VMSizeStandardE4sV3Struct  = VMSizeStruct{CoreCount: 4, Family: standardESv3}
	VMSizeStandardE8sV3Struct  = VMSizeStruct{CoreCount: 8, Family: standardESv3}
	VMSizeStandardE16sV3Struct = VMSizeStruct{CoreCount: 16, Family: standardESv3}
	VMSizeStandardE32sV3Struct = VMSizeStruct{CoreCount: 32, Family: standardESv3}

	VMSizeStandardE2sV4Struct  = VMSizeStruct{CoreCount: 2, Family: standardESv4}
	VMSizeStandardE4sV4Struct  = VMSizeStruct{CoreCount: 4, Family: standardESv4}
	VMSizeStandardE8sV4Struct  = VMSizeStruct{CoreCount: 8, Family: standardESv4}
	VMSizeStandardE16sV4Struct = VMSizeStruct{CoreCount: 16, Family: standardESv4}
	VMSizeStandardE20sV4Struct = VMSizeStruct{CoreCount: 20, Family: standardESv4}
	VMSizeStandardE32sV4Struct = VMSizeStruct{CoreCount: 32, Family: standardESv4}
	VMSizeStandardE48sV4Struct = VMSizeStruct{CoreCount: 48, Family: standardESv4}
	VMSizeStandardE64sV4Struct = VMSizeStruct{CoreCount: 64, Family: standardESv4}

	VMSizeStandardE2sV5Struct  = VMSizeStruct{CoreCount: 2, Family: standardESv5}
	VMSizeStandardE4sV5Struct  = VMSizeStruct{CoreCount: 4, Family: standardESv5}
	VMSizeStandardE8sV5Struct  = VMSizeStruct{CoreCount: 8, Family: standardESv5}
	VMSizeStandardE16sV5Struct = VMSizeStruct{CoreCount: 16, Family: standardESv5}
	VMSizeStandardE20sV5Struct = VMSizeStruct{CoreCount: 20, Family: standardESv5}
	VMSizeStandardE32sV5Struct = VMSizeStruct{CoreCount: 32, Family: standardESv5}
	VMSizeStandardE48sV5Struct = VMSizeStruct{CoreCount: 48, Family: standardESv5}
	VMSizeStandardE64sV5Struct = VMSizeStruct{CoreCount: 64, Family: standardESv5}
	VMSizeStandardE96sV5Struct = VMSizeStruct{CoreCount: 96, Family: standardESv5}

	VMSizeStandardE4asV4Struct  = VMSizeStruct{CoreCount: 4, Family: standardEASv4}
	VMSizeStandardE8asV4Struct  = VMSizeStruct{CoreCount: 8, Family: standardEASv4}
	VMSizeStandardE16asV4Struct = VMSizeStruct{CoreCount: 16, Family: standardEASv4}
	VMSizeStandardE20asV4Struct = VMSizeStruct{CoreCount: 20, Family: standardEASv4}
	VMSizeStandardE32asV4Struct = VMSizeStruct{CoreCount: 32, Family: standardEASv4}
	VMSizeStandardE48asV4Struct = VMSizeStruct{CoreCount: 48, Family: standardEASv4}
	VMSizeStandardE64asV4Struct = VMSizeStruct{CoreCount: 64, Family: standardEASv4}
	VMSizeStandardE96asV4Struct = VMSizeStruct{CoreCount: 96, Family: standardEASv4}

	VMSizeStandardE8asV5Struct  = VMSizeStruct{CoreCount: 8, Family: standardEASv5}
	VMSizeStandardE16asV5Struct = VMSizeStruct{CoreCount: 16, Family: standardEASv5}
	VMSizeStandardE20asV5Struct = VMSizeStruct{CoreCount: 20, Family: standardEASv5}
	VMSizeStandardE32asV5Struct = VMSizeStruct{CoreCount: 32, Family: standardEASv5}
	VMSizeStandardE48asV5Struct = VMSizeStruct{CoreCount: 48, Family: standardEASv5}
	VMSizeStandardE64asV5Struct = VMSizeStruct{CoreCount: 64, Family: standardEASv5}
	VMSizeStandardE96asV5Struct = VMSizeStruct{CoreCount: 96, Family: standardEASv5}

	VMSizeStandardE64isV3Struct   = VMSizeStruct{CoreCount: 64, Family: standardESv3}
	VMSizeStandardE80isV4Struct   = VMSizeStruct{CoreCount: 80, Family: standardEISv4}
	VMSizeStandardE80idsV4Struct  = VMSizeStruct{CoreCount: 80, Family: standardEIDSv4}
	VMSizeStandardE96dsV5Struct   = VMSizeStruct{CoreCount: 96, Family: standardEDSv5}
	VMSizeStandardE104isV5Struct  = VMSizeStruct{CoreCount: 104, Family: standardEISv5}
	VMSizeStandardE104idsV5Struct = VMSizeStruct{CoreCount: 104, Family: standardEIDSv5}

	VMSizeStandardF4sV2Struct  = VMSizeStruct{CoreCount: 4, Family: standardFSv2}
	VMSizeStandardF8sV2Struct  = VMSizeStruct{CoreCount: 8, Family: standardFSv2}
	VMSizeStandardF16sV2Struct = VMSizeStruct{CoreCount: 16, Family: standardFSv2}
	VMSizeStandardF32sV2Struct = VMSizeStruct{CoreCount: 32, Family: standardFSv2}
	VMSizeStandardF72sV2Struct = VMSizeStruct{CoreCount: 72, Family: standardFSv2}

	VMSizeStandardM128msStruct = VMSizeStruct{CoreCount: 128, Family: standardMS}

	VMSizeStandardL4sStruct  = VMSizeStruct{CoreCount: 4, Family: standardLSv2}
	VMSizeStandardL8sStruct  = VMSizeStruct{CoreCount: 8, Family: standardLSv2}
	VMSizeStandardL16sStruct = VMSizeStruct{CoreCount: 16, Family: standardLSv2}
	VMSizeStandardL32sStruct = VMSizeStruct{CoreCount: 32, Family: standardLSv2}

	VMSizeStandardL8sV2Struct  = VMSizeStruct{CoreCount: 8, Family: standardLSv2}
	VMSizeStandardL16sV2Struct = VMSizeStruct{CoreCount: 16, Family: standardLSv2}
	VMSizeStandardL32sV2Struct = VMSizeStruct{CoreCount: 32, Family: standardLSv2}
	VMSizeStandardL48sV2Struct = VMSizeStruct{CoreCount: 48, Family: standardLSv2}
	VMSizeStandardL64sV2Struct = VMSizeStruct{CoreCount: 64, Family: standardLSv2}

	VMSizeStandardL8sV3Struct  = VMSizeStruct{CoreCount: 8, Family: standardLSv3}
	VMSizeStandardL16sV3Struct = VMSizeStruct{CoreCount: 16, Family: standardLSv3}
	VMSizeStandardL32sV3Struct = VMSizeStruct{CoreCount: 32, Family: standardLSv3}
	VMSizeStandardL48sV3Struct = VMSizeStruct{CoreCount: 48, Family: standardLSv3}
	VMSizeStandardL64sV3Struct = VMSizeStruct{CoreCount: 64, Family: standardLSv3}

	//Struct GPU nodes
	//Struct the formatting of the ncasv3_t4 family is different.  This can be seen through a
	//Struct az vm list-usage -l eastus
	VMSizeStandardNC4asT4V3Struct  = VMSizeStruct{CoreCount: 4, Family: standardNCAS}
	VMSizeStandardNC8asT4V3Struct  = VMSizeStruct{CoreCount: 8, Family: standardNCAS}
	VMSizeStandardNC16asT4V3Struct = VMSizeStruct{CoreCount: 16, Family: standardNCAS}
	VMSizeStandardNC64asT4V3Struct = VMSizeStruct{CoreCount: 64, Family: standardNCAS}

	VMSizeStandardNC6sV3Struct   = VMSizeStruct{CoreCount: 6, Family: standardNCSv3}
	VMSizeStandardNC12sV3Struct  = VMSizeStruct{CoreCount: 12, Family: standardNCSv3}
	VMSizeStandardNC24sV3Struct  = VMSizeStruct{CoreCount: 24, Family: standardNCSv3}
	VMSizeStandardNC24rsV3Struct = VMSizeStruct{CoreCount: 24, Family: standardNCSv3}
)
View Source
var APIs = map[string]*Version{}

APIs is the map of registered API versions

View Source
var (
	JoinCIDRRange []string = []string{
		"100.64.0.0/16",
		"169.254.169.0/29",
		"100.88.0.0/16",
	}
)

IP address ranges internally used by ARO

View Source
var OperationListInstallVersions = Operation{
	Name: "Microsoft.RedHatOpenShift/locations/listInstallVersions/read",
	Display: Display{
		Provider:  "Azure Red Hat OpenShift",
		Resource:  "listInstallVersions",
		Operation: "Lists all OpenShift versions available to install in the specified location",
	},
	Origin: "user,system",
}
View Source
var OperationMachinePoolsDelete = Operation{
	Name: "Microsoft.RedHatOpenShift/openShiftClusters/machinePools/delete",
	Display: Display{
		Provider:  "Azure Red Hat OpenShift",
		Resource:  "machinePools",
		Operation: "Delete OpenShift cluster machine pool",
	},
	Origin: "user,system",
}
View Source
var OperationMachinePoolsRead = Operation{
	Name: "Microsoft.RedHatOpenShift/openShiftClusters/machinePools/read",
	Display: Display{
		Provider:  "Azure Red Hat OpenShift",
		Resource:  "machinePools",
		Operation: "Read OpenShift cluster machine pool",
	},
	Origin: "user,system",
}
View Source
var OperationMachinePoolsWrite = Operation{
	Name: "Microsoft.RedHatOpenShift/openShiftClusters/machinePools/write",
	Display: Display{
		Provider:  "Azure Red Hat OpenShift",
		Resource:  "machinePools",
		Operation: "Write OpenShift cluster machine pool",
	},
	Origin: "user,system",
}
View Source
var OperationOpenShiftClusterDelete = Operation{
	Name: "Microsoft.RedHatOpenShift/openShiftClusters/delete",
	Display: Display{
		Provider:  "Azure Red Hat OpenShift",
		Resource:  "openShiftClusters",
		Operation: "Delete OpenShift cluster",
	},
	Origin: "user,system",
}
View Source
var OperationOpenShiftClusterGetDetectors = Operation{
	Name: "Microsoft.RedHatOpenShift/openShiftClusters/detectors/read",
	Display: Display{
		Provider:  "Azure Red Hat OpenShift",
		Resource:  "openShiftClusters",
		Operation: "Get OpenShift Cluster Detector",
	},
	Origin: "user,system",
}
View Source
var OperationOpenShiftClusterListAdminCredentials = Operation{
	Name: "Microsoft.RedHatOpenShift/openShiftClusters/listAdminCredentials/action",
	Display: Display{
		Provider:  "Azure Red Hat OpenShift",
		Resource:  "openShiftClusters",
		Operation: "List Admin Kubeconfig of an OpenShift cluster",
	},
	Origin: "user,system",
}
View Source
var OperationOpenShiftClusterListCredentials = Operation{
	Name: "Microsoft.RedHatOpenShift/openShiftClusters/listCredentials/action",
	Display: Display{
		Provider:  "Azure Red Hat OpenShift",
		Resource:  "openShiftClusters",
		Operation: "List credentials of an OpenShift cluster",
	},
	Origin: "user,system",
}
View Source
var OperationOpenShiftClusterRead = Operation{
	Name: "Microsoft.RedHatOpenShift/openShiftClusters/read",
	Display: Display{
		Provider:  "Azure Red Hat OpenShift",
		Resource:  "openShiftClusters",
		Operation: "Read OpenShift cluster",
	},
	Origin: "user,system",
}
View Source
var OperationOpenShiftClusterWrite = Operation{
	Name: "Microsoft.RedHatOpenShift/openShiftClusters/write",
	Display: Display{
		Provider:  "Azure Red Hat OpenShift",
		Resource:  "openShiftClusters",
		Operation: "Write OpenShift cluster",
	},
	Origin: "user,system",
}
View Source
var OperationRead = Operation{
	Name: "Microsoft.RedHatOpenShift/operations/read",
	Display: Display{
		Provider:  "Azure Red Hat OpenShift",
		Resource:  "operations",
		Operation: "Read operations",
	},
	Origin: "user,system",
}
View Source
var OperationResultsRead = Operation{
	Name: "Microsoft.RedHatOpenShift/locations/operationresults/read",
	Display: Display{
		Provider:  "Azure Red Hat OpenShift",
		Resource:  "locations/operationresults",
		Operation: "Read operation results",
	},
	Origin: "user,system",
}

Common operations defined which can be used within the registration of the APIs

View Source
var OperationStatusRead = Operation{
	Name: "Microsoft.RedHatOpenShift/locations/operationsstatus/read",
	Display: Display{
		Provider:  "Azure Red Hat OpenShift",
		Resource:  "locations/operationsstatus",
		Operation: "Read operations status",
	},
	Origin: "user,system",
}
View Source
var OperationSyncIdentityProvidersDelete = Operation{
	Name: "Microsoft.RedHatOpenShift/openShiftClusters/syncIdentityProviders/delete",
	Display: Display{
		Provider:  "Azure Red Hat OpenShift",
		Resource:  "syncIdentityProviders",
		Operation: "Delete OpenShift cluster sync identity provider",
	},
	Origin: "user,system",
}
View Source
var OperationSyncIdentityProvidersRead = Operation{
	Name: "Microsoft.RedHatOpenShift/openShiftClusters/syncIdentityProviders/read",
	Display: Display{
		Provider:  "Azure Red Hat OpenShift",
		Resource:  "syncIdentityProviders",
		Operation: "Read OpenShift cluster sync identity provider",
	},
	Origin: "user,system",
}
View Source
var OperationSyncIdentityProvidersWrite = Operation{
	Name: "Microsoft.RedHatOpenShift/openShiftClusters/syncIdentityProviders/write",
	Display: Display{
		Provider:  "Azure Red Hat OpenShift",
		Resource:  "syncIdentityProviders",
		Operation: "Write OpenShift cluster sync identity provider",
	},
	Origin: "user,system",
}
View Source
var OperationSyncSetsDelete = Operation{
	Name: "Microsoft.RedHatOpenShift/openShiftClusters/syncSets/delete",
	Display: Display{
		Provider:  "Azure Red Hat OpenShift",
		Resource:  "syncSets",
		Operation: "Delete OpenShift cluster sync set",
	},
	Origin: "user,system",
}
View Source
var OperationSyncSetsRead = Operation{
	Name: "Microsoft.RedHatOpenShift/openShiftClusters/syncSets/read",
	Display: Display{
		Provider:  "Azure Red Hat OpenShift",
		Resource:  "syncSets",
		Operation: "Read OpenShift cluster sync set",
	},
	Origin: "user,system",
}
View Source
var OperationSyncSetsWrite = Operation{
	Name: "Microsoft.RedHatOpenShift/openShiftClusters/syncSets/write",
	Display: Display{
		Provider:  "Azure Red Hat OpenShift",
		Resource:  "syncSets",
		Operation: "Write OpenShift cluster sync set",
	},
	Origin: "user,system",
}
View Source
var (
	SubnetsEndpoints = []string{
		"Microsoft.ContainerRegistry",
		"Microsoft.Storage",
	}
)

Functions

func CtxWithCorrelationData

func CtxWithCorrelationData(ctx context.Context, correlationData *CorrelationData) context.Context

func ExampleOperationListResponse

func ExampleOperationListResponse() interface{}

ExampleOperationListResponse returns an example OperationList object that the RP might return to an end-user

func InstallPhaseStrings

func InstallPhaseStrings() []string

InstallPhaseStrings returns a slice of all String values of the enum

func SetDefaults

func SetDefaults(doc *OpenShiftClusterDocument, defaultOperatorFlags func() map[string]string)

SetDefaults sets the default values for older api version when interacting with newer api versions. This together with database migration will make sure we have right values in the cluster documents when moving between old and new versions

func WriteCloudError

func WriteCloudError(w http.ResponseWriter, err *CloudError)

WriteCloudError writes a CloudError to the given ResponseWriter

func WriteError

func WriteError(w http.ResponseWriter, statusCode int, code, target, message string, a ...interface{})

WriteError constructs and writes a CloudError to the given ResponseWriter

Types

type APIServerProfile

type APIServerProfile struct {
	MissingFields

	Visibility Visibility `json:"visibility,omitempty"`
	URL        string     `json:"url,omitempty"`
	IP         string     `json:"ip,omitempty"`
	IntIP      string     `json:"intIp,omitempty"`
}

APIServerProfile represents an API server profile

type AccountOwnerProfile

type AccountOwnerProfile struct {
	MissingFields

	Email string `json:"email,omitempty"`
}

AccountOwnerProfile represents the subscription account owner information

type ArchitectureVersion

type ArchitectureVersion int

ArchitectureVersion represents an architecture version

const (
	// ArchitectureVersionV1: 4.3, 4.4: 2 load balancers, 2 NSGs
	ArchitectureVersionV1 ArchitectureVersion = iota
	// ArchitectureVersionV2: 4.5: 1 load balancer, 1 NSG
	ArchitectureVersionV2
)

ArchitectureVersion constants

type AsyncOperation

type AsyncOperation struct {
	MissingFields

	ID   string `json:"id,omitempty" deep:"-"`
	Name string `json:"name,omitempty" deep:"-"`

	InitialProvisioningState ProvisioningState `json:"initialStatus,omitempty"`
	ProvisioningState        ProvisioningState `json:"status,omitempty"`

	StartTime time.Time  `json:"startTime,omitempty" deep:"-"`
	EndTime   *time.Time `json:"endTime,omitempty" deep:"-"`

	Error *CloudErrorBody `json:"error,omitempty"`
}

AsyncOperation represents an asyncOperation

type AsyncOperationDocument

type AsyncOperationDocument struct {
	MissingFields

	ID          string                 `json:"id,omitempty" deep:"-"`
	ResourceID  string                 `json:"_rid,omitempty"`
	Timestamp   int                    `json:"_ts,omitempty"`
	Self        string                 `json:"_self,omitempty"`
	ETag        string                 `json:"_etag,omitempty" deep:"-"`
	Attachments string                 `json:"_attachments,omitempty"`
	LSN         int                    `json:"_lsn,omitempty"`
	Metadata    map[string]interface{} `json:"_metadata,omitempty"`

	AsyncOperation *AsyncOperation `json:"asyncOperation,omitempty"`

	OpenShiftClusterKey string            `json:"openShiftClusterKey,omitempty"`
	OpenShiftCluster    *OpenShiftCluster `json:"openShiftCluster,omitempty"`
}

AsyncOperationDocument represents a asyncOperation document. pkg/database/cosmosdb requires its definition.

func (*AsyncOperationDocument) String

func (c *AsyncOperationDocument) String() string

type AsyncOperationDocuments

type AsyncOperationDocuments struct {
	Count                   int                       `json:"_count,omitempty"`
	ResourceID              string                    `json:"_rid,omitempty"`
	AsyncOperationDocuments []*AsyncOperationDocument `json:"Documents,omitempty"`
}

AsyncOperationDocuments represents asyncOperation documents. pkg/database/cosmosdb requires its definition.

func (*AsyncOperationDocuments) String

func (c *AsyncOperationDocuments) String() string

type Billing

type Billing struct {
	MissingFields

	CreationTime    int `json:"creationTime,omitempty" deep:"-"`
	DeletionTime    int `json:"deletionTime,omitempty"`
	LastBillingTime int `json:"lastBillingTime,omitempty"`

	Location string `json:"location,omitempty"`
	TenantID string `json:"tenantID,omitempty"`
}

Billing represents a Billing entry

type BillingDocument

type BillingDocument struct {
	MissingFields

	ID          string                 `json:"id,omitempty"`
	ResourceID  string                 `json:"_rid,omitempty"`
	Timestamp   int                    `json:"_ts,omitempty"`
	Self        string                 `json:"_self,omitempty"`
	ETag        string                 `json:"_etag,omitempty" deep:"-"`
	Attachments string                 `json:"_attachments,omitempty"`
	LSN         int                    `json:"_lsn,omitempty"`
	Metadata    map[string]interface{} `json:"_metadata,omitempty"`

	Billing *Billing `json:"billing,omitempty"`

	Key                       string `json:"key,omitempty"`
	ClusterResourceGroupIDKey string `json:"clusterResourceGroupIDKey,omitempty"`
	InfraID                   string `json:"infraId,omitempty"`
}

BillingDocument represents a billing document. pkg/database/cosmosdb requires its definition.

func (*BillingDocument) String

func (c *BillingDocument) String() string

type BillingDocuments

type BillingDocuments struct {
	Count            int                `json:"_count,omitempty"`
	ResourceID       string             `json:"_rid,omitempty"`
	BillingDocuments []*BillingDocument `json:"Documents,omitempty"`
}

BillingDocuments represents billing documents. pkg/database/cosmosdb requires its definition.

func (*BillingDocuments) String

func (c *BillingDocuments) String() string

type CloudError

type CloudError struct {
	// The status code.
	StatusCode int `json:"-"`

	// An error response from the service.
	*CloudErrorBody `json:"error,omitempty"`
}

CloudError represents a cloud error.

func NewCloudError

func NewCloudError(statusCode int, code, target, message string, a ...interface{}) *CloudError

NewCloudError returns a new CloudError

func (*CloudError) Error

func (err *CloudError) Error() string

type CloudErrorBody

type CloudErrorBody struct {
	// An identifier for the error. Codes are invariant and are intended to be consumed programmatically.
	Code string `json:"code,omitempty"`

	// A message describing the error, intended to be suitable for display in a user interface.
	Message string `json:"message,omitempty"`

	// The target of the particular error. For example, the name of the property in error.
	Target string `json:"target,omitempty"`

	//A list of additional details about the error.
	Details []CloudErrorBody `json:"details,omitempty"`
}

CloudErrorBody represents the body of a cloud error.

func (*CloudErrorBody) String

func (b *CloudErrorBody) String() string

type ClusterManagerConfigurationDocument

type ClusterManagerConfigurationDocument struct {
	MissingFields

	ID          string                 `json:"id,omitempty"`
	ResourceID  string                 `json:"_rid,omitempty"`
	Timestamp   int                    `json:"_ts,omitempty"`
	Self        string                 `json:"_self,omitempty"`
	ETag        string                 `json:"_etag,omitempty" deep:"-"`
	Attachments string                 `json:"_attachments,omitempty"`
	TTL         int                    `json:"ttl,omitempty"`
	LSN         int                    `json:"_lsn,omitempty"`
	Metadata    map[string]interface{} `json:"_metadata,omitempty"`

	Key          string `json:"key,omitempty"`
	PartitionKey string `json:"partitionKey,omitempty" deep:"-"`
	Deleting     bool   `json:"deleting,omitempty"` // https://docs.microsoft.com/en-us/azure/cosmos-db/change-feed-design-patterns#deletes

	SyncIdentityProvider *SyncIdentityProvider `json:"syncIdentityProvider,omitempty"`
	SyncSet              *SyncSet              `json:"syncSet,omitempty"`
	MachinePool          *MachinePool          `json:"machinePool,omitempty"`
	Secret               *Secret               `json:"secret,omitempty"`

	CorrelationData *CorrelationData `json:"correlationData,omitempty" deep:"-"`
}

OpenShiftClusterManagerConfigurationDocument represents an OpenShift cluster manager configuration document. pkg/database/cosmosdb requires its definition.

func ExampleClusterManagerConfigurationDocumentMachinePool

func ExampleClusterManagerConfigurationDocumentMachinePool() *ClusterManagerConfigurationDocument

func ExampleClusterManagerConfigurationDocumentSecret

func ExampleClusterManagerConfigurationDocumentSecret() *ClusterManagerConfigurationDocument

func ExampleClusterManagerConfigurationDocumentSyncIdentityProvider

func ExampleClusterManagerConfigurationDocumentSyncIdentityProvider() *ClusterManagerConfigurationDocument

func ExampleClusterManagerConfigurationDocumentSyncSet

func ExampleClusterManagerConfigurationDocumentSyncSet() *ClusterManagerConfigurationDocument

ExampleClusterManagerConfigurationDocumentSyncSet returns a ClusterManagerConfigurationDocument with an example syncset payload model. The resources field comes from the ./hack/ocm folder.

func (*ClusterManagerConfigurationDocument) String

String returns a JSON representation of the OpenShiftClusterManagerConfigurationDocument struct.

type ClusterManagerConfigurationDocuments

type ClusterManagerConfigurationDocuments struct {
	Count                                int                                    `json:"_count,omitempty"`
	ResourceID                           string                                 `json:"_rid,omitempty"`
	ClusterManagerConfigurationDocuments []*ClusterManagerConfigurationDocument `json:"Documents,omitempty"`
}

ClusterManagerConfigurationDocument represents OpenShift cluster manager configuration documents. pkg/database/cosmosdb requires its definition.

func (*ClusterManagerConfigurationDocuments) String

String returns a JSON representation of the OpenShiftClusterManagerConfigurationDocuments struct.

type ClusterManagerStaticValidator

type ClusterManagerStaticValidator interface {
	Static(string, string) error
}

type ClusterProfile

type ClusterProfile struct {
	MissingFields

	PullSecret                    SecureString         `json:"pullSecret,omitempty"`
	Domain                        string               `json:"domain,omitempty"`
	Version                       string               `json:"version,omitempty"`
	ResourceGroupID               string               `json:"resourceGroupId,omitempty"`
	FipsValidatedModules          FipsValidatedModules `json:"fipsValidatedModules,omitempty"`
	OIDCIssuer                    *OIDCIssuer          `json:"oidcIssuer,omitempty"`
	BoundServiceAccountSigningKey *SecureString        `json:"boundServiceAccountSigningKey,omitempty"`
}

ClusterProfile represents a cluster profile.

type ConsoleProfile

type ConsoleProfile struct {
	MissingFields

	URL string `json:"url,omitempty"`
}

ConsoleProfile represents a console profile.

type CorrelationData

type CorrelationData struct {
	// CorrelationID contains value of x-ms-correlation-request-id
	CorrelationID string `json:"correlationId,omitempty"`

	// ClientRequestID contains value of x-ms-client-request-id
	ClientRequestID string `json:"clientRequestId,omitempty"`

	// OperationID contains the unique ID generated for each operation that the ARO-RP performs
	OperationID string `json:"operationID,omitempty"`

	// RequestID contains value of x-ms-request-id
	RequestID string `json:"requestID,omitempty"`

	// ClientPrincipalName contains value of x-ms-client-principal-name
	ClientPrincipalName string `json:"clientPrincipalName,omitempty"`

	// RequestTime is the time that the request was received
	RequestTime time.Time `json:"requestTime,omitempty"`
}

CorrelationData represents data used for metrics or tracing between ARO-RP and ARM. https://eng.ms/docs/products/arm/rpaas/contract/requestheaders

func CreateCorrelationDataFromReq

func CreateCorrelationDataFromReq(req *http.Request) *CorrelationData

func GetCorrelationDataFromCtx

func GetCorrelationDataFromCtx(ctx context.Context) *CorrelationData

type CreatedByType

type CreatedByType string

CreatedByType by defines user type, which executed the request This field should match common-types field names for swagger and sdk generation

const (
	CreatedByTypeApplication     CreatedByType = "Application"
	CreatedByTypeKey             CreatedByType = "Key"
	CreatedByTypeManagedIdentity CreatedByType = "ManagedIdentity"
	CreatedByTypeUser            CreatedByType = "User"
)

type Display

type Display struct {
	// Friendly name of the resource provider.
	Provider string `json:"provider,omitempty"`

	// Resource type on which the operation is performed.
	Resource string `json:"resource,omitempty"`

	// Operation type: read, write, delete, listKeys/action, etc.
	Operation string `json:"operation,omitempty"`

	// Friendly name of the operation.
	Description string `json:"description,omitempty"`
}

Display represents the display details of an operation.

type EffectiveOutboundIP

type EffectiveOutboundIP ResourceReference

EffectiveOutboundIP represents an effective outbound IP resource of the cluster public load balancer.

type EncryptionAtHost

type EncryptionAtHost string

EncryptionAtHost represents encryption at host.

const (
	EncryptionAtHostEnabled  EncryptionAtHost = "Enabled"
	EncryptionAtHostDisabled EncryptionAtHost = "Disabled"
)

EncryptionAtHost constants

type FeatureProfile

type FeatureProfile struct {
	MissingFields

	GatewayEnabled bool `json:"gatewayEnabled,omitempty"`
}

FeatureProfile represents a feature profile.

type FipsValidatedModules

type FipsValidatedModules string

FipsValidatedModules determines if FIPS is used.

const (
	FipsValidatedModulesEnabled  FipsValidatedModules = "Enabled"
	FipsValidatedModulesDisabled FipsValidatedModules = "Disabled"
)

FipsValidatedModules constants.

type Gateway

type Gateway struct {
	MissingFields

	ID       string `json:"id,omitempty"`
	Deleting bool   `json:"deleting,omitempty"` // https://docs.microsoft.com/en-us/azure/cosmos-db/change-feed-design-patterns#deletes

	StorageSuffix                   string `json:"storageSuffix,omitempty"`
	ImageRegistryStorageAccountName string `json:"imageRegistryStorageAccountName,omitempty"`
}

Gateway represents a Gateway entry

type GatewayDocument

type GatewayDocument struct {
	MissingFields

	ID          string                 `json:"id,omitempty"`
	ResourceID  string                 `json:"_rid,omitempty"`
	Timestamp   int                    `json:"_ts,omitempty"`
	Self        string                 `json:"_self,omitempty"`
	ETag        string                 `json:"_etag,omitempty" deep:"-"`
	Attachments string                 `json:"_attachments,omitempty"`
	TTL         int                    `json:"ttl,omitempty"`
	LSN         int                    `json:"_lsn,omitempty"`
	Metadata    map[string]interface{} `json:"_metadata,omitempty"`

	Gateway *Gateway `json:"gateway,omitempty"`
}

GatewayDocument represents a gateway document. pkg/database/cosmosdb requires its definition.

func (*GatewayDocument) String

func (c *GatewayDocument) String() string

type GatewayDocuments

type GatewayDocuments struct {
	Count            int                `json:"_count,omitempty"`
	ResourceID       string             `json:"_rid,omitempty"`
	GatewayDocuments []*GatewayDocument `json:"Documents,omitempty"`
}

GatewayDocuments represents gateway documents. pkg/database/cosmosdb requires its definition.

func (*GatewayDocuments) String

func (c *GatewayDocuments) String() string

type HiveProfile

type HiveProfile struct {
	MissingFields

	Namespace string `json:"namespace,omitempty"`

	// CreatedByHive is used during PUCM to skip adoption and reconciliation
	// of clusters that were created by Hive to avoid deleting existing
	// ClusterDeployments.
	CreatedByHive bool `json:"createdByHive,omitempty"`
}

HiveProfile represents the hive related data of a cluster

type IngressProfile

type IngressProfile struct {
	MissingFields

	Name       string     `json:"name,omitempty"`
	Visibility Visibility `json:"visibility,omitempty"`
	IP         string     `json:"ip,omitempty"`
}

IngressProfile represents an ingress profile

type Install

type Install struct {
	MissingFields

	Now   time.Time    `json:"now,omitempty"`
	Phase InstallPhase `json:"phase"`
}

Install represents an install process

type InstallPhase

type InstallPhase int

InstallPhase represents an install phase

const (
	InstallPhaseBootstrap InstallPhase = iota
	InstallPhaseRemoveBootstrap
)

InstallPhase constants

func InstallPhaseString

func InstallPhaseString(s string) (InstallPhase, error)

InstallPhaseString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.

func InstallPhaseValues

func InstallPhaseValues() []InstallPhase

InstallPhaseValues returns all values of the enum

func (InstallPhase) IsAInstallPhase

func (i InstallPhase) IsAInstallPhase() bool

IsAInstallPhase returns "true" if the value is listed in the enum definition. "false" otherwise

func (InstallPhase) MarshalJSON

func (p InstallPhase) MarshalJSON() ([]byte, error)

MarshalJSON marshals an InstallPhase

func (InstallPhase) String

func (i InstallPhase) String() string

func (*InstallPhase) UnmarshalJSON

func (p *InstallPhase) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals an InstallPhase

type Kubeconfig

type Kubeconfig struct {
	MissingFields

	Elevated bool `json:"elevated,omitempty"`
}

type LoadBalancerProfile

type LoadBalancerProfile struct {
	// The desired managed outbound IPs for the cluster public load balancer.
	ManagedOutboundIPs *ManagedOutboundIPs `json:"managedOutboundIps,omitempty"`
	// The list of effective outbound IP addresses of the public load balancer.
	EffectiveOutboundIPs []EffectiveOutboundIP `json:"effectiveOutboundIps,omitempty" swagger:"readOnly"`
	// The desired outbound IP resources for the cluster load balancer.
	OutboundIPs []OutboundIP `json:"outboundIps,omitempty"`
	// The desired outbound IP Prefix resources for the cluster load balancer.
	OutboundIPPrefixes []OutboundIPPrefix `json:"outboundIpPrefixes,omitempty"`
	// The desired number of allocated SNAT ports per VM. Allowed values are in the range of 0 to 64000 (inclusive). The default value is 1024.
	AllocatedOutboundPorts *int `json:"allocatedOutboundPorts,omitempty"`
}

LoadBalancerProfile represents the profile of the cluster public load balancer.

type MTUSize

type MTUSize int

MTUSize represents the MTU size of a cluster

const (
	MTU1500 MTUSize = 1500
	MTU3900 MTUSize = 3900
)

MTUSize constants

type MachinePool

type MachinePool struct {
	// The Resource ID.
	ID string `json:"id,omitempty"`

	// The resource name.
	Name string `json:"name,omitempty"`

	// The resource type.
	Type string `json:"type,omitempty"`

	// SystemData metadata relating to this resource.
	SystemData *SystemData `json:"systemData,omitempty"`

	// The MachinePool Properties
	Properties MachinePoolProperties `json:"properties,omitempty"`
}

MachinePool represents a MachinePool

type MachinePoolConverter

type MachinePoolConverter interface {
	ToExternal(*MachinePool) interface{}
	ToExternalList([]*MachinePool) interface{}
	ToInternal(interface{}, *MachinePool)
}

type MachinePoolList

type MachinePoolList struct {
	// The list of MachinePools.
	MachinePools []*MachinePool `json:"value"`
}

MachinePoolList represents a list of MachinePools

type MachinePoolProperties

type MachinePoolProperties struct {
	Resources string `json:"resources,omitempty"`
}

MachinePoolProperties represents the properties of a MachinePool

type MaintenanceState

type MaintenanceState string

MaintenanceState represents the maintenance state of a cluster. This is used by cluster monitornig stack to emit maintenance signals to customers.

const (
	MaintenanceStateNone                 MaintenanceState = "None"
	MaintenanceStatePending              MaintenanceState = "Pending"
	MaintenanceStatePlanned              MaintenanceState = "Planned"
	MaintenanceStateUnplanned            MaintenanceState = "Unplanned"
	MaintenanceStateCustomerActionNeeded MaintenanceState = "CustomerActionNeeded"
)

type MaintenanceTask

type MaintenanceTask string
const (
	MaintenanceTaskEverything        MaintenanceTask = "Everything"
	MaintenanceTaskOperator          MaintenanceTask = "OperatorUpdate"
	MaintenanceTaskRenewCerts        MaintenanceTask = "CertificatesRenewal"
	MaintenanceTaskSyncClusterObject MaintenanceTask = "SyncClusterObject"

	MaintenanceTaskPending MaintenanceTask = "Pending"

	// None signal should only be used when (1) admin update fails and (2) SRE fixes the failed admin update without running another admin updates
	// Admin update success should automatically set the cluster into None state
	MaintenanceTaskNone MaintenanceTask = "None"

	// Customer action needed signal should only be used when (1) admin update fails and (2) customer needs to take action to resolve the failure
	// To remove the signal after customer takes action, use maintenance task None
	MaintenanceTaskCustomerActionNeeded MaintenanceTask = "CustomerActionNeeded"
)

func (MaintenanceTask) IsMaintenanceOngoingTask

func (t MaintenanceTask) IsMaintenanceOngoingTask() bool

IsMaintenanceOngoingTask returns true if the maintenance task should change state to maintenance ongoing (planned/unplanned)

type ManagedOutboundIPs

type ManagedOutboundIPs struct {
	// Count represents the desired number of IPv4 outbound IPs created and managed by Azure for the cluster public load balancer.  Allowed values are in the range of 1 - 20.  The default value is 1.
	Count int `json:"count,omitempty"`
}

ManagedOutboundIPs represents the desired managed outbound IPs for the cluster public load balancer.

type ManagedServiceIdentity

type ManagedServiceIdentity struct {
	MissingFields

	// The type of the ManagedServiceIdentity resource.
	Type ManagedServiceIdentityType `json:"type,omitempty"`

	// The PrincipalID of the Identity resource.
	PrincipalID string `json:"principalId,omitempty" swagger:"readOnly"`

	// A map of user assigned identities attached to the cluster, specified in a type required by Microsoft's Managed Identity team.
	UserAssignedIdentities map[string]UserAssignedIdentity `json:"userAssignedIdentities,omitempty"`

	// The IdentityURL provided by the MSI RP
	IdentityURL string `json:"identityURL,omitempty" mutable:"true"`

	// The TenantID provided by the MSI RP
	TenantID string `json:"tenantId,omitempty" swagger:"readOnly"`
}

ManagedServiceIdentity stores information about the cluster MSI(s) in a workload identity cluster.

type ManagedServiceIdentityType

type ManagedServiceIdentityType string

The ManagedServiceIdentity type.

const (
	ManagedServiceIdentityNone                       ManagedServiceIdentityType = "None"
	ManagedServiceIdentitySystemAssigned             ManagedServiceIdentityType = "SystemAssigned"
	ManagedServiceIdentityUserAssigned               ManagedServiceIdentityType = "UserAssigned"
	ManagedServiceIdentitySystemAssignedUserAssigned ManagedServiceIdentityType = "SystemAssigned,UserAssigned"
)

ManagedServiceIdentityType constants

type MasterProfile

type MasterProfile struct {
	MissingFields

	VMSize              VMSize           `json:"vmSize,omitempty"`
	SubnetID            string           `json:"subnetId,omitempty"`
	EncryptionAtHost    EncryptionAtHost `json:"encryptionAtHost,omitempty"`
	DiskEncryptionSetID string           `json:"diskEncryptionSetId,omitempty"`
}

MasterProfile represents a master profile

type MissingFields

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

MissingFields retains values that do not map to struct fields during JSON marshalling/unmarshalling. MissingFields implements github.com/ugorji/go/codec.MissingFielder.

func (*MissingFields) CodecMissingField

func (mf *MissingFields) CodecMissingField(field []byte, value interface{}) bool

CodecMissingField is called to set a missing field and value pair

func (*MissingFields) CodecMissingFields

func (mf *MissingFields) CodecMissingFields() map[string]interface{}

CodecMissingFields returns the set of fields which are not struct fields

type Monitor

type Monitor struct {
	MissingFields

	Buckets []string `json:"buckets,omitempty"`
}

Monitor represents a monitor

type MonitorDocument

type MonitorDocument struct {
	MissingFields

	ID          string                 `json:"id,omitempty"`
	ResourceID  string                 `json:"_rid,omitempty"`
	Timestamp   int                    `json:"_ts,omitempty"`
	Self        string                 `json:"_self,omitempty"`
	ETag        string                 `json:"_etag,omitempty" deep:"-"`
	Attachments string                 `json:"_attachments,omitempty"`
	TTL         int                    `json:"ttl,omitempty"`
	LSN         int                    `json:"_lsn,omitempty"`
	Metadata    map[string]interface{} `json:"_metadata,omitempty"`

	LeaseOwner   string `json:"leaseOwner,omitempty"`
	LeaseExpires int    `json:"leaseExpires,omitempty"`

	Monitor *Monitor `json:"monitor,omitempty"`
}

MonitorDocument represents a monitor document. pkg/database/cosmosdb requires its definition.

type MonitorDocuments

type MonitorDocuments struct {
	Count            int                `json:"_count,omitempty"`
	ResourceID       string             `json:"_rid,omitempty"`
	MonitorDocuments []*MonitorDocument `json:"Documents,omitempty"`
}

MonitorDocuments represents monitor documents. pkg/database/cosmosdb requires its definition.

type NetworkProfile

type NetworkProfile struct {
	MissingFields

	PodCIDR                string                 `json:"podCidr,omitempty"`
	ServiceCIDR            string                 `json:"serviceCidr,omitempty"`
	SoftwareDefinedNetwork SoftwareDefinedNetwork `json:"softwareDefinedNetwork,omitempty"`
	MTUSize                MTUSize                `json:"mtuSize,omitempty"`
	OutboundType           OutboundType           `json:"outboundType,omitempty"`

	APIServerPrivateEndpointIP string               `json:"privateEndpointIp,omitempty"`
	GatewayPrivateEndpointIP   string               `json:"gatewayPrivateEndpointIp,omitempty"`
	GatewayPrivateLinkID       string               `json:"gatewayPrivateLinkId,omitempty"`
	PreconfiguredNSG           PreconfiguredNSG     `json:"preconfiguredNSG,omitempty"`
	LoadBalancerProfile        *LoadBalancerProfile `json:"loadBalancerProfile,omitempty"`
}

NetworkProfile represents a network profile

type OIDCIssuer

type OIDCIssuer string

OIDCIssuer represents the URL of the managed OIDC issuer in a workload identity cluster.

type OpenShiftCluster

type OpenShiftCluster struct {
	MissingFields

	// ID, Name and Type are cased as the user provided them at create time.
	// ID, Name, Type and Location are immutable.
	ID         string                     `json:"id,omitempty"`
	Name       string                     `json:"name,omitempty"`
	Type       string                     `json:"type,omitempty"`
	Location   string                     `json:"location,omitempty"`
	SystemData SystemData                 `json:"systemData,omitempty"`
	Tags       map[string]string          `json:"tags,omitempty"`
	Properties OpenShiftClusterProperties `json:"properties,omitempty"`
	Identity   *ManagedServiceIdentity    `json:"managedServiceIdentity,omitempty"`

	//this property is used in the enrichers. Should not be marshalled
	Lock sync.Mutex `json:"-"`
}

OpenShiftCluster represents an OpenShift cluster

func (*OpenShiftCluster) ClusterMsiResourceId

func (oc *OpenShiftCluster) ClusterMsiResourceId() (*arm.ResourceID, error)

ClusterMsiResourceId returns the resource ID of the cluster MSI or an error if it encounters an issue while grabbing the resource ID from the cluster doc. It is written under the assumption that there is only one cluster MSI and will have to be refactored if we ever use more than one.

func (*OpenShiftCluster) HasUserAssignedIdentities

func (oc *OpenShiftCluster) HasUserAssignedIdentities() bool

HasUserAssignedIdentities returns true if and only if the cluster doc's Identity.UserAssignedIdentities is non-nil and non-empty.

func (*OpenShiftCluster) UsesWorkloadIdentity

func (oc *OpenShiftCluster) UsesWorkloadIdentity() bool

UsesWorkloadIdentity checks whether a cluster is a Workload Identity cluster or a Service Principal cluster

type OpenShiftClusterAdminKubeconfigConverter

type OpenShiftClusterAdminKubeconfigConverter interface {
	ToExternal(*OpenShiftCluster) interface{}
}

type OpenShiftClusterConverter

type OpenShiftClusterConverter interface {
	ToExternal(*OpenShiftCluster) interface{}
	ToExternalList([]*OpenShiftCluster, string) interface{}
	ToInternal(interface{}, *OpenShiftCluster)
	ExternalNoReadOnly(interface{})
}

type OpenShiftClusterCredentialsConverter

type OpenShiftClusterCredentialsConverter interface {
	ToExternal(*OpenShiftCluster) interface{}
}

type OpenShiftClusterDocument

type OpenShiftClusterDocument struct {
	MissingFields

	ID          string                 `json:"id,omitempty" deep:"-"`
	ResourceID  string                 `json:"_rid,omitempty"`
	Timestamp   int                    `json:"_ts,omitempty"`
	Self        string                 `json:"_self,omitempty"`
	ETag        string                 `json:"_etag,omitempty" deep:"-"`
	Attachments string                 `json:"_attachments,omitempty"`
	LSN         int                    `json:"_lsn,omitempty"`
	Metadata    map[string]interface{} `json:"_metadata,omitempty"`

	Key                       string `json:"key,omitempty"`
	PartitionKey              string `json:"partitionKey,omitempty" deep:"-"`
	ClusterResourceGroupIDKey string `json:"clusterResourceGroupIdKey,omitempty"`
	ClientIDKey               string `json:"clientIdKey,omitempty"`

	Bucket int `json:"bucket,omitempty"`

	LeaseOwner   string `json:"leaseOwner,omitempty" deep:"-"`
	LeaseExpires int    `json:"leaseExpires,omitempty" deep:"-"`
	Dequeues     int    `json:"dequeues,omitempty"`

	AsyncOperationID string `json:"asyncOperationId,omitempty" deep:"-"`

	OpenShiftCluster *OpenShiftCluster `json:"openShiftCluster,omitempty"`

	CorrelationData *CorrelationData `json:"correlationData,omitempty" deep:"-"`
}

OpenShiftClusterDocument represents an OpenShift cluster document. pkg/database/cosmosdb requires its definition.

func ExampleOpenShiftClusterDocument

func ExampleOpenShiftClusterDocument() *OpenShiftClusterDocument

func (*OpenShiftClusterDocument) String

func (c *OpenShiftClusterDocument) String() string

type OpenShiftClusterDocuments

type OpenShiftClusterDocuments struct {
	Count                     int                         `json:"_count,omitempty"`
	ResourceID                string                      `json:"_rid,omitempty"`
	OpenShiftClusterDocuments []*OpenShiftClusterDocument `json:"Documents,omitempty"`
}

OpenShiftClusterDocuments represents OpenShift cluster documents. pkg/database/cosmosdb requires its definition.

func (*OpenShiftClusterDocuments) String

func (c *OpenShiftClusterDocuments) String() string

type OpenShiftClusterProperties

type OpenShiftClusterProperties struct {
	MissingFields

	ArchitectureVersion     ArchitectureVersion `json:"architectureVersion,omitempty"`
	ProvisioningState       ProvisioningState   `json:"provisioningState,omitempty"`
	LastProvisioningState   ProvisioningState   `json:"lastProvisioningState,omitempty"`
	FailedProvisioningState ProvisioningState   `json:"failedProvisioningState,omitempty"`
	LastAdminUpdateError    string              `json:"lastAdminUpdateError,omitempty"`
	MaintenanceTask         MaintenanceTask     `json:"maintenanceTask,omitempty"`

	// Operator feature/option flags
	OperatorFlags   OperatorFlags `json:"operatorFlags,omitempty"`
	OperatorVersion string        `json:"operatorVersion,omitempty"`

	CreatedAt time.Time `json:"createdAt,omitempty"`

	// CreatedBy is the RP version (Git commit hash) that created this cluster
	CreatedBy string `json:"createdBy,omitempty"`

	// ProvisionedBy is the RP version (Git commit hash) that last successfully
	// admin updated this cluster
	ProvisionedBy string `json:"provisionedBy,omitempty"`

	ClusterProfile ClusterProfile `json:"clusterProfile,omitempty"`

	FeatureProfile FeatureProfile `json:"featureProfile,omitempty"`

	ConsoleProfile ConsoleProfile `json:"consoleProfile,omitempty"`

	ServicePrincipalProfile *ServicePrincipalProfile `json:"servicePrincipalProfile,omitempty"`

	PlatformWorkloadIdentityProfile *PlatformWorkloadIdentityProfile `json:"platformWorkloadIdentityProfile,omitempty"`

	NetworkProfile NetworkProfile `json:"networkProfile,omitempty"`

	MasterProfile MasterProfile `json:"masterProfile,omitempty"`

	// WorkerProfiles is used to store the worker profile data that was sent in the api request
	WorkerProfiles []WorkerProfile `json:"workerProfiles,omitempty"`

	// WorkerProfilesStatus is used to store the enriched worker profile data
	WorkerProfilesStatus []WorkerProfile `json:"workerProfilesStatus,omitempty" swagger:"readOnly"`

	APIServerProfile APIServerProfile `json:"apiserverProfile,omitempty"`

	IngressProfiles []IngressProfile `json:"ingressProfiles,omitempty"`

	// Install is non-nil only when an install is in progress
	Install *Install `json:"install,omitempty"`

	StorageSuffix                   string `json:"storageSuffix,omitempty"`
	ImageRegistryStorageAccountName string `json:"imageRegistryStorageAccountName,omitempty"`

	InfraID string      `json:"infraId,omitempty"`
	SSHKey  SecureBytes `json:"sshKey,omitempty"`

	// AdminKubeconfig is installer generated kubeconfig. It is 10 year config,
	// and should never be returned to the user.
	AdminKubeconfig SecureBytes `json:"adminKubeconfig,omitempty"`
	// AROServiceKubeconfig is used by ARO services. In example monitor
	AROServiceKubeconfig SecureBytes `json:"aroServiceKubeconfig,omitempty"`
	// AROSREKubeconfig is used by portal when proxying request from SRE
	AROSREKubeconfig SecureBytes `json:"aroSREKubeconfig,omitempty"`
	// KubeadminPassword installer generated kube-admin password
	KubeadminPassword SecureString `json:"kubeadminPassword,omitempty"`

	// UserAdminKubeconfig is derived admin kubeConfig with shorter live span
	UserAdminKubeconfig SecureBytes `json:"userAdminKubeconfig,omitempty"`

	RegistryProfiles []*RegistryProfile `json:"registryProfiles,omitempty"`

	HiveProfile HiveProfile `json:"hiveProfile,omitempty"`

	MaintenanceState MaintenanceState `json:"maintenanceState,omitempty"`
}

OpenShiftClusterProperties represents an OpenShift cluster's properties

type OpenShiftClusterStaticValidator

type OpenShiftClusterStaticValidator interface {
	Static(interface{}, *OpenShiftCluster, string, string, bool, string) error
}

type OpenShiftVersion

type OpenShiftVersion struct {
	MissingFields

	ID       string `json:"id,omitempty"`
	Name     string `json:"name,omitempty"`
	Type     string `json:"type,omitempty"`
	Deleting bool   `json:"deleting,omitempty"` // https://docs.microsoft.com/en-us/azure/cosmos-db/change-feed-design-patterns#deletes

	// The properties for the OpenShiftVersion resource.
	Properties OpenShiftVersionProperties `json:"properties,omitempty"`
}

OpenShiftVersion represents an OpenShift version that can be installed

type OpenShiftVersionConverter

type OpenShiftVersionConverter interface {
	ToExternal(*OpenShiftVersion) interface{}
	ToExternalList([]*OpenShiftVersion) interface{}
	ToInternal(interface{}, *OpenShiftVersion)
}

type OpenShiftVersionDocument

type OpenShiftVersionDocument struct {
	MissingFields

	ID          string                 `json:"id,omitempty"`
	ResourceID  string                 `json:"_rid,omitempty"`
	Timestamp   int                    `json:"_ts,omitempty"`
	Self        string                 `json:"_self,omitempty"`
	ETag        string                 `json:"_etag,omitempty" deep:"-"`
	Attachments string                 `json:"_attachments,omitempty"`
	TTL         int                    `json:"ttl,omitempty"`
	LSN         int                    `json:"_lsn,omitempty"`
	Metadata    map[string]interface{} `json:"_metadata,omitempty"`

	OpenShiftVersion *OpenShiftVersion `json:"openShiftVersion,omitempty"`
}

OpenShiftVersionDocument represents an OpenShift version specification document. pkg/database/cosmosdb requires its definition.

func ExampleOpenShiftVersionDocument

func ExampleOpenShiftVersionDocument() *OpenShiftVersionDocument

func (*OpenShiftVersionDocument) String

func (c *OpenShiftVersionDocument) String() string

type OpenShiftVersionDocuments

type OpenShiftVersionDocuments struct {
	Count                     int                         `json:"_count,omitempty"`
	ResourceID                string                      `json:"_rid,omitempty"`
	OpenShiftVersionDocuments []*OpenShiftVersionDocument `json:"Documents,omitempty"`
}

OpenShiftVersionDocuments represents OpenShift version specification documents. pkg/database/cosmosdb requires its definition.

func (*OpenShiftVersionDocuments) String

func (c *OpenShiftVersionDocuments) String() string

type OpenShiftVersionProperties

type OpenShiftVersionProperties struct {
	MissingFields

	// Version represents the version to create the cluster at.
	Version           string `json:"version,omitempty"`
	OpenShiftPullspec string `json:"openShiftPullspec,omitempty"`
	InstallerPullspec string `json:"installerPullspec,omitempty"`
	Enabled           bool   `json:"enabled,omitempty"`
	Default           bool   `json:"default,omitempty"`
}

OpenShiftVersionProperties represents the properties of an OpenShiftVersion.

type OpenShiftVersionStaticValidator

type OpenShiftVersionStaticValidator interface {
	Static(interface{}, *OpenShiftVersion) error
}

type Operation

type Operation struct {
	// Operation name: {provider}/{resource}/{operation}.
	Name string `json:"name,omitempty"`

	// The object that describes the operation.
	Display Display `json:"display,omitempty"`

	// Sources of requests to this operation.  Comma separated list with valid values user or system, e.g. "user,system".
	Origin string `json:"origin,omitempty"`
}

Operation represents an RP operation.

type OperationList

type OperationList struct {
	// List of operations supported by the resource provider.
	Operations []Operation `json:"value"`

	// The link used to get the next page of operations.
	NextLink string `json:"nextLink,omitempty"`
}

OperationList represents an RP operation list.

type OperatorFlags

type OperatorFlags map[string]string

Cluster-scoped flags

type OutboundIP

type OutboundIP ResourceReference

OutboundIP represents a desired outbound IP resource for the cluster load balancer.

type OutboundIPPrefix

type OutboundIPPrefix ResourceReference

OutboundIPPrefix represents a desired outbound IP Prefix resource for the cluster load balancer.

type OutboundType

type OutboundType string

The outbound routing strategy used to provide your cluster egress to the internet.

const (
	OutboundTypeUserDefinedRouting OutboundType = "UserDefinedRouting"
	OutboundTypeLoadbalancer       OutboundType = "Loadbalancer"
)

OutboundType constants

type PlatformWorkloadIdentity

type PlatformWorkloadIdentity struct {
	MissingFields

	// The resource ID of the PlatformWorkloadIdentity resource
	ResourceID string `json:"resourceId,omitempty"`

	// The ClientID of the PlatformWorkloadIdentity resource
	ClientID string `json:"clientId,omitempty" swagger:"readOnly"`

	// The ObjectID of the PlatformWorkloadIdentity resource
	ObjectID string `json:"objectId,omitempty" swagger:"readOnly"`
}

PlatformWorkloadIdentity stores information representing a single workload identity.

type PlatformWorkloadIdentityProfile

type PlatformWorkloadIdentityProfile struct {
	MissingFields

	UpgradeableTo              *UpgradeableTo                      `json:"upgradeableTo,omitempty"`
	PlatformWorkloadIdentities map[string]PlatformWorkloadIdentity `json:"platformWorkloadIdentities,omitempty"`
}

PlatformWorkloadIdentityProfile encapsulates all information that is specific to workload identity clusters.

type PlatformWorkloadIdentityRole

type PlatformWorkloadIdentityRole struct {
	OperatorName       string         `json:"operatorName,omitempty"`
	RoleDefinitionName string         `json:"roleDefinitionName,omitempty"`
	RoleDefinitionID   string         `json:"roleDefinitionId,omitempty"`
	ServiceAccounts    []string       `json:"serviceAccounts,omitempty"`
	SecretLocation     SecretLocation `json:"secretLocation,omitempty"`
}

PlatformWorkloadIdentityRole represents a mapping from a particular OCP operator to the built-in role that should be assigned to that operator's corresponding managed identity.

type PlatformWorkloadIdentityRoleSet

type PlatformWorkloadIdentityRoleSet struct {
	MissingFields

	ID       string `json:"id,omitempty"`
	Name     string `json:"name,omitempty"`
	Type     string `json:"type,omitempty"`
	Deleting bool   `json:"deleting,omitempty"` // https://docs.microsoft.com/en-us/azure/cosmos-db/change-feed-design-patterns#deletes

	Properties PlatformWorkloadIdentityRoleSetProperties `json:"properties,omitempty"`
}

PlatformWorkloadIdentityRoleSet represents a mapping from the names of OCP operators to the built-in roles that should be assigned to those operator's corresponding managed identities for a particular OCP version.

type PlatformWorkloadIdentityRoleSetConverter

type PlatformWorkloadIdentityRoleSetConverter interface {
	ToExternal(*PlatformWorkloadIdentityRoleSet) interface{}
	ToExternalList([]*PlatformWorkloadIdentityRoleSet) interface{}
	ToInternal(interface{}, *PlatformWorkloadIdentityRoleSet)
}

type PlatformWorkloadIdentityRoleSetDocument

type PlatformWorkloadIdentityRoleSetDocument struct {
	MissingFields

	ID          string                 `json:"id,omitempty"`
	ResourceID  string                 `json:"_rid,omitempty"`
	Timestamp   int                    `json:"_ts,omitempty"`
	Self        string                 `json:"_self,omitempty"`
	ETag        string                 `json:"_etag,omitempty" deep:"-"`
	Attachments string                 `json:"_attachments,omitempty"`
	TTL         int                    `json:"ttl,omitempty"`
	LSN         int                    `json:"_lsn,omitempty"`
	Metadata    map[string]interface{} `json:"_metadata,omitempty"`

	PlatformWorkloadIdentityRoleSet *PlatformWorkloadIdentityRoleSet `json:"platformWorkloadIdentityRoleSet,omitempty"`
}

PlatformWorkloadIdentityRoleSetDocument represents a document specifying a mapping from the names of OCP operators to the built-in roles that should be assigned to those operator's corresponding managed identities for a particular OCP version. pkg/database/cosmosdb requires its definition.

func ExamplePlatformWorkloadIdentityRoleSetDocument

func ExamplePlatformWorkloadIdentityRoleSetDocument() *PlatformWorkloadIdentityRoleSetDocument

func (*PlatformWorkloadIdentityRoleSetDocument) String

type PlatformWorkloadIdentityRoleSetDocuments

type PlatformWorkloadIdentityRoleSetDocuments struct {
	Count                                    int                                        `json:"_count,omitempty"`
	ResourceID                               string                                     `json:"_rid,omitempty"`
	PlatformWorkloadIdentityRoleSetDocuments []*PlatformWorkloadIdentityRoleSetDocument `json:"Documents,omitempty"`
}

PlatformWorkloadIdentityRoleSetDocuments represents a set of PlatformWorkloadIdentityRoleSetDocuments. pkg/database/cosmosdb requires its definition.

func (*PlatformWorkloadIdentityRoleSetDocuments) String

type PlatformWorkloadIdentityRoleSetProperties

type PlatformWorkloadIdentityRoleSetProperties struct {
	OpenShiftVersion              string                         `json:"openShiftVersion,omitempty"`
	PlatformWorkloadIdentityRoles []PlatformWorkloadIdentityRole `json:"platformWorkloadIdentityRoles,omitempty"`
}

PlatformWorkloadIdentityRoleSetProperties represents the properties of a PlatformWorkloadIdentityRoleSet resource.

type PlatformWorkloadIdentityRoleSetStaticValidator

type PlatformWorkloadIdentityRoleSetStaticValidator interface {
	Static(interface{}, *PlatformWorkloadIdentityRoleSet) error
}

type Portal

type Portal struct {
	MissingFields

	Username string `json:"username"`

	// ID is the resourceID of the cluster being accessed by the SRE
	ID string `json:"id,omitempty"`

	SSH        *SSH        `json:"ssh,omitempty"`
	Kubeconfig *Kubeconfig `json:"kubeconfig,omitempty"`
}

Portal represents a portal

type PortalDocument

type PortalDocument struct {
	MissingFields

	// ID is the unique authentication token used by the SRE
	ID          string                 `json:"id,omitempty"`
	ResourceID  string                 `json:"_rid,omitempty"`
	Timestamp   int                    `json:"_ts,omitempty"`
	Self        string                 `json:"_self,omitempty"`
	ETag        string                 `json:"_etag,omitempty"`
	Attachments string                 `json:"_attachments,omitempty"`
	TTL         int                    `json:"ttl,omitempty"`
	LSN         int                    `json:"_lsn,omitempty"`
	Metadata    map[string]interface{} `json:"_metadata,omitempty"`

	Portal *Portal `json:"portal,omitempty"`
}

PortalDocument represents a portal document. pkg/database/cosmosdb requires its definition.

func (*PortalDocument) String

func (c *PortalDocument) String() string

type PortalDocuments

type PortalDocuments struct {
	Count           int               `json:"_count,omitempty"`
	ResourceID      string            `json:"_rid,omitempty"`
	PortalDocuments []*PortalDocument `json:"Documents,omitempty"`
}

PortalDocuments represents portal documents. pkg/database/cosmosdb requires its definition.

func (*PortalDocuments) String

func (c *PortalDocuments) String() string

type PreconfiguredNSG

type PreconfiguredNSG string

PreconfiguredNSG represents whether customers want to use their own NSG attached to the subnets

const (
	PreconfiguredNSGEnabled  PreconfiguredNSG = "Enabled"
	PreconfiguredNSGDisabled PreconfiguredNSG = "Disabled"
)

PreconfiguredNSG constants

type PreflightRequest

type PreflightRequest struct {
	Resources []json.RawMessage `json:"resources"`
}

PreflightRequest is the request body of preflight

type Properties

type Properties map[string]interface{}

type ProvisioningState

type ProvisioningState string

ProvisioningState represents a provisioning state

const (
	ProvisioningStateCreating      ProvisioningState = "Creating"
	ProvisioningStateUpdating      ProvisioningState = "Updating"
	ProvisioningStateAdminUpdating ProvisioningState = "AdminUpdating"
	ProvisioningStateCanceled      ProvisioningState = "Canceled"
	ProvisioningStateDeleting      ProvisioningState = "Deleting"
	ProvisioningStateSucceeded     ProvisioningState = "Succeeded"
	ProvisioningStateFailed        ProvisioningState = "Failed"
)

ProvisioningState constants TODO: ProvisioningStateCanceled is included to pass upstream CI. It is currently unused in ARO.

func (ProvisioningState) IsTerminal

func (t ProvisioningState) IsTerminal() bool

IsTerminal returns true if state is Terminal

func (ProvisioningState) String

func (t ProvisioningState) String() string

type RegisteredFeatureProfile

type RegisteredFeatureProfile struct {
	MissingFields

	Name  string `json:"name,omitempty"`
	State string `json:"state,omitempty"`
}

RegisteredFeatureProfile represents the features registered to the subscription

type RegistryProfile

type RegistryProfile struct {
	MissingFields

	Name     string       `json:"name,omitempty"`
	Username string       `json:"username,omitempty"`
	Password SecureString `json:"password,omitempty"`
}

RegistryProfile represents a registry's login

type ResourceReference

type ResourceReference struct {
	// The fully qualified Azure resource id of an IP address resource.
	ID string `json:"id,omitempty"`
}

ResourceReference represents a reference to an Azure resource.

type ResourceTypeMeta

type ResourceTypeMeta struct {
	Id         string `json:"id"`
	Name       string `json:"name"`
	Type       string `json:"type"`
	Location   string `json:"location"`
	APIVersion string `json:"apiVersion"`
	Properties `json:"properties"`
}

ResourceTypeMeta is the Typemeta inside request body of preflight

type SSH

type SSH struct {
	MissingFields

	Master        int  `json:"master"`
	Authenticated bool `json:"authenticated,omitempty"`
}

type Secret

type Secret struct {
	// The Resource ID.
	ID string `json:"id,omitempty"`

	// The resource name.
	Name string `json:"name,omitempty"`

	// The resource type.
	Type string `json:"type,omitempty"`

	// SystemData metadata relating to this resource.
	SystemData *SystemData `json:"systemData,omitempty"`

	// The Secret Properties
	Properties SecretProperties `json:"properties,omitempty"`
}

Secret represents a secret.

type SecretConverter

type SecretConverter interface {
	ToExternal(*Secret) interface{}
	ToExternalList([]*Secret) interface{}
	ToInternal(interface{}, *Secret)
}

type SecretList

type SecretList struct {
	// The list of Secrets.
	Secrets []*Secret `json:"value"`
}

SecretList represents a list of Secrets

type SecretLocation

type SecretLocation struct {
	Namespace string `json:"namespace,omitempty"`
	Name      string `json:"name,omitempty"`
}

SecretLocation represents the location of the in-cluster secret containing credentials for the platform workload identity.

type SecretProperties

type SecretProperties struct {
	// The Secrets Resources.
	SecretResources SecureString `json:"secretResources,omitempty"`
}

SecretProperties represents the properties of a Secret

type SecureBytes

type SecureBytes []byte

SecureBytes represents an encrypted []byte

type SecureString

type SecureString string

SecureString represents an encrypted string

type ServicePrincipalProfile

type ServicePrincipalProfile struct {
	MissingFields

	ClientID     string       `json:"clientId,omitempty"`
	ClientSecret SecureString `json:"clientSecret,omitempty"`
	SPObjectID   string       `json:"spObjectId,omitempty"`
}

ServicePrincipalProfile represents a service principal profile.

type SoftwareDefinedNetwork

type SoftwareDefinedNetwork string

SoftwareDefinedNetwork

const (
	SoftwareDefinedNetworkOVNKubernetes SoftwareDefinedNetwork = "OVNKubernetes"
	SoftwareDefinedNetworkOpenShiftSDN  SoftwareDefinedNetwork = "OpenShiftSDN"
)

type Subscription

type Subscription struct {
	MissingFields

	State SubscriptionState `json:"state,omitempty"`

	Properties *SubscriptionProperties `json:"properties,omitempty"`
}

Subscription represents a subscription

type SubscriptionDocument

type SubscriptionDocument struct {
	MissingFields

	ID          string                 `json:"id,omitempty"`
	ResourceID  string                 `json:"_rid,omitempty"`
	Timestamp   int                    `json:"_ts,omitempty"`
	Self        string                 `json:"_self,omitempty"`
	ETag        string                 `json:"_etag,omitempty" deep:"-"`
	Attachments string                 `json:"_attachments,omitempty"`
	LSN         int                    `json:"_lsn,omitempty"`
	Metadata    map[string]interface{} `json:"_metadata,omitempty"`

	LeaseOwner   string `json:"leaseOwner,omitempty"`
	LeaseExpires int    `json:"leaseExpires,omitempty"`
	Dequeues     int    `json:"dequeues,omitempty"`

	Deleting bool `json:"deleting,omitempty"`

	Subscription *Subscription `json:"subscription,omitempty"`
}

SubscriptionDocument represents a subscription document. pkg/database/cosmosdb requires its definition.

func ExampleSubscriptionDocument

func ExampleSubscriptionDocument() *SubscriptionDocument

func (*SubscriptionDocument) String

func (c *SubscriptionDocument) String() string

type SubscriptionDocuments

type SubscriptionDocuments struct {
	Count                 int                     `json:"_count,omitempty"`
	ResourceID            string                  `json:"_rid,omitempty"`
	SubscriptionDocuments []*SubscriptionDocument `json:"Documents,omitempty"`
}

SubscriptionDocuments represents subscription documents. pkg/database/cosmosdb requires its definition.

func (*SubscriptionDocuments) String

func (c *SubscriptionDocuments) String() string

type SubscriptionProperties

type SubscriptionProperties struct {
	MissingFields

	TenantID           string                     `json:"tenantId,omitempty"`
	AccountOwner       *AccountOwnerProfile       `json:"accountOwner,omitempty"`
	RegisteredFeatures []RegisteredFeatureProfile `json:"registeredFeatures,omitempty"`
}

SubscriptionProperties represents subscription properties

type SubscriptionState

type SubscriptionState string

SubscriptionState represents a subscription state

const (
	SubscriptionStateRegistered   SubscriptionState = "Registered"
	SubscriptionStateUnregistered SubscriptionState = "Unregistered"
	SubscriptionStateWarned       SubscriptionState = "Warned"
	SubscriptionStateSuspended    SubscriptionState = "Suspended"
	SubscriptionStateDeleted      SubscriptionState = "Deleted"
)

SubscriptionState constants

type SyncIdentityProvider

type SyncIdentityProvider struct {
	// The Resource ID.
	ID string `json:"id,omitempty"`

	// The resource name.
	Name string `json:"name,omitempty"`

	// The resource type.
	Type string `json:"type,omitempty"`

	// SystemData metadata relating to this resource.
	SystemData *SystemData `json:"systemData,omitempty"`

	// The SyncIdentityProvider Properties
	Properties SyncIdentityProviderProperties `json:"properties,omitempty"`
}

SyncIdentityProvider represents a SyncIdentityProvider

type SyncIdentityProviderConverter

type SyncIdentityProviderConverter interface {
	ToExternal(*SyncIdentityProvider) interface{}
	ToExternalList([]*SyncIdentityProvider) interface{}
	ToInternal(interface{}, *SyncIdentityProvider)
}

type SyncIdentityProviderList

type SyncIdentityProviderList struct {
	// The list of SyncIdentityProvider.
	SyncIdentityProviders []*SyncIdentityProvider `json:"value"`
}

SyncIdentityProviderList represents a list of SyncIdentityProvider

type SyncIdentityProviderProperties

type SyncIdentityProviderProperties struct {
	// The SyncIdentityProvider Resources.
	Resources string `json:"resources,omitempty"`
}

SyncIdentityProviderProperties represents the properties of a SyncIdentityProvider

type SyncSet

type SyncSet struct {
	// Required resource properties in ARM
	ID   string `json:"id,omitempty"`
	Name string `json:"name,omitempty"`
	Type string `json:"type,omitempty"`

	// SystemData metadata relating to this resource.
	SystemData *SystemData `json:"systemData,omitempty"`

	// The SyncSets properties
	Properties SyncSetProperties `json:"properties,omitempty"`
}

SyncSet represents a SyncSet for an Azure Red Hat OpenShift Cluster.

type SyncSetConverter

type SyncSetConverter interface {
	ToExternal(*SyncSet) interface{}
	ToExternalList([]*SyncSet) interface{}
	ToInternal(interface{}, *SyncSet)
}

type SyncSetList

type SyncSetList struct {
	SyncSets []*SyncSet `json:"value"`
}

SyncSetList represents a list of SyncSets for a given cluster.

type SyncSetProperties

type SyncSetProperties struct {
	// Resources represents the SyncSets configuration.
	Resources string `json:"resources,omitempty"`
}

SyncSetProperties represents the properties of a SyncSet

type SystemData

type SystemData struct {
	CreatedBy          string        `json:"createdBy,omitempty"`
	CreatedByType      CreatedByType `json:"createdByType,omitempty"`
	CreatedAt          *time.Time    `json:"createdAt,omitempty"`
	LastModifiedBy     string        `json:"lastModifiedBy,omitempty"`
	LastModifiedByType CreatedByType `json:"lastModifiedByType,omitempty"`
	LastModifiedAt     *time.Time    `json:"lastModifiedAt,omitempty"`
}

SystemData represets metadata provided by arm. Time fields inside the struct are pointers so we could better verify which fields are provided to use by ARM or not. Time package does not comply with omitempty. More details about requirements: https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/common-api-contracts.md#system-metadata-for-all-azure-resources

type UpgradeableTo

type UpgradeableTo string

UpgradeableTo stores a single OpenShift version a workload identity cluster can be upgraded to

type UserAssignedIdentity

type UserAssignedIdentity struct {
	MissingFields

	// The ClientID of the UserAssignedIdentity resource
	ClientID string `json:"clientId,omitempty" swagger:"readOnly"`

	// The PrincipalID of the UserAssignedIdentity resource
	PrincipalID string `json:"principalId,omitempty" swagger:"readOnly"`
}

UserAssignedIdentity stores information about a user-assigned managed identity in a predefined format required by Microsoft's Managed Identity team.

type VMSize

type VMSize string

VMSize represents a VM size

const (
	VMSizeStandardD2sV3  VMSize = "Standard_D2s_v3"
	VMSizeStandardD4sV3  VMSize = "Standard_D4s_v3"
	VMSizeStandardD8sV3  VMSize = "Standard_D8s_v3"
	VMSizeStandardD16sV3 VMSize = "Standard_D16s_v3"
	VMSizeStandardD32sV3 VMSize = "Standard_D32s_v3"

	VMSizeStandardD4sV4  VMSize = "Standard_D4s_v4"
	VMSizeStandardD8sV4  VMSize = "Standard_D8s_v4"
	VMSizeStandardD16sV4 VMSize = "Standard_D16s_v4"
	VMSizeStandardD32sV4 VMSize = "Standard_D32s_v4"
	VMSizeStandardD64sV4 VMSize = "Standard_D64s_v4"

	VMSizeStandardD4sV5  VMSize = "Standard_D4s_v5"
	VMSizeStandardD8sV5  VMSize = "Standard_D8s_v5"
	VMSizeStandardD16sV5 VMSize = "Standard_D16s_v5"
	VMSizeStandardD32sV5 VMSize = "Standard_D32s_v5"
	VMSizeStandardD64sV5 VMSize = "Standard_D64s_v5"
	VMSizeStandardD96sV5 VMSize = "Standard_D96s_v5"

	VMSizeStandardD4asV4  VMSize = "Standard_D4as_v4"
	VMSizeStandardD8asV4  VMSize = "Standard_D8as_v4"
	VMSizeStandardD16asV4 VMSize = "Standard_D16as_v4"
	VMSizeStandardD32asV4 VMSize = "Standard_D32as_v4"
	VMSizeStandardD64asV4 VMSize = "Standard_D64as_v4"
	VMSizeStandardD96asV4 VMSize = "Standard_D96as_v4"

	VMSizeStandardD4asV5  VMSize = "Standard_D4as_v5"
	VMSizeStandardD8asV5  VMSize = "Standard_D8as_v5"
	VMSizeStandardD16asV5 VMSize = "Standard_D16as_v5"
	VMSizeStandardD32asV5 VMSize = "Standard_D32as_v5"
	VMSizeStandardD64asV5 VMSize = "Standard_D64as_v5"
	VMSizeStandardD96asV5 VMSize = "Standard_D96as_v5"

	VMSizeStandardD4dsV5  VMSize = "Standard_D4ds_v5"
	VMSizeStandardD8dsV5  VMSize = "Standard_D8ds_v5"
	VMSizeStandardD16dsV5 VMSize = "Standard_D16ds_v5"
	VMSizeStandardD32dsV5 VMSize = "Standard_D32ds_v5"
	VMSizeStandardD64dsV5 VMSize = "Standard_D64ds_v5"
	VMSizeStandardD96dsV5 VMSize = "Standard_D96ds_v5"

	VMSizeStandardE4sV3  VMSize = "Standard_E4s_v3"
	VMSizeStandardE8sV3  VMSize = "Standard_E8s_v3"
	VMSizeStandardE16sV3 VMSize = "Standard_E16s_v3"
	VMSizeStandardE32sV3 VMSize = "Standard_E32s_v3"

	VMSizeStandardE2sV4  VMSize = "Standard_E2s_v4"
	VMSizeStandardE4sV4  VMSize = "Standard_E4s_v4"
	VMSizeStandardE8sV4  VMSize = "Standard_E8s_v4"
	VMSizeStandardE16sV4 VMSize = "Standard_E16s_v4"
	VMSizeStandardE20sV4 VMSize = "Standard_E20s_v4"
	VMSizeStandardE32sV4 VMSize = "Standard_E32s_v4"
	VMSizeStandardE48sV4 VMSize = "Standard_E48s_v4"
	VMSizeStandardE64sV4 VMSize = "Standard_E64s_v4"

	VMSizeStandardE2sV5  VMSize = "Standard_E2s_v5"
	VMSizeStandardE4sV5  VMSize = "Standard_E4s_v5"
	VMSizeStandardE8sV5  VMSize = "Standard_E8s_v5"
	VMSizeStandardE16sV5 VMSize = "Standard_E16s_v5"
	VMSizeStandardE20sV5 VMSize = "Standard_E20s_v5"
	VMSizeStandardE32sV5 VMSize = "Standard_E32s_v5"
	VMSizeStandardE48sV5 VMSize = "Standard_E48s_v5"
	VMSizeStandardE64sV5 VMSize = "Standard_E64s_v5"
	VMSizeStandardE96sV5 VMSize = "Standard_E96s_v5"

	VMSizeStandardE4asV4  VMSize = "Standard_E4as_v4"
	VMSizeStandardE8asV4  VMSize = "Standard_E8as_v4"
	VMSizeStandardE16asV4 VMSize = "Standard_E16as_v4"
	VMSizeStandardE20asV4 VMSize = "Standard_E20as_v4"
	VMSizeStandardE32asV4 VMSize = "Standard_E32as_v4"
	VMSizeStandardE48asV4 VMSize = "Standard_E48as_v4"
	VMSizeStandardE64asV4 VMSize = "Standard_E64as_v4"
	VMSizeStandardE96asV4 VMSize = "Standard_E96as_v4"

	VMSizeStandardE8asV5  VMSize = "Standard_E8as_v5"
	VMSizeStandardE16asV5 VMSize = "Standard_E16as_v5"
	VMSizeStandardE20asV5 VMSize = "Standard_E20as_v5"
	VMSizeStandardE32asV5 VMSize = "Standard_E32as_v5"
	VMSizeStandardE48asV5 VMSize = "Standard_E48as_v5"
	VMSizeStandardE64asV5 VMSize = "Standard_E64as_v5"
	VMSizeStandardE96asV5 VMSize = "Standard_E96as_v5"

	VMSizeStandardE64isV3   VMSize = "Standard_E64is_v3"
	VMSizeStandardE80isV4   VMSize = "Standard_E80is_v4"
	VMSizeStandardE80idsV4  VMSize = "Standard_E80ids_v4"
	VMSizeStandardE96dsV5   VMSize = "Standard_E96ds_v5"
	VMSizeStandardE104isV5  VMSize = "Standard_E104is_v5"
	VMSizeStandardE104idsV5 VMSize = "Standard_E104ids_v5"

	VMSizeStandardF4sV2  VMSize = "Standard_F4s_v2"
	VMSizeStandardF8sV2  VMSize = "Standard_F8s_v2"
	VMSizeStandardF16sV2 VMSize = "Standard_F16s_v2"
	VMSizeStandardF32sV2 VMSize = "Standard_F32s_v2"
	VMSizeStandardF72sV2 VMSize = "Standard_F72s_v2"

	VMSizeStandardM128ms VMSize = "Standard_M128ms"

	VMSizeStandardL4s  VMSize = "Standard_L4s"
	VMSizeStandardL8s  VMSize = "Standard_L8s"
	VMSizeStandardL16s VMSize = "Standard_L16s"
	VMSizeStandardL32s VMSize = "Standard_L32s"

	VMSizeStandardL8sV2  VMSize = "Standard_L8s_v2"
	VMSizeStandardL16sV2 VMSize = "Standard_L16s_v2"
	VMSizeStandardL32sV2 VMSize = "Standard_L32s_v2"
	VMSizeStandardL48sV2 VMSize = "Standard_L48s_v2"
	VMSizeStandardL64sV2 VMSize = "Standard_L64s_v2"

	VMSizeStandardL8sV3  VMSize = "Standard_L8s_v3"
	VMSizeStandardL16sV3 VMSize = "Standard_L16s_v3"
	VMSizeStandardL32sV3 VMSize = "Standard_L32s_v3"
	VMSizeStandardL48sV3 VMSize = "Standard_L48s_v3"
	VMSizeStandardL64sV3 VMSize = "Standard_L64s_v3"

	// GPU VMs
	VMSizeStandardNC4asT4V3  VMSize = "Standard_NC4as_T4_v3"
	VMSizeStandardNC8asT4V3  VMSize = "Standard_NC8as_T4_v3"
	VMSizeStandardNC16asT4V3 VMSize = "Standard_NC16as_T4_v3"
	VMSizeStandardNC64asT4V3 VMSize = "Standard_NC64as_T4_v3"

	VMSizeStandardNC6sV3   VMSize = "Standard_NC6s_v3"
	VMSizeStandardNC12sV3  VMSize = "Standard_NC12s_v3"
	VMSizeStandardNC24sV3  VMSize = "Standard_NC24s_v3"
	VMSizeStandardNC24rsV3 VMSize = "Standard_NC24rs_v3"
)

VMSize constants add required resources in pkg/validate/dynamic/quota.go when adding a new VMSize

type VMSizeStruct

type VMSizeStruct struct {
	CoreCount int    `json:"coreCount,omitempty"`
	Family    string `json:"family,omitempty"`
}

type ValidationResult

type ValidationResult struct {
	Status ValidationStatus `json:"status"`
	Error  *CloudErrorBody  `json:"error,omitempty"`
}

ValidationResult is the validation result to return in the deployment preflight response body

type ValidationStatus

type ValidationStatus string
const (
	// ValidationStatusSucceeded means validation passed
	ValidationStatusSucceeded ValidationStatus = "Succeeded"
	// ValidationStatusFailed means validation failed
	ValidationStatusFailed ValidationStatus = "Failed"
)

type Version

type Version struct {
	OpenShiftClusterConverter                      OpenShiftClusterConverter
	OpenShiftClusterStaticValidator                OpenShiftClusterStaticValidator
	OpenShiftClusterCredentialsConverter           OpenShiftClusterCredentialsConverter
	OpenShiftClusterAdminKubeconfigConverter       OpenShiftClusterAdminKubeconfigConverter
	OpenShiftVersionConverter                      OpenShiftVersionConverter
	OpenShiftVersionStaticValidator                OpenShiftVersionStaticValidator
	PlatformWorkloadIdentityRoleSetConverter       PlatformWorkloadIdentityRoleSetConverter
	PlatformWorkloadIdentityRoleSetStaticValidator PlatformWorkloadIdentityRoleSetStaticValidator
	OperationList                                  OperationList
	SyncSetConverter                               SyncSetConverter
	MachinePoolConverter                           MachinePoolConverter
	SyncIdentityProviderConverter                  SyncIdentityProviderConverter
	SecretConverter                                SecretConverter
	ClusterManagerStaticValidator                  ClusterManagerStaticValidator
}

Version is a set of endpoints implemented by each API version

type Visibility

type Visibility string

Visibility represents visibility.

const (
	VisibilityPublic  Visibility = "Public"
	VisibilityPrivate Visibility = "Private"
)

Visibility constants

type WorkerProfile

type WorkerProfile struct {
	MissingFields

	Name                string           `json:"name,omitempty"`
	VMSize              VMSize           `json:"vmSize,omitempty"`
	DiskSizeGB          int              `json:"diskSizeGB,omitempty"`
	SubnetID            string           `json:"subnetId,omitempty"`
	Count               int              `json:"count,omitempty"`
	EncryptionAtHost    EncryptionAtHost `json:"encryptionAtHost,omitempty"`
	DiskEncryptionSetID string           `json:"diskEncryptionSetId,omitempty"`
}

WorkerProfile represents a worker profile

func GetEnrichedWorkerProfiles

func GetEnrichedWorkerProfiles(ocp OpenShiftClusterProperties) ([]WorkerProfile, string)

GetEnrichedWorkerProfiles returns WorkerProfilesStatus if not nil, otherwise WorkerProfiles with their respective json property name

Jump to

Keyboard shortcuts

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