Skip to content

Commit d77b8bd

Browse files
committed
chore: set defaults for argocd-understack to be false
Rather than defaulting to everything enabled by default and surprising people and having a service enabled without proper configs, default everything to false and require users to enable each thing as they go.
1 parent 8e703d4 commit d77b8bd

3 files changed

Lines changed: 158 additions & 136 deletions

File tree

.github/workflows/helm-chart-test.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,28 @@ jobs:
5353
done
5454
fi
5555
56+
- name: Validate argocd-understack default enabled flags
57+
if: steps.list-changed.outputs.argocd-understack == 'true'
58+
run: |
59+
file=charts/argocd-understack/values.yaml
60+
violations=$(awk '
61+
/^[^[:space:]#][^:]*:[[:space:]]*$/ {
62+
in_scope = ($0 ~ /^(global|site):[[:space:]]*$/)
63+
}
64+
in_scope && /^[[:space:]]+# @default -- true([[:space:]]*#.*)?$/ {
65+
print NR ":" $0
66+
}
67+
in_scope && /^[[:space:]]+enabled:[[:space:]]*true([[:space:]]*#.*)?$/ {
68+
print NR ":" $0
69+
}
70+
' "$file")
71+
72+
if [[ -n "$violations" ]]; then
73+
echo "argocd-understack defaults under global/site must be false in $file"
74+
echo "$violations"
75+
exit 1
76+
fi
77+
5678
- name: Run chart-testing (lint)
5779
if: steps.list-changed.outputs.changed == 'true'
5880
run: ct lint --chart-dirs charts --target-branch ${{ github.event.repository.default_branch }} --check-version-increment=false

charts/argocd-understack/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,8 @@ helm install argocd-understack oci://ghcr.io/rackerlabs/understack/argocd-unders
109109
| `understack_url` | UnderStack repository URL | `https://github.com/rackerlabs/understack.git` |
110110
| `understack_ref` | UnderStack git reference | `HEAD` |
111111
| `deploy_ref` | Deployment repo git reference | `HEAD` |
112-
| `global.enabled` | Enable global cluster components | `true` |
113-
| `site.enabled` | Enable site cluster components | `true` |
112+
| `global.enabled` | Enable global cluster components | `false` |
113+
| `site.enabled` | Enable site cluster components | `false` |
114114

115115
### Example Values Files
116116

0 commit comments

Comments
 (0)