admin

package
v4.1.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// APIVersion is the version of this API
	APIVersion = "admin"
)

Variables

This section is empty.

Functions

func ToInternal

ToInternal converts from a admin.OpenShiftManagedCluster to an internal.OpenShiftManagedCluster. If old is non-nil, it is going to be used as the base for the internal output where the external request is merged on top of.

Types

type AADIdentityProvider

type AADIdentityProvider struct {
	Kind     *string `json:"kind,omitempty"`
	ClientID *string `json:"clientId,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 Certificate

type Certificate struct {
	Cert *x509.Certificate `json:"cert,omitempty"`
}

Certificate is an x509 certificate.

func (Certificate) MarshalJSON

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

func (*Certificate) UnmarshalJSON

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

type CertificateChain

type CertificateChain struct {
	Certs []*x509.Certificate `json:"certs,omitempty"`
}

func (CertificateChain) MarshalJSON

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

func (*CertificateChain) UnmarshalJSON

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

type CertificateConfig

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

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

	// control plane certificates
	MasterServer *Certificate `json:"masterServer,omitempty"`
	// external web facing certificates must contain
	// all certificate chain
	// TODO: Move all certificates to be slice
	OpenShiftConsole     *CertificateChain `json:"openShiftConsole,omitempty"`
	Admin                *Certificate      `json:"admin,omitempty"`
	AggregatorFrontProxy *Certificate      `json:"aggregatorFrontProxy,omitempty"`
	MasterKubeletClient  *Certificate      `json:"masterKubeletClient,omitempty"`
	MasterProxyClient    *Certificate      `json:"masterProxyClient,omitempty"`
	OpenShiftMaster      *Certificate      `json:"openShiftMaster,omitempty"`
	NodeBootstrap        *Certificate      `json:"nodeBootstrap,omitempty"`
	SDN                  *Certificate      `json:"sdn,omitempty"`

	// infra certificates
	Registry             *Certificate      `json:"registry,omitempty"`
	RegistryConsole      *Certificate      `json:"registryConsole,omitempty"`
	Router               *CertificateChain `json:"router,omitempty"`
	ServiceCatalogServer *Certificate      `json:"serviceCatalogServer,omitempty"`

	// misc certificates
	BlackBoxMonitor *Certificate `json:"blackBoxMonitor,omitempty"`

	// geneva integration certificates
	GenevaLogging *Certificate `json:"genevaLogging,omitempty"`
	GenevaMetrics *Certificate `json:"genevaMetrics,omitempty"`
}

CertificateConfig contains all certificate configuration for the cluster.

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 {
	// 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"`

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

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

	// misc infra configurables
	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"`
}

Config holds the cluster admin config structure

func (Config) MarshalJSON

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

func (*Config) UnmarshalJSON

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

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"`

	// Geneva integration images
	GenevaLogging *string `json:"genevaLogging,omitempty"`
	GenevaTDAgent *string `json:"genevaTDAgent,omitempty"`
	GenevaStatsd  *string `json:"genevaStatsd,omitempty"`
	MetricsBridge *string `json:"metricsBridge,omitempty"`
}

ImageConfig contains all images for the pods

type MasterPoolProfile

type MasterPoolProfile struct {
	Count      *int64  `json:"count,omitempty"`
	VMSize     *VMSize `json:"vmSize,omitempty"`
	SubnetCIDR *string `json:"subnetCidr,omitempty"`
}

MasterPoolProfile contains configuration for OpenShift master VMs.

type NetworkProfile

type NetworkProfile struct {
	// VnetCIDR (in): the CIDR with which the OSA cluster's Vnet is configured
	VnetCIDR *string `json:"vnetCidr,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"`
}

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 FromInternal

FromInternal converts from a internal.OpenShiftManagedCluster to an admin.OpenShiftManagedCluster.

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"`

	// 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"`

	// MasterPoolProfile (in): Configuration for OpenShift master VMs.
	MasterPoolProfile *MasterPoolProfile `json:"masterPoolProfile,omitempty"`

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

	// AuthProfile (in): configures OpenShift authentication
	AuthProfile *AuthProfile `json:"authProfile,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"`
}

RouterProfile represents an OpenShift router.

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()

Jump to

Keyboard shortcuts

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