-
Notifications
You must be signed in to change notification settings - Fork 171
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: no longer remove the agent ignore label from namespaces (#2623)
## Description Fixes namespaces being able to be excluded from Zarf's mutation (deleting the label forces everything through the Zarf agent). ## Related Issue Fixes #N/A ## Checklist before merging - [ ] Test, docs, adr added or updated as needed - [X] [Contributor Guide Steps](https://github.com/defenseunicorns/zarf/blob/main/.github/CONTRIBUTING.md#developer-workflow) followed --------- Co-authored-by: Austin Abro <[email protected]>
- Loading branch information
1 parent
3932a13
commit 7415967
Showing
5 changed files
with
65 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
src/test/packages/26-agent-ignore/manifests/deployment.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: httpd-deployment | ||
spec: | ||
selector: | ||
matchLabels: | ||
app: httpd | ||
replicas: 2 # tells deployment to run 2 pods matching the template | ||
template: | ||
metadata: | ||
labels: | ||
app: httpd | ||
spec: | ||
containers: | ||
- name: httpd | ||
# This is explicitly a different tag than examples/manifests to ensure it has to pull the image from outside the cluster | ||
image: "httpd:alpine" | ||
ports: | ||
- containerPort: 80 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
apiVersion: v1 | ||
kind: Namespace | ||
metadata: | ||
name: httpd-ignored | ||
labels: | ||
zarf.dev/agent: ignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
kind: ZarfPackageConfig | ||
metadata: | ||
name: agent-ignore-namespace | ||
description: Simple test to check that Zarf respects ignored namespaces. | ||
|
||
components: | ||
- name: httpd-deployment | ||
required: true | ||
manifests: | ||
- name: agent-ignore-httpd | ||
namespace: httpd-ignored | ||
files: | ||
- manifests/deployment.yaml | ||
- manifests/namespace.yaml | ||
actions: | ||
onDeploy: | ||
after: | ||
- wait: | ||
cluster: | ||
kind: deployment | ||
name: httpd-deployment | ||
namespace: httpd-ignored | ||
condition: "{.status.readyReplicas}=2" |