File tree Expand file tree Collapse file tree
ansible/roles/vault_utils Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -19,8 +19,17 @@ TARGET_REPO=$(shell git ls-remote --get-url --symref $(TARGET_ORIGIN) | sed -e '
1919# git branch --show-current is also available as of git 2.22, but we will use this for compatibility
2020TARGET_BRANCH =$(shell git rev-parse --abbrev-ref HEAD)
2121
22+ UUID_FILE ?= ~/.config/validated-patterns/pattern-uuid
23+ UUID_HELM_OPTS ?=
24+
2225# --set values always take precedence over the contents of -f
23- HELM_OPTS =-f values-global.yaml --set main.git.repoURL="$(TARGET_REPO ) " --set main.git.revision=$(TARGET_BRANCH ) $(TARGET_SITE_OPT ) $(EXTRA_HELM_OPTS )
26+ ifneq ("$(wildcard $(UUID_FILE ) ) ","")
27+ UUID := $(shell cat $(UUID_FILE))
28+ UUID_HELM_OPTS := --set main.analyticsUUID=$(UUID)
29+ endif
30+
31+ HELM_OPTS =-f values-global.yaml --set main.git.repoURL="$(TARGET_REPO ) " --set main.git.revision=$(TARGET_BRANCH ) $(TARGET_SITE_OPT ) $(UUID_HELM_OPTS ) $(EXTRA_HELM_OPTS )
32+
2433
2534# #@ Pattern Common Tasks
2635
Original file line number Diff line number Diff line change 66
77This repository is never used as standalone. It is usually imported in each pattern as a subtree.
88In order to import the common/ the very first time you can use
9- ` https://github.com/hybrid-cloud-patterns /multicloud-gitops/blob/main/common/scripts/make_common_subtree.sh `
9+ ` https://github.com/validatedpatterns /multicloud-gitops/blob/main/common/scripts/make_common_subtree.sh `
1010
1111In order to update your common subtree inside your pattern repository you can either use
12- ` https://github.com/hybrid-cloud-patterns /utilities/blob/main/scripts/update-common-everywhere.sh ` or
12+ ` https://github.com/validatedpatterns /utilities/blob/main/scripts/update-common-everywhere.sh ` or
1313do it manually by doing the following:
1414
1515``` sh
16- git remote add -f upstream-common https://github.com/hybrid-cloud-patterns /common.git
16+ git remote add -f upstream-common https://github.com/validatedpatterns /common.git
1717git merge -s subtree -Xtheirs -Xsubtree=common upstream-common/ha-vault
1818```
1919
2020## Secrets
2121
22- There are two different secret formats parsed by the ansible bits. Both are documented [ here] ( https://github.com/hybrid-cloud-patterns /common/tree/main/ansible/roles/vault_utils/README.md )
22+ There are two different secret formats parsed by the ansible bits. Both are documented [ here] ( https://github.com/validatedpatterns /common/tree/main/ansible/roles/vault_utils/README.md )
Original file line number Diff line number Diff line change @@ -42,10 +42,16 @@ This relies on [kubernetes.core](https://docs.ansible.com/ansible/latest/collect
4242
4343## Values secret file format
4444
45- Currently this role supports two formats: version 1.0 (which is the assumed default when not specified) and version 2.0.
46- The latter is more fatureful and supports generating secrets directly into the vault and also prompting the user for a secret.
47- By default, the first file that will looked up is ` ~/.config/hybrid-cloud-patterns/values-secret-<patternname>.yaml`, then
48- ` ~/values-secret-<patternname>.yaml` and should that not exist it will look for `~/values-secret.yaml`.
45+ Currently this role supports two formats: version 1.0 (which is the assumed
46+ default when not specified) and version 2.0. The latter is more fatureful and
47+ supports generating secrets directly into the vault and also prompting the user
48+ for a secret.
49+
50+ By default, the first file that will looked up is
51+ ` ~/.config/hybrid-cloud-patterns/values-secret-<patternname>.yaml`, then
52+ ` ~/.config/validated-patterns/values-secret-<patternname>.yaml` ,
53+ ` ~/values-secret-<patternname>.yaml` and should that not exist it will look for
54+ ` ~/values-secret.yaml` .
4955The paths can be overridden by setting the environment variable `VALUES_SECRET` to the path of the
5056secret file.
5157
Original file line number Diff line number Diff line change 6666 vars :
6767 findme :
6868 - " ~/.config/hybrid-cloud-patterns/values-secret-{{ pattern_name }}.yaml"
69+ - " ~/.config/validated-patterns/values-secret-{{ pattern_name }}.yaml"
6970 - " ~/values-secret-{{ pattern_name }}.yaml"
7071 - " ~/values-secret.yaml"
7172 - " {{ pattern_dir }}/values-secret.yaml.template"
You can’t perform that action at this time.
0 commit comments