copsctl

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2022 License: MIT Imports: 6 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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 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() (*InfoV2, 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 InfoV2 added in v0.8.0

type InfoV2 struct {
	Version                        string               `json:"version"`
	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"`
}

InfoV2 object is a wrapper over the cluster-info response in version 2.

func (*InfoV2) GetApplicationDnsZone added in v0.8.0

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

GetApplicationDnsZone finds the public DNS zone assigned to the DevOps team

func (*InfoV2) GetDevOpsTeamSubnets added in v0.8.0

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

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

func (*InfoV2) GetPrivateDnsZones added in v0.8.0

func (info *InfoV2) 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