Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Common #87

Merged
merged 180 commits into from
Jul 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
180 commits
Select commit Hold shift + click to select a range
1cb3f09
Updated namespaces template to include labels and annotations functio…
claudiol Mar 21, 2023
e68b7d9
Added schema validation to support additional formal for labels and a…
claudiol Mar 21, 2023
8aa8396
Updated the values-example.yaml to include new format for namespaces
claudiol Mar 21, 2023
6b55045
Updated Changes.md to include new namespaces functionality.
claudiol Mar 21, 2023
7565648
Updating CI tests
claudiol Mar 21, 2023
185d11a
Fixed Markdown errors
claudiol Mar 21, 2023
c2ecb2a
Add an experimental letsencypt chart
mbaldessari Mar 14, 2023
7572b82
Do not run kubeconform on the certificate stuff just yet
mbaldessari Apr 3, 2023
527ca41
Fix up kustomize example
mbaldessari Apr 11, 2023
c154929
Merge pull request #293 from mbaldessari/fix-customize
mbaldessari Apr 11, 2023
3a77a96
Upgrade vault-helm to v0.24.0
mbaldessari Apr 11, 2023
3be58c7
Merge pull request #294 from mbaldessari/vault-helm-0.24.0
mbaldessari Apr 11, 2023
817bf1f
Add a hello-world ansible playbook example
mbaldessari Apr 15, 2023
248ac46
Inject ANSIBLE_CONFIG in make ansible-lint
mbaldessari Apr 15, 2023
bcc7b24
Use new ansible-lint action
mbaldessari Apr 15, 2023
879737f
Fix some ansible-lint warnings
mbaldessari Apr 15, 2023
12fd2f8
Fix up python versions
mbaldessari Apr 15, 2023
a3b22b5
Skip cannot find role error
mbaldessari Apr 15, 2023
8a63118
Merge pull request #297 from mbaldessari/hello-world-ansible
mbaldessari Apr 15, 2023
dde9699
Added health check for pvc resource in argocd.yaml
day0hero Apr 20, 2023
f2010a3
adding tests
day0hero Apr 20, 2023
e06ad88
Update super-linter image to latest
mbaldessari Apr 20, 2023
3545945
Update super-linter image to latest
mbaldessari Apr 20, 2023
ce520d2
Merge pull request #299 from mbaldessari/superlinter-v5
mbaldessari Apr 20, 2023
adb4a67
Merge branch 'main' of https://github.com/hybrid-cloud-patterns/common
mbaldessari Apr 20, 2023
7fa15b1
Update CI workflows
mbaldessari Apr 20, 2023
17a1402
Merge pull request #300 from mbaldessari/ci-update
mbaldessari Apr 20, 2023
6b88bcd
updated template with why implemented comment
day0hero Apr 20, 2023
d6ab881
Add dependabot settings for github actions
mbaldessari Apr 21, 2023
5978a08
Merge pull request #301 from mbaldessari/dependabot
mbaldessari Apr 21, 2023
eaf2619
Merge pull request #287 from mbaldessari/letsencrypt
mbaldessari Apr 21, 2023
8faea73
adding tests
day0hero Apr 21, 2023
d3b6faf
- Added functionality to support the following format for labels and …
claudiol Apr 21, 2023
3c60aa1
Merge branch 'main' into namespace-additional-properties
claudiol Apr 21, 2023
9d6fc02
Fixed CI Issues
claudiol Apr 21, 2023
2863999
Applying @claudiol recommendation
day0hero Apr 21, 2023
fd004fb
make test
day0hero Apr 21, 2023
90602fc
Merge pull request #298 from hybrid-cloud-patterns/argocd-pvc-healthc…
mbaldessari Apr 22, 2023
d1cf543
Avoid exited containers proliferation
Apr 27, 2023
cc44bff
Merge pull request #302 from beelzetron/feature/clean-podman-exited-c…
mbaldessari Apr 27, 2023
37c8f3a
Handling of pre-release builds is too complex for a helm chart
beekhof Apr 28, 2023
d6b2b0d
Merge branch 'main' into namespace-additional-properties
claudiol May 3, 2023
3c81c48
Fixing issues with operator groups
claudiol May 3, 2023
fa9f2dc
Adding CI test
claudiol May 3, 2023
a0e2d91
Updated operator group template
claudiol May 3, 2023
3f6d9b5
Updating CI issues
claudiol May 3, 2023
6566688
Removed duplicate code for operatorgroup by using multiple conditions
claudiol May 5, 2023
b855239
Merge pull request #283 from claudiol/namespace-additional-properties
mbaldessari May 10, 2023
c7dadbf
Allow overriding the pattern's name
mbaldessari May 15, 2023
7ccd29c
Merge pull request #303 from mbaldessari/name
mhjacks May 15, 2023
a6bb073
Add precise instruction to upgrade the vault subchart
mbaldessari May 16, 2023
ea7186e
Upgrade vault-helm to v0.24.1
mbaldessari May 16, 2023
c09126f
Add an item to README.md
mbaldessari May 16, 2023
70b778c
Fix up common/ tests
mbaldessari May 16, 2023
ee59eee
Fix super linter
mbaldessari May 16, 2023
07acbc3
Merge pull request #304 from mbaldessari/vault-helm-0.24.1
mbaldessari May 16, 2023
0e661bf
Set gitOpsSpec.operatorSource
mbaldessari May 18, 2023
d9db633
Introduce EXTRA_HELM_OPTS
mbaldessari May 18, 2023
8bfb05d
Disable var-naming[no-role-prefix] in ansible lint
mbaldessari May 18, 2023
2fff431
Merge pull request #306 from mbaldessari/catalogsource
mbaldessari May 18, 2023
b4e5967
Add new ansible role to deal with IIBs
mbaldessari May 16, 2023
5cbc2c0
Simplify load-iib target
mbaldessari May 16, 2023
bb97c58
Add templates folder
mbaldessari May 16, 2023
65dda37
Fix a couple of linting warnings
mbaldessari May 16, 2023
4dfeecb
Fix some super-linter complaints
mbaldessari May 16, 2023
33dfdb3
Skip the iib-ci playbook
mbaldessari May 16, 2023
93fd8c8
Drop var-naming[no-role-prefix] linter
mbaldessari May 16, 2023
6263afe
Allow for multiple images when calling load-iib
mbaldessari May 17, 2023
c776ed0
Add help for load-iib
mbaldessari May 17, 2023
b6b4836
Output index_image in make
mbaldessari May 17, 2023
51b9fb4
Output index_image in make (2)
mbaldessari May 17, 2023
7567a73
Set facts later in the playbook not in defaults/
mbaldessari May 17, 2023
ff6b73f
Fix how we export vars in make load-iib
mbaldessari May 17, 2023
7dfa5cf
Fix how we export vars in make load-iib (2)
mbaldessari May 17, 2023
5e51a63
Use machineCount to register the number of nodes that need to be ready
mbaldessari May 17, 2023
1b80705
Add helpful debug messages
mbaldessari May 17, 2023
aef9717
Add | on shell now that we call pipefail
mbaldessari May 17, 2023
14209b3
Test dropping nevercontact source
mbaldessari May 17, 2023
7d17348
Skip insecure tls when logging in
mbaldessari May 18, 2023
dbdbc8c
Also allow gchr.io
mbaldessari May 18, 2023
0355fa4
Revert "Test dropping nevercontact source"
mbaldessari May 18, 2023
47855e0
Fix typo
mbaldessari May 18, 2023
49f018a
Clarify instructions in the README file
mbaldessari May 18, 2023
d1dc09f
Automate the channel example
mbaldessari May 18, 2023
729232a
Find out KUBEADMINAPI programmatically
mbaldessari May 18, 2023
d4eb914
Use command instead of shell
mbaldessari May 18, 2023
f73f75d
Do not grep for operator bundle unless it is the gitops operator
mbaldessari May 18, 2023
b660f93
Also whitelist ghcr.io
mbaldessari May 18, 2023
41dc747
Fetch the operator bundle itself in a more robust way
mbaldessari May 18, 2023
2a941fb
Add more mirrors
mbaldessari May 18, 2023
a4e232b
Some more work to support MCE
mbaldessari May 19, 2023
45912f1
Cleanup spacing
mbaldessari May 19, 2023
86ac7c2
Fix super-linter
mbaldessari May 19, 2023
d713e7b
Move task in right folder
mbaldessari May 19, 2023
09e5389
Drop last mention of operator instead of item
mbaldessari May 19, 2023
f4b54ae
Merge pull request #305 from mbaldessari/iib
mbaldessari May 19, 2023
45a5e25
Improve the grepping for the operator bundle
mbaldessari May 22, 2023
8239ea4
Merge pull request #307 from mbaldessari/fix-iib1
mbaldessari May 22, 2023
3c29969
Drop display_skipped_hosts
mbaldessari May 22, 2023
65c512a
Merge pull request #308 from mbaldessari/ansible-cfg
mbaldessari May 22, 2023
ff1eacf
Be more specific about the steps in the README
mbaldessari May 22, 2023
44f6d57
Upgrade ESO to v0.8.2
mbaldessari May 22, 2023
06698b3
Update README.md
mbaldessari May 22, 2023
9abbef7
Update tests after eso 0.8.2 upgrade
mbaldessari May 22, 2023
b0e08e0
Merge pull request #309 from mbaldessari/eso-0.8.2
mbaldessari May 22, 2023
f672950
Move to new spec format for dex/sso
mbaldessari Apr 7, 2023
8ed17fc
Disable ArgoCD from kubeconform
mbaldessari Apr 7, 2023
460cc67
Merge pull request #290 from mbaldessari/modernize-argo-sso
mbaldessari May 22, 2023
bf56440
Add a short line about username/token for the iib role on OCP <= 4.12
mbaldessari May 24, 2023
576c246
Merge pull request #310 from mbaldessari/readme-iib
mbaldessari May 24, 2023
dfc504e
Drop https:// from podman login
mbaldessari May 24, 2023
e01dcda
Merge pull request #311 from mbaldessari/podman-version-
mbaldessari May 24, 2023
1edf4da
Set the mce-subscription-spec annotation
mbaldessari May 25, 2023
240d04b
Merge pull request #312 from mbaldessari/mce-sub
mbaldessari May 25, 2023
5396871
Fix typo in README for iib
mbaldessari May 25, 2023
058d5c6
Simplify the README a bit
mbaldessari May 25, 2023
e20c287
Merge pull request #313 from mbaldessari/iib-fixes
mbaldessari May 25, 2023
0432536
Add support for extraParams being passed down to all applications
mbaldessari May 30, 2023
bb8e98b
Merge pull request #314 from mbaldessari/fix-extraparams
mbaldessari May 30, 2023
48126e7
Add a lookup playbook to figure out IIB numbers
mbaldessari Jun 1, 2023
ff8bea5
Merge pull request #315 from mbaldessari/lookup
mbaldessari Jun 1, 2023
b1070a1
Allow overriding channel and source when installing the patterns-oper…
mbaldessari Jun 1, 2023
35f79c0
Merge pull request #316 from mbaldessari/pattern-index
mbaldessari Jun 2, 2023
8f3c407
Fix small typo in iib instructions
mbaldessari Jun 6, 2023
b6ee6ed
Merge pull request #317 from mbaldessari/fixtypo1
mbaldessari Jun 6, 2023
6116964
Drop a redirect and up retries when pushing the IIB to the internal r…
mbaldessari Jun 7, 2023
6923648
Merge pull request #318 from mbaldessari/drop-iib-log
mbaldessari Jun 7, 2023
6e6f258
Update ESO to v0.8.3
mbaldessari Jun 15, 2023
18d2ac2
Merge pull request #319 from mbaldessari/eso-0.8.3
mbaldessari Jun 15, 2023
2797699
WIP add presync for eso that waits for vault to be up
mbaldessari Jun 15, 2023
ab5532a
Add tests
mbaldessari Jun 15, 2023
d4d3fe1
Fix image and comment
mbaldessari Jun 15, 2023
598bc74
Adding rbac to support the vault sa checking on the vault-0 pod status.
day0hero Jun 26, 2023
64e9dc7
Make Test
day0hero Jun 26, 2023
e296fb0
Merge pull request #321 from hybrid-cloud-patterns/presync
day0hero Jun 26, 2023
1895a73
Revert "Make Test"
mbaldessari Jul 7, 2023
08eee55
Revert "Adding rbac to support the vault sa checking on the vault-0 p…
mbaldessari Jul 7, 2023
c5aa3d2
Revert "Fix image and comment"
mbaldessari Jul 7, 2023
6d4a481
Revert "Add tests"
mbaldessari Jul 7, 2023
3bf245b
Revert "WIP add presync for eso that waits for vault to be up"
mbaldessari Jul 7, 2023
0ae561b
Increase the default retry limit when syncing
mbaldessari Jul 7, 2023
66d456d
Add Changes.md entry
mbaldessari Jul 8, 2023
0c1d103
Merge pull request #323 from mbaldessari/retry-final
mbaldessari Jul 8, 2023
54056c7
Split off global helm variables to a helper definition
mbaldessari Jul 10, 2023
fdee136
Switch ApplicationSets to use the newly-introduced helpers
mbaldessari Jul 10, 2023
4e1f360
Split off valueFiles to _helpers.tbl
mbaldessari Jul 10, 2023
35e7990
Switch applicationsets to use the new helper
mbaldessari Jul 10, 2023
e85c3ab
Drop some older comments
mbaldessari Jul 11, 2023
eb791ba
Merge pull request #324 from mbaldessari/cleanups
mbaldessari Jul 11, 2023
16fab03
Tweak the load secret debug message to be clearer
mbaldessari Jul 13, 2023
5219947
Merge pull request #325 from mbaldessari/fix-found-fileoutput
mbaldessari Jul 13, 2023
6e31814
Check if the KUBECONFIG file is pointing outside of the HOME folder
mbaldessari Jul 13, 2023
4193c08
Include an example SNO cluster pool in the tests
beekhof Jul 14, 2023
ad39f4d
Enforce lowercase names for cluster claims
beekhof Jul 14, 2023
b087e87
Avoid mixing yaml and json in the OCP install-config
beekhof Jul 14, 2023
38d83ec
Update provisioning tests
beekhof Jul 14, 2023
4a0d715
Merge pull request #327 from beekhof/provision-sno
beekhof Jul 14, 2023
fa6865c
Sanely handle cluster pools with no clusters (yet)
beekhof Jul 14, 2023
b071b89
Merge pull request #328 from hybrid-cloud-patterns/standby-pool
mbaldessari Jul 14, 2023
c220a68
Clustergroup Chart.yaml name change
mbaldessari Jul 16, 2023
6e6824d
Merge pull request #330 from mbaldessari/clustergroup-name
mbaldessari Jul 16, 2023
29a5843
Merge pull request #326 from mbaldessari/small-uxfix
day0hero Jul 18, 2023
21c534c
Fix the clusterPoolName in clusterClaims
mbaldessari Jul 19, 2023
e0d7954
Merge pull request #331 from mbaldessari/clusterclaim-fix
mbaldessari Jul 19, 2023
4c05974
Add some comments to make if/else and loops clearer
mbaldessari Jul 24, 2023
36d679a
Merge pull request #332 from mbaldessari/comments
mbaldessari Jul 24, 2023
dd3cdcb
Add some more comments in applications.yaml
mbaldessari Jul 27, 2023
5f33f33
Add a default for options applicationRetryLimit
mbaldessari Jul 27, 2023
91f3ef0
Split out values files to a helper for the acm chart
mbaldessari Jul 27, 2023
17697e5
Fix up tests
mbaldessari Jul 27, 2023
3bd8487
Merge pull request #333 from mbaldessari/cleanup
mbaldessari Jul 27, 2023
669ff92
Fix sa/namespace mixup in vault_spokes_init
stocky37 Jul 28, 2023
d7994cb
Merge pull request #334 from stocky37/fix-vault-unseal-ansible
mbaldessari Jul 30, 2023
5cb41a3
Update local patch
mbaldessari Jul 31, 2023
9d2df97
Update ESO to 0.8.5
mbaldessari Jul 31, 2023
e720991
Tweak ESO UBI images
mbaldessari Jul 31, 2023
15363f6
Merge pull request #335 from mbaldessari/fix-eso
mbaldessari Jul 31, 2023
109efce
Removed previous version of common to convert to subtree from https:/…
day0hero Jul 31, 2023
371002b
Add 'common/' from commit '15363f63ee72034ce5165401386ab1572b08aff0'
day0hero Jul 31, 2023
38838be
make test
day0hero Jul 31, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions common/acm/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{{/*
Default always defined valueFiles to be included when pushing the cluster wide argo application via acm
*/}}
{{- define "acm.app.policies.valuefiles" -}}
- "/values-global.yaml"
- "/values-{{ .name }}.yaml"
- '/values-{{ `{{ (lookup "config.openshift.io/v1" "Infrastructure" "" "cluster").spec.platformSpec.type }}` }}.yaml'
- '/values-{{ `{{ (lookup "config.openshift.io/v1" "Infrastructure" "" "cluster").spec.platformSpec.type }}` }}-{{ `{{ printf "%d.%d" ((semver (lookup "operator.openshift.io/v1" "OpenShiftControllerManager" "" "cluster").status.version).Major) ((semver (lookup "operator.openshift.io/v1" "OpenShiftControllerManager" "" "cluster").status.version).Minor) }}` }}.yaml'
- '/values-{{ `{{ (lookup "config.openshift.io/v1" "Infrastructure" "" "cluster").spec.platformSpec.type }}` }}-{{ .name }}.yaml'
# We cannot use $.Values.global.clusterVersion because that gets resolved to the
# hub's cluster version, whereas we want to include the spoke cluster version
- '/values-{{ `{{ printf "%d.%d" ((semver (lookup "operator.openshift.io/v1" "OpenShiftControllerManager" "" "cluster").status.version).Major) ((semver (lookup "operator.openshift.io/v1" "OpenShiftControllerManager" "" "cluster").status.version).Minor) }}` }}-{{ .name }}.yaml'
{{- end }} {{- /*acm.app.policies.valuefiles */}}
9 changes: 1 addition & 8 deletions common/acm/templates/policies/application-policies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,7 @@ spec:
helm:
ignoreMissingValueFiles: true
valueFiles:
- "/values-global.yaml"
- "/values-{{ .name }}.yaml"
- '/values-{{ `{{ (lookup "config.openshift.io/v1" "Infrastructure" "" "cluster").spec.platformSpec.type }}` }}.yaml'
- '/values-{{ `{{ (lookup "config.openshift.io/v1" "Infrastructure" "" "cluster").spec.platformSpec.type }}` }}-{{ `{{ printf "%d.%d" ((semver (lookup "operator.openshift.io/v1" "OpenShiftControllerManager" "" "cluster").status.version).Major) ((semver (lookup "operator.openshift.io/v1" "OpenShiftControllerManager" "" "cluster").status.version).Minor) }}` }}.yaml'
- '/values-{{ `{{ (lookup "config.openshift.io/v1" "Infrastructure" "" "cluster").spec.platformSpec.type }}` }}-{{ .name }}.yaml'
# We cannot use $.Values.global.clusterVersion because that gets resolved to the
# hub's cluster version, whereas we want to include the spoke cluster version
- '/values-{{ `{{ printf "%d.%d" ((semver (lookup "operator.openshift.io/v1" "OpenShiftControllerManager" "" "cluster").status.version).Major) ((semver (lookup "operator.openshift.io/v1" "OpenShiftControllerManager" "" "cluster").status.version).Minor) }}` }}-{{ .name }}.yaml'
{{- include "acm.app.policies.valuefiles" . | nindent 24 }}
{{- range $valueFile := .extraValueFiles }}
- {{ $valueFile | quote }}
{{- end }}
Expand Down
19 changes: 13 additions & 6 deletions common/acm/templates/provision/_install-config.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ controlPlane:
name: controlPlane
{{- if .controlPlane }}
replicas: {{ default 3 .controlPlane.count }}
platform: {{- .controlPlane.platform | toPrettyJson }}
{{- if .controlPlane.platform }}
platform:
{{- toYaml .controlPlane.platform | nindent 4 }}
{{- end }}
{{- else }}
replicas: 3
platform:
Expand All @@ -36,8 +39,11 @@ compute:
architecture: amd64
name: 'worker'
{{- if .workers }}
replicas: {{ default 3 .workers.count }}
platform: {{- .workers.platform | toPrettyJson }}
replicas: {{ default 0 .workers.count }}
{{- if .workers.platform }}
platform:
{{- toYaml .workers.platform | nindent 4 }}
{{- end }}
{{- else }}
replicas: 3
platform:
Expand All @@ -50,10 +56,11 @@ networking:
hostPrefix: 23
machineNetwork:
- cidr: 10.0.0.0/16
networkType: OpenShiftSDN
networkType: OVNKubernetes
serviceNetwork:
- 172.30.0.0/16
platform: {{ .platform | toPrettyJson }}
platform:
{{- toYaml .platform | nindent 2 }}
pullSecret: "" # skip, hive will inject based on it's secrets
sshKey: "" # skip, hive will inject based on it's secrets
{{- end -}}
{{- end -}}
17 changes: 11 additions & 6 deletions common/acm/templates/provision/clusterpool.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ spec:

{{- $cloud := "None" }}
{{- $region := "None" }}
{{- $numClusters := 0 }}

{{- if .platform.aws }}
{{- $cloud = "aws" }}
Expand All @@ -28,6 +29,10 @@ spec:
{{- $region = .platform.azure.region }}
{{- end }}

{{- if .clusters }}
{{- $numClusters = len .clusters }}
{{- end }}

apiVersion: hive.openshift.io/v1
kind: ClusterPool
metadata:
Expand All @@ -44,14 +49,14 @@ spec:
{{- if .size }}
size: {{ .size }}
{{- else }}
size: {{ len .clusters }}
size: {{ $numClusters }}
{{- end }}
runningCount: {{ len .clusters }}
runningCount: {{ $numClusters }}
baseDomain: {{ .baseDomain }}
installConfigSecretTemplateRef:
name: {{ $poolName }}-install-config
imageSetRef:
name: img{{ .openshiftVersion }}-x86-64-appsub
name: img{{ .openshiftVersion }}-multi-appsub
pullSecretRef:
name: {{ $poolName }}-pull-secret
skipMachinePools: true # Disable MachinePool as using custom install-config
Expand All @@ -65,13 +70,13 @@ spec:
apiVersion: hive.openshift.io/v1
kind: ClusterClaim
metadata:
name: '{{ . }}-{{ $group.name }}'
name: '{{ lower . }}-{{ lower $group.name }}'
annotations:
argocd.argoproj.io/sync-wave: "20"
argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true
cluster.open-cluster-management.io/createmanagedcluster: "true"
labels:
clusterClaimName: {{ . }}-{{ $group.name }}
clusterClaimName: {{ lower . }}-{{ lower $group.name }}
{{- if (not $group.acmlabels) }}
clusterGroup: {{ $group.name }}
{{- else if eq (len $group.acmlabels) 0 }}
Expand All @@ -82,7 +87,7 @@ metadata:
{{- end }}
{{- end }}
spec:
clusterPoolName: {{ $pool.name }}
clusterPoolName: {{ $poolName }}
---
{{- end }}{{- /* range .range clusters */}}
{{- end }}{{- /* range .clusterPools */}}
Expand Down
3 changes: 2 additions & 1 deletion common/acm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ global:
pattern: none
repoURL: none
targetRevision: main

options:
applicationRetryLimit: 20

clusterGroup:
subscriptions:
Expand Down
5 changes: 4 additions & 1 deletion common/ansible/roles/vault_utils/tasks/push_secrets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,12 @@
register: encrypted
failed_when: (encrypted.rc not in [0, 1])

# When HOME is set we replace it with '~' in this debug message
# because when run from inside the container the HOME is /pattern-home
# which is confusing for users
- name: Is found values secret file encrypted
ansible.builtin.debug:
msg: "Using {{ found_file }} to parse secrets"
msg: "Using {{ (lookup('env', 'HOME') | length > 0) | ternary(found_file | regex_replace('^' + lookup('env', 'HOME'), '~'), found_file) }} to parse secrets"

- name: Set encryption bool fact
no_log: true
Expand Down
4 changes: 2 additions & 2 deletions common/ansible/roles/vault_utils/tasks/vault_spokes_init.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,8 @@
pod: "{{ vault_pod }}"
command: >
vault write auth/"{{ item.value['vault_path'] }}"/role/"{{ item.value['vault_path'] }}"-role
bound_service_account_names="{{ external_secrets_ns }}"
bound_service_account_namespaces="{{ external_secrets_sa }}"
bound_service_account_names="{{ external_secrets_sa }}"
bound_service_account_namespaces="{{ external_secrets_ns }}"
policies="default,{{ vault_global_policy }}-secret,{{ item.value['vault_path'] }}-secret" ttl="{{ vault_spoke_ttl }}"
loop: "{{ clusters_info | dict2items }}"
when:
Expand Down
2 changes: 1 addition & 1 deletion common/clustergroup/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ apiVersion: v2
description: A Helm chart to create per-clustergroup ArgoCD applications and any required namespaces or subscriptions
keywords:
- pattern
name: pattern-clustergroup
name: clustergroup
version: 0.0.1
42 changes: 42 additions & 0 deletions common/clustergroup/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{{/*
Default always defined top-level variables for helm charts
*/}}
{{- define "clustergroup.app.globalvalues.helmparameters" -}}
- name: global.repoURL
value: $ARGOCD_APP_SOURCE_REPO_URL
- name: global.targetRevision
value: $ARGOCD_APP_SOURCE_TARGET_REVISION
- name: global.namespace
value: $ARGOCD_APP_NAMESPACE
- name: global.pattern
value: {{ $.Values.global.pattern }}
- name: global.clusterDomain
value: {{ $.Values.global.clusterDomain }}
- name: global.clusterVersion
value: "{{ $.Values.global.clusterVersion }}"
- name: global.clusterPlatform
value: "{{ $.Values.global.clusterPlatform }}"
- name: global.hubClusterDomain
value: {{ $.Values.global.hubClusterDomain }}
- name: global.localClusterDomain
value: {{ coalesce $.Values.global.localClusterDomain $.Values.global.hubClusterDomain }}
{{- end }} {{/* clustergroup.globalvaluesparameters */}}


{{/*
Default always defined valueFiles to be included in Applications
*/}}
{{- define "clustergroup.app.globalvalues.valuefiles" -}}
- "/values-global.yaml"
- "/values-{{ $.Values.clusterGroup.name }}.yaml"
{{- if $.Values.global.clusterPlatform }}
- "/values-{{ $.Values.global.clusterPlatform }}.yaml"
{{- if $.Values.global.clusterVersion }}
- "/values-{{ $.Values.global.clusterPlatform }}-{{ $.Values.global.clusterVersion }}.yaml"
{{- end }}
- "/values-{{ $.Values.global.clusterPlatform }}-{{ $.Values.clusterGroup.name }}.yaml"
{{- end }}
{{- if $.Values.global.clusterVersion }}
- "/values-{{ $.Values.global.clusterVersion }}-{{ $.Values.clusterGroup.name }}.yaml"
{{- end }}
{{- end }} {{/* clustergroup.app.globalvalues.valuefiles */}}
74 changes: 15 additions & 59 deletions common/clustergroup/templates/plumbing/applications.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,7 @@ spec:
helm:
ignoreMissingValueFiles: true
valueFiles:
- "values.yaml"
{{- if $.Values.global.clusterVersion }}
- "/values-{{ $.Values.global.clusterVersion }}-{{ $.Values.clusterGroup.name }}.yaml"
{{- end }}
{{- include "clustergroup.app.globalvalues.valuefiles" $ | nindent 12 }}
{{- range .extraValueFiles }}
- {{ . | quote }}
{{- end }}
Expand All @@ -69,24 +66,13 @@ spec:
{{ `{{ values }}` }}
{{- end }}
parameters:
- name: global.clusterDomain
value: {{ $.Values.global.clusterDomain }}
- name: global.clusterVersion
value: "{{ $.Values.global.clusterVersion }}"
- name: global.clusterPlatform
value: "{{ $.Values.global.clusterPlatform }}"
- name: global.hubClusterDomain
value: {{ $.Values.global.hubClusterDomain }}
- name: global.localClusterDomain
value: {{ coalesce $.Values.global.localClusterDomain $.Values.global.hubClusterDomain }}
{{- include "clustergroup.app.globalvalues.helmparameters" $ | nindent 12 }}
- name: global.repoURL
value: {{ $.Values.global.repoURL }}
- name: global.targetRevision
value: {{ $.Values.global.targetRevision }}
- name: global.namespace
value: {{ $.Values.global.namespace }}
- name: global.pattern
value: {{ $.Values.global.pattern }}
- name: clusterGroup.name
value: {{ .Values.clusterGroup.name }}
{{- range .extraHubClusterDomainFields }}
Expand Down Expand Up @@ -148,48 +134,19 @@ spec:
chart: {{ .chart }}
{{- else }}
path: {{ .path }}
{{- end }}
{{- end }}{{- /* if .chart */}}
{{- if .plugin }}
plugin: {{ .plugin | toPrettyJson }}
{{- else if not .kustomize }}
helm:
ignoreMissingValueFiles: true
valueFiles:
- "/values-global.yaml"
- "/values-{{ $.Values.clusterGroup.name }}.yaml"
{{- if $.Values.global.clusterPlatform }}
- "/values-{{ $.Values.global.clusterPlatform }}.yaml"
{{- if $.Values.global.clusterVersion }}
- "/values-{{ $.Values.global.clusterPlatform }}-{{ $.Values.global.clusterVersion }}.yaml"
{{- end }}
- "/values-{{ $.Values.global.clusterPlatform }}-{{ $.Values.clusterGroup.name }}.yaml"
{{- end }}
{{- if $.Values.global.clusterVersion }}
- "/values-{{ $.Values.global.clusterVersion }}-{{ $.Values.clusterGroup.name }}.yaml"
{{- end }}
{{- include "clustergroup.app.globalvalues.valuefiles" $ | nindent 6 }}
{{- range $valueFile := .extraValueFiles }}
- {{ $valueFile | quote }}
{{- end }}
# Watch the progress of https://issues.redhat.com/browse/GITOPS-891 and update accordingly
parameters:
- name: global.repoURL
value: $ARGOCD_APP_SOURCE_REPO_URL
- name: global.targetRevision
value: $ARGOCD_APP_SOURCE_TARGET_REVISION
- name: global.namespace
value: $ARGOCD_APP_NAMESPACE
- name: global.pattern
value: {{ $.Values.global.pattern }}
- name: global.clusterDomain
value: {{ $.Values.global.clusterDomain }}
- name: global.clusterVersion
value: "{{ $.Values.global.clusterVersion }}"
- name: global.clusterPlatform
value: "{{ $.Values.global.clusterPlatform }}"
- name: global.hubClusterDomain
value: {{ $.Values.global.hubClusterDomain }}
- name: global.localClusterDomain
value: {{ coalesce $.Values.global.localClusterDomain $.Values.global.hubClusterDomain }}
{{- include "clustergroup.app.globalvalues.helmparameters" $ | nindent 8 }}
{{- range .extraHubClusterDomainFields }}
- name: {{ . }}
value: {{ $.Values.global.hubClusterDomain }}
Expand Down Expand Up @@ -221,18 +178,18 @@ spec:
{{- range .overrides }}
- name: {{ .name }}
value: {{ .value | quote }}
{{- if .forceString }}
{{- if .forceString }}
forceString: true
{{- end }}
{{- end }}
{{- end }}
{{- end }}{{- /* range .overrides */}}
{{- if .fileParameters }}
fileParameters:
{{- range .fileParameters }}
- name: {{ .name }}
path: {{ .path }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}{{- /* range .fileParameters */}}
{{- end }}{{- /* if .fileParameters */}}
{{- end }}{{- /* if .plugin */}}
{{- if .ignoreDifferences }}
ignoreDifferences: {{ .ignoreDifferences | toPrettyJson }}
{{- end }}
Expand All @@ -243,9 +200,8 @@ spec:
automated: {}
retry:
limit: {{ default 20 $.Values.global.applicationRetryLimit }}
# selfHeal: true
{{- end }}
{{- end }}{{- /* .syncPolicy */}}
---
{{- end }}
{{- end }}
{{- end }}
{{- end }}{{- /* if or (.generators) (.generatorFile) (.useGeneratorValues) (.destinationServer) (.destinationNamespace) */}}
{{- end }}{{- /* range .Values.clusterGroup.applications */}}
{{- end }}{{- /* if not (eq .Values.enabled "core") */}}
11 changes: 8 additions & 3 deletions common/examples/values-example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,16 @@ clusterGroup:
name: aws-ap
openshiftVersion: 4.10.18
baseDomain: blueprints.rhecoeng.com
controlPlane:
count: 1
platform:
aws:
type: m5.xlarge
workers:
count: 0
platform:
aws:
region: ap-southeast-2
clusters:
- one
exampleAzurePool:
name: azure-us
openshiftVersion: 4.10.18
Expand All @@ -118,7 +123,7 @@ clusterGroup:
baseDomainResourceGroupName: dojo-dns-zones
region: eastus
clusters:
- two
- Two
- three
acmlabels:
- name: clusterGroup
Expand Down
2 changes: 1 addition & 1 deletion common/golang-external-secrets/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ name: golang-external-secrets
version: 0.0.1
dependencies:
- name: external-secrets
version: "0.8.3"
version: "0.8.5"
repository: "https://charts.external-secrets.io"
#"https://external-secrets.github.io/kubernetes-external-secrets"
Binary file not shown.
Binary file not shown.
Loading
Loading