allenporter / flux-local

flux-local is a set of tools and libraries for managing a local flux gitops repository focused on validation steps to help improve quality of commits, PRs, and general local testing.
https://allenporter.github.io/flux-local/
Apache License 2.0
155 stars 22 forks source link

Fix issue with collecting OCIRepositories during diff #772

Closed allenporter closed 3 months ago

allenporter commented 3 months ago

Adding additional repository examples, but they don't reproduce the issue.

github-actions[bot] commented 3 months ago
--- tests/testdata/cluster7/flux/charts Kustomization: flux-system/charts OCIRepository: flux-system/app-template

+++ tests/testdata/cluster7/flux/charts Kustomization: flux-system/charts OCIRepository: flux-system/app-template

@@ -0,0 +1,18 @@

+---
+apiVersion: source.toolkit.fluxcd.io/v1beta2
+kind: OCIRepository
+metadata:
+  labels:
+    kustomize.toolkit.fluxcd.io/name: charts
+    kustomize.toolkit.fluxcd.io/namespace: flux-system
+  name: app-template
+  namespace: flux-system
+spec:
+  interval: 12h
+  layerSelector:
+    mediaType: application/vnd.cncf.helm.chart.content.v1.tar+gzip
+    operation: copy
+  ref:
+    tag: 3.3.2
+  url: oci://ghcr.io/bjw-s/helm/app-template
+
--- tests/testdata/cluster7/flux/apps Kustomization: flux-system/apps HelmRelease: flux-system/cloudflared

+++ tests/testdata/cluster7/flux/apps Kustomization: flux-system/apps HelmRelease: flux-system/cloudflared

@@ -0,0 +1,23 @@

+---
+apiVersion: helm.toolkit.fluxcd.io/v2
+kind: HelmRelease
+metadata:
+  labels:
+    kustomize.toolkit.fluxcd.io/name: apps
+    kustomize.toolkit.fluxcd.io/namespace: flux-system
+  name: cloudflared
+  namespace: flux-system
+spec:
+  chartRef:
+    kind: OCIRepository
+    name: app-template
+    namespace: flux-system
+  install:
+    remediation:
+      retries: 3
+  interval: 60m
+  upgrade:
+    cleanupOnFail: true
+    remediation:
+      retries: 3
+
github-actions[bot] commented 3 months ago
--- tests/testdata/cluster7/flux/charts Kustomization: flux-system/charts OCIRepository: flux-system/app-template

+++ tests/testdata/cluster7/flux/charts Kustomization: flux-system/charts OCIRepository: flux-system/app-template

@@ -0,0 +1,18 @@

+---
+apiVersion: source.toolkit.fluxcd.io/v1beta2
+kind: OCIRepository
+metadata:
+  labels:
+    kustomize.toolkit.fluxcd.io/name: charts
+    kustomize.toolkit.fluxcd.io/namespace: flux-system
+  name: app-template
+  namespace: flux-system
+spec:
+  interval: 12h
+  layerSelector:
+    mediaType: application/vnd.cncf.helm.chart.content.v1.tar+gzip
+    operation: copy
+  ref:
+    tag: 3.3.2
+  url: oci://ghcr.io/bjw-s/helm/app-template
+
--- tests/testdata/cluster7/flux/apps Kustomization: flux-system/apps HelmRelease: flux-system/cloudflared

+++ tests/testdata/cluster7/flux/apps Kustomization: flux-system/apps HelmRelease: flux-system/cloudflared

@@ -0,0 +1,23 @@

+---
+apiVersion: helm.toolkit.fluxcd.io/v2
+kind: HelmRelease
+metadata:
+  labels:
+    kustomize.toolkit.fluxcd.io/name: apps
+    kustomize.toolkit.fluxcd.io/namespace: flux-system
+  name: cloudflared
+  namespace: flux-system
+spec:
+  chartRef:
+    kind: OCIRepository
+    name: app-template
+    namespace: flux-system
+  install:
+    remediation:
+      retries: 3
+  interval: 60m
+  upgrade:
+    cleanupOnFail: true
+    remediation:
+      retries: 3
+
codecov-commenter commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 93.22%. Comparing base (18bb03c) to head (a898dab).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #772 +/- ## ======================================= Coverage 93.21% 93.22% ======================================= Files 20 20 Lines 2227 2229 +2 ======================================= + Hits 2076 2078 +2 Misses 151 151 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.