broker

package
v0.13.3 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2022 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,
)

nolint:wrapcheck // No need to wrap here

func CreateNewBrokerSA

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

nolint:wrapcheck // No need to wrap here

func CreateOrUpdateBrokerAdminRole

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

nolint:wrapcheck // No need to wrap here

func CreateOrUpdateClusterBrokerRole

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

nolint:wrapcheck // No need to wrap here

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