Documentation ¶
Overview ¶
Copyright 2021.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- Constants
- func CreateBrokerInfoConfigMap(c client.Client, restConfig *rest.Config, instance *operatorv1alpha1.Fabric) error
- func CreateGlobalnetConfigMap(c client.Client, globalnetEnabled bool, defaultGlobalCidrRange string, ...) error
- func CreateNewBrokerNamespace(c client.Client) error
- func CreateNewBrokerRoleBinding(c client.Client, serviceAccount, role string) error
- func CreateNewBrokerSA(c client.Client, submarinerBrokerSA string) error
- func CreateOrUpdateBrokerAdminRole(c client.Client) error
- func CreateOrUpdateClusterBrokerRole(c client.Client) error
- func CreateSAForCluster(c client.Client, reader client.Reader, clusterID string) (*v1.Secret, error)
- func Ensure(c client.Client, config *rest.Config, ...) error
- func GeneralGlobalnetConfigMap(cm *v1.ConfigMap, globalnetEnabled bool, defaultGlobalCidrRange string, ...) error
- func GetClientTokenSecret(reader client.Reader, brokerNamespace, submarinerBrokerSA string) (*v1.Secret, error)
- func GetGlobalnetConfigMap(reader client.Reader, namespace string) (*v1.ConfigMap, error)
- func NewBrokerAdminRole(role *rbacv1.Role) error
- func NewBrokerClusterRole(role *rbacv1.Role) error
- func NewBrokerNamespace() *v1.Namespace
- func NewBrokerRoleBinding(serviceAccount, role string) *rbacv1.RoleBinding
- func NewBrokerSA(submarinerBrokerSA string) *v1.ServiceAccount
- func UpdateGlobalnetConfigMap(c client.Client, namespace string, configMap *v1.ConfigMap, ...) error
- func WaitForClientToken(reader client.Reader, submarinerBrokerSA string) (secret *v1.Secret, err error)
- type BrokerInfo
- func (data *BrokerInfo) GetBrokerAdministratorCluster() (cluster.Cluster, error)
- func (data *BrokerInfo) GetBrokerAdministratorConfig() *rest.Config
- func (data *BrokerInfo) GetComponents() stringset.Interface
- func (data *BrokerInfo) IsConnectivityEnabled() bool
- func (data *BrokerInfo) IsGlobalnetEnabled() bool
- func (data *BrokerInfo) IsServiceDiscoveryEnabled() bool
- func (data *BrokerInfo) SetComponents(componentSet stringset.Interface)
- func (data *BrokerInfo) ToString() (string, error)
- func (data *BrokerInfo) WriteConfigMap(c client.Client, instance *operatorv1alpha1.Fabric) error
- type ClusterInfo
Constants ¶
View Source
const ( GlobalCIDRConfigMapName = "submariner-globalnet-info" GlobalnetStatusKey = "globalnetEnabled" ClusterInfoKey = "clusterinfo" GlobalnetCidrRange = "globalnetCidrRange" GlobalnetClusterSize = "globalnetClusterSize" )
View Source
const (
SubmarinerBrokerAdminSA = "submariner-k8s-broker-admin"
)
Variables ¶
This section is empty.
Functions ¶
func CreateSAForCluster ¶
func CreateSAForCluster(c client.Client, reader client.Reader, clusterID string) (*v1.Secret, error)
CreateSAForCluster creates a new SA, and binds it to the submariner cluster role
func GetClientTokenSecret ¶
func GetGlobalnetConfigMap ¶
func NewBrokerAdminRole ¶
func NewBrokerClusterRole ¶
func NewBrokerNamespace ¶
func NewBrokerRoleBinding ¶
func NewBrokerRoleBinding(serviceAccount, role string) *rbacv1.RoleBinding
Create a role for to bind the cluster admin SA
func NewBrokerSA ¶
func NewBrokerSA(submarinerBrokerSA string) *v1.ServiceAccount
Types ¶
type BrokerInfo ¶
type BrokerInfo struct { BrokerURL string `json:"brokerURL"` ClientToken *v1.Secret `json:"clientToken,omitempty"` IPSecPSK *v1.Secret `json:"ipsecPSK,omitempty"` Components []string `json:",omitempty"` CustomDomains *[]string `json:"customDomains,omitempty"` GlobalnetCIDRRange string `json:"globalnetCIDRRange,omitempty"` DefaultGlobalnetClusterSize uint `json:"defaultGlobalnetClusterSize,omitempty"` }
func NewFromCluster ¶
func NewFromConfigMap ¶
func NewFromConfigMap(c client.Client) (*BrokerInfo, error)
func NewFromString ¶
func NewFromString(str string) (*BrokerInfo, error)
func (*BrokerInfo) GetBrokerAdministratorCluster ¶
func (data *BrokerInfo) GetBrokerAdministratorCluster() (cluster.Cluster, error)
func (*BrokerInfo) GetBrokerAdministratorConfig ¶
func (data *BrokerInfo) GetBrokerAdministratorConfig() *rest.Config
func (*BrokerInfo) GetComponents ¶
func (data *BrokerInfo) GetComponents() stringset.Interface
func (*BrokerInfo) IsConnectivityEnabled ¶
func (data *BrokerInfo) IsConnectivityEnabled() bool
func (*BrokerInfo) IsGlobalnetEnabled ¶
func (data *BrokerInfo) IsGlobalnetEnabled() bool
func (*BrokerInfo) IsServiceDiscoveryEnabled ¶
func (data *BrokerInfo) IsServiceDiscoveryEnabled() bool
func (*BrokerInfo) SetComponents ¶
func (data *BrokerInfo) SetComponents(componentSet stringset.Interface)
func (*BrokerInfo) ToString ¶
func (data *BrokerInfo) ToString() (string, error)
func (*BrokerInfo) WriteConfigMap ¶
func (data *BrokerInfo) WriteConfigMap(c client.Client, instance *operatorv1alpha1.Fabric) error
type ClusterInfo ¶
Click to show internal directories.
Click to hide internal directories.