Skip to content

Commit

Permalink
Patch: ckan 0.0.24 (#421)
Browse files Browse the repository at this point in the history
* removed fdi-metadata-search-searchapi

* -parameterized project name
-added email notification parameters

* removed linting error
  • Loading branch information
GoodTown authored Apr 4, 2023
1 parent 237e5d6 commit 7a3f974
Show file tree
Hide file tree
Showing 16 changed files with 80 additions and 86 deletions.
15 changes: 0 additions & 15 deletions stable/ckan/Chart.lock

This file was deleted.

2 changes: 1 addition & 1 deletion stable/ckan/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: ckan
apiVersion: v2
type: application
version: 0.0.23
version: 0.0.24
appVersion: 2.9.5
description: CKAN Helm Chart for Kubernetes.
keywords:
Expand Down
2 changes: 1 addition & 1 deletion stable/ckan/conf/ckan/overlay-production.ini
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#

[app:main]
ckan.site_title = CKAN-FDI
#ckan.site_title = CKAN-QOL-FDI
ckan.site_logo = /base/images/ckan-logo.png
ckan.site_description =
ckan.favicon = /base/images/ckan.ico
Expand Down
2 changes: 1 addition & 1 deletion stable/ckan/templates/cm/ckan-overlay.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: ckan-ini-overlay-configmap
name: ckan-{{ include "ckan.fullname" . }}-ini-overlay-configmap
data:
production.ini: |
{{ .Files.Get "conf/ckan/overlay-production.ini" | indent 4 }}
2 changes: 1 addition & 1 deletion stable/ckan/templates/cm/ckan-prerun.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: ckan-prerun-configmap
name: ckan-{{ include "ckan.fullname" . }}-prerun-configmap
data:
prerun.py: |
{{ .Files.Get "conf/ckan/prerun.py" | indent 4 }}
2 changes: 1 addition & 1 deletion stable/ckan/templates/cm/psql-init.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: psql-init-configmap
name: psql-{{ include "ckan.fullname" . }}-init-configmap
data:
psql-init.py: |
{{ .Files.Get "conf/psql-init/psql-init.py" | indent 4 }}
Expand Down
2 changes: 1 addition & 1 deletion stable/ckan/templates/cm/solr-configset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: solr-configset-configmap
name: solr-{{ include "ckan.fullname" . }}-configset-configmap
data:
{{ (.Files.Glob "conf/solr-init/solr-configset/*").AsConfig | indent 2 }}
{{- end }}
2 changes: 1 addition & 1 deletion stable/ckan/templates/cm/solr-init.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: solr-init-configmap
name: solr-{{ include "ckan.fullname" . }}-init-configmap
data:
solr-init.py: |
{{ .Files.Get "conf/solr-init/solr-init.py" | indent 4 }}
Expand Down
12 changes: 6 additions & 6 deletions stable/ckan/templates/cronjob/ckan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
apiVersion: batch/v1beta1
kind: CronJob
metadata:
name: ckan-email-notifications
name: {{ include "ckan.fullname" . }}-email-notifications
labels:
app.kubernetes.io/name: {{ include "ckan.name" . }}
app.kubernetes.io/name: {{ include "ckan.fullname" . }}
helm.sh/chart: {{ include "ckan.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/instance: {{ include "ckan.fullname" . }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
spec:
schedule: "*/15 * * * *"
Expand All @@ -16,7 +16,7 @@ spec:
template:
spec:
containers:
- name: ckan-email-notifications
- name: {{ include "ckan.fullname" . }}-email-notifications
securityContext:
{{- toYaml .Values.ckan.securityContext | nindent 14 }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
Expand Down Expand Up @@ -65,11 +65,11 @@ spec:
key: ckanDatastoreReadUrl
{{- if .Values.solr.enabled }}
- name: CKAN_SOLR_URL
value: http://{{ .Release.Name }}-solr-headless:8983/solr/ckancollection
value: http://{{ include "ckan.fullname" . }}-solr-headless:8983/solr/ckancollection
{{- end }}
{{- if .Values.redis.enabled }}
- name: CKAN_REDIS_URL
value: redis://{{ .Release.Name }}-redis-headless:6379/0
value: redis://ckan-redis-headless:6379/0
{{- end }}
- name: CKAN__DATAPUSHER__URL
value: {{ .Values.ckan.datapusherUrl }}
Expand Down
65 changes: 39 additions & 26 deletions stable/ckan/templates/deploy/ckan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,22 @@ kind: Deployment
metadata:
name: {{ include "ckan.fullname" . }}
labels:
app.kubernetes.io/name: {{ include "ckan.name" . }}
app.kubernetes.io/name: {{ include "ckan.fullname" . }}
helm.sh/chart: {{ include "ckan.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/instance: {{ include "ckan.fullname" . }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
app.kubernetes.io/name: {{ include "ckan.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/name: {{ include "ckan.fullname" . }}
app.kubernetes.io/instance: {{ include "ckan.fullname" . }}
tier: ckan
template:
metadata:
labels:
app.kubernetes.io/name: {{ include "ckan.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/name: {{ include "ckan.fullname" . }}
app.kubernetes.io/instance: {{ include "ckan.fullname" . }}
tier: ckan
spec:
{{- with .Values.imagePullSecrets }}
Expand All @@ -29,24 +29,24 @@ spec:
securityContext:
{{- toYaml .Values.ckan.podSecurityContext | nindent 8 }}
volumes:
- name: ckan-ini-overlay-configmap
- name: ckan-{{ include "ckan.fullname" . }}-ini-overlay-configmap
configMap:
name: ckan-ini-overlay-configmap
- name: ckan-prerun-configmap
name: ckan-{{ include "ckan.fullname" . }}-ini-overlay-configmap
- name: ckan-{{ include "ckan.fullname" . }}-prerun-configmap
configMap:
name: ckan-prerun-configmap
name: ckan-{{ include "ckan.fullname" . }}-prerun-configmap
{{ if .Values.solr.initialize.enabled }}
- name: solr-init-configmap
- name: solr-{{ include "ckan.fullname" . }}-init-configmap
configMap:
name: solr-init-configmap
- name: solr-configset-configmap
name: solr-{{ include "ckan.fullname" . }}-init-configmap
- name: solr-{{ include "ckan.fullname" . }}-configset-configmap
configMap:
name: solr-configset-configmap
name: solr-{{ include "ckan.fullname" . }}-configset-configmap
{{ end }}
{{ if .Values.ckan.psql.initialize }}
- name: psql-init-configmap
- name: psql-{{ include "ckan.fullname" . }}-init-configmap
configMap:
name: psql-init-configmap
name: psql-{{ include "ckan.fullname" . }}-init-configmap
{{ end }}
{{ if .Values.pgbouncer.enabled }}
- name: configfiles
Expand Down Expand Up @@ -121,7 +121,7 @@ spec:
env:
{{- if .Values.solr.enabled }}
- name: CKAN_SOLR_URL
value: http://{{ .Release.Name }}-solr-headless:8983/solr/ckancollection
value: http://{{ include "ckan.fullname" . }}-solr-headless:8983/solr/ckancollection
{{- end }}
- name: CKAN_SOLR_INIT_NUMSHARDS
value: "{{ .Values.solr.initialize.numShards }}"
Expand All @@ -131,6 +131,7 @@ spec:
value: "{{ .Values.solr.initialize.maxShardsPerNode }}"
- name: CKAN_SOLR_INIT_CONFIGSETNAME
value: "{{ .Values.solr.initialize.configsetName }}"

command:
- /bin/bash
- -c
Expand All @@ -143,10 +144,10 @@ spec:
echo "Solr Initialized"
sleep infinity
volumeMounts:
- name: solr-init-configmap
- name: solr-{{ include "ckan.fullname" . }}-init-configmap
mountPath: /srv/solr-init
readOnly: false
- name: solr-configset-configmap
- name: solr-{{ include "ckan.fullname" . }}-configset-configmap
mountPath: /srv/solr-configset
readOnly: false
- name: ckan-config
Expand Down Expand Up @@ -181,7 +182,7 @@ spec:
key: psqlMasterPassword
{{- if .Values.solr.enabled }}
- name: CKAN_SOLR_URL
value: http://{{ .Release.Name }}-solr-headless:8983/solr/ckancollection
value: http://{{ include "ckan.fullname" . }}-solr-headless:8983/solr/ckancollection
{{- end }}
- name: CKAN_SQLALCHEMY_URL
valueFrom:
Expand Down Expand Up @@ -222,7 +223,7 @@ spec:
- name: ckan-config
mountPath: /srv/app
readOnly: false
- name: psql-init-configmap
- name: psql-{{ include "ckan.fullname" . }}-init-configmap
mountPath: /tmp/psql-init
{{ end }}
- name: {{ .Chart.Name }}
Expand All @@ -245,7 +246,7 @@ spec:
if getenv(v):
print(f"{k} = {getenv(v)}")
EOF
ckan config-tool /srv/app/production.ini "ckan.plugins = ${CKAN_PLUGINS}"
ckan config-tool /srv/app/production.ini "ckan.site_title = ${CKAN_SITE_TITLE}"
echo "Applying the production.ini overlay..."
ckan config-tool /srv/app/production.ini -f /config/production.ini
ckan -c /srv/app/production.ini db init
Expand Down Expand Up @@ -310,6 +311,18 @@ spec:
value: {{ .Values.ckan.siteUrl }}
- name: CKAN_PLUGINS
value: {{ .Values.ckan.ckanPlugins }}
- name: CKAN_SCHEMING_DATASETS_SCHEMAS
value: {{ .Values.ckan.scheming.dataset_schemas }}
- name: CKAN_SCHEMING_PRESETS
value: {{ .Values.ckan.scheming.presets }}
- name: CKAN_SCHEMING_GROUP_SCHEMAS
value: {{ .Values.ckan.scheming.group_schemas }}
- name: CKAN_SCHEMING_ORGANIZATION_SCHEMAS
value: {{ .Values.ckan.scheming.organization_schemas }}
- name: CKAN_SCHEMING_DATASET_FALLBACK
value: "{{ .Values.ckan.scheming.dataset_fallback }}"
- name: ACTIVITY_STREAM_EMAIL_NOTIFICAYIONS
value: "{{ .Values.ckan.activityStreamsEmailNotifications }}"
- name: CKAN_STORAGE_PATH
value: {{ .Values.ckan.storagePath }}
{{- if .Values.external.enabled }}
Expand Down Expand Up @@ -345,11 +358,11 @@ spec:
key: ckanDatastoreReadUrl
{{- if .Values.solr.enabled }}
- name: CKAN_SOLR_URL
value: http://{{ .Release.Name }}-solr-headless:8983/solr/ckancollection
value: http://{{ include "ckan.fullname" . }}-solr-headless:8983/solr/ckancollection
{{- end }}
{{- if .Values.redis.enabled }}
- name: CKAN_REDIS_URL
value: redis://{{ .Release.Name }}-redis-headless:6379/0
value: redis://ckan-redis-headless:6379/0
{{- end }}
- name: CKANEXT_SPATIAL_SEARCH_BACKEND
value: {{ .Values.ckan.spatialBackend }}
Expand Down Expand Up @@ -395,9 +408,9 @@ spec:
failureThreshold: {{ .Values.ckan.liveness.failureThreshold }}
timeoutSeconds: {{ .Values.ckan.liveness.timeoutSeconds }}
volumeMounts:
- name: ckan-prerun-configmap
- name: ckan-{{ include "ckan.fullname" . }}-prerun-configmap
mountPath: /srv/prerun
- name: ckan-ini-overlay-configmap
- name: ckan-{{ include "ckan.fullname" . }}-ini-overlay-configmap
mountPath: /config/
- name: ckan-config
mountPath: /srv/app
Expand Down
4 changes: 2 additions & 2 deletions stable/ckan/templates/ing/ckan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ kind: Ingress
metadata:
name: {{ $fullName }}
labels:
app.kubernetes.io/name: {{ include "ckan.name" . }}
app.kubernetes.io/name: {{ include "ckan.fullname" . }}
helm.sh/chart: {{ include "ckan.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/instance: {{ include "ckan.fullname" . }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- with .Values.ingress.annotations }}
annotations:
Expand Down
4 changes: 2 additions & 2 deletions stable/ckan/templates/pvc/pvc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ metadata:
{{- end }}
name: {{ include "ckan.fullname" . }}
labels:
app.kubernetes.io/name: {{ include "ckan.name" . }}
app.kubernetes.io/name: {{ include "ckan.fullname" . }}
helm.sh/chart: {{ include "ckan.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/instance: {{ include "ckan.fullname" . }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
spec:
accessModes:
Expand Down
4 changes: 2 additions & 2 deletions stable/ckan/templates/sa/ckan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ kind: ServiceAccount
metadata:
name: {{ include "ckan.serviceAccountName" . }}
labels:
app.kubernetes.io/name: {{ include "ckan.name" . }}
app.kubernetes.io/name: {{ include "ckan.fullname" . }}
helm.sh/chart: {{ include "ckan.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/instance: {{ include "ckan.fullname" . }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- with .Values.ckan.serviceAccount.annotations }}
annotations:
Expand Down
4 changes: 2 additions & 2 deletions stable/ckan/templates/secret/pgbouncer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ kind: Secret
metadata:
name: {{ include "ckan.fullname" . }}-pgbouncer
labels:
app.kubernetes.io/name: {{ include "ckan.name" . }}
app.kubernetes.io/name: {{ include "ckan.fullname" . }}
helm.sh/chart: {{ include "ckan.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/instance: {{ include "ckan.fullname" . }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
data:
pgbouncer.ini: {{ tpl (.Files.Get "conf/pgbouncer/pgbouncer.ini") . | b64enc }}
Expand Down
8 changes: 4 additions & 4 deletions stable/ckan/templates/svc/ckan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ kind: Service
metadata:
name: {{ include "ckan.fullname" . }}
labels:
app.kubernetes.io/name: {{ include "ckan.name" . }}
app.kubernetes.io/name: {{ include "ckan.fullname" . }}
helm.sh/chart: {{ include "ckan.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/instance: {{ include "ckan.fullname" . }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
spec:
type: {{ .Values.ckan.service.type }}
Expand All @@ -15,6 +15,6 @@ spec:
protocol: TCP
name: http
selector:
app.kubernetes.io/name: {{ include "ckan.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/name: {{ include "ckan.fullname" . }}
app.kubernetes.io/instance: {{ include "ckan.fullname" . }}
tier: ckan
Loading

0 comments on commit 7a3f974

Please sign in to comment.