diff --git a/kubernetes/gaffer-road-traffic/templates/data-loader-job.yaml b/kubernetes/gaffer-road-traffic/templates/data-loader-job.yaml index b8dc2ce2..c4354f45 100644 --- a/kubernetes/gaffer-road-traffic/templates/data-loader-job.yaml +++ b/kubernetes/gaffer-road-traffic/templates/data-loader-job.yaml @@ -42,6 +42,9 @@ spec: - name: store-properties mountPath: /gaffer/store/ readOnly: true + - name: operation-declarations + mountPath: /gaffer/operations/ + readOnly: true resources: {{- toYaml .Values.loader.resources | nindent 10 }} volumes: @@ -57,6 +60,10 @@ spec: secret: secretName: {{ template "callSubChartTemplate" (list . "gaffer" "gaffer.fullname") }}-store-properties optional: false + - name: operation-declarations + configMap: + name: {{ template "callSubChartTemplate" (list . "gaffer" "gaffer.fullname") }}-operation-declarations + optional: true {{- with .Values.loader.affinity }} affinity: {{- toYaml . | nindent 8 }} diff --git a/kubernetes/gaffer-road-traffic/values.yaml b/kubernetes/gaffer-road-traffic/values.yaml index 3b1fd805..18c834f0 100644 --- a/kubernetes/gaffer-road-traffic/values.yaml +++ b/kubernetes/gaffer-road-traffic/values.yaml @@ -31,7 +31,6 @@ gaffer: config: graphId: "roadTraffic" description: "A graph containing sample GB road traffic data from the Department of Transport" - schema: elements.json: |- { diff --git a/kubernetes/gaffer/templates/api/deployment.yaml b/kubernetes/gaffer/templates/api/deployment.yaml index 101f8b5e..9e5c7ed9 100644 --- a/kubernetes/gaffer/templates/api/deployment.yaml +++ b/kubernetes/gaffer/templates/api/deployment.yaml @@ -53,6 +53,9 @@ spec: - name: store-properties mountPath: /gaffer/store/ readOnly: true + - name: operation-declarations + mountPath: /gaffer/operations/ + readOnly: true ports: - name: http protocol: TCP @@ -102,3 +105,7 @@ spec: secret: secretName: {{ template "gaffer.fullname" . }}-store-properties optional: false + - name: operation-declarations + configMap: + name: {{ template "gaffer.fullname" . }}-operation-declarations + optional: true diff --git a/kubernetes/gaffer/templates/operation-declarations.yaml b/kubernetes/gaffer/templates/operation-declarations.yaml new file mode 100644 index 00000000..4e7c9877 --- /dev/null +++ b/kubernetes/gaffer/templates/operation-declarations.yaml @@ -0,0 +1,30 @@ +{{- /* + +Copyright 2020 Crown Copyright + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +*/ -}} +{{- if .Values.graph.operationDeclarations }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "gaffer.fullname" . }}-operation-declarations + labels: + {{- include "gaffer.labels" . | nindent 4 }} +data: + operationDeclarations.json: |- + { + "operations": {{ toJson .Values.graph.operationDeclarations }} + } +{{- end }} \ No newline at end of file diff --git a/kubernetes/gaffer/templates/store-properties.yaml b/kubernetes/gaffer/templates/store-properties.yaml index 795ec256..dd06de4d 100644 --- a/kubernetes/gaffer/templates/store-properties.yaml +++ b/kubernetes/gaffer/templates/store-properties.yaml @@ -45,6 +45,9 @@ accumulo.password={{ required (print "Password required for API's Accumulo User: {{- range $property, $value := .Values.graph.storeProperties }} {{ $property }}={{ $value }} {{- end }} +{{- if and .Values.graph.operationDeclarations (not (hasKey .Values.graph.storeProperties "gaffer.store.operation.declarations")) }} +gaffer.store.operation.declarations=/gaffer/operations/operationDeclarations.json +{{- end }} {{- end -}} apiVersion: v1 diff --git a/kubernetes/gaffer/values.yaml b/kubernetes/gaffer/values.yaml index 49d15e86..517ab03e 100644 --- a/kubernetes/gaffer/values.yaml +++ b/kubernetes/gaffer/values.yaml @@ -25,6 +25,7 @@ graph: storeProperties: gaffer.cache.service.class: uk.gov.gchq.gaffer.cache.impl.HashMapCacheService gaffer.store.job.tracker.enabled: true + # operationDeclarations: [] # See: https://github.com/gchq/gaffer-tools/tree/master/ui#configuration ui: "{}"