From ad1c39120c6aee2cfe3a0a60cd382d443f9a70e4 Mon Sep 17 00:00:00 2001 From: Stefan Wiedemann Date: Thu, 26 Oct 2023 15:01:12 +0200 Subject: [PATCH] update consumer --- .../blockchain-connector-core/Chart.yaml | 13 - .../blockchain-connector-core/cm.yaml | 75 ++++++ .../blockchain-connector-core/deployment.yaml | 46 ++++ .../blockchain-connector-core/service.yaml | 14 ++ .../templates/_helpers.tpl | 74 ------ .../templates/configmap.yml | 37 --- .../templates/deployment-hpa.yaml | 19 -- .../templates/deployment.yaml | 92 ------- .../templates/service.yaml | 20 -- .../templates/serviceaccount.yaml | 12 - .../blockchain-connector-core/values.yaml | 232 ------------------ .../consumer/connector/dlt-adapter/Chart.yaml | 7 - .../connector/dlt-adapter/deployment.yaml | 32 +++ .../connector/dlt-adapter/service.yaml | 14 ++ .../dlt-adapter/templates/_helpers.tpl | 74 ------ .../dlt-adapter/templates/deployment-hpa.yaml | 19 -- .../dlt-adapter/templates/deployment.yaml | 60 ----- .../dlt-adapter/templates/service.yaml | 20 -- .../dlt-adapter/templates/serviceaccount.yaml | 12 - .../connector/dlt-adapter/values.yaml | 206 ---------------- .../connector/orion-ld-adapter/cm.yaml | 54 ++++ .../orion-ld-adapter/deployment.yaml | 46 ++++ .../connector/orion-ld-adapter/service.yaml | 14 ++ .../connector/orionld-adapter/Chart.yaml | 7 - .../orionld-adapter/templates/_helpers.tpl | 74 ------ .../orionld-adapter/templates/configmap.yml | 23 -- .../templates/deployment-hpa.yaml | 19 -- .../orionld-adapter/templates/deployment.yaml | 92 ------- .../orionld-adapter/templates/service.yaml | 20 -- .../templates/serviceaccount.yaml | 12 - .../connector/orionld-adapter/values.yaml | 222 ----------------- 31 files changed, 295 insertions(+), 1366 deletions(-) delete mode 100644 aws/dome/consumer/connector/blockchain-connector-core/Chart.yaml create mode 100644 aws/dome/consumer/connector/blockchain-connector-core/cm.yaml create mode 100644 aws/dome/consumer/connector/blockchain-connector-core/deployment.yaml create mode 100644 aws/dome/consumer/connector/blockchain-connector-core/service.yaml delete mode 100644 aws/dome/consumer/connector/blockchain-connector-core/templates/_helpers.tpl delete mode 100644 aws/dome/consumer/connector/blockchain-connector-core/templates/configmap.yml delete mode 100644 aws/dome/consumer/connector/blockchain-connector-core/templates/deployment-hpa.yaml delete mode 100644 aws/dome/consumer/connector/blockchain-connector-core/templates/deployment.yaml delete mode 100644 aws/dome/consumer/connector/blockchain-connector-core/templates/service.yaml delete mode 100644 aws/dome/consumer/connector/blockchain-connector-core/templates/serviceaccount.yaml delete mode 100644 aws/dome/consumer/connector/blockchain-connector-core/values.yaml delete mode 100644 aws/dome/consumer/connector/dlt-adapter/Chart.yaml create mode 100644 aws/dome/consumer/connector/dlt-adapter/deployment.yaml create mode 100644 aws/dome/consumer/connector/dlt-adapter/service.yaml delete mode 100644 aws/dome/consumer/connector/dlt-adapter/templates/_helpers.tpl delete mode 100644 aws/dome/consumer/connector/dlt-adapter/templates/deployment-hpa.yaml delete mode 100644 aws/dome/consumer/connector/dlt-adapter/templates/deployment.yaml delete mode 100644 aws/dome/consumer/connector/dlt-adapter/templates/service.yaml delete mode 100644 aws/dome/consumer/connector/dlt-adapter/templates/serviceaccount.yaml delete mode 100644 aws/dome/consumer/connector/dlt-adapter/values.yaml create mode 100644 aws/dome/consumer/connector/orion-ld-adapter/cm.yaml create mode 100644 aws/dome/consumer/connector/orion-ld-adapter/deployment.yaml create mode 100644 aws/dome/consumer/connector/orion-ld-adapter/service.yaml delete mode 100644 aws/dome/consumer/connector/orionld-adapter/Chart.yaml delete mode 100644 aws/dome/consumer/connector/orionld-adapter/templates/_helpers.tpl delete mode 100644 aws/dome/consumer/connector/orionld-adapter/templates/configmap.yml delete mode 100644 aws/dome/consumer/connector/orionld-adapter/templates/deployment-hpa.yaml delete mode 100644 aws/dome/consumer/connector/orionld-adapter/templates/deployment.yaml delete mode 100644 aws/dome/consumer/connector/orionld-adapter/templates/service.yaml delete mode 100644 aws/dome/consumer/connector/orionld-adapter/templates/serviceaccount.yaml delete mode 100644 aws/dome/consumer/connector/orionld-adapter/values.yaml diff --git a/aws/dome/consumer/connector/blockchain-connector-core/Chart.yaml b/aws/dome/consumer/connector/blockchain-connector-core/Chart.yaml deleted file mode 100644 index 76f715e3..00000000 --- a/aws/dome/consumer/connector/blockchain-connector-core/Chart.yaml +++ /dev/null @@ -1,13 +0,0 @@ -apiVersion: v2 -name: blockchain-connector-core -description: A Helm chart for Blockchain Connector Kubernetes - -type: application -version: 0.0.1 -appVersion: v1alpha1 - -sources: - - https://github.com/in2workspace/in2-blockchain-connector-core -maintainers: - - name: ocanades - email: oriol.canades@in2.es \ No newline at end of file diff --git a/aws/dome/consumer/connector/blockchain-connector-core/cm.yaml b/aws/dome/consumer/connector/blockchain-connector-core/cm.yaml new file mode 100644 index 00000000..139daf49 --- /dev/null +++ b/aws/dome/consumer/connector/blockchain-connector-core/cm.yaml @@ -0,0 +1,75 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: dome-consumer-blockchain-connector-core +data: + application.yml: | + dlt-adapter: + domain: http://dome-consumer-dlt-adapter:8080 + blockchain: + rpcAddress: https://red-t.alastria.io/v0/9461d9f4292b41230527d57ee90652a6 + userEthereumAddress: "0xb794f5ea0ba39494ce839613fffba74279579268" + subscription: + active: false + notificationEndpoint: http://dome-consumer-blockchain-connector-core:8080/notifications/blockchain-node + event-type: "catalog" + broker: + externalDomain: https://orion.dome-consumer.fiware.dev + internalDomain: http://dome-consumer-orion-ld:1026 + ngsi-subscription: + notificationEndpoint: http://dome-consumer-blockchain-connector-core:8080/notifications/orion-ld + entityTypes: > + product-offering, + product-order + orion-ld-adapter: + domain: http://dome-consumer-orion-ld-adapter:8080 + spring: + application: + name: Blockchain Connector Core + datasource: + url: jdbc:h2:mem:dbtest + driver-class-name: org.h2.Driver + username: in2admin + password: in2pass + jpa: + database-platform: org.hibernate.dialect.H2Dialect + open-in-view: false + properties: + jakarta.persistence.sharedCache.mode: UNSPECIFIED + hibernate: + ddl-auto: update + show-sql: true + generate-ddl: true + security: + user: + name: in2test + password: in2pass + logging: + level: + ROOT: INFO + es.in2: DEBUG + management: + endpoints: + enabled-by-default: false + web: + exposure: + include: health, info, loggers, metrics + base-path: / + path-mapping: + health: health + info: info + loggers: loggers + metrics: metrics + endpoint: + health: + enabled: true + show-details: always + loggers: + enabled: true + metrics: + enabled: true + server: + port: 8080 + app: + openapi: + dev-url: http://localhost:8080 \ No newline at end of file diff --git a/aws/dome/consumer/connector/blockchain-connector-core/deployment.yaml b/aws/dome/consumer/connector/blockchain-connector-core/deployment.yaml new file mode 100644 index 00000000..c5f7b990 --- /dev/null +++ b/aws/dome/consumer/connector/blockchain-connector-core/deployment.yaml @@ -0,0 +1,46 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: dome-consumer-blockchain-connector-core + labels: + app.kubernetes.io/instance: dome-consumer-blockchain-connector-core + app.kubernetes.io/name: dome-consumer-blockchain-connector-core +spec: + replicas: 1 + revisionHistoryLimit: 3 + selector: + matchLabels: + app.kubernetes.io/instance: dome-consumer-blockchain-connector-core + app.kubernetes.io/name: dome-consumer-blockchain-connector-core + strategy: + rollingUpdate: + maxSurge: 1 + maxUnavailable: 0 + template: + metadata: + labels: + app.kubernetes.io/instance: dome-consumer-blockchain-connector-core + app.kubernetes.io/name: dome-consumer-blockchain-connector-core + spec: + containers: + - image: quay.io/wi_stefan/blockchain-connector-core:0.0.1 + imagePullPolicy: IfNotPresent + name: blockchain-connector + env: + - name: SPRING_CONFIG_NAME + value: marketplace + - name: SPRING_CONFIG_LOCATION + value: /config/application.yml + - name: SPRING_PROFILES_ACTIVE + value: marketplace + ports: + - containerPort: 8080 + name: http + protocol: TCP + volumeMounts: + - mountPath: /config/ + name: custom-config + volumes: + - configMap: + name: dome-consumer-blockchain-connector-core + name: custom-config diff --git a/aws/dome/consumer/connector/blockchain-connector-core/service.yaml b/aws/dome/consumer/connector/blockchain-connector-core/service.yaml new file mode 100644 index 00000000..63c3b849 --- /dev/null +++ b/aws/dome/consumer/connector/blockchain-connector-core/service.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: Service +metadata: + name: dome-consumer-blockchain-connector-core +spec: + type: ClusterIP + ports: + - name: http + port: 8080 + protocol: TCP + targetPort: 8080 + selector: + app.kubernetes.io/instance: dome-consumer-blockchain-connector-core + app.kubernetes.io/name: dome-consumer-blockchain-connector-core \ No newline at end of file diff --git a/aws/dome/consumer/connector/blockchain-connector-core/templates/_helpers.tpl b/aws/dome/consumer/connector/blockchain-connector-core/templates/_helpers.tpl deleted file mode 100644 index 4f4de2a8..00000000 --- a/aws/dome/consumer/connector/blockchain-connector-core/templates/_helpers.tpl +++ /dev/null @@ -1,74 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "bcc.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "bcc.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "bcc.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create the name of the service account to use -*/}} -{{- define "bcc.serviceAccountName" -}} -{{- if .Values.serviceAccount.create -}} - {{ default (include "bcc.fullname" .) .Values.serviceAccount.name }} -{{- else -}} - {{ default "default" .Values.serviceAccount.name }} -{{- end -}} -{{- end -}} - -{{/* -Common labels -*/}} -{{- define "bcc.labels" -}} -app.kubernetes.io/name: {{ include "bcc.name" . }} -helm.sh/chart: {{ include "bcc.chart" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end -}} - -{{/* -Support for existing database secret -*/}} -{{- define "bcc.secretName" -}} - {{- if .Values.database.existingSecret.enabled -}} - {{- printf "%s" (tpl .Values.database.existingSecret.name $) -}} - {{- else -}} - {{- printf "%s" (include "bcc.fullname" .) -}} - {{- end -}} -{{- end -}} - -{{- define "bcc.passwordKey" -}} - {{- if .Values.database.existingSecret.enabled -}} - {{- printf "%s" (tpl .Values.database.existingSecret.key $) -}} - {{- else -}} - {{- printf "password" -}} - {{- end -}} -{{- end -}} diff --git a/aws/dome/consumer/connector/blockchain-connector-core/templates/configmap.yml b/aws/dome/consumer/connector/blockchain-connector-core/templates/configmap.yml deleted file mode 100644 index 19fc74cd..00000000 --- a/aws/dome/consumer/connector/blockchain-connector-core/templates/configmap.yml +++ /dev/null @@ -1,37 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ include "bcc.fullname" . }} -data: - integration-config.yml: | - orion-ld-if: - orion-ld: - domain: {{ .Values.orion.address }} - path: - entities: {{ .Values.orion.entitiesPath }} - subscriptions: {{ .Values.orion.subscriptionPath }} - api: - domain: {{ .Values.adapter.host }} - path: - subscription: {{ .Values.adapter.subscriptionPath }} - entities: {{ .Values.adapter.publishPath }} - subscription: - type: {{ .Values.orion.subscription.type }} - notification-endpoint-uri: {{ .Values.orion.subscription.notificationEndpoint }} - entities: > - {{ .Values.orion.subscription.entities }} - id-prefix: {{ .Values.orion.subscription.prefix | quote }} - blockchain-node-if: - api: - domain: {{ .Values.dlt.address }} - path: - configure-node: {{ .Values.dlt.configurationPath }} - publish: {{ .Values.dlt.publishPath }} - subscribe: {{ .Values.dlt.subscribePath }} - subscription: - active: {{ .Values.dlt.subscription.active }} - notification-endpoint-uri: {{ .Values.dlt.subscription.notificationEndpoint }} - event-type: {{ .Values.dlt.subscription.eventType }} - node: - rpcAddress: {{ .Values.dlt.node.rpcAddress }} - userEthereumAddress: {{ .Values.dlt.node.userEthereumAddress }} \ No newline at end of file diff --git a/aws/dome/consumer/connector/blockchain-connector-core/templates/deployment-hpa.yaml b/aws/dome/consumer/connector/blockchain-connector-core/templates/deployment-hpa.yaml deleted file mode 100644 index 28f5d417..00000000 --- a/aws/dome/consumer/connector/blockchain-connector-core/templates/deployment-hpa.yaml +++ /dev/null @@ -1,19 +0,0 @@ -{{- if .Values.autoscaling.enabled -}} -apiVersion: autoscaling/v2beta2 -kind: HorizontalPodAutoscaler -metadata: - name: {{ include "bcc.fullname" . }} - labels: - {{ include "bcc.labels" . | nindent 4 }} -spec: - scaleTargetRef: - apiVersion: apps/v1 - kind: Deployment - name: {{ include "bcc.fullname" . }} - minReplicas: {{ .Values.autoscaling.minReplicas }} - maxReplicas: {{ .Values.autoscaling.maxReplicas }} -{{- with .Values.autoscaling.metrics }} - metrics: - {{- toYaml . | nindent 2 }} -{{- end }} -{{- end }} \ No newline at end of file diff --git a/aws/dome/consumer/connector/blockchain-connector-core/templates/deployment.yaml b/aws/dome/consumer/connector/blockchain-connector-core/templates/deployment.yaml deleted file mode 100644 index cbb276bd..00000000 --- a/aws/dome/consumer/connector/blockchain-connector-core/templates/deployment.yaml +++ /dev/null @@ -1,92 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ include "bcc.fullname" . }} - labels: - {{ include "bcc.labels" . | nindent 4 }} -spec: - {{- if not .Values.autoscaling.enabled }} - replicas: {{ .Values.deployment.replicaCount }} - {{- end }} - revisionHistoryLimit: {{ .Values.deployment.revisionHistoryLimit }} - strategy: - {{- with .Values.deployment.updateStrategy }} - {{- toYaml . | nindent 4 }} - {{- end }} - selector: - matchLabels: - app.kubernetes.io/name: {{ include "bcc.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - template: - metadata: - labels: - {{ include "bcc.labels" . | nindent 8 }} - {{- with .Values.deployment.additionalLabels }} - {{- toYaml . | nindent 8 }} - {{- end }} - {{- if .Values.deployment.additionalAnnotations -}} - annotations: - prometheus.io/scrape: {{ .Values.prometheus.enabled | quote }} - prometheus.io/path: {{ .Values.prometheus.path }} - prometheus.io/port: {{ .Values.prometheus.port }} - {{- with .Values.deployment.additionalAnnotations }} - {{- toYaml . | nindent 8 }} - {{- end }} - {{- end }} - spec: - serviceAccountName: {{ include "bcc.serviceAccountName" . }} - containers: - - name: {{ .Chart.Name }} - image: "{{ .Values.deployment.image.repository }}:{{ .Values.deployment.image.tag }}" - imagePullPolicy: {{ .Values.deployment.image.pullPolicy }} - ports: - - name: http - containerPort: {{ .Values.port}} - protocol: TCP - - name: http-health - containerPort: {{ .Values.deployment.healthPort }} - protocol: TCP - livenessProbe: - httpGet: - path: /health - port: http-health - initialDelaySeconds: {{ .Values.deployment.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.deployment.livenessProbe.periodSeconds }} - successThreshold: {{ .Values.deployment.livenessProbe.successThreshold }} - timeoutSeconds: {{ .Values.deployment.livenessProbe.timeoutSeconds }} - readinessProbe: - httpGet: - path: /health - port: http-health - initialDelaySeconds: {{ .Values.deployment.readinessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.deployment.readinessProbe.periodSeconds }} - successThreshold: {{ .Values.deployment.readinessProbe.successThreshold }} - timeoutSeconds: {{ .Values.deployment.readinessProbe.timeoutSeconds }} - env: - - name: SPRING_PROFILES_ACTIVE - value: dev - - name: SPRING_CONFIG_IMPORT - value: "/src/main/resources/integration-config.yml" - volumeMounts: - - name: config-volume - mountPath: "/src/main/resources/" - readOnly: true - resources: - {{- toYaml .Values.deployment.resources | nindent 12 }} - volumes: - - name: config-volume - configMap: - name: {{ include "bcc.fullname" . }} - {{- with .Values.deployment.nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.deployment.affinity }} - affinity: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.deployment.tolerations }} - tolerations: - {{- toYaml . | nindent 8 }} - {{- end }} - restartPolicy: Always diff --git a/aws/dome/consumer/connector/blockchain-connector-core/templates/service.yaml b/aws/dome/consumer/connector/blockchain-connector-core/templates/service.yaml deleted file mode 100644 index 5d755069..00000000 --- a/aws/dome/consumer/connector/blockchain-connector-core/templates/service.yaml +++ /dev/null @@ -1,20 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ include "bcc.fullname" . }} - {{- if .Values.service.annotations }} - annotations: - {{ toYaml .Values.service.annotations | nindent 4 }} - {{- end }} - labels: - {{ include "bcc.labels" . | nindent 4 }} -spec: - type: {{ .Values.service.type }} - ports: - - port: {{ .Values.service.port }} - targetPort: {{ .Values.port }} - protocol: TCP - name: http - selector: - app.kubernetes.io/name: {{ include "bcc.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} diff --git a/aws/dome/consumer/connector/blockchain-connector-core/templates/serviceaccount.yaml b/aws/dome/consumer/connector/blockchain-connector-core/templates/serviceaccount.yaml deleted file mode 100644 index 9b48cd45..00000000 --- a/aws/dome/consumer/connector/blockchain-connector-core/templates/serviceaccount.yaml +++ /dev/null @@ -1,12 +0,0 @@ -{{- if .Values.serviceAccount.create -}} -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ include "bcc.fullname" . }} -{{- if .Values.serviceAccount.annotations }} - annotations: - {{ toYaml .Values.serviceAccount.annotations | nindent 4 }} -{{- end }} - labels: - {{ include "bcc.labels" . | nindent 4 }} -{{- end }} \ No newline at end of file diff --git a/aws/dome/consumer/connector/blockchain-connector-core/values.yaml b/aws/dome/consumer/connector/blockchain-connector-core/values.yaml deleted file mode 100644 index 98677a4f..00000000 --- a/aws/dome/consumer/connector/blockchain-connector-core/values.yaml +++ /dev/null @@ -1,232 +0,0 @@ -## Default values for blockchain-connector-core. -## This is a YAML-formatted file. -## Declare variables to be passed into your templates. - -# -- option to override the name config in the _helpers.tpl -nameOverride: "" - -# -- option to override the fullname config in the _helpers.tpl -fullnameOverride: "" - -## configuration for the k8s service to access blockchain-connector-core -service: - # -- service type - type: ClusterIP - # -- port to be used by the service - port: 8080 - # -- additional annotations, if required - annotations: { } - -# -- if a blockchain-connector-core specific service account should be used, it can be configured here -# ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ -serviceAccount: - # -- specifies if the account should be created - create: false - -## deployment specific configuration -deployment: - # -- initial number of target replications, can be different if autoscaling is enabled - replicaCount: 1 - # -- number of old replicas to be retained - revisionHistoryLimit: 3 - ## configuration of the blockchain-connector-core update strategy - updateStrategy: - # -- type of the update - type: RollingUpdate - # -- new pods will be added gradually - rollingUpdate: - # -- number of pods that can be created above the desired amount while updating - maxSurge: 1 - # -- number of pods that can be unavailable while updating - maxUnavailable: 0 - ## configuration of the image to be used - image: - # -- blockchain-connector-core image name - # ref: https://hub.docker.com/repository/docker/ocanades/blockchain-connector-core - repository: ocanades/blockchain-connector-core - # -- tag of the image to be used - tag: 1.0.0 - # -- specification of the image pull policy - pullPolicy: IfNotPresent - # -- additional labels for the deployment, if required - additionalLabels: { } - # -- additional annotations for the deployment, if required - additionalAnnotations: { } - ## blockchain-connector-core resource requests and limits, we leave the default empty to make that a conscious - ## choice by the user. For the autoscaling to make sense, you should configure this. - # resources: - # limits: - # cpu: 100m - # memory: 128Mi - # requests: - # cpu: 100m - # memory: 128Mi - # -- selector template - # ref: https://kubernetes.io/docs/user-guide/node-selection/ - nodeSelector: { } - # -- tolerations template - # ref: ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ - tolerations: [ ] - # -- affinity template - # ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity - affinity: { } - # -- port to request health information at - healthPort: 9090 - ## liveness and readiness probes - # ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes - livenessProbe: - initialDelaySeconds: 30 - periodSeconds: 10 - successThreshold: 1 - timeoutSeconds: 30 - readinessProbe: - initialDelaySeconds: 31 - periodSeconds: 10 - successThreshold: 1 - timeoutSeconds: 30 - -## pod autoscaling configuration, use for automatic scaling of the broker pods -autoscaling: - # -- should autoscaling be enabled for til - enabled: false - # -- minimum number of running pods - minReplicas: 1 - # -- maximum number of running pods - maxReplicas: 10 - # -- metrics to react on - metrics: [ ] - ## List of MetricSpecs to decide whether to scale - # See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.17/#metricspec-v2beta2-autoscaling - # scaler targets to hold average cpu around 80% - #- type: Resource - # resource: - # name: cpu - # target: - # type: Utilization - # averageUtilization: 80 - ## scaler targets to hold average memory around 80% - # - type: Resource - # resource: - # name: memory - # target: - # type: Utilization - # averageUtilization: 80 - -### openshift specific route definition. Will not work on plain k8s -#route: -# # -- route config for the trusted issuers list endpoint -# til: -# ## -- should the deployment create openshift routes -# enabled: false -# # -- annotations to be added to the route -# annotations: { } -# # -- host to be used -# # host: localhost -# # -- tls configuration for the route -# tls: { } -# # termination: edge -# # configuration for creation of certificates, using cert-manager. -# certificate: { } -# # allows to specify the issuer to be used. -# # issuer: -# # kind: ClusterIssuer -# # name: letsencrypt-aws-prod -# # -- route config for the trusted issuers registry endpoint -# tir: -# ## -- should the deployment create openshift routes -# enabled: false -# # -- annotations to be added to the route -# annotations: { } -# # -- host to be used -# # host: localhost -# # -- tls configuration for the route -# tls: { } -# # termination: edge -# # configuration for creation of certificates, using cert-manager. -# certificate: { } -# # allows to specify the issuer to be used. -# # issuer: -# # kind: ClusterIssuer -# # name: letsencrypt-aws-prod - -## ingress configuration -#ingress: -# # -- route config for the blockchain-connector-core endpoint -# bcc: -# # -- should there be an ingress to connect blockchain-connector-core with the public internet -# enabled: false -# # -- annotations to be added to the ingress -# annotations: { } -# # kubernetes.io/ingress.class: "ambassador" -# ## example annotations, allowing cert-manager to automatically create tls-certs and forcing everything to use ssl. -# # kubernetes.io/tls-acme: "true" -# # ingress.kubernetes.io/ssl-redirect: "true" -# # -- all hosts to be provided -# hosts: [ ] -# ## provide a hosts and the paths that should be available -# # - host: localhost -# # -- configure the ingress' tls -# tls: [ ] -# # - secretName: bcc-tls -# # hosts: -# # - bcc.fiware.org -# # -- route config for the trusted issuers registry endpoint -# tir: -# # -- should there be an ingress to connect til with the public internet -# enabled: false -# # -- annotations to be added to the ingress -# annotations: { } -# # kubernetes.io/ingress.class: "ambassador" -# ## example annotations, allowing cert-manager to automatically create tls-certs and forcing everything to use ssl. -# # kubernetes.io/tls-acme: "true" -# # ingress.kubernetes.io/ssl-redirect: "true" -# # -- all hosts to be provided -# hosts: [ ] -# ## provide a hosts and the paths that should be available -# # - host: localhost -# # -- configure the ingress' tls -# tls: [ ] -# # - secretName: til-tls -# # hosts: -# # - til.fiware.org - -# -- port that the blockchain-connector-core container uses -port: 8080 - -## configuration for prometheus monitoring -prometheus: - # -- should prometheus scrape be enabled - enabled: true - # -- path for prometheus scrape - path: /prometheus - # -- port prometheus scrape is available at - port: 9090 - -orion: - address: "https://orion.dome-consumer.fiware.dev" - entitiesPath: /ngsi-ld/v1/entities - subscriptionPath: /ngsi-ld/v1/subscriptions - subscription: - type: Subscription - notificationEndpoint: http://dome-consumer-blockchain-connector-core:8080/notifications/orion-ld - entities: product-order, product-offering - prefix: "urn:ngsi-ld:Subscription:" -adapter: - host: http://dome-consumer-dlt-adapter:8080 - subscriptionPath: /api/v1/subscribe - publishPath: /api/v1/publish -dlt: - address: http://dome-consumer-dlt-adapter:8080 - configurationPath: /api/v1/configureNode - publishPath: /api/v1/publishEvent - subscribePath: /api/v1/subscribe - subscription: - active: "true" - notificationEndpoint: http://dome-consumer-blockchain-connector-core:8080/notifications/blockchain-node - eventType: "ProductOffering" - node: - rpcAddress: https://red-t.alastria.io/v0/9461d9f4292b41230527d57ee90652a6 - userEthereumAddress: "0xb794f5ea0ba39494ce839613fffba74279579268" - -# -- a list of additional env vars to be set, check the blockchain-connector-core doc for all available options -additionalEnvVars: [ ] diff --git a/aws/dome/consumer/connector/dlt-adapter/Chart.yaml b/aws/dome/consumer/connector/dlt-adapter/Chart.yaml deleted file mode 100644 index 153ed5cd..00000000 --- a/aws/dome/consumer/connector/dlt-adapter/Chart.yaml +++ /dev/null @@ -1,7 +0,0 @@ -apiVersion: v2 -name: adapter -description: A Helm chart for DLT Adapter (Blockchain Node) Kubernetes - -type: application -version: 0.0.1 -appVersion: v1alpha1 diff --git a/aws/dome/consumer/connector/dlt-adapter/deployment.yaml b/aws/dome/consumer/connector/dlt-adapter/deployment.yaml new file mode 100644 index 00000000..59f620d8 --- /dev/null +++ b/aws/dome/consumer/connector/dlt-adapter/deployment.yaml @@ -0,0 +1,32 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: dome-consumer-dlt-adapter + labels: + app.kubernetes.io/instance: dome-consumer-dlt-adapter + app.kubernetes.io/name: dome-consumer-dlt-adapter +spec: + replicas: 1 + revisionHistoryLimit: 3 + selector: + matchLabels: + app.kubernetes.io/instance: dome-consumer-dlt-adapter + app.kubernetes.io/name: dome-consumer-dlt-adapter + strategy: + rollingUpdate: + maxSurge: 1 + maxUnavailable: 0 + template: + metadata: + labels: + app.kubernetes.io/instance: dome-consumer-dlt-adapter + app.kubernetes.io/name: dome-consumer-dlt-adapter + spec: + containers: + - image: ocanades/dlt-adapter:1.0.0 + imagePullPolicy: IfNotPresent + name: dlt-adapter + ports: + - containerPort: 8080 + name: http + protocol: TCP \ No newline at end of file diff --git a/aws/dome/consumer/connector/dlt-adapter/service.yaml b/aws/dome/consumer/connector/dlt-adapter/service.yaml new file mode 100644 index 00000000..ecbfc539 --- /dev/null +++ b/aws/dome/consumer/connector/dlt-adapter/service.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: Service +metadata: + name: dome-consumer-dlt-adapter +spec: + type: ClusterIP + ports: + - name: http + port: 8080 + protocol: TCP + targetPort: 8080 + selector: + app.kubernetes.io/instance: dome-consumer-dlt-adapter + app.kubernetes.io/name: dome-consumer-dlt-adapter \ No newline at end of file diff --git a/aws/dome/consumer/connector/dlt-adapter/templates/_helpers.tpl b/aws/dome/consumer/connector/dlt-adapter/templates/_helpers.tpl deleted file mode 100644 index 5fd48fe4..00000000 --- a/aws/dome/consumer/connector/dlt-adapter/templates/_helpers.tpl +++ /dev/null @@ -1,74 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "dltadapter.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "dltadapter.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "dltadapter.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create the name of the service account to use -*/}} -{{- define "dltadapter.serviceAccountName" -}} -{{- if .Values.serviceAccount.create -}} - {{ default (include "dltadapter.fullname" .) .Values.serviceAccount.name }} -{{- else -}} - {{ default "default" .Values.serviceAccount.name }} -{{- end -}} -{{- end -}} - -{{/* -Common labels -*/}} -{{- define "dltadapter.labels" -}} -app.kubernetes.io/name: {{ include "dltadapter.name" . }} -helm.sh/chart: {{ include "dltadapter.chart" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end -}} - -{{/* -Support for existing database secret -*/}} -{{- define "dltadapter.secretName" -}} - {{- if .Values.database.existingSecret.enabled -}} - {{- printf "%s" (tpl .Values.database.existingSecret.name $) -}} - {{- else -}} - {{- printf "%s" (include "dltadapter.fullname" .) -}} - {{- end -}} -{{- end -}} - -{{- define "dltadapter.passwordKey" -}} - {{- if .Values.database.existingSecret.enabled -}} - {{- printf "%s" (tpl .Values.database.existingSecret.key $) -}} - {{- else -}} - {{- printf "password" -}} - {{- end -}} -{{- end -}} diff --git a/aws/dome/consumer/connector/dlt-adapter/templates/deployment-hpa.yaml b/aws/dome/consumer/connector/dlt-adapter/templates/deployment-hpa.yaml deleted file mode 100644 index 99ca5a34..00000000 --- a/aws/dome/consumer/connector/dlt-adapter/templates/deployment-hpa.yaml +++ /dev/null @@ -1,19 +0,0 @@ -{{- if .Values.autoscaling.enabled -}} -apiVersion: autoscaling/v2beta2 -kind: HorizontalPodAutoscaler -metadata: - name: {{ include "dltadapter.fullname" . }} - labels: - {{ include "dltadapter.labels" . | nindent 4 }} -spec: - scaleTargetRef: - apiVersion: apps/v1 - kind: Deployment - name: {{ include "dltadapter.fullname" . }} - minReplicas: {{ .Values.autoscaling.minReplicas }} - maxReplicas: {{ .Values.autoscaling.maxReplicas }} -{{- with .Values.autoscaling.metrics }} - metrics: - {{- toYaml . | nindent 2 }} -{{- end }} -{{- end }} \ No newline at end of file diff --git a/aws/dome/consumer/connector/dlt-adapter/templates/deployment.yaml b/aws/dome/consumer/connector/dlt-adapter/templates/deployment.yaml deleted file mode 100644 index 78cf09d6..00000000 --- a/aws/dome/consumer/connector/dlt-adapter/templates/deployment.yaml +++ /dev/null @@ -1,60 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ include "dltadapter.fullname" . }} - labels: - {{ include "dltadapter.labels" . | nindent 4 }} -spec: - {{- if not .Values.autoscaling.enabled }} - replicas: {{ .Values.deployment.replicaCount }} - {{- end }} - revisionHistoryLimit: {{ .Values.deployment.revisionHistoryLimit }} - strategy: - {{- with .Values.deployment.updateStrategy }} - {{- toYaml . | nindent 4 }} - {{- end }} - selector: - matchLabels: - app.kubernetes.io/name: {{ include "dltadapter.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - template: - metadata: - labels: - {{ include "dltadapter.labels" . | nindent 8 }} - {{- with .Values.deployment.additionalLabels }} - {{- toYaml . | nindent 8 }} - {{- end }} - {{- if .Values.deployment.additionalAnnotations -}} - annotations: - prometheus.io/scrape: {{ .Values.prometheus.enabled | quote }} - prometheus.io/path: {{ .Values.prometheus.path }} - prometheus.io/port: {{ .Values.prometheus.port }} - {{- with .Values.deployment.additionalAnnotations }} - {{- toYaml . | nindent 8 }} - {{- end }} - {{- end }} - spec: - serviceAccountName: {{ include "dltadapter.serviceAccountName" . }} - containers: - - name: {{ .Chart.Name }} - image: "{{ .Values.deployment.image.repository }}:{{ .Values.deployment.image.tag }}" - imagePullPolicy: {{ .Values.deployment.image.pullPolicy }} - ports: - - name: http - containerPort: {{ .Values.port}} - protocol: TCP - resources: - {{- toYaml .Values.deployment.resources | nindent 12 }} - {{- with .Values.deployment.nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.deployment.affinity }} - affinity: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.deployment.tolerations }} - tolerations: - {{- toYaml . | nindent 8 }} - {{- end }} - restartPolicy: Always diff --git a/aws/dome/consumer/connector/dlt-adapter/templates/service.yaml b/aws/dome/consumer/connector/dlt-adapter/templates/service.yaml deleted file mode 100644 index b73d1219..00000000 --- a/aws/dome/consumer/connector/dlt-adapter/templates/service.yaml +++ /dev/null @@ -1,20 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ include "dltadapter.fullname" . }} - {{- if .Values.service.annotations }} - annotations: - {{ toYaml .Values.service.annotations | nindent 4 }} - {{- end }} - labels: - {{ include "dltadapter.labels" . | nindent 4 }} -spec: - type: {{ .Values.service.type }} - ports: - - port: {{ .Values.service.port }} - targetPort: {{ .Values.port }} - protocol: TCP - name: http - selector: - app.kubernetes.io/name: {{ include "dltadapter.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} diff --git a/aws/dome/consumer/connector/dlt-adapter/templates/serviceaccount.yaml b/aws/dome/consumer/connector/dlt-adapter/templates/serviceaccount.yaml deleted file mode 100644 index a1f575a7..00000000 --- a/aws/dome/consumer/connector/dlt-adapter/templates/serviceaccount.yaml +++ /dev/null @@ -1,12 +0,0 @@ -{{- if .Values.serviceAccount.create -}} -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ include "dltadapter.fullname" . }} -{{- if .Values.serviceAccount.annotations }} - annotations: - {{ toYaml .Values.serviceAccount.annotations | nindent 4 }} -{{- end }} - labels: - {{ include "dltadapter.labels" . | nindent 4 }} -{{- end }} \ No newline at end of file diff --git a/aws/dome/consumer/connector/dlt-adapter/values.yaml b/aws/dome/consumer/connector/dlt-adapter/values.yaml deleted file mode 100644 index f8293ef1..00000000 --- a/aws/dome/consumer/connector/dlt-adapter/values.yaml +++ /dev/null @@ -1,206 +0,0 @@ -## Default values for dlt-adapter. -## This is a YAML-formatted file. -## Declare variables to be passed into your templates. - -# -- option to override the name config in the _helpers.tpl -nameOverride: "" - -# -- option to override the fullname config in the _helpers.tpl -fullnameOverride: "" - -## configuration for the k8s service to access dlt-adapter -service: - # -- service type - type: ClusterIP - # -- port to be used by the service - port: 8083 - # -- additional annotations, if required - annotations: { } - -# -- if a dlt-adapter specific service account should be used, it can be configured here -# ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ -serviceAccount: - # -- specifies if the account should be created - create: false - -## deployment specific configuration -deployment: - # -- initial number of target replications, can be different if autoscaling is enabled - replicaCount: 1 - # -- number of old replicas to be retained - revisionHistoryLimit: 3 - ## configuration of the dlt-adapter update strategy - updateStrategy: - # -- type of the update - type: RollingUpdate - # -- new pods will be added gradually - rollingUpdate: - # -- number of pods that can be created above the desired amount while updating - maxSurge: 1 - # -- number of pods that can be unavailable while updating - maxUnavailable: 0 - ## configuration of the image to be used - image: - # -- dlt-adapter image name - # ref: https://hub.docker.com/repository/docker/ocanades/blockchain-connector-core - repository: ocanades/dlt-adapter - # -- tag of the image to be used - tag: 1.0.0 - # -- specification of the image pull policy - pullPolicy: IfNotPresent - # -- additional labels for the deployment, if required - additionalLabels: { } - # -- additional annotations for the deployment, if required - additionalAnnotations: { } - ## dlt-adapter resource requests and limits, we leave the default empty to make that a conscious - ## choice by the user. For the autoscaling to make sense, you should configure this. - # resources: - # limits: - # cpu: 100m - # memory: 128Mi - # requests: - # cpu: 100m - # memory: 128Mi - # -- selector template - # ref: https://kubernetes.io/docs/user-guide/node-selection/ - nodeSelector: { } - # -- tolerations template - # ref: ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ - tolerations: [ ] - # -- affinity template - # ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity - affinity: { } - # -- port to request health information at - healthPort: 9090 - ## liveness and readiness probes - # ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes - livenessProbe: - initialDelaySeconds: 30 - periodSeconds: 10 - successThreshold: 1 - timeoutSeconds: 30 - readinessProbe: - initialDelaySeconds: 31 - periodSeconds: 10 - successThreshold: 1 - timeoutSeconds: 30 - -## pod autoscaling configuration, use for automatic scaling of the broker pods -autoscaling: - # -- should autoscaling be enabled for til - enabled: false - # -- minimum number of running pods - minReplicas: 1 - # -- maximum number of running pods - maxReplicas: 10 - # -- metrics to react on - metrics: [ ] - ## List of MetricSpecs to decide whether to scale - # See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.17/#metricspec-v2beta2-autoscaling - # scaler targets to hold average cpu around 80% - #- type: Resource - # resource: - # name: cpu - # target: - # type: Utilization - # averageUtilization: 80 - ## scaler targets to hold average memory around 80% - # - type: Resource - # resource: - # name: memory - # target: - # type: Utilization - # averageUtilization: 80 - -### openshift specific route definition. Will not work on plain k8s -#route: -# # -- route config for the trusted issuers list endpoint -# til: -# ## -- should the deployment create openshift routes -# enabled: false -# # -- annotations to be added to the route -# annotations: { } -# # -- host to be used -# # host: localhost -# # -- tls configuration for the route -# tls: { } -# # termination: edge -# # configuration for creation of certificates, using cert-manager. -# certificate: { } -# # allows to specify the issuer to be used. -# # issuer: -# # kind: ClusterIssuer -# # name: letsencrypt-aws-prod -# # -- route config for the trusted issuers registry endpoint -# tir: -# ## -- should the deployment create openshift routes -# enabled: false -# # -- annotations to be added to the route -# annotations: { } -# # -- host to be used -# # host: localhost -# # -- tls configuration for the route -# tls: { } -# # termination: edge -# # configuration for creation of certificates, using cert-manager. -# certificate: { } -# # allows to specify the issuer to be used. -# # issuer: -# # kind: ClusterIssuer -# # name: letsencrypt-aws-prod - -## ingress configuration -#ingress: -# # -- route config for the blockchain-connector-core endpoint -# bcc: -# # -- should there be an ingress to connect blockchain-connector-core with the public internet -# enabled: false -# # -- annotations to be added to the ingress -# annotations: { } -# # kubernetes.io/ingress.class: "ambassador" -# ## example annotations, allowing cert-manager to automatically create tls-certs and forcing everything to use ssl. -# # kubernetes.io/tls-acme: "true" -# # ingress.kubernetes.io/ssl-redirect: "true" -# # -- all hosts to be provided -# hosts: [ ] -# ## provide a hosts and the paths that should be available -# # - host: localhost -# # -- configure the ingress' tls -# tls: [ ] -# # - secretName: bcc-tls -# # hosts: -# # - bcc.fiware.org -# # -- route config for the trusted issuers registry endpoint -# tir: -# # -- should there be an ingress to connect til with the public internet -# enabled: false -# # -- annotations to be added to the ingress -# annotations: { } -# # kubernetes.io/ingress.class: "ambassador" -# ## example annotations, allowing cert-manager to automatically create tls-certs and forcing everything to use ssl. -# # kubernetes.io/tls-acme: "true" -# # ingress.kubernetes.io/ssl-redirect: "true" -# # -- all hosts to be provided -# hosts: [ ] -# ## provide a hosts and the paths that should be available -# # - host: localhost -# # -- configure the ingress' tls -# tls: [ ] -# # - secretName: til-tls -# # hosts: -# # - til.fiware.org - -# -- port that the blockchain-connector-core container uses -port: 8080 - -## configuration for prometheus monitoring -prometheus: - # -- should prometheus scrape be enabled - enabled: true - # -- path for prometheus scrape - path: /prometheus - # -- port prometheus scrape is available at - port: 8080 - -# -- a list of additional env vars to be set, check the blockchain-connector-core doc for all available options -additionalEnvVars: [ ] \ No newline at end of file diff --git a/aws/dome/consumer/connector/orion-ld-adapter/cm.yaml b/aws/dome/consumer/connector/orion-ld-adapter/cm.yaml new file mode 100644 index 00000000..ee871825 --- /dev/null +++ b/aws/dome/consumer/connector/orion-ld-adapter/cm.yaml @@ -0,0 +1,54 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: dome-consumer-orion-ld-adapter +data: + application.yml: | + broker: + domain: http://dome-consumer-orion-ld:1026 + spring: + application: + name: Orion-LD Interface + server: + port: 8080 + + # Spring Logging Configuration + logging: + level: + es.in2.orionld: DEBUG + + # Spring Management Configuration - Actuator + management: + endpoints: + enabled-by-default: false + web: + exposure: + include: health, info, loggers, metrics + base-path: / + path-mapping: + health: health + info: info + loggers: loggers + metrics: metrics + endpoint: + health: + enabled: true + show-details: always + info: + enabled: true + loggers: + enabled: true + metrics: + enabled: true + + # SpringDoc Configuration - OpenAPI 3.0 Documentation & Swagger UI + springdoc: + api-docs: + path: /api-docs + swagger-ui: + path: /swagger-ui.html + + # Application Configuration + app: + openapi: + dev-url: http://localhost:8080 \ No newline at end of file diff --git a/aws/dome/consumer/connector/orion-ld-adapter/deployment.yaml b/aws/dome/consumer/connector/orion-ld-adapter/deployment.yaml new file mode 100644 index 00000000..d2b4d563 --- /dev/null +++ b/aws/dome/consumer/connector/orion-ld-adapter/deployment.yaml @@ -0,0 +1,46 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: dome-consumer-orion-ld-adapter + labels: + app.kubernetes.io/instance: dome-consumer-orion-ld-adapter + app.kubernetes.io/name: dome-consumer-orion-ld-adapter +spec: + replicas: 1 + revisionHistoryLimit: 3 + selector: + matchLabels: + app.kubernetes.io/instance: dome-consumer-orion-ld-adapter + app.kubernetes.io/name: dome-consumer-orion-ld-adapter + strategy: + rollingUpdate: + maxSurge: 1 + maxUnavailable: 0 + template: + metadata: + labels: + app.kubernetes.io/instance: dome-consumer-orion-ld-adapter + app.kubernetes.io/name: dome-consumer-orion-ld-adapter + spec: + containers: + - image: quay.io/wi_stefan/broker-connector-core:0.0.1 + imagePullPolicy: IfNotPresent + name: broker-adapter + env: + - name: SPRING_CONFIG_NAME + value: marketplace + - name: SPRING_CONFIG_LOCATION + value: /config/application.yml + - name: SPRING_PROFILES_ACTIVE + value: marketplace + ports: + - containerPort: 8080 + name: http + protocol: TCP + volumeMounts: + - mountPath: /config + name: custom-config + volumes: + - configMap: + name: dome-consumer-orion-ld-adapter + name: custom-config \ No newline at end of file diff --git a/aws/dome/consumer/connector/orion-ld-adapter/service.yaml b/aws/dome/consumer/connector/orion-ld-adapter/service.yaml new file mode 100644 index 00000000..21ce4c97 --- /dev/null +++ b/aws/dome/consumer/connector/orion-ld-adapter/service.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: Service +metadata: + name: dome-consumer-orion-ld-adapter +spec: + type: ClusterIP + ports: + - name: http + port: 8080 + protocol: TCP + targetPort: 8080 + selector: + app.kubernetes.io/instance: dome-consumer-orion-ld-adapter + app.kubernetes.io/name: dome-consumer-orion-ld-adapter \ No newline at end of file diff --git a/aws/dome/consumer/connector/orionld-adapter/Chart.yaml b/aws/dome/consumer/connector/orionld-adapter/Chart.yaml deleted file mode 100644 index 6ebc9896..00000000 --- a/aws/dome/consumer/connector/orionld-adapter/Chart.yaml +++ /dev/null @@ -1,7 +0,0 @@ -apiVersion: v2 -name: orionld-adapter -description: A Helm chart for Orion-LD Adapter Kubernetes - -type: application -version: 0.0.1 -appVersion: v1alpha1 diff --git a/aws/dome/consumer/connector/orionld-adapter/templates/_helpers.tpl b/aws/dome/consumer/connector/orionld-adapter/templates/_helpers.tpl deleted file mode 100644 index 96f7c9a5..00000000 --- a/aws/dome/consumer/connector/orionld-adapter/templates/_helpers.tpl +++ /dev/null @@ -1,74 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "orionldadapter.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "orionldadapter.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "orionldadapter.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create the name of the service account to use -*/}} -{{- define "orionldadapter.serviceAccountName" -}} -{{- if .Values.serviceAccount.create -}} - {{ default (include "orionldadapter.fullname" .) .Values.serviceAccount.name }} -{{- else -}} - {{ default "default" .Values.serviceAccount.name }} -{{- end -}} -{{- end -}} - -{{/* -Common labels -*/}} -{{- define "orionldadapter.labels" -}} -app.kubernetes.io/name: {{ include "orionldadapter.name" . }} -helm.sh/chart: {{ include "orionldadapter.chart" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end -}} - -{{/* -Support for existing database secret -*/}} -{{- define "orionldadapter.secretName" -}} - {{- if .Values.database.existingSecret.enabled -}} - {{- printf "%s" (tpl .Values.database.existingSecret.name $) -}} - {{- else -}} - {{- printf "%s" (include "orionldadapter.fullname" .) -}} - {{- end -}} -{{- end -}} - -{{- define "orionldadapter.passwordKey" -}} - {{- if .Values.database.existingSecret.enabled -}} - {{- printf "%s" (tpl .Values.database.existingSecret.key $) -}} - {{- else -}} - {{- printf "password" -}} - {{- end -}} -{{- end -}} diff --git a/aws/dome/consumer/connector/orionld-adapter/templates/configmap.yml b/aws/dome/consumer/connector/orionld-adapter/templates/configmap.yml deleted file mode 100644 index b3851dd7..00000000 --- a/aws/dome/consumer/connector/orionld-adapter/templates/configmap.yml +++ /dev/null @@ -1,23 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ include "orionldadapter.fullname" . }} -data: - custom-config.yml: | - orion-ld-if: - orion-ld: - domain: {{ .Values.orion.address }} - path: - entities: {{ .Values.orion.entitiesPath }} - subscriptions: {{ .Values.orion.subscriptionPath }} - api: - domain: {{ .Values.adapter.host }} - path: - subscription: {{ .Values.adapter.subscriptionPath }} - entities: {{ .Values.adapter.publishPath }} - subscription: - type: {{ .Values.orion.subscription.type }} - notification-endpoint-uri: {{ .Values.orion.subscription.notificationEndpoint }} - entities: > - {{ .Values.orion.subscription.entities }} - id-prefix: {{ .Values.orion.subscription.prefix | quote }} \ No newline at end of file diff --git a/aws/dome/consumer/connector/orionld-adapter/templates/deployment-hpa.yaml b/aws/dome/consumer/connector/orionld-adapter/templates/deployment-hpa.yaml deleted file mode 100644 index 2cc1df6b..00000000 --- a/aws/dome/consumer/connector/orionld-adapter/templates/deployment-hpa.yaml +++ /dev/null @@ -1,19 +0,0 @@ -{{- if .Values.autoscaling.enabled -}} -apiVersion: autoscaling/v2beta2 -kind: HorizontalPodAutoscaler -metadata: - name: {{ include "orionldadapter.fullname" . }} - labels: - {{ include "orionldadapter.labels" . | nindent 4 }} -spec: - scaleTargetRef: - apiVersion: apps/v1 - kind: Deployment - name: {{ include "orionldadapter.fullname" . }} - minReplicas: {{ .Values.autoscaling.minReplicas }} - maxReplicas: {{ .Values.autoscaling.maxReplicas }} -{{- with .Values.autoscaling.metrics }} - metrics: - {{- toYaml . | nindent 2 }} -{{- end }} -{{- end }} \ No newline at end of file diff --git a/aws/dome/consumer/connector/orionld-adapter/templates/deployment.yaml b/aws/dome/consumer/connector/orionld-adapter/templates/deployment.yaml deleted file mode 100644 index 58a78aa3..00000000 --- a/aws/dome/consumer/connector/orionld-adapter/templates/deployment.yaml +++ /dev/null @@ -1,92 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ include "orionldadapter.fullname" . }} - labels: - {{ include "orionldadapter.labels" . | nindent 4 }} -spec: - {{- if not .Values.autoscaling.enabled }} - replicas: {{ .Values.deployment.replicaCount }} - {{- end }} - revisionHistoryLimit: {{ .Values.deployment.revisionHistoryLimit }} - strategy: - {{- with .Values.deployment.updateStrategy }} - {{- toYaml . | nindent 4 }} - {{- end }} - selector: - matchLabels: - app.kubernetes.io/name: {{ include "orionldadapter.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - template: - metadata: - labels: - {{ include "orionldadapter.labels" . | nindent 8 }} - {{- with .Values.deployment.additionalLabels }} - {{- toYaml . | nindent 8 }} - {{- end }} - {{- if .Values.deployment.additionalAnnotations -}} - annotations: - prometheus.io/scrape: {{ .Values.prometheus.enabled | quote }} - prometheus.io/path: {{ .Values.prometheus.path }} - prometheus.io/port: {{ .Values.prometheus.port }} - {{- with .Values.deployment.additionalAnnotations }} - {{- toYaml . | nindent 8 }} - {{- end }} - {{- end }} - spec: - serviceAccountName: {{ include "orionldadapter.serviceAccountName" . }} - containers: - - name: {{ .Chart.Name }} - image: "{{ .Values.deployment.image.repository }}:{{ .Values.deployment.image.tag }}" - imagePullPolicy: {{ .Values.deployment.image.pullPolicy }} - ports: - - name: http - containerPort: {{ .Values.port}} - protocol: TCP - - name: http-health - containerPort: {{ .Values.deployment.healthPort }} - protocol: TCP - livenessProbe: - httpGet: - path: /health - port: http-health - initialDelaySeconds: {{ .Values.deployment.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.deployment.livenessProbe.periodSeconds }} - successThreshold: {{ .Values.deployment.livenessProbe.successThreshold }} - timeoutSeconds: {{ .Values.deployment.livenessProbe.timeoutSeconds }} - readinessProbe: - httpGet: - path: /health - port: http-health - initialDelaySeconds: {{ .Values.deployment.readinessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.deployment.readinessProbe.periodSeconds }} - successThreshold: {{ .Values.deployment.readinessProbe.successThreshold }} - timeoutSeconds: {{ .Values.deployment.readinessProbe.timeoutSeconds }} - env: - - name: SPRING_PROFILES_ACTIVE - value: dev - - name: SPRING_CONFIG_IMPORT - value: "/src/main/resources/custom-config.yml" - volumeMounts: - - name: config-volume - mountPath: "/src/main/resources/" - readOnly: true - resources: - {{- toYaml .Values.deployment.resources | nindent 12 }} - volumes: - - name: config-volume - configMap: - name: orionld-adapter-configmap - {{- with .Values.deployment.nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.deployment.affinity }} - affinity: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.deployment.tolerations }} - tolerations: - {{- toYaml . | nindent 8 }} - {{- end }} - restartPolicy: Always diff --git a/aws/dome/consumer/connector/orionld-adapter/templates/service.yaml b/aws/dome/consumer/connector/orionld-adapter/templates/service.yaml deleted file mode 100644 index 687c95ac..00000000 --- a/aws/dome/consumer/connector/orionld-adapter/templates/service.yaml +++ /dev/null @@ -1,20 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ include "orionldadapter.fullname" . }} - {{- if .Values.service.annotations }} - annotations: - {{ toYaml .Values.service.annotations | nindent 4 }} - {{- end }} - labels: - {{ include "orionldadapter.labels" . | nindent 4 }} -spec: - type: {{ .Values.service.type }} - ports: - - port: {{ .Values.service.port }} - targetPort: {{ .Values.port }} - protocol: TCP - name: http - selector: - app.kubernetes.io/name: {{ include "orionldadapter.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} diff --git a/aws/dome/consumer/connector/orionld-adapter/templates/serviceaccount.yaml b/aws/dome/consumer/connector/orionld-adapter/templates/serviceaccount.yaml deleted file mode 100644 index b83e9ed6..00000000 --- a/aws/dome/consumer/connector/orionld-adapter/templates/serviceaccount.yaml +++ /dev/null @@ -1,12 +0,0 @@ -{{- if .Values.serviceAccount.create -}} -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ include "orionldadapter.fullname" . }} -{{- if .Values.serviceAccount.annotations }} - annotations: - {{ toYaml .Values.serviceAccount.annotations | nindent 4 }} -{{- end }} - labels: - {{ include "orionldadapter.labels" . | nindent 4 }} -{{- end }} \ No newline at end of file diff --git a/aws/dome/consumer/connector/orionld-adapter/values.yaml b/aws/dome/consumer/connector/orionld-adapter/values.yaml deleted file mode 100644 index 3605d32a..00000000 --- a/aws/dome/consumer/connector/orionld-adapter/values.yaml +++ /dev/null @@ -1,222 +0,0 @@ -## Default values for orionld-adapter. -## This is a YAML-formatted file. -## Declare variables to be passed into your templates. - -# -- option to override the name config in the _helpers.tpl -nameOverride: "" - -# -- option to override the fullname config in the _helpers.tpl -fullnameOverride: "" - -## configuration for the k8s service to access orionld-adapter -service: - # -- service type - type: ClusterIP - # -- port to be used by the service - port: 8080 - # -- additional annotations, if required - annotations: { } - -# -- if an orionld-adapter specific service account should be used, it can be configured here -# ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ -serviceAccount: - # -- specifies if the account should be created - create: false - -## deployment specific configuration -deployment: - # -- initial number of target replications, can be different if autoscaling is enabled - replicaCount: 1 - # -- number of old replicas to be retained - revisionHistoryLimit: 3 - ## configuration of the orionld-adapter update strategy - updateStrategy: - # -- type of the update - type: RollingUpdate - # -- new pods will be added gradually - rollingUpdate: - # -- number of pods that can be created above the desired amount while updating - maxSurge: 1 - # -- number of pods that can be unavailable while updating - maxUnavailable: 0 - ## configuration of the image to be used - image: - # -- orionld-adapter image name - # ref: https://hub.docker.com/repository/docker/ocanades/orionld-adapter - repository: ocanades/orionld-adapter - # -- tag of the image to be used - tag: 1.0.0 - # -- specification of the image pull policy - pullPolicy: IfNotPresent - # -- additional labels for the deployment, if required - additionalLabels: { } - # -- additional annotations for the deployment, if required - additionalAnnotations: { } - ## orionld-adapter resource requests and limits, we leave the default empty to make that a conscious - ## choice by the user. For the autoscaling to make sense, you should configure this. - # resources: - # limits: - # cpu: 100m - # memory: 128Mi - # requests: - # cpu: 100m - # memory: 128Mi - # -- selector template - # ref: https://kubernetes.io/docs/user-guide/node-selection/ - nodeSelector: { } - # -- tolerations template - # ref: ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ - tolerations: [ ] - # -- affinity template - # ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity - affinity: { } - # -- port to request health information at - healthPort: 9092 - ## liveness and readiness probes - # ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes - livenessProbe: - initialDelaySeconds: 30 - periodSeconds: 10 - successThreshold: 1 - timeoutSeconds: 30 - readinessProbe: - initialDelaySeconds: 31 - periodSeconds: 10 - successThreshold: 1 - timeoutSeconds: 30 - -## pod autoscaling configuration, use for automatic scaling of the broker pods -autoscaling: - # -- should autoscaling be enabled for til - enabled: false - # -- minimum number of running pods - minReplicas: 1 - # -- maximum number of running pods - maxReplicas: 10 - # -- metrics to react on - metrics: [ ] - ## List of MetricSpecs to decide whether to scale - # See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.17/#metricspec-v2beta2-autoscaling - # scaler targets to hold average cpu around 80% - #- type: Resource - # resource: - # name: cpu - # target: - # type: Utilization - # averageUtilization: 80 - ## scaler targets to hold average memory around 80% - # - type: Resource - # resource: - # name: memory - # target: - # type: Utilization - # averageUtilization: 80 - -### openshift specific route definition. Will not work on plain k8s -#route: -# # -- route config for the trusted issuers list endpoint -# til: -# ## -- should the deployment create openshift routes -# enabled: false -# # -- annotations to be added to the route -# annotations: { } -# # -- host to be used -# # host: localhost -# # -- tls configuration for the route -# tls: { } -# # termination: edge -# # configuration for creation of certificates, using cert-manager. -# certificate: { } -# # allows to specify the issuer to be used. -# # issuer: -# # kind: ClusterIssuer -# # name: letsencrypt-aws-prod -# # -- route config for the trusted issuers registry endpoint -# tir: -# ## -- should the deployment create openshift routes -# enabled: false -# # -- annotations to be added to the route -# annotations: { } -# # -- host to be used -# # host: localhost -# # -- tls configuration for the route -# tls: { } -# # termination: edge -# # configuration for creation of certificates, using cert-manager. -# certificate: { } -# # allows to specify the issuer to be used. -# # issuer: -# # kind: ClusterIssuer -# # name: letsencrypt-aws-prod - -## ingress configuration -#ingress: -# # -- route config for the blockchain-connector-core endpoint -# bcc: -# # -- should there be an ingress to connect blockchain-connector-core with the public internet -# enabled: false -# # -- annotations to be added to the ingress -# annotations: { } -# # kubernetes.io/ingress.class: "ambassador" -# ## example annotations, allowing cert-manager to automatically create tls-certs and forcing everything to use ssl. -# # kubernetes.io/tls-acme: "true" -# # ingress.kubernetes.io/ssl-redirect: "true" -# # -- all hosts to be provided -# hosts: [ ] -# ## provide a hosts and the paths that should be available -# # - host: localhost -# # -- configure the ingress' tls -# tls: [ ] -# # - secretName: bcc-tls -# # hosts: -# # - bcc.fiware.org -# # -- route config for the trusted issuers registry endpoint -# tir: -# # -- should there be an ingress to connect til with the public internet -# enabled: false -# # -- annotations to be added to the ingress -# annotations: { } -# # kubernetes.io/ingress.class: "ambassador" -# ## example annotations, allowing cert-manager to automatically create tls-certs and forcing everything to use ssl. -# # kubernetes.io/tls-acme: "true" -# # ingress.kubernetes.io/ssl-redirect: "true" -# # -- all hosts to be provided -# hosts: [ ] -# ## provide a hosts and the paths that should be available -# # - host: localhost -# # -- configure the ingress' tls -# tls: [ ] -# # - secretName: til-tls -# # hosts: -# # - til.fiware.org - -# -- port that the orionld-adapter container uses -port: 8080 - -## configuration for prometheus monitoring -prometheus: - # -- should prometheus scrape be enabled - enabled: true - # -- path for prometheus scrape - path: /prometheus - # -- port prometheus scrape is available at - port: 9090 - -orion: - address: https://orion.dome-consumer.fiware.dev - entitiesPath: /ngsi-ld/v1/entities - subscriptionPath: /ngsi-ld/v1/subscriptions - subscription: - type: Subscription - notificationEndpoint: http://dome-consumer-blockchain-connector-core:8080/notifications/orion-ld - entities: product-order, product-offering - prefix: "urn:ngsi-ld:Subscription:" - -adapter: - host: http://dome-consumer-dlt-adapter:8080 - subscriptionPath: /api/v1/subscribe - publishPath: /api/v1/publish - - -# -- a list of additional env vars to be set, check the blockchain-connector-core doc for all available options -additionalEnvVars: [ ]