Documentation ¶
Index ¶
- Constants
- Variables
- func AreEqual(o, n interface{}) bool
- func Base64Decode(s string) (string, error)
- func Base64Encode(s string) string
- func DoGet(url, username, password, cacert string, insecure bool) ([]byte, error)
- func DoPost(url, data, cacert string, insecure bool, headers map[string]string) (map[string]interface{}, error)
- func DoUserLogin(url, user, pass, ttl, desc, cacert string, insecure bool) (string, string, error)
- func FileExist(path string) (bool, error)
- func GetRandomPass(n int) string
- func HashPasswordString(password string) (string, error)
- func IsBase64(s string) bool
- func IsForbidden(err error) bool
- func IsNotFound(err error) bool
- func IsVersionGreaterThanOrEqual(ver1, ver2 string) (bool, error)
- func IsVersionLessThanl(ver1, ver2 string) (bool, error)
- func NewListOpts(filters map[string]interface{}) *types.ListOpts
- func NormalizeURL(url string) string
- func Provider() terraform.ResourceProvider
- func RootURL(url string) string
- func ToLower(s string) string
- func TrimSpace(val interface{}) string
- type AmazonElasticContainerServiceConfig
- type AzureKubernetesServiceConfig
- type CLIConfig
- type Client
- type CloudCredential
- type Cluster
- type Config
- func (c *Config) CheckAuthConfigEnabled(id string) error
- func (c *Config) ClusterClient(id string) (*clusterClient.Client, error)
- func (c *Config) ClusterExist(id string) error
- func (c *Config) ClusterRegistrationTokenExist(id string) error
- func (c *Config) CreateCatalog(scope string, catalog interface{}) (interface{}, error)
- func (c *Config) CreateCertificate(cert interface{}) (interface{}, error)
- func (c *Config) CreateClientOpts() *clientbase.ClientOpts
- func (c *Config) CreateRegistry(registry interface{}) (interface{}, error)
- func (c *Config) CreateSecret(secret interface{}) (interface{}, error)
- func (c *Config) DeleteCatalog(scope string, catalog interface{}) error
- func (c *Config) DeleteCertificate(cert interface{}) error
- func (c *Config) DeleteRegistry(registry interface{}) error
- func (c *Config) DeleteSecret(secret interface{}) error
- func (c *Config) DeleteToken(id string) error
- func (c *Config) GenerateUserToken(username, desc string, ttl int) (string, string, error)
- func (c *Config) GetAuthConfig(in *managementClient.AuthConfig) (interface{}, error)
- func (c *Config) GetCatalog(id, scope string) (interface{}, error)
- func (c *Config) GetCatalogByName(name, scope string) (interface{}, error)
- func (c *Config) GetCertificate(id, project_id, namespace_id string) (interface{}, error)
- func (c *Config) GetCertificateByFilters(filters map[string]interface{}) (interface{}, error)
- func (c *Config) GetClusterByID(id string) (*managementClient.Cluster, error)
- func (c *Config) GetClusterByName(name string) (*managementClient.Cluster, error)
- func (c *Config) GetClusterIDByName(name string) (string, error)
- func (c *Config) GetClusterProjects(id string) ([]managementClient.Project, error)
- func (c *Config) GetClusterRegistrationTokenByID(id string) (*managementClient.ClusterRegistrationToken, error)
- func (c *Config) GetClusterSpecialProjectsID(id string) (string, string, error)
- func (c *Config) GetGlobalRoleByID(id string) (*managementClient.GlobalRole, error)
- func (c *Config) GetProjectByID(id string) (*managementClient.Project, error)
- func (c *Config) GetProjectByName(name, clusterID string) (*managementClient.Project, error)
- func (c *Config) GetProjectIDByName(name, clusterID string) (string, error)
- func (c *Config) GetProjectNameByID(id string) (string, error)
- func (c *Config) GetProjectRoleTemplateBindingsByProjectID(projectID string) ([]managementClient.ProjectRoleTemplateBinding, error)
- func (c *Config) GetRancherVersion() (string, error)
- func (c *Config) GetRecipientByNotifier(id string) (*managementClient.Recipient, error)
- func (c *Config) GetRegistry(id, project_id, namespace_id string) (interface{}, error)
- func (c *Config) GetRegistryByFilters(filters map[string]interface{}) (interface{}, error)
- func (c *Config) GetRoleTemplateByID(id string) (*managementClient.RoleTemplate, error)
- func (c *Config) GetSecret(id, project_id, namespace_id string) (interface{}, error)
- func (c *Config) GetSecretByFilters(filters map[string]interface{}) (interface{}, error)
- func (c *Config) GetSetting(name string) (*managementClient.Setting, error)
- func (c *Config) GetSettingValue(name string) (string, error)
- func (c *Config) GetUserByName(name string) (*managementClient.User, error)
- func (c *Config) GetUserIDByName(name string) (string, error)
- func (c *Config) GlobalRoleExist(id string) error
- func (c *Config) IsProjectDefault(project *managementClient.Project) bool
- func (c *Config) IsProjectSystem(project *managementClient.Project) bool
- func (c *Config) IsRancherVersionGreaterThanOrEqual(ver string) (bool, error)
- func (c *Config) IsRancherVersionLessThan(ver string) (bool, error)
- func (c *Config) IsTokenExpired(id string) (bool, error)
- func (c *Config) ManagementClient() (*managementClient.Client, error)
- func (c *Config) NormalizeURL()
- func (c *Config) ProjectClient(id string) (*projectClient.Client, error)
- func (c *Config) ProjectExist(id string) error
- func (c *Config) RefreshCatalog(scope string, catalog interface{}) (*managementClient.CatalogRefresh, error)
- func (c *Config) RoleTemplateExist(id string) error
- func (c *Config) SetSetting(name, value string) error
- func (c *Config) SetUserPassword(user *managementClient.User, pass string) (bool, *managementClient.User, error)
- func (c *Config) SetUserPasswordByName(username, pass string) (bool, string, *managementClient.User, error)
- func (c *Config) UpdateAuthConfig(url string, createObj interface{}, respObject interface{}) error
- func (c *Config) UpdateCatalog(scope string, catalog interface{}, update map[string]interface{}) (interface{}, error)
- func (c *Config) UpdateCertificate(cert interface{}, update map[string]interface{}) (interface{}, error)
- func (c *Config) UpdateClusterByID(cluster *managementClient.Cluster, update map[string]interface{}) (*managementClient.Cluster, error)
- func (c *Config) UpdateRegistry(registry interface{}, update map[string]interface{}) (interface{}, error)
- func (c *Config) UpdateSecret(secret interface{}, update map[string]interface{}) (interface{}, error)
- func (c *Config) UpdateToken(token string) error
- func (c *Config) UserPasswordChanged(user *managementClient.User, pass string) bool
- type GoogleKubernetesEngineConfig
- type NodeTemplate
Constants ¶
View Source
const ( DefaultProcMount string = "Default" UnmaskedProcMount string = "Unmasked" )
View Source
const ( RunAsGroupStrategyMustRunAs = "MustRunAs" RunAsGroupStrategyMustRunAsNonRoot = "MustRunAsNonRoot" RunAsGroupStrategyRunAsAny = "RunAsAny" )
View Source
const ( RunAsUserStrategyMustRunAs = "MustRunAs" RunAsUserStrategyMustRunAsNonRoot = "MustRunAsNonRoot" RunAsUserStrategyRunAsAny = "RunAsAny" )
View Source
const ( SELinuxStrategyMustRunAs = "MustRunAs" SELinuxStrategyRunAsAny = "RunAsAny" )
View Source
const ( SupplementalGroupsStrategyMayRunAs = "MayRunAs" SupplementalGroupsStrategyMustRunAs = "MustRunAs" SupplementalGroupsStrategyRunAsAny = "RunAsAny" )
View Source
const ( AzureFile string = "azureFile" Flocker string = "flocker" FlexVolume string = "flexVolume" HostPath string = "hostPath" EmptyDir string = "emptyDir" GCEPersistentDisk string = "gcePersistentDisk" AWSElasticBlockStore string = "awsElasticBlockStore" GitRepo string = "gitRepo" Secret string = "secret" NFS string = "nfs" ISCSI string = "iscsi" Glusterfs string = "glusterfs" PersistentVolumeClaim string = "persistentVolumeClaim" RBD string = "rbd" Cinder string = "cinder" CephFS string = "cephFS" DownwardAPI string = "downwardAPI" FC string = "fc" ConfigMap string = "configMap" VsphereVolume string = "vsphereVolume" Quobyte string = "quobyte" AzureDisk string = "azureDisk" PhotonPersistentDisk string = "photonPersistentDisk" StorageOS string = "storageos" Projected string = "projected" PortworxVolume string = "portworxVolume" ScaleIO string = "scaleIO" CSI string = "csi" All string = "*" )
View Source
const ( AppTemplateExternalIDPrefix = "catalog://?" AppCatalogClusterLocalPrefix = "local" AppCatalogClusterPrefix = "c-" AppCatalogProjectPrefix = "p-" )
View Source
const AuthConfigADFSName = "adfs"
View Source
const AuthConfigActiveDirectoryName = "activedirectory"
View Source
const AuthConfigAzureADName = "azuread"
View Source
const AuthConfigFreeIpaName = "freeipa"
View Source
const AuthConfigGithubName = "github"
View Source
const AuthConfigKeyCloakName = "keycloak"
View Source
const AuthConfigOKTAName = "okta"
View Source
const AuthConfigOpenLdapName = "openldap"
View Source
const AuthConfigPingName = "ping"
View Source
const (
MultiClusterAppTemplatePrefix = "cattle-global-data:"
)
Variables ¶
View Source
var ( ProcMountTypes = []string{ DefaultProcMount, UnmaskedProcMount, } )
View Source
var ( // RKEConfigNodesRoles available RKE roles for nodes RKEConfigNodesRoles = []string{"controlplane", "etcd", "worker"} )
Functions ¶
func Base64Decode ¶ added in v1.3.0
func Base64Encode ¶ added in v1.3.0
func DoUserLogin ¶
func GetRandomPass ¶
func HashPasswordString ¶
func IsForbidden ¶ added in v1.4.0
IsForbidden checks if the given APIError is a Forbidden HTTP statuscode
func IsNotFound ¶
func IsVersionGreaterThanOrEqual ¶ added in v1.8.2
func IsVersionLessThanl ¶ added in v1.8.2
func NewListOpts ¶
func NormalizeURL ¶
func Provider ¶
func Provider() terraform.ResourceProvider
Provider returns a terraform.ResourceProvider.
Types ¶
type AmazonElasticContainerServiceConfig ¶
type AmazonElasticContainerServiceConfig struct { AMI string `json:"ami,omitempty" yaml:"ami,omitempty"` AccessKey string `json:"accessKey,omitempty" yaml:"accessKey,omitempty"` AssociateWorkerNodePublicIP *bool `json:"associateWorkerNodePublicIp,omitempty" yaml:"associateWorkerNodePublicIp,omitempty"` DesiredNodes int64 `json:"desiredNodes,omitempty" yaml:"desiredNodes,omitempty"` DisplayName string `json:"displayName,omitempty" yaml:"displayName,omitempty"` DriverName string `json:"driverName,omitempty" yaml:"driverName,omitempty"` InstanceType string `json:"instanceType,omitempty" yaml:"instanceType,omitempty"` KeyPairName string `json:"keyPairName,omitempty" yaml:"keyPairName,omitempty"` KubernetesVersion string `json:"kubernetesVersion,omitempty" yaml:"kubernetesVersion,omitempty"` MaximumNodes int64 `json:"maximumNodes,omitempty" yaml:"maximumNodes,omitempty"` MinimumNodes int64 `json:"minimumNodes,omitempty" yaml:"minimumNodes,omitempty"` NodeVolumeSize int64 `json:"nodeVolumeSize,omitempty" yaml:"nodeVolumeSize,omitempty"` Region string `json:"region,omitempty" yaml:"region,omitempty"` SecretKey string `json:"secretKey,omitempty" yaml:"secretKey,omitempty"` SecurityGroups []string `json:"securityGroups,omitempty" yaml:"securityGroups,omitempty"` ServiceRole string `json:"serviceRole,omitempty" yaml:"serviceRole,omitempty"` SessionToken string `json:"sessionToken,omitempty" yaml:"sessionToken,omitempty"` Subnets []string `json:"subnets,omitempty" yaml:"subnets,omitempty"` UserData string `json:"userData,omitempty" yaml:"userData,omitempty"` VirtualNetwork string `json:"virtualNetwork,omitempty" yaml:"virtualNetwork,omitempty"` }
type AzureKubernetesServiceConfig ¶
type AzureKubernetesServiceConfig struct { AADClientAppID string `json:"addClientAppId,omitempty" yaml:"addClientAppId,omitempty"` AADServerAppID string `json:"addServerAppId,omitempty" yaml:"addServerAppId,omitempty"` AADServerAppSecret string `json:"addServerAppSecret,omitempty" yaml:"addServerAppSecret,omitempty"` AADTenantID string `json:"addTenantId,omitempty" yaml:"addTenantId,omitempty"` AdminUsername string `json:"adminUsername,omitempty" yaml:"adminUsername,omitempty"` AgentDNSPrefix string `json:"agentDnsPrefix,omitempty" yaml:"agentDnsPrefix,omitempty"` AgentOsdiskSizeGB int64 `json:"agentOsdiskSize,omitempty" yaml:"agentOsdiskSize,omitempty"` AgentPoolName string `json:"agentPoolName,omitempty" yaml:"agentPoolName,omitempty"` AgentStorageProfile string `json:"agentStorageProfile,omitempty" yaml:"agentStorageProfile,omitempty"` AgentVMSize string `json:"agentVmSize,omitempty" yaml:"agentVmSize,omitempty"` AuthBaseURL string `json:"authBaseUrl" yaml:"authBaseUrl"` BaseURL string `json:"baseUrl,omitempty" yaml:"baseUrl,omitempty"` ClientID string `json:"clientId,omitempty" yaml:"clientId,omitempty"` ClientSecret string `json:"clientSecret,omitempty" yaml:"clientSecret,omitempty"` Count int64 `json:"count,omitempty" yaml:"count,omitempty"` DisplayName string `json:"displayName,omitempty" yaml:"displayName,omitempty"` DriverName string `json:"driverName,omitempty" yaml:"driverName,omitempty"` DNSServiceIP string `json:"dnsServiceIp,omitempty" yaml:"dnsServiceIp,omitempty"` DockerBridgeCIDR string `json:"dockerBridgeCidr,omitempty" yaml:"dockerBridgeCidr,omitempty"` EnableHTTPApplicationRouting bool `json:"enableHttpApplicationRouting,omitempty" yaml:"enableHttpApplicationRouting,omitempty"` EnableMonitoring *bool `json:"enableMonitoring,omitempty" yaml:"enableMonitoring,omitempty"` KubernetesVersion string `json:"kubernetesVersion,omitempty" yaml:"kubernetesVersion,omitempty"` Location string `json:"location,omitempty" yaml:"location,omitempty"` LogAnalyticsWorkspace string `json:"logAnalyticsWorkspace,omitempty" yaml:"logAnalyticsWorkspace,omitempty"` LogAnalyticsWorkspaceResourceGroup string `json:"logAnalyticsWorkspaceResourceGroup,omitempty" yaml:"logAnalyticsWorkspaceResourceGroup,omitempty"` MasterDNSPrefix string `json:"masterDnsPrefix,omitempty" yaml:"masterDnsPrefix,omitempty"` MaxPods int64 `json:"maxPods,omitempty" yaml:"maxPods,omitempty"` Name string `json:"name,omitempty" yaml:"name,omitempty"` NetworkPlugin string `json:"networkPlugin,omitempty" yaml:"networkPlugin,omitempty"` NetworkPolicy string `json:"networkPolicy,omitempty" yaml:"networkPolicy,omitempty"` PodCIDR string `json:"podCidr,omitempty" yaml:"podCidr,omitempty"` ResourceGroup string `json:"resourceGroup,omitempty" yaml:"resourceGroup,omitempty"` SSHPublicKeyContents string `json:"sshPublicKeyContents,omitempty" yaml:"sshPublicKeyContents,omitempty"` ServiceCIDR string `json:"serviceCidr,omitempty" yaml:"serviceCidr,omitempty"` Subnet string `json:"subnet,omitempty" yaml:"subnet,omitempty"` SubscriptionID string `json:"subscriptionId,omitempty" yaml:"subscriptionId,omitempty"` Tag map[string]string `json:"tags,omitempty" yaml:"tags,omitempty"` TenantID string `json:"tenantId,omitempty" yaml:"tenantId,omitempty"` VirtualNetwork string `json:"virtualNetwork,omitempty" yaml:"virtualNetwork,omitempty"` VirtualNetworkResourceGroup string `json:"virtualNetworkResourceGroup,omitempty" yaml:"virtualNetworkResourceGroup,omitempty"` }
type CLIConfig ¶
type CLIConfig struct { AdminPass string `json:"adminpass"` AccessKey string `json:"accessKey"` SecretKey string `json:"secretKey"` TokenKey string `json:"tokenKey"` CACerts string `json:"caCerts"` Insecure bool `json:"insecure,omitempty"` URL string `json:"url"` Project string `json:"project"` Path string `json:"path,omitempty"` }
CLIConfig used to store data from file.
type Client ¶
type Client struct { Management *managementClient.Client Cluster *clusterClient.Client Project *projectClient.Client }
Client are the client kind for a Rancher v3 API
type CloudCredential ¶
type CloudCredential struct { managementClient.CloudCredential Amazonec2CredentialConfig *amazonec2CredentialConfig `json:"amazonec2credentialConfig,omitempty" yaml:"amazonec2credentialConfig,omitempty"` AzureCredentialConfig *azureCredentialConfig `json:"azurecredentialConfig,omitempty" yaml:"azurecredentialConfig,omitempty"` DigitaloceanCredentialConfig *digitaloceanCredentialConfig `json:"digitaloceancredentialConfig,omitempty" yaml:"digitaloceancredentialConfig,omitempty"` LinodeCredentialConfig *linodeCredentialConfig `json:"linodecredentialConfig,omitempty" yaml:"linodecredentialConfig,omitempty"` OpenstackCredentialConfig *openstackCredentialConfig `json:"openstackcredentialConfig,omitempty" yaml:"openstackcredentialConfig,omitempty"` VmwarevsphereCredentialConfig *vmwarevsphereCredentialConfig `json:"vmwarevspherecredentialConfig,omitempty" yaml:"vmwarevspherecredentialConfig,omitempty"` }
type Cluster ¶
type Cluster struct { managementClient.Cluster AmazonElasticContainerServiceConfig *AmazonElasticContainerServiceConfig `json:"amazonElasticContainerServiceConfig,omitempty" yaml:"amazonElasticContainerServiceConfig,omitempty"` AzureKubernetesServiceConfig *AzureKubernetesServiceConfig `json:"azureKubernetesServiceConfig,omitempty" yaml:"azureKubernetesServiceConfig,omitempty"` GoogleKubernetesEngineConfig *GoogleKubernetesEngineConfig `json:"googleKubernetesEngineConfig,omitempty" yaml:"googleKubernetesEngineConfig,omitempty"` }
type Config ¶
type Config struct { TokenKey string `json:"tokenKey"` URL string `json:"url"` CACerts string `json:"cacert"` Insecure bool `json:"insecure"` Bootstrap bool `json:"bootstrap"` ClusterID string `json:"clusterId"` ProjectID string `json:"projectId"` Retries int RancherVersion string K8SDefaultVersion string K8SSupportedVersions []string Sync sync.Mutex Client Client }
Config is the configuration parameters for a Rancher v3 API
func (*Config) CheckAuthConfigEnabled ¶
func (*Config) ClusterClient ¶
func (c *Config) ClusterClient(id string) (*clusterClient.Client, error)
ClusterClient creates a Rancher client scoped to a Cluster API
func (*Config) ClusterExist ¶
func (*Config) ClusterRegistrationTokenExist ¶
func (*Config) CreateCatalog ¶ added in v1.4.0
func (*Config) CreateCertificate ¶ added in v1.5.0
func (*Config) CreateClientOpts ¶
func (c *Config) CreateClientOpts() *clientbase.ClientOpts
func (*Config) CreateRegistry ¶ added in v1.4.0
func (*Config) CreateSecret ¶ added in v1.5.0
func (*Config) DeleteCatalog ¶ added in v1.4.0
func (*Config) DeleteCertificate ¶ added in v1.5.0
func (*Config) DeleteRegistry ¶ added in v1.4.0
func (*Config) DeleteSecret ¶ added in v1.5.0
func (*Config) DeleteToken ¶
func (*Config) GenerateUserToken ¶
GenerateUserToken generates token with ttl measured in seconds
func (*Config) GetAuthConfig ¶
func (c *Config) GetAuthConfig(in *managementClient.AuthConfig) (interface{}, error)
func (*Config) GetCatalog ¶ added in v1.4.0
func (*Config) GetCatalogByName ¶ added in v1.4.0
func (*Config) GetCertificate ¶ added in v1.5.0
func (*Config) GetCertificateByFilters ¶ added in v1.5.0
func (*Config) GetClusterByID ¶
func (c *Config) GetClusterByID(id string) (*managementClient.Cluster, error)
func (*Config) GetClusterByName ¶
func (c *Config) GetClusterByName(name string) (*managementClient.Cluster, error)
func (*Config) GetClusterIDByName ¶
func (*Config) GetClusterProjects ¶ added in v1.1.0
func (c *Config) GetClusterProjects(id string) ([]managementClient.Project, error)
func (*Config) GetClusterRegistrationTokenByID ¶
func (c *Config) GetClusterRegistrationTokenByID(id string) (*managementClient.ClusterRegistrationToken, error)
func (*Config) GetClusterSpecialProjectsID ¶ added in v1.1.0
func (*Config) GetGlobalRoleByID ¶ added in v1.4.0
func (c *Config) GetGlobalRoleByID(id string) (*managementClient.GlobalRole, error)
func (*Config) GetProjectByID ¶
func (c *Config) GetProjectByID(id string) (*managementClient.Project, error)
func (*Config) GetProjectByName ¶
func (c *Config) GetProjectByName(name, clusterID string) (*managementClient.Project, error)
func (*Config) GetProjectIDByName ¶
func (*Config) GetProjectRoleTemplateBindingsByProjectID ¶
func (c *Config) GetProjectRoleTemplateBindingsByProjectID(projectID string) ([]managementClient.ProjectRoleTemplateBinding, error)
func (*Config) GetRancherVersion ¶ added in v1.7.1
GetRancherVersion get Rancher server version
func (*Config) GetRecipientByNotifier ¶ added in v1.6.0
func (c *Config) GetRecipientByNotifier(id string) (*managementClient.Recipient, error)
func (*Config) GetRegistry ¶ added in v1.4.0
func (*Config) GetRegistryByFilters ¶ added in v1.4.0
func (*Config) GetRoleTemplateByID ¶
func (c *Config) GetRoleTemplateByID(id string) (*managementClient.RoleTemplate, error)
func (*Config) GetSecretByFilters ¶ added in v1.5.0
func (*Config) GetSetting ¶
func (c *Config) GetSetting(name string) (*managementClient.Setting, error)
func (*Config) GetUserByName ¶
func (c *Config) GetUserByName(name string) (*managementClient.User, error)
func (*Config) GlobalRoleExist ¶ added in v1.4.0
func (*Config) IsProjectDefault ¶ added in v1.1.0
func (c *Config) IsProjectDefault(project *managementClient.Project) bool
func (*Config) IsProjectSystem ¶ added in v1.1.0
func (c *Config) IsProjectSystem(project *managementClient.Project) bool
func (*Config) IsRancherVersionGreaterThanOrEqual ¶ added in v1.8.2
func (*Config) IsRancherVersionLessThan ¶ added in v1.8.2
func (*Config) ManagementClient ¶
func (c *Config) ManagementClient() (*managementClient.Client, error)
ManagementClient creates a Rancher client scoped to the management API
func (*Config) NormalizeURL ¶
func (c *Config) NormalizeURL()
func (*Config) ProjectClient ¶
func (c *Config) ProjectClient(id string) (*projectClient.Client, error)
ProjectClient creates a Rancher client scoped to a Project API
func (*Config) ProjectExist ¶
func (*Config) RefreshCatalog ¶ added in v1.7.2
func (c *Config) RefreshCatalog(scope string, catalog interface{}) (*managementClient.CatalogRefresh, error)
func (*Config) RoleTemplateExist ¶
func (*Config) SetSetting ¶
func (*Config) SetUserPassword ¶
func (c *Config) SetUserPassword(user *managementClient.User, pass string) (bool, *managementClient.User, error)
func (*Config) SetUserPasswordByName ¶
func (*Config) UpdateAuthConfig ¶
func (*Config) UpdateCatalog ¶ added in v1.4.0
func (*Config) UpdateCertificate ¶ added in v1.5.0
func (*Config) UpdateClusterByID ¶
func (c *Config) UpdateClusterByID(cluster *managementClient.Cluster, update map[string]interface{}) (*managementClient.Cluster, error)
func (*Config) UpdateRegistry ¶ added in v1.4.0
func (*Config) UpdateSecret ¶ added in v1.5.0
func (*Config) UpdateToken ¶
UpdateToken update tokenkey and restart client connections
func (*Config) UserPasswordChanged ¶
func (c *Config) UserPasswordChanged(user *managementClient.User, pass string) bool
type GoogleKubernetesEngineConfig ¶
type GoogleKubernetesEngineConfig struct { ClusterIpv4Cidr string `json:"clusterIpv4Cidr,omitempty" yaml:"clusterIpv4Cidr,omitempty"` Credential string `json:"credential,omitempty" yaml:"credential,omitempty"` Description string `json:"description,omitempty" yaml:"description,omitempty"` DiskSizeGb int64 `json:"diskSizeGb,omitempty" yaml:"diskSizeGb,omitempty"` DiskType string `json:"diskType,omitempty" yaml:"diskType,omitempty"` DisplayName string `json:"displayName,omitempty" yaml:"displayName,omitempty"` DriverName string `json:"driverName,omitempty" yaml:"driverName,omitempty"` EnableAlphaFeature bool `json:"enableAlphaFeature,omitempty" yaml:"enableAlphaFeature,omitempty"` EnableAutoRepair bool `json:"enableAutoRepair,omitempty" yaml:"enableAutoRepair,omitempty"` EnableAutoUpgrade bool `json:"enableAutoUpgrade,omitempty" yaml:"enableAutoUpgrade,omitempty"` EnableHorizontalPodAutoscaling *bool `json:"enableHorizontalPodAutoscaling,omitempty" yaml:"enableHorizontalPodAutoscaling,omitempty"` EnableHTTPLoadBalancing *bool `json:"enableHttpLoadBalancing,omitempty" yaml:"enableHttpLoadBalancing,omitempty"` EnableKubernetesDashboard bool `json:"enableKubernetesDashboard,omitempty" yaml:"enableKubernetesDashboard,omitempty"` EnableLegacyAbac bool `json:"enableLegacyAbac,omitempty" yaml:"enableLegacyAbac,omitempty"` EnableMasterAuthorizedNetwork bool `json:"enableMasterAuthorizedNetwork,omitempty" yaml:"enableMasterAuthorizedNetwork,omitempty"` EnableNetworkPolicyConfig *bool `json:"enableNetworkPolicyConfig,omitempty" yaml:"enableNetworkPolicyConfig,omitempty"` EnableNodepoolAutoscaling bool `json:"enableNodepoolAutoscaling,omitempty" yaml:"enableNodepoolAutoscaling,omitempty"` EnablePrivateEndpoint bool `json:"enablePrivateEndpoint,omitempty" yaml:"enablePrivateEndpoint,omitempty"` EnablePrivateNodes bool `json:"enablePrivateNodes,omitempty" yaml:"enablePrivateNodes,omitempty"` EnableStackdriverLogging *bool `json:"enableStackdriverLogging,omitempty" yaml:"enableStackdriverLogging,omitempty"` EnableStackdriverMonitoring *bool `json:"enableStackdriverMonitoring,omitempty" yaml:"enableStackdriverMonitoring,omitempty"` ImageType string `json:"imageType,omitempty" yaml:"imageType,omitempty"` IPPolicyClusterIpv4CidrBlock string `json:"ipPolicyClusterIpv4CidrBlock,omitempty" yaml:"ipPolicyClusterIpv4CidrBlock,omitempty"` IPPolicyClusterSecondaryRangeName string `json:"ipPolicyClusterSecondaryRangeName,omitempty" yaml:"ipPolicyClusterSecondaryRangeName,omitempty"` IPPolicyCreateSubnetwork bool `json:"ipPolicyCreateSubnetwork,omitempty" yaml:"ipPolicyCreateSubnetwork,omitempty"` IPPolicyNodeIpv4CidrBlock string `json:"ipPolicyNodeIpv4CidrBlock,omitempty" yaml:"ipPolicyNodeIpv4CidrBlock,omitempty"` IPPolicyServicesIpv4CidrBlock string `json:"ipPolicyServicesIpv4CidrBlock,omitempty" yaml:"ipPolicyServicesIpv4CidrBlock,omitempty"` IPPolicyServicesSecondaryRangeName string `json:"ipPolicyServicesSecondaryRangeName,omitempty" yaml:"ipPolicyServicesSecondaryRangeName,omitempty"` IPPolicySubnetworkName string `json:"ipPolicySubnetworkName,omitempty" yaml:"ipPolicySubnetworkName,omitempty"` IssueClientCertificate bool `json:"issueClientCertificate,omitempty" yaml:"issueClientCertificate,omitempty"` KubernetesDashboard bool `json:"kubernetesDashboard,omitempty" yaml:"kubernetesDashboard,omitempty"` Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"` LocalSsdCount int64 `json:"localSsdCount,omitempty" yaml:"localSsdCount,omitempty"` Locations []string `json:"locations,omitempty" yaml:"locations,omitempty"` MachineType string `json:"machineType,omitempty" yaml:"machineType,omitempty"` MaintenanceWindow string `json:"maintenanceWindow,omitempty" yaml:"maintenanceWindow,omitempty"` MasterAuthorizedNetworkCidrBlocks []string `json:"masterAuthorizedNetworkCidrBlocks,omitempty" yaml:"masterAuthorizedNetworkCidrBlocks,omitempty"` MasterIpv4CidrBlock string `json:"masterIpv4CidrBlock,omitempty" yaml:"masterIpv4CidrBlock,omitempty"` MasterVersion string `json:"masterVersion,omitempty" yaml:"masterVersion,omitempty"` MaxNodeCount int64 `json:"maxNodeCount,omitempty" yaml:"maxNodeCount,omitempty"` MinNodeCount int64 `json:"minNodeCount,omitempty" yaml:"minNodeCount,omitempty"` Name string `json:"name,omitempty" yaml:"name,omitempty"` Network string `json:"network,omitempty" yaml:"network,omitempty"` NodeCount int64 `json:"nodeCount,omitempty" yaml:"nodeCount,omitempty"` NodePool string `json:"nodePool,omitempty" yaml:"nodePool,omitempty"` NodeVersion string `json:"nodeVersion,omitempty" yaml:"nodeVersion,omitempty"` OauthScopes []string `json:"oauthScopes,omitempty" yaml:"oauthScopes,omitempty"` Preemptible bool `json:"preemptible,omitempty" yaml:"preemptible,omitempty"` ProjectID string `json:"projectId,omitempty" yaml:"projectId,omitempty"` Region string `json:"region,omitempty" yaml:"region,omitempty"` ResourceLabels map[string]string `json:"resourceLabels,omitempty" yaml:"resourceLabels,omitempty"` ServiceAccount string `json:"serviceAccount,omitempty" yaml:"serviceAccount,omitempty"` SubNetwork string `json:"subNetwork,omitempty" yaml:"subNetwork,omitempty"` UseIPAliases bool `json:"useIpAliases,omitempty" yaml:"useIpAliases,omitempty"` Taints []string `json:"taints,omitempty" yaml:"taints,omitempty"` Zone string `json:"zone,omitempty" yaml:"zone,omitempty"` }
type NodeTemplate ¶
type NodeTemplate struct { managementClient.NodeTemplate Amazonec2Config *amazonec2Config `json:"amazonec2Config,omitempty" yaml:"amazonec2Config,omitempty"` AzureConfig *azureConfig `json:"azureConfig,omitempty" yaml:"azureConfig,omitempty"` DigitaloceanConfig *digitaloceanConfig `json:"digitaloceanConfig,omitempty" yaml:"digitaloceanConfig,omitempty"` LinodeConfig *linodeConfig `json:"linodeConfig,omitempty" yaml:"linodeConfig,omitempty"` OpenstackConfig *openstackConfig `json:"openstackConfig,omitempty" yaml:"openstackConfig,omitempty"` VmwarevsphereConfig *vmwarevsphereConfig `json:"vmwarevsphereConfig,omitempty" yaml:"vmwarevsphereConfig,omitempty"` OpennebulaConfig *opennebulaConfig `json:"opennebulaConfig,omitempty" yaml:"opennebulaConfig,omitempty"` }
Source Files ¶
- config.go
- data_source_rancher2_app.go
- data_source_rancher2_catalog.go
- data_source_rancher2_certificate.go
- data_source_rancher2_cloud_credential.go
- data_source_rancher2_cluster.go
- data_source_rancher2_cluster_alert_group.go
- data_source_rancher2_cluster_alert_rule.go
- data_source_rancher2_cluster_driver.go
- data_source_rancher2_cluster_logging.go
- data_source_rancher2_cluster_role_template_binding.go
- data_source_rancher2_cluster_scan.go
- data_source_rancher2_cluster_template.go
- data_source_rancher2_etcd_backup.go
- data_source_rancher2_global_role_binding.go
- data_source_rancher2_multi_cluster_app.go
- data_source_rancher2_namespace.go
- data_source_rancher2_node_driver.go
- data_source_rancher2_node_pool.go
- data_source_rancher2_node_template.go
- data_source_rancher2_notifier.go
- data_source_rancher2_pod_security_policy_template.go
- data_source_rancher2_project.go
- data_source_rancher2_project_alert_group.go
- data_source_rancher2_project_alert_rule.go
- data_source_rancher2_project_logging.go
- data_source_rancher2_project_role_template_binding.go
- data_source_rancher2_registry.go
- data_source_rancher2_role_template.go
- data_source_rancher2_secret.go
- data_source_rancher2_setting.go
- data_source_rancher2_user.go
- import_rancher2_app.go
- import_rancher2_catalog.go
- import_rancher2_cluster.go
- import_rancher2_cluster_alert_group.go
- import_rancher2_cluster_alert_rule.go
- import_rancher2_cluster_driver.go
- import_rancher2_cluster_logging.go
- import_rancher2_cluster_role_template_binding.go
- import_rancher2_cluster_template.go
- import_rancher2_etcd_backup.go
- import_rancher2_global_role_binding.go
- import_rancher2_multi_cluster_app.go
- import_rancher2_namespace.go
- import_rancher2_node_driver.go
- import_rancher2_node_pool.go
- import_rancher2_node_template.go
- import_rancher2_notifier.go
- import_rancher2_pod_security_policy_template.go
- import_rancher2_project.go
- import_rancher2_project_alert_group.go
- import_rancher2_project_alert_rule.go
- import_rancher2_project_logging.go
- import_rancher2_project_role_template_binding.go
- import_rancher2_registry.go
- import_rancher2_role_template.go
- import_rancher2_secret.go
- import_rancher2_setting.go
- import_rancher2_user.go
- provider.go
- resource_rancher2_app.go
- resource_rancher2_auth_config_activedirectory.go
- resource_rancher2_auth_config_adfs.go
- resource_rancher2_auth_config_azuread.go
- resource_rancher2_auth_config_freeipa.go
- resource_rancher2_auth_config_github.go
- resource_rancher2_auth_config_keycloak.go
- resource_rancher2_auth_config_okta.go
- resource_rancher2_auth_config_openldap.go
- resource_rancher2_auth_config_ping.go
- resource_rancher2_bootstrap.go
- resource_rancher2_catalog.go
- resource_rancher2_certificate.go
- resource_rancher2_cloud_credential.go
- resource_rancher2_cluster.go
- resource_rancher2_cluster_alert_group.go
- resource_rancher2_cluster_alert_rule.go
- resource_rancher2_cluster_driver.go
- resource_rancher2_cluster_logging.go
- resource_rancher2_cluster_role_template_binding.go
- resource_rancher2_cluster_sync.go
- resource_rancher2_cluster_template.go
- resource_rancher2_etcd_backup.go
- resource_rancher2_global_role_binding.go
- resource_rancher2_multi_cluster_app.go
- resource_rancher2_namespace.go
- resource_rancher2_node_driver.go
- resource_rancher2_node_pool.go
- resource_rancher2_node_template.go
- resource_rancher2_notifier.go
- resource_rancher2_pod_security_policy_template.go
- resource_rancher2_project.go
- resource_rancher2_project_alert_group.go
- resource_rancher2_project_alert_rule.go
- resource_rancher2_project_logging.go
- resource_rancher2_project_role_template_binding.go
- resource_rancher2_registry.go
- resource_rancher2_role_template.go
- resource_rancher2_secret.go
- resource_rancher2_setting.go
- resource_rancher2_token.go
- resource_rancher2_user.go
- schema_alert_group.go
- schema_alert_rule.go
- schema_answer.go
- schema_app.go
- schema_auth_config.go
- schema_auth_config_activedirectory.go
- schema_auth_config_adfs.go
- schema_auth_config_azuread.go
- schema_auth_config_freeipa.go
- schema_auth_config_github.go
- schema_auth_config_keycloak.go
- schema_auth_config_ldap.go
- schema_auth_config_okta.go
- schema_auth_config_openldap.go
- schema_auth_config_ping.go
- schema_bootstrap.go
- schema_catalog.go
- schema_certificate.go
- schema_cloud_credential.go
- schema_cloud_credential_amazonec2.go
- schema_cloud_credential_azure.go
- schema_cloud_credential_digitalocean.go
- schema_cloud_credential_linode.go
- schema_cloud_credential_openstack.go
- schema_cloud_credential_vsphere.go
- schema_cluster.go
- schema_cluster_aks_config.go
- schema_cluster_alert_group.go
- schema_cluster_alert_rule.go
- schema_cluster_driver.go
- schema_cluster_eks_config.go
- schema_cluster_gke_config.go
- schema_cluster_k3s_config.go
- schema_cluster_logging.go
- schema_cluster_rke_config.go
- schema_cluster_rke_config_authentication.go
- schema_cluster_rke_config_authorization.go
- schema_cluster_rke_config_bastion_host.go
- schema_cluster_rke_config_cloud_provider.go
- schema_cluster_rke_config_cloud_provider_aws.go
- schema_cluster_rke_config_cloud_provider_azure.go
- schema_cluster_rke_config_cloud_provider_openstack.go
- schema_cluster_rke_config_cloud_provider_vsphere.go
- schema_cluster_rke_config_dns.go
- schema_cluster_rke_config_ingress.go
- schema_cluster_rke_config_monitoring.go
- schema_cluster_rke_config_network.go
- schema_cluster_rke_config_nodes.go
- schema_cluster_rke_config_private_registries.go
- schema_cluster_rke_config_services.go
- schema_cluster_rke_config_services_etcd.go
- schema_cluster_rke_config_services_kube_api.go
- schema_cluster_rke_config_services_kube_controller.go
- schema_cluster_rke_config_services_kubelet.go
- schema_cluster_rke_config_services_kubeproxy.go
- schema_cluster_rke_config_services_scheduler.go
- schema_cluster_role_template_binding.go
- schema_cluster_scan.go
- schema_cluster_sync.go
- schema_cluster_template.go
- schema_common.go
- schema_container_resource_limit.go
- schema_etcd_backup.go
- schema_global_role_binding.go
- schema_logging_custom_target_config.go
- schema_logging_elasticsearch_config.go
- schema_logging_fluentd_config.go
- schema_logging_kafka_config.go
- schema_logging_splunk_config.go
- schema_logging_syslog_config.go
- schema_member.go
- schema_monitoring_input.go
- schema_multi_cluster_app.go
- schema_namespace.go
- schema_node_driver.go
- schema_node_pool.go
- schema_node_template.go
- schema_node_template_amazonec2.go
- schema_node_template_azure.go
- schema_node_template_digitalocean.go
- schema_node_template_linode.go
- schema_node_template_opennebula.go
- schema_node_template_openstack.go
- schema_node_template_vsphere.go
- schema_notifier.go
- schema_notifier_pagerduty_config.go
- schema_notifier_slack_config.go
- schema_notifier_smtp_config.go
- schema_notifier_webhook_config.go
- schema_notifier_wechat_config.go
- schema_pod_security_policy_allowed_csi_drivers.go
- schema_pod_security_policy_allowed_flex_volumes.go
- schema_pod_security_policy_allowed_host_paths.go
- schema_pod_security_policy_fs_group.go
- schema_pod_security_policy_host_port_range.go
- schema_pod_security_policy_id_range.go
- schema_pod_security_policy_proc_mount_type.go
- schema_pod_security_policy_run_as_group.go
- schema_pod_security_policy_run_as_user.go
- schema_pod_security_policy_runtime_class.go
- schema_pod_security_policy_se_linux_options.go
- schema_pod_security_policy_se_linux_strategy.go
- schema_pod_security_policy_supplemental_groups.go
- schema_pod_security_policy_template.go
- schema_pod_security_policy_volumes.go
- schema_policy_rule.go
- schema_project.go
- schema_project_alert_group.go
- schema_project_alert_rule.go
- schema_project_logging.go
- schema_project_role_template_binding.go
- schema_recipient.go
- schema_registry.go
- schema_role_template.go
- schema_scheduled_cluster_scan.go
- schema_secret.go
- schema_setting.go
- schema_taint.go
- schema_target.go
- schema_token.go
- schema_upgrade_strategy.go
- schema_user.go
- structure_alert_rule.go
- structure_answer.go
- structure_app.go
- structure_auth_config_activedirectory.go
- structure_auth_config_adfs.go
- structure_auth_config_azuread.go
- structure_auth_config_freeipa.go
- structure_auth_config_github.go
- structure_auth_config_keycloak.go
- structure_auth_config_ldap.go
- structure_auth_config_okta.go
- structure_auth_config_openldap.go
- structure_auth_config_ping.go
- structure_catalog.go
- structure_certificate.go
- structure_cloud_credential.go
- structure_cloud_credential_amazonec2.go
- structure_cloud_credential_azure.go
- structure_cloud_credential_digitalocean.go
- structure_cloud_credential_linode.go
- structure_cloud_credential_openstack.go
- structure_cloud_credential_vsphere.go
- structure_cluster.go
- structure_cluster_aks_config.go
- structure_cluster_alert_group.go
- structure_cluster_alert_rule.go
- structure_cluster_driver.go
- structure_cluster_eks_config.go
- structure_cluster_gke_config.go
- structure_cluster_k3s_config.go
- structure_cluster_logging.go
- structure_cluster_rke_config.go
- structure_cluster_rke_config_authentication.go
- structure_cluster_rke_config_authorization.go
- structure_cluster_rke_config_bastion_host.go
- structure_cluster_rke_config_cloud_provider.go
- structure_cluster_rke_config_cloud_provider_aws.go
- structure_cluster_rke_config_cloud_provider_azure.go
- structure_cluster_rke_config_cloud_provider_openstack.go
- structure_cluster_rke_config_cloud_provider_vsphere.go
- structure_cluster_rke_config_dns.go
- structure_cluster_rke_config_ingress.go
- structure_cluster_rke_config_monitoring.go
- structure_cluster_rke_config_network.go
- structure_cluster_rke_config_nodes.go
- structure_cluster_rke_config_private_registries.go
- structure_cluster_rke_config_services.go
- structure_cluster_rke_config_services_etcd.go
- structure_cluster_rke_config_services_kube_api.go
- structure_cluster_rke_config_services_kube_controller.go
- structure_cluster_rke_config_services_kubelet.go
- structure_cluster_rke_config_services_kubeproxy.go
- structure_cluster_rke_config_services_scheduler.go
- structure_cluster_role_template_binding.go
- structure_cluster_scan.go
- structure_cluster_template.go
- structure_etcd_backup.go
- structure_global_role_binding.go
- structure_logging_custom_target_config.go
- structure_logging_elasticsearch_config.go
- structure_logging_fluentd_config.go
- structure_logging_kafka_config.go
- structure_logging_splunk_config.go
- structure_logging_syslog_config.go
- structure_member.go
- structure_monitoring_input.go
- structure_multi_cluster_app.go
- structure_namespace.go
- structure_node_driver.go
- structure_node_pool.go
- structure_node_template.go
- structure_node_template_amazonec2.go
- structure_node_template_azure.go
- structure_node_template_digitalocean.go
- structure_node_template_linode.go
- structure_node_template_opennebula.go
- structure_node_template_openstack.go
- structure_node_template_vsphere.go
- structure_notifier.go
- structure_notifier_pagerduty_config.go
- structure_notifier_slack_config.go
- structure_notifier_smtp_config.go
- structure_notifier_webhook_config.go
- structure_notifier_wechat_config.go
- structure_pod_security_policy_allowed_csi_drivers.go
- structure_pod_security_policy_allowed_flex_volumes.go
- structure_pod_security_policy_allowed_host_paths.go
- structure_pod_security_policy_fs_group.go
- structure_pod_security_policy_host_port_range.go
- structure_pod_security_policy_id_ranges.go
- structure_pod_security_policy_run_as_group.go
- structure_pod_security_policy_run_as_user.go
- structure_pod_security_policy_runtime_class_strategy.go
- structure_pod_security_policy_se_linux_options.go
- structure_pod_security_policy_se_linux_strategy.go
- structure_pod_security_policy_supplemental_groups.go
- structure_pod_security_policy_template.go
- structure_policy_rule.go
- structure_project.go
- structure_project_alert_group.go
- structure_project_alert_rule.go
- structure_project_logging.go
- structure_project_role_template_binding.go
- structure_recipient.go
- structure_registry.go
- structure_role_template.go
- structure_scheduled_cluster_scan.go
- structure_secret.go
- structure_setting.go
- structure_taint.go
- structure_target.go
- structure_token.go
- structure_upgrade_strategy.go
- structure_user.go
- util.go
Click to show internal directories.
Click to hide internal directories.