api

package
v10.1.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2019 License: Apache-2.0 Imports: 11 Imported by: 108

Documentation

Overview

Package api defines the external API for the plugin.

Index

Constants

View Source
const (
	ContextKeyClientAuthorizer      contextKey = "ClientAuthorizer"
	ContextKeyVaultClientAuthorizer contextKey = "VaultClientAuthorizer"
	ContextAcceptLanguages          contextKey = "AcceptLanguages"
)
View Source
const (
	CommandRestartNetworkManager = "RestartNetworkManager"
	CommandRestartKubelet        = "RestartKubelet"
	CommandRestartDocker         = "RestartDocker"
)
View Source
const (
	// APIVersion is the version of this API
	APIVersion = "internal"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AADIdentityProvider

type AADIdentityProvider struct {
	Kind     string `json:"kind,omitempty"`
	ClientID string `json:"clientId,omitempty"`
	Secret   string `json:"secret,omitempty"`
	TenantID string `json:"tenantId,omitempty"`
	// CustomerAdminGroupID group memberships will get synced into the OpenShift group "osa-customer-admins"
	CustomerAdminGroupID *string `json:"customerAdminGroupId,omitempty"`
}

AADIdentityProvider defines Identity provider for MS AAD. It is based on OpenID IdentityProvider.

type AgentPoolProfile

type AgentPoolProfile struct {
	Name       string `json:"name,omitempty"`
	Count      int64  `json:"count,omitempty"`
	VMSize     VMSize `json:"vmSize,omitempty"`
	SubnetCIDR string `json:"subnetCidr,omitempty"`
	OSType     OSType `json:"osType,omitempty"`

	Role AgentPoolProfileRole `json:"role,omitempty"`
}

AgentPoolProfile represents configuration of OpenShift cluster VMs.

type AgentPoolProfileRole

type AgentPoolProfileRole string

AgentPoolProfileRole represents the role of the AgentPoolProfile.

const (
	// AgentPoolProfileRoleCompute is the compute role.
	AgentPoolProfileRoleCompute AgentPoolProfileRole = "compute"
	// AgentPoolProfileRoleInfra is the infra role.
	AgentPoolProfileRoleInfra AgentPoolProfileRole = "infra"
	// AgentPoolProfileRoleMaster is the master role.
	AgentPoolProfileRoleMaster AgentPoolProfileRole = "master"
)

type AuthProfile

type AuthProfile struct {
	IdentityProviders []IdentityProvider `json:"identityProviders,omitempty"`
}

AuthProfile defines all possible authentication profiles for the OpenShift cluster.

type AzProfile

type AzProfile struct {
	TenantID       string `json:"tenantId,omitempty"`
	SubscriptionID string `json:"subscriptionId,omitempty"`
	ResourceGroup  string `json:"resourceGroup,omitempty"`
}

AzProfile holds the azure context for where the cluster resides

type CertKeyPair

type CertKeyPair struct {
	Key  *rsa.PrivateKey   `json:"key,omitempty"`
	Cert *x509.Certificate `json:"cert,omitempty"`
}

CertKeyPair is an rsa private key and x509 certificate pair.

func (CertKeyPair) MarshalJSON

func (c CertKeyPair) MarshalJSON() ([]byte, error)

func (*CertKeyPair) UnmarshalJSON

func (c *CertKeyPair) UnmarshalJSON(b []byte) error

type CertKeyPairChain

type CertKeyPairChain struct {
	Key   *rsa.PrivateKey     `json:"key,omitempty"`
	Certs []*x509.Certificate `json:"certs,omitempty"`
}

CertKeyPairChain is an rsa private key and slice of x509 certificates.

type CertProfile

type CertProfile struct {
	// KeyVaultSecretURL (in, optional): the customer secret URL
	KeyVaultSecretURL string `json:"keyVaultSecretURL,omitempty"`
}

CertProfile contains the vault location for OpenShift certificates.

type CertificateConfig

type CertificateConfig struct {
	// CAs
	EtcdCa           CertKeyPair `json:"etcdCa,omitempty"`
	Ca               CertKeyPair `json:"ca,omitempty"`
	FrontProxyCa     CertKeyPair `json:"frontProxyCa,omitempty"`
	ServiceSigningCa CertKeyPair `json:"serviceSigningCa,omitempty"`
	ServiceCatalogCa CertKeyPair `json:"serviceCatalogCa,omitempty"`

	// etcd certificates
	EtcdServer CertKeyPair `json:"etcdServer,omitempty"`
	EtcdPeer   CertKeyPair `json:"etcdPeer,omitempty"`
	EtcdClient CertKeyPair `json:"etcdClient,omitempty"`

	// control plane certificates
	MasterServer         CertKeyPair      `json:"masterServer,omitempty"`
	OpenShiftConsole     CertKeyPairChain `json:"-"`
	Admin                CertKeyPair      `json:"admin,omitempty"`
	AggregatorFrontProxy CertKeyPair      `json:"aggregatorFrontProxy,omitempty"`
	MasterKubeletClient  CertKeyPair      `json:"masterKubeletClient,omitempty"`
	MasterProxyClient    CertKeyPair      `json:"masterProxyClient,omitempty"`
	OpenShiftMaster      CertKeyPair      `json:"openShiftMaster,omitempty"`
	NodeBootstrap        CertKeyPair      `json:"nodeBootstrap,omitempty"`
	SDN                  CertKeyPair      `json:"sdn,omitempty"`

	// infra certificates
	Registry             CertKeyPair      `json:"registry,omitempty"`
	RegistryConsole      CertKeyPair      `json:"registryConsole,omitempty"`
	Router               CertKeyPairChain `json:"-"`
	ServiceCatalogServer CertKeyPair      `json:"serviceCatalogServer,omitempty"`

	// misc certificates
	BlackBoxMonitor CertKeyPair `json:"blackBoxMonitor,omitempty"`

	// geneva integration certificates
	GenevaLogging CertKeyPair `json:"genevaLogging,omitempty"`
	GenevaMetrics CertKeyPair `json:"genevaMetrics,omitempty"`

	// red hat cdn client certificates
	PackageRepository CertKeyPair `json:"packageRepository,omitempty"`
}

CertificateConfig contains all certificate configuration for the cluster.

type Command

type Command string

type ComponentLogLevel

type ComponentLogLevel struct {
	APIServer         *int `json:"apiServer,omitempty"`
	ControllerManager *int `json:"controllerManager,omitempty"`
	Node              *int `json:"node,omitempty"`
}

ComponentLogLevel represents the log levels for the various components of a cluster

type Config

type Config struct {
	// SecurityPatchPackages defines a list of rpm packages that fix security issues
	SecurityPatchPackages []string `json:"securityPatchPackages,omitempty"`

	// PluginVersion defines release version of the plugin used to build the cluster
	PluginVersion string `json:"pluginVersion,omitempty"`

	// ComponentLogLevel specifies the log levels for the various openshift components
	ComponentLogLevel ComponentLogLevel `json:"componentLogLevel,omitempty"`

	// configuration of VMs in ARM template
	ImageOffer     string `json:"imageOffer,omitempty"`
	ImagePublisher string `json:"imagePublisher,omitempty"`
	ImageSKU       string `json:"imageSku,omitempty"`
	ImageVersion   string `json:"imageVersion,omitempty"`

	// SSH to system nodes allowed IP ranges
	SSHSourceAddressPrefixes []string `json:"sshSourceAddressPrefixes,omitempty"`

	SSHKey *rsa.PrivateKey `json:"sshKey,omitempty"`

	// configuration of other ARM resources
	ConfigStorageAccount      string `json:"configStorageAccount,omitempty"`
	ConfigStorageAccountKey   string `json:"-"`
	RegistryStorageAccount    string `json:"registryStorageAccount,omitempty"`
	RegistryStorageAccountKey string `json:"-"`
	AzureFileStorageAccount   string `json:"azureFileStorageAccount,omitempty"`

	Certificates CertificateConfig `json:"certificates,omitempty"`
	Images       ImageConfig       `json:"images,omitempty"`

	// kubeconfigs
	AdminKubeconfig           *v1.Config `json:"adminKubeconfig,omitempty"`
	MasterKubeconfig          *v1.Config `json:"masterKubeconfig,omitempty"`
	NodeBootstrapKubeconfig   *v1.Config `json:"nodeBootstrapKubeconfig,omitempty"`
	SDNKubeconfig             *v1.Config `json:"sdnKubeconfig,omitempty"`
	BlackBoxMonitorKubeconfig *v1.Config `json:"blackBoxMonitorKubeconfig,omitempty"`

	// misc control plane configurables
	ServiceAccountKey *rsa.PrivateKey `json:"serviceAccountKey,omitempty"`
	SessionSecretAuth []byte          `json:"sessionSecretAuth,omitempty"`
	SessionSecretEnc  []byte          `json:"sessionSecretEnc,omitempty"`

	// misc infra configurables
	RegistryHTTPSecret             []byte    `json:"registryHttpSecret,omitempty"`
	PrometheusProxySessionSecret   []byte    `json:"prometheusProxySessionSecret,omitempty"`
	AlertManagerProxySessionSecret []byte    `json:"alertManagerProxySessionSecret,omitempty"`
	AlertsProxySessionSecret       []byte    `json:"alertsProxySessionSecret,omitempty"`
	RegistryConsoleOAuthSecret     string    `json:"registryConsoleOAuthSecret,omitempty"`
	ConsoleOAuthSecret             string    `json:"consoleOAuthSecret,omitempty"`
	RouterStatsPassword            string    `json:"routerStatsPassword,omitempty"`
	EtcdMetricsPassword            string    `json:"etcdMetricsPassword,omitempty"`
	EtcdMetricsUsername            string    `json:"etcdMetricsUsername,omitempty"`
	ServiceCatalogClusterID        uuid.UUID `json:"serviceCatalogClusterId,omitempty"`

	// Geneva Metrics System (MDM) sector used for logging
	GenevaLoggingSector string `json:"genevaLoggingSector,omitempty"`
	// Geneva Metrics System (MDM) logging account
	GenevaLoggingAccount string `json:"genevaLoggingAccount,omitempty"`
	// Geneva Metrics System (MDM) logging namespace
	GenevaLoggingNamespace string `json:"genevaLoggingNamespace,omitempty"`
	// Geneva Metrics System (MDM) logging control plane parameters
	GenevaLoggingControlPlaneAccount     string `json:"genevaLoggingControlPlaneAccount,omitempty"`
	GenevaLoggingControlPlaneEnvironment string `json:"genevaLoggingControlPlaneEnvironment,omitempty"`
	GenevaLoggingControlPlaneRegion      string `json:"genevaLoggingControlPlaneRegion,omitempty"`
	// Geneva Metrics System (MDM) account name for metrics
	GenevaMetricsAccount string `json:"genevaMetricsAccount,omitempty"`
	// Geneva Metrics System (MDM) endpoint for metrics
	GenevaMetricsEndpoint string `json:"genevaMetricsEndpoint,omitempty"`

	MasterStartupSASURI string `json:"-"`
	WorkerStartupSASURI string `json:"-"`
}

Config holds the cluster config structure

func (*Config) DeepCopy

func (in *Config) DeepCopy() (out *Config)

func (Config) MarshalJSON

func (c Config) MarshalJSON() ([]byte, error)

func (*Config) UnmarshalJSON

func (c *Config) UnmarshalJSON(b []byte) error

type DeployFn

type DeployFn func(context.Context, map[string]interface{}) (*string, error)

DeployFn makes it possible to plug in different logic to the deploy. The implementor must initiate a deployment of the given template using mode resources.Incremental and wait for it to complete. DeployFn returns a string with an IP address OR FQDN for the API server.

type GenevaActionListClusterVMs

type GenevaActionListClusterVMs struct {
	VMs *[]string `json:"vms,omitempty"`
}

GenevaActionListClusterVMs is the struct returned by the ListClusterVMs Geneva action API

type GenevaActionListEtcdBackups

type GenevaActionListEtcdBackups struct {
	Name         string    `json:"name,omitempty"`
	LastModified time.Time `json:"lastModified,omitempty"`
}

GenevaActionListEtcdBackups is returned by the ListEtcdBackups Geneva action API

type GenevaActionPluginVersion

type GenevaActionPluginVersion struct {
	PluginVersion *string `json:"pluginVersion,omitempty"`
}

GenevaActionPluginVersion is the struct returned by the GetPluginVersion Geneva action API

type GenevaActions

type GenevaActions interface {
	// ListEtcdBackups lists available etcd backup
	ListEtcdBackups(ctx context.Context, cs *OpenShiftManagedCluster) ([]GenevaActionListEtcdBackups, error)

	// RecoverEtcdCluster recovers the cluster's etcd using the backup specified in the pluginConfig
	RecoverEtcdCluster(ctx context.Context, cs *OpenShiftManagedCluster, deployer DeployFn, backupBlob string) *PluginError

	// RotateClusterSecrets rotates the secrets in a cluster's config blob and then updates the cluster
	RotateClusterSecrets(ctx context.Context, cs *OpenShiftManagedCluster, deployer DeployFn) *PluginError

	// RotateClusterCertificates rotates the certificates in a cluster's config blob and then updates the cluster
	RotateClusterCertificates(ctx context.Context, cs *OpenShiftManagedCluster, deployer DeployFn) *PluginError

	// RotateClusterCertificatesAndSecrets rotates the certificates and secrets in a cluster's config blob and then updates the cluster
	RotateClusterCertificatesAndSecrets(ctx context.Context, cs *OpenShiftManagedCluster, deployer DeployFn) *PluginError

	// GetControlPlanePods fetches a consolidated list of the control plane pods in the cluster
	GetControlPlanePods(ctx context.Context, oc *OpenShiftManagedCluster) ([]byte, error)

	// ForceUpdate forces rotates all vms in a cluster
	ForceUpdate(ctx context.Context, cs *OpenShiftManagedCluster, deployer DeployFn) *PluginError

	// ListClusterVMs returns the hostnames of all vms in a cluster
	ListClusterVMs(ctx context.Context, cs *OpenShiftManagedCluster) (*GenevaActionListClusterVMs, error)

	// Reimage reimages a virtual machine in the cluster
	Reimage(ctx context.Context, oc *OpenShiftManagedCluster, hostname string) error

	// BackupEtcdCluster backs up the cluster's etcd
	BackupEtcdCluster(ctx context.Context, cs *OpenShiftManagedCluster, backupName string) error

	// RunCommand runs a predefined command on a virtual machine in the cluster
	RunCommand(ctx context.Context, cs *OpenShiftManagedCluster, hostname string, command Command) error

	// GetPluginVersion fetches the RP plugin version
	GetPluginVersion(ctx context.Context) *GenevaActionPluginVersion
}

GenevaActions is the interface for all geneva actions

type IdentityProvider

type IdentityProvider struct {
	Name     string      `json:"name,omitempty"`
	Provider interface{} `json:"provider,omitempty"`
}

IdentityProvider is heavily cut down equivalent to IdentityProvider in the upstream.

func (*IdentityProvider) UnmarshalJSON

func (ip *IdentityProvider) UnmarshalJSON(b []byte) error

type ImageConfig

type ImageConfig struct {
	// Format of the pull spec that is going to be
	// used in the cluster.
	Format string `json:"format,omitempty"`

	ClusterMonitoringOperator string `json:"clusterMonitoringOperator,omitempty"`
	AzureControllers          string `json:"azureControllers,omitempty"`
	PrometheusOperator        string `json:"prometheusOperator,omitempty"`
	Prometheus                string `json:"prometheus,omitempty"`
	PrometheusConfigReloader  string `json:"prometheusConfigReloader,omitempty"`
	ConfigReloader            string `json:"configReloader,omitempty"`
	AlertManager              string `json:"alertManager,omitempty"`
	NodeExporter              string `json:"nodeExporter,omitempty"`
	Grafana                   string `json:"grafana,omitempty"`
	KubeStateMetrics          string `json:"kubeStateMetrics,omitempty"`
	KubeRbacProxy             string `json:"kubeRbacProxy,omitempty"`
	OAuthProxy                string `json:"oAuthProxy,omitempty"`

	MasterEtcd            string `json:"masterEtcd,omitempty"`
	ControlPlane          string `json:"controlPlane,omitempty"`
	Node                  string `json:"node,omitempty"`
	ServiceCatalog        string `json:"serviceCatalog,omitempty"`
	Sync                  string `json:"sync,omitempty"`
	Startup               string `json:"startup,omitempty"`
	TemplateServiceBroker string `json:"templateServiceBroker,omitempty"`
	TLSProxy              string `json:"tlsProxy,omitempty"`
	Registry              string `json:"registry,omitempty"`
	Router                string `json:"router,omitempty"`
	RegistryConsole       string `json:"registryConsole,omitempty"`
	AnsibleServiceBroker  string `json:"ansibleServiceBroker,omitempty"`
	WebConsole            string `json:"webConsole,omitempty"`
	Console               string `json:"console,omitempty"`
	EtcdBackup            string `json:"etcdBackup,omitempty"`
	Httpd                 string `json:"httpd,omitempty"`
	Canary                string `json:"canary,omitempty"`

	// GenevaImagePullSecret defines secret used to pull private Azure images
	GenevaImagePullSecret []byte `json:"genevaImagePullSecret,omitempty"`
	// Geneva integration images
	GenevaLogging string `json:"genevaLogging,omitempty"`
	GenevaTDAgent string `json:"genevaTDAgent,omitempty"`
	GenevaStatsd  string `json:"genevaStatsd,omitempty"`
	MetricsBridge string `json:"metricsBridge,omitempty"`

	LogAnalyticsAgent string `json:"logAnalyticsAgent,omitempty"`

	// ImagePullSecret defines the secret used to pull from the private registries, used system-wide
	ImagePullSecret []byte `json:"imagePullSecret,omitempty"`
}

ImageConfig contains all images for the pods

type MonitorProfile

type MonitorProfile struct {
	Enabled             bool   `json:"enabled"`
	WorkspaceResourceID string `json:"workspaceResourceId,omitempty"`
	WorkspaceID         string `json:"workspaceId,omitempty"`
	WorkspaceKey        string `json:"workspaceKey,omitempty"`
}

MonitorProfile configuration for Azure Monitor log analytics.

type NetworkProfile

type NetworkProfile struct {
	// VnetCIDR (in): the CIDR with which the OSA cluster's Vnet is configured
	VnetCIDR string `json:"vnetCidr,omitempty"`

	// ManagementSubnetCIDR (in): the CIDR for OSA management subnet
	ManagementSubnetCIDR *string `json:"managementSubnetCidr,omitempty"`

	// VnetID (out): the ID of the Vnet created for the OSA cluster
	VnetID string `json:"vnetId,omitempty"`

	// PeerVnetID (in, optional): ID of a Vnet with which the OSA cluster Vnet should be peered.
	// If specified, this should match
	// `^/subscriptions/[^/]+
	//   /resourceGroups/[^/]+
	//   /providers/Microsoft.Network
	//   /virtualNetworks/[^/]+$`
	PeerVnetID *string `json:"peerVnetId,omitempty"`

	// PrivateEndpoint contains IP or DNS of PrivateEndpoint
	// RP sets the endpoint that the plugin should dial before
	// calling any plugin functions. This value is used based on
	// cluster type - Private/Public. Depending on cluster type
	// different endpoint will be used to reach API server -
	// PrivateEndpoint or FQDN.
	PrivateEndpoint *string `json:"-"`
	// ManagementSubnetID is ID of the management subnet.
	// Plugin ensures these are set to valid values
	// It be set during Generate plugin phase as they used by
	// the RP in the deployment callback function
	ManagementSubnetID string `json:"-"`
	// InternalLoadBalancerFrontendIPID is ID of the internal loadbalancer.
	// Plugin ensures these are set to valid values
	// It be set during Generate plugin phase as they used by
	// the RP in the deployment callback function
	InternalLoadBalancerFrontendIPID string `json:"-"`
}

NetworkProfile contains configuration for OpenShift networking.

type OSType

type OSType string

OSType represents the OS type of VMs in an AgentPool.

const (
	// OSTypeLinux is Linux.
	OSTypeLinux OSType = "Linux"
	// OSTypeWindows is Windows.
	OSTypeWindows OSType = "Windows"
)

type OpenShiftManagedCluster

type OpenShiftManagedCluster struct {
	Plan       *ResourcePurchasePlan `json:"plan,omitempty"`
	Properties Properties            `json:"properties,omitempty"`
	ID         string                `json:"id,omitempty"`
	Name       string                `json:"name,omitempty"`
	Type       string                `json:"type,omitempty"`
	Location   string                `json:"location,omitempty"`
	Tags       map[string]string     `json:"tags"`

	Config Config `json:"config,omitempty"`
}

OpenShiftManagedCluster complies with the ARM model of resource definition in a JSON template.

func GetInternalMockCluster

func GetInternalMockCluster() *OpenShiftManagedCluster

GetInternalMockCluster returns mock object of the internal API model

func (*OpenShiftManagedCluster) DeepCopy

func (in *OpenShiftManagedCluster) DeepCopy() (out *OpenShiftManagedCluster)

type Plugin

type Plugin interface {
	// Validate exists (a) to be able to place validation logic in a
	// single place in the event of multiple external API versions, and (b) to
	// be able to compare a new API manifest against a pre-existing API manifest
	// (for update, upgrade, etc.)
	// externalOnly indicates that fields set by the RP (FQDN and routerProfile.FQDN)
	// should be excluded.
	Validate(ctx context.Context, new, old *OpenShiftManagedCluster, externalOnly bool) []error

	// ValidateAdmin is used for validating admin API requests.
	ValidateAdmin(ctx context.Context, new, old *OpenShiftManagedCluster) []error

	// ValidatePluginTemplate validates external config request
	ValidatePluginTemplate(ctx context.Context) []error

	// GenerateConfig ensures all the necessary in-cluster config is generated
	// for an Openshift cluster.
	GenerateConfig(ctx context.Context, cs *OpenShiftManagedCluster, isUpdate bool) error

	// CreateOrUpdate either deploys or runs the update depending on the isUpdate argument
	// this will call the deployer.
	CreateOrUpdate(ctx context.Context, cs *OpenShiftManagedCluster, isUpdate bool, deployer DeployFn) *PluginError

	GenevaActions
}

Plugin is the main interface to openshift-azure

type PluginError

type PluginError struct {
	Err  error
	Step PluginStep
}

PluginError error returned by CreateOrUpdate to specify the step that failed.

func (*PluginError) Error

func (pe *PluginError) Error() string

type PluginStep

type PluginStep string
const (
	PluginStepDeploy                              PluginStep = "Deploy"
	PluginStepInitializeUpdateBlob                PluginStep = "InitializeUpdateBlob"
	PluginStepResetUpdateBlob                     PluginStep = "ResetUpdateBlob"
	PluginStepEtcdListBackups                     PluginStep = "EtcdListBackups"
	PluginStepEtcdBackup                          PluginStep = "EtcdBackup"
	PluginStepClientCreation                      PluginStep = "ClientCreation"
	PluginStepEnrichCertificatesFromVault         PluginStep = "EnrichCertificatesFromVault"
	PluginStepEnrichStorageAccountKeys            PluginStep = "EnrichStorageAccountKeys"
	PluginStepScaleSetDelete                      PluginStep = "ScaleSetDelete"
	PluginStepWriteStartupBlobs                   PluginStep = "WriteStartupBlobs"
	PluginStepCreateOrUpdateConfigStorageAccount  PluginStep = "CreateOrUpdateConfigStorageAccount"
	PluginStepGenerateARM                         PluginStep = "GenerateARM"
	PluginStepCreateSyncPod                       PluginStep = "CreateSyncPod"
	PluginStepCreateSyncPodWaitForReady           PluginStep = "CreateSyncPodWaitForReady"
	PluginStepWaitForWaitForOpenShiftAPI          PluginStep = "WaitForOpenShiftAPI"
	PluginStepWaitForNodes                        PluginStep = "WaitForNodes"
	PluginStepWaitForReadySyncPod                 PluginStep = "WaitForReadySyncPod"
	PluginStepWaitForConsoleHealth                PluginStep = "WaitForConsoleHealth"
	PluginStepUpdateMasterAgentPoolHashScaleSet   PluginStep = "UpdateMasterAgentPoolHashScaleSet"
	PluginStepUpdateMasterAgentPoolReadBlob       PluginStep = "UpdateMasterAgentPoolReadBlob"
	PluginStepUpdateMasterAgentPoolDrain          PluginStep = "UpdateMasterAgentPoolDrain"
	PluginStepUpdateMasterAgentPoolDeallocate     PluginStep = "UpdateMasterAgentPoolDeallocate"
	PluginStepUpdateMasterAgentPoolUpdateVMs      PluginStep = "UpdateMasterAgentPoolUpdateVMs"
	PluginStepUpdateMasterAgentPoolReimage        PluginStep = "UpdateMasterAgentPoolReimage"
	PluginStepUpdateMasterAgentPoolStart          PluginStep = "UpdateMasterAgentPoolStart"
	PluginStepUpdateMasterAgentPoolWaitForReady   PluginStep = "UpdateMasterAgentPoolWaitForReady"
	PluginStepUpdateMasterAgentPoolUpdateBlob     PluginStep = "UpdateMasterAgentPoolUpdateBlob"
	PluginStepUpdateWorkerAgentPoolHashScaleSet   PluginStep = "UpdateWorkerAgentPoolHashScaleSet"
	PluginStepUpdateWorkerAgentPoolListVMs        PluginStep = "UpdateWorkerAgentPoolListVMs"
	PluginStepUpdateWorkerAgentPoolListScaleSets  PluginStep = "UpdateWorkerAgentPoolListScaleSets"
	PluginStepUpdateWorkerAgentPoolReadBlob       PluginStep = "UpdateWorkerAgentPoolReadBlob"
	PluginStepUpdateWorkerAgentPoolDrain          PluginStep = "UpdateWorkerAgentPoolDrain"
	PluginStepUpdateWorkerAgentPoolCreateScaleSet PluginStep = "UpdateWorkerAgentPoolCreateScaleSet"
	PluginStepUpdateWorkerAgentPoolUpdateScaleSet PluginStep = "UpdateWorkerAgentPoolUpdateScaleSet"
	PluginStepUpdateWorkerAgentPoolDeleteScaleSet PluginStep = "UpdateWorkerAgentPoolDeleteScaleSet"
	PluginStepUpdateWorkerAgentPoolWaitForReady   PluginStep = "UpdateWorkerAgentPoolWaitForReady"
	PluginStepUpdateWorkerAgentPoolUpdateBlob     PluginStep = "UpdateWorkerAgentPoolUpdateBlob"
	PluginStepUpdateWorkerAgentPoolDeleteVM       PluginStep = "UpdateWorkerAgentPoolDeleteVM"
	PluginStepUpdateSyncPod                       PluginStep = "UpdateSyncPod"
	PluginStepInvalidateClusterSecrets            PluginStep = "InvalidateClusterSecrets"
	PluginStepInvalidateClusterCertificates       PluginStep = "InvalidateClusterCertificates"
	PluginStepRegenerateClusterSecrets            PluginStep = "RegenerateClusterSecrets"
)

type Properties

type Properties struct {
	// ProvisioningState (out): current state of the OSA resource.
	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`

	// OpenShiftVersion (in): OpenShift version to be created/updated, e.g.
	// `v3.11`.
	OpenShiftVersion string `json:"openShiftVersion,omitempty"`

	// ClusterVersion (out): RP version at which cluster was last
	// created/updated
	ClusterVersion string `json:"clusterVersion,omitempty"`

	// PublicHostname (out): public hostname of OpenShift API server.
	PublicHostname string `json:"publicHostname,omitempty"`

	// FQDN (out): Auto-allocated internal FQDN for OpenShift API server.
	FQDN string `json:"fqdn,omitempty"`

	// PrivateAPIServer (internal only): Specifies if API server is public or private
	PrivateAPIServer bool `json:"privateApiServer,omitempty"`

	// NetworkProfile (in): Configuration for OpenShift networking.
	NetworkProfile NetworkProfile `json:"networkProfile,omitempty"`

	// RouterProfiles (in,optional/out): Configuration for OpenShift router(s).
	RouterProfiles []RouterProfile `json:"routerProfiles,omitempty"`

	// AgentPoolProfiles (in): configuration of OpenShift cluster VMs.
	AgentPoolProfiles []AgentPoolProfile `json:"agentPoolProfiles,omitempty"`

	// AuthProfile (in): configures OpenShift authentication
	AuthProfile AuthProfile `json:"authProfile,omitempty"`

	// MasterServicePrincipalProfile service principle used on the masters
	MasterServicePrincipalProfile ServicePrincipalProfile `json:"masterServicePrincipalProfile,omitempty"`

	// WorkerServicePrincipalProfile service principle used on the nodes
	WorkerServicePrincipalProfile ServicePrincipalProfile `json:"workerServicePrincipalProfile,omitempty"`

	AzProfile AzProfile `json:"azProfile,omitempty"`

	// MonitorProfile configures which log analytics workspace to use.
	MonitorProfile MonitorProfile `json:"monitorProfile,omitempty"`

	// APICertProfile (in, optional): configures OpenShift API certificate
	APICertProfile CertProfile `json:"apiCertProfile,omitempty"`
}

Properties represents the cluster definition.

type ProvisioningState

type ProvisioningState string

ProvisioningState represents the current state of the OSA resource.

const (
	// Creating means the OSA resource is being created.
	Creating ProvisioningState = "Creating"
	// Updating means the existing OSA resource is being updated.
	Updating ProvisioningState = "Updating"
	// AdminUpdating means the existing OSA resource is being updated with admin privileges.
	AdminUpdating ProvisioningState = "AdminUpdating"
	// Failed means the OSA resource is in failed state.
	Failed ProvisioningState = "Failed"
	// Succeeded means the last create/update succeeded.
	Succeeded ProvisioningState = "Succeeded"
	// Deleting means the OSA resource is being deleted.
	Deleting ProvisioningState = "Deleting"
	// Migrating means the OSA resource is being migrated from one subscription
	// or resource group to another.
	Migrating ProvisioningState = "Migrating"
	// Upgrading means the existing OSA resource is being upgraded.
	Upgrading ProvisioningState = "Upgrading"
)

type ResourcePurchasePlan

type ResourcePurchasePlan struct {
	Name          *string `json:"name,omitempty"`
	Product       *string `json:"product,omitempty"`
	PromotionCode *string `json:"promotionCode,omitempty"`
	Publisher     *string `json:"publisher,omitempty"`
}

ResourcePurchasePlan defines the resource plan as required by ARM for billing purposes.

type RouterProfile

type RouterProfile struct {
	Name string `json:"name,omitempty"`

	// PublicSubdomain (out): DNS subdomain for OpenShift router.  The OpenShift
	// master is configured with the PublicSubdomain of the "default"
	// RouterProfile.
	PublicSubdomain string `json:"publicSubdomain,omitempty"`

	// FQDN (out): Auto-allocated internal FQDN for the OpenShift router.
	FQDN string `json:"fqdn,omitempty"`

	// RouterCertProfile (in, optional): configures OpenShift Router certificate
	RouterCertProfile CertProfile `json:"routerCertProfile,omitempty"`
}

RouterProfile represents an OpenShift router.

type ServicePrincipalProfile

type ServicePrincipalProfile struct {
	ClientID string `json:"clientId,omitempty"`
	Secret   string `json:"secret,omitempty"`
}

ServicePrincipalProfile contains the client and secret used by the cluster for Azure Resource CRUD.

type TestConfig

type TestConfig struct {
	RunningUnderTest   bool
	DebugHashFunctions bool
	ImageResourceGroup string
	ImageResourceName  string
	ArtifactDir        string
}

TestConfig holds all testing variables. It should be the zero value in production.

type VMSize

type VMSize string

VMSize represents supported VMSizes

const (
	// General purpose VMs
	StandardD2sV3  VMSize = "Standard_D2s_v3"
	StandardD4sV3  VMSize = "Standard_D4s_v3"
	StandardD8sV3  VMSize = "Standard_D8s_v3"
	StandardD16sV3 VMSize = "Standard_D16s_v3"
	StandardD32sV3 VMSize = "Standard_D32s_v3"

	// Memory optimized VMs
	StandardE4sV3  VMSize = "Standard_E4s_v3"
	StandardE8sV3  VMSize = "Standard_E8s_v3"
	StandardE16sV3 VMSize = "Standard_E16s_v3"
	StandardE32sV3 VMSize = "Standard_E32s_v3"

	// Compute optimized VMs
	StandardF8sV2  VMSize = "Standard_F8s_v2"
	StandardF16sV2 VMSize = "Standard_F16s_v2"
	StandardF32sV2 VMSize = "Standard_F32s_v2"
)

VMSizes. Keep in sync with MaxDataDisksPerVM()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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