Skip to content

Commit f9d1bdd

Browse files
committed
chore(argocd): prevent namespace deletion
As things move around something might be deleted. If the namespace is deleted however then everything gets deleted. Let's just be a little bit safe out of the box.
1 parent f493d5b commit f9d1bdd

File tree

4 files changed

+15
-0
lines changed

4 files changed

+15
-0
lines changed

apps/appsets/appset-understack-infra.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,10 @@ spec:
9797
- CreateNamespace=true
9898
- ServerSideApply=true
9999
- RespectIgnoreDifferences=true
100+
managedNamespaceMetadata:
101+
annotations:
102+
# ArgoCD can create our namespace but let's not delete it
103+
argocd.argoproj.io/sync-options: Delete=false
100104
templatePatch: |
101105
spec:
102106
sources:

apps/appsets/appset-understack-operators.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,10 @@ spec:
155155
- CreateNamespace=true
156156
- ServerSideApply=true
157157
- RespectIgnoreDifferences=true
158+
managedNamespaceMetadata:
159+
annotations:
160+
# ArgoCD can create our namespace but let's not delete it
161+
argocd.argoproj.io/sync-options: Delete=false
158162
templatePatch: |
159163
spec:
160164
sources:

apps/appsets/components.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,10 @@ spec:
248248
- CreateNamespace=true
249249
- ServerSideApply=true
250250
- RespectIgnoreDifferences=true
251+
managedNamespaceMetadata:
252+
annotations:
253+
# ArgoCD can create our namespace but let's not delete it
254+
argocd.argoproj.io/sync-options: Delete=false
251255
templatePatch: |
252256
spec:
253257
{{- if hasKey . "source" }}

apps/appsets/openstack.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,9 @@ spec:
9999
- ServerSideApply=true
100100
- RespectIgnoreDifferences=true
101101
managedNamespaceMetadata:
102+
annotations:
103+
# ArgoCD can create our namespace but let's not delete it
104+
argocd.argoproj.io/sync-options: Delete=false
102105
labels:
103106
kubernetes.io/metadata.name: openstack
104107
name: openstack

0 commit comments

Comments
 (0)