peer

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2024 License: Apache-2.0 Imports: 43 Imported by: 0

Documentation

Index

Constants

View Source
const ChaincodePortName = "chaincode"
View Source
const EventPortName = "event"
View Source
const OperationsPortName = "operations"
View Source
const PeerPortName = "peer"
View Source
const PeerPortName443 = "peer-443"

Variables

View Source
var (
	ErrClientK8s = errors.New("k8sAPIClientError")
)

Functions

func CreateSignCryptoMaterial

func CreateSignCryptoMaterial(conf *hlfv1alpha1.FabricPeer, caName string, caurl string, enrollID string, enrollSecret string, tlsCertString string) (*x509.Certificate, *ecdsa.PrivateKey, *x509.Certificate, error)

func CreateTLSCryptoMaterial

func CreateTLSCryptoMaterial(conf *hlfv1alpha1.FabricPeer, caName string, caurl string, enrollID string, enrollSecret string, tlsCertString string, hosts []string) (*x509.Certificate, *ecdsa.PrivateKey, *x509.Certificate, error)

func CreateTLSOPSCryptoMaterial

func CreateTLSOPSCryptoMaterial(conf *hlfv1alpha1.FabricPeer, caName string, caurl string, enrollID string, enrollSecret string, tlsCertString string, hosts []string) (*x509.Certificate, *ecdsa.PrivateKey, *x509.Certificate, error)

func GetPeerDeployment added in v1.3.0

func GetPeerDeployment(conf *action.Configuration, config *rest.Config, releaseName string, ns string) (*appsv1.Deployment, error)

func GetPeerState

func GetPeerState(conf *action.Configuration, config *rest.Config, releaseName string, ns string, svc *corev1.Service) (*hlfv1alpha1.FabricPeerStatus, error)

func ReenrollSignCryptoMaterial added in v1.9.0

func ReenrollSignCryptoMaterial(
	conf *hlfv1alpha1.FabricPeer,
	caName string,
	caurl string,
	enrollID string,
	tlsCertString string,
	signCertPem string,
	privateKey *ecdsa.PrivateKey,
) (*x509.Certificate, *ecdsa.PrivateKey, *x509.Certificate, error)

func ReenrollTLSCryptoMaterial added in v1.9.0

func ReenrollTLSCryptoMaterial(
	conf *hlfv1alpha1.FabricPeer,
	caName string,
	caurl string,
	enrollID string,
	tlsCertString string,
	hosts []string,
	tlsCertPem string,
	tlsKey *ecdsa.PrivateKey,
) (*x509.Certificate, *ecdsa.PrivateKey, *x509.Certificate, error)

Types

type Annotations

type Annotations struct {
}

type Client

type Client struct {
	Enabled bool `json:"enabled"`
}

type CouchDB added in v1.4.0

type CouchDB struct {
	External   CouchDBExternal `json:"external"`
	Image      string          `json:"image"`
	Tag        string          `json:"tag"`
	PullPolicy string          `json:"pullPolicy"`
}

type CouchDBExporter added in v1.3.0

type CouchDBExporter struct {
	Enabled    bool   `json:"enabled"`
	Image      string `json:"image"`
	Tag        string `json:"tag"`
	PullPolicy string `json:"pullPolicy"`
}

type CouchDBExternal added in v1.4.0

type CouchDBExternal struct {
	Enabled bool   `json:"enabled"`
	Host    string `json:"host"`
	Port    int    `json:"port"`
}

type ExternalBuilder added in v1.1.1

type ExternalBuilder struct {
	Name                 string   `json:"name"`
	Path                 string   `json:"path"`
	PropagateEnvironment []string `json:"propagateEnvironment"`
}

type FSServer added in v1.5.0

type FSServer struct {
	Image      string `json:"image"`
	Tag        string `json:"tag"`
	PullPolicy string `json:"pullPolicy"`
}

type FabricPeerChart

type FabricPeerChart struct {
	Volumes          []corev1.Volume      `json:"volumes"`
	PeerVolumeMounts []corev1.VolumeMount `json:"peerVolumeMounts"`

	PodLabels                      map[string]string             `json:"podLabels"`
	PodAnnotations                 map[string]string             `json:"podAnnotations"`
	FSServer                       FSServer                      `json:"fsServer"`
	GatewayApi                     GatewayApi                    `json:"gatewayApi"`
	Istio                          Istio                         `json:"istio"`
	Traefik                        Traefik                       `json:"traefik"`
	Replicas                       int                           `json:"replicas"`
	ExternalChaincodeBuilder       bool                          `json:"externalChaincodeBuilder"`
	CouchdbUsername                string                        `json:"couchdbUsername"`
	CouchdbPassword                string                        `json:"couchdbPassword"`
	Image                          Image                         `json:"image"`
	CouchDB                        CouchDB                       `json:"couchdb"`
	Rbac                           RBAC                          `json:"rbac"`
	DockerSocketPath               string                        `json:"dockerSocketPath"`
	Peer                           Peer                          `json:"peer"`
	Cert                           string                        `json:"cert"`
	Key                            string                        `json:"key"`
	Hosts                          []string                      `json:"hosts"`
	Proxy                          GRPCProxy                     `json:"proxy"`
	TLS                            TLS                           `json:"tls"`
	OPSTLS                         TLS                           `json:"opsTLS"`
	Cacert                         string                        `json:"cacert"`
	IntCacert                      string                        `json:"intCAcert"`
	Tlsrootcert                    string                        `json:"tlsrootcert"`
	Resources                      PeerResources                 `json:"resources,omitempty"`
	NodeSelector                   *corev1.NodeSelector          `json:"nodeSelector,omitempty"`
	Tolerations                    []corev1.Toleration           `json:"tolerations,omitempty"`
	ImagePullSecrets               []corev1.LocalObjectReference `json:"imagePullSecrets"`
	Affinity                       *corev1.Affinity              `json:"affinity,omitempty"`
	ExternalHost                   string                        `json:"externalHost"`
	FullnameOverride               string                        `json:"fullnameOverride"`
	CouchDBExporter                CouchDBExporter               `json:"couchdbExporter"`
	HostAliases                    []HostAlias                   `json:"hostAliases"`
	Service                        Service                       `json:"service"`
	Persistence                    PeerPersistence               `json:"persistence"`
	Logging                        Logging                       `json:"logging"`
	ExternalBuilders               []ExternalBuilder             `json:"externalBuilders"`
	ServiceMonitor                 ServiceMonitor                `json:"serviceMonitor"`
	EnvVars                        []corev1.EnvVar               `json:"envVars"`
	DeliveryClientaddressOverrides []v1alpha1.AddressOverride    `json:"deliveryClientaddressOverrides"`
}

func GetConfig

func GetConfig(
	conf *hlfv1alpha1.FabricPeer,
	client *kubernetes.Clientset,
	chartName string,
	namespace string,
	svc *corev1.Service,
	refreshCerts bool,
) (*FabricPeerChart, error)

type FabricPeerReconciler

type FabricPeerReconciler struct {
	client.Client
	ChartPath                  string
	Log                        logr.Logger
	Scheme                     *runtime.Scheme
	Config                     *rest.Config
	AutoRenewCertificates      bool
	AutoRenewCertificatesDelta time.Duration
	Wait                       bool
	Timeout                    time.Duration
	MaxHistory                 int
}

FabricPeerReconciler reconciles a FabricPeer object

func (*FabricPeerReconciler) Reconcile

func (r *FabricPeerReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

func (*FabricPeerReconciler) SetupWithManager

func (r *FabricPeerReconciler) SetupWithManager(mgr ctrl.Manager, maxConcurrentReconciles int) error

type GRPCProxy added in v1.7.0

type GRPCProxy struct {
	Enabled          bool                          `json:"enabled"`
	Image            string                        `json:"image"`
	Tag              string                        `json:"tag"`
	PullPolicy       string                        `json:"pullPolicy"`
	ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets"`
	Istio            Istio                         `json:"istio"`
}

type GatewayApi added in v1.9.0

type GatewayApi struct {
	Port             int      `json:"port"`
	Hosts            []string `json:"hosts"`
	GatewayName      string   `json:"gatewayName"`
	GatewayNamespace string   `json:"gatewayNamespace"`
}

type Gossip

type Gossip struct {
	Bootstrap              string `json:"bootstrap"`
	Endpoint               string `json:"endpoint"`
	ExternalEndpoint       string `json:"externalEndpoint"`
	OrgLeader              bool   `json:"orgLeader"`
	UseLeaderElection      bool   `json:"useLeaderElection"`
	ReconnectInterval      string `json:"reconnectInterval"`
	AliveExpirationTimeout string `json:"aliveExpirationTimeout"`
	AliveTimeInterval      string `json:"aliveTimeInterval"`
	ResponseWaitTime       string `json:"responseWaitTime"`
}

type HostAlias added in v1.2.1

type HostAlias struct {
	IP        string   `json:"ip"`
	Hostnames []string `json:"hostnames"`
}

type Image

type Image struct {
	Repository string `json:"repository"`
	Tag        string `json:"tag"`
	PullPolicy string `json:"pullPolicy"`
}

type Istio added in v1.1.0

type Istio struct {
	Port           int      `json:"port"`
	Hosts          []string `json:"hosts"`
	IngressGateway string   `json:"ingressGateway"`
}

type Logging

type Logging struct {
	Level    string `json:"level"`
	Peer     string `json:"peer"`
	Cauthdsl string `json:"cauthdsl"`
	Gossip   string `json:"gossip"`
	Grpc     string `json:"grpc"`
	Ledger   string `json:"ledger"`
	Msp      string `json:"msp"`
	Policies string `json:"policies"`
}

type Peer

type Peer struct {
	DatabaseType    string  `json:"databaseType"`
	CouchdbInstance string  `json:"couchdbInstance"`
	MspID           string  `json:"mspID"`
	Gossip          Gossip  `json:"gossip"`
	TLS             TLSAuth `json:"tls"`
}

type PeerPersistence

type PeerPersistence struct {
	Peer      Persistence `json:"peer"`
	CouchDB   Persistence `json:"couchdb"`
	Chaincode Persistence `json:"chaincode"`
}

type PeerResources added in v1.2.1

type PeerResources struct {
	Peer            *corev1.ResourceRequirements `json:"peer"`
	CouchDB         *corev1.ResourceRequirements `json:"couchdb"`
	Chaincode       *corev1.ResourceRequirements `json:"chaincode"`
	CouchDBExporter *corev1.ResourceRequirements `json:"couchdbExporter,omitempty"`
	Proxy           *corev1.ResourceRequirements `json:"proxy,omitempty"`
}

type Persistence

type Persistence struct {
	Enabled      bool        `json:"enabled"`
	Annotations  Annotations `json:"annotations"`
	StorageClass string      `json:"storageClass"`
	AccessMode   string      `json:"accessMode"`
	Size         string      `json:"size"`
}

type RBAC

type RBAC struct {
	Ns string `json:"ns"`
}

type Server

type Server struct {
	Enabled bool `json:"enabled"`
}

type Service

type Service struct {
	Type               string `json:"type"`
	PortRequest        int    `json:"portRequest"`
	PortEvent          int    `json:"portEvent"`
	PortOperations     int    `json:"portOperations"`
	NodePortOperations int    `json:"nodePortOperations,omitempty"`
	NodePortEvent      int    `json:"nodePortEvent,omitempty"`
	NodePortRequest    int    `json:"nodePortRequest,omitempty"`
}

type ServiceMonitor added in v1.2.1

type ServiceMonitor struct {
	Enabled           bool              `json:"enabled"`
	Labels            map[string]string `json:"labels"`
	Interval          string            `json:"interval"`
	ScrapeTimeout     string            `json:"scrapeTimeout"`
	Scheme            string            `json:"scheme"`
	Relabelings       []interface{}     `json:"relabelings"`
	TargetLabels      []interface{}     `json:"targetLabels"`
	MetricRelabelings []interface{}     `json:"metricRelabelings"`
	SampleLimit       int               `json:"sampleLimit"`
}

type Status

type Status struct {
	Status   hlfv1alpha1.DeploymentStatus
	TLSCert  string
	NodePort int
}

type TLS

type TLS struct {
	Cert string `json:"cert"`
	Key  string `json:"key"`
}

type TLSAuth

type TLSAuth struct {
	Server Server `json:"server"`
	Client Client `json:"client"`
}

type Traefik added in v1.10.0

type Traefik struct {
	Entrypoints []string            `json:"entryPoints"`
	Middlewares []TraefikMiddleware `json:"middlewares"`
	Hosts       []string            `json:"hosts"`
}

type TraefikMiddleware added in v1.10.0

type TraefikMiddleware struct {
	Name      string `json:"name"`
	Namespace string `json:"namespace"`
}

Jump to

Keyboard shortcuts

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