summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPavel Paroulek <pavel.paroulek@orange.com>2019-05-20 20:14:36 +0200
committerPavel Paroulek <pavel.paroulek@orange.com>2019-08-29 19:25:59 +0200
commit3efe1df6fdba4af4e22849bec220c8daa4a68a49 (patch)
tree39169f2c01ce7a8faf472ceadc07012134b83fb6
parent55cb73cadc59537643c0fe5cb7ededadc9ff2b48 (diff)
Adding Graphgraph k8s config
Issue-ID: AAI-531 Signed-off-by: Pavel Paroulek <pavel.paroulek@orange.com> Change-Id: I2cb6471a0369ef8cc3f36b9988ff0df2045564a0
-rw-r--r--components/aai-graphgraph/Chart.yaml19
-rw-r--r--components/aai-graphgraph/config/application.properties66
-rw-r--r--components/aai-graphgraph/templates/configmap.yaml26
-rw-r--r--components/aai-graphgraph/templates/deployment.yaml119
-rw-r--r--components/aai-graphgraph/templates/service.yaml35
-rw-r--r--components/aai-graphgraph/values.yaml88
-rw-r--r--requirements.yaml4
7 files changed, 357 insertions, 0 deletions
diff --git a/components/aai-graphgraph/Chart.yaml b/components/aai-graphgraph/Chart.yaml
new file mode 100644
index 0000000..79fab9e
--- /dev/null
+++ b/components/aai-graphgraph/Chart.yaml
@@ -0,0 +1,19 @@
+# Copyright © 2019 Orange
+#
+# 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.
+
+
+apiVersion: v1
+description: ONAP AAI Graphgraph
+name: aai-graphgraph
+version: 5.0.0
diff --git a/components/aai-graphgraph/config/application.properties b/components/aai-graphgraph/config/application.properties
new file mode 100644
index 0000000..0d31641
--- /dev/null
+++ b/components/aai-graphgraph/config/application.properties
@@ -0,0 +1,66 @@
+# Copyright © 2019 Orange
+#
+# 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.
+
+# Schema related attributes for the oxm and edges
+# Any additional schema related attributes should start with prefix schema
+spring.application.name=graphgraph
+
+schema.configuration.location=N/A
+schema.source.name=onap
+schema.nodes.location=${server.local.startpath}/schema/${schema.source.name}/oxm/
+schema.edges.location=${server.local.startpath}/schema/${schema.source.name}/dbedgerules/
+
+server.local.startpath=/graphgraph
+schema.ingest.file=${server.local.startpath}/application.properties
+
+# Schema Version Related Attributes
+
+schema.uri.base.path={{ .Values.global.config.schema.uri.base.path }}
+# Lists all of the versions in the schema
+schema.version.list={{ .Values.global.config.schema.version.list }}
+# Specifies from which version should the depth parameter to default to zero
+schema.version.depth.start={{ .Values.global.config.schema.version.depth }}
+# Specifies from which version should the related link be displayed in response payload
+schema.version.related.link.start={{ .Values.global.config.schema.version.related.link }}
+# Specifies from which version should the client see only the uri excluding host info
+# Before this version server base will also be included
+schema.version.app.root.start={{ .Values.global.config.schema.version.app.root }}
+# Specifies from which version should the namespace be changed
+schema.version.namespace.change.start={{ .Values.global.config.schema.version.namespace.change }}
+# Specifies from which version should the client start seeing the edge label in payload
+schema.version.edge.label.start={{ .Values.global.config.schema.version.edge.label }}
+# Specifies the version that the application should default to
+schema.version.api.default={{ .Values.global.config.schema.version.api.default }}
+schema.translator.list=schema-service
+schema.service.base.url=https://aai-schema-service.{{ include "common.namespace" . }}:8452/aai/schema-service/v1/
+# schema.service.client=no-auth
+schema.service.nodes.endpoint=nodes?version=
+schema.service.edges.endpoint=edgerules?version=
+schema.service.versions.endpoint=versions
+
+schema.service.versions.override=false
+
+server.port=8453
+schema.service.ssl.enabled-protocols=TLSv1.1,TLSv1.2
+schema.service.ssl.client-auth=want
+schema.service.ssl.key-store-type=JKS
+schema.service.client=one-way-ssl
+schema.service.ssl.key-store=${server.local.startpath}/etc/auth/{{ .Values.global.config.keystore.filename }}
+schema.service.ssl.trust-store=${server.local.startpath}/etc/auth/{{ .Values.global.config.truststore.filename }}
+schema.service.ssl.key-store-password=password({{ .Values.global.config.keystore.passwd }})
+schema.service.ssl.trust-store-password=password({{ .Values.global.config.truststore.passwd }})
+
+
+
+
diff --git a/components/aai-graphgraph/templates/configmap.yaml b/components/aai-graphgraph/templates/configmap.yaml
new file mode 100644
index 0000000..a75cde1
--- /dev/null
+++ b/components/aai-graphgraph/templates/configmap.yaml
@@ -0,0 +1,26 @@
+# Copyright © 2019 Orange
+#
+# 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.
+
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: {{ include "common.fullname" . }}-springapp-configmap
+ namespace: {{ include "common.namespace" . }}
+ labels:
+ app: {{ include "common.name" . }}
+ chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+ release: {{ .Release.Name }}
+ heritage: {{ .Release.Service }}
+data:
+{{ tpl (.Files.Glob "config/application.properties").AsConfig . | indent 2 }}
diff --git a/components/aai-graphgraph/templates/deployment.yaml b/components/aai-graphgraph/templates/deployment.yaml
new file mode 100644
index 0000000..520dbf6
--- /dev/null
+++ b/components/aai-graphgraph/templates/deployment.yaml
@@ -0,0 +1,119 @@
+# Copyright © 2019 Orange
+# Modifications Copyright © 2018 AT&T
+#
+# 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.
+
+apiVersion: extensions/v1beta1
+kind: Deployment
+metadata:
+ name: {{ include "common.fullname" . }}
+ namespace: {{ include "common.namespace" . }}
+ labels:
+ app: {{ include "common.name" . }}
+ chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+ release: {{ .Release.Name }}
+ heritage: {{ .Release.Service }}
+spec:
+ replicas: {{ .Values.replicaCount }}
+ selector:
+ matchLabels:
+ app: {{ include "common.name" . }}
+ template:
+ metadata:
+ labels:
+ app: {{ include "common.name" . }}
+ release: {{ .Release.Name }}
+ name: {{ include "common.name" . }}
+ annotations:
+ checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
+ spec:
+ hostname: aai-graphgraph
+ initContainers:
+ - command:
+ - /root/ready.py
+ args:
+ - --container-name
+ - aai-schema-service
+ env:
+ - name: NAMESPACE
+ valueFrom:
+ fieldRef:
+ apiVersion: v1
+ fieldPath: metadata.namespace
+ image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
+ imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+ name: {{ include "common.name" . }}-readiness
+ containers:
+ - name: {{ include "common.name" . }}
+ image: "{{ include "common.repository" . }}/{{ .Values.image }}"
+ imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+ env:
+ - name: LOCAL_USER_ID
+ value: {{ .Values.global.config.userId | quote }}
+ - name: LOCAL_GROUP_ID
+ value: {{ .Values.global.config.groupId | quote }}
+ volumeMounts:
+ - mountPath: /etc/localtime
+ name: localtime
+ readOnly: true
+ - mountPath: /graphgraph/application.properties
+ name: springapp-conf
+ subPath: application.properties
+ {{ $global := . }}
+ {{ range $job := .Values.global.config.auth.files }}
+ - mountPath: /graphgraph/etc/auth/{{ . }}
+ name: auth-truststore-sec
+ subPath: {{ . }}
+ {{ end }}
+ ports:
+ - containerPort: 8453
+ # disable liveness probe when breakpoints set in debugger
+ # so K8s doesn't restart unresponsive container
+ {{ if .Values.liveness.enabled }}
+ livenessProbe:
+ tcpSocket:
+ port: {{ .Values.service.internalPort }}
+ initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
+ periodSeconds: {{ .Values.liveness.periodSeconds }}
+ {{ end }}
+ resources:
+{{ include "common.resources" . | indent 12 }}
+ {{- if .Values.nodeSelector }}
+ nodeSelector:
+{{ toYaml .Values.nodeSelector | indent 8 }}
+ {{- end -}}
+ {{- if .Values.affinity }}
+ affinity:
+{{ toYaml .Values.affinity | indent 8 }}
+ {{- end }}
+ volumes:
+ - name: aai-common-aai-auth-mount
+ secret:
+ secretName: aai-common-aai-auth
+ - name: localtime
+ hostPath:
+ path: /etc/localtime
+ - name: springapp-conf
+ configMap:
+ name: {{ include "common.fullname" . }}-springapp-configmap
+ - name: auth-truststore-sec
+ secret:
+ secretName: aai-common-truststore
+ items:
+ {{ range $job := .Values.global.config.auth.files }}
+ - key: {{ . }}
+ path: {{ . }}
+ {{ end }}
+ restartPolicy: {{ .Values.restartPolicy }}
+ imagePullSecrets:
+ - name: "{{ include "common.namespace" . }}-docker-registry-key"
diff --git a/components/aai-graphgraph/templates/service.yaml b/components/aai-graphgraph/templates/service.yaml
new file mode 100644
index 0000000..e441022
--- /dev/null
+++ b/components/aai-graphgraph/templates/service.yaml
@@ -0,0 +1,35 @@
+# Copyright © 2019 Orange
+#
+# 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.
+
+apiVersion: v1
+kind: Service
+metadata:
+ name: {{ include "common.servicename" . }}
+ namespace: {{ include "common.namespace" . }}
+ labels:
+ app: {{ include "common.name" . }}
+ chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+ release: {{ .Release.Name }}
+ heritage: {{ .Release.Service }}
+spec:
+ type: NodePort
+ ports:
+ - port: {{ .Values.service.internalPort }}
+ nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }}
+ name: {{ .Values.service.portName }}
+ targetPort: {{ .Values.service.internalPort }}
+ protocol: TCP
+ selector:
+ app: {{ include "common.name" . }}
+ release: {{ .Release.Name }}
diff --git a/components/aai-graphgraph/values.yaml b/components/aai-graphgraph/values.yaml
new file mode 100644
index 0000000..f110d5c
--- /dev/null
+++ b/components/aai-graphgraph/values.yaml
@@ -0,0 +1,88 @@
+# Copyright © 2019 Orange
+#
+# 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.
+
+# Default values for resources.
+# This is a YAML-formatted file.
+# Declare variables to be passed into your templates.
+global: # global defaults
+ nodePortPrefix: 302
+ readinessRepository: oomk8s
+ readinessImage: readiness-check:2.0.2
+
+# application image
+repository: nexus3.onap.org:10001
+image: aai-graphgraph:1.5
+pullPolicy: Always
+restartPolicy: Always
+flavor: small
+# default number of instances
+replicaCount: 1
+
+nodeSelector: {}
+
+affinity: {}
+
+# probe configuration parameters
+liveness:
+ initialDelaySeconds: 60
+ periodSeconds: 60
+ # necessary to disable liveness probe when setting breakpoints
+ # in debugger so K8s doesn't restart unresponsive container
+ enabled: false
+
+readiness:
+ initialDelaySeconds: 60
+ periodSeconds: 10
+
+service:
+ portName: aai-graphgraph-8453
+ internalPort: 8453
+ nodePort: 85
+
+ingress:
+ enabled: false
+
+ # We usually recommend not to specify default resources and to leave this as a conscious
+ # choice for the user. This also increases chances charts run on environments with little
+ # resources, such as Minikube. If you do want to specify resources, uncomment the following
+ # lines, adjust them as necessary, and remove the curly braces after 'resources:'.
+ #
+ # Example:
+ # Configure resource requests and limits
+ # ref: http://kubernetes.io/docs/user-guide/compute-resources/
+ # Minimum memory for development is 2 CPU cores and 4GB memory
+ # Minimum memory for production is 4 CPU cores and 8GB memory
+#resources:
+# limits:
+# cpu: 2
+# memory: 4Gi
+# requests:
+# cpu: 2
+# memory: 4Gi
+resources:
+ small:
+ limits:
+ cpu: 0.1
+ memory: 2Gi
+ requests:
+ cpu: 0.01
+ memory: 1Gi
+ large:
+ limits:
+ cpu: 0.1
+ memory: 2Gi
+ requests:
+ cpu: 0.01
+ memory: 1Gi
+ unlimited: {}
diff --git a/requirements.yaml b/requirements.yaml
index 92a70ad..176826e 100644
--- a/requirements.yaml
+++ b/requirements.yaml
@@ -79,3 +79,7 @@ dependencies:
version: ~5.x-0
repository: 'file://components/aai-traversal'
condition: aai-traversal.enabled
+ - name: aai-graphgraph
+ version: ~5.x-0
+ repository: 'file://components/aai-graphgraph'
+ condition: aai-graphgraph.enabled