Documentation ¶
Index ¶
- Constants
- type ALIModelContext
- func (c *ALIModelContext) CloudTagsForInstanceGroup(ig *kops.InstanceGroup) (map[string]string, error)
- func (c *ALIModelContext) GetNameForEIP() string
- func (c *ALIModelContext) GetNameForLoadBalancer() string
- func (c *ALIModelContext) GetNameForNatGateway() string
- func (c *ALIModelContext) GetNameForRAM(role kops.InstanceGroupRole) string
- func (c *ALIModelContext) GetNameForSSHKey() string
- func (c *ALIModelContext) GetNameForSecurityGroup(role kops.InstanceGroupRole) string
- func (c *ALIModelContext) GetNameForVPC() string
- func (c *ALIModelContext) GetNameForVSwitch(subnetName string) string
- func (c *ALIModelContext) GetNameForVSwitchSNAT(subnetName string) string
- func (c *ALIModelContext) GetScalingGroupName(ig *kops.InstanceGroup) string
- func (c *ALIModelContext) GetUtilitySubnets() []*kops.ClusterSubnetSpec
- func (c *ALIModelContext) LinkLoadBalancer() *alitasks.LoadBalancer
- func (c *ALIModelContext) LinkToEIP() *alitasks.EIP
- func (c *ALIModelContext) LinkToNatGateway() *alitasks.NatGateway
- func (c *ALIModelContext) LinkToRAMRole(role kops.InstanceGroupRole) *alitasks.RAMRole
- func (c *ALIModelContext) LinkToSSHKey() *alitasks.SSHKey
- func (c *ALIModelContext) LinkToScalingGroup(ig *kops.InstanceGroup) *alitasks.ScalingGroup
- func (c *ALIModelContext) LinkToSecurityGroup(role kops.InstanceGroupRole) *alitasks.SecurityGroup
- func (c *ALIModelContext) LinkToVPC() *alitasks.VPC
- func (c *ALIModelContext) LinkToVSwitch(subnetName string) *alitasks.VSwitch
- func (c *ALIModelContext) LinkToVSwitchSNAT(subnetName string) *alitasks.VSwitch
- type APILoadBalancerModelBuilder
- type AssumeRolePolicyDocument
- type AssumeRolePolicyItem
- type AssumeRolePolicyPrincpal
- type Condition
- type ExternalAccessModelBuilder
- type FirewallModelBuilder
- type NetworkModelBuilder
- type Policy
- type PolicyBuilder
- func (b *PolicyBuilder) AddOSSPermissions(p *Policy) (*Policy, error)
- func (b *PolicyBuilder) BuildAlicloudPolicy() (*Policy, error)
- func (b *PolicyBuilder) BuildAlicloudPolicyMaster() (*Policy, error)
- func (b *PolicyBuilder) BuildAlicloudPolicyNode() (*Policy, error)
- func (b *PolicyBuilder) RAMPrefix() string
- type PolicyResource
- type RAMModelBuilder
- type SSHKeyModelBuilder
- type ScalingGroupModelBuilder
- type Statement
- type StatementEffect
Constants ¶
const ( LoadBalancerListenerStatus = "running" LoadBalancerListenerBandwidth = -1 )
const ( IpProtocolTCP = "tcp" IpProtocolUDP = "udp" )
const ( DefaultVolumeType = "cloud_ssd" DefaultInstanceType = "ecs.n2.medium" )
const CloudTagInstanceGroupRolePrefix = "k8s.io/role/"
const IpProtocolAll = "all"
const PolicyDefaultVersion = "1"
PolicyDefaultVersion is the default version included in all policy documents
const PolicyType = string(ram.Custom)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ALIModelContext ¶
type ALIModelContext struct {
*model.KopsModelContext
}
func (*ALIModelContext) CloudTagsForInstanceGroup ¶
func (c *ALIModelContext) CloudTagsForInstanceGroup(ig *kops.InstanceGroup) (map[string]string, error)
CloudTagsForInstanceGroup computes the tags to apply to instances in the specified InstanceGroup Copy from context.go, adjust parameters length to meet AliCloud requirements
func (*ALIModelContext) GetNameForEIP ¶ added in v1.15.1
func (c *ALIModelContext) GetNameForEIP() string
func (*ALIModelContext) GetNameForLoadBalancer ¶
func (c *ALIModelContext) GetNameForLoadBalancer() string
func (*ALIModelContext) GetNameForNatGateway ¶ added in v1.15.1
func (c *ALIModelContext) GetNameForNatGateway() string
func (*ALIModelContext) GetNameForRAM ¶
func (c *ALIModelContext) GetNameForRAM(role kops.InstanceGroupRole) string
func (*ALIModelContext) GetNameForSSHKey ¶
func (c *ALIModelContext) GetNameForSSHKey() string
func (*ALIModelContext) GetNameForSecurityGroup ¶
func (c *ALIModelContext) GetNameForSecurityGroup(role kops.InstanceGroupRole) string
func (*ALIModelContext) GetNameForVPC ¶
func (c *ALIModelContext) GetNameForVPC() string
func (*ALIModelContext) GetNameForVSwitch ¶
func (c *ALIModelContext) GetNameForVSwitch(subnetName string) string
func (*ALIModelContext) GetNameForVSwitchSNAT ¶ added in v1.15.1
func (c *ALIModelContext) GetNameForVSwitchSNAT(subnetName string) string
func (*ALIModelContext) GetScalingGroupName ¶
func (c *ALIModelContext) GetScalingGroupName(ig *kops.InstanceGroup) string
func (*ALIModelContext) GetUtilitySubnets ¶ added in v1.18.0
func (c *ALIModelContext) GetUtilitySubnets() []*kops.ClusterSubnetSpec
func (*ALIModelContext) LinkLoadBalancer ¶
func (c *ALIModelContext) LinkLoadBalancer() *alitasks.LoadBalancer
LinkLoadBalancer returns the LoadBalancer object the cluster is located in
func (*ALIModelContext) LinkToEIP ¶ added in v1.15.1
func (c *ALIModelContext) LinkToEIP() *alitasks.EIP
LinkToEIP returns the EIP object the NateGatway is associated to
func (*ALIModelContext) LinkToNatGateway ¶ added in v1.15.1
func (c *ALIModelContext) LinkToNatGateway() *alitasks.NatGateway
LinkToNateGateway returns the NatGateway object the cluster is located in
func (*ALIModelContext) LinkToRAMRole ¶
func (c *ALIModelContext) LinkToRAMRole(role kops.InstanceGroupRole) *alitasks.RAMRole
func (*ALIModelContext) LinkToSSHKey ¶
func (c *ALIModelContext) LinkToSSHKey() *alitasks.SSHKey
func (*ALIModelContext) LinkToScalingGroup ¶
func (c *ALIModelContext) LinkToScalingGroup(ig *kops.InstanceGroup) *alitasks.ScalingGroup
func (*ALIModelContext) LinkToSecurityGroup ¶
func (c *ALIModelContext) LinkToSecurityGroup(role kops.InstanceGroupRole) *alitasks.SecurityGroup
LinkToSecurityGroup returns the SecurityGroup with specific name
func (*ALIModelContext) LinkToVPC ¶
func (c *ALIModelContext) LinkToVPC() *alitasks.VPC
LinkToVPC returns the VPC object the cluster is located in
func (*ALIModelContext) LinkToVSwitch ¶
func (c *ALIModelContext) LinkToVSwitch(subnetName string) *alitasks.VSwitch
LinkToVSwitch returns the VSwitch object the cluster is located in
func (*ALIModelContext) LinkToVSwitchSNAT ¶ added in v1.15.1
func (c *ALIModelContext) LinkToVSwitchSNAT(subnetName string) *alitasks.VSwitch
LinkToVSwitchSNAT returns the VSwitchSNAT object the cluster is located in
type APILoadBalancerModelBuilder ¶
type APILoadBalancerModelBuilder struct { *ALIModelContext Lifecycle fi.Lifecycle }
APILoadBalancerModelBuilder builds a LoadBalancer for accessing the API
func (*APILoadBalancerModelBuilder) Build ¶
func (b *APILoadBalancerModelBuilder) Build(c *fi.ModelBuilderContext) error
type AssumeRolePolicyDocument ¶
type AssumeRolePolicyDocument struct { Statement []AssumeRolePolicyItem Version string }
type AssumeRolePolicyItem ¶
type AssumeRolePolicyItem struct { Action string Effect string Principal AssumeRolePolicyPrincpal }
type AssumeRolePolicyPrincpal ¶
type AssumeRolePolicyPrincpal struct {
Service []string
}
type Condition ¶ added in v1.18.0
type Condition map[string]interface{}
Condition is a map of Conditions to be evaluated for a given RAM Statement
type ExternalAccessModelBuilder ¶
type ExternalAccessModelBuilder struct { *ALIModelContext Lifecycle fi.Lifecycle }
ExternalAccessModelBuilder configures security group rules for external access (SSHAccess, KubernetesAPIAccess)
func (*ExternalAccessModelBuilder) Build ¶
func (b *ExternalAccessModelBuilder) Build(c *fi.ModelBuilderContext) error
type FirewallModelBuilder ¶
type FirewallModelBuilder struct { *ALIModelContext Lifecycle fi.Lifecycle }
FirewallModelBuilder configures firewall network objects
func (*FirewallModelBuilder) Build ¶
func (b *FirewallModelBuilder) Build(c *fi.ModelBuilderContext) error
type NetworkModelBuilder ¶ added in v1.15.1
type NetworkModelBuilder struct { *ALIModelContext Lifecycle fi.Lifecycle }
NetworkModelBuilder configures VPC network objects
func (*NetworkModelBuilder) Build ¶ added in v1.15.1
func (b *NetworkModelBuilder) Build(c *fi.ModelBuilderContext) error
type Policy ¶ added in v1.18.0
Policy Struct is a collection of fields that form a valid Alicloud policy document
type PolicyBuilder ¶ added in v1.18.0
type PolicyBuilder struct { Cluster *kops.Cluster HostedZoneID string KMSKeys []string Region string ResourceARN *string Role kops.InstanceGroupRole }
PolicyBuilder struct defines all valid fields to be used when building the Alicloud RAM policy document for a given instance group role.
func (*PolicyBuilder) AddOSSPermissions ¶ added in v1.18.0
func (b *PolicyBuilder) AddOSSPermissions(p *Policy) (*Policy, error)
AddOSSPermissions updates an RAM Policy with statements granting tailored access to OSS assets, depending on the instance group role
func (*PolicyBuilder) BuildAlicloudPolicy ¶ added in v1.18.0
func (b *PolicyBuilder) BuildAlicloudPolicy() (*Policy, error)
BuildAlicloudPolicy builds a set of RAM policy statements based on the instance group type.
func (*PolicyBuilder) BuildAlicloudPolicyMaster ¶ added in v1.18.0
func (b *PolicyBuilder) BuildAlicloudPolicyMaster() (*Policy, error)
BuildAlicloudPolicyMaster generates a custom policy for a Kubernetes master.
func (*PolicyBuilder) BuildAlicloudPolicyNode ¶ added in v1.18.0
func (b *PolicyBuilder) BuildAlicloudPolicyNode() (*Policy, error)
BuildAlicloudPolicyNode generates a custom policy for a Kubernetes node.
func (*PolicyBuilder) RAMPrefix ¶ added in v1.18.0
func (b *PolicyBuilder) RAMPrefix() string
RAMPrefix returns the prefix for Alicloud ARNs in the current region, for use with RAM It is arn everywhere for now
type PolicyResource ¶ added in v1.18.0
type PolicyResource struct {
Builder *PolicyBuilder
}
PolicyResource defines the PolicyBuilder and DNSZone to use when building the RAM policy document for a given instance group role
func (*PolicyResource) GetDependencies ¶ added in v1.18.0
GetDependencies adds the DNSZone task to the list of dependencies if set
type RAMModelBuilder ¶
type RAMModelBuilder struct { *ALIModelContext Lifecycle fi.Lifecycle }
func (*RAMModelBuilder) Build ¶
func (b *RAMModelBuilder) Build(c *fi.ModelBuilderContext) error
func (*RAMModelBuilder) CreateAssumeRolePolicyDocument ¶ added in v1.18.0
func (b *RAMModelBuilder) CreateAssumeRolePolicyDocument() string
func (*RAMModelBuilder) CreatePolicyDocument ¶
func (b *RAMModelBuilder) CreatePolicyDocument() string
type SSHKeyModelBuilder ¶
type SSHKeyModelBuilder struct { *ALIModelContext Lifecycle fi.Lifecycle }
SSHKeyModelBuilder configures SSH objects
func (*SSHKeyModelBuilder) Build ¶
func (b *SSHKeyModelBuilder) Build(c *fi.ModelBuilderContext) error
type ScalingGroupModelBuilder ¶
type ScalingGroupModelBuilder struct { *ALIModelContext BootstrapScriptBuilder *model.BootstrapScriptBuilder Lifecycle fi.Lifecycle SecurityLifecycle fi.Lifecycle }
ScalingGroupModelBuilder configures ScalingGroup objects
func (*ScalingGroupModelBuilder) Build ¶
func (b *ScalingGroupModelBuilder) Build(c *fi.ModelBuilderContext) error
type Statement ¶ added in v1.18.0
type Statement struct { Effect StatementEffect Action stringorslice.StringOrSlice Resource stringorslice.StringOrSlice Condition Condition `json:",omitempty"` }
Statement is an Alicloud RAM Policy Statement Object: https://https://help.aliyun.com/document_detail/93739.html
type StatementEffect ¶ added in v1.18.0
type StatementEffect string
StatementEffect is required and specifies what type of access the statement results in
const StatementEffectAllow StatementEffect = "Allow"
StatementEffectAllow allows access for the given resources in the statement (based on conditions)
const StatementEffectDeny StatementEffect = "Deny"
StatementEffectDeny allows access for the given resources in the statement (based on conditions)