From 0b502b7401f7b7da752a3485d84a0331f0d1f45e Mon Sep 17 00:00:00 2001 From: David Viejo Date: Wed, 17 Jan 2024 10:01:41 +0100 Subject: [PATCH] Features (#207) * NetworkConfig: filter the peers to be added per organization * Filter peers by org, global peers and global CAs * Add `FabricChaincodeTemplate` CRD * update * Add support for FabricChaincodeTemplateRef in FabricChaincodeSpec Signed-off-by: David VIEJO * update * Update helm chart in pipelien Signed-off-by: David VIEJO * Update Signed-off-by: David VIEJO * update Signed-off-by: David VIEJO * Update Signed-off-by: David VIEJO * update * fabric-config 0.1.0 -> 0.2.1 Add ports 443 for the peer * Upgrade to go 1.21 * Add adminURL in the network config if available --------- Signed-off-by: David VIEJO --- .github/workflows/test-kubectl-plugin.yml | 5 +- .../v1alpha1/hlf_types.go | 198 ++- .../v1alpha1/zz_generated.deepcopy.go | 245 ++++ charts/hlf-ordnode/templates/service.yaml | 4 + .../templates/configmap--peer--core.yaml | 2 + charts/hlf-peer/templates/deployment.yaml | 2 +- ...lf.kungfusoftware.es_fabricchaincodes.yaml | 11 + ...usoftware.es_fabricchaincodetemplates.yaml | 1164 +++++++++++++++++ ...ungfusoftware.es_fabricnetworkconfigs.yaml | 33 + config/crd/kustomization.yaml | 1 + config/manager/kustomization.yaml | 4 +- .../rbac/auth_proxy_client_clusterrole.yaml | 2 +- controllers/chaincode/chaincode_controller.go | 64 +- .../followerchannel_controller.go | 5 + .../mainchannel/mainchannel_controller.go | 10 +- .../networkconfig/networkconfig_controller.go | 44 + controllers/peer/peer_controller.go | 10 + docs/reference/technical.md.bak | 0 go.mod | 7 +- go.sum | 4 + k8s/boilerplate.go.txt | 5 + kind-config.yaml | 10 + kubectl-hlf/cmd/chaincode/invoke.go | 31 +- kubectl-hlf/cmd/chaincode/query.go | 39 +- kubectl-hlf/cmd/chaincode/queryinstalled.go | 33 +- kubectl-hlf/cmd/console/create.go | 4 +- kubectl-hlf/cmd/externalchaincode/sync.go | 3 +- kubectl-hlf/cmd/helpers/hlf.go | 24 +- kubectl-hlf/cmd/ordnode/create.go | 2 +- .../v1alpha1/addressoverride.go | 46 + .../v1alpha1/applicationcapabilities.go | 1 + .../hlf.kungfusoftware.es/v1alpha1/catls.go | 12 +- .../v1alpha1/channelcapabilities.go | 1 + .../v1alpha1/channelconfig.go | 1 + .../v1alpha1/component.go | 1 + .../hlf.kungfusoftware.es/v1alpha1/cors.go | 1 + .../hlf.kungfusoftware.es/v1alpha1/csr.go | 1 + .../v1alpha1/enrollment.go | 1 + .../v1alpha1/externalbuilder.go | 1 + .../v1alpha1/externalcertificate.go | 1 + .../v1alpha1/fabricca.go | 1 + .../v1alpha1/fabriccaaffiliation.go | 1 + .../v1alpha1/fabriccabccsp.go | 1 + .../v1alpha1/fabriccabccspsw.go | 1 + .../v1alpha1/fabriccacfg.go | 1 + .../v1alpha1/fabriccacfgaffilitions.go | 1 + .../v1alpha1/fabriccacfgidentities.go | 1 + .../v1alpha1/fabriccaclientauth.go | 38 - .../v1alpha1/fabriccacrl.go | 1 + .../v1alpha1/fabriccacrypto.go | 16 +- .../v1alpha1/fabriccacsr.go | 1 + .../v1alpha1/fabriccacsrca.go | 1 + .../v1alpha1/fabriccadatabase.go | 1 + .../v1alpha1/fabriccaidentity.go | 1 + .../v1alpha1/fabriccaidentityattrs.go | 1 + .../v1alpha1/fabriccaintermediate.go | 1 + .../fabriccaintermediateparentserver.go | 1 + .../v1alpha1/fabriccaitemconf.go | 10 +- .../v1alpha1/fabriccametrics.go | 1 + .../v1alpha1/fabriccametricsstatsd.go | 1 + .../v1alpha1/fabriccanames.go | 1 + .../v1alpha1/fabriccaregistry.go | 1 + .../v1alpha1/fabriccasigning.go | 1 + .../v1alpha1/fabriccasigningdefault.go | 1 + .../v1alpha1/fabriccasigningprofiles.go | 1 + .../v1alpha1/fabriccasigningsignprofile.go | 1 + .../fabriccasigningsignprofileconstraint.go | 1 + .../v1alpha1/fabriccasigningtlsprofile.go | 1 + .../v1alpha1/fabriccaspec.go | 49 + .../v1alpha1/fabriccaspecservice.go | 1 + .../v1alpha1/fabriccastatus.go | 1 + .../v1alpha1/fabriccasubject.go | 1 + .../v1alpha1/fabriccatlsconf.go | 1 + .../v1alpha1/fabricchaincode.go | 1 + .../v1alpha1/fabricchaincodespec.go | 121 +- .../v1alpha1/fabricchaincodestatus.go | 1 + .../v1alpha1/fabricchaincodetemplate.go | 208 +++ .../v1alpha1/fabricchaincodetemplatespec.go | 201 +++ .../v1alpha1/fabricchaincodetemplatestatus.go | 51 + .../v1alpha1/fabricexplorer.go | 1 + .../v1alpha1/fabricexplorerspec.go | 1 + .../v1alpha1/fabricexplorerstatus.go | 1 + .../v1alpha1/fabricfollowerchannel.go | 1 + .../fabricfollowerchannelanchorpeer.go | 1 + .../fabricfollowerchannelexternalpeer.go | 1 + .../v1alpha1/fabricfollowerchannelorderer.go | 1 + .../v1alpha1/fabricfollowerchannelpeer.go | 1 + .../v1alpha1/fabricfollowerchannelspec.go | 1 + .../v1alpha1/fabricfollowerchannelstatus.go | 1 + .../v1alpha1/fabricfsserver.go | 1 + .../v1alpha1/fabricgatewayapi.go | 57 + .../v1alpha1/fabricidentity.go | 1 + .../v1alpha1/fabricidentityregister.go | 1 + .../v1alpha1/fabricidentityspec.go | 1 + .../v1alpha1/fabricidentitystatus.go | 1 + .../v1alpha1/fabricistio.go | 1 + .../v1alpha1/fabricmainchannel.go | 1 + ...mainchanneladminordererorganizationspec.go | 1 + ...ricmainchanneladminpeerorganizationspec.go | 1 + .../fabricmainchannelapplicationconfig.go | 1 + .../v1alpha1/fabricmainchannelconfig.go | 1 + .../v1alpha1/fabricmainchannelconsenter.go | 1 + .../v1alpha1/fabricmainchanneletcdraft.go | 1 + .../fabricmainchanneletcdraftoptions.go | 1 + .../fabricmainchannelexternalorderernode.go | 1 + ...cmainchannelexternalordererorganization.go | 1 + ...bricmainchannelexternalpeerorganization.go | 1 + .../v1alpha1/fabricmainchannelidentity.go | 1 + .../fabricmainchannelordererbatchsize.go | 1 + .../fabricmainchannelordererconfig.go | 1 + .../v1alpha1/fabricmainchannelorderernode.go | 1 + .../fabricmainchannelordererorganization.go | 1 + .../fabricmainchannelpeerorganization.go | 1 + .../fabricmainchannelpoliciesconfig.go | 1 + .../v1alpha1/fabricmainchannelspec.go | 1 + .../v1alpha1/fabricmainchannelstatus.go | 1 + .../v1alpha1/fabricnetworkconfig.go | 1 + .../v1alpha1/fabricnetworkconfigca.go | 37 + .../fabricnetworkconfigexternalorderer.go | 55 + .../fabricnetworkconfigexternalpeer.go | 55 + .../v1alpha1/fabricnetworkconfigidentity.go | 1 + .../fabricnetworkconfigorganization.go | 33 + .../v1alpha1/fabricnetworkconfigorgpeer.go | 37 + .../v1alpha1/fabricnetworkconfigspec.go | 72 +- .../v1alpha1/fabricnetworkconfigstatus.go | 1 + .../v1alpha1/fabricoperationsconsole.go | 1 + .../v1alpha1/fabricoperationsconsoleauth.go | 1 + .../fabricoperationsconsolecouchdb.go | 1 + .../v1alpha1/fabricoperationsconsolespec.go | 1 + .../v1alpha1/fabricoperationsconsolestatus.go | 1 + .../v1alpha1/fabricoperatorapi.go | 1 + .../v1alpha1/fabricoperatorapiauth.go | 1 + .../v1alpha1/fabricoperatorapihlfconfig.go | 1 + .../fabricoperatorapinetworkconfig.go | 1 + .../v1alpha1/fabricoperatorapispec.go | 16 + .../v1alpha1/fabricoperatorapistatus.go | 1 + .../v1alpha1/fabricoperatorui.go | 1 + .../v1alpha1/fabricoperatoruiauth.go | 1 + .../v1alpha1/fabricoperatoruispec.go | 1 + .../v1alpha1/fabricoperatoruistatus.go | 1 + .../v1alpha1/fabricorderernode.go | 1 + .../v1alpha1/fabricorderernodespec.go | 67 + .../v1alpha1/fabricorderernodestatus.go | 1 + .../v1alpha1/fabricorderingservice.go | 1 + .../v1alpha1/fabricorderingservicespec.go | 1 + .../v1alpha1/fabricorderingservicestatus.go | 1 + .../v1alpha1/fabricpeer.go | 1 + .../v1alpha1/fabricpeercouchdb.go | 1 + .../v1alpha1/fabricpeercouchdbexporter.go | 1 + .../v1alpha1/fabricpeerdiscovery.go | 1 + .../v1alpha1/fabricpeerexternalcouchdb.go | 1 + .../v1alpha1/fabricpeerlogging.go | 1 + .../v1alpha1/fabricpeerresources.go | 1 + .../v1alpha1/fabricpeerspec.go | 167 ++- .../v1alpha1/fabricpeerspecgossip.go | 1 + .../v1alpha1/fabricpeerstatus.go | 1 + .../v1alpha1/fabricpeerstorage.go | 1 + .../v1alpha1/fabrictlscacrypto.go | 45 - .../v1alpha1/fabrictraefik.go | 55 + .../v1alpha1/fabrictraefikmiddleware.go | 37 + .../v1alpha1/grpcproxy.go | 1 + .../v1alpha1/hlfidentity.go | 1 + .../hlf.kungfusoftware.es/v1alpha1/ingress.go | 1 + .../v1alpha1/ingresshost.go | 1 + .../v1alpha1/ingresspath.go | 1 + .../v1alpha1/orderercapabilities.go | 1 + .../v1alpha1/ordererenrollment.go | 1 + .../v1alpha1/orderernode.go | 1 + .../v1alpha1/orderernodeenrollment.go | 1 + .../v1alpha1/orderernodeenrollmenttls.go | 1 + .../v1alpha1/orderernodeservice.go | 1 + .../v1alpha1/ordererservice.go | 1 + .../v1alpha1/orderersystemchannel.go | 1 + .../v1alpha1/peerservice.go | 1 + .../hlf.kungfusoftware.es/v1alpha1/secret.go | 1 + .../v1alpha1/secretref.go | 28 + .../v1alpha1/secretrefnskey.go | 46 + .../v1alpha1/servicemonitor.go | 1 + .../hlf.kungfusoftware.es/v1alpha1/storage.go | 1 + .../hlf.kungfusoftware.es/v1alpha1/tls.go | 1 + .../applyconfiguration/internal/internal.go | 1 + pkg/client/applyconfiguration/utils.go | 33 +- pkg/client/clientset/versioned/clientset.go | 1 + .../versioned/fake/clientset_generated.go | 1 + pkg/client/clientset/versioned/fake/doc.go | 1 + .../clientset/versioned/fake/register.go | 15 +- pkg/client/clientset/versioned/scheme/doc.go | 1 + .../clientset/versioned/scheme/register.go | 15 +- .../hlf.kungfusoftware.es/v1alpha1/doc.go | 1 + .../v1alpha1/fabricca.go | 1 + .../v1alpha1/fabricchaincode.go | 1 + .../v1alpha1/fabricchaincodetemplate.go | 245 ++++ .../v1alpha1/fabricexplorer.go | 1 + .../v1alpha1/fabricfollowerchannel.go | 1 + .../v1alpha1/fabricidentity.go | 1 + .../v1alpha1/fabricmainchannel.go | 1 + .../v1alpha1/fabricnetworkconfig.go | 1 + .../v1alpha1/fabricoperationsconsole.go | 1 + .../v1alpha1/fabricoperatorapi.go | 1 + .../v1alpha1/fabricoperatorui.go | 1 + .../v1alpha1/fabricorderernode.go | 1 + .../v1alpha1/fabricorderingservice.go | 1 + .../v1alpha1/fabricpeer.go | 1 + .../v1alpha1/fake/doc.go | 1 + .../v1alpha1/fake/fake_fabricca.go | 1 + .../v1alpha1/fake/fake_fabricchaincode.go | 1 + .../fake/fake_fabricchaincodetemplate.go | 178 +++ .../v1alpha1/fake/fake_fabricexplorer.go | 1 + .../fake/fake_fabricfollowerchannel.go | 1 + .../v1alpha1/fake/fake_fabricidentity.go | 1 + .../v1alpha1/fake/fake_fabricmainchannel.go | 1 + .../v1alpha1/fake/fake_fabricnetworkconfig.go | 1 + .../fake/fake_fabricoperationsconsole.go | 1 + .../v1alpha1/fake/fake_fabricoperatorapi.go | 1 + .../v1alpha1/fake/fake_fabricoperatorui.go | 1 + .../v1alpha1/fake/fake_fabricorderernode.go | 1 + .../fake/fake_fabricorderingservice.go | 1 + .../v1alpha1/fake/fake_fabricpeer.go | 1 + .../fake/fake_hlf.kungfusoftware.es_client.go | 5 + .../v1alpha1/generated_expansion.go | 3 + .../v1alpha1/hlf.kungfusoftware.es_client.go | 6 + .../informers/externalversions/factory.go | 37 +- .../informers/externalversions/generic.go | 3 + .../hlf.kungfusoftware.es/interface.go | 1 + .../v1alpha1/fabricca.go | 1 + .../v1alpha1/fabricchaincode.go | 1 + .../v1alpha1/fabricchaincodetemplate.go | 79 ++ .../v1alpha1/fabricexplorer.go | 1 + .../v1alpha1/fabricfollowerchannel.go | 1 + .../v1alpha1/fabricidentity.go | 1 + .../v1alpha1/fabricmainchannel.go | 1 + .../v1alpha1/fabricnetworkconfig.go | 1 + .../v1alpha1/fabricoperationsconsole.go | 1 + .../v1alpha1/fabricoperatorapi.go | 1 + .../v1alpha1/fabricoperatorui.go | 1 + .../v1alpha1/fabricorderernode.go | 1 + .../v1alpha1/fabricorderingservice.go | 1 + .../v1alpha1/fabricpeer.go | 1 + .../v1alpha1/interface.go | 8 + .../internalinterfaces/factory_interfaces.go | 1 + .../v1alpha1/expansion_generated.go | 9 + .../v1alpha1/fabricca.go | 1 + .../v1alpha1/fabricchaincode.go | 1 + .../v1alpha1/fabricchaincodetemplate.go | 88 ++ .../v1alpha1/fabricexplorer.go | 1 + .../v1alpha1/fabricfollowerchannel.go | 1 + .../v1alpha1/fabricidentity.go | 1 + .../v1alpha1/fabricmainchannel.go | 1 + .../v1alpha1/fabricnetworkconfig.go | 1 + .../v1alpha1/fabricoperationsconsole.go | 1 + .../v1alpha1/fabricoperatorapi.go | 1 + .../v1alpha1/fabricoperatorui.go | 1 + .../v1alpha1/fabricorderernode.go | 1 + .../v1alpha1/fabricorderingservice.go | 1 + .../v1alpha1/fabricpeer.go | 1 + 255 files changed, 4183 insertions(+), 253 deletions(-) create mode 100644 config/crd/bases/hlf.kungfusoftware.es_fabricchaincodetemplates.yaml create mode 100644 docs/reference/technical.md.bak create mode 100644 k8s/boilerplate.go.txt create mode 100644 kind-config.yaml create mode 100644 pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/addressoverride.go delete mode 100644 pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccaclientauth.go create mode 100644 pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricchaincodetemplate.go create mode 100644 pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricchaincodetemplatespec.go create mode 100644 pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricchaincodetemplatestatus.go create mode 100644 pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricgatewayapi.go create mode 100644 pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricnetworkconfigca.go create mode 100644 pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricnetworkconfigexternalorderer.go create mode 100644 pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricnetworkconfigexternalpeer.go create mode 100644 pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricnetworkconfigorganization.go create mode 100644 pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricnetworkconfigorgpeer.go delete mode 100644 pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabrictlscacrypto.go create mode 100644 pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabrictraefik.go create mode 100644 pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabrictraefikmiddleware.go create mode 100644 pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/secretref.go create mode 100644 pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/secretrefnskey.go create mode 100644 pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fabricchaincodetemplate.go create mode 100644 pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fake/fake_fabricchaincodetemplate.go create mode 100644 pkg/client/informers/externalversions/hlf.kungfusoftware.es/v1alpha1/fabricchaincodetemplate.go create mode 100644 pkg/client/listers/hlf.kungfusoftware.es/v1alpha1/fabricchaincodetemplate.go diff --git a/.github/workflows/test-kubectl-plugin.yml b/.github/workflows/test-kubectl-plugin.yml index a45e03e1..15658524 100644 --- a/.github/workflows/test-kubectl-plugin.yml +++ b/.github/workflows/test-kubectl-plugin.yml @@ -44,7 +44,7 @@ jobs: - name: Deploy operator run: | helm repo add kfs https://kfsoftware.github.io/hlf-helm-charts --force-update - helm install hlf-operator --version=1.9.0-beta4 kfs/hlf-operator --set image.repository="${IMAGE}" --set image.tag="${TAG}" --set image.pullPolicy="IfNotPresent" + helm install hlf-operator --version=1.10.0-beta2 kfs/hlf-operator --set image.repository="${IMAGE}" --set image.tag="${TAG}" --set image.pullPolicy="IfNotPresent" - name: Install operator CRDs run: | @@ -143,9 +143,8 @@ jobs: health { lameduck 5s } - rewrite name regex (.*)\.localho\.st host.ingress.internal + rewrite name regex (.*)\.localho\.st istio-ingressgateway.istio-system.svc.cluster.local hosts { - ${CLUSTER_IP} host.ingress.internal fallthrough } ready diff --git a/api/hlf.kungfusoftware.es/v1alpha1/hlf_types.go b/api/hlf.kungfusoftware.es/v1alpha1/hlf_types.go index 5f11a6f0..6f10eabf 100644 --- a/api/hlf.kungfusoftware.es/v1alpha1/hlf_types.go +++ b/api/hlf.kungfusoftware.es/v1alpha1/hlf_types.go @@ -88,7 +88,7 @@ type ExternalBuilder struct { PropagateEnvironment []string `json:"propagateEnvironment"` } -const DefaultImagePullPolicy = corev1.PullAlways +const DefaultImagePullPolicy = corev1.PullIfNotPresent type ServiceMonitor struct { // +kubebuilder:default:=false @@ -1581,6 +1581,18 @@ type FabricOperatorAPISpec struct { Resources *corev1.ResourceRequirements `json:"resources"` } +type FabricNetworkConfigOrgPeer struct { + Name string `json:"name"` + Namespace string `json:"namespace"` +} +type FabricNetworkConfigOrganization struct { + Peers []FabricNetworkConfigOrgPeer `json:"peers"` +} +type FabricNetworkConfigCA struct { + Name string `json:"name"` + Namespace string `json:"namespace"` +} + // FabricNetworkConfigSpec defines the desired state of FabricNetworkConfig type FabricNetworkConfigSpec struct { Organization string `json:"organization"` @@ -1588,8 +1600,17 @@ type FabricNetworkConfigSpec struct { Internal bool `json:"internal"` Organizations []string `json:"organizations"` - - Namespaces []string `json:"namespaces"` + // +kubebuilder:validation:Default={} + // +optional + // +kubebuilder:validation:Optional + // +nullable + OrganizationConfig map[string]FabricNetworkConfigOrganization `json:"organizationConfig"` + Namespaces []string `json:"namespaces"` + // +nullable + // +kubebuilder:validation:Optional + // +optional + // +kubebuilder:validation:Default={} + CertificateAuthorities []FabricNetworkConfigCA `json:"certificateAuthorities"` Channels []string `json:"channels"` // HLF Identities to be included in the network config @@ -1662,8 +1683,18 @@ type FabricNetworkConfigList struct { Items []FabricNetworkConfig `json:"items"` } +type FabricChaincodeTemplateRef struct { + Name string `json:"name"` + Namespace string `json:"namespace"` +} + // FabricChaincodeSpec defines the desired state of FabricChaincode type FabricChaincodeSpec struct { + // +nullable + // +optional + // +kubebuilder:validation:Optional + Template *FabricChaincodeTemplateRef `json:"template"` + // +nullable // +optional // +kubebuilder:validation:Optional @@ -1746,6 +1777,56 @@ type FabricChaincodeSpec struct { MspID string `json:"mspID"` } +func (in *FabricChaincodeSpec) ApplyDefaultValuesFromTemplate(template *FabricChaincodeTemplate) { + if in.ImagePullPolicy == "" { + in.ImagePullPolicy = template.Spec.ImagePullPolicy + } + if in.ImagePullSecrets == nil || len(in.ImagePullSecrets) == 0 { + in.ImagePullSecrets = template.Spec.ImagePullSecrets + } + if in.Command == nil || len(in.Command) == 0 { + in.Command = template.Spec.Command + } + if in.Args == nil || len(in.Args) == 0 { + in.Args = template.Spec.Args + } + if in.Affinity == nil { + in.Affinity = template.Spec.Affinity + } + if in.Tolerations == nil || len(in.Tolerations) == 0 { + in.Tolerations = template.Spec.Tolerations + } + if in.Resources == nil { + in.Resources = template.Spec.Resources + } + if in.Replicas == 0 { + in.Replicas = template.Spec.Replicas + } + if in.Env == nil || len(in.Env) == 0 { + in.Env = template.Spec.Env + } else { + for _, env := range template.Spec.Env { + found := false + for _, e := range in.Env { + if e.Name == env.Name { + found = true + break + } + } + if !found { + in.Env = append(in.Env, env) + } + + } + } + if in.ChaincodeServerPort == 0 { + in.ChaincodeServerPort = template.Spec.ChaincodeServerPort + } + if in.MspID == "" { + in.MspID = template.Spec.MspID + } +} + // FabricChaincodeStatus defines the observed state of FabricChaincode type FabricChaincodeStatus struct { Conditions status.Conditions `json:"conditions"` @@ -2229,8 +2310,119 @@ type FabricFollowerChannelOrderer struct { Certificate string `json:"certificate"` } +// FabricChaincodeTemplateStatus defines the observed state of FabricChaincodeTemplate +type FabricChaincodeTemplateStatus struct { + Conditions status.Conditions `json:"conditions"` + Message string `json:"message"` + // Status of the FabricCA + Status DeploymentStatus `json:"status"` +} + +// +genclient +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:defaulter-gen=true +// +kubebuilder:subresource:status +// +kubebuilder:resource:scope=Namespaced,shortName=fabricchaincodetemplate,singular=fabricchaincodetemplate +// +kubebuilder:printcolumn:name="State",type="string",JSONPath=".status.status" +// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp" + +// FabricChaincodeTemplate is the Schema for the hlfs API +type FabricChaincodeTemplate struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + Spec FabricChaincodeTemplateSpec `json:"spec,omitempty"` + Status FabricChaincodeTemplateStatus `json:"status,omitempty"` +} + +// +kubebuilder:object:root=true + +// FabricChaincodeTemplateList contains a list of FabricChaincodeTemplate +type FabricChaincodeTemplateList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []FabricChaincodeTemplate `json:"items"` +} + +// FabricChaincodeTemplateSpec defines the desired state of FabricChaincodeTemplate +type FabricChaincodeTemplateSpec struct { + // +nullable + // +optional + // +kubebuilder:validation:Optional + // +kubebuilder:default:={} + Annotations map[string]string `json:"annotations"` + // +nullable + // +optional + // +kubebuilder:validation:Optional + // +kubebuilder:default:={} + Labels map[string]string `json:"labels"` + + // +nullable + // +optional + // +kubebuilder:validation:Optional + // +kubebuilder:default:={} + PodAnnotations map[string]string `json:"podAnnotations"` + + // +nullable + // +optional + // +kubebuilder:validation:Optional + // +kubebuilder:default:={} + PodLabels map[string]string `json:"podLabels"` + + // +kubebuilder:default:="IfNotPresent" + ImagePullPolicy corev1.PullPolicy `json:"imagePullPolicy"` + + // +kubebuilder:validation:Default={} + // +optional + // +kubebuilder:validation:Optional + // +nullable + ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets"` + + // Entrypoint array. Not executed within a shell. + // The container image's ENTRYPOINT is used if this is not provided. + // +optional + Command []string `json:"command,omitempty" protobuf:"bytes,3,rep,name=command"` + + // Arguments to the entrypoint. + // The container image's CMD is used if this is not provided. + // +optional + Args []string `json:"args,omitempty" protobuf:"bytes,4,rep,name=args"` + + // +nullable + // +kubebuilder:validation:Optional + // +optional + Affinity *corev1.Affinity `json:"affinity"` + + // +nullable + // +kubebuilder:validation:Optional + // +optional + // +kubebuilder:validation:Default={} + Tolerations []corev1.Toleration `json:"tolerations"` + + // +nullable + // +kubebuilder:validation:Optional + // +optional + Resources *corev1.ResourceRequirements `json:"resources"` + + // +kubebuilder:validation:Default=1 + Replicas int `json:"replicas"` + + // +nullable + // +kubebuilder:validation:Optional + // +optional + // +kubebuilder:validation:Default={} + Env []corev1.EnvVar `json:"env"` + + // +kubebuilder:default=7052 + ChaincodeServerPort int `json:"chaincodeServerPort"` + + // +optional + // +kubebuilder:validation:Optional + MspID string `json:"mspID"` +} + func init() { SchemeBuilder.Register(&FabricPeer{}, &FabricPeerList{}) + SchemeBuilder.Register(&FabricChaincodeTemplate{}, &FabricChaincodeTemplateList{}) SchemeBuilder.Register(&FabricOrderingService{}, &FabricOrderingServiceList{}) SchemeBuilder.Register(&FabricCA{}, &FabricCAList{}) SchemeBuilder.Register(&FabricOrdererNode{}, &FabricOrdererNodeList{}) diff --git a/api/hlf.kungfusoftware.es/v1alpha1/zz_generated.deepcopy.go b/api/hlf.kungfusoftware.es/v1alpha1/zz_generated.deepcopy.go index 535121c7..de4840ae 100644 --- a/api/hlf.kungfusoftware.es/v1alpha1/zz_generated.deepcopy.go +++ b/api/hlf.kungfusoftware.es/v1alpha1/zz_generated.deepcopy.go @@ -1092,6 +1092,11 @@ func (in *FabricChaincodeList) DeepCopyObject() runtime.Object { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *FabricChaincodeSpec) DeepCopyInto(out *FabricChaincodeSpec) { *out = *in + if in.Template != nil { + in, out := &in.Template, &out.Template + *out = new(FabricChaincodeTemplateRef) + **out = **in + } if in.Annotations != nil { in, out := &in.Annotations, &out.Annotations *out = make(map[string]string, len(*in)) @@ -1198,6 +1203,184 @@ func (in *FabricChaincodeStatus) DeepCopy() *FabricChaincodeStatus { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *FabricChaincodeTemplate) DeepCopyInto(out *FabricChaincodeTemplate) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FabricChaincodeTemplate. +func (in *FabricChaincodeTemplate) DeepCopy() *FabricChaincodeTemplate { + if in == nil { + return nil + } + out := new(FabricChaincodeTemplate) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *FabricChaincodeTemplate) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *FabricChaincodeTemplateList) DeepCopyInto(out *FabricChaincodeTemplateList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]FabricChaincodeTemplate, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FabricChaincodeTemplateList. +func (in *FabricChaincodeTemplateList) DeepCopy() *FabricChaincodeTemplateList { + if in == nil { + return nil + } + out := new(FabricChaincodeTemplateList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *FabricChaincodeTemplateList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *FabricChaincodeTemplateRef) DeepCopyInto(out *FabricChaincodeTemplateRef) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FabricChaincodeTemplateRef. +func (in *FabricChaincodeTemplateRef) DeepCopy() *FabricChaincodeTemplateRef { + if in == nil { + return nil + } + out := new(FabricChaincodeTemplateRef) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *FabricChaincodeTemplateSpec) DeepCopyInto(out *FabricChaincodeTemplateSpec) { + *out = *in + if in.Annotations != nil { + in, out := &in.Annotations, &out.Annotations + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Labels != nil { + in, out := &in.Labels, &out.Labels + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.PodAnnotations != nil { + in, out := &in.PodAnnotations, &out.PodAnnotations + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.PodLabels != nil { + in, out := &in.PodLabels, &out.PodLabels + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.ImagePullSecrets != nil { + in, out := &in.ImagePullSecrets, &out.ImagePullSecrets + *out = make([]v1.LocalObjectReference, len(*in)) + copy(*out, *in) + } + if in.Command != nil { + in, out := &in.Command, &out.Command + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Args != nil { + in, out := &in.Args, &out.Args + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Affinity != nil { + in, out := &in.Affinity, &out.Affinity + *out = new(v1.Affinity) + (*in).DeepCopyInto(*out) + } + if in.Tolerations != nil { + in, out := &in.Tolerations, &out.Tolerations + *out = make([]v1.Toleration, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Resources != nil { + in, out := &in.Resources, &out.Resources + *out = new(v1.ResourceRequirements) + (*in).DeepCopyInto(*out) + } + if in.Env != nil { + in, out := &in.Env, &out.Env + *out = make([]v1.EnvVar, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FabricChaincodeTemplateSpec. +func (in *FabricChaincodeTemplateSpec) DeepCopy() *FabricChaincodeTemplateSpec { + if in == nil { + return nil + } + out := new(FabricChaincodeTemplateSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *FabricChaincodeTemplateStatus) DeepCopyInto(out *FabricChaincodeTemplateStatus) { + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make(status.Conditions, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FabricChaincodeTemplateStatus. +func (in *FabricChaincodeTemplateStatus) DeepCopy() *FabricChaincodeTemplateStatus { + if in == nil { + return nil + } + out := new(FabricChaincodeTemplateStatus) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *FabricExplorer) DeepCopyInto(out *FabricExplorer) { *out = *in @@ -2197,6 +2380,21 @@ func (in *FabricNetworkConfig) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *FabricNetworkConfigCA) DeepCopyInto(out *FabricNetworkConfigCA) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FabricNetworkConfigCA. +func (in *FabricNetworkConfigCA) DeepCopy() *FabricNetworkConfigCA { + if in == nil { + return nil + } + out := new(FabricNetworkConfigCA) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *FabricNetworkConfigExternalOrderer) DeepCopyInto(out *FabricNetworkConfigExternalOrderer) { *out = *in @@ -2274,6 +2472,41 @@ func (in *FabricNetworkConfigList) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *FabricNetworkConfigOrgPeer) DeepCopyInto(out *FabricNetworkConfigOrgPeer) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FabricNetworkConfigOrgPeer. +func (in *FabricNetworkConfigOrgPeer) DeepCopy() *FabricNetworkConfigOrgPeer { + if in == nil { + return nil + } + out := new(FabricNetworkConfigOrgPeer) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *FabricNetworkConfigOrganization) DeepCopyInto(out *FabricNetworkConfigOrganization) { + *out = *in + if in.Peers != nil { + in, out := &in.Peers, &out.Peers + *out = make([]FabricNetworkConfigOrgPeer, len(*in)) + copy(*out, *in) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FabricNetworkConfigOrganization. +func (in *FabricNetworkConfigOrganization) DeepCopy() *FabricNetworkConfigOrganization { + if in == nil { + return nil + } + out := new(FabricNetworkConfigOrganization) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *FabricNetworkConfigSpec) DeepCopyInto(out *FabricNetworkConfigSpec) { *out = *in @@ -2282,11 +2515,23 @@ func (in *FabricNetworkConfigSpec) DeepCopyInto(out *FabricNetworkConfigSpec) { *out = make([]string, len(*in)) copy(*out, *in) } + if in.OrganizationConfig != nil { + in, out := &in.OrganizationConfig, &out.OrganizationConfig + *out = make(map[string]FabricNetworkConfigOrganization, len(*in)) + for key, val := range *in { + (*out)[key] = *val.DeepCopy() + } + } if in.Namespaces != nil { in, out := &in.Namespaces, &out.Namespaces *out = make([]string, len(*in)) copy(*out, *in) } + if in.CertificateAuthorities != nil { + in, out := &in.CertificateAuthorities, &out.CertificateAuthorities + *out = make([]FabricNetworkConfigCA, len(*in)) + copy(*out, *in) + } if in.Channels != nil { in, out := &in.Channels, &out.Channels *out = make([]string, len(*in)) diff --git a/charts/hlf-ordnode/templates/service.yaml b/charts/hlf-ordnode/templates/service.yaml index 25c2a933..f7b4f0db 100644 --- a/charts/hlf-ordnode/templates/service.yaml +++ b/charts/hlf-ordnode/templates/service.yaml @@ -7,6 +7,10 @@ metadata: spec: type: {{ .Values.service.type }} ports: + - port: 443 + targetPort: 7050 + protocol: TCP + name: grpc-443 - port: {{ .Values.service.port }} targetPort: 7050 protocol: TCP diff --git a/charts/hlf-peer/templates/configmap--peer--core.yaml b/charts/hlf-peer/templates/configmap--peer--core.yaml index 2f5d5634..f8a59d3c 100644 --- a/charts/hlf-peer/templates/configmap--peer--core.yaml +++ b/charts/hlf-peer/templates/configmap--peer--core.yaml @@ -355,6 +355,8 @@ data: # It sets the delivery service maximal delay between consecutive retries reConnectBackoffThreshold: 3600s + blockGossipEnabled: false + # A list of orderer endpoint addresses which should be overridden # when found in channel configurations. addressOverrides: diff --git a/charts/hlf-peer/templates/deployment.yaml b/charts/hlf-peer/templates/deployment.yaml index 5a02a426..a8af7bb6 100644 --- a/charts/hlf-peer/templates/deployment.yaml +++ b/charts/hlf-peer/templates/deployment.yaml @@ -251,7 +251,7 @@ spec: name: {{ include "hlf-peer.fullname" . }}--peer volumeMounts: # range volumeMounts - {{- if .Values.volumeMounts }} + {{- if .Values.peerVolumeMounts }} {{ toYaml .Values.peerVolumeMounts | nindent 12 }} {{- end }} - name: peerconfig diff --git a/config/crd/bases/hlf.kungfusoftware.es_fabricchaincodes.yaml b/config/crd/bases/hlf.kungfusoftware.es_fabricchaincodes.yaml index 7e296a34..0d8fe26c 100644 --- a/config/crd/bases/hlf.kungfusoftware.es_fabricchaincodes.yaml +++ b/config/crd/bases/hlf.kungfusoftware.es_fabricchaincodes.yaml @@ -1127,6 +1127,17 @@ spec: to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' type: object type: object + template: + nullable: true + properties: + name: + type: string + namespace: + type: string + required: + - name + - namespace + type: object tolerations: items: description: The pod this Toleration is attached to tolerates any diff --git a/config/crd/bases/hlf.kungfusoftware.es_fabricchaincodetemplates.yaml b/config/crd/bases/hlf.kungfusoftware.es_fabricchaincodetemplates.yaml new file mode 100644 index 00000000..93915389 --- /dev/null +++ b/config/crd/bases/hlf.kungfusoftware.es_fabricchaincodetemplates.yaml @@ -0,0 +1,1164 @@ + +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.3.0 + creationTimestamp: null + name: fabricchaincodetemplates.hlf.kungfusoftware.es +spec: + group: hlf.kungfusoftware.es + names: + kind: FabricChaincodeTemplate + listKind: FabricChaincodeTemplateList + plural: fabricchaincodetemplates + shortNames: + - fabricchaincodetemplate + singular: fabricchaincodetemplate + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .status.status + name: State + type: string + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1alpha1 + schema: + openAPIV3Schema: + description: FabricChaincodeTemplate is the Schema for the hlfs API + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: FabricChaincodeTemplateSpec defines the desired state of + FabricChaincodeTemplate + properties: + affinity: + description: Affinity is a group of affinity scheduling rules. + nullable: true + properties: + nodeAffinity: + description: Describes node affinity scheduling rules for the + pod. + properties: + preferredDuringSchedulingIgnoredDuringExecution: + description: The scheduler will prefer to schedule pods to + nodes that satisfy the affinity expressions specified by + this field, but it may choose a node that violates one or + more of the expressions. The node that is most preferred + is the one with the greatest sum of weights, i.e. for each + node that meets all of the scheduling requirements (resource + request, requiredDuringScheduling affinity expressions, + etc.), compute a sum by iterating through the elements of + this field and adding "weight" to the sum if the node matches + the corresponding matchExpressions; the node(s) with the + highest sum are the most preferred. + items: + description: An empty preferred scheduling term matches + all objects with implicit weight 0 (i.e. it's a no-op). + A null preferred scheduling term matches no objects (i.e. + is also a no-op). + properties: + preference: + description: A node selector term, associated with the + corresponding weight. + properties: + matchExpressions: + description: A list of node selector requirements + by node's labels. + items: + description: A node selector requirement is a + selector that contains values, a key, and an + operator that relates the key and values. + properties: + key: + description: The label key that the selector + applies to. + type: string + operator: + description: Represents a key's relationship + to a set of values. Valid operators are + In, NotIn, Exists, DoesNotExist. Gt, and + Lt. + type: string + values: + description: An array of string values. If + the operator is In or NotIn, the values + array must be non-empty. If the operator + is Exists or DoesNotExist, the values array + must be empty. If the operator is Gt or + Lt, the values array must have a single + element, which will be interpreted as an + integer. This array is replaced during a + strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchFields: + description: A list of node selector requirements + by node's fields. + items: + description: A node selector requirement is a + selector that contains values, a key, and an + operator that relates the key and values. + properties: + key: + description: The label key that the selector + applies to. + type: string + operator: + description: Represents a key's relationship + to a set of values. Valid operators are + In, NotIn, Exists, DoesNotExist. Gt, and + Lt. + type: string + values: + description: An array of string values. If + the operator is In or NotIn, the values + array must be non-empty. If the operator + is Exists or DoesNotExist, the values array + must be empty. If the operator is Gt or + Lt, the values array must have a single + element, which will be interpreted as an + integer. This array is replaced during a + strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + type: object + weight: + description: Weight associated with matching the corresponding + nodeSelectorTerm, in the range 1-100. + format: int32 + type: integer + required: + - preference + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + description: If the affinity requirements specified by this + field are not met at scheduling time, the pod will not be + scheduled onto the node. If the affinity requirements specified + by this field cease to be met at some point during pod execution + (e.g. due to an update), the system may or may not try to + eventually evict the pod from its node. + properties: + nodeSelectorTerms: + description: Required. A list of node selector terms. + The terms are ORed. + items: + description: A null or empty node selector term matches + no objects. The requirements of them are ANDed. The + TopologySelectorTerm type implements a subset of the + NodeSelectorTerm. + properties: + matchExpressions: + description: A list of node selector requirements + by node's labels. + items: + description: A node selector requirement is a + selector that contains values, a key, and an + operator that relates the key and values. + properties: + key: + description: The label key that the selector + applies to. + type: string + operator: + description: Represents a key's relationship + to a set of values. Valid operators are + In, NotIn, Exists, DoesNotExist. Gt, and + Lt. + type: string + values: + description: An array of string values. If + the operator is In or NotIn, the values + array must be non-empty. If the operator + is Exists or DoesNotExist, the values array + must be empty. If the operator is Gt or + Lt, the values array must have a single + element, which will be interpreted as an + integer. This array is replaced during a + strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchFields: + description: A list of node selector requirements + by node's fields. + items: + description: A node selector requirement is a + selector that contains values, a key, and an + operator that relates the key and values. + properties: + key: + description: The label key that the selector + applies to. + type: string + operator: + description: Represents a key's relationship + to a set of values. Valid operators are + In, NotIn, Exists, DoesNotExist. Gt, and + Lt. + type: string + values: + description: An array of string values. If + the operator is In or NotIn, the values + array must be non-empty. If the operator + is Exists or DoesNotExist, the values array + must be empty. If the operator is Gt or + Lt, the values array must have a single + element, which will be interpreted as an + integer. This array is replaced during a + strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + type: object + type: array + required: + - nodeSelectorTerms + type: object + type: object + podAffinity: + description: Describes pod affinity scheduling rules (e.g. co-locate + this pod in the same node, zone, etc. as some other pod(s)). + properties: + preferredDuringSchedulingIgnoredDuringExecution: + description: The scheduler will prefer to schedule pods to + nodes that satisfy the affinity expressions specified by + this field, but it may choose a node that violates one or + more of the expressions. The node that is most preferred + is the one with the greatest sum of weights, i.e. for each + node that meets all of the scheduling requirements (resource + request, requiredDuringScheduling affinity expressions, + etc.), compute a sum by iterating through the elements of + this field and adding "weight" to the sum if the node has + pods which matches the corresponding podAffinityTerm; the + node(s) with the highest sum are the most preferred. + items: + description: The weights of all of the matched WeightedPodAffinityTerm + fields are added per-node to find the most preferred node(s) + properties: + podAffinityTerm: + description: Required. A pod affinity term, associated + with the corresponding weight. + properties: + labelSelector: + description: A label query over a set of resources, + in this case pods. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are + ANDed. + items: + description: A label selector requirement + is a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is + "In", and the values array contains only "value". + The requirements are ANDed. + type: object + type: object + namespaceSelector: + description: A label query over the set of namespaces + that the term applies to. The term is applied + to the union of the namespaces selected by this + field and the ones listed in the namespaces field. + null selector and null or empty namespaces list + means "this pod's namespace". An empty selector + ({}) matches all namespaces. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are + ANDed. + items: + description: A label selector requirement + is a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is + "In", and the values array contains only "value". + The requirements are ANDed. + type: object + type: object + namespaces: + description: namespaces specifies a static list + of namespace names that the term applies to. The + term is applied to the union of the namespaces + listed in this field and the ones selected by + namespaceSelector. null or empty namespaces list + and null namespaceSelector means "this pod's namespace". + items: + type: string + type: array + topologyKey: + description: This pod should be co-located (affinity) + or not co-located (anti-affinity) with the pods + matching the labelSelector in the specified namespaces, + where co-located is defined as running on a node + whose value of the label with key topologyKey + matches that of any node on which any of the selected + pods is running. Empty topologyKey is not allowed. + type: string + required: + - topologyKey + type: object + weight: + description: weight associated with matching the corresponding + podAffinityTerm, in the range 1-100. + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + description: If the affinity requirements specified by this + field are not met at scheduling time, the pod will not be + scheduled onto the node. If the affinity requirements specified + by this field cease to be met at some point during pod execution + (e.g. due to a pod label update), the system may or may + not try to eventually evict the pod from its node. When + there are multiple elements, the lists of nodes corresponding + to each podAffinityTerm are intersected, i.e. all terms + must be satisfied. + items: + description: Defines a set of pods (namely those matching + the labelSelector relative to the given namespace(s)) + that this pod should be co-located (affinity) or not co-located + (anti-affinity) with, where co-located is defined as running + on a node whose value of the label with key + matches that of any node on which a pod of the set of + pods is running + properties: + labelSelector: + description: A label query over a set of resources, + in this case pods. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are ANDed. + items: + description: A label selector requirement is a + selector that contains values, a key, and an + operator that relates the key and values. + properties: + key: + description: key is the label key that the + selector applies to. + type: string + operator: + description: operator represents a key's relationship + to a set of values. Valid operators are + In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. If the + operator is Exists or DoesNotExist, the + values array must be empty. This array is + replaced during a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is "In", + and the values array contains only "value". The + requirements are ANDed. + type: object + type: object + namespaceSelector: + description: A label query over the set of namespaces + that the term applies to. The term is applied to the + union of the namespaces selected by this field and + the ones listed in the namespaces field. null selector + and null or empty namespaces list means "this pod's + namespace". An empty selector ({}) matches all namespaces. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are ANDed. + items: + description: A label selector requirement is a + selector that contains values, a key, and an + operator that relates the key and values. + properties: + key: + description: key is the label key that the + selector applies to. + type: string + operator: + description: operator represents a key's relationship + to a set of values. Valid operators are + In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. If the + operator is Exists or DoesNotExist, the + values array must be empty. This array is + replaced during a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is "In", + and the values array contains only "value". The + requirements are ANDed. + type: object + type: object + namespaces: + description: namespaces specifies a static list of namespace + names that the term applies to. The term is applied + to the union of the namespaces listed in this field + and the ones selected by namespaceSelector. null or + empty namespaces list and null namespaceSelector means + "this pod's namespace". + items: + type: string + type: array + topologyKey: + description: This pod should be co-located (affinity) + or not co-located (anti-affinity) with the pods matching + the labelSelector in the specified namespaces, where + co-located is defined as running on a node whose value + of the label with key topologyKey matches that of + any node on which any of the selected pods is running. + Empty topologyKey is not allowed. + type: string + required: + - topologyKey + type: object + type: array + type: object + podAntiAffinity: + description: Describes pod anti-affinity scheduling rules (e.g. + avoid putting this pod in the same node, zone, etc. as some + other pod(s)). + properties: + preferredDuringSchedulingIgnoredDuringExecution: + description: The scheduler will prefer to schedule pods to + nodes that satisfy the anti-affinity expressions specified + by this field, but it may choose a node that violates one + or more of the expressions. The node that is most preferred + is the one with the greatest sum of weights, i.e. for each + node that meets all of the scheduling requirements (resource + request, requiredDuringScheduling anti-affinity expressions, + etc.), compute a sum by iterating through the elements of + this field and adding "weight" to the sum if the node has + pods which matches the corresponding podAffinityTerm; the + node(s) with the highest sum are the most preferred. + items: + description: The weights of all of the matched WeightedPodAffinityTerm + fields are added per-node to find the most preferred node(s) + properties: + podAffinityTerm: + description: Required. A pod affinity term, associated + with the corresponding weight. + properties: + labelSelector: + description: A label query over a set of resources, + in this case pods. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are + ANDed. + items: + description: A label selector requirement + is a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is + "In", and the values array contains only "value". + The requirements are ANDed. + type: object + type: object + namespaceSelector: + description: A label query over the set of namespaces + that the term applies to. The term is applied + to the union of the namespaces selected by this + field and the ones listed in the namespaces field. + null selector and null or empty namespaces list + means "this pod's namespace". An empty selector + ({}) matches all namespaces. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are + ANDed. + items: + description: A label selector requirement + is a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is + "In", and the values array contains only "value". + The requirements are ANDed. + type: object + type: object + namespaces: + description: namespaces specifies a static list + of namespace names that the term applies to. The + term is applied to the union of the namespaces + listed in this field and the ones selected by + namespaceSelector. null or empty namespaces list + and null namespaceSelector means "this pod's namespace". + items: + type: string + type: array + topologyKey: + description: This pod should be co-located (affinity) + or not co-located (anti-affinity) with the pods + matching the labelSelector in the specified namespaces, + where co-located is defined as running on a node + whose value of the label with key topologyKey + matches that of any node on which any of the selected + pods is running. Empty topologyKey is not allowed. + type: string + required: + - topologyKey + type: object + weight: + description: weight associated with matching the corresponding + podAffinityTerm, in the range 1-100. + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + description: If the anti-affinity requirements specified by + this field are not met at scheduling time, the pod will + not be scheduled onto the node. If the anti-affinity requirements + specified by this field cease to be met at some point during + pod execution (e.g. due to a pod label update), the system + may or may not try to eventually evict the pod from its + node. When there are multiple elements, the lists of nodes + corresponding to each podAffinityTerm are intersected, i.e. + all terms must be satisfied. + items: + description: Defines a set of pods (namely those matching + the labelSelector relative to the given namespace(s)) + that this pod should be co-located (affinity) or not co-located + (anti-affinity) with, where co-located is defined as running + on a node whose value of the label with key + matches that of any node on which a pod of the set of + pods is running + properties: + labelSelector: + description: A label query over a set of resources, + in this case pods. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are ANDed. + items: + description: A label selector requirement is a + selector that contains values, a key, and an + operator that relates the key and values. + properties: + key: + description: key is the label key that the + selector applies to. + type: string + operator: + description: operator represents a key's relationship + to a set of values. Valid operators are + In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. If the + operator is Exists or DoesNotExist, the + values array must be empty. This array is + replaced during a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is "In", + and the values array contains only "value". The + requirements are ANDed. + type: object + type: object + namespaceSelector: + description: A label query over the set of namespaces + that the term applies to. The term is applied to the + union of the namespaces selected by this field and + the ones listed in the namespaces field. null selector + and null or empty namespaces list means "this pod's + namespace". An empty selector ({}) matches all namespaces. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are ANDed. + items: + description: A label selector requirement is a + selector that contains values, a key, and an + operator that relates the key and values. + properties: + key: + description: key is the label key that the + selector applies to. + type: string + operator: + description: operator represents a key's relationship + to a set of values. Valid operators are + In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. If the + operator is Exists or DoesNotExist, the + values array must be empty. This array is + replaced during a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is "In", + and the values array contains only "value". The + requirements are ANDed. + type: object + type: object + namespaces: + description: namespaces specifies a static list of namespace + names that the term applies to. The term is applied + to the union of the namespaces listed in this field + and the ones selected by namespaceSelector. null or + empty namespaces list and null namespaceSelector means + "this pod's namespace". + items: + type: string + type: array + topologyKey: + description: This pod should be co-located (affinity) + or not co-located (anti-affinity) with the pods matching + the labelSelector in the specified namespaces, where + co-located is defined as running on a node whose value + of the label with key topologyKey matches that of + any node on which any of the selected pods is running. + Empty topologyKey is not allowed. + type: string + required: + - topologyKey + type: object + type: array + type: object + type: object + annotations: + additionalProperties: + type: string + nullable: true + type: object + args: + description: Arguments to the entrypoint. The container image's CMD + is used if this is not provided. + items: + type: string + type: array + chaincodeServerPort: + default: 7052 + type: integer + command: + description: Entrypoint array. Not executed within a shell. The container + image's ENTRYPOINT is used if this is not provided. + items: + type: string + type: array + env: + items: + description: EnvVar represents an environment variable present in + a Container. + properties: + name: + description: Name of the environment variable. Must be a C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are expanded using + the previously defined environment variables in the container + and any service environment variables. If a variable cannot + be resolved, the reference in the input string will be unchanged. + Double $$ are reduced to a single $, which allows for escaping + the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the + string literal "$(VAR_NAME)". Escaped references will never + be expanded, regardless of whether the variable exists or + not. Defaults to "".' + type: string + valueFrom: + description: Source for the environment variable's value. Cannot + be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap or its key + must be defined + type: boolean + required: + - key + type: object + fieldRef: + description: 'Selects a field of the pod: supports metadata.name, + metadata.namespace, `metadata.labels['''']`, `metadata.annotations['''']`, + spec.nodeName, spec.serviceAccountName, status.hostIP, + status.podIP, status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath is + written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the specified + API version. + type: string + required: + - fieldPath + type: object + resourceFieldRef: + description: 'Selects a resource of the container: only + resources limits and requests (limits.cpu, limits.memory, + limits.ephemeral-storage, requests.cpu, requests.memory + and requests.ephemeral-storage) are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the exposed + resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret in the pod's namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the Secret or its key must + be defined + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + nullable: true + type: array + imagePullPolicy: + default: IfNotPresent + description: PullPolicy describes a policy for if/when to pull a container + image + type: string + imagePullSecrets: + items: + description: LocalObjectReference contains enough information to + let you locate the referenced object inside the same namespace. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + nullable: true + type: array + labels: + additionalProperties: + type: string + nullable: true + type: object + mspID: + type: string + podAnnotations: + additionalProperties: + type: string + nullable: true + type: object + podLabels: + additionalProperties: + type: string + nullable: true + type: object + replicas: + type: integer + resources: + description: ResourceRequirements describes the compute resource requirements. + nullable: true + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Limits describes the maximum amount of compute resources + allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Requests describes the minimum amount of compute + resources required. If Requests is omitted for a container, + it defaults to Limits if that is explicitly specified, otherwise + to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + type: object + tolerations: + items: + description: The pod this Toleration is attached to tolerates any + taint that matches the triple using the matching + operator . + properties: + effect: + description: Effect indicates the taint effect to match. Empty + means match all taint effects. When specified, allowed values + are NoSchedule, PreferNoSchedule and NoExecute. + type: string + key: + description: Key is the taint key that the toleration applies + to. Empty means match all taint keys. If the key is empty, + operator must be Exists; this combination means to match all + values and all keys. + type: string + operator: + description: Operator represents a key's relationship to the + value. Valid operators are Exists and Equal. Defaults to Equal. + Exists is equivalent to wildcard for value, so that a pod + can tolerate all taints of a particular category. + type: string + tolerationSeconds: + description: TolerationSeconds represents the period of time + the toleration (which must be of effect NoExecute, otherwise + this field is ignored) tolerates the taint. By default, it + is not set, which means tolerate the taint forever (do not + evict). Zero and negative values will be treated as 0 (evict + immediately) by the system. + format: int64 + type: integer + value: + description: Value is the taint value the toleration matches + to. If the operator is Exists, the value should be empty, + otherwise just a regular string. + type: string + type: object + nullable: true + type: array + required: + - chaincodeServerPort + - imagePullPolicy + - replicas + type: object + status: + description: FabricChaincodeTemplateStatus defines the observed state + of FabricChaincodeTemplate + properties: + conditions: + description: Conditions is a set of Condition instances. + items: + description: "Condition represents an observation of an object's + state. Conditions are an extension mechanism intended to be used + when the details of an observation are not a priori known or would + not apply to all instances of a given Kind. \n Conditions should + be added to explicitly convey properties that users and components + care about rather than requiring those properties to be inferred + from other observations. Once defined, the meaning of a Condition + can not be changed arbitrarily - it becomes part of the API, and + has the same backwards- and forwards-compatibility concerns of + any other part of the API." + properties: + lastTransitionTime: + format: date-time + type: string + message: + type: string + reason: + description: ConditionReason is intended to be a one-word, CamelCase + representation of the category of cause of the current status. + It is intended to be used in concise output, such as one-line + kubectl get output, and in summarizing occurrences of causes. + type: string + status: + type: string + type: + description: "ConditionType is the type of the condition and + is typically a CamelCased word or short phrase. \n Condition + types should indicate state in the \"abnormal-true\" polarity. + For example, if the condition indicates when a policy is invalid, + the \"is valid\" case is probably the norm, so the condition + should be called \"Invalid\"." + type: string + required: + - status + - type + type: object + type: array + message: + type: string + status: + description: Status of the FabricCA + type: string + required: + - conditions + - message + - status + type: object + type: object + served: true + storage: true + subresources: + status: {} +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] diff --git a/config/crd/bases/hlf.kungfusoftware.es_fabricnetworkconfigs.yaml b/config/crd/bases/hlf.kungfusoftware.es_fabricnetworkconfigs.yaml index ce21b7be..02cafb8c 100644 --- a/config/crd/bases/hlf.kungfusoftware.es_fabricnetworkconfigs.yaml +++ b/config/crd/bases/hlf.kungfusoftware.es_fabricnetworkconfigs.yaml @@ -45,6 +45,19 @@ spec: spec: description: FabricNetworkConfigSpec defines the desired state of FabricNetworkConfig properties: + certificateAuthorities: + items: + properties: + name: + type: string + namespace: + type: string + required: + - name + - namespace + type: object + nullable: true + type: array channels: items: type: string @@ -108,6 +121,26 @@ spec: type: array organization: type: string + organizationConfig: + additionalProperties: + properties: + peers: + items: + properties: + name: + type: string + namespace: + type: string + required: + - name + - namespace + type: object + type: array + required: + - peers + type: object + nullable: true + type: object organizations: items: type: string diff --git a/config/crd/kustomization.yaml b/config/crd/kustomization.yaml index 2031a5e0..a1e35c36 100644 --- a/config/crd/kustomization.yaml +++ b/config/crd/kustomization.yaml @@ -14,6 +14,7 @@ resources: - bases/hlf.kungfusoftware.es_fabricoperatorapis.yaml - bases/hlf.kungfusoftware.es_fabricmainchannels.yaml - bases/hlf.kungfusoftware.es_fabricfollowerchannels.yaml + - bases/hlf.kungfusoftware.es_fabricchaincodetemplates.yaml # +kubebuilder:scaffold:crdkustomizeresource patchesStrategicMerge: diff --git a/config/manager/kustomization.yaml b/config/manager/kustomization.yaml index 4440e602..a1a00bcd 100644 --- a/config/manager/kustomization.yaml +++ b/config/manager/kustomization.yaml @@ -4,5 +4,5 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization images: - name: controller - newName: quay.io/kfsoftware/hlf-operator - newTag: v1.3.0-beta5 + newName: kfsoftware/hlf-operator + newTag: 1.10.0-dviejo-beta2 diff --git a/config/rbac/auth_proxy_client_clusterrole.yaml b/config/rbac/auth_proxy_client_clusterrole.yaml index 7d62534c..bd4af137 100644 --- a/config/rbac/auth_proxy_client_clusterrole.yaml +++ b/config/rbac/auth_proxy_client_clusterrole.yaml @@ -1,4 +1,4 @@ -apiVersion: rbac.authorization.k8s.io/v1beta1 +apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: name: metrics-reader diff --git a/controllers/chaincode/chaincode_controller.go b/controllers/chaincode/chaincode_controller.go index e76ecca8..b3c78834 100644 --- a/controllers/chaincode/chaincode_controller.go +++ b/controllers/chaincode/chaincode_controller.go @@ -10,6 +10,7 @@ import ( hlfv1alpha1 "github.com/kfsoftware/hlf-operator/api/hlf.kungfusoftware.es/v1alpha1" "github.com/kfsoftware/hlf-operator/controllers/certs" "github.com/kfsoftware/hlf-operator/controllers/utils" + operatorv1 "github.com/kfsoftware/hlf-operator/pkg/client/clientset/versioned" "github.com/kfsoftware/hlf-operator/pkg/status" "github.com/pkg/errors" log "github.com/sirupsen/logrus" @@ -24,6 +25,9 @@ import ( ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" + "sigs.k8s.io/controller-runtime/pkg/handler" + "sigs.k8s.io/controller-runtime/pkg/reconcile" + "sigs.k8s.io/controller-runtime/pkg/source" "time" ) @@ -290,7 +294,27 @@ func (r *FabricChaincodeReconciler) Reconcile(ctx context.Context, req ctrl.Requ return ctrl.Result{}, err } } - r.Log.Info(fmt.Sprintf("Chaincode %s reconciled", req.NamespacedName)) + r.Log.Info(fmt.Sprintf("Reconciling chaincode %s", req.NamespacedName)) + hlfClientSet, err := operatorv1.NewForConfig(r.Config) + if err != nil { + r.setConditionStatus(ctx, fabricChaincode, hlfv1alpha1.FailedStatus, false, err, false) + return r.updateCRStatusOrFailReconcile(ctx, r.Log, fabricChaincode) + } + // apply default values if there's a template + if fabricChaincode.Spec.Template != nil { + fabricChaincodeTemplate, err := hlfClientSet.HlfV1alpha1().FabricChaincodeTemplates(fabricChaincode.Spec.Template.Namespace).Get( + ctx, + fabricChaincode.Spec.Template.Name, + metav1.GetOptions{}, + ) + if err != nil { + r.setConditionStatus(ctx, fabricChaincode, hlfv1alpha1.FailedStatus, false, err, false) + return r.updateCRStatusOrFailReconcile(ctx, r.Log, fabricChaincode) + } + // apply default values from the template into `fabricChaincode.spec` + r.Log.Info(fmt.Sprintf("Applying default values from template %s", fabricChaincode.Spec.Template.Name)) + fabricChaincode.Spec.ApplyDefaultValuesFromTemplate(fabricChaincodeTemplate) + } ns := req.Namespace if ns == "" { ns = "default" @@ -633,11 +657,49 @@ func (r *FabricChaincodeReconciler) setConditionStatus(ctx context.Context, p *h return p.Status.Conditions.SetCondition(condition()) } +// enqueueRequestForOwningResource returns an event handler for all Chaincodes objects having +// owningGatewayLabel +func (r *FabricChaincodeReconciler) enqueueRequestForOwningResource() handler.EventHandler { + return handler.EnqueueRequestsFromMapFunc(func(object client.Object) []reconcile.Request { + scopedLog := log.WithFields(log.Fields{ + "controller": "chaincode", + "name": object.GetName(), + }) + // Get the list of all Chaincodes that owns this resource + list := &hlfv1alpha1.FabricChaincodeList{} + if err := r.List(context.Background(), list); err != nil { + return nil + } + scopedLog.Infof("Enqueueing reconcile requests for %d Chaincode", len(list.Items)) + // Return empty reconcile request to skip reconciliation + if len(list.Items) == 0 { + return nil + } + // Loop through all found Chaincode, and enqueue a reconcile request for them + requests := make([]reconcile.Request, 0, len(list.Items)) + for _, item := range list.Items { + requests = append(requests, reconcile.Request{ + NamespacedName: client.ObjectKey{ + Name: item.Name, + Namespace: item.Namespace, + }, + }) + } + return requests + }) +} + func (r *FabricChaincodeReconciler) SetupWithManager(mgr ctrl.Manager) error { managedBy := ctrl.NewControllerManagedBy(mgr) return managedBy. For(&hlfv1alpha1.FabricChaincode{}). Owns(&corev1.Secret{}). + Watches( + &source.Kind{ + Type: &hlfv1alpha1.FabricChaincodeTemplate{}, + }, + r.enqueueRequestForOwningResource(), + ). Complete(r) } diff --git a/controllers/followerchannel/followerchannel_controller.go b/controllers/followerchannel/followerchannel_controller.go index 47253812..4421bfba 100644 --- a/controllers/followerchannel/followerchannel_controller.go +++ b/controllers/followerchannel/followerchannel_controller.go @@ -251,14 +251,18 @@ func (r *FabricFollowerChannelReconciler) Reconcile(ctx context.Context, req ctr r.Log.Info(fmt.Sprintf("Old anchor peers %v", anchorPeers)) for _, anchorPeer := range anchorPeers { + reqLogger.Info(fmt.Sprintf("Removing anchor peer %v", anchorPeer)) err = app.RemoveAnchorPeer(configtx.Address{ Host: anchorPeer.Host, Port: anchorPeer.Port, }) if err != nil { + currentAnchorPeers, err := app.AnchorPeers() + reqLogger.Error(err, fmt.Sprintf("Failed to remove anchor peer %v, current anchor peers: %v", anchorPeer, currentAnchorPeers)) r.setConditionStatus(ctx, fabricFollowerChannel, hlfv1alpha1.FailedStatus, false, err, false) return r.updateCRStatusOrFailReconcile(ctx, r.Log, fabricFollowerChannel) } + reqLogger.Info(fmt.Sprintf("Removed anchor peer %v", anchorPeer)) } r.Log.Info(fmt.Sprintf("New anchor peers %v", anchorPeers)) @@ -268,6 +272,7 @@ func (r *FabricFollowerChannelReconciler) Reconcile(ctx context.Context, req ctr Port: anchorPeer.Port, }) if err != nil { + reqLogger.Error(err, fmt.Sprintf("Failed to add anchor peer %v", anchorPeer)) r.setConditionStatus(ctx, fabricFollowerChannel, hlfv1alpha1.FailedStatus, false, err, false) return r.updateCRStatusOrFailReconcile(ctx, r.Log, fabricFollowerChannel) } diff --git a/controllers/mainchannel/mainchannel_controller.go b/controllers/mainchannel/mainchannel_controller.go index ac62979b..c591996d 100644 --- a/controllers/mainchannel/mainchannel_controller.go +++ b/controllers/mainchannel/mainchannel_controller.go @@ -1252,12 +1252,9 @@ func updateApplicationChannelConfigTx(currentConfigTX configtx.ConfigTx, newConf if err != nil { return errors.Wrapf(err, "failed to set ACLs") } - err = currentConfigTX.Orderer().SetBatchTimeout(newConfigTx.Orderer.BatchTimeout) - if err != nil { - return errors.Wrapf(err, "failed to set batch timeout") - } return nil } + func updateOrdererChannelConfigTx(currentConfigTX configtx.ConfigTx, newConfigTx configtx.Channel) error { err := currentConfigTX.Orderer().SetPolicies( newConfigTx.Orderer.Policies, @@ -1402,7 +1399,10 @@ func updateOrdererChannelConfigTx(currentConfigTX configtx.ConfigTx, newConfigTx if err != nil { return errors.Wrap(err, "failed to set application policies") } - + err = currentConfigTX.Orderer().SetBatchTimeout(newConfigTx.Orderer.BatchTimeout) + if err != nil { + return errors.Wrapf(err, "failed to set batch timeout") + } return nil } diff --git a/controllers/networkconfig/networkconfig_controller.go b/controllers/networkconfig/networkconfig_controller.go index f0eda2d6..198bedcc 100644 --- a/controllers/networkconfig/networkconfig_controller.go +++ b/controllers/networkconfig/networkconfig_controller.go @@ -93,6 +93,11 @@ orderers: url: grpcs://{{ $orderer.PrivateURL }} {{ else }} url: grpcs://{{ $orderer.PublicURL }} +{{ end }} +{{if $orderer.AdminURL }} + adminUrl: {{ $orderer.AdminURL }} + adminTlsCert: | +{{ $orderer.Status.TlsAdminCert | indent 8 }} {{ end }} grpcOptions: allow-insecure: false @@ -311,6 +316,18 @@ func (r *FabricNetworkConfigReconciler) Reconcile(ctx context.Context, req ctrl. } certAuths = append(certAuths, ca) } + // filter by cas included, if any + if len(fabricNetworkConfig.Spec.CertificateAuthorities) > 0 { + var cas []*helpers.ClusterCA + for _, ca := range certAuths { + for _, fabricNetworkConfigCA := range fabricNetworkConfig.Spec.CertificateAuthorities { + if ca.Item.Name == fabricNetworkConfigCA.Name && ca.Item.Namespace == fabricNetworkConfigCA.Namespace { + cas = append(cas, ca) + } + } + } + certAuths = cas + } for _, v := range peerOrgs { if (filterByOrgs && utils.Contains(fabricNetworkConfig.Spec.Organizations, v.MspID)) || !filterByOrgs { var peers []*helpers.ClusterPeer @@ -396,6 +413,7 @@ func (r *FabricNetworkConfigReconciler) Reconcile(ctx context.Context, req ctrl. Key: string(keyBytes), }) } + var peers []*helpers.ClusterPeer for _, peer := range clusterPeers { if filterByNS && !utils.Contains(fabricNetworkConfig.Spec.Namespaces, peer.Namespace) { @@ -406,6 +424,32 @@ func (r *FabricNetworkConfigReconciler) Reconcile(ctx context.Context, req ctrl. } } + for mspID, org := range fabricNetworkConfig.Spec.OrganizationConfig { + if len(org.Peers) > 0 { + // iterate through clusterpeers and remove the ones that are not in the list + // peers = peer0-org1 peer1-org1 peer1-ch-org1 + // org peers + var orgPeers []*helpers.ClusterPeer + for _, peer := range org.Peers { + for _, p := range peers { + if p.Object.Name == peer.Name && p.Object.Namespace == peer.Namespace { + orgPeers = append(orgPeers, p) + } else { + // delete from peers + } + } + } + var restPeerOrgs []*helpers.ClusterPeer + for _, p := range peers { + if p.MSPID != mspID { + restPeerOrgs = append(restPeerOrgs, p) + } + } + peers = append(restPeerOrgs, orgPeers...) + orgMap[mspID].Peers = orgPeers + } + } + tmpl, err := template.New("networkConfig").Funcs(sprig.HermeticTxtFuncMap()).Parse(tmplGoConfig) if err != nil { r.setConditionStatus(ctx, fabricNetworkConfig, hlfv1alpha1.FailedStatus, false, err, false) diff --git a/controllers/peer/peer_controller.go b/controllers/peer/peer_controller.go index c7779f95..c687fc48 100644 --- a/controllers/peer/peer_controller.go +++ b/controllers/peer/peer_controller.go @@ -1556,6 +1556,7 @@ func (r *FabricPeerReconciler) finalizePeer(reqLogger logr.Logger, peer *hlfv1al } const PeerPortName = "peer" +const PeerPortName443 = "peer-443" const ChaincodePortName = "chaincode" const EventPortName = "event" const OperationsPortName = "operations" @@ -1607,6 +1608,15 @@ func createPeerService( serviceSpec := corev1.ServiceSpec{ Type: peer.Spec.Service.Type, Ports: []corev1.ServicePort{ + { + Name: PeerPortName443, + Protocol: "TCP", + Port: 443, + TargetPort: intstr.IntOrString{ + Type: intstr.Int, + IntVal: 443, + }, + }, { Name: PeerPortName, Protocol: "TCP", diff --git a/docs/reference/technical.md.bak b/docs/reference/technical.md.bak new file mode 100644 index 00000000..e69de29b diff --git a/go.mod b/go.mod index 81aea862..99833106 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/kfsoftware/hlf-operator -go 1.18 +go 1.21 require ( github.com/IBM/idemix v0.0.0-20220113150823-80dd4cb2d74e @@ -20,7 +20,7 @@ require ( github.com/gorilla/mux v1.8.0 github.com/grantae/certinfo v0.0.0-20170412194111-59d56a35515b github.com/hyperledger/fabric v2.1.1+incompatible - github.com/hyperledger/fabric-config v0.1.0 + github.com/hyperledger/fabric-config v0.2.1 github.com/hyperledger/fabric-lib-go v1.0.0 github.com/hyperledger/fabric-protos-go v0.3.0 github.com/hyperledger/fabric-sdk-go v1.0.1-0.20220124135247-4f34271d9b0f @@ -243,3 +243,6 @@ replace ( k8s.io/metrics => k8s.io/metrics v0.24.0 k8s.io/sample-apiserver => k8s.io/sample-apiserver v0.24.0 ) +replace ( + github.com/hyperledger/fabric-sdk-go => github.com/kfsoftware/fabric-sdk-go v0.0.0-20240114221414-98466038585d +) \ No newline at end of file diff --git a/go.sum b/go.sum index 0f8a5329..a2d88ec9 100644 --- a/go.sum +++ b/go.sum @@ -473,6 +473,8 @@ github.com/hyperledger/fabric-amcl v0.0.0-20210603140002-2670f91851c8/go.mod h1: github.com/hyperledger/fabric-config v0.0.5/go.mod h1:YpITBI/+ZayA3XWY5lF302K7PAsFYjEEPM/zr3hegA8= github.com/hyperledger/fabric-config v0.1.0 h1:TsR3y5xEoUmXWfp8tcDycjJhVvXEHiV5kfZIxuIte08= github.com/hyperledger/fabric-config v0.1.0/go.mod h1:aeDZ0moG/qKvwLjddcqYr8+58/oNaJy3HE0tI01546c= +github.com/hyperledger/fabric-config v0.2.1 h1:CsReuxvi5c5NUyKKQOIVbHux32o+XtmDNceYLYjycxo= +github.com/hyperledger/fabric-config v0.2.1/go.mod h1:1ZfjDrsuMoM4IPKezQgTByy2vXUj8bgTXaOXaGXK5O4= github.com/hyperledger/fabric-lib-go v1.0.0 h1:UL1w7c9LvHZUSkIvHTDGklxFv2kTeva1QI2emOVc324= github.com/hyperledger/fabric-lib-go v1.0.0/go.mod h1:H362nMlunurmHwkYqR5uHL2UDWbQdbfz74n8kbCFsqc= github.com/hyperledger/fabric-protos-go v0.0.0-20200424173316-dd554ba3746e/go.mod h1:xVYTjK4DtZRBxZ2D9aE4y6AbLaPwue2o/criQyQbVD0= @@ -533,6 +535,8 @@ github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0 h1:iQTw/8FWTuc7uia github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0/go.mod h1:1NbS8ALrpOvjt0rHPNLyCIeMtbizbir8U//inJ+zuB8= github.com/karrick/godirwalk v1.16.1 h1:DynhcF+bztK8gooS0+NDJFrdNZjJ3gzVzC545UNA9iw= github.com/karrick/godirwalk v1.16.1/go.mod h1:j4mkqPuvaLI8mp1DroR3P6ad7cyYd4c1qeJ3RV7ULlk= +github.com/kfsoftware/fabric-sdk-go v0.0.0-20240114221414-98466038585d h1:HcMV8Lve3QkZUIWYHP+rVIR4xtTdDPooj7Id0IdBj0o= +github.com/kfsoftware/fabric-sdk-go v0.0.0-20240114221414-98466038585d/go.mod h1:JRplpKBeAvXjsBhOCCM/KvMRUbdDyhsAh80qbXzKc10= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= diff --git a/k8s/boilerplate.go.txt b/k8s/boilerplate.go.txt new file mode 100644 index 00000000..494895f7 --- /dev/null +++ b/k8s/boilerplate.go.txt @@ -0,0 +1,5 @@ +/* + * Copyright Kungfusoftware.es. All Rights Reserved. + * + * SPDX-License-Identifier: Apache-2.0 + */ \ No newline at end of file diff --git a/kind-config.yaml b/kind-config.yaml new file mode 100644 index 00000000..f6d1f586 --- /dev/null +++ b/kind-config.yaml @@ -0,0 +1,10 @@ +kind: Cluster +apiVersion: kind.x-k8s.io/v1alpha4 +nodes: +- role: control-plane + image: kindest/node:v1.25.8 + extraPortMappings: + - containerPort: 30949 + hostPort: 80 + - containerPort: 30950 + hostPort: 443 diff --git a/kubectl-hlf/cmd/chaincode/invoke.go b/kubectl-hlf/cmd/chaincode/invoke.go index 89489563..66b3b02f 100644 --- a/kubectl-hlf/cmd/chaincode/invoke.go +++ b/kubectl-hlf/cmd/chaincode/invoke.go @@ -23,25 +23,31 @@ type invokeChaincodeCmd struct { fcn string args []string transient string + mspID string } func (c *invokeChaincodeCmd) validate() error { return nil } func (c *invokeChaincodeCmd) run(out io.Writer) error { - oclient, err := helpers.GetKubeOperatorClient() - if err != nil { - return err - } - clientSet, err := helpers.GetKubeClient() - if err != nil { - return err - } - peer, err := helpers.GetPeerByFullName(clientSet, oclient, c.peer) - if err != nil { - return err + var mspID string + if c.mspID != "" { + mspID = c.mspID + } else { + oclient, err := helpers.GetKubeOperatorClient() + if err != nil { + return err + } + clientSet, err := helpers.GetKubeClient() + if err != nil { + return err + } + peer, err := helpers.GetPeerByFullName(clientSet, oclient, c.peer) + if err != nil { + return err + } + mspID = peer.Spec.MspID } - mspID := peer.Spec.MspID configBackend := config.FromFile(c.configPath) sdk, err := fabsdk.New(configBackend) if err != nil { @@ -109,6 +115,7 @@ func newInvokeChaincodeCMD(out io.Writer, errOut io.Writer) *cobra.Command { persistentFlags.StringVarP(&c.fcn, "fcn", "", "", "Function name") persistentFlags.StringArrayVarP(&c.args, "args", "a", []string{}, "Function arguments") persistentFlags.StringVarP(&c.transient, "transient", "t", "", "Transient map") + persistentFlags.StringVarP(&c.mspID, "mspID", "", "", "MSP ID") cmd.MarkPersistentFlagRequired("user") cmd.MarkPersistentFlagRequired("peer") cmd.MarkPersistentFlagRequired("config") diff --git a/kubectl-hlf/cmd/chaincode/query.go b/kubectl-hlf/cmd/chaincode/query.go index 53357efa..bd21b892 100644 --- a/kubectl-hlf/cmd/chaincode/query.go +++ b/kubectl-hlf/cmd/chaincode/query.go @@ -4,6 +4,7 @@ import ( "encoding/json" "fmt" "io" + "time" "github.com/hyperledger/fabric-sdk-go/pkg/client/channel" "github.com/hyperledger/fabric-sdk-go/pkg/core/config" @@ -21,26 +22,32 @@ type queryChaincodeCmd struct { fcn string args []string transient string + mspID string } func (c *queryChaincodeCmd) validate() error { return nil } func (c *queryChaincodeCmd) run(out io.Writer) error { - oclient, err := helpers.GetKubeOperatorClient() - if err != nil { - return err - } - clientSet, err := helpers.GetKubeClient() - if err != nil { - return err - } - peer, err := helpers.GetPeerByFullName(clientSet, oclient, c.peer) - if err != nil { - return err + var mspID string + if c.mspID != "" { + mspID = c.mspID + } else { + oclient, err := helpers.GetKubeOperatorClient() + if err != nil { + return err + } + clientSet, err := helpers.GetKubeClient() + if err != nil { + return err + } + peer, err := helpers.GetPeerByFullName(clientSet, oclient, c.peer) + if err != nil { + return err + } + mspID = peer.Spec.MspID } - mspID := peer.Spec.MspID - peerName := peer.Name + peerName := c.peer configBackend := config.FromFile(c.configPath) sdk, err := fabsdk.New(configBackend) if err != nil { @@ -63,10 +70,10 @@ func (c *queryChaincodeCmd) run(out io.Writer) error { if c.transient != "" { err = json.Unmarshal([]byte(c.transient), &transientMap) if err != nil { - return err + return err } } - + t := time.Now() response, err := ch.Query( channel.Request{ ChaincodeID: c.chaincode, @@ -81,6 +88,7 @@ func (c *queryChaincodeCmd) run(out io.Writer) error { if err != nil { return err } + fmt.Printf("Query took %s\n", time.Since(t)) _, err = fmt.Fprint(out, string(response.Payload)) if err != nil { return err @@ -108,6 +116,7 @@ func newQueryChaincodeCMD(out io.Writer, errOut io.Writer) *cobra.Command { persistentFlags.StringVarP(&c.fcn, "fcn", "", "", "Function name") persistentFlags.StringArrayVarP(&c.args, "args", "a", []string{}, "Function arguments") persistentFlags.StringVarP(&c.transient, "transient", "t", "", "Transient map") + persistentFlags.StringVarP(&c.mspID, "mspID", "", "", "MSP ID") cmd.MarkPersistentFlagRequired("user") cmd.MarkPersistentFlagRequired("peer") cmd.MarkPersistentFlagRequired("config") diff --git a/kubectl-hlf/cmd/chaincode/queryinstalled.go b/kubectl-hlf/cmd/chaincode/queryinstalled.go index 59a48ab2..e60ebbf8 100644 --- a/kubectl-hlf/cmd/chaincode/queryinstalled.go +++ b/kubectl-hlf/cmd/chaincode/queryinstalled.go @@ -16,26 +16,32 @@ type queryInstalledCmd struct { configPath string peer string userName string + mspID string } func (c *queryInstalledCmd) validate() error { return nil } func (c *queryInstalledCmd) run(out io.Writer) error { - oclient, err := helpers.GetKubeOperatorClient() - if err != nil { - return err - } - clientSet, err := helpers.GetKubeClient() - if err != nil { - return err - } - peer, err := helpers.GetPeerByFullName(clientSet, oclient, c.peer) - if err != nil { - return err + var mspID string + if c.mspID != "" { + mspID = c.mspID + } else { + oclient, err := helpers.GetKubeOperatorClient() + if err != nil { + return err + } + clientSet, err := helpers.GetKubeClient() + if err != nil { + return err + } + peer, err := helpers.GetPeerByFullName(clientSet, oclient, c.peer) + if err != nil { + return err + } + mspID = peer.Spec.MspID } - mspID := peer.Spec.MspID - peerName := peer.Name + peerName := c.peer configBackend := config.FromFile(c.configPath) sdk, err := fabsdk.New(configBackend) if err != nil { @@ -102,6 +108,7 @@ func newChaincodeQueryInstalledCMD(out io.Writer, errOut io.Writer) *cobra.Comma persistentFlags.StringVarP(&c.peer, "peer", "p", "", "Peer org to invoke the updates") persistentFlags.StringVarP(&c.userName, "user", "", "", "User name for the transaction") persistentFlags.StringVarP(&c.configPath, "config", "", "", "Configuration file for the SDK") + persistentFlags.StringVarP(&c.mspID, "mspID", "", "", "MSP ID of the peer") cmd.MarkPersistentFlagRequired("user") cmd.MarkPersistentFlagRequired("peer") cmd.MarkPersistentFlagRequired("config") diff --git a/kubectl-hlf/cmd/console/create.go b/kubectl-hlf/cmd/console/create.go index 99580130..549f528f 100644 --- a/kubectl-hlf/cmd/console/create.go +++ b/kubectl-hlf/cmd/console/create.go @@ -114,7 +114,7 @@ func (c *createCmd) run() error { Image: c.consoleOpts.Image, ImagePullSecrets: imagePullSecrets, Tag: c.consoleOpts.Version, - ImagePullPolicy: "Always", + ImagePullPolicy: "IfNotPresent", Tolerations: []corev1.Toleration{}, Replicas: 1, CouchDB: v1alpha1.FabricOperationsConsoleCouchDB{ @@ -134,7 +134,7 @@ func (c *createCmd) run() error { ImagePullSecrets: []corev1.LocalObjectReference{}, Affinity: &corev1.Affinity{}, Tolerations: []corev1.Toleration{}, - ImagePullPolicy: "Always", + ImagePullPolicy: "IfNotPresent", }, Env: []corev1.EnvVar{}, Affinity: &corev1.Affinity{}, diff --git a/kubectl-hlf/cmd/externalchaincode/sync.go b/kubectl-hlf/cmd/externalchaincode/sync.go index fe2f6a14..0799cfdb 100644 --- a/kubectl-hlf/cmd/externalchaincode/sync.go +++ b/kubectl-hlf/cmd/externalchaincode/sync.go @@ -64,7 +64,7 @@ func (c *syncExternalChaincodeCmd) validate() error { func (c syncExternalChaincodeCmd) getFabricChaincodeSpec(ctx context.Context) (v1alpha1.FabricChaincodeSpec, error) { fabricChaincodeSpec := v1alpha1.FabricChaincodeSpec{ Image: c.image, - ImagePullPolicy: corev1.PullAlways, + ImagePullPolicy: corev1.PullIfNotPresent, PackageID: c.packageID, ImagePullSecrets: []corev1.LocalObjectReference{}, Affinity: nil, @@ -180,6 +180,7 @@ func (c *syncExternalChaincodeCmd) updateChaincode(ctx context.Context, fabricCh } fabricChaincode.Spec.Image = fabricChaincodeSpec.Image fabricChaincode.Spec.ImagePullPolicy = fabricChaincodeSpec.ImagePullPolicy + fabricChaincode.Spec.Replicas = fabricChaincodeSpec.Replicas fabricChaincode.Spec.PackageID = fabricChaincodeSpec.PackageID fabricChaincode.Spec.ImagePullSecrets = fabricChaincodeSpec.ImagePullSecrets if c.tlsRequired { diff --git a/kubectl-hlf/cmd/helpers/hlf.go b/kubectl-hlf/cmd/helpers/hlf.go index 584c2e3c..84cc4878 100644 --- a/kubectl-hlf/cmd/helpers/hlf.go +++ b/kubectl-hlf/cmd/helpers/hlf.go @@ -65,6 +65,7 @@ type ClusterOrdererNode struct { Name string PublicURL string PrivateURL string + AdminURL string Spec hlfv1alpha1.FabricOrdererNodeSpec Status hlfv1alpha1.FabricOrdererNodeStatus Item hlfv1alpha1.FabricOrdererNode @@ -143,9 +144,14 @@ func MapClusterOrdererNode(clientSet *kubernetes.Clientset, ordNode hlfv1alpha1. if err != nil { return nil, err } + adminPublicURL, err := GetAdminOrdererPublicURL(clientSet, ordNode) + if err != nil { + return nil, err + } privateURL := GetOrdererPrivateURL(ordNode) return &ClusterOrdererNode{ Name: ordNode.FullName(), + AdminURL: adminPublicURL, Namespace: ordNode.Namespace, ObjectMeta: ordNode.ObjectMeta, Spec: ordNode.Spec, @@ -199,9 +205,14 @@ func GetClusterOrderers( return nil, nil, err } privateURL := GetOrdererPrivateURL(ordNode) + adminPublicURL, err := GetAdminOrdererPublicURL(clientSet, ordNode) + if err != nil { + return nil, nil, err + } orderingService.Orderers = append( orderingService.Orderers, &ClusterOrdererNode{ + AdminURL: adminPublicURL, Name: ordNode.FullName(), ObjectMeta: ordNode.ObjectMeta, Spec: ordNode.Spec, @@ -276,11 +287,15 @@ func GetClusterOrdererNodes( return nil, err } privateURL := GetOrdererPrivateURL(ordNode) - + adminPublicURL, err := GetAdminOrdererPublicURL(clientSet, ordNode) + if err != nil { + return nil, err + } ordererNodes = append( ordererNodes, &ClusterOrdererNode{ Name: ordNode.FullName(), + AdminURL: adminPublicURL, Namespace: ordNode.Namespace, PublicURL: publicURL, PrivateURL: privateURL, @@ -391,6 +406,13 @@ func GetOrdererPublicURL(clientset *kubernetes.Clientset, node hlfv1alpha1.Fabri } return fmt.Sprintf("%s:%d", hostPort.Host, hostPort.Port), nil } +func GetAdminOrdererPublicURL(clientset *kubernetes.Clientset, node hlfv1alpha1.FabricOrdererNode) (string, error) { + host, port, err := GetOrdererAdminHostAndPort(clientset, node.Spec, node.Status) + if err != nil { + return "", err + } + return fmt.Sprintf("https://%s:%d", host, port), nil +} func GetOrdererHostAndPort(clientset *kubernetes.Clientset, nodeSpec hlfv1alpha1.FabricOrdererNodeSpec, nodeStatus hlfv1alpha1.FabricOrdererNodeStatus) (string, int, error) { var hostName string var err error diff --git a/kubectl-hlf/cmd/ordnode/create.go b/kubectl-hlf/cmd/ordnode/create.go index c5008dbc..126dd9a5 100644 --- a/kubectl-hlf/cmd/ordnode/create.go +++ b/kubectl-hlf/cmd/ordnode/create.go @@ -197,7 +197,7 @@ func (c *createCmd) run(args []string) error { Image: c.ordererOpts.Image, ImagePullSecrets: imagePullSecrets, Tag: c.ordererOpts.Version, - PullPolicy: corev1.PullAlways, + PullPolicy: corev1.PullIfNotPresent, MspID: c.ordererOpts.MspID, Genesis: "", BootstrapMethod: v1alpha1.BootstrapMethodNone, diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/addressoverride.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/addressoverride.go new file mode 100644 index 00000000..bf7484c4 --- /dev/null +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/addressoverride.go @@ -0,0 +1,46 @@ +/* + * Copyright Kungfusoftware.es. All Rights Reserved. + * + * SPDX-License-Identifier: Apache-2.0 + */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +// AddressOverrideApplyConfiguration represents an declarative configuration of the AddressOverride type for use +// with apply. +type AddressOverrideApplyConfiguration struct { + From *string `json:"from,omitempty"` + To *string `json:"to,omitempty"` + CACertsFile *string `json:"caCertsFile,omitempty"` +} + +// AddressOverrideApplyConfiguration constructs an declarative configuration of the AddressOverride type for use with +// apply. +func AddressOverride() *AddressOverrideApplyConfiguration { + return &AddressOverrideApplyConfiguration{} +} + +// WithFrom sets the From field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the From field is set to the value of the last call. +func (b *AddressOverrideApplyConfiguration) WithFrom(value string) *AddressOverrideApplyConfiguration { + b.From = &value + return b +} + +// WithTo sets the To field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the To field is set to the value of the last call. +func (b *AddressOverrideApplyConfiguration) WithTo(value string) *AddressOverrideApplyConfiguration { + b.To = &value + return b +} + +// WithCACertsFile sets the CACertsFile field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the CACertsFile field is set to the value of the last call. +func (b *AddressOverrideApplyConfiguration) WithCACertsFile(value string) *AddressOverrideApplyConfiguration { + b.CACertsFile = &value + return b +} diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/applicationcapabilities.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/applicationcapabilities.go index 6ee2b071..5681fa45 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/applicationcapabilities.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/applicationcapabilities.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/catls.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/catls.go index 18d3536a..970c8924 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/catls.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/catls.go @@ -3,13 +3,15 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 // CatlsApplyConfiguration represents an declarative configuration of the Catls type for use // with apply. type CatlsApplyConfiguration struct { - Cacert *string `json:"cacert,omitempty"` + Cacert *string `json:"cacert,omitempty"` + SecretRef *SecretRefNSKeyApplyConfiguration `json:"secretRef,omitempty"` } // CatlsApplyConfiguration constructs an declarative configuration of the Catls type for use with @@ -25,3 +27,11 @@ func (b *CatlsApplyConfiguration) WithCacert(value string) *CatlsApplyConfigurat b.Cacert = &value return b } + +// WithSecretRef sets the SecretRef field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SecretRef field is set to the value of the last call. +func (b *CatlsApplyConfiguration) WithSecretRef(value *SecretRefNSKeyApplyConfiguration) *CatlsApplyConfiguration { + b.SecretRef = value + return b +} diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/channelcapabilities.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/channelcapabilities.go index d121c6e9..a0be1b73 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/channelcapabilities.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/channelcapabilities.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/channelconfig.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/channelconfig.go index 7de48e03..d9946b02 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/channelconfig.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/channelconfig.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/component.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/component.go index 8e664bfc..4fac580f 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/component.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/component.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/cors.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/cors.go index c8837835..d2bdd72d 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/cors.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/cors.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/csr.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/csr.go index f6d3fe81..456a0b51 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/csr.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/csr.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/enrollment.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/enrollment.go index 2089f76c..49801ce0 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/enrollment.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/enrollment.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/externalbuilder.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/externalbuilder.go index 12ae9803..1297c7eb 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/externalbuilder.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/externalbuilder.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/externalcertificate.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/externalcertificate.go index 09a0bdd1..834c87dc 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/externalcertificate.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/externalcertificate.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricca.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricca.go index 97f13e24..4a7750f2 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricca.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricca.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccaaffiliation.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccaaffiliation.go index 4f58f4e7..6ee44cf2 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccaaffiliation.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccaaffiliation.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccabccsp.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccabccsp.go index 3285bd2f..235a9f85 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccabccsp.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccabccsp.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccabccspsw.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccabccspsw.go index 89799b97..22145d2f 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccabccspsw.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccabccspsw.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccacfg.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccacfg.go index bdada19a..c09ff9f9 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccacfg.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccacfg.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccacfgaffilitions.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccacfgaffilitions.go index 08cc485e..089f2245 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccacfgaffilitions.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccacfgaffilitions.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccacfgidentities.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccacfgidentities.go index f1414605..e9cb0429 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccacfgidentities.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccacfgidentities.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccaclientauth.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccaclientauth.go deleted file mode 100644 index 748cd9f1..00000000 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccaclientauth.go +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright Kungfusoftware.es. All Rights Reserved. - * - * SPDX-License-Identifier: Apache-2.0 - */ - -package v1alpha1 - -// FabricCAClientAuthApplyConfiguration represents an declarative configuration of the FabricCAClientAuth type for use -// with apply. -type FabricCAClientAuthApplyConfiguration struct { - Type *string `json:"type,omitempty"` - CertFile []string `json:"cert_file,omitempty"` -} - -// FabricCAClientAuthApplyConfiguration constructs an declarative configuration of the FabricCAClientAuth type for use with -// apply. -func FabricCAClientAuth() *FabricCAClientAuthApplyConfiguration { - return &FabricCAClientAuthApplyConfiguration{} -} - -// WithType sets the Type field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Type field is set to the value of the last call. -func (b *FabricCAClientAuthApplyConfiguration) WithType(value string) *FabricCAClientAuthApplyConfiguration { - b.Type = &value - return b -} - -// WithCertFile adds the given value to the CertFile field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the CertFile field. -func (b *FabricCAClientAuthApplyConfiguration) WithCertFile(values ...string) *FabricCAClientAuthApplyConfiguration { - for i := range values { - b.CertFile = append(b.CertFile, values[i]) - } - return b -} diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccacrl.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccacrl.go index a5039735..7ce94181 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccacrl.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccacrl.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccacrypto.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccacrypto.go index ce01d3d4..cbe91559 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccacrypto.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccacrypto.go @@ -3,15 +3,17 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 // FabricCACryptoApplyConfiguration represents an declarative configuration of the FabricCACrypto type for use // with apply. type FabricCACryptoApplyConfiguration struct { - Key *string `json:"key,omitempty"` - Cert *string `json:"cert,omitempty"` - Chain *string `json:"chain,omitempty"` + Key *string `json:"key,omitempty"` + SecretRef *SecretRefApplyConfiguration `json:"secret,omitempty"` + Cert *string `json:"cert,omitempty"` + Chain *string `json:"chain,omitempty"` } // FabricCACryptoApplyConfiguration constructs an declarative configuration of the FabricCACrypto type for use with @@ -28,6 +30,14 @@ func (b *FabricCACryptoApplyConfiguration) WithKey(value string) *FabricCACrypto return b } +// WithSecretRef sets the SecretRef field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SecretRef field is set to the value of the last call. +func (b *FabricCACryptoApplyConfiguration) WithSecretRef(value *SecretRefApplyConfiguration) *FabricCACryptoApplyConfiguration { + b.SecretRef = value + return b +} + // WithCert sets the Cert field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Cert field is set to the value of the last call. diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccacsr.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccacsr.go index 36ef0ba0..e5c3049b 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccacsr.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccacsr.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccacsrca.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccacsrca.go index afa0af76..b6ed5b55 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccacsrca.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccacsrca.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccadatabase.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccadatabase.go index 2285642a..ae183ac2 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccadatabase.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccadatabase.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccaidentity.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccaidentity.go index 937d7c61..f7eed9de 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccaidentity.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccaidentity.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccaidentityattrs.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccaidentityattrs.go index 42003364..2f49dd4b 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccaidentityattrs.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccaidentityattrs.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccaintermediate.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccaintermediate.go index 4dd5a7ff..926b93e7 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccaintermediate.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccaintermediate.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccaintermediateparentserver.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccaintermediateparentserver.go index d71a75e5..74a7021b 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccaintermediateparentserver.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccaintermediateparentserver.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccaitemconf.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccaitemconf.go index d6e01168..df7aa4b3 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccaitemconf.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccaitemconf.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 @@ -20,7 +21,6 @@ type FabricCAItemConfApplyConfiguration struct { BCCSP *FabricCABCCSPApplyConfiguration `json:"bccsp,omitempty"` Affiliations []FabricCAAffiliationApplyConfiguration `json:"affiliations,omitempty"` CA *FabricCACryptoApplyConfiguration `json:"ca,omitempty"` - TlsCA *FabricTLSCACryptoApplyConfiguration `json:"tlsCa,omitempty"` } // FabricCAItemConfApplyConfiguration constructs an declarative configuration of the FabricCAItemConf type for use with @@ -121,11 +121,3 @@ func (b *FabricCAItemConfApplyConfiguration) WithCA(value *FabricCACryptoApplyCo b.CA = value return b } - -// WithTlsCA sets the TlsCA field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the TlsCA field is set to the value of the last call. -func (b *FabricCAItemConfApplyConfiguration) WithTlsCA(value *FabricTLSCACryptoApplyConfiguration) *FabricCAItemConfApplyConfiguration { - b.TlsCA = value - return b -} diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccametrics.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccametrics.go index 06c0d9bf..02111b7a 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccametrics.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccametrics.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccametricsstatsd.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccametricsstatsd.go index d5a76161..83c21532 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccametricsstatsd.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccametricsstatsd.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccanames.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccanames.go index cf296b73..451e7cfd 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccanames.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccanames.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccaregistry.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccaregistry.go index 855ed22a..bdbc4164 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccaregistry.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccaregistry.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccasigning.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccasigning.go index 79c3daf6..68c1243c 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccasigning.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccasigning.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccasigningdefault.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccasigningdefault.go index edec84b8..a053f2b2 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccasigningdefault.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccasigningdefault.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccasigningprofiles.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccasigningprofiles.go index 59d28128..e2c7bd3b 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccasigningprofiles.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccasigningprofiles.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccasigningsignprofile.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccasigningsignprofile.go index db05da10..2c1b9a8f 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccasigningsignprofile.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccasigningsignprofile.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccasigningsignprofileconstraint.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccasigningsignprofileconstraint.go index dff6f609..a19a0cf8 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccasigningsignprofileconstraint.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccasigningsignprofileconstraint.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccasigningtlsprofile.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccasigningtlsprofile.go index 8b77ff27..b2f2f39a 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccasigningtlsprofile.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccasigningtlsprofile.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccaspec.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccaspec.go index 491b691e..1673683b 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccaspec.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccaspec.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 @@ -13,12 +14,16 @@ import ( // FabricCASpecApplyConfiguration represents an declarative configuration of the FabricCASpec type for use // with apply. type FabricCASpecApplyConfiguration struct { + PodAnnotations map[string]string `json:"podAnnotations,omitempty"` + PodLabels map[string]string `json:"podLabels,omitempty"` Affinity *v1.Affinity `json:"affinity,omitempty"` Tolerations []v1.Toleration `json:"tolerations,omitempty"` ImagePullSecrets []v1.LocalObjectReference `json:"imagePullSecrets,omitempty"` NodeSelector *v1.NodeSelector `json:"nodeSelector,omitempty"` ServiceMonitor *ServiceMonitorApplyConfiguration `json:"serviceMonitor,omitempty"` + GatewayApi *FabricGatewayApiApplyConfiguration `json:"gatewayApi,omitempty"` Istio *FabricIstioApplyConfiguration `json:"istio,omitempty"` + Traefik *FabricTraefikApplyConfiguration `json:"traefik,omitempty"` Database *FabricCADatabaseApplyConfiguration `json:"db,omitempty"` Hosts []string `json:"hosts,omitempty"` Service *FabricCASpecServiceApplyConfiguration `json:"service,omitempty"` @@ -42,6 +47,34 @@ func FabricCASpec() *FabricCASpecApplyConfiguration { return &FabricCASpecApplyConfiguration{} } +// WithPodAnnotations puts the entries into the PodAnnotations field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the PodAnnotations field, +// overwriting an existing map entries in PodAnnotations field with the same key. +func (b *FabricCASpecApplyConfiguration) WithPodAnnotations(entries map[string]string) *FabricCASpecApplyConfiguration { + if b.PodAnnotations == nil && len(entries) > 0 { + b.PodAnnotations = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.PodAnnotations[k] = v + } + return b +} + +// WithPodLabels puts the entries into the PodLabels field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the PodLabels field, +// overwriting an existing map entries in PodLabels field with the same key. +func (b *FabricCASpecApplyConfiguration) WithPodLabels(entries map[string]string) *FabricCASpecApplyConfiguration { + if b.PodLabels == nil && len(entries) > 0 { + b.PodLabels = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.PodLabels[k] = v + } + return b +} + // WithAffinity sets the Affinity field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Affinity field is set to the value of the last call. @@ -86,6 +119,14 @@ func (b *FabricCASpecApplyConfiguration) WithServiceMonitor(value *ServiceMonito return b } +// WithGatewayApi sets the GatewayApi field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the GatewayApi field is set to the value of the last call. +func (b *FabricCASpecApplyConfiguration) WithGatewayApi(value *FabricGatewayApiApplyConfiguration) *FabricCASpecApplyConfiguration { + b.GatewayApi = value + return b +} + // WithIstio sets the Istio field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Istio field is set to the value of the last call. @@ -94,6 +135,14 @@ func (b *FabricCASpecApplyConfiguration) WithIstio(value *FabricIstioApplyConfig return b } +// WithTraefik sets the Traefik field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Traefik field is set to the value of the last call. +func (b *FabricCASpecApplyConfiguration) WithTraefik(value *FabricTraefikApplyConfiguration) *FabricCASpecApplyConfiguration { + b.Traefik = value + return b +} + // WithDatabase sets the Database field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Database field is set to the value of the last call. diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccaspecservice.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccaspecservice.go index 6f51b31e..8785cec3 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccaspecservice.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccaspecservice.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccastatus.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccastatus.go index d360a125..721783e7 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccastatus.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccastatus.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccasubject.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccasubject.go index a808b67f..5b8ff300 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccasubject.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccasubject.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccatlsconf.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccatlsconf.go index 33a8f492..ac068f37 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccatlsconf.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabriccatlsconf.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricchaincode.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricchaincode.go index 75980be9..fffe668d 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricchaincode.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricchaincode.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricchaincodespec.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricchaincodespec.go index 26302aab..ae45f3cb 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricchaincodespec.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricchaincodespec.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 @@ -13,16 +14,24 @@ import ( // FabricChaincodeSpecApplyConfiguration represents an declarative configuration of the FabricChaincodeSpec type for use // with apply. type FabricChaincodeSpecApplyConfiguration struct { - Image *string `json:"image,omitempty"` - ImagePullPolicy *v1.PullPolicy `json:"imagePullPolicy,omitempty"` - PackageID *string `json:"packageId,omitempty"` - ImagePullSecrets []v1.LocalObjectReference `json:"imagePullSecrets,omitempty"` - Affinity *v1.Affinity `json:"affinity,omitempty"` - Tolerations []v1.Toleration `json:"tolerations,omitempty"` - Resources *v1.ResourceRequirements `json:"resources,omitempty"` - Credentials *TLSApplyConfiguration `json:"credentials,omitempty"` - Replicas *int `json:"replicas,omitempty"` - Env []v1.EnvVar `json:"env,omitempty"` + Annotations map[string]string `json:"annotations,omitempty"` + Labels map[string]string `json:"labels,omitempty"` + PodAnnotations map[string]string `json:"podAnnotations,omitempty"` + PodLabels map[string]string `json:"podLabels,omitempty"` + Image *string `json:"image,omitempty"` + ImagePullPolicy *v1.PullPolicy `json:"imagePullPolicy,omitempty"` + PackageID *string `json:"packageId,omitempty"` + ImagePullSecrets []v1.LocalObjectReference `json:"imagePullSecrets,omitempty"` + Command []string `json:"command,omitempty"` + Args []string `json:"args,omitempty"` + Affinity *v1.Affinity `json:"affinity,omitempty"` + Tolerations []v1.Toleration `json:"tolerations,omitempty"` + Resources *v1.ResourceRequirements `json:"resources,omitempty"` + Credentials *TLSApplyConfiguration `json:"credentials,omitempty"` + Replicas *int `json:"replicas,omitempty"` + Env []v1.EnvVar `json:"env,omitempty"` + ChaincodeServerPort *int `json:"chaincodeServerPort,omitempty"` + MspID *string `json:"mspID,omitempty"` } // FabricChaincodeSpecApplyConfiguration constructs an declarative configuration of the FabricChaincodeSpec type for use with @@ -31,6 +40,62 @@ func FabricChaincodeSpec() *FabricChaincodeSpecApplyConfiguration { return &FabricChaincodeSpecApplyConfiguration{} } +// WithAnnotations puts the entries into the Annotations field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Annotations field, +// overwriting an existing map entries in Annotations field with the same key. +func (b *FabricChaincodeSpecApplyConfiguration) WithAnnotations(entries map[string]string) *FabricChaincodeSpecApplyConfiguration { + if b.Annotations == nil && len(entries) > 0 { + b.Annotations = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.Annotations[k] = v + } + return b +} + +// WithLabels puts the entries into the Labels field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Labels field, +// overwriting an existing map entries in Labels field with the same key. +func (b *FabricChaincodeSpecApplyConfiguration) WithLabels(entries map[string]string) *FabricChaincodeSpecApplyConfiguration { + if b.Labels == nil && len(entries) > 0 { + b.Labels = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.Labels[k] = v + } + return b +} + +// WithPodAnnotations puts the entries into the PodAnnotations field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the PodAnnotations field, +// overwriting an existing map entries in PodAnnotations field with the same key. +func (b *FabricChaincodeSpecApplyConfiguration) WithPodAnnotations(entries map[string]string) *FabricChaincodeSpecApplyConfiguration { + if b.PodAnnotations == nil && len(entries) > 0 { + b.PodAnnotations = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.PodAnnotations[k] = v + } + return b +} + +// WithPodLabels puts the entries into the PodLabels field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the PodLabels field, +// overwriting an existing map entries in PodLabels field with the same key. +func (b *FabricChaincodeSpecApplyConfiguration) WithPodLabels(entries map[string]string) *FabricChaincodeSpecApplyConfiguration { + if b.PodLabels == nil && len(entries) > 0 { + b.PodLabels = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.PodLabels[k] = v + } + return b +} + // WithImage sets the Image field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Image field is set to the value of the last call. @@ -65,6 +130,26 @@ func (b *FabricChaincodeSpecApplyConfiguration) WithImagePullSecrets(values ...v return b } +// WithCommand adds the given value to the Command field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Command field. +func (b *FabricChaincodeSpecApplyConfiguration) WithCommand(values ...string) *FabricChaincodeSpecApplyConfiguration { + for i := range values { + b.Command = append(b.Command, values[i]) + } + return b +} + +// WithArgs adds the given value to the Args field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Args field. +func (b *FabricChaincodeSpecApplyConfiguration) WithArgs(values ...string) *FabricChaincodeSpecApplyConfiguration { + for i := range values { + b.Args = append(b.Args, values[i]) + } + return b +} + // WithAffinity sets the Affinity field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Affinity field is set to the value of the last call. @@ -116,3 +201,19 @@ func (b *FabricChaincodeSpecApplyConfiguration) WithEnv(values ...v1.EnvVar) *Fa } return b } + +// WithChaincodeServerPort sets the ChaincodeServerPort field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ChaincodeServerPort field is set to the value of the last call. +func (b *FabricChaincodeSpecApplyConfiguration) WithChaincodeServerPort(value int) *FabricChaincodeSpecApplyConfiguration { + b.ChaincodeServerPort = &value + return b +} + +// WithMspID sets the MspID field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the MspID field is set to the value of the last call. +func (b *FabricChaincodeSpecApplyConfiguration) WithMspID(value string) *FabricChaincodeSpecApplyConfiguration { + b.MspID = &value + return b +} diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricchaincodestatus.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricchaincodestatus.go index 19dea8d3..fe67566e 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricchaincodestatus.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricchaincodestatus.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricchaincodetemplate.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricchaincodetemplate.go new file mode 100644 index 00000000..c12d6a0c --- /dev/null +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricchaincodetemplate.go @@ -0,0 +1,208 @@ +/* + * Copyright Kungfusoftware.es. All Rights Reserved. + * + * SPDX-License-Identifier: Apache-2.0 + */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + v1 "k8s.io/client-go/applyconfigurations/meta/v1" +) + +// FabricChaincodeTemplateApplyConfiguration represents an declarative configuration of the FabricChaincodeTemplate type for use +// with apply. +type FabricChaincodeTemplateApplyConfiguration struct { + v1.TypeMetaApplyConfiguration `json:",inline"` + *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *FabricChaincodeTemplateSpecApplyConfiguration `json:"spec,omitempty"` + Status *FabricChaincodeTemplateStatusApplyConfiguration `json:"status,omitempty"` +} + +// FabricChaincodeTemplate constructs an declarative configuration of the FabricChaincodeTemplate type for use with +// apply. +func FabricChaincodeTemplate(name, namespace string) *FabricChaincodeTemplateApplyConfiguration { + b := &FabricChaincodeTemplateApplyConfiguration{} + b.WithName(name) + b.WithNamespace(namespace) + b.WithKind("FabricChaincodeTemplate") + b.WithAPIVersion("hlf.kungfusoftware.es/v1alpha1") + return b +} + +// WithKind sets the Kind field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Kind field is set to the value of the last call. +func (b *FabricChaincodeTemplateApplyConfiguration) WithKind(value string) *FabricChaincodeTemplateApplyConfiguration { + b.Kind = &value + return b +} + +// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the APIVersion field is set to the value of the last call. +func (b *FabricChaincodeTemplateApplyConfiguration) WithAPIVersion(value string) *FabricChaincodeTemplateApplyConfiguration { + b.APIVersion = &value + return b +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *FabricChaincodeTemplateApplyConfiguration) WithName(value string) *FabricChaincodeTemplateApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Name = &value + return b +} + +// WithGenerateName sets the GenerateName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the GenerateName field is set to the value of the last call. +func (b *FabricChaincodeTemplateApplyConfiguration) WithGenerateName(value string) *FabricChaincodeTemplateApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.GenerateName = &value + return b +} + +// WithNamespace sets the Namespace field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Namespace field is set to the value of the last call. +func (b *FabricChaincodeTemplateApplyConfiguration) WithNamespace(value string) *FabricChaincodeTemplateApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Namespace = &value + return b +} + +// WithUID sets the UID field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the UID field is set to the value of the last call. +func (b *FabricChaincodeTemplateApplyConfiguration) WithUID(value types.UID) *FabricChaincodeTemplateApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.UID = &value + return b +} + +// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ResourceVersion field is set to the value of the last call. +func (b *FabricChaincodeTemplateApplyConfiguration) WithResourceVersion(value string) *FabricChaincodeTemplateApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ResourceVersion = &value + return b +} + +// WithGeneration sets the Generation field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Generation field is set to the value of the last call. +func (b *FabricChaincodeTemplateApplyConfiguration) WithGeneration(value int64) *FabricChaincodeTemplateApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Generation = &value + return b +} + +// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the CreationTimestamp field is set to the value of the last call. +func (b *FabricChaincodeTemplateApplyConfiguration) WithCreationTimestamp(value metav1.Time) *FabricChaincodeTemplateApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.CreationTimestamp = &value + return b +} + +// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionTimestamp field is set to the value of the last call. +func (b *FabricChaincodeTemplateApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *FabricChaincodeTemplateApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.DeletionTimestamp = &value + return b +} + +// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. +func (b *FabricChaincodeTemplateApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *FabricChaincodeTemplateApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.DeletionGracePeriodSeconds = &value + return b +} + +// WithLabels puts the entries into the Labels field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Labels field, +// overwriting an existing map entries in Labels field with the same key. +func (b *FabricChaincodeTemplateApplyConfiguration) WithLabels(entries map[string]string) *FabricChaincodeTemplateApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.Labels == nil && len(entries) > 0 { + b.Labels = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.Labels[k] = v + } + return b +} + +// WithAnnotations puts the entries into the Annotations field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Annotations field, +// overwriting an existing map entries in Annotations field with the same key. +func (b *FabricChaincodeTemplateApplyConfiguration) WithAnnotations(entries map[string]string) *FabricChaincodeTemplateApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.Annotations == nil && len(entries) > 0 { + b.Annotations = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.Annotations[k] = v + } + return b +} + +// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the OwnerReferences field. +func (b *FabricChaincodeTemplateApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *FabricChaincodeTemplateApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + if values[i] == nil { + panic("nil value passed to WithOwnerReferences") + } + b.OwnerReferences = append(b.OwnerReferences, *values[i]) + } + return b +} + +// WithFinalizers adds the given value to the Finalizers field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Finalizers field. +func (b *FabricChaincodeTemplateApplyConfiguration) WithFinalizers(values ...string) *FabricChaincodeTemplateApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + b.Finalizers = append(b.Finalizers, values[i]) + } + return b +} + +func (b *FabricChaincodeTemplateApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { + if b.ObjectMetaApplyConfiguration == nil { + b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + } +} + +// WithSpec sets the Spec field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Spec field is set to the value of the last call. +func (b *FabricChaincodeTemplateApplyConfiguration) WithSpec(value *FabricChaincodeTemplateSpecApplyConfiguration) *FabricChaincodeTemplateApplyConfiguration { + b.Spec = value + return b +} + +// WithStatus sets the Status field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Status field is set to the value of the last call. +func (b *FabricChaincodeTemplateApplyConfiguration) WithStatus(value *FabricChaincodeTemplateStatusApplyConfiguration) *FabricChaincodeTemplateApplyConfiguration { + b.Status = value + return b +} diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricchaincodetemplatespec.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricchaincodetemplatespec.go new file mode 100644 index 00000000..b81c693f --- /dev/null +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricchaincodetemplatespec.go @@ -0,0 +1,201 @@ +/* + * Copyright Kungfusoftware.es. All Rights Reserved. + * + * SPDX-License-Identifier: Apache-2.0 + */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + v1 "k8s.io/api/core/v1" +) + +// FabricChaincodeTemplateSpecApplyConfiguration represents an declarative configuration of the FabricChaincodeTemplateSpec type for use +// with apply. +type FabricChaincodeTemplateSpecApplyConfiguration struct { + Annotations map[string]string `json:"annotations,omitempty"` + Labels map[string]string `json:"labels,omitempty"` + PodAnnotations map[string]string `json:"podAnnotations,omitempty"` + PodLabels map[string]string `json:"podLabels,omitempty"` + ImagePullPolicy *v1.PullPolicy `json:"imagePullPolicy,omitempty"` + ImagePullSecrets []v1.LocalObjectReference `json:"imagePullSecrets,omitempty"` + Command []string `json:"command,omitempty"` + Args []string `json:"args,omitempty"` + Affinity *v1.Affinity `json:"affinity,omitempty"` + Tolerations []v1.Toleration `json:"tolerations,omitempty"` + Resources *v1.ResourceRequirements `json:"resources,omitempty"` + Credentials *TLSApplyConfiguration `json:"credentials,omitempty"` + Replicas *int `json:"replicas,omitempty"` + Env []v1.EnvVar `json:"env,omitempty"` + ChaincodeServerPort *int `json:"chaincodeServerPort,omitempty"` + MspID *string `json:"mspID,omitempty"` +} + +// FabricChaincodeTemplateSpecApplyConfiguration constructs an declarative configuration of the FabricChaincodeTemplateSpec type for use with +// apply. +func FabricChaincodeTemplateSpec() *FabricChaincodeTemplateSpecApplyConfiguration { + return &FabricChaincodeTemplateSpecApplyConfiguration{} +} + +// WithAnnotations puts the entries into the Annotations field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Annotations field, +// overwriting an existing map entries in Annotations field with the same key. +func (b *FabricChaincodeTemplateSpecApplyConfiguration) WithAnnotations(entries map[string]string) *FabricChaincodeTemplateSpecApplyConfiguration { + if b.Annotations == nil && len(entries) > 0 { + b.Annotations = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.Annotations[k] = v + } + return b +} + +// WithLabels puts the entries into the Labels field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Labels field, +// overwriting an existing map entries in Labels field with the same key. +func (b *FabricChaincodeTemplateSpecApplyConfiguration) WithLabels(entries map[string]string) *FabricChaincodeTemplateSpecApplyConfiguration { + if b.Labels == nil && len(entries) > 0 { + b.Labels = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.Labels[k] = v + } + return b +} + +// WithPodAnnotations puts the entries into the PodAnnotations field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the PodAnnotations field, +// overwriting an existing map entries in PodAnnotations field with the same key. +func (b *FabricChaincodeTemplateSpecApplyConfiguration) WithPodAnnotations(entries map[string]string) *FabricChaincodeTemplateSpecApplyConfiguration { + if b.PodAnnotations == nil && len(entries) > 0 { + b.PodAnnotations = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.PodAnnotations[k] = v + } + return b +} + +// WithPodLabels puts the entries into the PodLabels field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the PodLabels field, +// overwriting an existing map entries in PodLabels field with the same key. +func (b *FabricChaincodeTemplateSpecApplyConfiguration) WithPodLabels(entries map[string]string) *FabricChaincodeTemplateSpecApplyConfiguration { + if b.PodLabels == nil && len(entries) > 0 { + b.PodLabels = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.PodLabels[k] = v + } + return b +} + +// WithImagePullPolicy sets the ImagePullPolicy field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ImagePullPolicy field is set to the value of the last call. +func (b *FabricChaincodeTemplateSpecApplyConfiguration) WithImagePullPolicy(value v1.PullPolicy) *FabricChaincodeTemplateSpecApplyConfiguration { + b.ImagePullPolicy = &value + return b +} + +// WithImagePullSecrets adds the given value to the ImagePullSecrets field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the ImagePullSecrets field. +func (b *FabricChaincodeTemplateSpecApplyConfiguration) WithImagePullSecrets(values ...v1.LocalObjectReference) *FabricChaincodeTemplateSpecApplyConfiguration { + for i := range values { + b.ImagePullSecrets = append(b.ImagePullSecrets, values[i]) + } + return b +} + +// WithCommand adds the given value to the Command field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Command field. +func (b *FabricChaincodeTemplateSpecApplyConfiguration) WithCommand(values ...string) *FabricChaincodeTemplateSpecApplyConfiguration { + for i := range values { + b.Command = append(b.Command, values[i]) + } + return b +} + +// WithArgs adds the given value to the Args field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Args field. +func (b *FabricChaincodeTemplateSpecApplyConfiguration) WithArgs(values ...string) *FabricChaincodeTemplateSpecApplyConfiguration { + for i := range values { + b.Args = append(b.Args, values[i]) + } + return b +} + +// WithAffinity sets the Affinity field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Affinity field is set to the value of the last call. +func (b *FabricChaincodeTemplateSpecApplyConfiguration) WithAffinity(value v1.Affinity) *FabricChaincodeTemplateSpecApplyConfiguration { + b.Affinity = &value + return b +} + +// WithTolerations adds the given value to the Tolerations field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Tolerations field. +func (b *FabricChaincodeTemplateSpecApplyConfiguration) WithTolerations(values ...v1.Toleration) *FabricChaincodeTemplateSpecApplyConfiguration { + for i := range values { + b.Tolerations = append(b.Tolerations, values[i]) + } + return b +} + +// WithResources sets the Resources field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Resources field is set to the value of the last call. +func (b *FabricChaincodeTemplateSpecApplyConfiguration) WithResources(value v1.ResourceRequirements) *FabricChaincodeTemplateSpecApplyConfiguration { + b.Resources = &value + return b +} + +// WithCredentials sets the Credentials field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Credentials field is set to the value of the last call. +func (b *FabricChaincodeTemplateSpecApplyConfiguration) WithCredentials(value *TLSApplyConfiguration) *FabricChaincodeTemplateSpecApplyConfiguration { + b.Credentials = value + return b +} + +// WithReplicas sets the Replicas field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Replicas field is set to the value of the last call. +func (b *FabricChaincodeTemplateSpecApplyConfiguration) WithReplicas(value int) *FabricChaincodeTemplateSpecApplyConfiguration { + b.Replicas = &value + return b +} + +// WithEnv adds the given value to the Env field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Env field. +func (b *FabricChaincodeTemplateSpecApplyConfiguration) WithEnv(values ...v1.EnvVar) *FabricChaincodeTemplateSpecApplyConfiguration { + for i := range values { + b.Env = append(b.Env, values[i]) + } + return b +} + +// WithChaincodeServerPort sets the ChaincodeServerPort field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ChaincodeServerPort field is set to the value of the last call. +func (b *FabricChaincodeTemplateSpecApplyConfiguration) WithChaincodeServerPort(value int) *FabricChaincodeTemplateSpecApplyConfiguration { + b.ChaincodeServerPort = &value + return b +} + +// WithMspID sets the MspID field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the MspID field is set to the value of the last call. +func (b *FabricChaincodeTemplateSpecApplyConfiguration) WithMspID(value string) *FabricChaincodeTemplateSpecApplyConfiguration { + b.MspID = &value + return b +} diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricchaincodetemplatestatus.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricchaincodetemplatestatus.go new file mode 100644 index 00000000..8d575ac9 --- /dev/null +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricchaincodetemplatestatus.go @@ -0,0 +1,51 @@ +/* + * Copyright Kungfusoftware.es. All Rights Reserved. + * + * SPDX-License-Identifier: Apache-2.0 + */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + v1alpha1 "github.com/kfsoftware/hlf-operator/api/hlf.kungfusoftware.es/v1alpha1" + status "github.com/kfsoftware/hlf-operator/pkg/status" +) + +// FabricChaincodeTemplateStatusApplyConfiguration represents an declarative configuration of the FabricChaincodeTemplateStatus type for use +// with apply. +type FabricChaincodeTemplateStatusApplyConfiguration struct { + Conditions *status.Conditions `json:"conditions,omitempty"` + Message *string `json:"message,omitempty"` + Status *v1alpha1.DeploymentStatus `json:"status,omitempty"` +} + +// FabricChaincodeTemplateStatusApplyConfiguration constructs an declarative configuration of the FabricChaincodeTemplateStatus type for use with +// apply. +func FabricChaincodeTemplateStatus() *FabricChaincodeTemplateStatusApplyConfiguration { + return &FabricChaincodeTemplateStatusApplyConfiguration{} +} + +// WithConditions sets the Conditions field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Conditions field is set to the value of the last call. +func (b *FabricChaincodeTemplateStatusApplyConfiguration) WithConditions(value status.Conditions) *FabricChaincodeTemplateStatusApplyConfiguration { + b.Conditions = &value + return b +} + +// WithMessage sets the Message field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Message field is set to the value of the last call. +func (b *FabricChaincodeTemplateStatusApplyConfiguration) WithMessage(value string) *FabricChaincodeTemplateStatusApplyConfiguration { + b.Message = &value + return b +} + +// WithStatus sets the Status field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Status field is set to the value of the last call. +func (b *FabricChaincodeTemplateStatusApplyConfiguration) WithStatus(value v1alpha1.DeploymentStatus) *FabricChaincodeTemplateStatusApplyConfiguration { + b.Status = &value + return b +} diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricexplorer.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricexplorer.go index 5f9ebf12..02f14100 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricexplorer.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricexplorer.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricexplorerspec.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricexplorerspec.go index f4b820b0..fe8a0e6e 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricexplorerspec.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricexplorerspec.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricexplorerstatus.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricexplorerstatus.go index 5ca19d56..d84c1507 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricexplorerstatus.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricexplorerstatus.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricfollowerchannel.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricfollowerchannel.go index 92ddad70..84bfe0fd 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricfollowerchannel.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricfollowerchannel.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricfollowerchannelanchorpeer.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricfollowerchannelanchorpeer.go index d3cb6533..48fa304e 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricfollowerchannelanchorpeer.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricfollowerchannelanchorpeer.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricfollowerchannelexternalpeer.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricfollowerchannelexternalpeer.go index 2f6130a7..3660a374 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricfollowerchannelexternalpeer.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricfollowerchannelexternalpeer.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricfollowerchannelorderer.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricfollowerchannelorderer.go index 3a39301b..41ef27bd 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricfollowerchannelorderer.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricfollowerchannelorderer.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricfollowerchannelpeer.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricfollowerchannelpeer.go index b5264f9e..5b967baf 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricfollowerchannelpeer.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricfollowerchannelpeer.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricfollowerchannelspec.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricfollowerchannelspec.go index 63c5211b..d8167b40 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricfollowerchannelspec.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricfollowerchannelspec.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricfollowerchannelstatus.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricfollowerchannelstatus.go index aee47044..8a15efa9 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricfollowerchannelstatus.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricfollowerchannelstatus.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricfsserver.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricfsserver.go index 69e67c11..428a823e 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricfsserver.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricfsserver.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricgatewayapi.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricgatewayapi.go new file mode 100644 index 00000000..1a58250c --- /dev/null +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricgatewayapi.go @@ -0,0 +1,57 @@ +/* + * Copyright Kungfusoftware.es. All Rights Reserved. + * + * SPDX-License-Identifier: Apache-2.0 + */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +// FabricGatewayApiApplyConfiguration represents an declarative configuration of the FabricGatewayApi type for use +// with apply. +type FabricGatewayApiApplyConfiguration struct { + Port *int `json:"port,omitempty"` + Hosts []string `json:"hosts,omitempty"` + GatewayName *string `json:"gatewayName,omitempty"` + GatewayNamespace *string `json:"gatewayNamespace,omitempty"` +} + +// FabricGatewayApiApplyConfiguration constructs an declarative configuration of the FabricGatewayApi type for use with +// apply. +func FabricGatewayApi() *FabricGatewayApiApplyConfiguration { + return &FabricGatewayApiApplyConfiguration{} +} + +// WithPort sets the Port field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Port field is set to the value of the last call. +func (b *FabricGatewayApiApplyConfiguration) WithPort(value int) *FabricGatewayApiApplyConfiguration { + b.Port = &value + return b +} + +// WithHosts adds the given value to the Hosts field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Hosts field. +func (b *FabricGatewayApiApplyConfiguration) WithHosts(values ...string) *FabricGatewayApiApplyConfiguration { + for i := range values { + b.Hosts = append(b.Hosts, values[i]) + } + return b +} + +// WithGatewayName sets the GatewayName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the GatewayName field is set to the value of the last call. +func (b *FabricGatewayApiApplyConfiguration) WithGatewayName(value string) *FabricGatewayApiApplyConfiguration { + b.GatewayName = &value + return b +} + +// WithGatewayNamespace sets the GatewayNamespace field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the GatewayNamespace field is set to the value of the last call. +func (b *FabricGatewayApiApplyConfiguration) WithGatewayNamespace(value string) *FabricGatewayApiApplyConfiguration { + b.GatewayNamespace = &value + return b +} diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricidentity.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricidentity.go index 4c14ccd5..d91b76c6 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricidentity.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricidentity.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricidentityregister.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricidentityregister.go index 198eff50..068834f0 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricidentityregister.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricidentityregister.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricidentityspec.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricidentityspec.go index 31dc99cc..9867eb89 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricidentityspec.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricidentityspec.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricidentitystatus.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricidentitystatus.go index 64b624c2..79db57e3 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricidentitystatus.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricidentitystatus.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricistio.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricistio.go index efb790d4..681989a3 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricistio.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricistio.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricmainchannel.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricmainchannel.go index f9be4689..9fc20685 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricmainchannel.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricmainchannel.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricmainchanneladminordererorganizationspec.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricmainchanneladminordererorganizationspec.go index 3d933bd2..4038c56e 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricmainchanneladminordererorganizationspec.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricmainchanneladminordererorganizationspec.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricmainchanneladminpeerorganizationspec.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricmainchanneladminpeerorganizationspec.go index 0847b3cd..5ae11b84 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricmainchanneladminpeerorganizationspec.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricmainchanneladminpeerorganizationspec.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricmainchannelapplicationconfig.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricmainchannelapplicationconfig.go index f188ae59..af6e4f41 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricmainchannelapplicationconfig.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricmainchannelapplicationconfig.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricmainchannelconfig.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricmainchannelconfig.go index a8d31d2d..d3d55d4e 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricmainchannelconfig.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricmainchannelconfig.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricmainchannelconsenter.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricmainchannelconsenter.go index 3691311f..01624a75 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricmainchannelconsenter.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricmainchannelconsenter.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricmainchanneletcdraft.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricmainchanneletcdraft.go index c791807a..299fa1d5 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricmainchanneletcdraft.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricmainchanneletcdraft.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricmainchanneletcdraftoptions.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricmainchanneletcdraftoptions.go index 4e1ba180..7cc02eb0 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricmainchanneletcdraftoptions.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricmainchanneletcdraftoptions.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricmainchannelexternalorderernode.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricmainchannelexternalorderernode.go index d97c4a06..9e0a994d 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricmainchannelexternalorderernode.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricmainchannelexternalorderernode.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricmainchannelexternalordererorganization.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricmainchannelexternalordererorganization.go index 93640ec9..a4c2d4e5 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricmainchannelexternalordererorganization.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricmainchannelexternalordererorganization.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricmainchannelexternalpeerorganization.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricmainchannelexternalpeerorganization.go index 26de2cdc..9e71044a 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricmainchannelexternalpeerorganization.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricmainchannelexternalpeerorganization.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricmainchannelidentity.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricmainchannelidentity.go index e21b16c1..84ec1e4b 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricmainchannelidentity.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricmainchannelidentity.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricmainchannelordererbatchsize.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricmainchannelordererbatchsize.go index ffd4ff0b..dc58e7fd 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricmainchannelordererbatchsize.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricmainchannelordererbatchsize.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricmainchannelordererconfig.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricmainchannelordererconfig.go index 869500fc..429840ad 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricmainchannelordererconfig.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricmainchannelordererconfig.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricmainchannelorderernode.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricmainchannelorderernode.go index 34f23247..6e60bf1f 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricmainchannelorderernode.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricmainchannelorderernode.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricmainchannelordererorganization.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricmainchannelordererorganization.go index 96339003..336d728d 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricmainchannelordererorganization.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricmainchannelordererorganization.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricmainchannelpeerorganization.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricmainchannelpeerorganization.go index b05b785e..fd7002ea 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricmainchannelpeerorganization.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricmainchannelpeerorganization.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricmainchannelpoliciesconfig.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricmainchannelpoliciesconfig.go index bfe6dfa6..323ed3d5 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricmainchannelpoliciesconfig.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricmainchannelpoliciesconfig.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricmainchannelspec.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricmainchannelspec.go index a43d384b..282568b1 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricmainchannelspec.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricmainchannelspec.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricmainchannelstatus.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricmainchannelstatus.go index f83a0b6e..0228dd31 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricmainchannelstatus.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricmainchannelstatus.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricnetworkconfig.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricnetworkconfig.go index de02e6ae..8713dc7f 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricnetworkconfig.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricnetworkconfig.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricnetworkconfigca.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricnetworkconfigca.go new file mode 100644 index 00000000..43965cf8 --- /dev/null +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricnetworkconfigca.go @@ -0,0 +1,37 @@ +/* + * Copyright Kungfusoftware.es. All Rights Reserved. + * + * SPDX-License-Identifier: Apache-2.0 + */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +// FabricNetworkConfigCAApplyConfiguration represents an declarative configuration of the FabricNetworkConfigCA type for use +// with apply. +type FabricNetworkConfigCAApplyConfiguration struct { + Name *string `json:"name,omitempty"` + Namespace *string `json:"namespace,omitempty"` +} + +// FabricNetworkConfigCAApplyConfiguration constructs an declarative configuration of the FabricNetworkConfigCA type for use with +// apply. +func FabricNetworkConfigCA() *FabricNetworkConfigCAApplyConfiguration { + return &FabricNetworkConfigCAApplyConfiguration{} +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *FabricNetworkConfigCAApplyConfiguration) WithName(value string) *FabricNetworkConfigCAApplyConfiguration { + b.Name = &value + return b +} + +// WithNamespace sets the Namespace field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Namespace field is set to the value of the last call. +func (b *FabricNetworkConfigCAApplyConfiguration) WithNamespace(value string) *FabricNetworkConfigCAApplyConfiguration { + b.Namespace = &value + return b +} diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricnetworkconfigexternalorderer.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricnetworkconfigexternalorderer.go new file mode 100644 index 00000000..2f3e30f2 --- /dev/null +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricnetworkconfigexternalorderer.go @@ -0,0 +1,55 @@ +/* + * Copyright Kungfusoftware.es. All Rights Reserved. + * + * SPDX-License-Identifier: Apache-2.0 + */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +// FabricNetworkConfigExternalOrdererApplyConfiguration represents an declarative configuration of the FabricNetworkConfigExternalOrderer type for use +// with apply. +type FabricNetworkConfigExternalOrdererApplyConfiguration struct { + Name *string `json:"name,omitempty"` + URL *string `json:"url,omitempty"` + TLSCACert *string `json:"tlsCACert,omitempty"` + MSPID *string `json:"mspID,omitempty"` +} + +// FabricNetworkConfigExternalOrdererApplyConfiguration constructs an declarative configuration of the FabricNetworkConfigExternalOrderer type for use with +// apply. +func FabricNetworkConfigExternalOrderer() *FabricNetworkConfigExternalOrdererApplyConfiguration { + return &FabricNetworkConfigExternalOrdererApplyConfiguration{} +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *FabricNetworkConfigExternalOrdererApplyConfiguration) WithName(value string) *FabricNetworkConfigExternalOrdererApplyConfiguration { + b.Name = &value + return b +} + +// WithURL sets the URL field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the URL field is set to the value of the last call. +func (b *FabricNetworkConfigExternalOrdererApplyConfiguration) WithURL(value string) *FabricNetworkConfigExternalOrdererApplyConfiguration { + b.URL = &value + return b +} + +// WithTLSCACert sets the TLSCACert field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the TLSCACert field is set to the value of the last call. +func (b *FabricNetworkConfigExternalOrdererApplyConfiguration) WithTLSCACert(value string) *FabricNetworkConfigExternalOrdererApplyConfiguration { + b.TLSCACert = &value + return b +} + +// WithMSPID sets the MSPID field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the MSPID field is set to the value of the last call. +func (b *FabricNetworkConfigExternalOrdererApplyConfiguration) WithMSPID(value string) *FabricNetworkConfigExternalOrdererApplyConfiguration { + b.MSPID = &value + return b +} diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricnetworkconfigexternalpeer.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricnetworkconfigexternalpeer.go new file mode 100644 index 00000000..cbafc17c --- /dev/null +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricnetworkconfigexternalpeer.go @@ -0,0 +1,55 @@ +/* + * Copyright Kungfusoftware.es. All Rights Reserved. + * + * SPDX-License-Identifier: Apache-2.0 + */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +// FabricNetworkConfigExternalPeerApplyConfiguration represents an declarative configuration of the FabricNetworkConfigExternalPeer type for use +// with apply. +type FabricNetworkConfigExternalPeerApplyConfiguration struct { + Name *string `json:"name,omitempty"` + URL *string `json:"url,omitempty"` + TLSCACert *string `json:"tlsCACert,omitempty"` + MSPID *string `json:"mspID,omitempty"` +} + +// FabricNetworkConfigExternalPeerApplyConfiguration constructs an declarative configuration of the FabricNetworkConfigExternalPeer type for use with +// apply. +func FabricNetworkConfigExternalPeer() *FabricNetworkConfigExternalPeerApplyConfiguration { + return &FabricNetworkConfigExternalPeerApplyConfiguration{} +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *FabricNetworkConfigExternalPeerApplyConfiguration) WithName(value string) *FabricNetworkConfigExternalPeerApplyConfiguration { + b.Name = &value + return b +} + +// WithURL sets the URL field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the URL field is set to the value of the last call. +func (b *FabricNetworkConfigExternalPeerApplyConfiguration) WithURL(value string) *FabricNetworkConfigExternalPeerApplyConfiguration { + b.URL = &value + return b +} + +// WithTLSCACert sets the TLSCACert field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the TLSCACert field is set to the value of the last call. +func (b *FabricNetworkConfigExternalPeerApplyConfiguration) WithTLSCACert(value string) *FabricNetworkConfigExternalPeerApplyConfiguration { + b.TLSCACert = &value + return b +} + +// WithMSPID sets the MSPID field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the MSPID field is set to the value of the last call. +func (b *FabricNetworkConfigExternalPeerApplyConfiguration) WithMSPID(value string) *FabricNetworkConfigExternalPeerApplyConfiguration { + b.MSPID = &value + return b +} diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricnetworkconfigidentity.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricnetworkconfigidentity.go index 97bdfa67..5ba54fc9 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricnetworkconfigidentity.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricnetworkconfigidentity.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricnetworkconfigorganization.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricnetworkconfigorganization.go new file mode 100644 index 00000000..48dc749c --- /dev/null +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricnetworkconfigorganization.go @@ -0,0 +1,33 @@ +/* + * Copyright Kungfusoftware.es. All Rights Reserved. + * + * SPDX-License-Identifier: Apache-2.0 + */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +// FabricNetworkConfigOrganizationApplyConfiguration represents an declarative configuration of the FabricNetworkConfigOrganization type for use +// with apply. +type FabricNetworkConfigOrganizationApplyConfiguration struct { + Peers []FabricNetworkConfigOrgPeerApplyConfiguration `json:"peers,omitempty"` +} + +// FabricNetworkConfigOrganizationApplyConfiguration constructs an declarative configuration of the FabricNetworkConfigOrganization type for use with +// apply. +func FabricNetworkConfigOrganization() *FabricNetworkConfigOrganizationApplyConfiguration { + return &FabricNetworkConfigOrganizationApplyConfiguration{} +} + +// WithPeers adds the given value to the Peers field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Peers field. +func (b *FabricNetworkConfigOrganizationApplyConfiguration) WithPeers(values ...*FabricNetworkConfigOrgPeerApplyConfiguration) *FabricNetworkConfigOrganizationApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithPeers") + } + b.Peers = append(b.Peers, *values[i]) + } + return b +} diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricnetworkconfigorgpeer.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricnetworkconfigorgpeer.go new file mode 100644 index 00000000..50f5c471 --- /dev/null +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricnetworkconfigorgpeer.go @@ -0,0 +1,37 @@ +/* + * Copyright Kungfusoftware.es. All Rights Reserved. + * + * SPDX-License-Identifier: Apache-2.0 + */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +// FabricNetworkConfigOrgPeerApplyConfiguration represents an declarative configuration of the FabricNetworkConfigOrgPeer type for use +// with apply. +type FabricNetworkConfigOrgPeerApplyConfiguration struct { + Name *string `json:"name,omitempty"` + Namespace *string `json:"namespace,omitempty"` +} + +// FabricNetworkConfigOrgPeerApplyConfiguration constructs an declarative configuration of the FabricNetworkConfigOrgPeer type for use with +// apply. +func FabricNetworkConfigOrgPeer() *FabricNetworkConfigOrgPeerApplyConfiguration { + return &FabricNetworkConfigOrgPeerApplyConfiguration{} +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *FabricNetworkConfigOrgPeerApplyConfiguration) WithName(value string) *FabricNetworkConfigOrgPeerApplyConfiguration { + b.Name = &value + return b +} + +// WithNamespace sets the Namespace field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Namespace field is set to the value of the last call. +func (b *FabricNetworkConfigOrgPeerApplyConfiguration) WithNamespace(value string) *FabricNetworkConfigOrgPeerApplyConfiguration { + b.Namespace = &value + return b +} diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricnetworkconfigspec.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricnetworkconfigspec.go index e5de3a28..36f4e6f0 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricnetworkconfigspec.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricnetworkconfigspec.go @@ -3,19 +3,24 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 // FabricNetworkConfigSpecApplyConfiguration represents an declarative configuration of the FabricNetworkConfigSpec type for use // with apply. type FabricNetworkConfigSpecApplyConfiguration struct { - Organization *string `json:"organization,omitempty"` - Internal *bool `json:"internal,omitempty"` - Organizations []string `json:"organizations,omitempty"` - Namespaces []string `json:"namespaces,omitempty"` - Channels []string `json:"channels,omitempty"` - Identities []FabricNetworkConfigIdentityApplyConfiguration `json:"identities,omitempty"` - SecretName *string `json:"secretName,omitempty"` + Organization *string `json:"organization,omitempty"` + Internal *bool `json:"internal,omitempty"` + Organizations []string `json:"organizations,omitempty"` + OrganizationConfig map[string]FabricNetworkConfigOrganizationApplyConfiguration `json:"organizationConfig,omitempty"` + Namespaces []string `json:"namespaces,omitempty"` + CertificateAuthorities []FabricNetworkConfigCAApplyConfiguration `json:"certificateAuthorities,omitempty"` + Channels []string `json:"channels,omitempty"` + Identities []FabricNetworkConfigIdentityApplyConfiguration `json:"identities,omitempty"` + ExternalOrderers []FabricNetworkConfigExternalOrdererApplyConfiguration `json:"externalOrderers,omitempty"` + ExternalPeers []FabricNetworkConfigExternalPeerApplyConfiguration `json:"externalPeers,omitempty"` + SecretName *string `json:"secretName,omitempty"` } // FabricNetworkConfigSpecApplyConfiguration constructs an declarative configuration of the FabricNetworkConfigSpec type for use with @@ -50,6 +55,20 @@ func (b *FabricNetworkConfigSpecApplyConfiguration) WithOrganizations(values ... return b } +// WithOrganizationConfig puts the entries into the OrganizationConfig field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the OrganizationConfig field, +// overwriting an existing map entries in OrganizationConfig field with the same key. +func (b *FabricNetworkConfigSpecApplyConfiguration) WithOrganizationConfig(entries map[string]FabricNetworkConfigOrganizationApplyConfiguration) *FabricNetworkConfigSpecApplyConfiguration { + if b.OrganizationConfig == nil && len(entries) > 0 { + b.OrganizationConfig = make(map[string]FabricNetworkConfigOrganizationApplyConfiguration, len(entries)) + } + for k, v := range entries { + b.OrganizationConfig[k] = v + } + return b +} + // WithNamespaces adds the given value to the Namespaces field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the Namespaces field. @@ -60,6 +79,19 @@ func (b *FabricNetworkConfigSpecApplyConfiguration) WithNamespaces(values ...str return b } +// WithCertificateAuthorities adds the given value to the CertificateAuthorities field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the CertificateAuthorities field. +func (b *FabricNetworkConfigSpecApplyConfiguration) WithCertificateAuthorities(values ...*FabricNetworkConfigCAApplyConfiguration) *FabricNetworkConfigSpecApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithCertificateAuthorities") + } + b.CertificateAuthorities = append(b.CertificateAuthorities, *values[i]) + } + return b +} + // WithChannels adds the given value to the Channels field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the Channels field. @@ -83,6 +115,32 @@ func (b *FabricNetworkConfigSpecApplyConfiguration) WithIdentities(values ...*Fa return b } +// WithExternalOrderers adds the given value to the ExternalOrderers field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the ExternalOrderers field. +func (b *FabricNetworkConfigSpecApplyConfiguration) WithExternalOrderers(values ...*FabricNetworkConfigExternalOrdererApplyConfiguration) *FabricNetworkConfigSpecApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithExternalOrderers") + } + b.ExternalOrderers = append(b.ExternalOrderers, *values[i]) + } + return b +} + +// WithExternalPeers adds the given value to the ExternalPeers field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the ExternalPeers field. +func (b *FabricNetworkConfigSpecApplyConfiguration) WithExternalPeers(values ...*FabricNetworkConfigExternalPeerApplyConfiguration) *FabricNetworkConfigSpecApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithExternalPeers") + } + b.ExternalPeers = append(b.ExternalPeers, *values[i]) + } + return b +} + // WithSecretName sets the SecretName field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the SecretName field is set to the value of the last call. diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricnetworkconfigstatus.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricnetworkconfigstatus.go index 6c850a33..27431b79 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricnetworkconfigstatus.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricnetworkconfigstatus.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricoperationsconsole.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricoperationsconsole.go index 228dfc36..80710721 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricoperationsconsole.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricoperationsconsole.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricoperationsconsoleauth.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricoperationsconsoleauth.go index 1628f70f..9c3e2067 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricoperationsconsoleauth.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricoperationsconsoleauth.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricoperationsconsolecouchdb.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricoperationsconsolecouchdb.go index 7afd0a07..28417cfc 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricoperationsconsolecouchdb.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricoperationsconsolecouchdb.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricoperationsconsolespec.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricoperationsconsolespec.go index aeede66d..9fddfbaf 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricoperationsconsolespec.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricoperationsconsolespec.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricoperationsconsolestatus.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricoperationsconsolestatus.go index 0d2e9e54..2e3a505f 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricoperationsconsolestatus.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricoperationsconsolestatus.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricoperatorapi.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricoperatorapi.go index e41c78f4..a9875408 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricoperatorapi.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricoperatorapi.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricoperatorapiauth.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricoperatorapiauth.go index ad3108fe..73899c38 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricoperatorapiauth.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricoperatorapiauth.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricoperatorapihlfconfig.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricoperatorapihlfconfig.go index c15e16d6..c6888ca0 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricoperatorapihlfconfig.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricoperatorapihlfconfig.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricoperatorapinetworkconfig.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricoperatorapinetworkconfig.go index 2fceff3e..06072915 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricoperatorapinetworkconfig.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricoperatorapinetworkconfig.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricoperatorapispec.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricoperatorapispec.go index 287d4967..d0c38125 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricoperatorapispec.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricoperatorapispec.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 @@ -19,6 +20,7 @@ type FabricOperatorAPISpecApplyConfiguration struct { Istio *FabricIstioApplyConfiguration `json:"istio,omitempty"` Ingress *IngressApplyConfiguration `json:"ingress,omitempty"` Replicas *int `json:"replicas,omitempty"` + PodLabels map[string]string `json:"podLabels,omitempty"` Auth *FabricOperatorAPIAuthApplyConfiguration `json:"auth,omitempty"` LogoURL *string `json:"logoUrl,omitempty"` HLFConfig *FabricOperatorAPIHLFConfigApplyConfiguration `json:"hlfConfig,omitempty"` @@ -83,6 +85,20 @@ func (b *FabricOperatorAPISpecApplyConfiguration) WithReplicas(value int) *Fabri return b } +// WithPodLabels puts the entries into the PodLabels field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the PodLabels field, +// overwriting an existing map entries in PodLabels field with the same key. +func (b *FabricOperatorAPISpecApplyConfiguration) WithPodLabels(entries map[string]string) *FabricOperatorAPISpecApplyConfiguration { + if b.PodLabels == nil && len(entries) > 0 { + b.PodLabels = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.PodLabels[k] = v + } + return b +} + // WithAuth sets the Auth field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Auth field is set to the value of the last call. diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricoperatorapistatus.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricoperatorapistatus.go index c6d162f8..916fe598 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricoperatorapistatus.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricoperatorapistatus.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricoperatorui.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricoperatorui.go index 782ba5e0..2815725f 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricoperatorui.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricoperatorui.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricoperatoruiauth.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricoperatoruiauth.go index fc7d4226..ee4413a6 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricoperatoruiauth.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricoperatoruiauth.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricoperatoruispec.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricoperatoruispec.go index b91ebedf..1e6bab95 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricoperatoruispec.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricoperatoruispec.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricoperatoruistatus.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricoperatoruistatus.go index 5e4f5b73..0404546d 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricoperatoruistatus.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricoperatoruistatus.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricorderernode.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricorderernode.go index 8a6a4961..905aa966 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricorderernode.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricorderernode.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricorderernodespec.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricorderernodespec.go index 0af14a30..36394e0d 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricorderernodespec.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricorderernodespec.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 @@ -15,6 +16,8 @@ import ( // FabricOrdererNodeSpecApplyConfiguration represents an declarative configuration of the FabricOrdererNodeSpec type for use // with apply. type FabricOrdererNodeSpecApplyConfiguration struct { + PodAnnotations map[string]string `json:"podAnnotations,omitempty"` + PodLabels map[string]string `json:"podLabels,omitempty"` Tolerations []v1.Toleration `json:"tolerations,omitempty"` GRPCProxy *GRPCProxyApplyConfiguration `json:"grpcProxy,omitempty"` Affinity *v1.Affinity `json:"affinity,omitempty"` @@ -35,8 +38,12 @@ type FabricOrdererNodeSpecApplyConfiguration struct { Storage *StorageApplyConfiguration `json:"storage,omitempty"` Service *OrdererNodeServiceApplyConfiguration `json:"service,omitempty"` Secret *SecretApplyConfiguration `json:"secret,omitempty"` + GatewayApi *FabricGatewayApiApplyConfiguration `json:"gatewayApi,omitempty"` Istio *FabricIstioApplyConfiguration `json:"istio,omitempty"` + Traefik *FabricTraefikApplyConfiguration `json:"traefik,omitempty"` + AdminGatewayApi *FabricGatewayApiApplyConfiguration `json:"adminGatewayApi,omitempty"` AdminIstio *FabricIstioApplyConfiguration `json:"adminIstio,omitempty"` + AdminTraefik *FabricTraefikApplyConfiguration `json:"adminTraefik,omitempty"` Env []v1.EnvVar `json:"env,omitempty"` } @@ -46,6 +53,34 @@ func FabricOrdererNodeSpec() *FabricOrdererNodeSpecApplyConfiguration { return &FabricOrdererNodeSpecApplyConfiguration{} } +// WithPodAnnotations puts the entries into the PodAnnotations field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the PodAnnotations field, +// overwriting an existing map entries in PodAnnotations field with the same key. +func (b *FabricOrdererNodeSpecApplyConfiguration) WithPodAnnotations(entries map[string]string) *FabricOrdererNodeSpecApplyConfiguration { + if b.PodAnnotations == nil && len(entries) > 0 { + b.PodAnnotations = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.PodAnnotations[k] = v + } + return b +} + +// WithPodLabels puts the entries into the PodLabels field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the PodLabels field, +// overwriting an existing map entries in PodLabels field with the same key. +func (b *FabricOrdererNodeSpecApplyConfiguration) WithPodLabels(entries map[string]string) *FabricOrdererNodeSpecApplyConfiguration { + if b.PodLabels == nil && len(entries) > 0 { + b.PodLabels = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.PodLabels[k] = v + } + return b +} + // WithTolerations adds the given value to the Tolerations field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the Tolerations field. @@ -212,6 +247,14 @@ func (b *FabricOrdererNodeSpecApplyConfiguration) WithSecret(value *SecretApplyC return b } +// WithGatewayApi sets the GatewayApi field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the GatewayApi field is set to the value of the last call. +func (b *FabricOrdererNodeSpecApplyConfiguration) WithGatewayApi(value *FabricGatewayApiApplyConfiguration) *FabricOrdererNodeSpecApplyConfiguration { + b.GatewayApi = value + return b +} + // WithIstio sets the Istio field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Istio field is set to the value of the last call. @@ -220,6 +263,22 @@ func (b *FabricOrdererNodeSpecApplyConfiguration) WithIstio(value *FabricIstioAp return b } +// WithTraefik sets the Traefik field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Traefik field is set to the value of the last call. +func (b *FabricOrdererNodeSpecApplyConfiguration) WithTraefik(value *FabricTraefikApplyConfiguration) *FabricOrdererNodeSpecApplyConfiguration { + b.Traefik = value + return b +} + +// WithAdminGatewayApi sets the AdminGatewayApi field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the AdminGatewayApi field is set to the value of the last call. +func (b *FabricOrdererNodeSpecApplyConfiguration) WithAdminGatewayApi(value *FabricGatewayApiApplyConfiguration) *FabricOrdererNodeSpecApplyConfiguration { + b.AdminGatewayApi = value + return b +} + // WithAdminIstio sets the AdminIstio field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the AdminIstio field is set to the value of the last call. @@ -228,6 +287,14 @@ func (b *FabricOrdererNodeSpecApplyConfiguration) WithAdminIstio(value *FabricIs return b } +// WithAdminTraefik sets the AdminTraefik field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the AdminTraefik field is set to the value of the last call. +func (b *FabricOrdererNodeSpecApplyConfiguration) WithAdminTraefik(value *FabricTraefikApplyConfiguration) *FabricOrdererNodeSpecApplyConfiguration { + b.AdminTraefik = value + return b +} + // WithEnv adds the given value to the Env field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the Env field. diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricorderernodestatus.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricorderernodestatus.go index c83ac415..348964f2 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricorderernodestatus.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricorderernodestatus.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricorderingservice.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricorderingservice.go index 69173506..68c3f290 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricorderingservice.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricorderingservice.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricorderingservicespec.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricorderingservicespec.go index a11ffcc4..259ec9b8 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricorderingservicespec.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricorderingservicespec.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricorderingservicestatus.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricorderingservicestatus.go index 4e088046..fb090999 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricorderingservicestatus.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricorderingservicestatus.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricpeer.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricpeer.go index 34c0c83b..4cafcfe4 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricpeer.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricpeer.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricpeercouchdb.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricpeercouchdb.go index 7fa90d5e..dc90dce9 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricpeercouchdb.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricpeercouchdb.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricpeercouchdbexporter.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricpeercouchdbexporter.go index 9e6fc9c3..98b8ea30 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricpeercouchdbexporter.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricpeercouchdbexporter.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricpeerdiscovery.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricpeerdiscovery.go index e0452580..e44a2cb7 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricpeerdiscovery.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricpeerdiscovery.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricpeerexternalcouchdb.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricpeerexternalcouchdb.go index ddb32b33..1a87b5f0 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricpeerexternalcouchdb.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricpeerexternalcouchdb.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricpeerlogging.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricpeerlogging.go index 362dedde..486be094 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricpeerlogging.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricpeerlogging.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricpeerresources.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricpeerresources.go index 3b1a4782..8e8d3af3 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricpeerresources.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricpeerresources.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricpeerspec.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricpeerspec.go index c22a5ce0..05270a69 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricpeerspec.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricpeerspec.go @@ -3,49 +3,57 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 import ( hlfkungfusoftwareesv1alpha1 "github.com/kfsoftware/hlf-operator/api/hlf.kungfusoftware.es/v1alpha1" - corev1 "k8s.io/api/core/v1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) // FabricPeerSpecApplyConfiguration represents an declarative configuration of the FabricPeerSpec type for use // with apply. type FabricPeerSpecApplyConfiguration struct { - UpdateCertificateTime *v1.Time `json:"updateCertificateTime,omitempty"` - Affinity *corev1.Affinity `json:"affinity,omitempty"` - ServiceMonitor *ServiceMonitorApplyConfiguration `json:"serviceMonitor,omitempty"` - HostAliases []corev1.HostAlias `json:"hostAliases,omitempty"` - NodeSelector *corev1.NodeSelector `json:"nodeSelector,omitempty"` - CouchDBExporter *FabricPeerCouchdbExporterApplyConfiguration `json:"couchDBexporter,omitempty"` - GRPCProxy *GRPCProxyApplyConfiguration `json:"grpcProxy,omitempty"` - Replicas *int `json:"replicas,omitempty"` - DockerSocketPath *string `json:"dockerSocketPath,omitempty"` - Image *string `json:"image,omitempty"` - ExternalBuilders []ExternalBuilderApplyConfiguration `json:"externalBuilders,omitempty"` - Istio *FabricIstioApplyConfiguration `json:"istio,omitempty"` - Gossip *FabricPeerSpecGossipApplyConfiguration `json:"gossip,omitempty"` - ExternalEndpoint *string `json:"externalEndpoint,omitempty"` - Tag *string `json:"tag,omitempty"` - ImagePullPolicy *corev1.PullPolicy `json:"imagePullPolicy,omitempty"` - ExternalChaincodeBuilder *bool `json:"external_chaincode_builder,omitempty"` - CouchDB *FabricPeerCouchDBApplyConfiguration `json:"couchdb,omitempty"` - FSServer *FabricFSServerApplyConfiguration `json:"fsServer,omitempty"` - ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty"` - MspID *string `json:"mspID,omitempty"` - Secret *SecretApplyConfiguration `json:"secret,omitempty"` - Service *PeerServiceApplyConfiguration `json:"service,omitempty"` - StateDb *hlfkungfusoftwareesv1alpha1.StateDB `json:"stateDb,omitempty"` - Storage *FabricPeerStorageApplyConfiguration `json:"storage,omitempty"` - Discovery *FabricPeerDiscoveryApplyConfiguration `json:"discovery,omitempty"` - Logging *FabricPeerLoggingApplyConfiguration `json:"logging,omitempty"` - Resources *FabricPeerResourcesApplyConfiguration `json:"resources,omitempty"` - Hosts []string `json:"hosts,omitempty"` - Tolerations []corev1.Toleration `json:"tolerations,omitempty"` - Env []corev1.EnvVar `json:"env,omitempty"` + PodAnnotations map[string]string `json:"podAnnotations,omitempty"` + PodLabels map[string]string `json:"podLabels,omitempty"` + DeliveryClientaddressOverrides []AddressOverrideApplyConfiguration `json:"deliveryClientaddressOverrides,omitempty"` + Volumes []v1.Volume `json:"volumes,omitempty"` + PeerVolumeMounts []v1.VolumeMount `json:"peerVolumeMounts,omitempty"` + UpdateCertificateTime *metav1.Time `json:"updateCertificateTime,omitempty"` + Affinity *v1.Affinity `json:"affinity,omitempty"` + ServiceMonitor *ServiceMonitorApplyConfiguration `json:"serviceMonitor,omitempty"` + HostAliases []v1.HostAlias `json:"hostAliases,omitempty"` + NodeSelector *v1.NodeSelector `json:"nodeSelector,omitempty"` + CouchDBExporter *FabricPeerCouchdbExporterApplyConfiguration `json:"couchDBexporter,omitempty"` + GRPCProxy *GRPCProxyApplyConfiguration `json:"grpcProxy,omitempty"` + Replicas *int `json:"replicas,omitempty"` + DockerSocketPath *string `json:"dockerSocketPath,omitempty"` + Image *string `json:"image,omitempty"` + ExternalBuilders []ExternalBuilderApplyConfiguration `json:"externalBuilders,omitempty"` + GatewayApi *FabricGatewayApiApplyConfiguration `json:"gatewayApi,omitempty"` + Traefik *FabricTraefikApplyConfiguration `json:"traefik,omitempty"` + Istio *FabricIstioApplyConfiguration `json:"istio,omitempty"` + Gossip *FabricPeerSpecGossipApplyConfiguration `json:"gossip,omitempty"` + ExternalEndpoint *string `json:"externalEndpoint,omitempty"` + Tag *string `json:"tag,omitempty"` + ImagePullPolicy *v1.PullPolicy `json:"imagePullPolicy,omitempty"` + ExternalChaincodeBuilder *bool `json:"external_chaincode_builder,omitempty"` + CouchDB *FabricPeerCouchDBApplyConfiguration `json:"couchdb,omitempty"` + FSServer *FabricFSServerApplyConfiguration `json:"fsServer,omitempty"` + ImagePullSecrets []v1.LocalObjectReference `json:"imagePullSecrets,omitempty"` + MspID *string `json:"mspID,omitempty"` + Secret *SecretApplyConfiguration `json:"secret,omitempty"` + Service *PeerServiceApplyConfiguration `json:"service,omitempty"` + StateDb *hlfkungfusoftwareesv1alpha1.StateDB `json:"stateDb,omitempty"` + Storage *FabricPeerStorageApplyConfiguration `json:"storage,omitempty"` + Discovery *FabricPeerDiscoveryApplyConfiguration `json:"discovery,omitempty"` + Logging *FabricPeerLoggingApplyConfiguration `json:"logging,omitempty"` + Resources *FabricPeerResourcesApplyConfiguration `json:"resources,omitempty"` + Hosts []string `json:"hosts,omitempty"` + Tolerations []v1.Toleration `json:"tolerations,omitempty"` + Env []v1.EnvVar `json:"env,omitempty"` } // FabricPeerSpecApplyConfiguration constructs an declarative configuration of the FabricPeerSpec type for use with @@ -54,10 +62,71 @@ func FabricPeerSpec() *FabricPeerSpecApplyConfiguration { return &FabricPeerSpecApplyConfiguration{} } +// WithPodAnnotations puts the entries into the PodAnnotations field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the PodAnnotations field, +// overwriting an existing map entries in PodAnnotations field with the same key. +func (b *FabricPeerSpecApplyConfiguration) WithPodAnnotations(entries map[string]string) *FabricPeerSpecApplyConfiguration { + if b.PodAnnotations == nil && len(entries) > 0 { + b.PodAnnotations = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.PodAnnotations[k] = v + } + return b +} + +// WithPodLabels puts the entries into the PodLabels field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the PodLabels field, +// overwriting an existing map entries in PodLabels field with the same key. +func (b *FabricPeerSpecApplyConfiguration) WithPodLabels(entries map[string]string) *FabricPeerSpecApplyConfiguration { + if b.PodLabels == nil && len(entries) > 0 { + b.PodLabels = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.PodLabels[k] = v + } + return b +} + +// WithDeliveryClientaddressOverrides adds the given value to the DeliveryClientaddressOverrides field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the DeliveryClientaddressOverrides field. +func (b *FabricPeerSpecApplyConfiguration) WithDeliveryClientaddressOverrides(values ...*AddressOverrideApplyConfiguration) *FabricPeerSpecApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithDeliveryClientaddressOverrides") + } + b.DeliveryClientaddressOverrides = append(b.DeliveryClientaddressOverrides, *values[i]) + } + return b +} + +// WithVolumes adds the given value to the Volumes field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Volumes field. +func (b *FabricPeerSpecApplyConfiguration) WithVolumes(values ...v1.Volume) *FabricPeerSpecApplyConfiguration { + for i := range values { + b.Volumes = append(b.Volumes, values[i]) + } + return b +} + +// WithPeerVolumeMounts adds the given value to the PeerVolumeMounts field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the PeerVolumeMounts field. +func (b *FabricPeerSpecApplyConfiguration) WithPeerVolumeMounts(values ...v1.VolumeMount) *FabricPeerSpecApplyConfiguration { + for i := range values { + b.PeerVolumeMounts = append(b.PeerVolumeMounts, values[i]) + } + return b +} + // WithUpdateCertificateTime sets the UpdateCertificateTime field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UpdateCertificateTime field is set to the value of the last call. -func (b *FabricPeerSpecApplyConfiguration) WithUpdateCertificateTime(value v1.Time) *FabricPeerSpecApplyConfiguration { +func (b *FabricPeerSpecApplyConfiguration) WithUpdateCertificateTime(value metav1.Time) *FabricPeerSpecApplyConfiguration { b.UpdateCertificateTime = &value return b } @@ -65,7 +134,7 @@ func (b *FabricPeerSpecApplyConfiguration) WithUpdateCertificateTime(value v1.Ti // WithAffinity sets the Affinity field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Affinity field is set to the value of the last call. -func (b *FabricPeerSpecApplyConfiguration) WithAffinity(value corev1.Affinity) *FabricPeerSpecApplyConfiguration { +func (b *FabricPeerSpecApplyConfiguration) WithAffinity(value v1.Affinity) *FabricPeerSpecApplyConfiguration { b.Affinity = &value return b } @@ -81,7 +150,7 @@ func (b *FabricPeerSpecApplyConfiguration) WithServiceMonitor(value *ServiceMoni // WithHostAliases adds the given value to the HostAliases field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the HostAliases field. -func (b *FabricPeerSpecApplyConfiguration) WithHostAliases(values ...corev1.HostAlias) *FabricPeerSpecApplyConfiguration { +func (b *FabricPeerSpecApplyConfiguration) WithHostAliases(values ...v1.HostAlias) *FabricPeerSpecApplyConfiguration { for i := range values { b.HostAliases = append(b.HostAliases, values[i]) } @@ -91,7 +160,7 @@ func (b *FabricPeerSpecApplyConfiguration) WithHostAliases(values ...corev1.Host // WithNodeSelector sets the NodeSelector field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the NodeSelector field is set to the value of the last call. -func (b *FabricPeerSpecApplyConfiguration) WithNodeSelector(value corev1.NodeSelector) *FabricPeerSpecApplyConfiguration { +func (b *FabricPeerSpecApplyConfiguration) WithNodeSelector(value v1.NodeSelector) *FabricPeerSpecApplyConfiguration { b.NodeSelector = &value return b } @@ -149,6 +218,22 @@ func (b *FabricPeerSpecApplyConfiguration) WithExternalBuilders(values ...*Exter return b } +// WithGatewayApi sets the GatewayApi field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the GatewayApi field is set to the value of the last call. +func (b *FabricPeerSpecApplyConfiguration) WithGatewayApi(value *FabricGatewayApiApplyConfiguration) *FabricPeerSpecApplyConfiguration { + b.GatewayApi = value + return b +} + +// WithTraefik sets the Traefik field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Traefik field is set to the value of the last call. +func (b *FabricPeerSpecApplyConfiguration) WithTraefik(value *FabricTraefikApplyConfiguration) *FabricPeerSpecApplyConfiguration { + b.Traefik = value + return b +} + // WithIstio sets the Istio field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Istio field is set to the value of the last call. @@ -184,7 +269,7 @@ func (b *FabricPeerSpecApplyConfiguration) WithTag(value string) *FabricPeerSpec // WithImagePullPolicy sets the ImagePullPolicy field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ImagePullPolicy field is set to the value of the last call. -func (b *FabricPeerSpecApplyConfiguration) WithImagePullPolicy(value corev1.PullPolicy) *FabricPeerSpecApplyConfiguration { +func (b *FabricPeerSpecApplyConfiguration) WithImagePullPolicy(value v1.PullPolicy) *FabricPeerSpecApplyConfiguration { b.ImagePullPolicy = &value return b } @@ -216,7 +301,7 @@ func (b *FabricPeerSpecApplyConfiguration) WithFSServer(value *FabricFSServerApp // WithImagePullSecrets adds the given value to the ImagePullSecrets field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the ImagePullSecrets field. -func (b *FabricPeerSpecApplyConfiguration) WithImagePullSecrets(values ...corev1.LocalObjectReference) *FabricPeerSpecApplyConfiguration { +func (b *FabricPeerSpecApplyConfiguration) WithImagePullSecrets(values ...v1.LocalObjectReference) *FabricPeerSpecApplyConfiguration { for i := range values { b.ImagePullSecrets = append(b.ImagePullSecrets, values[i]) } @@ -300,7 +385,7 @@ func (b *FabricPeerSpecApplyConfiguration) WithHosts(values ...string) *FabricPe // WithTolerations adds the given value to the Tolerations field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the Tolerations field. -func (b *FabricPeerSpecApplyConfiguration) WithTolerations(values ...corev1.Toleration) *FabricPeerSpecApplyConfiguration { +func (b *FabricPeerSpecApplyConfiguration) WithTolerations(values ...v1.Toleration) *FabricPeerSpecApplyConfiguration { for i := range values { b.Tolerations = append(b.Tolerations, values[i]) } @@ -310,7 +395,7 @@ func (b *FabricPeerSpecApplyConfiguration) WithTolerations(values ...corev1.Tole // WithEnv adds the given value to the Env field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the Env field. -func (b *FabricPeerSpecApplyConfiguration) WithEnv(values ...corev1.EnvVar) *FabricPeerSpecApplyConfiguration { +func (b *FabricPeerSpecApplyConfiguration) WithEnv(values ...v1.EnvVar) *FabricPeerSpecApplyConfiguration { for i := range values { b.Env = append(b.Env, values[i]) } diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricpeerspecgossip.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricpeerspecgossip.go index 1c0ef382..1be6bc04 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricpeerspecgossip.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricpeerspecgossip.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricpeerstatus.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricpeerstatus.go index 09c0c8fb..597b7bbb 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricpeerstatus.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricpeerstatus.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricpeerstorage.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricpeerstorage.go index 7f6e2c64..4dd36703 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricpeerstorage.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabricpeerstorage.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabrictlscacrypto.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabrictlscacrypto.go deleted file mode 100644 index 9d210a2e..00000000 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabrictlscacrypto.go +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright Kungfusoftware.es. All Rights Reserved. - * - * SPDX-License-Identifier: Apache-2.0 - */ - -package v1alpha1 - -// FabricTLSCACryptoApplyConfiguration represents an declarative configuration of the FabricTLSCACrypto type for use -// with apply. -type FabricTLSCACryptoApplyConfiguration struct { - Key *string `json:"key,omitempty"` - Cert *string `json:"cert,omitempty"` - ClientAuth *FabricCAClientAuthApplyConfiguration `json:"clientAuth,omitempty"` -} - -// FabricTLSCACryptoApplyConfiguration constructs an declarative configuration of the FabricTLSCACrypto type for use with -// apply. -func FabricTLSCACrypto() *FabricTLSCACryptoApplyConfiguration { - return &FabricTLSCACryptoApplyConfiguration{} -} - -// WithKey sets the Key field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Key field is set to the value of the last call. -func (b *FabricTLSCACryptoApplyConfiguration) WithKey(value string) *FabricTLSCACryptoApplyConfiguration { - b.Key = &value - return b -} - -// WithCert sets the Cert field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Cert field is set to the value of the last call. -func (b *FabricTLSCACryptoApplyConfiguration) WithCert(value string) *FabricTLSCACryptoApplyConfiguration { - b.Cert = &value - return b -} - -// WithClientAuth sets the ClientAuth field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClientAuth field is set to the value of the last call. -func (b *FabricTLSCACryptoApplyConfiguration) WithClientAuth(value *FabricCAClientAuthApplyConfiguration) *FabricTLSCACryptoApplyConfiguration { - b.ClientAuth = value - return b -} diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabrictraefik.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabrictraefik.go new file mode 100644 index 00000000..db864634 --- /dev/null +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabrictraefik.go @@ -0,0 +1,55 @@ +/* + * Copyright Kungfusoftware.es. All Rights Reserved. + * + * SPDX-License-Identifier: Apache-2.0 + */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +// FabricTraefikApplyConfiguration represents an declarative configuration of the FabricTraefik type for use +// with apply. +type FabricTraefikApplyConfiguration struct { + Entrypoints []string `json:"entryPoints,omitempty"` + Middlewares []FabricTraefikMiddlewareApplyConfiguration `json:"middlewares,omitempty"` + Hosts []string `json:"hosts,omitempty"` +} + +// FabricTraefikApplyConfiguration constructs an declarative configuration of the FabricTraefik type for use with +// apply. +func FabricTraefik() *FabricTraefikApplyConfiguration { + return &FabricTraefikApplyConfiguration{} +} + +// WithEntrypoints adds the given value to the Entrypoints field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Entrypoints field. +func (b *FabricTraefikApplyConfiguration) WithEntrypoints(values ...string) *FabricTraefikApplyConfiguration { + for i := range values { + b.Entrypoints = append(b.Entrypoints, values[i]) + } + return b +} + +// WithMiddlewares adds the given value to the Middlewares field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Middlewares field. +func (b *FabricTraefikApplyConfiguration) WithMiddlewares(values ...*FabricTraefikMiddlewareApplyConfiguration) *FabricTraefikApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithMiddlewares") + } + b.Middlewares = append(b.Middlewares, *values[i]) + } + return b +} + +// WithHosts adds the given value to the Hosts field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Hosts field. +func (b *FabricTraefikApplyConfiguration) WithHosts(values ...string) *FabricTraefikApplyConfiguration { + for i := range values { + b.Hosts = append(b.Hosts, values[i]) + } + return b +} diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabrictraefikmiddleware.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabrictraefikmiddleware.go new file mode 100644 index 00000000..07f60d61 --- /dev/null +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/fabrictraefikmiddleware.go @@ -0,0 +1,37 @@ +/* + * Copyright Kungfusoftware.es. All Rights Reserved. + * + * SPDX-License-Identifier: Apache-2.0 + */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +// FabricTraefikMiddlewareApplyConfiguration represents an declarative configuration of the FabricTraefikMiddleware type for use +// with apply. +type FabricTraefikMiddlewareApplyConfiguration struct { + Name *string `json:"name,omitempty"` + Namespace *string `json:"namespace,omitempty"` +} + +// FabricTraefikMiddlewareApplyConfiguration constructs an declarative configuration of the FabricTraefikMiddleware type for use with +// apply. +func FabricTraefikMiddleware() *FabricTraefikMiddlewareApplyConfiguration { + return &FabricTraefikMiddlewareApplyConfiguration{} +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *FabricTraefikMiddlewareApplyConfiguration) WithName(value string) *FabricTraefikMiddlewareApplyConfiguration { + b.Name = &value + return b +} + +// WithNamespace sets the Namespace field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Namespace field is set to the value of the last call. +func (b *FabricTraefikMiddlewareApplyConfiguration) WithNamespace(value string) *FabricTraefikMiddlewareApplyConfiguration { + b.Namespace = &value + return b +} diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/grpcproxy.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/grpcproxy.go index e334d596..a48e38b0 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/grpcproxy.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/grpcproxy.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/hlfidentity.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/hlfidentity.go index e6dd2dcb..61c13b79 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/hlfidentity.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/hlfidentity.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/ingress.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/ingress.go index 4557330d..709bbe48 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/ingress.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/ingress.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/ingresshost.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/ingresshost.go index 8e492ed2..761bb8c2 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/ingresshost.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/ingresshost.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/ingresspath.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/ingresspath.go index 5ca11219..007d0331 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/ingresspath.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/ingresspath.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/orderercapabilities.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/orderercapabilities.go index b021a5ee..143766f4 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/orderercapabilities.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/orderercapabilities.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/ordererenrollment.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/ordererenrollment.go index 8db07908..5a9e8d2a 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/ordererenrollment.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/ordererenrollment.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/orderernode.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/orderernode.go index 1bafddd4..204cbefb 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/orderernode.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/orderernode.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/orderernodeenrollment.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/orderernodeenrollment.go index 34886409..3a69e69d 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/orderernodeenrollment.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/orderernodeenrollment.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/orderernodeenrollmenttls.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/orderernodeenrollmenttls.go index 377b5989..f59fc556 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/orderernodeenrollmenttls.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/orderernodeenrollmenttls.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/orderernodeservice.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/orderernodeservice.go index da5f0cd2..081cbfc3 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/orderernodeservice.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/orderernodeservice.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/ordererservice.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/ordererservice.go index 8aa4e498..54a04c99 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/ordererservice.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/ordererservice.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/orderersystemchannel.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/orderersystemchannel.go index 8001c7cf..7956b68f 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/orderersystemchannel.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/orderersystemchannel.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/peerservice.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/peerservice.go index 1461aa36..59af6ed5 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/peerservice.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/peerservice.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/secret.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/secret.go index 3d8733ec..a94be9c8 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/secret.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/secret.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/secretref.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/secretref.go new file mode 100644 index 00000000..579255e3 --- /dev/null +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/secretref.go @@ -0,0 +1,28 @@ +/* + * Copyright Kungfusoftware.es. All Rights Reserved. + * + * SPDX-License-Identifier: Apache-2.0 + */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +// SecretRefApplyConfiguration represents an declarative configuration of the SecretRef type for use +// with apply. +type SecretRefApplyConfiguration struct { + Name *string `json:"name,omitempty"` +} + +// SecretRefApplyConfiguration constructs an declarative configuration of the SecretRef type for use with +// apply. +func SecretRef() *SecretRefApplyConfiguration { + return &SecretRefApplyConfiguration{} +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *SecretRefApplyConfiguration) WithName(value string) *SecretRefApplyConfiguration { + b.Name = &value + return b +} diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/secretrefnskey.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/secretrefnskey.go new file mode 100644 index 00000000..d5a5eb3c --- /dev/null +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/secretrefnskey.go @@ -0,0 +1,46 @@ +/* + * Copyright Kungfusoftware.es. All Rights Reserved. + * + * SPDX-License-Identifier: Apache-2.0 + */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +// SecretRefNSKeyApplyConfiguration represents an declarative configuration of the SecretRefNSKey type for use +// with apply. +type SecretRefNSKeyApplyConfiguration struct { + Name *string `json:"name,omitempty"` + Namespace *string `json:"namespace,omitempty"` + Key *string `json:"key,omitempty"` +} + +// SecretRefNSKeyApplyConfiguration constructs an declarative configuration of the SecretRefNSKey type for use with +// apply. +func SecretRefNSKey() *SecretRefNSKeyApplyConfiguration { + return &SecretRefNSKeyApplyConfiguration{} +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *SecretRefNSKeyApplyConfiguration) WithName(value string) *SecretRefNSKeyApplyConfiguration { + b.Name = &value + return b +} + +// WithNamespace sets the Namespace field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Namespace field is set to the value of the last call. +func (b *SecretRefNSKeyApplyConfiguration) WithNamespace(value string) *SecretRefNSKeyApplyConfiguration { + b.Namespace = &value + return b +} + +// WithKey sets the Key field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Key field is set to the value of the last call. +func (b *SecretRefNSKeyApplyConfiguration) WithKey(value string) *SecretRefNSKeyApplyConfiguration { + b.Key = &value + return b +} diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/servicemonitor.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/servicemonitor.go index f4fe6952..46713f4b 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/servicemonitor.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/servicemonitor.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/storage.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/storage.go index e23def92..651ae467 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/storage.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/storage.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/tls.go b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/tls.go index fe7038b7..9d9770c5 100644 --- a/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/tls.go +++ b/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1/tls.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/applyconfiguration/internal/internal.go b/pkg/client/applyconfiguration/internal/internal.go index 883bd618..55ae7730 100644 --- a/pkg/client/applyconfiguration/internal/internal.go +++ b/pkg/client/applyconfiguration/internal/internal.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package internal diff --git a/pkg/client/applyconfiguration/utils.go b/pkg/client/applyconfiguration/utils.go index 255968f3..64533770 100644 --- a/pkg/client/applyconfiguration/utils.go +++ b/pkg/client/applyconfiguration/utils.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by applyconfiguration-gen. DO NOT EDIT. package applyconfiguration @@ -17,6 +18,8 @@ import ( func ForKind(kind schema.GroupVersionKind) interface{} { switch kind { // Group=hlf.kungfusoftware.es, Version=v1alpha1 + case v1alpha1.SchemeGroupVersion.WithKind("AddressOverride"): + return &hlfkungfusoftwareesv1alpha1.AddressOverrideApplyConfiguration{} case v1alpha1.SchemeGroupVersion.WithKind("ApplicationCapabilities"): return &hlfkungfusoftwareesv1alpha1.ApplicationCapabilitiesApplyConfiguration{} case v1alpha1.SchemeGroupVersion.WithKind("Catls"): @@ -51,8 +54,6 @@ func ForKind(kind schema.GroupVersionKind) interface{} { return &hlfkungfusoftwareesv1alpha1.FabricCACFGAffilitionsApplyConfiguration{} case v1alpha1.SchemeGroupVersion.WithKind("FabricCACFGIdentities"): return &hlfkungfusoftwareesv1alpha1.FabricCACFGIdentitiesApplyConfiguration{} - case v1alpha1.SchemeGroupVersion.WithKind("FabricCAClientAuth"): - return &hlfkungfusoftwareesv1alpha1.FabricCAClientAuthApplyConfiguration{} case v1alpha1.SchemeGroupVersion.WithKind("FabricCACRL"): return &hlfkungfusoftwareesv1alpha1.FabricCACRLApplyConfiguration{} case v1alpha1.SchemeGroupVersion.WithKind("FabricCACrypto"): @@ -109,6 +110,12 @@ func ForKind(kind schema.GroupVersionKind) interface{} { return &hlfkungfusoftwareesv1alpha1.FabricChaincodeSpecApplyConfiguration{} case v1alpha1.SchemeGroupVersion.WithKind("FabricChaincodeStatus"): return &hlfkungfusoftwareesv1alpha1.FabricChaincodeStatusApplyConfiguration{} + case v1alpha1.SchemeGroupVersion.WithKind("FabricChaincodeTemplate"): + return &hlfkungfusoftwareesv1alpha1.FabricChaincodeTemplateApplyConfiguration{} + case v1alpha1.SchemeGroupVersion.WithKind("FabricChaincodeTemplateSpec"): + return &hlfkungfusoftwareesv1alpha1.FabricChaincodeTemplateSpecApplyConfiguration{} + case v1alpha1.SchemeGroupVersion.WithKind("FabricChaincodeTemplateStatus"): + return &hlfkungfusoftwareesv1alpha1.FabricChaincodeTemplateStatusApplyConfiguration{} case v1alpha1.SchemeGroupVersion.WithKind("FabricExplorer"): return &hlfkungfusoftwareesv1alpha1.FabricExplorerApplyConfiguration{} case v1alpha1.SchemeGroupVersion.WithKind("FabricExplorerSpec"): @@ -131,6 +138,8 @@ func ForKind(kind schema.GroupVersionKind) interface{} { return &hlfkungfusoftwareesv1alpha1.FabricFollowerChannelStatusApplyConfiguration{} case v1alpha1.SchemeGroupVersion.WithKind("FabricFSServer"): return &hlfkungfusoftwareesv1alpha1.FabricFSServerApplyConfiguration{} + case v1alpha1.SchemeGroupVersion.WithKind("FabricGatewayApi"): + return &hlfkungfusoftwareesv1alpha1.FabricGatewayApiApplyConfiguration{} case v1alpha1.SchemeGroupVersion.WithKind("FabricIdentity"): return &hlfkungfusoftwareesv1alpha1.FabricIdentityApplyConfiguration{} case v1alpha1.SchemeGroupVersion.WithKind("FabricIdentityRegister"): @@ -183,8 +192,18 @@ func ForKind(kind schema.GroupVersionKind) interface{} { return &hlfkungfusoftwareesv1alpha1.FabricMainChannelStatusApplyConfiguration{} case v1alpha1.SchemeGroupVersion.WithKind("FabricNetworkConfig"): return &hlfkungfusoftwareesv1alpha1.FabricNetworkConfigApplyConfiguration{} + case v1alpha1.SchemeGroupVersion.WithKind("FabricNetworkConfigCA"): + return &hlfkungfusoftwareesv1alpha1.FabricNetworkConfigCAApplyConfiguration{} + case v1alpha1.SchemeGroupVersion.WithKind("FabricNetworkConfigExternalOrderer"): + return &hlfkungfusoftwareesv1alpha1.FabricNetworkConfigExternalOrdererApplyConfiguration{} + case v1alpha1.SchemeGroupVersion.WithKind("FabricNetworkConfigExternalPeer"): + return &hlfkungfusoftwareesv1alpha1.FabricNetworkConfigExternalPeerApplyConfiguration{} case v1alpha1.SchemeGroupVersion.WithKind("FabricNetworkConfigIdentity"): return &hlfkungfusoftwareesv1alpha1.FabricNetworkConfigIdentityApplyConfiguration{} + case v1alpha1.SchemeGroupVersion.WithKind("FabricNetworkConfigOrganization"): + return &hlfkungfusoftwareesv1alpha1.FabricNetworkConfigOrganizationApplyConfiguration{} + case v1alpha1.SchemeGroupVersion.WithKind("FabricNetworkConfigOrgPeer"): + return &hlfkungfusoftwareesv1alpha1.FabricNetworkConfigOrgPeerApplyConfiguration{} case v1alpha1.SchemeGroupVersion.WithKind("FabricNetworkConfigSpec"): return &hlfkungfusoftwareesv1alpha1.FabricNetworkConfigSpecApplyConfiguration{} case v1alpha1.SchemeGroupVersion.WithKind("FabricNetworkConfigStatus"): @@ -253,8 +272,10 @@ func ForKind(kind schema.GroupVersionKind) interface{} { return &hlfkungfusoftwareesv1alpha1.FabricPeerStatusApplyConfiguration{} case v1alpha1.SchemeGroupVersion.WithKind("FabricPeerStorage"): return &hlfkungfusoftwareesv1alpha1.FabricPeerStorageApplyConfiguration{} - case v1alpha1.SchemeGroupVersion.WithKind("FabricTLSCACrypto"): - return &hlfkungfusoftwareesv1alpha1.FabricTLSCACryptoApplyConfiguration{} + case v1alpha1.SchemeGroupVersion.WithKind("FabricTraefik"): + return &hlfkungfusoftwareesv1alpha1.FabricTraefikApplyConfiguration{} + case v1alpha1.SchemeGroupVersion.WithKind("FabricTraefikMiddleware"): + return &hlfkungfusoftwareesv1alpha1.FabricTraefikMiddlewareApplyConfiguration{} case v1alpha1.SchemeGroupVersion.WithKind("GRPCProxy"): return &hlfkungfusoftwareesv1alpha1.GRPCProxyApplyConfiguration{} case v1alpha1.SchemeGroupVersion.WithKind("HLFIdentity"): @@ -285,6 +306,10 @@ func ForKind(kind schema.GroupVersionKind) interface{} { return &hlfkungfusoftwareesv1alpha1.PeerServiceApplyConfiguration{} case v1alpha1.SchemeGroupVersion.WithKind("Secret"): return &hlfkungfusoftwareesv1alpha1.SecretApplyConfiguration{} + case v1alpha1.SchemeGroupVersion.WithKind("SecretRef"): + return &hlfkungfusoftwareesv1alpha1.SecretRefApplyConfiguration{} + case v1alpha1.SchemeGroupVersion.WithKind("SecretRefNSKey"): + return &hlfkungfusoftwareesv1alpha1.SecretRefNSKeyApplyConfiguration{} case v1alpha1.SchemeGroupVersion.WithKind("ServiceMonitor"): return &hlfkungfusoftwareesv1alpha1.ServiceMonitorApplyConfiguration{} case v1alpha1.SchemeGroupVersion.WithKind("Storage"): diff --git a/pkg/client/clientset/versioned/clientset.go b/pkg/client/clientset/versioned/clientset.go index b1a3839e..4a16a1f9 100644 --- a/pkg/client/clientset/versioned/clientset.go +++ b/pkg/client/clientset/versioned/clientset.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by client-gen. DO NOT EDIT. package versioned diff --git a/pkg/client/clientset/versioned/fake/clientset_generated.go b/pkg/client/clientset/versioned/fake/clientset_generated.go index 671453d1..1edb713c 100644 --- a/pkg/client/clientset/versioned/fake/clientset_generated.go +++ b/pkg/client/clientset/versioned/fake/clientset_generated.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by client-gen. DO NOT EDIT. package fake diff --git a/pkg/client/clientset/versioned/fake/doc.go b/pkg/client/clientset/versioned/fake/doc.go index 0b557c37..6c4ef6bf 100644 --- a/pkg/client/clientset/versioned/fake/doc.go +++ b/pkg/client/clientset/versioned/fake/doc.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by client-gen. DO NOT EDIT. // This package has the automatically generated fake clientset. package fake diff --git a/pkg/client/clientset/versioned/fake/register.go b/pkg/client/clientset/versioned/fake/register.go index 4c1d3af1..98ad95ec 100644 --- a/pkg/client/clientset/versioned/fake/register.go +++ b/pkg/client/clientset/versioned/fake/register.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by client-gen. DO NOT EDIT. package fake @@ -25,14 +26,14 @@ var localSchemeBuilder = runtime.SchemeBuilder{ // AddToScheme adds all types of this clientset into the given scheme. This allows composition // of clientsets, like in: // -// import ( -// "k8s.io/client-go/kubernetes" -// clientsetscheme "k8s.io/client-go/kubernetes/scheme" -// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" -// ) +// import ( +// "k8s.io/client-go/kubernetes" +// clientsetscheme "k8s.io/client-go/kubernetes/scheme" +// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" +// ) // -// kclientset, _ := kubernetes.NewForConfig(c) -// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) +// kclientset, _ := kubernetes.NewForConfig(c) +// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) // // After this, RawExtensions in Kubernetes types will serialize kube-aggregator types // correctly. diff --git a/pkg/client/clientset/versioned/scheme/doc.go b/pkg/client/clientset/versioned/scheme/doc.go index 08313f93..a9c4f32c 100644 --- a/pkg/client/clientset/versioned/scheme/doc.go +++ b/pkg/client/clientset/versioned/scheme/doc.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by client-gen. DO NOT EDIT. // This package contains the scheme of the automatically generated clientset. package scheme diff --git a/pkg/client/clientset/versioned/scheme/register.go b/pkg/client/clientset/versioned/scheme/register.go index 37e028ec..559213ec 100644 --- a/pkg/client/clientset/versioned/scheme/register.go +++ b/pkg/client/clientset/versioned/scheme/register.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by client-gen. DO NOT EDIT. package scheme @@ -25,14 +26,14 @@ var localSchemeBuilder = runtime.SchemeBuilder{ // AddToScheme adds all types of this clientset into the given scheme. This allows composition // of clientsets, like in: // -// import ( -// "k8s.io/client-go/kubernetes" -// clientsetscheme "k8s.io/client-go/kubernetes/scheme" -// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" -// ) +// import ( +// "k8s.io/client-go/kubernetes" +// clientsetscheme "k8s.io/client-go/kubernetes/scheme" +// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" +// ) // -// kclientset, _ := kubernetes.NewForConfig(c) -// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) +// kclientset, _ := kubernetes.NewForConfig(c) +// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) // // After this, RawExtensions in Kubernetes types will serialize kube-aggregator types // correctly. diff --git a/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/doc.go b/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/doc.go index 4615b9f8..3b006977 100644 --- a/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/doc.go +++ b/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/doc.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by client-gen. DO NOT EDIT. // This package has the automatically generated typed clients. package v1alpha1 diff --git a/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fabricca.go b/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fabricca.go index bfb55c8b..daeb86c9 100644 --- a/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fabricca.go +++ b/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fabricca.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by client-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fabricchaincode.go b/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fabricchaincode.go index 3d05236c..15f2245a 100644 --- a/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fabricchaincode.go +++ b/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fabricchaincode.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by client-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fabricchaincodetemplate.go b/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fabricchaincodetemplate.go new file mode 100644 index 00000000..6846b46c --- /dev/null +++ b/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fabricchaincodetemplate.go @@ -0,0 +1,245 @@ +/* + * Copyright Kungfusoftware.es. All Rights Reserved. + * + * SPDX-License-Identifier: Apache-2.0 + */ +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + json "encoding/json" + "fmt" + "time" + + v1alpha1 "github.com/kfsoftware/hlf-operator/api/hlf.kungfusoftware.es/v1alpha1" + hlfkungfusoftwareesv1alpha1 "github.com/kfsoftware/hlf-operator/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1" + scheme "github.com/kfsoftware/hlf-operator/pkg/client/clientset/versioned/scheme" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// FabricChaincodeTemplatesGetter has a method to return a FabricChaincodeTemplateInterface. +// A group's client should implement this interface. +type FabricChaincodeTemplatesGetter interface { + FabricChaincodeTemplates(namespace string) FabricChaincodeTemplateInterface +} + +// FabricChaincodeTemplateInterface has methods to work with FabricChaincodeTemplate resources. +type FabricChaincodeTemplateInterface interface { + Create(ctx context.Context, fabricChaincodeTemplate *v1alpha1.FabricChaincodeTemplate, opts v1.CreateOptions) (*v1alpha1.FabricChaincodeTemplate, error) + Update(ctx context.Context, fabricChaincodeTemplate *v1alpha1.FabricChaincodeTemplate, opts v1.UpdateOptions) (*v1alpha1.FabricChaincodeTemplate, error) + UpdateStatus(ctx context.Context, fabricChaincodeTemplate *v1alpha1.FabricChaincodeTemplate, opts v1.UpdateOptions) (*v1alpha1.FabricChaincodeTemplate, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.FabricChaincodeTemplate, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.FabricChaincodeTemplateList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.FabricChaincodeTemplate, err error) + Apply(ctx context.Context, fabricChaincodeTemplate *hlfkungfusoftwareesv1alpha1.FabricChaincodeTemplateApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.FabricChaincodeTemplate, err error) + ApplyStatus(ctx context.Context, fabricChaincodeTemplate *hlfkungfusoftwareesv1alpha1.FabricChaincodeTemplateApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.FabricChaincodeTemplate, err error) + FabricChaincodeTemplateExpansion +} + +// fabricChaincodeTemplates implements FabricChaincodeTemplateInterface +type fabricChaincodeTemplates struct { + client rest.Interface + ns string +} + +// newFabricChaincodeTemplates returns a FabricChaincodeTemplates +func newFabricChaincodeTemplates(c *HlfV1alpha1Client, namespace string) *fabricChaincodeTemplates { + return &fabricChaincodeTemplates{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Get takes name of the fabricChaincodeTemplate, and returns the corresponding fabricChaincodeTemplate object, and an error if there is any. +func (c *fabricChaincodeTemplates) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.FabricChaincodeTemplate, err error) { + result = &v1alpha1.FabricChaincodeTemplate{} + err = c.client.Get(). + Namespace(c.ns). + Resource("fabricchaincodetemplates"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of FabricChaincodeTemplates that match those selectors. +func (c *fabricChaincodeTemplates) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.FabricChaincodeTemplateList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1alpha1.FabricChaincodeTemplateList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("fabricchaincodetemplates"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested fabricChaincodeTemplates. +func (c *fabricChaincodeTemplates) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Namespace(c.ns). + Resource("fabricchaincodetemplates"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a fabricChaincodeTemplate and creates it. Returns the server's representation of the fabricChaincodeTemplate, and an error, if there is any. +func (c *fabricChaincodeTemplates) Create(ctx context.Context, fabricChaincodeTemplate *v1alpha1.FabricChaincodeTemplate, opts v1.CreateOptions) (result *v1alpha1.FabricChaincodeTemplate, err error) { + result = &v1alpha1.FabricChaincodeTemplate{} + err = c.client.Post(). + Namespace(c.ns). + Resource("fabricchaincodetemplates"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(fabricChaincodeTemplate). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a fabricChaincodeTemplate and updates it. Returns the server's representation of the fabricChaincodeTemplate, and an error, if there is any. +func (c *fabricChaincodeTemplates) Update(ctx context.Context, fabricChaincodeTemplate *v1alpha1.FabricChaincodeTemplate, opts v1.UpdateOptions) (result *v1alpha1.FabricChaincodeTemplate, err error) { + result = &v1alpha1.FabricChaincodeTemplate{} + err = c.client.Put(). + Namespace(c.ns). + Resource("fabricchaincodetemplates"). + Name(fabricChaincodeTemplate.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(fabricChaincodeTemplate). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *fabricChaincodeTemplates) UpdateStatus(ctx context.Context, fabricChaincodeTemplate *v1alpha1.FabricChaincodeTemplate, opts v1.UpdateOptions) (result *v1alpha1.FabricChaincodeTemplate, err error) { + result = &v1alpha1.FabricChaincodeTemplate{} + err = c.client.Put(). + Namespace(c.ns). + Resource("fabricchaincodetemplates"). + Name(fabricChaincodeTemplate.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(fabricChaincodeTemplate). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the fabricChaincodeTemplate and deletes it. Returns an error if one occurs. +func (c *fabricChaincodeTemplates) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("fabricchaincodetemplates"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *fabricChaincodeTemplates) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Namespace(c.ns). + Resource("fabricchaincodetemplates"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched fabricChaincodeTemplate. +func (c *fabricChaincodeTemplates) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.FabricChaincodeTemplate, err error) { + result = &v1alpha1.FabricChaincodeTemplate{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("fabricchaincodetemplates"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied fabricChaincodeTemplate. +func (c *fabricChaincodeTemplates) Apply(ctx context.Context, fabricChaincodeTemplate *hlfkungfusoftwareesv1alpha1.FabricChaincodeTemplateApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.FabricChaincodeTemplate, err error) { + if fabricChaincodeTemplate == nil { + return nil, fmt.Errorf("fabricChaincodeTemplate provided to Apply must not be nil") + } + patchOpts := opts.ToPatchOptions() + data, err := json.Marshal(fabricChaincodeTemplate) + if err != nil { + return nil, err + } + name := fabricChaincodeTemplate.Name + if name == nil { + return nil, fmt.Errorf("fabricChaincodeTemplate.Name must be provided to Apply") + } + result = &v1alpha1.FabricChaincodeTemplate{} + err = c.client.Patch(types.ApplyPatchType). + Namespace(c.ns). + Resource("fabricchaincodetemplates"). + Name(*name). + VersionedParams(&patchOpts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} + +// ApplyStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). +func (c *fabricChaincodeTemplates) ApplyStatus(ctx context.Context, fabricChaincodeTemplate *hlfkungfusoftwareesv1alpha1.FabricChaincodeTemplateApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.FabricChaincodeTemplate, err error) { + if fabricChaincodeTemplate == nil { + return nil, fmt.Errorf("fabricChaincodeTemplate provided to Apply must not be nil") + } + patchOpts := opts.ToPatchOptions() + data, err := json.Marshal(fabricChaincodeTemplate) + if err != nil { + return nil, err + } + + name := fabricChaincodeTemplate.Name + if name == nil { + return nil, fmt.Errorf("fabricChaincodeTemplate.Name must be provided to Apply") + } + + result = &v1alpha1.FabricChaincodeTemplate{} + err = c.client.Patch(types.ApplyPatchType). + Namespace(c.ns). + Resource("fabricchaincodetemplates"). + Name(*name). + SubResource("status"). + VersionedParams(&patchOpts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fabricexplorer.go b/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fabricexplorer.go index 2a6be011..f5f5a718 100644 --- a/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fabricexplorer.go +++ b/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fabricexplorer.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by client-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fabricfollowerchannel.go b/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fabricfollowerchannel.go index 5ac183df..1faecdb9 100644 --- a/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fabricfollowerchannel.go +++ b/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fabricfollowerchannel.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by client-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fabricidentity.go b/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fabricidentity.go index cb8b4549..0dbad619 100644 --- a/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fabricidentity.go +++ b/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fabricidentity.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by client-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fabricmainchannel.go b/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fabricmainchannel.go index 501d961f..435ae074 100644 --- a/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fabricmainchannel.go +++ b/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fabricmainchannel.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by client-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fabricnetworkconfig.go b/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fabricnetworkconfig.go index 8c7db391..6f085fcf 100644 --- a/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fabricnetworkconfig.go +++ b/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fabricnetworkconfig.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by client-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fabricoperationsconsole.go b/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fabricoperationsconsole.go index 9638137d..0cb7c8fa 100644 --- a/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fabricoperationsconsole.go +++ b/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fabricoperationsconsole.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by client-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fabricoperatorapi.go b/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fabricoperatorapi.go index 4cdd37b3..7b5dd74b 100644 --- a/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fabricoperatorapi.go +++ b/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fabricoperatorapi.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by client-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fabricoperatorui.go b/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fabricoperatorui.go index 1e6ca847..1afa1032 100644 --- a/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fabricoperatorui.go +++ b/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fabricoperatorui.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by client-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fabricorderernode.go b/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fabricorderernode.go index 7fa8cad8..9ace2b4b 100644 --- a/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fabricorderernode.go +++ b/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fabricorderernode.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by client-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fabricorderingservice.go b/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fabricorderingservice.go index 04d95a1b..5bfa9a01 100644 --- a/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fabricorderingservice.go +++ b/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fabricorderingservice.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by client-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fabricpeer.go b/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fabricpeer.go index 5ad01025..f1ddcbb5 100644 --- a/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fabricpeer.go +++ b/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fabricpeer.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by client-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fake/doc.go b/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fake/doc.go index 60760a09..cf320aac 100644 --- a/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fake/doc.go +++ b/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fake/doc.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by client-gen. DO NOT EDIT. // Package fake has the automatically generated clients. package fake diff --git a/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fake/fake_fabricca.go b/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fake/fake_fabricca.go index d025b028..88c932e0 100644 --- a/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fake/fake_fabricca.go +++ b/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fake/fake_fabricca.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by client-gen. DO NOT EDIT. package fake diff --git a/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fake/fake_fabricchaincode.go b/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fake/fake_fabricchaincode.go index 05039dd4..0bda98e7 100644 --- a/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fake/fake_fabricchaincode.go +++ b/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fake/fake_fabricchaincode.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by client-gen. DO NOT EDIT. package fake diff --git a/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fake/fake_fabricchaincodetemplate.go b/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fake/fake_fabricchaincodetemplate.go new file mode 100644 index 00000000..589e6fbe --- /dev/null +++ b/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fake/fake_fabricchaincodetemplate.go @@ -0,0 +1,178 @@ +/* + * Copyright Kungfusoftware.es. All Rights Reserved. + * + * SPDX-License-Identifier: Apache-2.0 + */ +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + v1alpha1 "github.com/kfsoftware/hlf-operator/api/hlf.kungfusoftware.es/v1alpha1" + hlfkungfusoftwareesv1alpha1 "github.com/kfsoftware/hlf-operator/pkg/client/applyconfiguration/hlf.kungfusoftware.es/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + testing "k8s.io/client-go/testing" +) + +// FakeFabricChaincodeTemplates implements FabricChaincodeTemplateInterface +type FakeFabricChaincodeTemplates struct { + Fake *FakeHlfV1alpha1 + ns string +} + +var fabricchaincodetemplatesResource = v1alpha1.SchemeGroupVersion.WithResource("fabricchaincodetemplates") + +var fabricchaincodetemplatesKind = v1alpha1.SchemeGroupVersion.WithKind("FabricChaincodeTemplate") + +// Get takes name of the fabricChaincodeTemplate, and returns the corresponding fabricChaincodeTemplate object, and an error if there is any. +func (c *FakeFabricChaincodeTemplates) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.FabricChaincodeTemplate, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(fabricchaincodetemplatesResource, c.ns, name), &v1alpha1.FabricChaincodeTemplate{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.FabricChaincodeTemplate), err +} + +// List takes label and field selectors, and returns the list of FabricChaincodeTemplates that match those selectors. +func (c *FakeFabricChaincodeTemplates) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.FabricChaincodeTemplateList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(fabricchaincodetemplatesResource, fabricchaincodetemplatesKind, c.ns, opts), &v1alpha1.FabricChaincodeTemplateList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1alpha1.FabricChaincodeTemplateList{ListMeta: obj.(*v1alpha1.FabricChaincodeTemplateList).ListMeta} + for _, item := range obj.(*v1alpha1.FabricChaincodeTemplateList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested fabricChaincodeTemplates. +func (c *FakeFabricChaincodeTemplates) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(fabricchaincodetemplatesResource, c.ns, opts)) + +} + +// Create takes the representation of a fabricChaincodeTemplate and creates it. Returns the server's representation of the fabricChaincodeTemplate, and an error, if there is any. +func (c *FakeFabricChaincodeTemplates) Create(ctx context.Context, fabricChaincodeTemplate *v1alpha1.FabricChaincodeTemplate, opts v1.CreateOptions) (result *v1alpha1.FabricChaincodeTemplate, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(fabricchaincodetemplatesResource, c.ns, fabricChaincodeTemplate), &v1alpha1.FabricChaincodeTemplate{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.FabricChaincodeTemplate), err +} + +// Update takes the representation of a fabricChaincodeTemplate and updates it. Returns the server's representation of the fabricChaincodeTemplate, and an error, if there is any. +func (c *FakeFabricChaincodeTemplates) Update(ctx context.Context, fabricChaincodeTemplate *v1alpha1.FabricChaincodeTemplate, opts v1.UpdateOptions) (result *v1alpha1.FabricChaincodeTemplate, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(fabricchaincodetemplatesResource, c.ns, fabricChaincodeTemplate), &v1alpha1.FabricChaincodeTemplate{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.FabricChaincodeTemplate), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeFabricChaincodeTemplates) UpdateStatus(ctx context.Context, fabricChaincodeTemplate *v1alpha1.FabricChaincodeTemplate, opts v1.UpdateOptions) (*v1alpha1.FabricChaincodeTemplate, error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceAction(fabricchaincodetemplatesResource, "status", c.ns, fabricChaincodeTemplate), &v1alpha1.FabricChaincodeTemplate{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.FabricChaincodeTemplate), err +} + +// Delete takes name of the fabricChaincodeTemplate and deletes it. Returns an error if one occurs. +func (c *FakeFabricChaincodeTemplates) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteActionWithOptions(fabricchaincodetemplatesResource, c.ns, name, opts), &v1alpha1.FabricChaincodeTemplate{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeFabricChaincodeTemplates) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(fabricchaincodetemplatesResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &v1alpha1.FabricChaincodeTemplateList{}) + return err +} + +// Patch applies the patch and returns the patched fabricChaincodeTemplate. +func (c *FakeFabricChaincodeTemplates) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.FabricChaincodeTemplate, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(fabricchaincodetemplatesResource, c.ns, name, pt, data, subresources...), &v1alpha1.FabricChaincodeTemplate{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.FabricChaincodeTemplate), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied fabricChaincodeTemplate. +func (c *FakeFabricChaincodeTemplates) Apply(ctx context.Context, fabricChaincodeTemplate *hlfkungfusoftwareesv1alpha1.FabricChaincodeTemplateApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.FabricChaincodeTemplate, err error) { + if fabricChaincodeTemplate == nil { + return nil, fmt.Errorf("fabricChaincodeTemplate provided to Apply must not be nil") + } + data, err := json.Marshal(fabricChaincodeTemplate) + if err != nil { + return nil, err + } + name := fabricChaincodeTemplate.Name + if name == nil { + return nil, fmt.Errorf("fabricChaincodeTemplate.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(fabricchaincodetemplatesResource, c.ns, *name, types.ApplyPatchType, data), &v1alpha1.FabricChaincodeTemplate{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.FabricChaincodeTemplate), err +} + +// ApplyStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). +func (c *FakeFabricChaincodeTemplates) ApplyStatus(ctx context.Context, fabricChaincodeTemplate *hlfkungfusoftwareesv1alpha1.FabricChaincodeTemplateApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.FabricChaincodeTemplate, err error) { + if fabricChaincodeTemplate == nil { + return nil, fmt.Errorf("fabricChaincodeTemplate provided to Apply must not be nil") + } + data, err := json.Marshal(fabricChaincodeTemplate) + if err != nil { + return nil, err + } + name := fabricChaincodeTemplate.Name + if name == nil { + return nil, fmt.Errorf("fabricChaincodeTemplate.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(fabricchaincodetemplatesResource, c.ns, *name, types.ApplyPatchType, data, "status"), &v1alpha1.FabricChaincodeTemplate{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.FabricChaincodeTemplate), err +} diff --git a/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fake/fake_fabricexplorer.go b/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fake/fake_fabricexplorer.go index e54a77b5..1fd7f5b0 100644 --- a/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fake/fake_fabricexplorer.go +++ b/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fake/fake_fabricexplorer.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by client-gen. DO NOT EDIT. package fake diff --git a/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fake/fake_fabricfollowerchannel.go b/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fake/fake_fabricfollowerchannel.go index 55f8aab8..4b5bfb21 100644 --- a/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fake/fake_fabricfollowerchannel.go +++ b/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fake/fake_fabricfollowerchannel.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by client-gen. DO NOT EDIT. package fake diff --git a/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fake/fake_fabricidentity.go b/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fake/fake_fabricidentity.go index 7fdfb4f0..b6869c8b 100644 --- a/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fake/fake_fabricidentity.go +++ b/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fake/fake_fabricidentity.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by client-gen. DO NOT EDIT. package fake diff --git a/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fake/fake_fabricmainchannel.go b/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fake/fake_fabricmainchannel.go index b47a2802..7d5d6be5 100644 --- a/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fake/fake_fabricmainchannel.go +++ b/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fake/fake_fabricmainchannel.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by client-gen. DO NOT EDIT. package fake diff --git a/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fake/fake_fabricnetworkconfig.go b/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fake/fake_fabricnetworkconfig.go index a0cacb29..01cab027 100644 --- a/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fake/fake_fabricnetworkconfig.go +++ b/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fake/fake_fabricnetworkconfig.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by client-gen. DO NOT EDIT. package fake diff --git a/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fake/fake_fabricoperationsconsole.go b/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fake/fake_fabricoperationsconsole.go index 947b3be2..e086a1cc 100644 --- a/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fake/fake_fabricoperationsconsole.go +++ b/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fake/fake_fabricoperationsconsole.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by client-gen. DO NOT EDIT. package fake diff --git a/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fake/fake_fabricoperatorapi.go b/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fake/fake_fabricoperatorapi.go index 815a8ca1..efeb4c93 100644 --- a/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fake/fake_fabricoperatorapi.go +++ b/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fake/fake_fabricoperatorapi.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by client-gen. DO NOT EDIT. package fake diff --git a/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fake/fake_fabricoperatorui.go b/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fake/fake_fabricoperatorui.go index b6fa7196..3f0c4dd7 100644 --- a/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fake/fake_fabricoperatorui.go +++ b/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fake/fake_fabricoperatorui.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by client-gen. DO NOT EDIT. package fake diff --git a/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fake/fake_fabricorderernode.go b/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fake/fake_fabricorderernode.go index f534424f..db06dd2b 100644 --- a/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fake/fake_fabricorderernode.go +++ b/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fake/fake_fabricorderernode.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by client-gen. DO NOT EDIT. package fake diff --git a/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fake/fake_fabricorderingservice.go b/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fake/fake_fabricorderingservice.go index e5e90309..a3cf11aa 100644 --- a/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fake/fake_fabricorderingservice.go +++ b/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fake/fake_fabricorderingservice.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by client-gen. DO NOT EDIT. package fake diff --git a/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fake/fake_fabricpeer.go b/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fake/fake_fabricpeer.go index 5ad79011..7697cc3b 100644 --- a/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fake/fake_fabricpeer.go +++ b/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fake/fake_fabricpeer.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by client-gen. DO NOT EDIT. package fake diff --git a/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fake/fake_hlf.kungfusoftware.es_client.go b/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fake/fake_hlf.kungfusoftware.es_client.go index decb09d5..d3964f27 100644 --- a/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fake/fake_hlf.kungfusoftware.es_client.go +++ b/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/fake/fake_hlf.kungfusoftware.es_client.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by client-gen. DO NOT EDIT. package fake @@ -24,6 +25,10 @@ func (c *FakeHlfV1alpha1) FabricChaincodes(namespace string) v1alpha1.FabricChai return &FakeFabricChaincodes{c, namespace} } +func (c *FakeHlfV1alpha1) FabricChaincodeTemplates(namespace string) v1alpha1.FabricChaincodeTemplateInterface { + return &FakeFabricChaincodeTemplates{c, namespace} +} + func (c *FakeHlfV1alpha1) FabricExplorers(namespace string) v1alpha1.FabricExplorerInterface { return &FakeFabricExplorers{c, namespace} } diff --git a/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/generated_expansion.go b/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/generated_expansion.go index 663e937f..cdcd3d86 100644 --- a/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/generated_expansion.go +++ b/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/generated_expansion.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by client-gen. DO NOT EDIT. package v1alpha1 @@ -10,6 +11,8 @@ type FabricCAExpansion interface{} type FabricChaincodeExpansion interface{} +type FabricChaincodeTemplateExpansion interface{} + type FabricExplorerExpansion interface{} type FabricFollowerChannelExpansion interface{} diff --git a/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/hlf.kungfusoftware.es_client.go b/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/hlf.kungfusoftware.es_client.go index 7fea47fa..9e8e07a8 100644 --- a/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/hlf.kungfusoftware.es_client.go +++ b/pkg/client/clientset/versioned/typed/hlf.kungfusoftware.es/v1alpha1/hlf.kungfusoftware.es_client.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by client-gen. DO NOT EDIT. package v1alpha1 @@ -18,6 +19,7 @@ type HlfV1alpha1Interface interface { RESTClient() rest.Interface FabricCAsGetter FabricChaincodesGetter + FabricChaincodeTemplatesGetter FabricExplorersGetter FabricFollowerChannelsGetter FabricIdentitiesGetter @@ -44,6 +46,10 @@ func (c *HlfV1alpha1Client) FabricChaincodes(namespace string) FabricChaincodeIn return newFabricChaincodes(c, namespace) } +func (c *HlfV1alpha1Client) FabricChaincodeTemplates(namespace string) FabricChaincodeTemplateInterface { + return newFabricChaincodeTemplates(c, namespace) +} + func (c *HlfV1alpha1Client) FabricExplorers(namespace string) FabricExplorerInterface { return newFabricExplorers(c, namespace) } diff --git a/pkg/client/informers/externalversions/factory.go b/pkg/client/informers/externalversions/factory.go index ab1e01c9..1023f865 100644 --- a/pkg/client/informers/externalversions/factory.go +++ b/pkg/client/informers/externalversions/factory.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by informer-gen. DO NOT EDIT. package externalversions @@ -182,25 +183,25 @@ func (f *sharedInformerFactory) InformerFor(obj runtime.Object, newFunc internal // // It is typically used like this: // -// ctx, cancel := context.Background() -// defer cancel() -// factory := NewSharedInformerFactory(client, resyncPeriod) -// defer factory.WaitForStop() // Returns immediately if nothing was started. -// genericInformer := factory.ForResource(resource) -// typedInformer := factory.SomeAPIGroup().V1().SomeType() -// factory.Start(ctx.Done()) // Start processing these informers. -// synced := factory.WaitForCacheSync(ctx.Done()) -// for v, ok := range synced { -// if !ok { -// fmt.Fprintf(os.Stderr, "caches failed to sync: %v", v) -// return -// } -// } +// ctx, cancel := context.Background() +// defer cancel() +// factory := NewSharedInformerFactory(client, resyncPeriod) +// defer factory.WaitForStop() // Returns immediately if nothing was started. +// genericInformer := factory.ForResource(resource) +// typedInformer := factory.SomeAPIGroup().V1().SomeType() +// factory.Start(ctx.Done()) // Start processing these informers. +// synced := factory.WaitForCacheSync(ctx.Done()) +// for v, ok := range synced { +// if !ok { +// fmt.Fprintf(os.Stderr, "caches failed to sync: %v", v) +// return +// } +// } // -// // Creating informers can also be created after Start, but then -// // Start must be called again: -// anotherGenericInformer := factory.ForResource(resource) -// factory.Start(ctx.Done()) +// // Creating informers can also be created after Start, but then +// // Start must be called again: +// anotherGenericInformer := factory.ForResource(resource) +// factory.Start(ctx.Done()) type SharedInformerFactory interface { internalinterfaces.SharedInformerFactory diff --git a/pkg/client/informers/externalversions/generic.go b/pkg/client/informers/externalversions/generic.go index c53d4b5d..14cfbf52 100644 --- a/pkg/client/informers/externalversions/generic.go +++ b/pkg/client/informers/externalversions/generic.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by informer-gen. DO NOT EDIT. package externalversions @@ -45,6 +46,8 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource return &genericInformer{resource: resource.GroupResource(), informer: f.Hlf().V1alpha1().FabricCAs().Informer()}, nil case v1alpha1.SchemeGroupVersion.WithResource("fabricchaincodes"): return &genericInformer{resource: resource.GroupResource(), informer: f.Hlf().V1alpha1().FabricChaincodes().Informer()}, nil + case v1alpha1.SchemeGroupVersion.WithResource("fabricchaincodetemplates"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Hlf().V1alpha1().FabricChaincodeTemplates().Informer()}, nil case v1alpha1.SchemeGroupVersion.WithResource("fabricexplorers"): return &genericInformer{resource: resource.GroupResource(), informer: f.Hlf().V1alpha1().FabricExplorers().Informer()}, nil case v1alpha1.SchemeGroupVersion.WithResource("fabricfollowerchannels"): diff --git a/pkg/client/informers/externalversions/hlf.kungfusoftware.es/interface.go b/pkg/client/informers/externalversions/hlf.kungfusoftware.es/interface.go index 91ad453c..610183c3 100644 --- a/pkg/client/informers/externalversions/hlf.kungfusoftware.es/interface.go +++ b/pkg/client/informers/externalversions/hlf.kungfusoftware.es/interface.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by informer-gen. DO NOT EDIT. package hlf diff --git a/pkg/client/informers/externalversions/hlf.kungfusoftware.es/v1alpha1/fabricca.go b/pkg/client/informers/externalversions/hlf.kungfusoftware.es/v1alpha1/fabricca.go index b9f7c97c..7fd7a75e 100644 --- a/pkg/client/informers/externalversions/hlf.kungfusoftware.es/v1alpha1/fabricca.go +++ b/pkg/client/informers/externalversions/hlf.kungfusoftware.es/v1alpha1/fabricca.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by informer-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/informers/externalversions/hlf.kungfusoftware.es/v1alpha1/fabricchaincode.go b/pkg/client/informers/externalversions/hlf.kungfusoftware.es/v1alpha1/fabricchaincode.go index 8699515a..297a0d67 100644 --- a/pkg/client/informers/externalversions/hlf.kungfusoftware.es/v1alpha1/fabricchaincode.go +++ b/pkg/client/informers/externalversions/hlf.kungfusoftware.es/v1alpha1/fabricchaincode.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by informer-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/informers/externalversions/hlf.kungfusoftware.es/v1alpha1/fabricchaincodetemplate.go b/pkg/client/informers/externalversions/hlf.kungfusoftware.es/v1alpha1/fabricchaincodetemplate.go new file mode 100644 index 00000000..cc80315b --- /dev/null +++ b/pkg/client/informers/externalversions/hlf.kungfusoftware.es/v1alpha1/fabricchaincodetemplate.go @@ -0,0 +1,79 @@ +/* + * Copyright Kungfusoftware.es. All Rights Reserved. + * + * SPDX-License-Identifier: Apache-2.0 + */ +// Code generated by informer-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + time "time" + + hlfkungfusoftwareesv1alpha1 "github.com/kfsoftware/hlf-operator/api/hlf.kungfusoftware.es/v1alpha1" + versioned "github.com/kfsoftware/hlf-operator/pkg/client/clientset/versioned" + internalinterfaces "github.com/kfsoftware/hlf-operator/pkg/client/informers/externalversions/internalinterfaces" + v1alpha1 "github.com/kfsoftware/hlf-operator/pkg/client/listers/hlf.kungfusoftware.es/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +// FabricChaincodeTemplateInformer provides access to a shared informer and lister for +// FabricChaincodeTemplates. +type FabricChaincodeTemplateInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1alpha1.FabricChaincodeTemplateLister +} + +type fabricChaincodeTemplateInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc + namespace string +} + +// NewFabricChaincodeTemplateInformer constructs a new informer for FabricChaincodeTemplate type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewFabricChaincodeTemplateInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return NewFilteredFabricChaincodeTemplateInformer(client, namespace, resyncPeriod, indexers, nil) +} + +// NewFilteredFabricChaincodeTemplateInformer constructs a new informer for FabricChaincodeTemplate type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewFilteredFabricChaincodeTemplateInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { + return cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.HlfV1alpha1().FabricChaincodeTemplates(namespace).List(context.TODO(), options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.HlfV1alpha1().FabricChaincodeTemplates(namespace).Watch(context.TODO(), options) + }, + }, + &hlfkungfusoftwareesv1alpha1.FabricChaincodeTemplate{}, + resyncPeriod, + indexers, + ) +} + +func (f *fabricChaincodeTemplateInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredFabricChaincodeTemplateInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *fabricChaincodeTemplateInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&hlfkungfusoftwareesv1alpha1.FabricChaincodeTemplate{}, f.defaultInformer) +} + +func (f *fabricChaincodeTemplateInformer) Lister() v1alpha1.FabricChaincodeTemplateLister { + return v1alpha1.NewFabricChaincodeTemplateLister(f.Informer().GetIndexer()) +} diff --git a/pkg/client/informers/externalversions/hlf.kungfusoftware.es/v1alpha1/fabricexplorer.go b/pkg/client/informers/externalversions/hlf.kungfusoftware.es/v1alpha1/fabricexplorer.go index 537ee397..039d84ba 100644 --- a/pkg/client/informers/externalversions/hlf.kungfusoftware.es/v1alpha1/fabricexplorer.go +++ b/pkg/client/informers/externalversions/hlf.kungfusoftware.es/v1alpha1/fabricexplorer.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by informer-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/informers/externalversions/hlf.kungfusoftware.es/v1alpha1/fabricfollowerchannel.go b/pkg/client/informers/externalversions/hlf.kungfusoftware.es/v1alpha1/fabricfollowerchannel.go index 597a13f0..6f2d9602 100644 --- a/pkg/client/informers/externalversions/hlf.kungfusoftware.es/v1alpha1/fabricfollowerchannel.go +++ b/pkg/client/informers/externalversions/hlf.kungfusoftware.es/v1alpha1/fabricfollowerchannel.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by informer-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/informers/externalversions/hlf.kungfusoftware.es/v1alpha1/fabricidentity.go b/pkg/client/informers/externalversions/hlf.kungfusoftware.es/v1alpha1/fabricidentity.go index 30f9a617..cdfbce0a 100644 --- a/pkg/client/informers/externalversions/hlf.kungfusoftware.es/v1alpha1/fabricidentity.go +++ b/pkg/client/informers/externalversions/hlf.kungfusoftware.es/v1alpha1/fabricidentity.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by informer-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/informers/externalversions/hlf.kungfusoftware.es/v1alpha1/fabricmainchannel.go b/pkg/client/informers/externalversions/hlf.kungfusoftware.es/v1alpha1/fabricmainchannel.go index 7e8c279b..237e7f28 100644 --- a/pkg/client/informers/externalversions/hlf.kungfusoftware.es/v1alpha1/fabricmainchannel.go +++ b/pkg/client/informers/externalversions/hlf.kungfusoftware.es/v1alpha1/fabricmainchannel.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by informer-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/informers/externalversions/hlf.kungfusoftware.es/v1alpha1/fabricnetworkconfig.go b/pkg/client/informers/externalversions/hlf.kungfusoftware.es/v1alpha1/fabricnetworkconfig.go index a58f281e..b51cc116 100644 --- a/pkg/client/informers/externalversions/hlf.kungfusoftware.es/v1alpha1/fabricnetworkconfig.go +++ b/pkg/client/informers/externalversions/hlf.kungfusoftware.es/v1alpha1/fabricnetworkconfig.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by informer-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/informers/externalversions/hlf.kungfusoftware.es/v1alpha1/fabricoperationsconsole.go b/pkg/client/informers/externalversions/hlf.kungfusoftware.es/v1alpha1/fabricoperationsconsole.go index 652f01bc..25a522b9 100644 --- a/pkg/client/informers/externalversions/hlf.kungfusoftware.es/v1alpha1/fabricoperationsconsole.go +++ b/pkg/client/informers/externalversions/hlf.kungfusoftware.es/v1alpha1/fabricoperationsconsole.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by informer-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/informers/externalversions/hlf.kungfusoftware.es/v1alpha1/fabricoperatorapi.go b/pkg/client/informers/externalversions/hlf.kungfusoftware.es/v1alpha1/fabricoperatorapi.go index 731b6aae..1ad820fe 100644 --- a/pkg/client/informers/externalversions/hlf.kungfusoftware.es/v1alpha1/fabricoperatorapi.go +++ b/pkg/client/informers/externalversions/hlf.kungfusoftware.es/v1alpha1/fabricoperatorapi.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by informer-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/informers/externalversions/hlf.kungfusoftware.es/v1alpha1/fabricoperatorui.go b/pkg/client/informers/externalversions/hlf.kungfusoftware.es/v1alpha1/fabricoperatorui.go index a8dc606a..ad67fe6e 100644 --- a/pkg/client/informers/externalversions/hlf.kungfusoftware.es/v1alpha1/fabricoperatorui.go +++ b/pkg/client/informers/externalversions/hlf.kungfusoftware.es/v1alpha1/fabricoperatorui.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by informer-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/informers/externalversions/hlf.kungfusoftware.es/v1alpha1/fabricorderernode.go b/pkg/client/informers/externalversions/hlf.kungfusoftware.es/v1alpha1/fabricorderernode.go index e13ccc79..871ab34a 100644 --- a/pkg/client/informers/externalversions/hlf.kungfusoftware.es/v1alpha1/fabricorderernode.go +++ b/pkg/client/informers/externalversions/hlf.kungfusoftware.es/v1alpha1/fabricorderernode.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by informer-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/informers/externalversions/hlf.kungfusoftware.es/v1alpha1/fabricorderingservice.go b/pkg/client/informers/externalversions/hlf.kungfusoftware.es/v1alpha1/fabricorderingservice.go index 09681635..3c58d8dc 100644 --- a/pkg/client/informers/externalversions/hlf.kungfusoftware.es/v1alpha1/fabricorderingservice.go +++ b/pkg/client/informers/externalversions/hlf.kungfusoftware.es/v1alpha1/fabricorderingservice.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by informer-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/informers/externalversions/hlf.kungfusoftware.es/v1alpha1/fabricpeer.go b/pkg/client/informers/externalversions/hlf.kungfusoftware.es/v1alpha1/fabricpeer.go index 08c5c5bf..12cb9bdc 100644 --- a/pkg/client/informers/externalversions/hlf.kungfusoftware.es/v1alpha1/fabricpeer.go +++ b/pkg/client/informers/externalversions/hlf.kungfusoftware.es/v1alpha1/fabricpeer.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by informer-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/informers/externalversions/hlf.kungfusoftware.es/v1alpha1/interface.go b/pkg/client/informers/externalversions/hlf.kungfusoftware.es/v1alpha1/interface.go index 84cb3c08..562bb40d 100644 --- a/pkg/client/informers/externalversions/hlf.kungfusoftware.es/v1alpha1/interface.go +++ b/pkg/client/informers/externalversions/hlf.kungfusoftware.es/v1alpha1/interface.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by informer-gen. DO NOT EDIT. package v1alpha1 @@ -16,6 +17,8 @@ type Interface interface { FabricCAs() FabricCAInformer // FabricChaincodes returns a FabricChaincodeInformer. FabricChaincodes() FabricChaincodeInformer + // FabricChaincodeTemplates returns a FabricChaincodeTemplateInformer. + FabricChaincodeTemplates() FabricChaincodeTemplateInformer // FabricExplorers returns a FabricExplorerInformer. FabricExplorers() FabricExplorerInformer // FabricFollowerChannels returns a FabricFollowerChannelInformer. @@ -61,6 +64,11 @@ func (v *version) FabricChaincodes() FabricChaincodeInformer { return &fabricChaincodeInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} } +// FabricChaincodeTemplates returns a FabricChaincodeTemplateInformer. +func (v *version) FabricChaincodeTemplates() FabricChaincodeTemplateInformer { + return &fabricChaincodeTemplateInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} +} + // FabricExplorers returns a FabricExplorerInformer. func (v *version) FabricExplorers() FabricExplorerInformer { return &fabricExplorerInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} diff --git a/pkg/client/informers/externalversions/internalinterfaces/factory_interfaces.go b/pkg/client/informers/externalversions/internalinterfaces/factory_interfaces.go index de5cc79a..2cc7cc2d 100644 --- a/pkg/client/informers/externalversions/internalinterfaces/factory_interfaces.go +++ b/pkg/client/informers/externalversions/internalinterfaces/factory_interfaces.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by informer-gen. DO NOT EDIT. package internalinterfaces diff --git a/pkg/client/listers/hlf.kungfusoftware.es/v1alpha1/expansion_generated.go b/pkg/client/listers/hlf.kungfusoftware.es/v1alpha1/expansion_generated.go index a3cc3b80..302d4e43 100644 --- a/pkg/client/listers/hlf.kungfusoftware.es/v1alpha1/expansion_generated.go +++ b/pkg/client/listers/hlf.kungfusoftware.es/v1alpha1/expansion_generated.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by lister-gen. DO NOT EDIT. package v1alpha1 @@ -22,6 +23,14 @@ type FabricChaincodeListerExpansion interface{} // FabricChaincodeNamespaceLister. type FabricChaincodeNamespaceListerExpansion interface{} +// FabricChaincodeTemplateListerExpansion allows custom methods to be added to +// FabricChaincodeTemplateLister. +type FabricChaincodeTemplateListerExpansion interface{} + +// FabricChaincodeTemplateNamespaceListerExpansion allows custom methods to be added to +// FabricChaincodeTemplateNamespaceLister. +type FabricChaincodeTemplateNamespaceListerExpansion interface{} + // FabricExplorerListerExpansion allows custom methods to be added to // FabricExplorerLister. type FabricExplorerListerExpansion interface{} diff --git a/pkg/client/listers/hlf.kungfusoftware.es/v1alpha1/fabricca.go b/pkg/client/listers/hlf.kungfusoftware.es/v1alpha1/fabricca.go index 838993b7..45145dd6 100644 --- a/pkg/client/listers/hlf.kungfusoftware.es/v1alpha1/fabricca.go +++ b/pkg/client/listers/hlf.kungfusoftware.es/v1alpha1/fabricca.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by lister-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/listers/hlf.kungfusoftware.es/v1alpha1/fabricchaincode.go b/pkg/client/listers/hlf.kungfusoftware.es/v1alpha1/fabricchaincode.go index afb9acb4..a1d761d0 100644 --- a/pkg/client/listers/hlf.kungfusoftware.es/v1alpha1/fabricchaincode.go +++ b/pkg/client/listers/hlf.kungfusoftware.es/v1alpha1/fabricchaincode.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by lister-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/listers/hlf.kungfusoftware.es/v1alpha1/fabricchaincodetemplate.go b/pkg/client/listers/hlf.kungfusoftware.es/v1alpha1/fabricchaincodetemplate.go new file mode 100644 index 00000000..759930f2 --- /dev/null +++ b/pkg/client/listers/hlf.kungfusoftware.es/v1alpha1/fabricchaincodetemplate.go @@ -0,0 +1,88 @@ +/* + * Copyright Kungfusoftware.es. All Rights Reserved. + * + * SPDX-License-Identifier: Apache-2.0 + */ +// Code generated by lister-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + v1alpha1 "github.com/kfsoftware/hlf-operator/api/hlf.kungfusoftware.es/v1alpha1" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" +) + +// FabricChaincodeTemplateLister helps list FabricChaincodeTemplates. +// All objects returned here must be treated as read-only. +type FabricChaincodeTemplateLister interface { + // List lists all FabricChaincodeTemplates in the indexer. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1alpha1.FabricChaincodeTemplate, err error) + // FabricChaincodeTemplates returns an object that can list and get FabricChaincodeTemplates. + FabricChaincodeTemplates(namespace string) FabricChaincodeTemplateNamespaceLister + FabricChaincodeTemplateListerExpansion +} + +// fabricChaincodeTemplateLister implements the FabricChaincodeTemplateLister interface. +type fabricChaincodeTemplateLister struct { + indexer cache.Indexer +} + +// NewFabricChaincodeTemplateLister returns a new FabricChaincodeTemplateLister. +func NewFabricChaincodeTemplateLister(indexer cache.Indexer) FabricChaincodeTemplateLister { + return &fabricChaincodeTemplateLister{indexer: indexer} +} + +// List lists all FabricChaincodeTemplates in the indexer. +func (s *fabricChaincodeTemplateLister) List(selector labels.Selector) (ret []*v1alpha1.FabricChaincodeTemplate, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1alpha1.FabricChaincodeTemplate)) + }) + return ret, err +} + +// FabricChaincodeTemplates returns an object that can list and get FabricChaincodeTemplates. +func (s *fabricChaincodeTemplateLister) FabricChaincodeTemplates(namespace string) FabricChaincodeTemplateNamespaceLister { + return fabricChaincodeTemplateNamespaceLister{indexer: s.indexer, namespace: namespace} +} + +// FabricChaincodeTemplateNamespaceLister helps list and get FabricChaincodeTemplates. +// All objects returned here must be treated as read-only. +type FabricChaincodeTemplateNamespaceLister interface { + // List lists all FabricChaincodeTemplates in the indexer for a given namespace. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1alpha1.FabricChaincodeTemplate, err error) + // Get retrieves the FabricChaincodeTemplate from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. + Get(name string) (*v1alpha1.FabricChaincodeTemplate, error) + FabricChaincodeTemplateNamespaceListerExpansion +} + +// fabricChaincodeTemplateNamespaceLister implements the FabricChaincodeTemplateNamespaceLister +// interface. +type fabricChaincodeTemplateNamespaceLister struct { + indexer cache.Indexer + namespace string +} + +// List lists all FabricChaincodeTemplates in the indexer for a given namespace. +func (s fabricChaincodeTemplateNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.FabricChaincodeTemplate, err error) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + ret = append(ret, m.(*v1alpha1.FabricChaincodeTemplate)) + }) + return ret, err +} + +// Get retrieves the FabricChaincodeTemplate from the indexer for a given namespace and name. +func (s fabricChaincodeTemplateNamespaceLister) Get(name string) (*v1alpha1.FabricChaincodeTemplate, error) { + obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1alpha1.Resource("fabricchaincodetemplate"), name) + } + return obj.(*v1alpha1.FabricChaincodeTemplate), nil +} diff --git a/pkg/client/listers/hlf.kungfusoftware.es/v1alpha1/fabricexplorer.go b/pkg/client/listers/hlf.kungfusoftware.es/v1alpha1/fabricexplorer.go index 0bf52c33..ef13e189 100644 --- a/pkg/client/listers/hlf.kungfusoftware.es/v1alpha1/fabricexplorer.go +++ b/pkg/client/listers/hlf.kungfusoftware.es/v1alpha1/fabricexplorer.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by lister-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/listers/hlf.kungfusoftware.es/v1alpha1/fabricfollowerchannel.go b/pkg/client/listers/hlf.kungfusoftware.es/v1alpha1/fabricfollowerchannel.go index 7b116dca..50005b1d 100644 --- a/pkg/client/listers/hlf.kungfusoftware.es/v1alpha1/fabricfollowerchannel.go +++ b/pkg/client/listers/hlf.kungfusoftware.es/v1alpha1/fabricfollowerchannel.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by lister-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/listers/hlf.kungfusoftware.es/v1alpha1/fabricidentity.go b/pkg/client/listers/hlf.kungfusoftware.es/v1alpha1/fabricidentity.go index 949ec808..f85a0d45 100644 --- a/pkg/client/listers/hlf.kungfusoftware.es/v1alpha1/fabricidentity.go +++ b/pkg/client/listers/hlf.kungfusoftware.es/v1alpha1/fabricidentity.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by lister-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/listers/hlf.kungfusoftware.es/v1alpha1/fabricmainchannel.go b/pkg/client/listers/hlf.kungfusoftware.es/v1alpha1/fabricmainchannel.go index 73610ee8..22c2c7a7 100644 --- a/pkg/client/listers/hlf.kungfusoftware.es/v1alpha1/fabricmainchannel.go +++ b/pkg/client/listers/hlf.kungfusoftware.es/v1alpha1/fabricmainchannel.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by lister-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/listers/hlf.kungfusoftware.es/v1alpha1/fabricnetworkconfig.go b/pkg/client/listers/hlf.kungfusoftware.es/v1alpha1/fabricnetworkconfig.go index adb54291..1310ee18 100644 --- a/pkg/client/listers/hlf.kungfusoftware.es/v1alpha1/fabricnetworkconfig.go +++ b/pkg/client/listers/hlf.kungfusoftware.es/v1alpha1/fabricnetworkconfig.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by lister-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/listers/hlf.kungfusoftware.es/v1alpha1/fabricoperationsconsole.go b/pkg/client/listers/hlf.kungfusoftware.es/v1alpha1/fabricoperationsconsole.go index 25d15361..43b3d3b3 100644 --- a/pkg/client/listers/hlf.kungfusoftware.es/v1alpha1/fabricoperationsconsole.go +++ b/pkg/client/listers/hlf.kungfusoftware.es/v1alpha1/fabricoperationsconsole.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by lister-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/listers/hlf.kungfusoftware.es/v1alpha1/fabricoperatorapi.go b/pkg/client/listers/hlf.kungfusoftware.es/v1alpha1/fabricoperatorapi.go index 918529b4..19c0b1f1 100644 --- a/pkg/client/listers/hlf.kungfusoftware.es/v1alpha1/fabricoperatorapi.go +++ b/pkg/client/listers/hlf.kungfusoftware.es/v1alpha1/fabricoperatorapi.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by lister-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/listers/hlf.kungfusoftware.es/v1alpha1/fabricoperatorui.go b/pkg/client/listers/hlf.kungfusoftware.es/v1alpha1/fabricoperatorui.go index 2956983d..0ba4162e 100644 --- a/pkg/client/listers/hlf.kungfusoftware.es/v1alpha1/fabricoperatorui.go +++ b/pkg/client/listers/hlf.kungfusoftware.es/v1alpha1/fabricoperatorui.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by lister-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/listers/hlf.kungfusoftware.es/v1alpha1/fabricorderernode.go b/pkg/client/listers/hlf.kungfusoftware.es/v1alpha1/fabricorderernode.go index e4f0edcc..0ee77189 100644 --- a/pkg/client/listers/hlf.kungfusoftware.es/v1alpha1/fabricorderernode.go +++ b/pkg/client/listers/hlf.kungfusoftware.es/v1alpha1/fabricorderernode.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by lister-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/listers/hlf.kungfusoftware.es/v1alpha1/fabricorderingservice.go b/pkg/client/listers/hlf.kungfusoftware.es/v1alpha1/fabricorderingservice.go index bb3d3fdd..631acc3e 100644 --- a/pkg/client/listers/hlf.kungfusoftware.es/v1alpha1/fabricorderingservice.go +++ b/pkg/client/listers/hlf.kungfusoftware.es/v1alpha1/fabricorderingservice.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by lister-gen. DO NOT EDIT. package v1alpha1 diff --git a/pkg/client/listers/hlf.kungfusoftware.es/v1alpha1/fabricpeer.go b/pkg/client/listers/hlf.kungfusoftware.es/v1alpha1/fabricpeer.go index 936036b4..1766a6c8 100644 --- a/pkg/client/listers/hlf.kungfusoftware.es/v1alpha1/fabricpeer.go +++ b/pkg/client/listers/hlf.kungfusoftware.es/v1alpha1/fabricpeer.go @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ +// Code generated by lister-gen. DO NOT EDIT. package v1alpha1