diff --git a/infrastructure/charts/identus-mediator-0.15.0-beta.0.tgz b/infrastructure/charts/identus-mediator-0.15.0-beta.0.tgz deleted file mode 100644 index 86bd75e4..00000000 Binary files a/infrastructure/charts/identus-mediator-0.15.0-beta.0.tgz and /dev/null differ diff --git a/infrastructure/charts/identus-mediator-0.15.0-beta.1.tgz b/infrastructure/charts/identus-mediator-0.15.0-beta.1.tgz deleted file mode 100644 index 6991dbfe..00000000 Binary files a/infrastructure/charts/identus-mediator-0.15.0-beta.1.tgz and /dev/null differ diff --git a/infrastructure/charts/identus-mediator-0.15.0-beta.2.tgz b/infrastructure/charts/identus-mediator-0.15.0-beta.2.tgz deleted file mode 100644 index 09247878..00000000 Binary files a/infrastructure/charts/identus-mediator-0.15.0-beta.2.tgz and /dev/null differ diff --git a/infrastructure/charts/identus-mediator-0.15.0.tgz b/infrastructure/charts/identus-mediator-0.15.0.tgz deleted file mode 100644 index acdad93c..00000000 Binary files a/infrastructure/charts/identus-mediator-0.15.0.tgz and /dev/null differ diff --git a/infrastructure/charts/identus-mediator-1.0.0-beta.1.tgz b/infrastructure/charts/identus-mediator-1.0.0-beta.1.tgz deleted file mode 100644 index e4d586dd..00000000 Binary files a/infrastructure/charts/identus-mediator-1.0.0-beta.1.tgz and /dev/null differ diff --git a/infrastructure/charts/index.yaml b/infrastructure/charts/index.yaml deleted file mode 100644 index 8d5c703c..00000000 --- a/infrastructure/charts/index.yaml +++ /dev/null @@ -1,54 +0,0 @@ -apiVersion: v1 -entries: - identus-mediator: - - apiVersion: v2 - appVersion: 1.0.0-beta.1 - created: "2024-07-10T14:51:23.213193767Z" - description: A Helm chart for deploying identus-mediator - digest: 18cd95f21bd5a733473d0a775a0804c3bbd5efc201d68daa3cf38bc5184318e9 - name: identus-mediator - type: application - urls: - - https://raw.githubusercontent.com/hyperledger/identus-mediator/main/infrastructure/charts/identus-mediator-1.0.0-beta.1.tgz - version: 1.0.0-beta.1 - - apiVersion: v2 - appVersion: 0.15.0 - created: "2024-07-10T14:51:23.21287392Z" - description: A Helm chart for deploying identus-mediator - digest: 44e6bd78133d62d703812a02e08c12885d39559b638869af01725440543f2400 - name: identus-mediator - type: application - urls: - - https://raw.githubusercontent.com/hyperledger/identus-mediator/main/infrastructure/charts/identus-mediator-0.15.0.tgz - version: 0.15.0 - - apiVersion: v2 - appVersion: 0.15.0-beta.2 - created: "2024-07-10T14:51:23.21253088Z" - description: A Helm chart for deploying identus-mediator - digest: 97a832fb8c87616582228a12ae410e62d68c4244cdda4250161a21b6899eab76 - name: identus-mediator - type: application - urls: - - https://raw.githubusercontent.com/hyperledger/identus-mediator/main/infrastructure/charts/identus-mediator-0.15.0-beta.2.tgz - version: 0.15.0-beta.2 - - apiVersion: v2 - appVersion: 0.15.0-beta.1 - created: "2024-07-10T14:51:23.212170828Z" - description: A Helm chart for deploying identus-mediator - digest: e587e523c3e139205fffe7920d482e38ad40857da4765599276b4cbf78c609bc - name: identus-mediator - type: application - urls: - - https://raw.githubusercontent.com/hyperledger/identus-mediator/main/infrastructure/charts/identus-mediator-0.15.0-beta.1.tgz - version: 0.15.0-beta.1 - - apiVersion: v2 - appVersion: 0.15.0-beta.0 - created: "2024-07-10T14:51:23.211815585Z" - description: A Helm chart for deploying identus-mediator - digest: b76619318b376186c8a431aea32a813bcb46296453b713792a222b5f06e017bd - name: identus-mediator - type: application - urls: - - https://raw.githubusercontent.com/hyperledger/identus-mediator/main/infrastructure/charts/identus-mediator-0.15.0-beta.0.tgz - version: 0.15.0-beta.0 -generated: "2024-07-10T14:51:23.211268734Z" diff --git a/infrastructure/charts/mediator/.helmignore b/infrastructure/charts/mediator/.helmignore deleted file mode 100644 index 0e8a0eb3..00000000 --- a/infrastructure/charts/mediator/.helmignore +++ /dev/null @@ -1,23 +0,0 @@ -# Patterns to ignore when building packages. -# This supports shell glob matching, relative path matching, and -# negation (prefixed with !). Only one pattern per line. -.DS_Store -# Common VCS dirs -.git/ -.gitignore -.bzr/ -.bzrignore -.hg/ -.hgignore -.svn/ -# Common backup files -*.swp -*.bak -*.tmp -*.orig -*~ -# Various IDEs -.project -.idea/ -*.tmproj -.vscode/ diff --git a/infrastructure/charts/mediator/Chart.yaml b/infrastructure/charts/mediator/Chart.yaml deleted file mode 100644 index 3de7e1be..00000000 --- a/infrastructure/charts/mediator/Chart.yaml +++ /dev/null @@ -1,22 +0,0 @@ -apiVersion: v2 -name: identus-mediator -description: A Helm chart for deploying identus-mediator -# A chart can be either an 'application' or a 'library' chart. -# -# Application charts are a collection of templates that can be packaged into versioned archives -# to be deployed. -# -# Library charts provide useful utilities or functions for the chart developer. They're included as -# a dependency of application charts to inject those utilities and functions into the rendering -# pipeline. Library charts do not define any templates and therefore cannot be deployed. -type: application -# This is the chart version. This version number should be incremented each time you make changes -# to the chart and its templates, including the app version. -# Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.15.0 -# This is the version number of the application being deployed. This version number should be -# incremented each time you make changes to the application. Versions are not expected to -# follow Semantic Versioning. They should reflect the version the application is using. -# It is recommended to use it with quotes. -appVersion: "0.15.0" -dependencies: [] diff --git a/infrastructure/charts/mediator/templates/_helpers.tpl b/infrastructure/charts/mediator/templates/_helpers.tpl deleted file mode 100644 index 2b7a8087..00000000 --- a/infrastructure/charts/mediator/templates/_helpers.tpl +++ /dev/null @@ -1,22 +0,0 @@ -{{- define "cors" }} - {{- if .Values.ingress.cors.enabled }} - - name: cors - enable: true - {{- if .Values.ingress.cors.allow_origins }} - config: - allow_origins: {{ .Values.ingress.cors.allow_origins | quote }} - {{- end }} - {{- end }} -{{- end -}} -{{- define "consumer-restriction" }} - - name: consumer-restriction - enable: true - config: - whitelist: - {{- range .Values.ingress.consumers }} - - {{ regexReplaceAll "-" $.Release.Name "_" }}_{{ regexReplaceAll "-" . "_" | lower }} - {{- end }} -{{- end -}} -{{- define "labels.common" -}} -app.kubernetes.io/part-of: prism-mediator -{{- end -}} diff --git a/infrastructure/charts/mediator/templates/apisixconsumer.yaml b/infrastructure/charts/mediator/templates/apisixconsumer.yaml deleted file mode 100644 index dbf17985..00000000 --- a/infrastructure/charts/mediator/templates/apisixconsumer.yaml +++ /dev/null @@ -1,18 +0,0 @@ -{{- if .Values.ingress.enabled }} -{{- $root := . -}} -{{- range $consumer := .Values.ingress.consumers }} -apiVersion: apisix.apache.org/v2 -kind: ApisixConsumer -metadata: - name: "{{ $consumer | lower }}" - namespace: "{{ $root.Release.Namespace }}" - labels: - {{ template "labels.common" . }} -spec: - authParameter: - keyAuth: - secretRef: - name: "{{ $root.Release.Namespace }}-{{ $consumer | lower }}" ---- -{{- end }} -{{- end }} diff --git a/infrastructure/charts/mediator/templates/apisixroute.yaml b/infrastructure/charts/mediator/templates/apisixroute.yaml deleted file mode 100644 index fbfe23c7..00000000 --- a/infrastructure/charts/mediator/templates/apisixroute.yaml +++ /dev/null @@ -1,67 +0,0 @@ -{{- if .Values.ingress.enabled }} -apiVersion: apisix.apache.org/v2 -kind: ApisixRoute -metadata: - name: mediator-route - namespace: "{{ .Release.Namespace }}" - labels: - {{ template "labels.common" . }} -spec: - http: - - name: mediator-rule - match: - hosts: - {{- range .Values.ingress.applicationUrls }} - - {{ . }} - {{- end }} - paths: - - /* - backends: - - serviceName: mediator-service - servicePort: 8080 - timeout: - connect: 60s - read: 8h - send: 8h - websocket: true - plugins: - - name: proxy-rewrite - enable: true - config: - regex_uri: ["^/(.*)","/$1"] - - name: request-id - enable: true - config: - header_name: "X-Request-ID" - include_in_response: true - {{ template "cors" . }} - ---- - -apiVersion: apisix.apache.org/v2 -kind: ApisixRoute -metadata: - name: mediator-docs-route - namespace: "{{ .Release.Namespace }}" - labels: - {{ template "labels.common" . }} -spec: - http: - - name: mediator-docs-rule - match: - hosts: - {{- range .Values.ingress.applicationUrls }} - - {{ . }} - {{- end }} - paths: - - /docs/mediator/api/* - backends: - - serviceName: mediator-service - servicePort: 8080 - plugins: - - name: proxy-rewrite - enable: true - config: - regex_uri: ["^/docs/mediator/api/(.*)","/api/$1"] - {{ template "cors" . }} -{{- end -}} diff --git a/infrastructure/charts/mediator/templates/apisixtls.yaml b/infrastructure/charts/mediator/templates/apisixtls.yaml deleted file mode 100644 index b8286e32..00000000 --- a/infrastructure/charts/mediator/templates/apisixtls.yaml +++ /dev/null @@ -1,17 +0,0 @@ -{{- if .Values.ingress.enabled }} -apiVersion: apisix.apache.org/v2 -kind: ApisixTls -metadata: - name: "prism-mediator-base-path-tls" - namespace: "{{ .Release.Namespace }}" - labels: - {{ template "labels.common" . }} -spec: - hosts: - {{- range .Values.ingress.applicationUrls }} - - {{ . }} - {{- end }} - secret: - name: "prism-mediator-base-path-secret" - namespace: "{{ .Release.Namespace }}" -{{- end }} diff --git a/infrastructure/charts/mediator/templates/certificate.yaml b/infrastructure/charts/mediator/templates/certificate.yaml deleted file mode 100644 index 3282235a..00000000 --- a/infrastructure/charts/mediator/templates/certificate.yaml +++ /dev/null @@ -1,22 +0,0 @@ -{{- if .Values.ingress.enabled }} -apiVersion: cert-manager.io/v1 -kind: Certificate -metadata: - name: "prism-mediator-base-path-cert" - namespace: "{{ .Release.Namespace }}" - labels: - {{ template "labels.common" . }} - annotations: - argocd.argoproj.io/sync-wave: "-1" -spec: - secretName: "prism-mediator-base-path-secret" - duration: 2160h0m0s # 90d - renewBefore: 360h0m0s # 15d - issuerRef: - name: letsencrypt - kind: ClusterIssuer - dnsNames: - {{- range .Values.ingress.applicationUrls }} - - {{ . }} - {{- end }} -{{- end }} diff --git a/infrastructure/charts/mediator/templates/deployment.yaml b/infrastructure/charts/mediator/templates/deployment.yaml deleted file mode 100644 index a0a1a210..00000000 --- a/infrastructure/charts/mediator/templates/deployment.yaml +++ /dev/null @@ -1,55 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: mediator-server - namespace: "{{ .Release.Namespace }}" - labels: - {{ template "labels.common" . }} -spec: - selector: - matchLabels: - app.kubernetes.io/name: prism-mediator-server - replicas: 1 - template: - metadata: - labels: - app.kubernetes.io/name: prism-mediator-server - {{ template "labels.common" . }} - spec: - imagePullSecrets: - - name: atala-prism-dev-deployments-github-docker-registry-key - containers: - - name: mediator-server - image: "{{ .Values.server.image.repository }}/{{ .Values.server.image.tag }}:{{ .Values.server.image.version | default .Chart.AppVersion }}" - imagePullPolicy: {{ .Values.server.image.pullPolicy }} - resources: - {{- toYaml .Values.server.resources | nindent 12 }} - ports: - - containerPort: 8080 - env: - - name: KEY_AGREEMENT_D - value: "Z6D8LduZgZ6LnrOHPrMTS6uU2u5Btsrk1SGs4fn8M7c" - - name: KEY_AGREEMENT_X - value: "Sr4SkIskjN_VdKTn0zkjYbhGTWArdUNE4j_DmUpnQGw" - - name: KEY_AUTHENTICATION_D - value: "INXCnxFEl0atLIIQYruHzGd5sUivMRyQOzu87qVerug" - - name: KEY_AUTHENTICATION_X - value: "MBjnXZxkMcoQVVL21hahWAw43RuAG-i64ipbeKKqwoA" - - name: MONGODB_USER - value: "admin" - - name: MONGODB_PASSWORD - value: "admin" - - name: MONGODB_PROTOCOL - value: "mongodb" - - name: MONGODB_HOST - value: "mongodb.{{.Release.Namespace}}" - - name: MONGODB_PORT - value: "27017" - - name: MONGODB_DB_NAME - value: "mediator" - - name: SERVICE_ENDPOINTS - value: "https://{{ index .Values.ingress.applicationUrls 0 }};wss://{{ index .Values.ingress.applicationUrls 0 }}/ws" - {{- range $key, $value := .Values.server.additionalEnvVariables }} - - name: {{ $key }} - value: {{ $value | quote }} - {{- end }} diff --git a/infrastructure/charts/mediator/templates/externalsecret.yaml b/infrastructure/charts/mediator/templates/externalsecret.yaml deleted file mode 100644 index 39ced22b..00000000 --- a/infrastructure/charts/mediator/templates/externalsecret.yaml +++ /dev/null @@ -1,20 +0,0 @@ -apiVersion: external-secrets.io/v1beta1 -kind: ExternalSecret -metadata: - name: "atala-prism-dev-deployments-github-docker-registry-key" - namespace: {{ .Release.Namespace }} - labels: - {{ template "labels.common" . }} -spec: - refreshInterval: "0" - secretStoreRef: - name: {{ .Values.secrets.secretStore }} - kind: ClusterSecretStore - target: - template: - type: kubernetes.io/dockerconfigjson - data: - .dockerconfigjson: "{{ `{{ .dockerconfigjson | b64dec }}` }}" - dataFrom: - - extract: - key: {{ .Values.secrets.dockerRegistryToken }} diff --git a/infrastructure/charts/mediator/templates/mongodb.yaml b/infrastructure/charts/mediator/templates/mongodb.yaml deleted file mode 100644 index 67882388..00000000 --- a/infrastructure/charts/mediator/templates/mongodb.yaml +++ /dev/null @@ -1,89 +0,0 @@ -{{- if .Values.database.mongodb.enabled }} -apiVersion: apps/v1 -kind: Deployment -metadata: - name: mongodb - labels: - app: mongodb -spec: - replicas: 1 - selector: - matchLabels: - app: mongodb - template: - metadata: - labels: - app: mongodb - spec: - containers: - - name: mongodb - image: mongo:6.0.7 - ports: - - containerPort: 27017 - env: - - name: MONGO_INITDB_ROOT_USERNAME - value: "admin" - - name: MONGO_INITDB_ROOT_PASSWORD - value: "admin" - - name: MONGO_INITDB_DATABASE - value: "mediator" - volumeMounts: - - name: mongodb-scripts - mountPath: /docker-entrypoint-initdb.d - readOnly: true - volumes: - - name: mongodb-scripts - configMap: - name: mongodb-cm ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: mongodb-cm -data: - initdb.js: | - db.createUser({ - user: "admin", - pwd: "admin", - roles: [ - { role: "readWrite", db: "mediator" } - ] - }); - const database = 'mediator'; - const collectionDidAccount = 'user.account'; - const collectionMessages = 'messages'; - const collectionMessagesSend = 'messages.outbound'; - use(database); - db.createCollection(collectionDidAccount); - db.createCollection(collectionMessages); - db.createCollection(collectionMessagesSend); - //create index - db.getCollection(collectionDidAccount).createIndex({ 'did': 1 }, { unique: true }); - // Only enforce uniqueness on non-empty arrays - db.getCollection(collectionDidAccount).createIndex({ 'alias': 1 }, { unique: true , partialFilterExpression: { "alias.0": { $exists: true } }}); - db.getCollection(collectionDidAccount).createIndex({ "messagesRef.hash": 1, "messagesRef.recipient": 1 }); - // 7 day * 24 hours * 60 minutes * 60 seconds - const expireAfterSeconds = 7 * 24 * 60 * 60; - db.getCollection(collectionMessages).createIndex( - { ts: 1 }, - { - name: "message-ttl-index", - partialFilterExpression: { "message_type" : "Mediator" }, - expireAfterSeconds: expireAfterSeconds - } - ); ---- -apiVersion: v1 -kind: Service -metadata: - name: mongodb - namespace: "{{ .Release.Namespace }}" -spec: - selector: - app: mongodb - ports: - - protocol: TCP - port: 27017 - targetPort: 27017 ---- -{{- end }} diff --git a/infrastructure/charts/mediator/templates/service.yaml b/infrastructure/charts/mediator/templates/service.yaml deleted file mode 100644 index 1a55de43..00000000 --- a/infrastructure/charts/mediator/templates/service.yaml +++ /dev/null @@ -1,36 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: mediator-service - namespace: "{{ .Release.Namespace }}" - labels: - app.kubernetes.io/name: prism-mediator-server - app.kubernetes.io/service: prism-mediator-server-main - {{ template "labels.common" . }} -spec: - selector: - app.kubernetes.io/name: prism-mediator-server - ports: - - protocol: "TCP" - port: 8080 - targetPort: 8080 - type: ClusterIP - ---- - -{{- if .Values.ingress.enabled }} -kind: Service -apiVersion: v1 -metadata: - name: mediator-domain-name-fake-service - namespace: "{{ .Release.Namespace }}" - annotations: - external-dns.alpha.kubernetes.io/hostname: "{{ join ", " .Values.ingress.applicationUrls }}" - labels: - app.kubernetes.io/name: prism-mediator-server - app.kubernetes.io/service: prism-mediator-server-domain-name-fake-service - {{ template "labels.common" . }} -spec: - type: ExternalName - externalName: {{ .Values.ingress.platformIngressUrl }} -{{- end }} diff --git a/infrastructure/charts/mediator/templates/stringsecret.yaml b/infrastructure/charts/mediator/templates/stringsecret.yaml deleted file mode 100644 index 46124886..00000000 --- a/infrastructure/charts/mediator/templates/stringsecret.yaml +++ /dev/null @@ -1,20 +0,0 @@ -{{- if .Values.ingress.enabled }} -{{- $root := . -}} -{{- range $consumer := .Values.ingress.consumers }} -apiVersion: "secretgenerator.mittwald.de/v1alpha1" -kind: StringSecret -metadata: - name: "{{ $root.Release.Namespace }}-{{ $consumer | lower }}" - namespace: {{ $root.Release.Namespace }} - labels: - {{ template "labels.common" . }} -spec: - forceRegenerate: false - data: - username: {{ $consumer | lower }} - fields: - - fieldName: "key" - encoding: "base64" - length: "32" -{{- end }} -{{- end }} diff --git a/infrastructure/charts/mediator/values.yaml b/infrastructure/charts/mediator/values.yaml deleted file mode 100644 index 0c466a50..00000000 --- a/infrastructure/charts/mediator/values.yaml +++ /dev/null @@ -1,33 +0,0 @@ -ingress: - enabled: true - - applicationUrls: - - chart-base-identus-mediator.atalaprism.io # these are place holder - platformIngressUrl: chart-base-platform-ingress.atalaprism.io # these are place holder - cors: - enabled: true - allow_origins: "*" - consumers: [] - -secrets: - secretStore: chart-base-secretstore - dockerRegistryToken: chart-base-docker-registry-token - -server: - image: - repository: ghcr.io - pullPolicy: IfNotPresent - tag: hyperledger/identus-mediator - resources: - limits: - cpu: 500m - memory: 1024Mi - requests: - cpu: 250m - memory: 512Mi - # Additional environment variables to be added to the server container - additionalEnvVariables: {} - -database: - mongodb: - enabled: true