From 7696a7ed0ac137f1eb580e6f1ca445dd9f14a335 Mon Sep 17 00:00:00 2001 From: Sebastian Widmer Date: Thu, 21 Apr 2022 09:47:57 +0200 Subject: [PATCH] Create namespace for Argo ArgoCD applies the namespace for all object that don't have one. Even if they are cluster scoped. The sync then fails if the ns does not exist. --- component/main.jsonnet | 1 + docs/modules/ROOT/pages/references/parameters.adoc | 2 -- .../openshift4-networking/00_namespace.yaml | 7 +++++++ 3 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 tests/golden/defaults/openshift4-networking/openshift4-networking/00_namespace.yaml diff --git a/component/main.jsonnet b/component/main.jsonnet index 03e8b84..0ce8bb3 100644 --- a/component/main.jsonnet +++ b/component/main.jsonnet @@ -31,5 +31,6 @@ local patches = // Define outputs below { + '00_namespace': kube.Namespace(params.namespace), '10_node_selector_patch': patches, } diff --git a/docs/modules/ROOT/pages/references/parameters.adoc b/docs/modules/ROOT/pages/references/parameters.adoc index c1f5308..a80a713 100644 --- a/docs/modules/ROOT/pages/references/parameters.adoc +++ b/docs/modules/ROOT/pages/references/parameters.adoc @@ -11,8 +11,6 @@ default:: `openshift-networking` The namespace in which to deploy this component. -NOTE: The component doesn't manage the namespace. - == `defaultNodeSelector` diff --git a/tests/golden/defaults/openshift4-networking/openshift4-networking/00_namespace.yaml b/tests/golden/defaults/openshift4-networking/openshift4-networking/00_namespace.yaml new file mode 100644 index 0000000..be37980 --- /dev/null +++ b/tests/golden/defaults/openshift4-networking/openshift4-networking/00_namespace.yaml @@ -0,0 +1,7 @@ +apiVersion: v1 +kind: Namespace +metadata: + annotations: {} + labels: + name: openshift-networking + name: openshift-networking