Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ RUN cargo build --release
FROM gcr.io/distroless/cc-debian11:nonroot

WORKDIR /parseable

COPY --from=busybox:1.35.0-uclibc /bin/sh /bin/sh
COPY --from=builder /parseable/target/release/parseable /usr/bin/parseable

CMD ["parseable"]
16 changes: 15 additions & 1 deletion helm/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ spec:
- name: {{ $key }}
value: {{ tpl $value $ | quote }}
{{- end }}
{{- range $secret := .Values.parseable.secrets }}
{{- if .Values.parseable.local }}
{{- range $secret := .Values.parseable.localModeSecret }}
{{- range $key := $secret.keys }}
{{- $envPrefix := $secret.prefix | default "" | upper }}
{{- $envKey := $key | upper | replace "." "_" | replace "-" "_" }}
Expand All @@ -54,6 +55,19 @@ spec:
key: {{ $key }}
{{- end }}
{{- end }}
{{- else}}
{{- range $secret := .Values.parseable.s3ModeSecret }}
{{- range $key := $secret.keys }}
{{- $envPrefix := $secret.prefix | default "" | upper }}
{{- $envKey := $key | upper | replace "." "_" | replace "-" "_" }}
- name: {{ $envPrefix }}{{ $envKey }}
valueFrom:
secretKeyRef:
name: {{ $secret.name }}
key: {{ $key }}
{{- end }}
{{- end }}
{{- end }}
ports:
- containerPort: 8000
resources:
Expand Down
13 changes: 11 additions & 2 deletions helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,17 @@ parseable:
storageClass: ""
accessMode: ReadWriteOnce
size: 1Gi
secrets:
localModeSecret:
- type: env
name: parseable-env-secret
prefix: P_
keys:
- addr
- username
- password
- staging.dir
- fs.dir
s3ModeSecret:
- type: env
name: parseable-env-secret
prefix: P_
Expand Down Expand Up @@ -52,7 +62,6 @@ parseable:
cpu: 500m
memory: 1Gi
securityContext:
runAsUser: 10001
allowPrivilegeEscalation: false
podAnnotations: {}
podSecurityContext: {}
Expand Down
2 changes: 1 addition & 1 deletion server/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ async fn main() -> anyhow::Result<()> {
_ = &mut localsync_outbox => {
// crash the server if localsync fails for any reason
// panic!("Local Sync thread died. Server will fail now!")
return Err(anyhow::Error::msg("Failed to sync local data to disc. This can happen due to critical error in disc or environment. Please restart the Parseable server.\n\nJoin us on Parseable Slack if the issue persists after restart : https://launchpass.com/parseable"))
return Err(anyhow::Error::msg("Failed to sync local data to drive. Please restart the Parseable server.\n\nJoin us on Parseable Slack if the issue persists after restart : https://launchpass.com/parseable"))
},
_ = &mut remote_sync_outbox => {
// remote_sync failed, this is recoverable by just starting remote_sync thread again
Expand Down