diff --git a/charts/data-space-connector/Chart.yaml b/charts/data-space-connector/Chart.yaml index fe5f823..c1e4933 100644 --- a/charts/data-space-connector/Chart.yaml +++ b/charts/data-space-connector/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: data-space-connector description: Umbrella Chart for the FIWARE Data Space Connector, combining all essential parts to be used by a participant. type: application -version: 5.0.0 +version: 5.5.0 dependencies: - name: postgresql condition: postgresql.enabled diff --git a/charts/data-space-connector/templates/dsconfig-cm.yaml b/charts/data-space-connector/templates/dsconfig-cm.yaml new file mode 100644 index 0000000..955f882 --- /dev/null +++ b/charts/data-space-connector/templates/dsconfig-cm.yaml @@ -0,0 +1,16 @@ +{{- if .Values.dataSpaceConfig.enabled }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: dsconfig + namespace: {{ $.Release.Namespace | quote }} + labels: + {{ include "dsc.labels" . | nindent 4 }} +data: + data-space-configuration.json: |- + { + "supported_models": {{ .Values.dataSpaceConfig.supportedModels | toJson }}, + "supported_protocols": {{ .Values.dataSpaceConfig.supportedProtocols | toJson }}, + "authentication_protocols": {{ .Values.dataSpaceConfig.authenticationProtocols | toJson }} + } +{{- end }} diff --git a/charts/data-space-connector/templates/dsconfig-deployment.yaml b/charts/data-space-connector/templates/dsconfig-deployment.yaml new file mode 100644 index 0000000..77bb12c --- /dev/null +++ b/charts/data-space-connector/templates/dsconfig-deployment.yaml @@ -0,0 +1,38 @@ +{{- if .Values.dataSpaceConfig.enabled }} +kind: Deployment +apiVersion: apps/v1 +metadata: + name: dsconfig + namespace: {{ $.Release.Namespace | quote }} + labels: + {{ include "dsc.labels" . | nindent 4 }} +spec: + replicas: 1 + revisionHistoryLimit: 3 + selector: + matchLabels: + app.kubernetes.io/name: dsconfig + app.kubernetes.io/instance: {{ .Release.Name }} + template: + metadata: + labels: + app.kubernetes.io/name: dsconfig + app.kubernetes.io/instance: {{ .Release.Name }} + spec: + serviceAccountName: default + containers: + - name: dsconfig-static + imagePullPolicy: Always + image: "lipanski/docker-static-website:2.1.0" + ports: + - name: http + containerPort: 3000 + protocol: TCP + volumeMounts: + - name: dsconfig-json + mountPath: /home/static/.well-known/data-space-configuration + volumes: + - name: dsconfig-json + configMap: + name: dsconfig +{{- end }} diff --git a/charts/data-space-connector/templates/dsconfig-service.yaml b/charts/data-space-connector/templates/dsconfig-service.yaml new file mode 100644 index 0000000..3b5555a --- /dev/null +++ b/charts/data-space-connector/templates/dsconfig-service.yaml @@ -0,0 +1,19 @@ +{{- if .Values.dataSpaceConfig.enabled }} +apiVersion: v1 +kind: Service +metadata: + name: dsconfig + namespace: {{ $.Release.Namespace | quote }} + labels: + {{ include "dsc.labels" . | nindent 4 }} +spec: + type: {{ .Values.dataSpaceConfig.serviceType }} + ports: + - port: {{ .Values.dataSpaceConfig.port }} + targetPort: 3000 + protocol: TCP + name: http + selector: + app.kubernetes.io/name: dsconfig + app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} diff --git a/charts/data-space-connector/values.yaml b/charts/data-space-connector/values.yaml index 3d20bd3..2396d9f 100644 --- a/charts/data-space-connector/values.yaml +++ b/charts/data-space-connector/values.yaml @@ -629,4 +629,23 @@ did: # -- configuration for registering a participant at the til, will most probably only be used in demonstrational enviornments registration: - enabled: false \ No newline at end of file + enabled: false + +# -- configuration for the .well-known/data-space-configuration endpoint document +dataSpaceConfig: + enabled: false + + # -- Kubernetes Service type + serviceType: ClusterIP + + # -- Kubernetes Service port + port: 3002 + + # -- Supported data models by the service (array of links to JSON schemas) + supportedModels: [] + + # -- Supported protocols (e.g.: http,https) + supportedProtocols: [] + + # -- Supported authentication protocols (e.g.: oid4vp) + authenticationProtocols: [] diff --git a/k3s/provider.yaml b/k3s/provider.yaml index 136459a..0bab8c9 100644 --- a/k3s/provider.yaml +++ b/k3s/provider.yaml @@ -19,6 +19,18 @@ apisix: plugins: proxy-rewrite: uri: /services/data-service/.well-known/openid-configuration + - uri: /.well-known/data-space-configuration + upstream: + nodes: + dsconfig:3002: 1 + type: roundrobin + plugins: + proxy-rewrite: + uri: /.well-known/data-space-configuration/data-space-configuration.json + response-rewrite: + headers: + set: + content-type: application/json - uri: /* upstream: nodes: @@ -139,6 +151,19 @@ did: enabled: true host: did-provider.127.0.0.1.nip.io +dataSpaceConfig: + enabled: true + serviceType: ClusterIP + port: 3002 + supportedModels: + - "https://raw.githubusercontent.com/smart-data-models/dataModel.Consumption/master/ConsumptionPoint/schema.json" + - "https://raw.githubusercontent.com/smart-data-models/dataModel.Consumption/master/ConsumptionCost/schema.json" + supportedProtocols: + - http + - https + authenticationProtocols: + - oid4vp + scorpio: ingress: enabled: true @@ -190,4 +215,4 @@ odrl-pap: hosts: - host: pap-provider.127.0.0.1.nip.io paths: - - "/" \ No newline at end of file + - "/"