Skip to content

Commit

Permalink
fix(ckan): add defaults for datapusher formats defaults (#1094)
Browse files Browse the repository at this point in the history
Co-authored-by: mw <[email protected]>
  • Loading branch information
SyeKlu and marvinWolff authored Aug 14, 2024
1 parent 754c8b8 commit f036735
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .github/trusted_registries.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ registries:
gpg: ALL_TAGS
otel:
opentelemetry-collector-contrib: ALL_TAGS
ckan:
ckan-base-datapusher: ALL_TAGS
ghcr.io:
aquasecurity: ALL_IMAGES
kyverno: ALL_IMAGES
Expand Down
6 changes: 5 additions & 1 deletion charts/ckan/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,8 @@

{{- define "ckan.redis.fullname" -}}
{{- include "common.names.dependency.fullname" (dict "chartName" "redis" "chartValues" .Values.redis "context" $) -}}
{{- end -}}
{{- end -}}

{{- define "ckan.defaultRegistry" -}}
docker.io
{{- end -}}
2 changes: 2 additions & 0 deletions charts/ckan/templates/ckan/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,8 @@ spec:
value: "redis://{{ printf "%s-%s" (include "ckan.redis.fullname" . ) "headless" }}:{{ include "ckan.redis.service.port" $}}/0"
- name: CKAN_DATAPUSHER_URL
value: "http://{{ printf "%s-%s" (include "common.names.fullname" $) "datapusher" }}:{{ include "ckan.datapusher.service.port" $ }}"
- name: CKAN_DATAPUSHER_FORMATS
value: {{ .Values.ckan.datapusher.formats | join " " | quote }}
- name: CKAN__DATAPUSHER__CALLBACK_URL_BASE
value: "http://{{ printf "%s-%s" (include "common.names.fullname" $) "ckan" }}:{{ include "ckan.ckan.service.port" $ }}/"
- name: CKAN__PLUGINS
Expand Down
2 changes: 1 addition & 1 deletion charts/ckan/templates/datapusher/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ spec:
# value: "postgresql://{{ .Values.postgresql.auth.username }}:{{ .Values.postgresql.auth.password }}@main-postgresql/{{ .Values.postgresql.auth.database}}"
securityContext:
{{- toYaml .Values.datapusher.securityContext | default dict | nindent 12 }}
image: {{ include "common.images.image" (dict "imageRoot" .Values.datapusher.image "global" .Values.global) }}
image: {{ printf "%s/%s" ($.Values.global.imageRegistry | default (include "ckan.defaultRegistry" (dict))) (include "common.images.image" (dict "imageRoot" .Values.datapusher.image "global" .Values.global)) }}
imagePullPolicy: {{ .Values.datapusher.image.pullPolicy }}
ports:
- name: datapusher
Expand Down
15 changes: 15 additions & 0 deletions charts/ckan/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,21 @@
},
"description": "The enabled plugins in the Ckan instance."
},
"datapusher": {
"type": "object",
"additionalProperties": false,
"properties": {
"formats": {
"type": "array",
"items": {
"items": {
"type": "string"
}
},
"description": "The enabled formats for the datapusher."
}
}
},
"image": {
"$ref": "#/$defs/image"
},
Expand Down
11 changes: 11 additions & 0 deletions charts/ckan/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,17 @@ ckan:
- recline_view
- datastore
- datapusher
datapusher:
formats:
- csv
- xls
- xlsx
- tsv
- application/csv
- application/vnd.ms-excel
- application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
- ods
- application/vnd.oasis.opendocument.spreadsheet
image:
registry: "ghcr.io"
pullPolicy: IfNotPresent
Expand Down

0 comments on commit f036735

Please sign in to comment.