clients

package
v0.0.0-...-4234fb6 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2023 License: MIT Imports: 38 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DnsContributorRole = Role{
		Name: "DNS Zone Contributor",
		Id:   "/subscriptions/%s/providers/Microsoft.Authorization/roleDefinitions/befefa01-2a29-4197-83a8-272ff33ce314",
	}
	PrivateDnsContributorRole = Role{
		Name: "Private DNS Zone Contributor",
		Id:   "/subscriptions/%s/providers/Microsoft.Authorization/roleDefinitions/b12aa53e-6015-4669-85d0-8515ebb3ae7f",
	}
	AcrPullRole = Role{
		Name: "AcrPull",
		Id:   "/subscriptions/%s/providers/Microsoft.Authorization/roleDefinitions/7f951dda-4ed3-4680-a7ca-43fe172d538d",
	}
)
View Source
var OsmClusterOpt = McOpt{
	Name: "osm cluster",
	// contains filtered or unexported fields
}
View Source
var PrivateClusterOpt = McOpt{
	Name: "private cluster",
	// contains filtered or unexported fields
}

PrivateClusterOpt specifies that the cluster should be private

Functions

func LoadAcr

func LoadAcr(id azure.Resource) *acr

func LoadAks

func LoadAks(id azure.Resource, dnsServiceIp, location, principalId, clientId string, options map[string]struct{}) *aks

func LoadPrivateZone

func LoadPrivateZone(id azure.Resource) *privateZone

func LoadRg

func LoadRg(id arm.ResourceID) *rg

func LoadZone

func LoadZone(id azure.Resource, nameservers []string) *zone

func NewAcr

func NewAcr(ctx context.Context, subscriptionId, resourceGroup, name, location string) (*acr, error)

func NewAks

func NewAks(ctx context.Context, subscriptionId, resourceGroup, name, location string, mcOpts ...McOpt) (*aks, error)

func NewNginxDeployment

func NewNginxDeployment() *appsv1.Deployment

returns manifest for a basic nginx deployment

func NewNginxService

func NewNginxService() *corev1.Service

returns nginx service

func NewPrivateZone

func NewPrivateZone(ctx context.Context, subscriptionId, resourceGroup, name string, opts ...PrivateZoneOpt) (*privateZone, error)

func NewResourceGroup

func NewResourceGroup(ctx context.Context, subscriptionId, name, location string, rgOpts ...RgOpt) (*rg, error)

func NewRoleAssignment

func NewRoleAssignment(ctx context.Context, subscriptionId, scope, principalId string, role Role) (*roleAssignment, error)

func NewZone

func NewZone(ctx context.Context, subscriptionId, resourceGroup, name string, zoneOpts ...ZoneOpt) (*zone, error)

func WithPreferSystemNodes

func WithPreferSystemNodes(spec *corev1.PodSpec) *corev1.PodSpec

Types

type McOpt

type McOpt struct {
	Name string
	// contains filtered or unexported fields
}

McOpt specifies what kind of managed cluster to create

type PrivateZoneOpt

type PrivateZoneOpt func(z *armprivatedns.PrivateZone) error

PrivateZoneOpt specifies what kind of private zone to create

type RgOpt

type RgOpt func(rg *armresources.ResourceGroup) error

func DeleteAfterOpt

func DeleteAfterOpt(d time.Duration) RgOpt

type Role

type Role struct {
	Name string
	// format string with a single %s for the subscription id
	Id string
}

type ZoneOpt

type ZoneOpt func(z *armdns.Zone) error

ZoneOpt specifies what kind of zone to create

Jump to

Keyboard shortcuts

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