broker

package
v0.14.2 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2023 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

View Source
const InfoFileName = "broker-info.subm"

Variables

This section is empty.

Functions

func CreateNewBrokerRoleBinding

func CreateNewBrokerRoleBinding(kubeClient kubernetes.Interface, serviceAccount, roleName, inNamespace string) (
	brokerRoleBinding *rbacv1.RoleBinding, err error,
)

func CreateNewBrokerSA

func CreateNewBrokerSA(kubeClient kubernetes.Interface, submarinerBrokerSA, inNamespace string) (err error)

func CreateOrUpdateBrokerAdminRole

func CreateOrUpdateBrokerAdminRole(clientset kubernetes.Interface, inNamespace string) (created bool, err error)

func CreateOrUpdateClusterBrokerRole

func CreateOrUpdateClusterBrokerRole(kubeClient kubernetes.Interface, inNamespace string) (bool, error)

func CreateSAForCluster

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 Ensure

func Ensure(crdUpdater crd.Updater, kubeClient kubernetes.Interface, componentArr []string, createCRDs bool, brokerNS string) error

func NewBrokerAdminRole

func NewBrokerAdminRole() *rbacv1.Role

Create a role to bind to Broker SA.

func NewBrokerClusterRole

func NewBrokerClusterRole() *rbacv1.Role

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 WaitForClientToken

func WaitForClientToken(kubeClient kubernetes.Interface, submarinerBrokerSA, inNamespace string) (*v1.Secret, error)

func WriteInfoToFile

func WriteInfoToFile(restConfig *rest.Config, brokerNamespace, ipsecFile string, components stringset.Interface,
	customDomains []string, status reporter.Interface,
) error

Types

type Info

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

func ReadInfoFromFile(filename string) (*Info, error)

func (*Info) GetBrokerAdministratorConfig

func (d *Info) GetBrokerAdministratorConfig(insecure bool) (*rest.Config, error)

func (*Info) GetComponents

func (d *Info) GetComponents() stringset.Interface

func (*Info) IsConnectivityEnabled

func (d *Info) IsConnectivityEnabled() bool

func (*Info) IsServiceDiscoveryEnabled

func (d *Info) IsServiceDiscoveryEnabled() bool

Jump to

Keyboard shortcuts

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