diff --git a/infrastructure/charts/agent/Chart.yaml b/infrastructure/charts/agent/Chart.yaml index c279062da9..7d0254c0ef 100644 --- a/infrastructure/charts/agent/Chart.yaml +++ b/infrastructure/charts/agent/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 -name: prism-agent -description: A Helm chart for deploying prism-agent +name: cloud-agent +description: A Helm chart for deploying cloud-agent # 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 diff --git a/infrastructure/charts/agent/templates/_helpers.tpl b/infrastructure/charts/agent/templates/_helpers.tpl index 6780bf5fcd..28264f5992 100644 --- a/infrastructure/charts/agent/templates/_helpers.tpl +++ b/infrastructure/charts/agent/templates/_helpers.tpl @@ -21,7 +21,7 @@ {{- end }} {{- end -}} {{- define "labels.common" -}} -app.kubernetes.io/part-of: prism-agent +app.kubernetes.io/part-of: {{ .Chart.Name }} {{- end -}} {{- define "headers.security" }} - name: response-rewrite diff --git a/infrastructure/charts/agent/templates/apisixroute.yaml b/infrastructure/charts/agent/templates/apisixroute.yaml index b45ad9a7ea..7ea65196db 100644 --- a/infrastructure/charts/agent/templates/apisixroute.yaml +++ b/infrastructure/charts/agent/templates/apisixroute.yaml @@ -16,7 +16,7 @@ spec: {{- end }} paths: - /prism-agent/* - - /cloud-agent/* + - /{{ .Chart.Name }}/* backends: - serviceName: agent-server-tapir-service servicePort: 8085 @@ -27,7 +27,7 @@ spec: - name: proxy-rewrite enable: true config: - regex_uri: ["^/(prism-agent|cloud-agent)/(.*)","/$2"] + regex_uri: ["^/(prism-agent|{{ .Chart.Name }})/(.*)","/$2"] - name: uri-blocker enable: true config: @@ -57,7 +57,7 @@ spec: {{- end }} paths: - /prism-agent/didcomm* - - /cloud-agent/didcomm* + - /{{ .Chart.Name }}/didcomm* backends: - serviceName: agent-server-didcomm-service servicePort: 8090 @@ -65,7 +65,7 @@ spec: - name: proxy-rewrite enable: true config: - regex_uri: ["^/(prism-agent|cloud-agent)/didcomm(.*)", "/$2"] + regex_uri: ["^/(prism-agent|{{ .Chart.Name }})/didcomm(.*)", "/$2"] {{ template "cors" . }} {{ template "headers.requestId" . }} {{ template "headers.security" . }} @@ -89,7 +89,7 @@ spec: {{- end }} paths: - /prism-agent/schema-registry/schemas/* - - /cloud-agent/schema-registry/schemas/* + - /{{ .Chart.Name }}/schema-registry/schemas/* methods: - GET backends: @@ -99,7 +99,7 @@ spec: - name: proxy-rewrite enable: true config: - regex_uri: ["^/(prism-agent|cloud-agent)/schema-registry/schemas/(.*)", "/schema-registry/schemas/$2"] + regex_uri: ["^/(prism-agent|{{ .Chart.Name }})/schema-registry/schemas/(.*)", "/schema-registry/schemas/$2"] {{ template "cors" . }} {{ template "headers.requestId" . }} {{ template "headers.security" . }} @@ -123,7 +123,7 @@ spec: {{- end }} paths: - /prism-agent/credential-definition-registry/definitions/* - - /cloud-agent/credential-definition-registry/definitions/* + - /{{ .Chart.Name }}/credential-definition-registry/definitions/* methods: - GET backends: @@ -133,7 +133,7 @@ spec: - name: proxy-rewrite enable: true config: - regex_uri: ["^/(prism-agent|cloud-agent)/credential-definition-registry/definitions/(.*)", "/credential-definition-registry/definitions/$2"] + regex_uri: ["^/(prism-agent|{{ .Chart.Name }})/credential-definition-registry/definitions/(.*)", "/credential-definition-registry/definitions/$2"] {{ template "cors" . }} {{ template "headers.requestId" . }} {{ template "headers.security" . }} @@ -157,7 +157,7 @@ spec: {{- end }} paths: - /prism-agent/docs/* - - /cloud-agent/docs/* + - /{{ .Chart.Name }}/docs/* backends: - serviceName: agent-server-tapir-service servicePort: 8085 @@ -165,7 +165,7 @@ spec: - name: proxy-rewrite enable: true config: - regex_uri: ["^/(prism-agent|cloud-agent)/docs/(.*)","/docs/$2"] + regex_uri: ["^/(prism-agent|{{ .Chart.Name }})/docs/(.*)","/docs/$2"] {{ template "cors" . }} {{ template "headers.requestId" . }} {{ template "headers.security" . }} diff --git a/infrastructure/charts/agent/templates/apisixtls.yaml b/infrastructure/charts/agent/templates/apisixtls.yaml index d38dca4692..13b88a8347 100644 --- a/infrastructure/charts/agent/templates/apisixtls.yaml +++ b/infrastructure/charts/agent/templates/apisixtls.yaml @@ -2,7 +2,7 @@ apiVersion: apisix.apache.org/v2 kind: ApisixTls metadata: - name: "prism-agent-base-path-tls" + name: "{{ .Chart.Name }}-base-path-tls" namespace: "{{ .Release.Namespace }}" labels: {{ template "labels.common" . }} @@ -12,6 +12,6 @@ spec: - {{ . }} {{- end }} secret: - name: "prism-agent-base-path-secret" + name: "{{ .Chart.Name }}-base-path-secret" namespace: "{{ .Release.Namespace }}" {{- end }} diff --git a/infrastructure/charts/agent/templates/certificate.yaml b/infrastructure/charts/agent/templates/certificate.yaml index 948d7ec100..35777cc34a 100644 --- a/infrastructure/charts/agent/templates/certificate.yaml +++ b/infrastructure/charts/agent/templates/certificate.yaml @@ -2,14 +2,14 @@ apiVersion: cert-manager.io/v1 kind: Certificate metadata: - name: "prism-agent-base-path-cert" + name: "{{ .Chart.Name }}-base-path-cert" namespace: "{{ .Release.Namespace }}" labels: {{ template "labels.common" . }} annotations: argocd.argoproj.io/sync-wave: "-1" spec: - secretName: "prism-agent-base-path-secret" + secretName: "{{ .Chart.Name }}-base-path-secret" duration: 2160h0m0s # 90d renewBefore: 360h0m0s # 15d issuerRef: diff --git a/infrastructure/charts/agent/templates/configmap.yaml b/infrastructure/charts/agent/templates/configmap.yaml index 832a197063..9641f06603 100644 --- a/infrastructure/charts/agent/templates/configmap.yaml +++ b/infrastructure/charts/agent/templates/configmap.yaml @@ -13,8 +13,8 @@ data: KEYCLOAK_ADMIN_USER=$KEYCLOAK_ADMIN_USER KEYCLOAK_ADMIN_PASSWORD=$KEYCLOAK_ADMIN_PASSWORD REALM_NAME=$REALM_NAME - PRISM_AGENT_CLIENT_ID=$PRISM_AGENT_CLIENT_ID - PRISM_AGENT_CLIENT_SECRET=$PRISM_AGENT_CLIENT_SECRET + CLOUD_AGENT_CLIENT_ID=$CLOUD_AGENT_CLIENT_ID + CLOUD_AGENT_CLIENT_SECRET=$CLOUD_AGENT_CLIENT_SECRET function get_admin_token() { local response=$( @@ -68,10 +68,10 @@ data: echo "Getting admin access token ..." ADMIN_ACCESS_TOKEN=$(get_admin_token) - CLIENT_EXIST=$(is_client_exists $ADMIN_ACCESS_TOKEN $PRISM_AGENT_CLIENT_ID) + CLIENT_EXIST=$(is_client_exists $ADMIN_ACCESS_TOKEN $CLOUD_AGENT_CLIENT_ID) if [ $CLIENT_EXIST == "false" ]; then - echo "Creating a new $PRISM_AGENT_CLIENT_ID client ..." - create_client $ADMIN_ACCESS_TOKEN $PRISM_AGENT_CLIENT_ID $PRISM_AGENT_CLIENT_SECRET + echo "Creating a new $CLOUD_AGENT_CLIENT_ID client ..." + create_client $ADMIN_ACCESS_TOKEN $CLOUD_AGENT_CLIENT_ID $CLOUD_AGENT_CLIENT_SECRET fi {{- if .Values.keycloak.enabled }} @@ -81,9 +81,9 @@ data: apiVersion: v1 kind: ConfigMap metadata: - name: prism-agent-realm-import + name: {{ .Chart.Name }}-realm-import data: - prism-agent.json: | + {{ .Chart.Name }}.json: | { "realm": {{ .Values.server.keycloak.realm | quote }}, "enabled": true diff --git a/infrastructure/charts/agent/templates/deployment.yaml b/infrastructure/charts/agent/templates/deployment.yaml index 4621487079..9dc4973189 100644 --- a/infrastructure/charts/agent/templates/deployment.yaml +++ b/infrastructure/charts/agent/templates/deployment.yaml @@ -1,19 +1,19 @@ apiVersion: apps/v1 kind: Deployment metadata: - name: prism-agent-server + name: {{ .Chart.Name }}-server namespace: "{{ .Release.Namespace }}" labels: {{ template "labels.common" . }} spec: selector: matchLabels: - app.kubernetes.io/name: prism-agent-server + app.kubernetes.io/name: {{ .Chart.Name }}-server replicas: 1 template: metadata: labels: - app.kubernetes.io/name: prism-agent-server + app.kubernetes.io/name: {{ .Chart.Name }}-server {{ template "labels.common" . }} spec: imagePullSecrets: @@ -21,7 +21,7 @@ spec: initContainers: - name: wait-postgress-ready image: busybox - command: ['sh', '-c', "until nc -z {{ .Values.database.postgres.managingTeam }}-prism-agent-postgres-cluster.{{.Release.Namespace}} 5432; do echo waiting for postgress-operator; sleep 2; done;"] + command: ['sh', '-c', "until nc -z {{ .Values.database.postgres.managingTeam }}-{{ .Chart.Name }}-postgres-cluster.{{.Release.Namespace}} 5432; do echo waiting for postgress-operator; sleep 2; done;"] {{- if .Values.server.keycloak.enabled }} - name: wait-keycloak-ready image: badouralix/curl-jq:ubuntu @@ -40,9 +40,9 @@ spec: {{- toYaml .Values.server.keycloak.admin.password | nindent 12 }} - name: REALM_NAME value: {{ .Values.server.keycloak.realm }} - - name: PRISM_AGENT_CLIENT_ID + - name: CLOUD_AGENT_CLIENT_ID value: {{ .Values.server.keycloak.client.clientId }} - - name: PRISM_AGENT_CLIENT_SECRET + - name: CLOUD_AGENT_CLIENT_SECRET valueFrom: {{- toYaml .Values.server.keycloak.client.clientSecret | nindent 12 }} volumeMounts: @@ -52,7 +52,7 @@ spec: {{- end }} {{- end }} containers: - - name: prism-agent-server + - name: {{ .Chart.Name }}-server image: "{{ .Values.server.image.repository }}/{{ .Values.server.image.tag }}:{{ .Values.server.image.version | default .Chart.AppVersion }}" imagePullPolicy: {{ .Values.server.image.pullPolicy }} livenessProbe: @@ -78,7 +78,7 @@ spec: key: salt optional: false - name: POLLUX_DB_HOST - value: "{{ .Values.database.postgres.managingTeam }}-prism-agent-postgres-cluster.{{.Release.Namespace}}" + value: "{{ .Values.database.postgres.managingTeam }}-{{ .Chart.Name }}-postgres-cluster.{{.Release.Namespace}}" - name: POLLUX_DB_PORT value: "5432" - name: POLLUX_DB_NAME @@ -86,29 +86,29 @@ spec: - name: POLLUX_DB_USER valueFrom: secretKeyRef: - name: pollux-admin.{{ .Values.database.postgres.managingTeam }}-prism-agent-postgres-cluster.credentials.postgresql.acid.zalan.do + name: pollux-admin.{{ .Values.database.postgres.managingTeam }}-{{ .Chart.Name }}-postgres-cluster.credentials.postgresql.acid.zalan.do key: username optional: false - name: POLLUX_DB_PASSWORD valueFrom: secretKeyRef: - name: pollux-admin.{{ .Values.database.postgres.managingTeam }}-prism-agent-postgres-cluster.credentials.postgresql.acid.zalan.do + name: pollux-admin.{{ .Values.database.postgres.managingTeam }}-{{ .Chart.Name }}-postgres-cluster.credentials.postgresql.acid.zalan.do key: password optional: false - name: POLLUX_DB_APP_USER valueFrom: secretKeyRef: - name: pollux-application-user.{{ .Values.database.postgres.managingTeam }}-prism-agent-postgres-cluster.credentials.postgresql.acid.zalan.do + name: pollux-application-user.{{ .Values.database.postgres.managingTeam }}-{{ .Chart.Name }}-postgres-cluster.credentials.postgresql.acid.zalan.do key: username optional: false - name: POLLUX_DB_APP_PASSWORD valueFrom: secretKeyRef: - name: pollux-application-user.{{ .Values.database.postgres.managingTeam }}-prism-agent-postgres-cluster.credentials.postgresql.acid.zalan.do + name: pollux-application-user.{{ .Values.database.postgres.managingTeam }}-{{ .Chart.Name }}-postgres-cluster.credentials.postgresql.acid.zalan.do key: password optional: false - name: CONNECT_DB_HOST - value: "{{ .Values.database.postgres.managingTeam }}-prism-agent-postgres-cluster.{{.Release.Namespace}}" + value: "{{ .Values.database.postgres.managingTeam }}-{{ .Chart.Name }}-postgres-cluster.{{.Release.Namespace}}" - name: CONNECT_DB_PORT value: "5432" - name: CONNECT_DB_NAME @@ -116,29 +116,29 @@ spec: - name: CONNECT_DB_USER valueFrom: secretKeyRef: - name: connect-admin.{{ .Values.database.postgres.managingTeam }}-prism-agent-postgres-cluster.credentials.postgresql.acid.zalan.do + name: connect-admin.{{ .Values.database.postgres.managingTeam }}-{{ .Chart.Name }}-postgres-cluster.credentials.postgresql.acid.zalan.do key: username optional: false - name: CONNECT_DB_PASSWORD valueFrom: secretKeyRef: - name: connect-admin.{{ .Values.database.postgres.managingTeam }}-prism-agent-postgres-cluster.credentials.postgresql.acid.zalan.do + name: connect-admin.{{ .Values.database.postgres.managingTeam }}-{{ .Chart.Name }}-postgres-cluster.credentials.postgresql.acid.zalan.do key: password optional: false - name: CONNECT_DB_APP_USER valueFrom: secretKeyRef: - name: connect-application-user.{{ .Values.database.postgres.managingTeam }}-prism-agent-postgres-cluster.credentials.postgresql.acid.zalan.do + name: connect-application-user.{{ .Values.database.postgres.managingTeam }}-{{ .Chart.Name }}-postgres-cluster.credentials.postgresql.acid.zalan.do key: username optional: false - name: CONNECT_DB_APP_PASSWORD valueFrom: secretKeyRef: - name: connect-application-user.{{ .Values.database.postgres.managingTeam }}-prism-agent-postgres-cluster.credentials.postgresql.acid.zalan.do + name: connect-application-user.{{ .Values.database.postgres.managingTeam }}-{{ .Chart.Name }}-postgres-cluster.credentials.postgresql.acid.zalan.do key: password optional: false - name: AGENT_DB_HOST - value: "{{ .Values.database.postgres.managingTeam }}-prism-agent-postgres-cluster.{{.Release.Namespace}}" + value: "{{ .Values.database.postgres.managingTeam }}-{{ .Chart.Name }}-postgres-cluster.{{.Release.Namespace}}" - name: AGENT_DB_PORT value: "5432" - name: AGENT_DB_NAME @@ -146,31 +146,31 @@ spec: - name: AGENT_DB_USER valueFrom: secretKeyRef: - name: agent-admin.{{ .Values.database.postgres.managingTeam }}-prism-agent-postgres-cluster.credentials.postgresql.acid.zalan.do + name: agent-admin.{{ .Values.database.postgres.managingTeam }}-{{ .Chart.Name }}-postgres-cluster.credentials.postgresql.acid.zalan.do key: username optional: false - name: AGENT_DB_PASSWORD valueFrom: secretKeyRef: - name: agent-admin.{{ .Values.database.postgres.managingTeam }}-prism-agent-postgres-cluster.credentials.postgresql.acid.zalan.do + name: agent-admin.{{ .Values.database.postgres.managingTeam }}-{{ .Chart.Name }}-postgres-cluster.credentials.postgresql.acid.zalan.do key: password optional: false - name: AGENT_DB_APP_USER valueFrom: secretKeyRef: - name: agent-application-user.{{ .Values.database.postgres.managingTeam }}-prism-agent-postgres-cluster.credentials.postgresql.acid.zalan.do + name: agent-application-user.{{ .Values.database.postgres.managingTeam }}-{{ .Chart.Name }}-postgres-cluster.credentials.postgresql.acid.zalan.do key: username optional: false - name: AGENT_DB_APP_PASSWORD valueFrom: secretKeyRef: - name: agent-application-user.{{ .Values.database.postgres.managingTeam }}-prism-agent-postgres-cluster.credentials.postgresql.acid.zalan.do + name: agent-application-user.{{ .Values.database.postgres.managingTeam }}-{{ .Chart.Name }}-postgres-cluster.credentials.postgresql.acid.zalan.do key: password optional: false - name: DIDCOMM_SERVICE_URL - value: "https://{{ index .Values.ingress.applicationUrls 0 }}/cloud-agent/didcomm" + value: "https://{{ index .Values.ingress.applicationUrls 0 }}/{{ .Chart.Name }}/didcomm" - name: REST_SERVICE_URL - value: "https://{{ index .Values.ingress.applicationUrls 0 }}/cloud-agent" + value: "https://{{ index .Values.ingress.applicationUrls 0 }}/{{ .Chart.Name }}" - name: PRISM_NODE_HOST value: {{ .Values.vdrManager.host | quote }} - name: PRISM_NODE_PORT diff --git a/infrastructure/charts/agent/templates/postgresql.yaml b/infrastructure/charts/agent/templates/postgresql.yaml index b28f5a4e35..cce4c61ea3 100644 --- a/infrastructure/charts/agent/templates/postgresql.yaml +++ b/infrastructure/charts/agent/templates/postgresql.yaml @@ -1,7 +1,7 @@ apiVersion: "acid.zalan.do/v1" kind: postgresql metadata: - name: "{{ .Values.database.postgres.managingTeam }}-prism-agent-postgres-cluster" + name: "{{ .Values.database.postgres.managingTeam }}-{{ .Chart.Name }}-postgres-cluster" namespace: {{ .Release.Namespace }} labels: {{ template "labels.common" . }} diff --git a/infrastructure/charts/agent/templates/service.yaml b/infrastructure/charts/agent/templates/service.yaml index 47f9b74420..105eddb6ce 100644 --- a/infrastructure/charts/agent/templates/service.yaml +++ b/infrastructure/charts/agent/templates/service.yaml @@ -4,14 +4,14 @@ metadata: name: agent-server-tapir-service namespace: "{{ .Release.Namespace }}" labels: - app.kubernetes.io/name: prism-agent-server - app.kubernetes.io/service: prism-agent-server-main + app.kubernetes.io/name: {{ .Chart.Name }}-server + app.kubernetes.io/service: {{ .Chart.Name }}-server-main {{ template "labels.common" . }} spec: selector: - app.kubernetes.io/name: prism-agent-server + app.kubernetes.io/name: {{ .Chart.Name }}-server ports: - - name: prism-agent-server-main + - name: {{ .Chart.Name }}-server-main protocol: "TCP" port: 8085 targetPort: 8085 @@ -25,14 +25,14 @@ metadata: name: agent-server-didcomm-service namespace: "{{ .Release.Namespace }}" labels: - app.kubernetes.io/name: prism-agent-server - app.kubernetes.io/service: prism-agent-server-didcomm + app.kubernetes.io/name: {{ .Chart.Name }}-server + app.kubernetes.io/service: {{ .Chart.Name }}-server-didcomm {{ template "labels.common" . }} spec: selector: - app.kubernetes.io/name: prism-agent-server + app.kubernetes.io/name: {{ .Chart.Name }}-server ports: - - name: prism-agent-server-didcomm + - name: {{ .Chart.Name }}-server-didcomm protocol: "TCP" port: 8090 targetPort: 8090 @@ -49,7 +49,7 @@ metadata: annotations: external-dns.alpha.kubernetes.io/hostname: "{{ join ", " .Values.ingress.applicationUrls }}" labels: - app.kubernetes.io/name: prism-agent-server + app.kubernetes.io/name: {{ .Chart.Name }}-server app.kubernetes.io/service: agent-server-domain-name-fake {{ template "labels.common" . }} spec: diff --git a/infrastructure/charts/agent/values.yaml b/infrastructure/charts/agent/values.yaml index 0fc766bbd4..84d552ce23 100644 --- a/infrastructure/charts/agent/values.yaml +++ b/infrastructure/charts/agent/values.yaml @@ -1,7 +1,7 @@ ingress: enabled: true applicationUrls: - - chart-base-prism-stack.atalaprism.io + - chart-base-stack.atalaprism.io platformIngressUrl: chart-base-platform-ingress.atalaprism.io cors: enabled: false @@ -147,18 +147,18 @@ keycloak: user: keycloak-admin database: keycloak extraVolumes: - - name: prism-agent-realm-import-volume + - name: cloud-agent-realm-import-volume configMap: - name: prism-agent-realm-import + name: cloud-agent-realm-import items: - - key: prism-agent.json - path: prism-agent.json + - key: cloud-agent.json + path: cloud-agent.json extraVolumeMounts: - - name: prism-agent-realm-import-volume + - name: cloud-agent-realm-import-volume mountPath: /opt/bitnami/keycloak/data/import readOnly: true -# It is configured for deployment and postgresql objects of prism-agent +# It is configured for deployment and postgresql objects of cloud-agent affinity: nodeAffinity: {} # requiredDuringSchedulingIgnoredDuringExecution: