Skip to content

Commit

Permalink
Support for identiy create registering users
Browse files Browse the repository at this point in the history
FabricIdentity secret ref for in cluster CA
  • Loading branch information
dviejokfs committed Dec 22, 2023
1 parent c2bfde6 commit 4cdab0e
Show file tree
Hide file tree
Showing 17 changed files with 1,857 additions and 164 deletions.
22 changes: 22 additions & 0 deletions api/hlf.kungfusoftware.es/v1alpha1/hlf_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,11 @@ type GRPCProxy struct {
// +nullable
ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets"`
}
type AddressOverride struct {
From string `json:"from"`
To string `json:"to"`
CACertsFile string `json:"caCertsFile"`
}

// FabricPeerSpec defines the desired state of FabricPeer
type FabricPeerSpec struct {
Expand All @@ -148,6 +153,23 @@ type FabricPeerSpec struct {
// +kubebuilder:default:={}
PodLabels map[string]string `json:"podLabels"`

// +nullable
// +optional
// +kubebuilder:validation:Optional
// +kubebuilder:default:={}
DeliveryClientaddressOverrides []AddressOverride `json:"deliveryClientaddressOverrides"`
// +optional
// +nullable
// +kubebuilder:validation:Optional
// +kubebuilder:default:={}
Volumes []corev1.Volume `json:"volumes"`

// +optional
// +nullable
// +kubebuilder:validation:Optional
// +kubebuilder:default:={}
PeerVolumeMounts []corev1.VolumeMount `json:"peerVolumeMounts"`

// +optional
// +nullable
UpdateCertificateTime *metav1.Time `json:"updateCertificateTime"`
Expand Down
34 changes: 34 additions & 0 deletions api/hlf.kungfusoftware.es/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 3 additions & 6 deletions charts/hlf-peer/templates/configmap--peer--core.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -358,12 +358,9 @@ data:
# A list of orderer endpoint addresses which should be overridden
# when found in channel configurations.
addressOverrides:
# - from:
# to:
# caCertsFile:
# - from:
# to:
# caCertsFile:
{{- if $.Values.deliveryClientaddressOverrides }}
{{ $.Values.deliveryClientaddressOverrides | toYaml | nindent 10 }}
{{- end }}
# Type for the local MSP - by default it's of type bccsp
localMspType: bccsp
Expand Down
8 changes: 8 additions & 0 deletions charts/hlf-peer/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ spec:
hostAliases:
{{ toYaml .Values.hostAliases | indent 10 }}
volumes:
# range through .Values.volumes
{{- if .Values.volumes }}
{{ toYaml .Values.volumes | nindent 8 }}
{{- end }}
{{- if eq .Values.peer.databaseType "CouchDB" }}
- name: couchdb
{{- if and .Values.persistence.couchdb.enabled ( not .Values.couchdb.external.enabled) }}
Expand Down Expand Up @@ -246,6 +250,10 @@ spec:
- configMapRef:
name: {{ include "hlf-peer.fullname" . }}--peer
volumeMounts:
# range volumeMounts
{{- if .Values.volumeMounts }}
{{ toYaml .Values.peerVolumeMounts | nindent 12 }}
{{- end }}
- name: peerconfig
mountPath: /var/hyperledger/fabric_cfg
- mountPath: /var/hyperledger
Expand Down
5 changes: 4 additions & 1 deletion charts/hlf-peer/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,8 @@ resources:
memory: 128Mi
replicas: 1
nodeSelector: { }

volumes: []
peerVolumeMounts: [ ]
tolerations: [ ]

affinity: { }
Expand Down Expand Up @@ -164,6 +165,8 @@ logging:

externalChaincodeBuilder: false

deliveryClientaddressOverrides: []

externalBuilders: [ ]

proxy:
Expand Down
Loading

0 comments on commit 4cdab0e

Please sign in to comment.