From 105c6c149e8027ced69e163ae3019073678ff7cf Mon Sep 17 00:00:00 2001 From: James Munnelly Date: Fri, 23 Feb 2018 08:38:22 +0000 Subject: [PATCH] Create a Namespace resource as part of the static manifest bundle --- contrib/charts/cert-manager/templates/00-namespace.yaml | 6 ++++++ contrib/charts/cert-manager/values.yaml | 5 +++++ docs/deploy/rbac/00-namespace.yaml | 7 +++++++ docs/deploy/without-rbac/00-namespace.yaml | 7 +++++++ hack/update-deploy-gen.sh | 1 + 5 files changed, 26 insertions(+) create mode 100644 contrib/charts/cert-manager/templates/00-namespace.yaml create mode 100644 docs/deploy/rbac/00-namespace.yaml create mode 100644 docs/deploy/without-rbac/00-namespace.yaml diff --git a/contrib/charts/cert-manager/templates/00-namespace.yaml b/contrib/charts/cert-manager/templates/00-namespace.yaml new file mode 100644 index 000000000..72c8a14b8 --- /dev/null +++ b/contrib/charts/cert-manager/templates/00-namespace.yaml @@ -0,0 +1,6 @@ +{{ if .Values.createNamespaceResource }} +apiVersion: v1 +kind: Namespace +metadata: + name: {{ .Release.Namespace | quote }} +{{- end }} diff --git a/contrib/charts/cert-manager/values.yaml b/contrib/charts/cert-manager/values.yaml index 5fe01a48a..300f77cac 100644 --- a/contrib/charts/cert-manager/values.yaml +++ b/contrib/charts/cert-manager/values.yaml @@ -55,3 +55,8 @@ ingressShim: # tag: v0.2.3 pullPolicy: IfNotPresent + +# This is used by the static manifest generator in order to create a static +# namespace manifest for the namespace that cert-manager is being installed +# within. It should **not** be used if you are using Helm for deployment. +createNamespaceResource: false \ No newline at end of file diff --git a/docs/deploy/rbac/00-namespace.yaml b/docs/deploy/rbac/00-namespace.yaml new file mode 100644 index 000000000..03faabd7b --- /dev/null +++ b/docs/deploy/rbac/00-namespace.yaml @@ -0,0 +1,7 @@ +##--- +# Source: cert-manager/templates/00-namespace.yaml + +apiVersion: v1 +kind: Namespace +metadata: + name: "cert-manager" diff --git a/docs/deploy/without-rbac/00-namespace.yaml b/docs/deploy/without-rbac/00-namespace.yaml new file mode 100644 index 000000000..03faabd7b --- /dev/null +++ b/docs/deploy/without-rbac/00-namespace.yaml @@ -0,0 +1,7 @@ +##--- +# Source: cert-manager/templates/00-namespace.yaml + +apiVersion: v1 +kind: Namespace +metadata: + name: "cert-manager" diff --git a/hack/update-deploy-gen.sh b/hack/update-deploy-gen.sh index 5f31f43c6..acc88c3ab 100755 --- a/hack/update-deploy-gen.sh +++ b/hack/update-deploy-gen.sh @@ -21,6 +21,7 @@ gen() { --namespace "cert-manager" \ --name "cert-manager" \ --set "fullnameOverride=cert-manager" \ + --set "createNamespaceResource=true" \ --output-dir "${TMP_OUTPUT}" mv "${TMP_OUTPUT}"/cert-manager/templates/*.* "${OUTPUT_DIR}/" }