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

Fix build in postbuild substitution #734

Merged
merged 3 commits into from
Jun 29, 2024
Merged

Fix build in postbuild substitution #734

merged 3 commits into from
Jun 29, 2024

Conversation

allenporter
Copy link
Owner

Fixes #707

Copy link
Contributor

--- tests/testdata/cluster/clusters/prod Kustomization: flux-system/flux-system ConfigMap: flux-system/cluster-config

+++ tests/testdata/cluster/clusters/prod Kustomization: flux-system/flux-system ConfigMap: flux-system/cluster-config

@@ -1,9 +1,11 @@

 ---
 apiVersion: v1
 data:
+  SECRET_DOMAIN: example.com
+  SECRET_DOMAIN2: other.com
   cluster_label: example-value
 kind: ConfigMap
 metadata:
   labels:
     kustomize.toolkit.fluxcd.io/name: flux-system
     kustomize.toolkit.fluxcd.io/namespace: flux-system
--- tests/testdata/cluster/apps/prod Kustomization: flux-system/apps Certificate: flux-system/example-com-staging

+++ tests/testdata/cluster/apps/prod Kustomization: flux-system/apps Certificate: flux-system/example-com-staging

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

+---
+apiVersion: cert-manager.io/v1
+kind: Certificate
+metadata:
+  labels:
+    kustomize.toolkit.fluxcd.io/name: apps
+    kustomize.toolkit.fluxcd.io/namespace: flux-system
+  name: example-com-staging
+spec:
+  commonName: example.com
+  dnsNames:
+  - example.com
+  - '*.example.com'
+  issuerRef:
+    kind: ClusterIssuer
+    name: letsencrypt-staging
+  secretName: example-com-staging-tls
+
--- tests/testdata/cluster/apps/prod Kustomization: flux-system/apps Certificate: flux-system/other-com-staging

+++ tests/testdata/cluster/apps/prod Kustomization: flux-system/apps Certificate: flux-system/other-com-staging

@@ -0,0 +1,19 @@

+---
+apiVersion: cert-manager.io/v1
+kind: Certificate
+metadata:
+  labels:
+    kustomize.toolkit.fluxcd.io/name: apps
+    kustomize.toolkit.fluxcd.io/namespace: flux-system
+  name: other-com-staging
+spec:
+  commonName: other.com
+  dnsNames:
+  - other.com
+  - '*.other.com'
+  - example-value
+  issuerRef:
+    kind: ClusterIssuer
+    name: letsencrypt-staging
+  secretName: other-com-staging-tls
+

Copy link
Contributor

--- tests/testdata/cluster/clusters/prod Kustomization: flux-system/flux-system ConfigMap: flux-system/cluster-config

+++ tests/testdata/cluster/clusters/prod Kustomization: flux-system/flux-system ConfigMap: flux-system/cluster-config

@@ -1,9 +1,11 @@

 ---
 apiVersion: v1
 data:
+  SECRET_DOMAIN: example.com
+  SECRET_DOMAIN2: other.com
   cluster_label: example-value
 kind: ConfigMap
 metadata:
   labels:
     kustomize.toolkit.fluxcd.io/name: flux-system
     kustomize.toolkit.fluxcd.io/namespace: flux-system
--- tests/testdata/cluster/apps/prod Kustomization: flux-system/apps Certificate: flux-system/example-com-staging

+++ tests/testdata/cluster/apps/prod Kustomization: flux-system/apps Certificate: flux-system/example-com-staging

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

+---
+apiVersion: cert-manager.io/v1
+kind: Certificate
+metadata:
+  labels:
+    kustomize.toolkit.fluxcd.io/name: apps
+    kustomize.toolkit.fluxcd.io/namespace: flux-system
+  name: example-com-staging
+spec:
+  commonName: example.com
+  dnsNames:
+  - example.com
+  - '*.example.com'
+  issuerRef:
+    kind: ClusterIssuer
+    name: letsencrypt-staging
+  secretName: example-com-staging-tls
+
--- tests/testdata/cluster/apps/prod Kustomization: flux-system/apps Certificate: flux-system/other-com-staging

+++ tests/testdata/cluster/apps/prod Kustomization: flux-system/apps Certificate: flux-system/other-com-staging

@@ -0,0 +1,19 @@

+---
+apiVersion: cert-manager.io/v1
+kind: Certificate
+metadata:
+  labels:
+    kustomize.toolkit.fluxcd.io/name: apps
+    kustomize.toolkit.fluxcd.io/namespace: flux-system
+  name: other-com-staging
+spec:
+  commonName: other.com
+  dnsNames:
+  - other.com
+  - '*.other.com'
+  - example-value
+  issuerRef:
+    kind: ClusterIssuer
+    name: letsencrypt-staging
+  secretName: other-com-staging-tls
+

@codecov-commenter
Copy link

codecov-commenter commented Jun 29, 2024

Codecov Report

Attention: Patch coverage is 89.47368% with 4 lines in your changes missing coverage. Please review.

Project coverage is 93.45%. Comparing base (c71dbb0) to head (4234b28).

Files Patch % Lines
flux_local/git_repo.py 88.46% 3 Missing ⚠️
flux_local/kustomize.py 87.50% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #734      +/-   ##
==========================================
+ Coverage   93.43%   93.45%   +0.02%     
==========================================
  Files          20       20              
  Lines        2131     2154      +23     
==========================================
+ Hits         1991     2013      +22     
- Misses        140      141       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@allenporter allenporter merged commit 2fa4319 into main Jun 29, 2024
39 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

User report: Replace: id matched 2 resources
2 participants