Documentation ¶
Index ¶
- Constants
- func FindCustomAuthNameFromArn(arn string) (string, error)
- func ParseManifest(data []byte) ([]runtime.Object, error)
- func QueueNamePrefix(clusterName string) string
- type BootstrapScript
- type BootstrapScriptBuilder
- type ConfigBuilder
- type IssuerDiscoveryModelBuilder
- type KeyResponse
- type KopsModelContext
- func (b *KopsModelContext) APILoadBalancerClass() kops.LoadBalancerClass
- func (b *KopsModelContext) AutoscalingGroupName(ig *kops.InstanceGroup) string
- func (b *KopsModelContext) CLBName(prefix string) string
- func (b *KopsModelContext) CloudTags(name string, shared bool) map[string]string
- func (b *KopsModelContext) CloudTagsForInstanceGroup(ig *kops.InstanceGroup) (map[string]string, error)
- func (b *KopsModelContext) CloudTagsForServiceAccount(name string, sa types.NamespacedName) map[string]string
- func (b *KopsModelContext) ELBSecurityGroupName(prefix string) string
- func (b *KopsModelContext) FindInstanceGroup(name string) *kops.InstanceGroup
- func (b *KopsModelContext) FindSubnet(name string) *kops.ClusterSubnetSpec
- func (b *KopsModelContext) FindZonesForInstanceGroup(ig *kops.InstanceGroup) ([]string, error)
- func (b *KopsModelContext) GatherSubnets(ig *kops.InstanceGroup) ([]*kops.ClusterSubnetSpec, error)
- func (b *KopsModelContext) IAMName(role kops.InstanceGroupRole) string
- func (b *KopsModelContext) InstanceName(ig *kops.InstanceGroup, suffix string) string
- func (b *KopsModelContext) IsIPv6Only() bool
- func (b *KopsModelContext) IsKubernetesGTE(version string) bool
- func (b *KopsModelContext) IsKubernetesLT(version string) bool
- func (b *KopsModelContext) KubernetesVersion() semver.Version
- func (b *KopsModelContext) LBName32(prefix string) string
- func (b *KopsModelContext) LinkToAmazonVPCIPv6CIDR() *awstasks.VPCAmazonIPv6CIDRBlock
- func (b *KopsModelContext) LinkToAutoscalingGroup(ig *kops.InstanceGroup) *awstasks.AutoscalingGroup
- func (b *KopsModelContext) LinkToCLB(prefix string) *awstasks.ClassicLoadBalancer
- func (b *KopsModelContext) LinkToDNSZone() *awstasks.DNSZone
- func (b *KopsModelContext) LinkToELBSecurityGroup(prefix string) *awstasks.SecurityGroup
- func (b *KopsModelContext) LinkToIAMInstanceProfile(ig *kops.InstanceGroup) (*awstasks.IAMInstanceProfile, error)
- func (b *KopsModelContext) LinkToNLB(prefix string) *awstasks.NetworkLoadBalancer
- func (b *KopsModelContext) LinkToPrivateRouteTableInZone(zoneName string) *awstasks.RouteTable
- func (b *KopsModelContext) LinkToPublicRouteTableInZone(zoneName string) *awstasks.RouteTable
- func (b *KopsModelContext) LinkToSSHKey() (*awstasks.SSHKey, error)
- func (b *KopsModelContext) LinkToSecurityGroup(role kops.InstanceGroupRole) *awstasks.SecurityGroup
- func (b *KopsModelContext) LinkToTargetGroup(prefix string) *awstasks.TargetGroup
- func (b *KopsModelContext) LinkToVPC() *awstasks.VPC
- func (b *KopsModelContext) MasterInstanceGroups() []*kops.InstanceGroup
- func (b *KopsModelContext) NLBName(prefix string) string
- func (b *KopsModelContext) NLBTargetGroupName(prefix string) string
- func (b *KopsModelContext) NameForDNSZone() string
- func (b *KopsModelContext) NamePrivateRouteTableInZone(zoneName string) string
- func (b *KopsModelContext) NamePublicRouteTableInZone(zoneName string) string
- func (b *KopsModelContext) NetworkingIsCalico() bool
- func (b *KopsModelContext) NetworkingIsCilium() bool
- func (b *KopsModelContext) NodeInstanceGroups() []*kops.InstanceGroup
- func (b *KopsModelContext) NodePortRange() (utilnet.PortRange, error)
- func (b *KopsModelContext) SSHKeyName() (string, error)
- func (b *KopsModelContext) SecurityGroupName(role kops.InstanceGroupRole) string
- func (b *KopsModelContext) UseBootstrapTokens() bool
- func (b *KopsModelContext) UseClassicLoadBalancer() bool
- func (b *KopsModelContext) UseIPv6ForAPI() bool
- func (b *KopsModelContext) UseKopsControllerForNodeBootstrap() bool
- func (b *KopsModelContext) UseLoadBalancerForAPI() bool
- func (b *KopsModelContext) UseLoadBalancerForInternalAPI() bool
- func (b *KopsModelContext) UseNetworkLoadBalancer() bool
- func (b *KopsModelContext) UseSSHKey() bool
- func (b *KopsModelContext) UseServiceAccountExternalPermissions() bool
- func (b *KopsModelContext) UsesBastionDns() bool
- func (b *KopsModelContext) UsesSSHBastion() bool
- func (b *KopsModelContext) WellKnownServiceIP(id int) (net.IP, error)
- type MasterVolumeBuilder
- type NodeUpConfigBuilder
- type OIDCKeys
- type PKIModelBuilder
Constants ¶
const ( DefaultEtcdVolumeSize = 20 DefaultAWSEtcdVolumeType = ec2.VolumeTypeGp3 DefaultAWSEtcdVolumeIonIops = 100 DefaultAWSEtcdVolumeGp3Iops = 3000 DefaultAWSEtcdVolumeGp3Throughput = 125 DefaultGCEEtcdVolumeType = "pd-ssd" )
Variables ¶
This section is empty.
Functions ¶
func FindCustomAuthNameFromArn ¶ added in v1.21.0
FindCustomAuthNameFromArn parses the name of a instance profile from the arn
func ParseManifest ¶ added in v1.17.0
ParseManifest parses a typed set of objects from a []byte
func QueueNamePrefix ¶ added in v1.21.0
Types ¶
type BootstrapScript ¶
type BootstrapScript struct { Name string Lifecycle fi.Lifecycle // contains filtered or unexported fields }
func (*BootstrapScript) GetDependencies ¶ added in v1.19.0
func (*BootstrapScript) GetName ¶ added in v1.19.0
func (b *BootstrapScript) GetName() *string
type BootstrapScriptBuilder ¶ added in v1.19.0
type BootstrapScriptBuilder struct { *KopsModelContext Lifecycle fi.Lifecycle NodeUpAssets map[architectures.Architecture]*mirrors.MirroredAsset NodeUpConfigBuilder NodeUpConfigBuilder Cluster *kops.Cluster }
BootstrapScriptBuilder creates the bootstrap script
func (*BootstrapScriptBuilder) ResourceNodeUp ¶ added in v1.19.0
func (b *BootstrapScriptBuilder) ResourceNodeUp(c *fi.ModelBuilderContext, ig *kops.InstanceGroup) (fi.Resource, error)
ResourceNodeUp generates and returns a nodeup (bootstrap) script from a template file, substituting in specific env vars & cluster spec configuration
type ConfigBuilder ¶ added in v1.21.3
type ConfigBuilder struct { *KopsModelContext Lifecycle fi.Lifecycle }
ConfigBuilder populates the config store.
func (*ConfigBuilder) Build ¶ added in v1.21.3
func (b *ConfigBuilder) Build(c *fi.ModelBuilderContext) error
type IssuerDiscoveryModelBuilder ¶ added in v1.21.0
type IssuerDiscoveryModelBuilder struct { *KopsModelContext Lifecycle fi.Lifecycle Cluster *kops.Cluster }
IssuerDiscoveryModelBuilder publish OIDC issuer discovery metadata
func (*IssuerDiscoveryModelBuilder) Build ¶ added in v1.21.0
func (b *IssuerDiscoveryModelBuilder) Build(c *fi.ModelBuilderContext) error
type KeyResponse ¶ added in v1.21.0
type KeyResponse struct {
Keys []jose.JSONWebKey `json:"keys"`
}
type KopsModelContext ¶
type KopsModelContext struct { iam.IAMModelContext InstanceGroups []*kops.InstanceGroup Region string SSHPublicKeys [][]byte // AdditionalObjects holds cluster-asssociated configuration objects, other than the Cluster and InstanceGroups. AdditionalObjects kubemanifest.ObjectList }
KopsModelContext is the kops model
func (*KopsModelContext) APILoadBalancerClass ¶ added in v1.19.0
func (b *KopsModelContext) APILoadBalancerClass() kops.LoadBalancerClass
APILoadBalancerClass returns which type of load balancer to use for the api
func (*KopsModelContext) AutoscalingGroupName ¶
func (b *KopsModelContext) AutoscalingGroupName(ig *kops.InstanceGroup) string
AutoscalingGroupName derives the autoscaling group name for us
func (*KopsModelContext) CLBName ¶ added in v1.19.0
func (b *KopsModelContext) CLBName(prefix string) string
CLBName returns CLB name plus cluster name
func (*KopsModelContext) CloudTags ¶
func (b *KopsModelContext) CloudTags(name string, shared bool) map[string]string
CloudTags computes the tags to apply to a normal cloud resource with the specified name
func (*KopsModelContext) CloudTagsForInstanceGroup ¶
func (b *KopsModelContext) CloudTagsForInstanceGroup(ig *kops.InstanceGroup) (map[string]string, error)
CloudTagsForInstanceGroup computes the tags to apply to instances in the specified InstanceGroup
func (*KopsModelContext) CloudTagsForServiceAccount ¶ added in v1.25.0
func (b *KopsModelContext) CloudTagsForServiceAccount(name string, sa types.NamespacedName) map[string]string
func (*KopsModelContext) ELBSecurityGroupName ¶
func (b *KopsModelContext) ELBSecurityGroupName(prefix string) string
func (*KopsModelContext) FindInstanceGroup ¶
func (b *KopsModelContext) FindInstanceGroup(name string) *kops.InstanceGroup
FindInstanceGroup returns the instance group with the matching Name (or nil if not found)
func (*KopsModelContext) FindSubnet ¶
func (b *KopsModelContext) FindSubnet(name string) *kops.ClusterSubnetSpec
FindSubnet returns the subnet with the matching Name (or nil if not found)
func (*KopsModelContext) FindZonesForInstanceGroup ¶
func (b *KopsModelContext) FindZonesForInstanceGroup(ig *kops.InstanceGroup) ([]string, error)
FindZonesForInstanceGroup finds the zones for an InstanceGroup
func (*KopsModelContext) GatherSubnets ¶
func (b *KopsModelContext) GatherSubnets(ig *kops.InstanceGroup) ([]*kops.ClusterSubnetSpec, error)
GatherSubnets maps the subnet names in an InstanceGroup to the ClusterSubnetSpec objects (which are stored on the Cluster)
func (*KopsModelContext) IAMName ¶
func (b *KopsModelContext) IAMName(role kops.InstanceGroupRole) string
IAMName determines the name of the IAM Role and Instance Profile to use for the InstanceGroup
func (*KopsModelContext) InstanceName ¶
func (b *KopsModelContext) InstanceName(ig *kops.InstanceGroup, suffix string) string
func (*KopsModelContext) IsIPv6Only ¶ added in v1.21.3
func (b *KopsModelContext) IsIPv6Only() bool
func (*KopsModelContext) IsKubernetesGTE ¶
func (b *KopsModelContext) IsKubernetesGTE(version string) bool
IsKubernetesGTE checks if the kubernetes version is at least version, ignoring prereleases / patches
func (*KopsModelContext) IsKubernetesLT ¶ added in v1.17.0
func (b *KopsModelContext) IsKubernetesLT(version string) bool
IsKubernetesLT checks if the kubernetes version is before the specified version, ignoring prereleases / patches
func (*KopsModelContext) KubernetesVersion ¶
func (b *KopsModelContext) KubernetesVersion() semver.Version
KubernetesVersion parses the semver version of kubernetes, from the cluster spec
func (*KopsModelContext) LBName32 ¶ added in v1.19.0
func (b *KopsModelContext) LBName32(prefix string) string
LBName32 will attempt to calculate a meaningful name for an ELB given a prefix Will never return a string longer than 32 chars Note this is _not_ the primary identifier for the ELB - we use the Name tag for that.
func (*KopsModelContext) LinkToAmazonVPCIPv6CIDR ¶ added in v1.21.3
func (b *KopsModelContext) LinkToAmazonVPCIPv6CIDR() *awstasks.VPCAmazonIPv6CIDRBlock
func (*KopsModelContext) LinkToAutoscalingGroup ¶
func (b *KopsModelContext) LinkToAutoscalingGroup(ig *kops.InstanceGroup) *awstasks.AutoscalingGroup
func (*KopsModelContext) LinkToCLB ¶ added in v1.19.0
func (b *KopsModelContext) LinkToCLB(prefix string) *awstasks.ClassicLoadBalancer
func (*KopsModelContext) LinkToDNSZone ¶
func (b *KopsModelContext) LinkToDNSZone() *awstasks.DNSZone
func (*KopsModelContext) LinkToELBSecurityGroup ¶
func (b *KopsModelContext) LinkToELBSecurityGroup(prefix string) *awstasks.SecurityGroup
func (*KopsModelContext) LinkToIAMInstanceProfile ¶
func (b *KopsModelContext) LinkToIAMInstanceProfile(ig *kops.InstanceGroup) (*awstasks.IAMInstanceProfile, error)
func (*KopsModelContext) LinkToNLB ¶ added in v1.19.0
func (b *KopsModelContext) LinkToNLB(prefix string) *awstasks.NetworkLoadBalancer
func (*KopsModelContext) LinkToPrivateRouteTableInZone ¶
func (b *KopsModelContext) LinkToPrivateRouteTableInZone(zoneName string) *awstasks.RouteTable
func (*KopsModelContext) LinkToPublicRouteTableInZone ¶ added in v1.23.0
func (b *KopsModelContext) LinkToPublicRouteTableInZone(zoneName string) *awstasks.RouteTable
func (*KopsModelContext) LinkToSSHKey ¶
func (b *KopsModelContext) LinkToSSHKey() (*awstasks.SSHKey, error)
func (*KopsModelContext) LinkToSecurityGroup ¶
func (b *KopsModelContext) LinkToSecurityGroup(role kops.InstanceGroupRole) *awstasks.SecurityGroup
LinkToSecurityGroup creates a task link the security group to the instncegroup
func (*KopsModelContext) LinkToTargetGroup ¶ added in v1.19.0
func (b *KopsModelContext) LinkToTargetGroup(prefix string) *awstasks.TargetGroup
func (*KopsModelContext) LinkToVPC ¶
func (b *KopsModelContext) LinkToVPC() *awstasks.VPC
func (*KopsModelContext) MasterInstanceGroups ¶
func (b *KopsModelContext) MasterInstanceGroups() []*kops.InstanceGroup
MasterInstanceGroups returns InstanceGroups with the master role
func (*KopsModelContext) NLBName ¶ added in v1.19.0
func (b *KopsModelContext) NLBName(prefix string) string
func (*KopsModelContext) NLBTargetGroupName ¶ added in v1.19.0
func (b *KopsModelContext) NLBTargetGroupName(prefix string) string
func (*KopsModelContext) NameForDNSZone ¶
func (b *KopsModelContext) NameForDNSZone() string
func (*KopsModelContext) NamePrivateRouteTableInZone ¶
func (b *KopsModelContext) NamePrivateRouteTableInZone(zoneName string) string
func (*KopsModelContext) NamePublicRouteTableInZone ¶ added in v1.23.0
func (b *KopsModelContext) NamePublicRouteTableInZone(zoneName string) string
func (*KopsModelContext) NetworkingIsCalico ¶ added in v1.23.0
func (b *KopsModelContext) NetworkingIsCalico() bool
NetworkingIsCalico returns true if we are using calico networking
func (*KopsModelContext) NetworkingIsCilium ¶ added in v1.23.0
func (b *KopsModelContext) NetworkingIsCilium() bool
NetworkingIsCilium returns true if we are using cilium networking
func (*KopsModelContext) NodeInstanceGroups ¶
func (b *KopsModelContext) NodeInstanceGroups() []*kops.InstanceGroup
NodeInstanceGroups returns InstanceGroups with the node role
func (*KopsModelContext) NodePortRange ¶
func (b *KopsModelContext) NodePortRange() (utilnet.PortRange, error)
NodePortRange returns the range of ports allocated to NodePorts
func (*KopsModelContext) SSHKeyName ¶
func (b *KopsModelContext) SSHKeyName() (string, error)
SSHKeyName computes a unique SSH key name, combining the cluster name and the SSH public key fingerprint. If an SSH key name is provided in the cluster configuration, it will use that instead.
func (*KopsModelContext) SecurityGroupName ¶
func (b *KopsModelContext) SecurityGroupName(role kops.InstanceGroupRole) string
SecurityGroupName returns the security group name for the specific role
func (*KopsModelContext) UseBootstrapTokens ¶
func (b *KopsModelContext) UseBootstrapTokens() bool
UseBootstrapTokens checks if bootstrap tokens are enabled
func (*KopsModelContext) UseClassicLoadBalancer ¶ added in v1.19.0
func (b *KopsModelContext) UseClassicLoadBalancer() bool
UseClassicLoadBalancer checks if we are using Classic LoadBalancer
func (*KopsModelContext) UseIPv6ForAPI ¶ added in v1.21.3
func (b *KopsModelContext) UseIPv6ForAPI() bool
func (*KopsModelContext) UseKopsControllerForNodeBootstrap ¶ added in v1.19.0
func (b *KopsModelContext) UseKopsControllerForNodeBootstrap() bool
UseKopsControllerForNodeBootstrap checks if nodeup should use kops-controller to bootstrap.
func (*KopsModelContext) UseLoadBalancerForAPI ¶
func (b *KopsModelContext) UseLoadBalancerForAPI() bool
UseLoadBalancerForAPI checks if we are using a load balancer for the kubeapi
func (*KopsModelContext) UseLoadBalancerForInternalAPI ¶
func (b *KopsModelContext) UseLoadBalancerForInternalAPI() bool
UseLoadBalancerForInternalAPI check if true then we will use the created loadbalancer for internal kubelet connections. The intention here is to make connections to apiserver more HA - see https://github.com/kubernetes/kops/issues/4252
func (*KopsModelContext) UseNetworkLoadBalancer ¶ added in v1.19.0
func (b *KopsModelContext) UseNetworkLoadBalancer() bool
UseNetworkLoadBalancer checks if we are using Network LoadBalancer
func (*KopsModelContext) UseSSHKey ¶ added in v1.16.0
func (b *KopsModelContext) UseSSHKey() bool
UseSSHKey returns true if SSHKeyName from the cluster spec is set to a nonempty string or there is an SSH public key provisioned in the key store.
func (*KopsModelContext) UseServiceAccountExternalPermissions ¶ added in v1.21.3
func (b *KopsModelContext) UseServiceAccountExternalPermissions() bool
UseServiceAccountExternalPermissions returns true if we are using service-account bound IAM roles.
func (*KopsModelContext) UsesBastionDns ¶
func (b *KopsModelContext) UsesBastionDns() bool
UsesBastionDns checks if we should use a specific name for the bastion dns
func (*KopsModelContext) UsesSSHBastion ¶
func (b *KopsModelContext) UsesSSHBastion() bool
UsesSSHBastion checks if we have a Bastion in the cluster
func (*KopsModelContext) WellKnownServiceIP ¶
func (b *KopsModelContext) WellKnownServiceIP(id int) (net.IP, error)
WellKnownServiceIP returns a service ip with the service cidr
type MasterVolumeBuilder ¶
type MasterVolumeBuilder struct { *KopsModelContext Lifecycle fi.Lifecycle }
MasterVolumeBuilder builds master EBS volumes
func (*MasterVolumeBuilder) Build ¶
func (b *MasterVolumeBuilder) Build(c *fi.ModelBuilderContext) error
type NodeUpConfigBuilder ¶ added in v1.19.0
type OIDCKeys ¶ added in v1.21.0
func (*OIDCKeys) GetDependencies ¶ added in v1.21.0
GetDependencies adds CA to the list of dependencies
type PKIModelBuilder ¶
type PKIModelBuilder struct { *KopsModelContext Lifecycle fi.Lifecycle }
PKIModelBuilder configures PKI keypairs, as well as tokens
func (*PKIModelBuilder) Build ¶
func (b *PKIModelBuilder) Build(c *fi.ModelBuilderContext) error
Build is responsible for generating the various pki assets.