copsctl

package
v2.11.0 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApplicationDnsZone

type ApplicationDnsZone struct {
	Name              string `json:"name"`
	SubscriptionId    string `json:"subscription_id"`
	ResourceGroupName string `json:"resourcegroup_name"`
	ZoneName          string `json:"zone_name"`
}

type ClusterInfoV1 added in v2.10.0

type ClusterInfoV1 struct {
	Version       string `json:"version"`
	Description   string `json:"description"`
	OidcIssuerUrl string `json:"oidc_issuer_url"`
}

ClusterInfoV1 object is a wrapper over the info cluster response in version 1.

type Copsctl

type Copsctl interface {
	// Connect sets the local kubectl connection to the configured cluster. Parameters:
	//     clusterName - cluster environment tag for the cluster you want to connect to
	//     clusterConnectionString - connection string of the cluster (either a user or technical connection string)
	//     isTechnicalAccountConnect - set to true, if the clusterConnectionString used is technical account connection string
	//     connectToSecondaryCluster - if set, will connect to secondary cluster (use for cluster migrations)
	Connect(clusterName string, clusterConnectionString string, isTechnicalAccountConnect bool, connectToSecondaryCluster bool) error

	// GetClusterInfo returns the cluster info for the currently connected cluster
	GetClusterInfo() (*ClusterInfoV1, error)

	// GetEnvironmentInfo returns the environment info for the currently connected cluster
	GetEnvironmentInfo() (*EnvironmentInfoV2, error)
}

func New

func New(executor commands.Executor) Copsctl

New creates a new Copsctl recipe instance. Required parameters are:

executor (can be provided from hq.GetExecutor() or by instantiating your own)

type EnvironmentInfoV2 added in v2.10.0

type EnvironmentInfoV2 struct {
	Version                        string               `json:"version"`
	Description                    string               `json:"description"`
	SubscriptionId                 string               `json:"subscription_id"`
	TenantId                       string               `json:"tenant_id"`
	EgressStaticOutboundIpsEnabled bool                 `json:"egress_static_outbound_ips_enabled"`
	EgressStaticOutboundIps        []string             `json:"egress_static_outbound_ips"`
	TechnicalAccountName           string               `json:"technical_account_name"`
	TechnicalAccountNamespace      string               `json:"technical_account_namespace"`
	CoreOpsMonitoringAndLogging    string               `json:"coreops_monitoring_and_logging"`
	LogAnalyticsWorkspace          string               `json:"log_analytics_workspace"`
	NetworkingBlue                 Networking           `json:"networking_blue"`
	NetworkingGreen                Networking           `json:"networking_green"`
	ApplicationDnsZones            []ApplicationDnsZone `json:"application_dns_zones"`
}

EnvironmentInfoV2 object is a wrapper over the info environment response in version 2.

func (*EnvironmentInfoV2) GetApplicationDnsZone added in v2.10.0

func (info *EnvironmentInfoV2) GetApplicationDnsZone(devOpsTeamName string) (*ApplicationDnsZone, error)

GetApplicationDnsZone finds the public DNS zone assigned to the DevOps team

func (*EnvironmentInfoV2) GetDevOpsTeamSubnets added in v2.10.0

func (info *EnvironmentInfoV2) GetDevOpsTeamSubnets(devOpsTeamName string) (subnetBlue *Subnet, subnetGreen *Subnet, err error)

GetDevOpsTeamSubnets finds both the blue & green subnets for a given DevOps team name

func (*EnvironmentInfoV2) GetPrivateDnsZones added in v2.10.0

func (info *EnvironmentInfoV2) GetPrivateDnsZones(name string) (zoneBlue *PrivateDnsZone, zoneGreen *PrivateDnsZone, err error)

GetPrivateDnsZones finds both the blue & green zones for a given name (e.g. file.core.windows.net, returns privatelink.file.core.windows.net zones for both blue & green environments)

type Networking

type Networking struct {
	ClusterSubnetId    string           `json:"cluster_subnet_id"`
	ApplicationSubnets []Subnet         `json:"application_subnets"`
	PrivateDnsZones    []PrivateDnsZone `json:"private_dns_zones"`
}

type PrivateDnsZone

type PrivateDnsZone struct {
	ResourceGroupName string `json:"resourcegroup_name"`
	ZoneName          string `json:"zone_name"`
	Name              string `json:"name"`
}

type Subnet

type Subnet struct {
	Name                      string `json:"name"`
	Id                        string `json:"id"`
	Cidr                      string `json:"cidr"`
	EndpointResourceGroupName string `json:"endpoint_resourcegroup_name"`
}

Jump to

Keyboard shortcuts

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