Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
16 changes: 16 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,21 @@ jobs:
- name: Every platform CR the catalog declares would be admitted
run: ./scripts/check-platform-crs.py --list

catalog-revision:
name: a catalog source reads its revision, never pins one
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- name: Install pyyaml
run: pip install pyyaml
# cluster-bootstrap stamps gitops/repo-branch beside gitops/repo-url. Only
# app-of-apps ever read it, so a cluster bootstrapped against any other
# revision ran app-of-apps there and every child Application on main — two
# revisions of the catalog at once, both reporting Synced and Healthy.
- name: Catalog sources read gitops/repo-branch
run: ./scripts/check-catalog-revision.py --list

kyverno:
name: Kyverno policy tests
runs-on: ubuntu-latest
Expand Down Expand Up @@ -610,6 +625,7 @@ jobs:
dashboards,
serviceaccount-bindings,
platform-crs,
catalog-revision,
kyverno,
fork-safety,
helm-render,
Expand Down
4 changes: 2 additions & 2 deletions applicationsets/addons-agent-operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ spec:
project: platform
sources:
# A published chart at a version, not a branch. Rendering from
# `targetRevision: main` meant there was no release boundary at all
# `targetRevision: '{{ index .metadata.annotations "gitops/repo-branch" }}'` meant there was no release boundary at all
# between a merge upstream and every cluster this ApplicationSet syncs —
# a chart change reached production the moment it landed, and a chart
# could ship a CRD field the operator image it names does not
Expand Down Expand Up @@ -90,7 +90,7 @@ spec:
- $values/addons/ai-platform/operator/values.yaml
- $values/addons/ai-platform/operator/values-{{ index .metadata.labels "environment" }}.yaml
- repoURL: '{{ index .metadata.annotations "gitops/repo-url" }}'
targetRevision: main
targetRevision: '{{ index .metadata.annotations "gitops/repo-branch" }}'
ref: values
destination:
server: https://kubernetes.default.svc
Expand Down
2 changes: 1 addition & 1 deletion applicationsets/addons-ai-platform-kustomize.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ spec:
project: platform
source:
repoURL: '{{ index .metadata.annotations "gitops/repo-url" }}'
targetRevision: main
targetRevision: '{{ index .metadata.annotations "gitops/repo-branch" }}'
path: '{{ .path }}/overlays/{{ index .metadata.labels "environment" }}'
destination:
server: https://kubernetes.default.svc
Expand Down
2 changes: 1 addition & 1 deletion applicationsets/addons-ai-platform.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ spec:
- $values/{{ .path }}/values.yaml
- $values/{{ .path }}/values-{{ index .metadata.labels "environment" }}.yaml
- repoURL: '{{ index .metadata.annotations "gitops/repo-url" }}'
targetRevision: main
targetRevision: '{{ index .metadata.annotations "gitops/repo-branch" }}'
ref: values
destination:
server: https://kubernetes.default.svc
Expand Down
2 changes: 1 addition & 1 deletion applicationsets/addons-argo-platform.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ spec:
- $values/{{ .path }}/values.yaml
- $values/{{ .path }}/values-{{ index .metadata.labels "environment" }}.yaml
- repoURL: '{{ index .metadata.annotations "gitops/repo-url" }}'
targetRevision: main
targetRevision: '{{ index .metadata.annotations "gitops/repo-branch" }}'
ref: values
destination:
server: https://kubernetes.default.svc
Expand Down
2 changes: 1 addition & 1 deletion applicationsets/addons-argo-workflows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ spec:
- $values/addons/argo-platform/argo-workflows/values.yaml
- $values/addons/argo-platform/argo-workflows/values-{{ index .metadata.labels "environment" }}.yaml
- repoURL: '{{ index .metadata.annotations "gitops/repo-url" }}'
targetRevision: main
targetRevision: '{{ index .metadata.annotations "gitops/repo-branch" }}'
ref: values
destination:
server: https://kubernetes.default.svc
Expand Down
2 changes: 1 addition & 1 deletion applicationsets/addons-bootstrap-kustomize.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ spec:
project: platform
source:
repoURL: '{{ index .metadata.annotations "gitops/repo-url" }}'
targetRevision: main
targetRevision: '{{ index .metadata.annotations "gitops/repo-branch" }}'
path: '{{ .path }}/overlays/{{ index .metadata.labels "environment" }}'
destination:
server: https://kubernetes.default.svc
Expand Down
2 changes: 1 addition & 1 deletion applicationsets/addons-bootstrap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ spec:
- $values/{{ .path }}/values.yaml
- $values/{{ .path }}/values-{{ index .metadata.labels "environment" }}.yaml
- repoURL: '{{ index .metadata.annotations "gitops/repo-url" }}'
targetRevision: main
targetRevision: '{{ index .metadata.annotations "gitops/repo-branch" }}'
ref: values
destination:
server: https://kubernetes.default.svc
Expand Down
2 changes: 1 addition & 1 deletion applicationsets/addons-external-dns.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ spec:
- $values/addons/networking/external-dns/values.yaml
- $values/addons/networking/external-dns/values-{{ index .metadata.labels "environment" }}.yaml
- repoURL: '{{ index .metadata.annotations "gitops/repo-url" }}'
targetRevision: main
targetRevision: '{{ index .metadata.annotations "gitops/repo-branch" }}'
ref: values
destination:
server: https://kubernetes.default.svc
Expand Down
2 changes: 1 addition & 1 deletion applicationsets/addons-karpenter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ spec:
- $values/addons/operations/karpenter/values.yaml
- $values/addons/operations/karpenter/values-{{ index .metadata.labels "environment" }}.yaml
- repoURL: '{{ index .metadata.annotations "gitops/repo-url" }}'
targetRevision: main
targetRevision: '{{ index .metadata.annotations "gitops/repo-branch" }}'
ref: values
destination:
server: https://kubernetes.default.svc
Expand Down
2 changes: 1 addition & 1 deletion applicationsets/addons-loki.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ spec:
- $values/addons/observability/loki/values.yaml
- $values/addons/observability/loki/values-{{ index .metadata.labels "environment" }}.yaml
- repoURL: '{{ index .metadata.annotations "gitops/repo-url" }}'
targetRevision: main
targetRevision: '{{ index .metadata.annotations "gitops/repo-branch" }}'
ref: values
destination:
server: https://kubernetes.default.svc
Expand Down
2 changes: 1 addition & 1 deletion applicationsets/addons-networking.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ spec:
- $values/{{ .path }}/values.yaml
- $values/{{ .path }}/values-{{ index .metadata.labels "environment" }}.yaml
- repoURL: '{{ index .metadata.annotations "gitops/repo-url" }}'
targetRevision: main
targetRevision: '{{ index .metadata.annotations "gitops/repo-branch" }}'
ref: values
destination:
server: https://kubernetes.default.svc
Expand Down
2 changes: 1 addition & 1 deletion applicationsets/addons-observability.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ spec:
- $values/{{ .path }}/values.yaml
- $values/{{ .path }}/values-{{ index .metadata.labels "environment" }}.yaml
- repoURL: '{{ index .metadata.annotations "gitops/repo-url" }}'
targetRevision: main
targetRevision: '{{ index .metadata.annotations "gitops/repo-branch" }}'
ref: values
destination:
server: https://kubernetes.default.svc
Expand Down
2 changes: 1 addition & 1 deletion applicationsets/addons-opencost.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ spec:
region: "{{ index .metadata.labels \"region\" }}"
host: "aps-workspaces.{{ index .metadata.labels \"region\" }}.amazonaws.com"
- repoURL: '{{ index .metadata.annotations "gitops/repo-url" }}'
targetRevision: main
targetRevision: '{{ index .metadata.annotations "gitops/repo-branch" }}'
ref: values
destination:
server: https://kubernetes.default.svc
Expand Down
2 changes: 1 addition & 1 deletion applicationsets/addons-operations-helm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ spec:
- $values/{{ .path }}/values.yaml
- $values/{{ .path }}/values-{{ index .metadata.labels "environment" }}.yaml
- repoURL: '{{ index .metadata.annotations "gitops/repo-url" }}'
targetRevision: main
targetRevision: '{{ index .metadata.annotations "gitops/repo-branch" }}'
ref: values
destination:
server: https://kubernetes.default.svc
Expand Down
2 changes: 1 addition & 1 deletion applicationsets/addons-operations-kustomize.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ spec:
project: platform
source:
repoURL: '{{ index .metadata.annotations "gitops/repo-url" }}'
targetRevision: main
targetRevision: '{{ index .metadata.annotations "gitops/repo-branch" }}'
path: '{{ .path }}/overlays/{{ index .metadata.labels "environment" }}'
# The overlay renders this environment's primary-cluster identity; patch
# the EC2NodeClass per cluster from the cluster_name label so co-located
Expand Down
2 changes: 1 addition & 1 deletion applicationsets/addons-otel-agent.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ spec:
- $values/addons/observability/otel-agent/values.yaml
- $values/addons/observability/otel-agent/values-{{ index .metadata.labels "environment" }}.yaml
- repoURL: '{{ index .metadata.annotations "gitops/repo-url" }}'
targetRevision: main
targetRevision: '{{ index .metadata.annotations "gitops/repo-branch" }}'
ref: values
destination:
server: https://kubernetes.default.svc
Expand Down
2 changes: 1 addition & 1 deletion applicationsets/addons-otel-gateway-floor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ spec:
- $values/addons/observability/otel-gateway-floor/values.yaml
- $values/addons/observability/otel-gateway-floor/values-{{ index .metadata.labels "environment" }}.yaml
- repoURL: '{{ index .metadata.annotations "gitops/repo-url" }}'
targetRevision: main
targetRevision: '{{ index .metadata.annotations "gitops/repo-branch" }}'
ref: values
destination:
server: https://kubernetes.default.svc
Expand Down
2 changes: 1 addition & 1 deletion applicationsets/addons-otel-gateway.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ spec:
- $values/addons/observability/otel-gateway/values.yaml
- $values/addons/observability/otel-gateway/values-{{ index .metadata.labels "environment" }}.yaml
- repoURL: '{{ index .metadata.annotations "gitops/repo-url" }}'
targetRevision: main
targetRevision: '{{ index .metadata.annotations "gitops/repo-branch" }}'
ref: values
destination:
server: https://kubernetes.default.svc
Expand Down
2 changes: 1 addition & 1 deletion applicationsets/addons-security.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ spec:
- $values/{{ .path }}/values.yaml
- $values/{{ .path }}/values-{{ index .metadata.labels "environment" }}.yaml
- repoURL: '{{ index .metadata.annotations "gitops/repo-url" }}'
targetRevision: main
targetRevision: '{{ index .metadata.annotations "gitops/repo-branch" }}'
ref: values
destination:
server: https://kubernetes.default.svc
Expand Down
2 changes: 1 addition & 1 deletion applicationsets/addons-tempo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ spec:
- $values/addons/observability/tempo/values.yaml
- $values/addons/observability/tempo/values-{{ index .metadata.labels "environment" }}.yaml
- repoURL: '{{ index .metadata.annotations "gitops/repo-url" }}'
targetRevision: main
targetRevision: '{{ index .metadata.annotations "gitops/repo-branch" }}'
ref: values
destination:
server: https://kubernetes.default.svc
Expand Down
2 changes: 1 addition & 1 deletion applicationsets/addons-velero.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ spec:
- $values/addons/operations/velero/values.yaml
- $values/addons/operations/velero/values-{{ index .metadata.labels "environment" }}.yaml
- repoURL: '{{ index .metadata.annotations "gitops/repo-url" }}'
targetRevision: main
targetRevision: '{{ index .metadata.annotations "gitops/repo-branch" }}'
ref: values
destination:
server: https://kubernetes.default.svc
Expand Down
2 changes: 1 addition & 1 deletion applicationsets/agent-platform.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ spec:
project: platform
source:
repoURL: '{{ index .metadata.annotations "gitops/repo-url" }}'
targetRevision: main
targetRevision: '{{ index .metadata.annotations "gitops/repo-branch" }}'
path: '{{ .path }}/overlays/{{ index .metadata.labels "environment" }}'
destination:
server: https://kubernetes.default.svc
Expand Down
2 changes: 1 addition & 1 deletion applicationsets/dashboards.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ spec:
project: platform
source:
repoURL: '{{ index .metadata.annotations "gitops/repo-url" }}'
targetRevision: main
targetRevision: '{{ index .metadata.annotations "gitops/repo-branch" }}'
path: '{{ .path }}/base'
# The Grafana CR's workspace URL is per-cluster and can't be templated
# from a Secret, so inject it here from the monitoring/grafana-url
Expand Down
2 changes: 1 addition & 1 deletion applicationsets/kyverno-policies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ spec:
project: platform
source:
repoURL: '{{ index .metadata.annotations "gitops/repo-url" }}'
targetRevision: main
targetRevision: '{{ index .metadata.annotations "gitops/repo-branch" }}'
path: '{{ .path }}/overlays/{{ index .metadata.labels "environment" }}'
destination:
server: https://kubernetes.default.svc
Expand Down
4 changes: 2 additions & 2 deletions applicationsets/opt-in/apps-tenants.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ spec:
project: '{{ .app }}'
sources:
- repoURL: '{{ .repoURL }}'
targetRevision: main
targetRevision: '{{ index .metadata.annotations "gitops/repo-branch" }}'
path: '{{ .path }}'
helm:
# Tenant charts default grafanaDashboard.enabled true, which renders a
Expand All @@ -81,7 +81,7 @@ spec:
- $values/{{ .path }}/values.yaml
- $values/{{ .path }}/values-{{ index .metadata.labels "environment" }}.yaml
- repoURL: '{{ .repoURL }}'
targetRevision: main
targetRevision: '{{ index .metadata.annotations "gitops/repo-branch" }}'
ref: values
destination:
server: https://kubernetes.default.svc
Expand Down
2 changes: 1 addition & 1 deletion applicationsets/opt-in/clusters-appset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ spec:
project: platform
source:
repoURL: git@github.com:nanohype/clusters.git
targetRevision: main
targetRevision: '{{ index .metadata.annotations "gitops/repo-branch" }}'
path: '{{ .path.path }}'
directory:
include: '{{ .path.filename }}'
Expand Down
2 changes: 1 addition & 1 deletion applicationsets/portal-tenants.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ spec:
project: platform
source:
repoURL: '{{ index .metadata.annotations "gitops/tenants-repo-url" }}'
targetRevision: main
targetRevision: '{{ index .metadata.annotations "gitops/repo-branch" }}'
path: '{{ .path.path }}'
directory:
recurse: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@ metadata:
region: us-west-2
annotations:
gitops/repo-url: https://github.com/example/gitops
gitops/repo-branch: main
type: Opaque
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@ metadata:
region: us-west-2
annotations:
gitops/repo-url: https://github.com/example/gitops
gitops/repo-branch: main
argo-workflows/artifact-bucket: alpha-111111111111-us-west-2-argo-workflows
type: Opaque
1 change: 1 addition & 0 deletions applicationsets/rendertest/testdata/cluster-adopt.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ metadata:
network_mode: adopt
annotations:
gitops/repo-url: https://github.com/example/gitops
gitops/repo-branch: main
network/private-subnet-ids: subnet-priv-a,subnet-priv-b,subnet-priv-c
network/public-subnet-ids: subnet-pub-a,subnet-pub-b,subnet-pub-c
type: Opaque
1 change: 1 addition & 0 deletions applicationsets/rendertest/testdata/cluster-create.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ metadata:
network_mode: create
annotations:
gitops/repo-url: https://github.com/example/gitops
gitops/repo-branch: main
type: Opaque
1 change: 1 addition & 0 deletions applicationsets/rendertest/testdata/cluster-nolabel.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ metadata:
cluster_name: charlie
annotations:
gitops/repo-url: https://github.com/example/gitops
gitops/repo-branch: main
type: Opaque
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ metadata:
region: us-west-2
annotations:
gitops/repo-url: https://github.com/example/gitops
gitops/repo-branch: main
type: Opaque
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ metadata:
region: us-west-2
annotations:
gitops/repo-url: https://github.com/example/gitops
gitops/repo-branch: main
observability/loki-bucket: alpha-111111111111-us-west-2-loki
observability/tempo-bucket: alpha-111111111111-us-west-2-tempo
type: Opaque
2 changes: 1 addition & 1 deletion applicationsets/secret-stores.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ spec:
project: platform
source:
repoURL: '{{ index .metadata.annotations "gitops/repo-url" }}'
targetRevision: main
targetRevision: '{{ index .metadata.annotations "gitops/repo-branch" }}'
path: '{{ .path }}'
# The AMP endpoints Secrets Manager secret is cluster-scoped so co-located
# sibling clusters don't collide; patch remoteRef.key per cluster. The
Expand Down
Loading