Skip to content

Commit

Permalink
add values, update doc, fix UT
Browse files Browse the repository at this point in the history
  • Loading branch information
realAaronWu committed Mar 12, 2021
1 parent a6d671e commit d1c4da0
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 2 deletions.
2 changes: 2 additions & 0 deletions charts/pravega/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ The following table lists the configurable parameters of the pravega chart and t
| `controller.affinity` | Specifies scheduling constraints on controller pods | `{}` |
| `controller.service.type` | Override the controller service type, if external access is enabled (LoadBalancer/NodePort) | |
| `controller.service.annotations` | Annotations to add to the controller service, if external access is enabled | `{}` |
| `controller.labels` | Labels to add to the controller pods | `{}` |
| `controller.jvmOptions` | JVM Options for controller | `["-Xmx2g", "-XX:MaxDirectMemorySize=2g"]` |
| `segmentStore.replicas` | Number of segmentStore replicas | `1` |
| `segmentStore.maxUnavailableSegmentStoreReplicas` | Number of maxUnavailableSegmentStoreReplicas possible for segmentstore pdb | `1` |
Expand All @@ -100,6 +101,7 @@ The following table lists the configurable parameters of the pravega chart and t
| `segmentStore.service.loadBalancerIP` | It is used to provide a LoadBalancerIP for the segmentStore service | |
| `segmentStore.service.externalTrafficPolicy` | It is used to provide ExternalTrafficPolicy for the segmentStore service | |
| `segmentStore.jvmOptions` | JVM Options for segmentStore | `[]` |
| `segmentStore.labels` | Labels to add to the segmentStore pods | `{}` |
| `storage.longtermStorage.type` | Type of long term storage backend to be used (filesystem/ecs/hdfs) | `filesystem` |
| `storage.longtermStorage.filesystem.pvc` | Name of the pre-created PVC, if long term storage type is filesystem | `pravega-tier2` |
| `storage.longtermStorage.ecs` | Configuration to use a Dell EMC ECS system, if long term storage type is ecs | `{}` |
Expand Down
4 changes: 4 additions & 0 deletions charts/pravega/templates/pravega.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,17 @@ spec:
{{- if .Values.controller.service.annotations }}
controllerSvcAnnotations:
{{ toYaml .Values.controller.service.annotations | indent 6 }}
controllerPodLabels:
{{ toYaml .Values.controller.labels | indent 6 }}
{{- end }}
{{- if .Values.segmentStore.service.type }}
segmentStoreExtServiceType: {{ .Values.segmentStore.service.type }}
{{- end }}
{{- if .Values.segmentStore.service.annotations }}
segmentStoreSvcAnnotations:
{{ toYaml .Values.segmentStore.service.annotations | indent 6 }}
segmentStorePodLabels:
{{ toYaml .Values.segmentStore.labels | indent 6 }}
{{- end }}
{{- end }}
image:
Expand Down
2 changes: 2 additions & 0 deletions charts/pravega/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ controller:
type:
annotations: {}
jvmOptions: []
labels: {}

segmentStore:
replicas: 1
Expand All @@ -88,6 +89,7 @@ segmentStore:
loadBalancerIP:
externalTrafficPolicy:
jvmOptions: ["-Xmx2g", "-XX:MaxDirectMemorySize=2g"]
labels: {}

storage:

Expand Down
4 changes: 2 additions & 2 deletions pkg/apis/pravega/v1beta1/pravegacluster_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -1263,7 +1263,7 @@ func (p *PravegaCluster) PravegaControllerServiceURL() string {

func (p *PravegaCluster) LabelsForController() map[string]string {
labels := p.LabelsForPravegaCluster()
if p.Spec.Pravega.ControllerPodLabels != nil {
if p.Spec.Pravega != nil && p.Spec.Pravega.ControllerPodLabels != nil {
for k, v := range p.Spec.Pravega.ControllerPodLabels {
labels[k] = v
}
Expand All @@ -1274,7 +1274,7 @@ func (p *PravegaCluster) LabelsForController() map[string]string {

func (p *PravegaCluster) LabelsForSegmentStore() map[string]string {
labels := p.LabelsForPravegaCluster()
if p.Spec.Pravega.SegmentStorePodLabels != nil {
if p.Spec.Pravega != nil && p.Spec.Pravega.SegmentStorePodLabels != nil {
for k, v := range p.Spec.Pravega.SegmentStorePodLabels {
labels[k] = v
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,7 @@ var _ = Describe("PravegaCluster Controller", func() {
)
BeforeEach(func() {
res, err = r.Reconcile(req)
p.WithDefaults()
currentpdb := &policyv1beta1.PodDisruptionBudget{}
r.client.Get(context.TODO(), types.NamespacedName{Name: p.PdbNameForSegmentstore(), Namespace: p.Namespace}, currentpdb)
maxUnavailable := intstr.FromInt(3)
Expand Down

0 comments on commit d1c4da0

Please sign in to comment.