Skip to content

Commit

Permalink
gchqgh-34 added operation declarations to Helm deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
d47853 committed Sep 2, 2020
1 parent 9ac0ddd commit dbb91ac
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 1 deletion.
7 changes: 7 additions & 0 deletions kubernetes/gaffer-road-traffic/templates/data-loader-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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 }}
Expand Down
1 change: 0 additions & 1 deletion kubernetes/gaffer-road-traffic/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |-
{
Expand Down
7 changes: 7 additions & 0 deletions kubernetes/gaffer/templates/api/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
30 changes: 30 additions & 0 deletions kubernetes/gaffer/templates/operation-declarations.yaml
Original file line number Diff line number Diff line change
@@ -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 }}
3 changes: 3 additions & 0 deletions kubernetes/gaffer/templates/store-properties.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions kubernetes/gaffer/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: "{}"
Expand Down

0 comments on commit dbb91ac

Please sign in to comment.