Documentation ¶
Index ¶
- Constants
- func ClusterSAName(clusterID string) string
- func CreateGlobalnetConfigMap(kubeClient kubernetes.Interface, globalnetEnabled bool, ...) error
- func CreateNewBrokerRoleBinding(kubeClient kubernetes.Interface, serviceAccount, roleName, inNamespace string) (brokerRoleBinding *rbacv1.RoleBinding, err error)
- func CreateNewBrokerSA(kubeClient kubernetes.Interface, submarinerBrokerSA, inNamespace string) (brokerSA *v1.ServiceAccount, err error)
- func CreateOrUpdateBrokerAdminRole(clientset kubernetes.Interface, inNamespace string) (created bool, err error)
- func CreateOrUpdateClusterBrokerRole(kubeClient kubernetes.Interface, inNamespace string) (bool, error)
- func CreateSAForCluster(kubeClient kubernetes.Interface, clusterID, inNamespace string) (*v1.Secret, error)
- func Ensure(crdUpdater crd.Updater, kubeClient kubernetes.Interface, componentArr []string, ...) error
- func GetGlobalnetConfigMap(kubeClient kubernetes.Interface, namespace string) (*v1.ConfigMap, error)
- func NewBrokerAdminRole() *rbacv1.Role
- func NewBrokerClusterRole() *rbacv1.Role
- func NewBrokerRoleBinding(serviceAccount, role, namespace string) *rbacv1.RoleBinding
- func NewBrokerSA(submarinerBrokerSA string) *v1.ServiceAccount
- func NewGlobalnetConfigMap(globalnetEnabled bool, defaultGlobalCidrRange string, ...) (*v1.ConfigMap, error)
- func UpdateGlobalnetConfigMap(k8sClientset kubernetes.Interface, namespace string, configMap *v1.ConfigMap, ...) error
- func WaitForClientToken(kubeClient kubernetes.Interface, submarinerBrokerSA, inNamespace string) (*v1.Secret, error)
- func WriteInfoToFile(restConfig *rest.Config, brokerNamespace, ipsecFile string, ...) error
- type ClusterInfo
- type Info
Constants ¶
View Source
const ( GlobalCIDRConfigMapName = "submariner-globalnet-info" GlobalnetStatusKey = "globalnetEnabled" ClusterInfoKey = "clusterinfo" GlobalnetCidrRange = "globalnetCidrRange" GlobalnetClusterSize = "globalnetClusterSize" DefaultGlobalnetCIDR = "242.0.0.0/8" DefaultGlobalnetClusterSize = 65536 // i.e., x.x.x.x/16 subnet mask )
View Source
const InfoFileName = "broker-info.subm"
Variables ¶
This section is empty.
Functions ¶
func ClusterSAName ¶ added in v0.12.0
func CreateGlobalnetConfigMap ¶ added in v0.5.0
func CreateNewBrokerRoleBinding ¶ added in v0.3.0
func CreateNewBrokerRoleBinding(kubeClient kubernetes.Interface, serviceAccount, roleName, inNamespace string) ( brokerRoleBinding *rbacv1.RoleBinding, err error)
nolint:wrapcheck // No need to wrap here
func CreateNewBrokerSA ¶ added in v0.3.0
func CreateNewBrokerSA(kubeClient kubernetes.Interface, submarinerBrokerSA, inNamespace string) (brokerSA *v1.ServiceAccount, err error)
nolint:wrapcheck // No need to wrap here
func CreateOrUpdateBrokerAdminRole ¶ added in v0.5.0
func CreateOrUpdateBrokerAdminRole(clientset kubernetes.Interface, inNamespace string) (created bool, err error)
nolint:wrapcheck // No need to wrap here
func CreateOrUpdateClusterBrokerRole ¶ added in v0.7.0
func CreateOrUpdateClusterBrokerRole(kubeClient kubernetes.Interface, inNamespace string) (bool, error)
nolint:wrapcheck // No need to wrap here
func CreateSAForCluster ¶ added in v0.3.0
func CreateSAForCluster(kubeClient kubernetes.Interface, clusterID, inNamespace string) (*v1.Secret, error)
CreateSAForCluster creates a new SA, and binds it to the submariner cluster role.
func GetGlobalnetConfigMap ¶ added in v0.5.0
func GetGlobalnetConfigMap(kubeClient kubernetes.Interface, namespace string) (*v1.ConfigMap, error)
nolint:wrapcheck // No need to wrap here
func NewBrokerAdminRole ¶ added in v0.3.0
Create a role to bind to Broker SA.
func NewBrokerClusterRole ¶ added in v0.3.0
Create a role for each Cluster SAs to bind to.
func NewBrokerRoleBinding ¶
func NewBrokerRoleBinding(serviceAccount, role, namespace string) *rbacv1.RoleBinding
Create a role for to bind the cluster admin (subctl) SA.
func NewBrokerSA ¶
func NewBrokerSA(submarinerBrokerSA string) *v1.ServiceAccount
func NewGlobalnetConfigMap ¶ added in v0.5.0
func UpdateGlobalnetConfigMap ¶ added in v0.5.0
func UpdateGlobalnetConfigMap(k8sClientset kubernetes.Interface, namespace string, configMap *v1.ConfigMap, newCluster ClusterInfo) error
func WaitForClientToken ¶ added in v0.3.0
Types ¶
type ClusterInfo ¶ added in v0.5.0
type Info ¶ added in v0.12.0
type Info struct { BrokerURL string `json:"brokerURL"` ClientToken *corev1.Secret `omitempty,json:"clientToken"` IPSecPSK *corev1.Secret `omitempty,json:"ipsecPSK"` ServiceDiscovery bool `omitempty,json:"serviceDiscovery"` Components []string `json:",omitempty"` CustomDomains *[]string `omitempty,json:"customDomains"` }
func ReadInfoFromFile ¶ added in v0.12.0
func (*Info) GetBrokerAdministratorConfig ¶ added in v0.12.0
func (*Info) GetComponents ¶ added in v0.12.0
func (*Info) IsConnectivityEnabled ¶ added in v0.12.0
func (*Info) IsServiceDiscoveryEnabled ¶ added in v0.12.0
Source Files ¶
Click to show internal directories.
Click to hide internal directories.