Skip to content

Commit 23f291a

Browse files
fmuleroBitnami Containersmigruiz4
authored
[bitnami/parse] Parse standarization (#9867)
* Parse standarization Signed-off-by: Fran Mulero <fmulero@vmware.com> * Update README.md with readme-generator-for-helm Signed-off-by: Bitnami Containers <containers@bitnami.com> * Apply suggestions Signed-off-by: Fran Mulero <fmulero@vmware.com> * Update README.md with readme-generator-for-helm Signed-off-by: Bitnami Containers <containers@bitnami.com> * Change dependencies with mongodb Signed-off-by: Fran Mulero <fmulero@vmware.com> * Update README.md with readme-generator-for-helm Signed-off-by: Bitnami Containers <containers@bitnami.com> * Update dependencies Signed-off-by: Fran Mulero <fmulero@vmware.com> * Amend typo Signed-off-by: Fran Mulero <fmulero@vmware.com> * Update README.md with readme-generator-for-helm Signed-off-by: Bitnami Containers <containers@bitnami.com> * Remove quotes Signed-off-by: Fran Mulero <fmulero@vmware.com> * Amend service definition and add vib verify Signed-off-by: Fran Mulero <fmulero@vmware.com> * Update README.md with readme-generator-for-helm Signed-off-by: Bitnami Containers <containers@bitnami.com> * Amend vib tests Signed-off-by: Fran Mulero <fmulero@vmware.com> * Amend documentation Signed-off-by: Fran Mulero <fmulero@vmware.com> * Amend server.service.ports.http Signed-off-by: Fran Mulero <fmulero@vmware.com> * Update README.md with readme-generator-for-helm Signed-off-by: Bitnami Containers <containers@bitnami.com> * [bitnami/parse] Update components versions Signed-off-by: Bitnami Containers <containers@bitnami.com> Co-authored-by: Bitnami Containers <containers@bitnami.com> Co-authored-by: Miguel Ruiz <miruiz@vmware.com>
1 parent 5557d15 commit 23f291a

18 files changed

+1204
-420
lines changed

.vib/parse/vib-verify.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,32 @@
1717
]
1818
},
1919
"verify": {
20+
"context": {
21+
"resources": {
22+
"url": "{SHA_ARCHIVE}",
23+
"path": "/bitnami/parse"
24+
},
25+
"runtime_parameters": "InNlcnZlciI6CiAgInNlcnZpY2UiOgogICAgInBvcnRzIjoKICAgICAgImh0dHAiOiA4MAogICJ0eXBlIjogIkxvYWRCYWxhbmNlciIK",
26+
"target_platform": {
27+
"target_platform_id": "{VIB_ENV_TARGET_PLATFORM}",
28+
"size": {
29+
"name": "S4"
30+
}
31+
}
32+
},
2033
"actions": [
2134
{
2235
"action_id": "trivy",
2336
"params": {
2437
"threshold": "CRITICAL",
2538
"vuln_type": ["OS"]
2639
}
40+
},
41+
{
42+
"action_id": "health-check",
43+
"params": {
44+
"endpoint": "lb-parse-http-server"
45+
}
2746
}
2847
]
2948
}

bitnami/parse/Chart.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
dependencies:
22
- name: mongodb
33
repository: https://charts.bitnami.com/bitnami
4-
version: 11.2.0
4+
version: 12.0.0
55
- name: common
66
repository: https://charts.bitnami.com/bitnami
77
version: 1.13.1
8-
digest: sha256:7d7bdffed716a6674bd2247eb5f60ead9bf9fc5ad95ba08e31b110b49f666573
9-
generated: "2022-04-28T15:40:26.2148124Z"
8+
digest: sha256:f1556ae3556b5efde62b81191ac56a11ba0b956670aa66ca86f2f8531b8657ff
9+
generated: "2022-04-29T16:57:44.643082+02:00"

bitnami/parse/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ appVersion: 5.2.1
55
dependencies:
66
- name: mongodb
77
repository: https://charts.bitnami.com/bitnami
8-
version: 11.x.x
8+
version: 12.x.x
99
- name: common
1010
repository: https://charts.bitnami.com/bitnami
1111
tags:
@@ -30,4 +30,4 @@ sources:
3030
- https://github.com/bitnami/bitnami-docker-parse
3131
- https://github.com/bitnami/bitnami-docker-parse-dashboard
3232
- https://parse.com/
33-
version: 17.0.15
33+
version: 18.0.0

bitnami/parse/README.md

Lines changed: 237 additions & 130 deletions
Large diffs are not rendered by default.

bitnami/parse/templates/NOTES.txt

Lines changed: 27 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,26 @@ APP VERSION: {{ .Chart.AppVersion }}
66

77
** Please be patient while the chart is being deployed **
88

9+
{{- if .Values.diagnosticMode.enabled }}
10+
The chart has been deployed in diagnostic mode. All probes have been disabled and the command has been overwritten with:
11+
12+
command: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.command "context" $) | nindent 4 }}
13+
args: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.args "context" $) | nindent 4 }}
14+
15+
Get the list of pods by executing:
16+
17+
kubectl get pods --namespace {{ template "common.names.namespace" . }} -l app.kubernetes.io/instance={{ .Release.Name }}
18+
19+
Access the pod you want to debug by executing
20+
21+
kubectl exec --namespace {{ template "common.names.namespace" . }} -ti <NAME OF THE POD> -- bash
22+
23+
In order to replicate the container startup scripts execute this command:
24+
25+
/opt/bitnami/scripts/parse/entrypoint.sh /opt/bitnami/scripts/parse/run.sh
26+
27+
{{- else }}
28+
929
Parse Server
1030
------------
1131

@@ -18,20 +38,20 @@ Parse Server
1838

1939
export SERVICE_HOST={{ .Values.ingress.server.hostname }}
2040

21-
{{- else if contains "NodePort" .Values.service.type }}
41+
{{- else if contains "NodePort" .Values.server.service.type }}
2242

2343
export NODE_PORT=$(kubectl get svc --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" {{ include "common.names.fullname" . }})
2444
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
2545
export SERVICE_HOST=$NODE_IP:$NODE_PORT
2646

27-
{{- else if contains "LoadBalancer" .Values.service.type }}
47+
{{- else if contains "LoadBalancer" .Values.server.service.type }}
2848

2949
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
3050
Watch the status with: 'kubectl get svc --namespace {{ .Release.Namespace }} -w {{ include "common.names.fullname" . }}'
3151

32-
export SERVICE_HOST=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "common.names.fullname" . }} --template "{{ "{{ range (index .status.loadBalancer.ingress 0) }}{{ . }}{{ end }}" }}"):{{ .Values.server.port }}
52+
export SERVICE_HOST=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "common.names.fullname" . }} --template "{{ "{{ range (index .status.loadBalancer.ingress 0) }}{{ . }}{{ end }}" }}"):{{ .Values.server.service.ports.http }}
3353

34-
{{- else if contains "ClusterIP" .Values.service.type }}
54+
{{- else if contains "ClusterIP" .Values.server.service.type }}
3555

3656
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l app.kubernetes.io/name={{ template "common.names.name" . }},app.kubernetes.io/component=server -o jsonpath="{.items[0].metadata.name}")
3757
kubectl port-forward --namespace {{ .Release.Namespace }} $POD_NAME 1337:1337 &
@@ -69,7 +89,7 @@ service:
6989
2. Complete your Parse Dashboard deployment by running:
7090

7191
helm upgrade --namespace {{ .Release.Namespace }} {{ .Release.Name }} bitnami/{{ .Chart.Name }} \
72-
--set server.host=$APP_HOST,server.port={{ .Values.server.port }},server.masterKey=$(kubectl get secret --namespace {{ .Release.Namespace }} {{ include "common.names.fullname" . }} -o jsonpath="{.data.master-key}" | base64 --decode),dashboard.username={{ .Values.dashboard.username }},dashboard.password=$(kubectl get secret --namespace {{ .Release.Namespace }} {{ include "common.names.fullname" . }} -o jsonpath="{.data.parse-dashboard-password}" | base64 --decode){{- if .Values.global }}{{- if .Values.global.imagePullSecrets }},global.imagePullSecrets={{ .Values.global.imagePullSecrets }}{{- end }}{{- end }}
92+
--set server.host=$APP_HOST,server.containerPorts.http={{ .Values.server.containerPorts.http }},server.masterKey=$(kubectl get secret --namespace {{ .Release.Namespace }} {{ include "common.names.fullname" . }} -o jsonpath="{.data.master-key}" | base64 --decode),dashboard.username={{ .Values.dashboard.username }},dashboard.password=$(kubectl get secret --namespace {{ .Release.Namespace }} {{ include "common.names.fullname" . }} -o jsonpath="{.data.parse-dashboard-password}" | base64 --decode){{- if .Values.global }}{{- if .Values.global.imagePullSecrets }},global.imagePullSecrets={{ .Values.global.imagePullSecrets }}{{- end }}{{- end }}
7393

7494
{{- else }}
7595

@@ -79,7 +99,7 @@ service:
7999

80100
You should be able to access Parse Dashboard through: {{ if .Values.ingress.tls }}https{{ else }}http{{ end }}://{{ .Values.ingress.dashboard.hostname }}
81101

82-
{{- else if eq .Values.service.type "ClusterIP" }}
102+
{{- else if eq .Values.dashboard.service.type "ClusterIP" }}
83103

84104
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l app.kubernetes.io/name={{ template "common.names.name" . }},app.kubernetes.io/component=dashboard -o jsonpath="{.items[0].metadata.name}")
85105
kubectl port-forward --namespace {{ .Release.Namespace }} $POD_NAME 4040:4040 &
@@ -97,13 +117,7 @@ service:
97117
echo Password: $(kubectl get secret --namespace {{ .Release.Namespace }} {{ include "common.names.fullname" . }} -o jsonpath="{.data.parse-dashboard-password}" | base64 --decode)
98118
{{- end }}
99119
{{- end }}
120+
{{- end }}
100121

101122
{{ include "parse.validateValues" . }}
102123
{{ include "parse.checkRollingTags" . }}
103-
104-
{{- $passwordValidationErrors := list }}
105-
106-
{{- $dbPasswordValidationErrors := include "common.validations.values.mongodb.passwords" (dict "secret" $dbSecretName "subchart" true "context" $) -}}
107-
{{- $passwordValidationErrors = append $passwordValidationErrors $dbPasswordValidationErrors -}}
108-
109-
{{- include "common.errors.upgrade.passwords.empty" (dict "validationErrors" $passwordValidationErrors "context" $) -}}

bitnami/parse/templates/_helpers.tpl

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,17 @@ Return the proper Docker Image Registry Secret Names
2828
{{- include "common.images.pullSecrets" (dict "images" (list .Values.server.image .Values.dashboard.image .Values.volumePermissions.image) "global" .Values.global) -}}
2929
{{- end -}}
3030

31+
{{/*
32+
Create the name of the service account to use
33+
*/}}
34+
{{- define "parse.serviceAccountName" -}}
35+
{{- if .Values.serviceAccount.create -}}
36+
{{ default (printf "%s-server" (include "common.names.fullname" .)) .Values.serviceAccount.name }}
37+
{{- else -}}
38+
{{ default "default" .Values.serviceAccount.name }}
39+
{{- end -}}
40+
{{- end -}}
41+
3142
{{/*
3243
Create a default fully qualified app name.
3344
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
@@ -45,10 +56,10 @@ Get the user defined LoadBalancerIP for this release.
4556
Note, returns 127.0.0.1 if using ClusterIP.
4657
*/}}
4758
{{- define "parse.serviceIP" -}}
48-
{{- if eq .Values.service.type "ClusterIP" -}}
59+
{{- if eq .Values.dashboard.service.type "ClusterIP" -}}
4960
127.0.0.1
5061
{{- else -}}
51-
{{- default "" .Values.service.loadBalancerIP -}}
62+
{{- default "" .Values.dashboard.service.loadBalancerIP -}}
5263
{{- end -}}
5364
{{- end -}}
5465

@@ -73,7 +84,7 @@ but Helm 2.9 and 2.10 does not support it, so we need to implement this if-else
7384

7485
{{/*
7586
Gets the port to access Parse outside the cluster.
76-
When using ingress, we should use the port 80/443 instead of service.port
87+
When using ingress, we should use the port 80/443 instead of service.ports.http
7788
*/}}
7889
{{- define "parse.external-port" -}}
7990
{{/*
@@ -89,7 +100,7 @@ but Helm 2.9 and 2.10 does not support it, so we need to implement this if-else
89100
{{- $ingressHttpPort -}}
90101
{{- end -}}
91102
{{- else -}}
92-
{{ .Values.server.port }}
103+
{{ .Values.server.containerPorts.http }}
93104
{{- end -}}
94105
{{- end -}}
95106

bitnami/parse/templates/cloud-code-configmap.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
{{- if and .Values.server.enableCloudCode (or .Values.server.cloudCodeScripts (.Files.Glob "files/cloud/*.js")) (not .Values.server.existingCloudCodeCM) }}
1+
{{- if and .Values.server.enableCloudCode (or .Values.server.cloudCodeScripts (.Files.Glob "files/cloud/*.js")) (not .Values.server.existingCloudCodeScriptsCM) }}
22
apiVersion: v1
33
kind: ConfigMap
44
metadata:
5-
name: {{ include "common.names.fullname" . }}-cloud-code-scripts
5+
name: {{ printf "%s-cloud-code-scripts" include "common.names.fullname" . }}
6+
namespace: {{ include "common.names.namespace" . | quote }}
67
labels: {{ include "common.labels.standard" . | nindent 4 }}
78
app.kubernetes.io/component: server
89
{{- if .Values.commonLabels }}

0 commit comments

Comments
 (0)