Skip to content
This repository has been archived by the owner on Feb 13, 2024. It is now read-only.

Commit

Permalink
simplify helm config
Browse files Browse the repository at this point in the history
Signed-off-by: Frank Bernhardt <[email protected]>
  • Loading branch information
frank-bee authored Mar 24, 2021
1 parent fd8cef9 commit c58581b
Show file tree
Hide file tree
Showing 20 changed files with 49 additions and 644 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -80,5 +80,5 @@ package-lock.json
# --------------------------------------

charts/**/charts/
charts/**/manifests/
my-values.yaml
manifests/
2 changes: 1 addition & 1 deletion charts/bpa/templates/acapy_deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ spec:
--arg-file acapy-static-args.yml \
--inbound-transport http '0.0.0.0' {{ .Values.acapy.service.httpPort }} \
--webhook-url http://{{ include "bpa.fullname" . }}:{{ .Values.bpa.service.port }}/log \
--genesis-url '{{ .Values.bpa.ledgerURL }}/genesis' \
--genesis-url '{{ .Values.bpa.config.ledger.browser }}/genesis' \
--endpoint https://{{ (index .Values.acapy.ingress.hosts 0).host }} \
--wallet-storage-type 'postgres_storage' \
--wallet-name 'mywallet' \
Expand Down
14 changes: 13 additions & 1 deletion charts/bpa/templates/bpa_configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,18 @@ metadata:
labels:
{{- include "bpa.labels" . | nindent 4 }}
data:
application.yaml: |-
application.yaml: |-
bpa:
{{ toYaml .Values.bpa.config | indent 6 }}
acapy:
url: http://{{ include "acapy.fullname" . }}:{{ .Values.acapy.service.adminPort }}
apiKey: {{ .Values.acapy.adminURLApiKey }}
endpoint: https://{{ (index .Values.acapy.ingress.hosts 0).host }}
pg:
url: jdbc:postgresql://{{ include "global.postgresql.fullname" . }}/{{ .Values.postgresql.postgresqlUsername }}
username: {{ .Values.postgresql.postgresqlUsername }}
password: $(POSTGRES_PASSWORD)
host: {{ (index .Values.bpa.ingress.hosts 0).host }}
micronaut:
security:
enabled: {{ .Values.bpa.config.security.enabled }}
34 changes: 2 additions & 32 deletions charts/bpa/templates/bpa_deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,42 +34,12 @@ spec:
- name: http
containerPort: 8080
protocol: TCP
env:
- name: BPA_BOOTSTRAP_PW
value: {{ .Values.bpa.password | quote }}
- name: BPA_BOOTSTRAP_UN
value: {{ .Values.bpa.userName | quote }}
- name: BPA_DID_PREFIX
value: {{ .Values.bpa.didPrefix | quote }}
- name: BPA_LEDGER_BROWSER
value: {{ .Values.bpa.ledgerBrowser | quote }}
- name: BPA_RESOLVER_URL
value: {{ .Values.bpa.resolverURL | quote }}
- name: BPA_WEB_MODE
value: {{ .Values.bpa.webMode | quote }}
- name: AGENT_NAME
value: {{ .Values.bpa.agentName | quote }}
- name: ACAPY_ENDPOINT
value: https://{{ (index .Values.acapy.ingress.hosts 0).host }}
- name: BPA_IMPRINT_URL
value: {{ .Values.bpa.imprintURL | quote }}
- name: BPA_PRIVACY_POLICY_URL
value: {{ .Values.bpa.privacyPolicyURL | quote }}
env:
- name: POSTGRES_PASSWORD
valueFrom:
secretKeyRef:
name: {{ template "global.postgresql.fullname" . }}
key: postgresql-password
- name: JAVA_OPTS
value: |
-Dbpa.acapy.url=http://{{ include "acapy.fullname" . }}:{{ .Values.acapy.service.adminPort }}
-Dbpa.acapy.apiKey={{ .Values.acapy.adminURLApiKey }}
-Dmicronaut.security.enabled={{ .Values.bpa.securityEnabled }}
-Dmicronaut.server.port=8080
-Dbpa.pg.url=jdbc:postgresql://{{ include "global.postgresql.fullname" . }}/{{ .Values.postgresql.postgresqlUsername }}
-Dbpa.pg.username={{ .Values.postgresql.postgresqlUsername }}
-Dbpa.pg.password=$(POSTGRES_PASSWORD)
-Dbpa.host={{ (index .Values.bpa.ingress.hosts 0).host }}
resources:
{{- toYaml .Values.bpa.resources | nindent 12 }}
{{- with .Values.bpa.nodeSelector }}
Expand All @@ -83,4 +53,4 @@ spec:
{{- with .Values.bpa.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
80 changes: 32 additions & 48 deletions charts/bpa/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,56 +28,40 @@ bpa:
# If not set and create is true, a name is generated using the fullname template
name: ""

# -- enable security (username and password)
securityEnabled: true

# -- Default username
userName: admin

# -- Default password, overwrite default if running in production like environments
password: changeme

# -- Run in did:web mode with read only ledger. If set to true acapy.readOnlyMode has to be true too.
webMode: false

# -- Uni Resolver URL
resolverURL: https://resolver.stage.economyofthings.io

# -- The ledger prefix that is configured with the Uni Resolver
didPrefix: "did:sov:iil:"

# -- The Ledger URL
ledgerURL: https://indy-test.bosch-digital.de

# -- The Ledger Explorer
ledgerBrowser: https://indy-test.bosch-digital.de

# -- The Agent Name as it should be displayed in the UI
agentName: "Business Partner Agent"

# -- application config (remark: all new configuration values will sit here, the other ones can be migrated step by step)
config:
#test ledger schemas, can be overwritten / extended when e.g. working with other ledger
schemas:
bank-account:
id: "UmZ25DANwS6ngGWB4ye4tN:2:BankAccount:0.1"
label: "Bank Account"
defaultAttributeName: "iban"
# Note: this also works json style restrictions: [{id: 123, label: myLabel}]
restrictions:
- issuerDid: "did:sov:iil:UmZ25DANwS6ngGWB4ye4tN"
label: "Demo Bank"
commercial-register:
id: "R6WR6n7CQVDjvvmwofHK6S:2:commercialregister:0.1"
label: "Commercial Register"
defaultAttributeName: "companyName"
restrictions:
- issuerDid: "did:sov:iil:R6WR6n7CQVDjvvmwofHK6S"
label: "Commercial Register"

imprintURL:

privacyPolicyURL:
security:
enabled: true
bootstrap:
username: admin
password: changeme
resolver:
url: https://resolver.stage.economyofthings.io
ledger:
browser: https://indy-test.bosch-digital.de
name: Business Partner Agent
web:
only: false
#schemas:
# bank-account:
# id: "UmZ25DANwS6ngGWB4ye4tN:2:BankAccount:0.1"
# label: "Bank Account"
# defaultAttributeName: "iban"
# restrictions:
# - issuerDid: "did:sov:iil:UmZ25DANwS6ngGWB4ye4tN"
# label: "Demo Bank"
# commercial-register:
# id: "R6WR6n7CQVDjvvmwofHK6S:2:commercialregister:0.1"
# label: "Commercial Register"
# defaultAttributeName: "companyName"
# restrictions:
# - issuerDid: "did:sov:iil:R6WR6n7CQVDjvvmwofHK6S"
# label: "Commercial Register"
#imprint:
# url:
#privacy:
# policy:
# url:

imagePullSecrets: []

Expand Down
14 changes: 0 additions & 14 deletions manifests/bpa/charts/postgresql/templates/secrets.yaml

This file was deleted.

127 changes: 0 additions & 127 deletions manifests/bpa/charts/postgresql/templates/statefulset.yaml

This file was deleted.

21 changes: 0 additions & 21 deletions manifests/bpa/charts/postgresql/templates/svc-headless.yaml

This file was deleted.

22 changes: 0 additions & 22 deletions manifests/bpa/charts/postgresql/templates/svc.yaml

This file was deleted.

31 changes: 0 additions & 31 deletions manifests/bpa/templates/acapy_configmap.yaml

This file was deleted.

Loading

0 comments on commit c58581b

Please sign in to comment.