diff --git a/argocd/uex/dev/ra/allocations-exchange-secret/app.yaml b/argocd/uex/dev/ra/allocations-exchange-secret/app.yaml new file mode 100644 index 00000000..91a00a7a --- /dev/null +++ b/argocd/uex/dev/ra/allocations-exchange-secret/app.yaml @@ -0,0 +1,35 @@ +apiVersion: argoproj.io/v1alpha1 +kind: ApplicationSet +metadata: + name: allocations-exchange-secret + namespace: argocd +spec: + goTemplate: true + goTemplateOptions: ["missingkey=error"] + generators: + - list: + elements: + # Names of clusters to deploy the app to + - name: dev-v3 + # Uncomment if you want to deploy to dev-microk8s-alternative + #- name: dev-microk8s-alternative + template: + metadata: + name: '{{.name}}-allocations-exchange-secret' + annotations: + argocd.argoproj.io/sync-wave: "0" + spec: + project: r-a-project + source: + path: components/ra/allocations-exchange-secret + repoURL: 'https://github.com/isisbusapps/gitops' + targetRevision: main + helm: + valueFiles: + - values-dev.yaml + destination: + namespace: apps + name: '{{.name}}' + syncPolicy: + automated: + selfHeal: true \ No newline at end of file diff --git a/components/ra/allocations-exchange-secret/.helmignore b/components/ra/allocations-exchange-secret/.helmignore new file mode 100644 index 00000000..0e8a0eb3 --- /dev/null +++ b/components/ra/allocations-exchange-secret/.helmignore @@ -0,0 +1,23 @@ +# 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/components/ra/allocations-exchange-secret/Chart.yaml b/components/ra/allocations-exchange-secret/Chart.yaml new file mode 100644 index 00000000..bafd13d1 --- /dev/null +++ b/components/ra/allocations-exchange-secret/Chart.yaml @@ -0,0 +1,24 @@ +apiVersion: v2 +name: allocations-exchange-secret-chart +description: A Helm chart for Kubernetes + +# 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.2.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.2.0" diff --git a/components/ra/allocations-exchange-secret/templates/allocations-exchange-static-secret.yaml b/components/ra/allocations-exchange-secret/templates/allocations-exchange-static-secret.yaml new file mode 100644 index 00000000..bec618c5 --- /dev/null +++ b/components/ra/allocations-exchange-secret/templates/allocations-exchange-static-secret.yaml @@ -0,0 +1,22 @@ +apiVersion: secrets.hashicorp.com/v1beta1 +kind: VaultStaticSecret +metadata: + name: allocations-exchange-secret + namespace: apps +spec: + type: kv-v2 + refreshAfter: 30s + vaultAuthRef: static-auth + mount: reviews_and_allocations + path: {{ $.Values.env }}/rabbitmq/allocations + destination: + name: allocations-exchange-secret + overwrite: true + create: true + transformation: + templates: + username: + text: "{{`{{ get .Secrets \"username\" }}`}}" + password: + text: "{{`{{ get .Secrets \"password\" }}`}}" + diff --git a/components/ra/allocations-exchange-secret/values-dev.yaml b/components/ra/allocations-exchange-secret/values-dev.yaml new file mode 100644 index 00000000..4a067a0b --- /dev/null +++ b/components/ra/allocations-exchange-secret/values-dev.yaml @@ -0,0 +1 @@ +env: dev \ No newline at end of file diff --git a/components/ra/allocations-exchange-secret/values-prod.yaml b/components/ra/allocations-exchange-secret/values-prod.yaml new file mode 100644 index 00000000..46b998ba --- /dev/null +++ b/components/ra/allocations-exchange-secret/values-prod.yaml @@ -0,0 +1 @@ +env: prod \ No newline at end of file diff --git a/components/ra/fap-results-letters-exchange-secret/templates/frl-exchange-static-secret.yaml b/components/ra/fap-results-letters-exchange-secret/templates/frl-exchange-static-secret.yaml index cb303c80..8640fad6 100644 --- a/components/ra/fap-results-letters-exchange-secret/templates/frl-exchange-static-secret.yaml +++ b/components/ra/fap-results-letters-exchange-secret/templates/frl-exchange-static-secret.yaml @@ -8,7 +8,7 @@ spec: refreshAfter: 30s vaultAuthRef: static-auth mount: reviews_and_allocations - path: {{ $.Values.env }}/rabbitmq/ + path: {{ $.Values.env }}/rabbitmq/fap-results-letter destination: name: frl-exchange-secret overwrite: true diff --git a/components/submissions/uop-exchange-topology/templates/proposals-user.yaml b/components/submissions/uop-exchange-topology/templates/proposals-user.yaml index 0bc4ccbe..ebb41e71 100644 --- a/components/submissions/uop-exchange-topology/templates/proposals-user.yaml +++ b/components/submissions/uop-exchange-topology/templates/proposals-user.yaml @@ -12,7 +12,7 @@ spec: {{- end }} {{- end }} importCredentialsSecret: - name: uop-exchange-secret + name: {{ $config.credentialsSecret }} rabbitmqClusterReference: name: {{ $.Values.rmq_cluster_name }} --- diff --git a/components/submissions/uop-exchange-topology/values-dev.yaml b/components/submissions/uop-exchange-topology/values-dev.yaml index d27920f5..db87f5d7 100644 --- a/components/submissions/uop-exchange-topology/values-dev.yaml +++ b/components/submissions/uop-exchange-topology/values-dev.yaml @@ -3,6 +3,7 @@ uop_exchange_vhost: proposals users: proposal-submission-user: + credentialsSecret: uop-exchange-secret tags: - management permissions: @@ -10,6 +11,7 @@ users: write: .* read: .* proposal-allocations-user: + credentialsSecret: allocations-exchange-secret tags: - management permissions: