Documentation ¶
Index ¶
- Constants
- func GetDomainPort(address string) (string, string)
- type CertificateManager
- type DeploymentManager
- type IBPOrderer
- type InitializeIBPOrderer
- type Manager
- type Node
- func (n *Node) CanSetCertificateTimer(instance *current.IBPOrderer, update Update) bool
- func (n *Node) CheckCertificates(instance *current.IBPOrderer) (*current.CRStatus, error)
- func (n *Node) CheckStates(instance *current.IBPOrderer) error
- func (n *Node) ConfigExists(instance *current.IBPOrderer) bool
- func (n *Node) CreateGenesisSecret(instance *current.IBPOrderer) error
- func (n *Node) CreateManagers()
- func (n *Node) CustomLogic(instance *current.IBPOrderer, update Update) (*current.CRStatus, *common.Result, error)
- func (n *Node) Delete(instance *current.IBPOrderer) error
- func (n *Node) EnrollForEcert(instance *current.IBPOrderer) error
- func (n *Node) EnrollForTLSCert(instance *current.IBPOrderer) error
- func (n *Node) FabricOrdererMigration(instance *current.IBPOrderer) (*ordererconfig.Orderer, error)
- func (n *Node) FabricOrdererMigrationV2_0(instance *current.IBPOrderer) error
- func (n *Node) FabricOrdererMigrationV2_4(instance *current.IBPOrderer) error
- func (n *Node) FabricOrdererMigrationV2_5(instance *current.IBPOrderer) error
- func (n *Node) GetBCCSPSectionForInstance(instance *current.IBPOrderer) (*commonapi.BCCSP, error)
- func (n *Node) GetEndpoints(instance *current.IBPOrderer) *current.OrdererEndpoints
- func (n *Node) GetInitStoragePath(instance *current.IBPOrderer) string
- func (n *Node) GetLabels(instance v1.Object) map[string]string
- func (n *Node) HandleActions(instance *current.IBPOrderer, update Update) error
- func (n *Node) HandleRestart(instance *current.IBPOrderer, update Update) error
- func (n *Node) Initialize(instance *current.IBPOrderer, update Update) error
- func (n *Node) InitializeCreate(instance *current.IBPOrderer, initOrderer *initializer.Orderer) error
- func (n *Node) InitializeUpdateConfigOverride(instance *current.IBPOrderer, initOrderer *initializer.Orderer) error
- func (n *Node) InitializeUpdateNodeOU(instance *current.IBPOrderer) error
- func (n *Node) PreReconcileChecks(instance *current.IBPOrderer, update Update) (bool, error)
- func (n *Node) Reconcile(instance *current.IBPOrderer, update Update) (common.Result, error)
- func (n *Node) ReconcileFabricOrdererMigration(instance *current.IBPOrderer) error
- func (n *Node) ReconcileGenesisSecret(instance *current.IBPOrderer) error
- func (n *Node) ReconcileHSMImages(instance *current.IBPOrderer) bool
- func (n *Node) ReconcileManagers(instance *current.IBPOrderer, updated Update, genesisBlock []byte) error
- func (n *Node) ReconcileRBAC(instance *current.IBPOrderer) error
- func (n *Node) ReenrollEcert(instance *current.IBPOrderer) error
- func (n *Node) ReenrollEcertNewKey(instance *current.IBPOrderer) error
- func (n *Node) ReenrollTLSCert(instance *current.IBPOrderer) error
- func (n *Node) ReenrollTLSCertNewKey(instance *current.IBPOrderer) error
- func (n *Node) RenewCert(certType commoninit.SecretType, obj runtime.Object, newKey bool) error
- func (n *Node) RestartAction(instance *current.IBPOrderer) error
- func (n *Node) SelectRegion(instance *current.IBPOrderer) (bool, error)
- func (n *Node) SelectZone(instance *current.IBPOrderer) (bool, error)
- func (n *Node) SetCertificateTimer(instance *current.IBPOrderer, certType commoninit.SecretType) error
- func (n *Node) SetVersion(instance *current.IBPOrderer) (bool, error)
- func (n *Node) UpdateCRStatus(instance *current.IBPOrderer) error
- func (n *Node) UpdateConnectionProfile(instance *current.IBPOrderer) error
- func (n *Node) UpdateConnectionProfileConfigmap(instance *current.IBPOrderer, endpoints current.OrdererEndpoints, ...) error
- func (n *Node) UpdateExternalEndpoint(instance *current.IBPOrderer) bool
- func (n *Node) UpdateMSPCertificates(instance *current.IBPOrderer) error
- func (n *Node) UpdateParentStatus(instance *current.IBPOrderer) error
- type NodeManager
- type Orderer
- func (o *Orderer) AddHostPortToProfile(initProfile *configtx.Profile, instance *current.IBPOrderer) error
- func (o *Orderer) CheckCSRHosts(instance *current.IBPOrderer, hosts []string)
- func (o *Orderer) ClusterSizeUpdate(instance *current.IBPOrderer) bool
- func (o *Orderer) CreateManagers()
- func (o *Orderer) CreateNodeCR(instance *current.IBPOrderer, number int) error
- func (o *Orderer) DeleteNode(instance *current.IBPOrderer, nodes int) error
- func (o *Orderer) GenerateGenesisBlock(instance *current.IBPOrderer, ...) ([]byte, error)
- func (o *Orderer) GenerateGenesisSecretForNodes(genesisBlock []byte, nodes []current.IBPOrderer) error
- func (o *Orderer) GetClusterNodes(instance *current.IBPOrderer) (current.IBPOrdererList, error)
- func (o *Orderer) GetLabels(instance v1.Object) map[string]string
- func (o *Orderer) GetMSPConfig(instance *current.IBPOrderer, ID string) (*msp.MSPConfig, error)
- func (o *Orderer) GetNode(nodeNumber int) *Node
- func (o *Orderer) GetNodes(instance *current.IBPOrderer) []*Node
- func (o *Orderer) Initialize(instance *current.IBPOrderer, update Update) error
- func (o *Orderer) LoadInitialProfile(instance *current.IBPOrderer) (*configtx.Profile, error)
- func (o *Orderer) PatchStatus(instance *current.IBPOrderer) error
- func (o *Orderer) PreReconcileChecks(instance *current.IBPOrderer, update Update) (bool, error)
- func (o *Orderer) ReadOUConfigFile(instance *current.IBPOrderer, configFile string) ([]*msp.FabricOUIdentifier, *msp.FabricNodeOUs, error)
- func (o *Orderer) Reconcile(instance *current.IBPOrderer, update Update) (common.Result, error)
- func (o *Orderer) ReconcileCluster(instance *current.IBPOrderer, update Update, ...) (common.Result, error)
- func (o *Orderer) ReconcileManagers(instance *current.IBPOrderer, update Update, genesisBlock []byte) error
- func (o *Orderer) ReconcileNode(instance *current.IBPOrderer, update bool) (reconcile.Result, error)
- func (o *Orderer) SetVersion(instance *current.IBPOrderer) (bool, error)
- func (o *Orderer) UpdateNodesWithGenesisBlock(genesisBlock string, nodes []current.IBPOrderer) error
- func (o *Orderer) UpdateStatus(instance *current.IBPOrderer) error
- type OrdererConfig
- type Override
- type RestartManager
- type Update
Constants ¶
const ( NODE = "node" DaysToSecondsConversion = int64(24 * 60 * 60) )
Variables ¶
This section is empty.
Functions ¶
func GetDomainPort ¶
Types ¶
type CertificateManager ¶
type CertificateManager interface { CheckCertificatesForExpire(instance v1.Object, numSecondsBeforeExpire int64) (current.IBPCRStatusType, string, error) GetSignCert(string, string) ([]byte, error) GetDurationToNextRenewal(commoninit.SecretType, v1.Object, int64) (time.Duration, error) RenewCert(commoninit.SecretType, certificate.Instance, *current.EnrollmentSpec, *commonapi.BCCSP, string, bool, bool) error }
type DeploymentManager ¶
type IBPOrderer ¶
type IBPOrderer interface { Initialize(instance *current.IBPOrderer, update Update) error PreReconcileChecks(instance *current.IBPOrderer, update Update) (bool, error) ReconcileManagers(instance *current.IBPOrderer, update Update, genesisBlock []byte) error Reconcile(instance *current.IBPOrderer, update Update) (common.Result, error) }
type InitializeIBPOrderer ¶
type InitializeIBPOrderer interface { GenerateSecrets(commoninit.SecretType, *current.IBPOrderer, *commonconfig.Response) error Create(initializer.OrdererConfig, initializer.IBPOrderer, string) (*initializer.Response, error) Update(initializer.OrdererConfig, initializer.IBPOrderer) (*initializer.Response, error) CreateOrUpdateConfigMap(*current.IBPOrderer, initializer.OrdererConfig) error GetConfigFromConfigMap(instance *current.IBPOrderer) (*corev1.ConfigMap, error) MissingCrypto(*current.IBPOrderer) bool Delete(*current.IBPOrderer) error CheckIfAdminCertsUpdated(*current.IBPOrderer) (bool, error) UpdateAdminSecret(*current.IBPOrderer) error GetInitOrderer(instance *current.IBPOrderer, storagePath string) (*initializer.Orderer, error) GetUpdatedOrderer(instance *current.IBPOrderer) (*initializer.Orderer, error) UpdateSecrets(prefix commoninit.SecretType, instance *current.IBPOrderer, crypto *commonconfig.Response) error GenerateSecretsFromResponse(instance *current.IBPOrderer, cryptoResponse *commonconfig.CryptoResponse) error UpdateSecretsFromResponse(instance *current.IBPOrderer, cryptoResponse *commonconfig.CryptoResponse) error GetCrypto(instance *current.IBPOrderer) (*commonconfig.CryptoResponse, error) GetCoreConfigFromFile(instance *current.IBPOrderer, file string) (initializer.OrdererConfig, error) GetCoreConfigFromBytes(instance *current.IBPOrderer, bytes []byte) (initializer.OrdererConfig, error) }
type Node ¶
type Node struct { Client controllerclient.Client Scheme *runtime.Scheme Config *config.Config DeploymentManager DeploymentManager ServiceManager resources.Manager PVCManager resources.Manager EnvConfigMapManager resources.Manager RoleManager resources.Manager RoleBindingManager resources.Manager ServiceAccountManager resources.Manager Override Override Initializer InitializeIBPOrderer Name string CertificateManager CertificateManager RenewCertTimers map[string]*time.Timer Restart RestartManager }
func NewNodeWithOverrides ¶
func (*Node) CanSetCertificateTimer ¶
func (n *Node) CanSetCertificateTimer(instance *current.IBPOrderer, update Update) bool
This function checks whether the parent orderer node (if parent exists) or node itself is in Deployed or Warning state. We don't want to set a timer to renew certifictes before all nodes are Deployed as a certificate renewal updates the parent status to Warning while renewing.
func (*Node) CheckCertificates ¶
func (*Node) CheckStates ¶
func (n *Node) CheckStates(instance *current.IBPOrderer) error
func (*Node) ConfigExists ¶
func (n *Node) ConfigExists(instance *current.IBPOrderer) bool
func (*Node) CreateGenesisSecret ¶
func (n *Node) CreateGenesisSecret(instance *current.IBPOrderer) error
func (*Node) CreateManagers ¶
func (n *Node) CreateManagers()
func (*Node) CustomLogic ¶
func (*Node) EnrollForEcert ¶
func (n *Node) EnrollForEcert(instance *current.IBPOrderer) error
func (*Node) EnrollForTLSCert ¶
func (n *Node) EnrollForTLSCert(instance *current.IBPOrderer) error
func (*Node) FabricOrdererMigration ¶
func (n *Node) FabricOrdererMigration(instance *current.IBPOrderer) (*ordererconfig.Orderer, error)
Moving to fabric version above 1.4.6 require that the `msp/keystore` value be removed from BCCSP section if configured to use PKCS11 (HSM). NOTE: This does not support migration across major release, will not cover migration orderer from 1.4.x to 2.x
func (*Node) FabricOrdererMigrationV2_0 ¶
func (n *Node) FabricOrdererMigrationV2_0(instance *current.IBPOrderer) error
func (*Node) FabricOrdererMigrationV2_4 ¶
func (n *Node) FabricOrdererMigrationV2_4(instance *current.IBPOrderer) error
func (*Node) FabricOrdererMigrationV2_5 ¶
func (n *Node) FabricOrdererMigrationV2_5(instance *current.IBPOrderer) error
func (*Node) GetBCCSPSectionForInstance ¶
func (*Node) GetEndpoints ¶
func (n *Node) GetEndpoints(instance *current.IBPOrderer) *current.OrdererEndpoints
func (*Node) GetInitStoragePath ¶
func (n *Node) GetInitStoragePath(instance *current.IBPOrderer) string
func (*Node) HandleActions ¶
func (n *Node) HandleActions(instance *current.IBPOrderer, update Update) error
func (*Node) HandleRestart ¶
func (n *Node) HandleRestart(instance *current.IBPOrderer, update Update) error
func (*Node) Initialize ¶
func (n *Node) Initialize(instance *current.IBPOrderer, update Update) error
func (*Node) InitializeCreate ¶
func (n *Node) InitializeCreate(instance *current.IBPOrderer, initOrderer *initializer.Orderer) error
func (*Node) InitializeUpdateConfigOverride ¶
func (n *Node) InitializeUpdateConfigOverride(instance *current.IBPOrderer, initOrderer *initializer.Orderer) error
func (*Node) InitializeUpdateNodeOU ¶
func (n *Node) InitializeUpdateNodeOU(instance *current.IBPOrderer) error
func (*Node) PreReconcileChecks ¶
PreReconcileChecks validate CR request before starting reconcile flow
func (*Node) ReconcileFabricOrdererMigration ¶
func (n *Node) ReconcileFabricOrdererMigration(instance *current.IBPOrderer) error
func (*Node) ReconcileGenesisSecret ¶
func (n *Node) ReconcileGenesisSecret(instance *current.IBPOrderer) error
func (*Node) ReconcileHSMImages ¶
func (n *Node) ReconcileHSMImages(instance *current.IBPOrderer) bool
func (*Node) ReconcileManagers ¶
func (*Node) ReconcileRBAC ¶
func (n *Node) ReconcileRBAC(instance *current.IBPOrderer) error
func (*Node) ReenrollEcert ¶
func (n *Node) ReenrollEcert(instance *current.IBPOrderer) error
func (*Node) ReenrollEcertNewKey ¶
func (n *Node) ReenrollEcertNewKey(instance *current.IBPOrderer) error
func (*Node) ReenrollTLSCert ¶
func (n *Node) ReenrollTLSCert(instance *current.IBPOrderer) error
func (*Node) ReenrollTLSCertNewKey ¶
func (n *Node) ReenrollTLSCertNewKey(instance *current.IBPOrderer) error
func (*Node) RenewCert ¶
func (n *Node) RenewCert(certType commoninit.SecretType, obj runtime.Object, newKey bool) error
func (*Node) RestartAction ¶
func (n *Node) RestartAction(instance *current.IBPOrderer) error
func (*Node) SelectRegion ¶
func (n *Node) SelectRegion(instance *current.IBPOrderer) (bool, error)
func (*Node) SelectZone ¶
func (n *Node) SelectZone(instance *current.IBPOrderer) (bool, error)
func (*Node) SetCertificateTimer ¶
func (n *Node) SetCertificateTimer(instance *current.IBPOrderer, certType commoninit.SecretType) error
func (*Node) SetVersion ¶
func (n *Node) SetVersion(instance *current.IBPOrderer) (bool, error)
func (*Node) UpdateCRStatus ¶
func (n *Node) UpdateCRStatus(instance *current.IBPOrderer) error
NOTE: This is called by the timer's subroutine when it goes off, not during a reconcile loop. Therefore, it won't be overriden by the "SetStatus" method in ibporderer_controller.go
func (*Node) UpdateConnectionProfile ¶
func (n *Node) UpdateConnectionProfile(instance *current.IBPOrderer) error
func (*Node) UpdateConnectionProfileConfigmap ¶
func (*Node) UpdateExternalEndpoint ¶
func (n *Node) UpdateExternalEndpoint(instance *current.IBPOrderer) bool
func (*Node) UpdateMSPCertificates ¶
func (n *Node) UpdateMSPCertificates(instance *current.IBPOrderer) error
func (*Node) UpdateParentStatus ¶
func (n *Node) UpdateParentStatus(instance *current.IBPOrderer) error
type NodeManager ¶
type Orderer ¶
type Orderer struct { Client k8sclient.Client Scheme *runtime.Scheme Config *config.Config NodeManager NodeManager OrdererNodeManager resources.Manager Override Override RenewCertTimers map[string]*time.Timer RestartManager *restart.RestartManager }
func (*Orderer) AddHostPortToProfile ¶
func (*Orderer) CheckCSRHosts ¶
func (o *Orderer) CheckCSRHosts(instance *current.IBPOrderer, hosts []string)
func (*Orderer) ClusterSizeUpdate ¶
func (o *Orderer) ClusterSizeUpdate(instance *current.IBPOrderer) bool
func (*Orderer) CreateManagers ¶
func (o *Orderer) CreateManagers()
func (*Orderer) CreateNodeCR ¶
func (o *Orderer) CreateNodeCR(instance *current.IBPOrderer, number int) error
func (*Orderer) DeleteNode ¶
func (o *Orderer) DeleteNode(instance *current.IBPOrderer, nodes int) error
func (*Orderer) GenerateGenesisBlock ¶
func (o *Orderer) GenerateGenesisBlock(instance *current.IBPOrderer, addHostPortToProfile func(*configtx.Profile, *current.IBPOrderer) error) ([]byte, error)
func (*Orderer) GenerateGenesisSecretForNodes ¶
func (o *Orderer) GenerateGenesisSecretForNodes(genesisBlock []byte, nodes []current.IBPOrderer) error
func (*Orderer) GetClusterNodes ¶
func (o *Orderer) GetClusterNodes(instance *current.IBPOrderer) (current.IBPOrdererList, error)
func (*Orderer) GetMSPConfig ¶
func (*Orderer) Initialize ¶
func (o *Orderer) Initialize(instance *current.IBPOrderer, update Update) error
func (*Orderer) LoadInitialProfile ¶
func (*Orderer) PatchStatus ¶
func (o *Orderer) PatchStatus(instance *current.IBPOrderer) error
func (*Orderer) PreReconcileChecks ¶
func (*Orderer) ReadOUConfigFile ¶
func (o *Orderer) ReadOUConfigFile(instance *current.IBPOrderer, configFile string) ([]*msp.FabricOUIdentifier, *msp.FabricNodeOUs, error)
func (*Orderer) ReconcileCluster ¶
func (*Orderer) ReconcileManagers ¶
func (*Orderer) ReconcileNode ¶
func (*Orderer) SetVersion ¶
func (o *Orderer) SetVersion(instance *current.IBPOrderer) (bool, error)
func (*Orderer) UpdateNodesWithGenesisBlock ¶
func (o *Orderer) UpdateNodesWithGenesisBlock(genesisBlock string, nodes []current.IBPOrderer) error
func (*Orderer) UpdateStatus ¶
func (o *Orderer) UpdateStatus(instance *current.IBPOrderer) error
type OrdererConfig ¶
type Override ¶
type Override interface { Deployment(v1.Object, *appsv1.Deployment, resources.Action) error Service(v1.Object, *corev1.Service, resources.Action) error PVC(v1.Object, *corev1.PersistentVolumeClaim, resources.Action) error EnvCM(v1.Object, *corev1.ConfigMap, resources.Action, map[string]interface{}) error OrdererNode(v1.Object, *current.IBPOrderer, resources.Action) error }
type RestartManager ¶
type RestartManager interface { ForAdminCertUpdate(instance v1.Object) error ForCertUpdate(certType commoninit.SecretType, instance v1.Object) error ForConfigOverride(instance v1.Object) error ForNodeOU(instance v1.Object) error TriggerIfNeeded(instance restart.Instance) error ForRestartAction(instance v1.Object) error }
type Update ¶
type Update interface { SpecUpdated() bool ConfigOverridesUpdated() bool TLSCertUpdated() bool EcertUpdated() bool OrdererTagUpdated() bool CertificateUpdated() bool RestartNeeded() bool EcertReenrollNeeded() bool TLScertReenrollNeeded() bool EcertNewKeyReenroll() bool TLScertNewKeyReenroll() bool DeploymentUpdated() bool MSPUpdated() bool EcertEnroll() bool TLScertEnroll() bool CertificateCreated() bool GetCreatedCertType() commoninit.SecretType CryptoBackupNeeded() bool MigrateToV2() bool MigrateToV24() bool MigrateToV25() bool NodeOUUpdated() bool ImagesUpdated() bool FabricVersionUpdated() bool }